@whoz-oss/coday-client 0.203.0 → 0.204.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/{chunk-EN3JS6XQ.js → chunk-DX7KUYUN.js} +1 -1
- package/browser/{chunk-T2LL5FG4.js → chunk-HNNYFORJ.js} +1 -1
- package/browser/chunk-PCPMONQV.js +1 -0
- package/browser/index.html +1 -1
- package/browser/{main-AUOPF3JJ.js → main-45HGAOBW.js} +1 -1
- package/package.json +1 -1
- package/browser/chunk-XI5EZONK.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ge}from"./chunk-EMS3MOSZ.js";import{a as ce}from"./chunk-ZFLT2KNY.js";import{a as de,b as le}from"./chunk-BM7HTRD4.js";import{a as se}from"./chunk-CREVHCXF.js";import{a as Y}from"./chunk-2KD6MSFI.js";import{a as Z,b as ne,c as oe,d as ae}from"./chunk-XI5EZONK.js";import{a as ee,b as te,c as D}from"./chunk-J6XN2QQO.js";import{a as Q,b as W,c as X}from"./chunk-Q7GPLEGX.js";import{a as H,b as ie,c as re}from"./chunk-BWBXJSAF.js";import"./chunk-TPZGV5NA.js";import{a as me,b as pe}from"./chunk-HIUAVY64.js";import{a as L,e as N}from"./chunk-J3CZ3MOZ.js";import"./chunk-TIPIHEBG.js";import{a as k,c as T}from"./chunk-H7A4LOFH.js";import{o as z}from"./chunk-GN7KRTUQ.js";import"./chunk-4URCDOMP.js";import"./chunk-RBAVAHXW.js";import"./chunk-RI2JQRSB.js";import"./chunk-QJ3OBGZZ.js";import"./chunk-XG3WOI3P.js";import"./chunk-TZKO65ML.js";import{Cb as S,Db as u,Eb as E,Fb as _,Hc as w,Ka as p,Tb as a,Tc as F,Ub as C,Wa as g,ca as l,dc as M,ec as O,kb as x,lb as f,mb as h,pb as A,qb as y,rb as I,sb as i,ta as v,tb as r,ub as P,vb as c,wb as d}from"./chunk-RYEX2DR7.js";var t=()=>!0;var he=[{path:"",loadComponent:()=>import("./chunk-HMFECYUP.js").then(e=>e.AgentosShellComponent),children:[{path:"home",canActivate:[t],loadComponent:()=>import("./chunk-T2LL5FG4.js").then(e=>e.CaseShellComponent)},{path:"",loadComponent:()=>import("./chunk-SK7JAK5K.js").then(e=>e.LayoutComponent),children:[{path:"namespaces/new",canActivate:[t],loadComponent:()=>import("./chunk-4RQXBHNU.js").then(e=>e.NamespaceFormComponent)},{path:"namespaces/:namespaceId/edit",canActivate:[t],loadComponent:()=>import("./chunk-4RQXBHNU.js").then(e=>e.NamespaceFormComponent)},{path:"namespaces",canActivate:[t],loadComponent:()=>import("./chunk-EKKLCTBV.js").then(e=>e.NamespaceListComponent)},{path:"admin",canActivate:[t],loadComponent:()=>import("./chunk-UFOTGZBF.js").then(e=>e.AdminHomeComponent)},{path:"admin/users/new",canActivate:[t],loadComponent:()=>import("./chunk-EU6MUKDF.js").then(e=>e.UserFormComponent)},{path:"admin/users/:userId/edit",canActivate:[t],loadComponent:()=>import("./chunk-EU6MUKDF.js").then(e=>e.UserFormComponent)},{path:"admin/users",canActivate:[t],loadComponent:()=>import("./chunk-GTY23DMS.js").then(e=>e.UserListComponent)},{path:"admin/integration-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-24EMVCMJ.js").then(e=>e.IntegrationFormComponent)},{path:"admin/integration-configs/:integrationId/edit",canActivate:[t],loadComponent:()=>import("./chunk-24EMVCMJ.js").then(e=>e.IntegrationFormComponent)},{path:"admin/integration-configs",canActivate:[t],loadComponent:()=>import("./chunk-E5MP3JT3.js").then(e=>e.PlatformIntegrationConfigsComponent)},{path:"admin/prompts/new",canActivate:[t],loadComponent:()=>import("./chunk-2XIUD7DV.js").then(e=>e.PromptFormComponent)},{path:"admin/prompts/:promptId/edit",canActivate:[t],loadComponent:()=>import("./chunk-2XIUD7DV.js").then(e=>e.PromptFormComponent)},{path:"admin/prompts",canActivate:[t],loadComponent:()=>import("./chunk-LT6BGRWZ.js").then(e=>e.PlatformPromptsComponent)},{path:"admin/ai-providers/new",canActivate:[t],loadComponent:()=>import("./chunk-KP7JXEQ6.js").then(e=>e.AiProviderFormComponent)},{path:"admin/ai-providers/:aiProviderId/edit",canActivate:[t],loadComponent:()=>import("./chunk-KP7JXEQ6.js").then(e=>e.AiProviderFormComponent)},{path:"admin/ai-providers",canActivate:[t],loadComponent:()=>import("./chunk-X4OBCZKS.js").then(e=>e.PlatformAiProvidersComponent)},{path:"admin/ai-models/new",canActivate:[t],loadComponent:()=>import("./chunk-DIAV5ZVT.js").then(e=>e.AiModelFormComponent)},{path:"admin/ai-models/:modelId/edit",canActivate:[t],loadComponent:()=>import("./chunk-DIAV5ZVT.js").then(e=>e.AiModelFormComponent)},{path:"admin/ai-models",canActivate:[t],loadComponent:()=>import("./chunk-7DUVQCGC.js").then(e=>e.PlatformAiModelsComponent)},{path:"admin/agent-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-T6U3WDDW.js").then(e=>e.AgentConfigFormComponent)},{path:"admin/agent-configs/:agentConfigId/edit",canActivate:[t],loadComponent:()=>import("./chunk-T6U3WDDW.js").then(e=>e.AgentConfigFormComponent)},{path:"admin/agent-configs/:agentConfigId/inspect",canActivate:[t],loadComponent:()=>import("./chunk-4OZZANXO.js").then(e=>e.AgentConfigInspectComponent)},{path:"admin/agent-configs",canActivate:[t],loadComponent:()=>import("./chunk-PZWORCU2.js").then(e=>e.PlatformAgentConfigsComponent)},{path:"me",canActivate:[t],loadComponent:()=>import("./chunk-POQ6PK6P.js").then(e=>e.UserProfileComponent)},{path:"user",canActivate:[t],loadComponent:()=>import("./chunk-POQ6PK6P.js").then(e=>e.UserProfileComponent)},{path:":namespaceId/integrations/new",canActivate:[t],loadComponent:()=>import("./chunk-24EMVCMJ.js").then(e=>e.IntegrationFormComponent)},{path:":namespaceId/integrations/:integrationId/edit",canActivate:[t],loadComponent:()=>import("./chunk-24EMVCMJ.js").then(e=>e.IntegrationFormComponent)},{path:":namespaceId/integrations",canActivate:[t],loadComponent:()=>import("./chunk-WRTC44LF.js").then(e=>e.IntegrationsAllScopesComponent)},{path:":namespaceId/ai-providers/new",canActivate:[t],loadComponent:()=>import("./chunk-KP7JXEQ6.js").then(e=>e.AiProviderFormComponent)},{path:":namespaceId/ai-providers/:aiProviderId/edit",canActivate:[t],loadComponent:()=>import("./chunk-KP7JXEQ6.js").then(e=>e.AiProviderFormComponent)},{path:":namespaceId/ai-providers",canActivate:[t],loadComponent:()=>import("./chunk-P6D3VN2I.js").then(e=>e.AiProvidersAllScopesComponent)},{path:":namespaceId/ai-models/new",canActivate:[t],loadComponent:()=>import("./chunk-DIAV5ZVT.js").then(e=>e.AiModelFormComponent)},{path:":namespaceId/ai-models/:modelId/edit",canActivate:[t],loadComponent:()=>import("./chunk-DIAV5ZVT.js").then(e=>e.AiModelFormComponent)},{path:":namespaceId/ai-models",canActivate:[t],loadComponent:()=>import("./chunk-S4E4KZRV.js").then(e=>e.NamespaceAiModelsComponent)},{path:":namespaceId/prompts/new",canActivate:[t],loadComponent:()=>import("./chunk-2XIUD7DV.js").then(e=>e.PromptFormComponent)},{path:":namespaceId/prompts/:promptId/edit",canActivate:[t],loadComponent:()=>import("./chunk-2XIUD7DV.js").then(e=>e.PromptFormComponent)},{path:":namespaceId/prompts",canActivate:[t],loadComponent:()=>import("./chunk-TJUGTTPT.js").then(e=>e.NamespacePromptsComponent)},{path:":namespaceId/agent-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-T6U3WDDW.js").then(e=>e.AgentConfigFormComponent)},{path:":namespaceId/agent-configs/:agentConfigId/edit",canActivate:[t],loadComponent:()=>import("./chunk-T6U3WDDW.js").then(e=>e.AgentConfigFormComponent)},{path:":namespaceId/agent-configs/:agentConfigId/inspect",canActivate:[t],loadComponent:()=>import("./chunk-4OZZANXO.js").then(e=>e.AgentConfigInspectComponent)},{path:":namespaceId/agent-configs",canActivate:[t],loadComponent:()=>import("./chunk-QWADOF7R.js").then(e=>e.NamespaceAgentConfigsComponent)},{path:"",redirectTo:"namespaces",pathMatch:"full"}]}]}];function j(e,n){e&1&&(c(0,"p",6),a(1,"No cases yet. Start one below."),d())}function G(e,n){if(e&1&&(c(0,"div",7)(1,"span",8),a(2),d(),c(3,"span",9),a(4),d()()),e&2){let o=n.$implicit;p(2),C(o.id),p(2),C(o.status)}}function K(e,n){if(e&1&&A(0,G,5,2,"div",7,x().trackById,!0),e&2){let o=_();y(o)}}function q(e,n){e&1&&f(0,j,2,0,"p",6)(1,K,2,0),e&2&&h(n.length===0?0:1)}var R=class e{http=l(F);router=l(T);route=l(k);config=l(L);caseController=l(N);preferences=l(D);namespaceId=this.route.snapshot.params.namespaceId;cases$=this.caseController.listByParentCase(this.namespaceId);inputValue=v("");onInput(n){this.inputValue.set(n.target.value)}onKeydown(n){this.preferences.shouldSend(n)&&(n.preventDefault(),this.submit())}submit(){this.inputValue().trim()&&this.http.post(`${this.config.basePath}/api/cases`,{namespaceId:this.namespaceId,metadata:{}}).subscribe(o=>{this.inputValue.set(""),this.router.navigate(["/agentos",this.namespaceId,"cases",o.id??""])})}trackById(n,o){return o.id??""}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=g({type:e,selectors:[["agentos-case-list"]],decls:11,vars:5,consts:[[1,"case-list"],[1,"case-list__header"],[1,"case-list__items"],[1,"case-list__composer"],["placeholder","Start a new case\u2026","rows","3",1,"case-list__input",3,"input","keydown","value"],[1,"case-list__hint"],[1,"case-list__empty"],[1,"case-list__item"],[1,"case-list__item-id"],[1,"case-list__item-status"]],template:function(o,m){if(o&1&&(c(0,"div",0)(1,"header",1)(2,"h2"),a(3,"Cases"),d()(),c(4,"div",2),f(5,q,2,1),M(6,"async"),d(),c(7,"div",3)(8,"textarea",4),E("input",function(b){return m.onInput(b)})("keydown",function(b){return m.onKeydown(b)}),d(),c(9,"p",5),a(10),d()()()),o&2){let s;p(5),h((s=O(6,3,m.cases$))?5:-1,s),p(3),S("value",m.inputValue()),p(2),C(m.preferences.composerHint())}},dependencies:[w],styles:[".case-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;max-width:720px;margin:0 auto;padding:2rem;gap:1.5rem}.case-list__header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.case-list__items[_ngcontent-%COMP%]{flex:1;overflow-y:auto}.case-list__empty[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.case-list__composer[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.case-list__input[_ngcontent-%COMP%]{width:100%;resize:none;padding:.75rem 1rem;border-radius:12px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--glass-bg, rgba(255, 255, 255, .72));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px));color:var(--color-text, #1d1d1f);font-size:.95rem;font-family:inherit;line-height:1.5;outline:none;box-sizing:border-box;transition:border-color .15s ease}.case-list__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.case-list__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.case-list__hint[_ngcontent-%COMP%]{margin:0;font-size:.75rem;color:var(--color-text-secondary, #6e6e73);opacity:.7}"]})};var V=class e{case;static toListItem(n){return{id:n.id??"",name:n.title??n.id??"\u2014",description:void 0}}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=g({type:e,selectors:[["agentos-case-item"]],inputs:{case:"case"},decls:0,vars:0,template:function(o,m){},encapsulation:2,changeDetection:0})};function J(e,n){if(e&1&&(i(0,"p",11),a(1," Last action: "),i(2,"strong"),a(3),r()()),e&2){let o=_();p(3),C(o.lastAction())}}var $=class e{lastAction=v(null);onSend(){this.lastAction.set("send")}onStop(){this.lastAction.set("stop")}onAttach(){this.lastAction.set("attach")}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=g({type:e,selectors:[["agentos-hello"]],decls:35,vars:2,consts:[[1,"hello-agentos"],[1,"card"],[1,"badge"],[1,"principles"],[1,"demo"],[1,"demo-label"],[1,"demo-buttons"],["icon","send","variant","primary","title","Send",3,"action"],["icon","stop","variant","danger","title","Stop",3,"action"],["icon","attach_file","variant","default","title","Attach",3,"action"],["icon","mic","variant","default","title","Record",3,"action","disabled"],[1,"demo-feedback"]],template:function(o,m){o&1&&(i(0,"div",0)(1,"div",1)(2,"div",2),a(3,"AgentOS UI"),r(),i(4,"h1"),a(5,"Hello AgentOS"),r(),i(6,"p"),a(7," This component lives in "),i(8,"code"),a(9,"libs/agentos-ui"),r(),a(10," \u2014 isolated from Coday internals, ready to be published as "),i(11,"code"),a(12,"@whoz-oss/agentos-ui"),r(),a(13,". "),r(),P(14,"agentos-backend-status"),i(15,"ul",3)(16,"li"),a(17,"\u2726 No imports from Coday app"),r(),i(18,"li"),a(19,"\u2726 CSS custom properties as host contract"),r(),i(20,"li"),a(21,"\u2726 Standalone Angular components"),r(),i(22,"li"),a(23,"\u2726 Signals-first reactive state"),r()(),i(24,"div",4)(25,"p",5),a(26,"ds-icon-button from "),i(27,"code"),a(28,"@whoz-oss/design-system"),r()(),i(29,"div",6)(30,"ds-icon-button",7),u("action",function(){return m.onSend()}),r(),i(31,"ds-icon-button",8),u("action",function(){return m.onStop()}),r(),i(32,"ds-icon-button",9),u("action",function(){return m.onAttach()}),r(),i(33,"ds-icon-button",10),u("action",function(){return m.onAttach()}),r()(),f(34,J,4,1,"p",11),r()()()),o&2&&(p(33),I("disabled",!0),p(),h(m.lastAction()?34:-1))},dependencies:[z,H],styles:['@charset "UTF-8";.hello-agentos[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:2rem}.card[_ngcontent-%COMP%]{background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));box-shadow:var(--glass-shadow, 0 8px 32px 0 rgba(31, 38, 135, .15));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:20px;padding:3rem;max-width:480px;width:100%;text-align:center}.badge[_ngcontent-%COMP%]{display:inline-block;background:var(--color-primary, #007aff);color:var(--color-text-inverse, #ffffff);font-size:.75rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;padding:.25rem .75rem;border-radius:100px;margin-bottom:1.5rem}h1[_ngcontent-%COMP%]{color:var(--color-text, #1d1d1f);font-size:2rem;font-weight:700;margin:0 0 1rem;letter-spacing:-.02em}p[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);line-height:1.6;margin:0 0 1.5rem}p[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(142, 142, 147, .12));color:var(--color-code-text, #ff375f);padding:.125rem .375rem;border-radius:6px;font-size:.875em;border:1px solid var(--color-border, rgba(0, 0, 0, .1))}.principles[_ngcontent-%COMP%]{list-style:none;margin:0 0 1.5rem;padding:0;text-align:left;display:flex;flex-direction:column;gap:.5rem}.principles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;padding:.5rem .75rem;background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-radius:8px;border:1px solid var(--color-border-light, rgba(40, 40, 40, .08))}.demo[_ngcontent-%COMP%]{border-top:1px solid var(--color-border-light, rgba(40, 40, 40, .08));padding-top:1.25rem}.demo[_ngcontent-%COMP%] .demo-label[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.8rem;margin:0 0 .75rem}.demo[_ngcontent-%COMP%] .demo-label[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(142, 142, 147, .12));color:var(--color-code-text, #ff375f);padding:.125rem .375rem;border-radius:6px;font-size:.875em;border:1px solid var(--color-border, rgba(0, 0, 0, .1))}.demo[_ngcontent-%COMP%] .demo-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center;justify-content:center;padding:.75rem;background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-radius:12px;border:1px solid var(--color-border-light, rgba(40, 40, 40, .08))}.demo[_ngcontent-%COMP%] .demo-feedback[_ngcontent-%COMP%]{margin:.75rem 0 0;font-size:.85rem;color:var(--color-text-secondary, #6e6e73)}.demo[_ngcontent-%COMP%] .demo-feedback[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--color-primary, #007aff)}']})};export{he as AGENTOS_ROUTES,Y as AgentosShellComponent,W as AgentosThemeService,te as AgentosUserPreferencesService,H as BackendStatusComponent,ne as CaseChatComponent,Z as CaseDrawerComponent,oe as CaseHomeComponent,V as CaseItemComponent,R as CaseListComponent,ae as CaseShellComponent,ee as ENTER_KEY_BEHAVIORS,ie as HeaderComponent,$ as HelloAgentosComponent,re as LayoutComponent,ge as MarkdownPipe,me as NamespaceItemComponent,pe as NamespaceListComponent,Q as THEME_MODES,X as THEME_PORT,D as USER_PREFERENCES_PORT,se as UserAdminStateService,ce as UserFormComponent,de as UserItemComponent,le as UserListComponent,t as agentosReadyGuard};
|
|
1
|
+
import{a as ge}from"./chunk-EMS3MOSZ.js";import{a as ce}from"./chunk-ZFLT2KNY.js";import{a as de,b as le}from"./chunk-BM7HTRD4.js";import{a as se}from"./chunk-CREVHCXF.js";import{a as Y}from"./chunk-2KD6MSFI.js";import{a as te,b as ne,c as oe,d as ae}from"./chunk-PCPMONQV.js";import{a as Z,b as ee,c as D}from"./chunk-J6XN2QQO.js";import{a as Q,b as W,c as X}from"./chunk-Q7GPLEGX.js";import{a as H,b as ie,c as re}from"./chunk-BWBXJSAF.js";import"./chunk-TPZGV5NA.js";import{a as me,b as pe}from"./chunk-HIUAVY64.js";import{a as L,e as N}from"./chunk-J3CZ3MOZ.js";import"./chunk-TIPIHEBG.js";import{a as k,c as T}from"./chunk-H7A4LOFH.js";import{o as z}from"./chunk-GN7KRTUQ.js";import"./chunk-4URCDOMP.js";import"./chunk-RBAVAHXW.js";import"./chunk-RI2JQRSB.js";import"./chunk-QJ3OBGZZ.js";import"./chunk-XG3WOI3P.js";import"./chunk-TZKO65ML.js";import{Cb as S,Db as u,Eb as E,Fb as _,Hc as w,Ka as p,Tb as a,Tc as F,Ub as C,Wa as g,ca as l,dc as M,ec as O,kb as x,lb as f,mb as h,pb as A,qb as y,rb as I,sb as i,ta as v,tb as r,ub as P,vb as c,wb as d}from"./chunk-RYEX2DR7.js";var t=()=>!0;var he=[{path:"",loadComponent:()=>import("./chunk-HMFECYUP.js").then(e=>e.AgentosShellComponent),children:[{path:"home",canActivate:[t],loadComponent:()=>import("./chunk-HNNYFORJ.js").then(e=>e.CaseShellComponent)},{path:"",loadComponent:()=>import("./chunk-SK7JAK5K.js").then(e=>e.LayoutComponent),children:[{path:"namespaces/new",canActivate:[t],loadComponent:()=>import("./chunk-4RQXBHNU.js").then(e=>e.NamespaceFormComponent)},{path:"namespaces/:namespaceId/edit",canActivate:[t],loadComponent:()=>import("./chunk-4RQXBHNU.js").then(e=>e.NamespaceFormComponent)},{path:"namespaces",canActivate:[t],loadComponent:()=>import("./chunk-EKKLCTBV.js").then(e=>e.NamespaceListComponent)},{path:"admin",canActivate:[t],loadComponent:()=>import("./chunk-UFOTGZBF.js").then(e=>e.AdminHomeComponent)},{path:"admin/users/new",canActivate:[t],loadComponent:()=>import("./chunk-EU6MUKDF.js").then(e=>e.UserFormComponent)},{path:"admin/users/:userId/edit",canActivate:[t],loadComponent:()=>import("./chunk-EU6MUKDF.js").then(e=>e.UserFormComponent)},{path:"admin/users",canActivate:[t],loadComponent:()=>import("./chunk-GTY23DMS.js").then(e=>e.UserListComponent)},{path:"admin/integration-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-24EMVCMJ.js").then(e=>e.IntegrationFormComponent)},{path:"admin/integration-configs/:integrationId/edit",canActivate:[t],loadComponent:()=>import("./chunk-24EMVCMJ.js").then(e=>e.IntegrationFormComponent)},{path:"admin/integration-configs",canActivate:[t],loadComponent:()=>import("./chunk-E5MP3JT3.js").then(e=>e.PlatformIntegrationConfigsComponent)},{path:"admin/prompts/new",canActivate:[t],loadComponent:()=>import("./chunk-2XIUD7DV.js").then(e=>e.PromptFormComponent)},{path:"admin/prompts/:promptId/edit",canActivate:[t],loadComponent:()=>import("./chunk-2XIUD7DV.js").then(e=>e.PromptFormComponent)},{path:"admin/prompts",canActivate:[t],loadComponent:()=>import("./chunk-LT6BGRWZ.js").then(e=>e.PlatformPromptsComponent)},{path:"admin/ai-providers/new",canActivate:[t],loadComponent:()=>import("./chunk-KP7JXEQ6.js").then(e=>e.AiProviderFormComponent)},{path:"admin/ai-providers/:aiProviderId/edit",canActivate:[t],loadComponent:()=>import("./chunk-KP7JXEQ6.js").then(e=>e.AiProviderFormComponent)},{path:"admin/ai-providers",canActivate:[t],loadComponent:()=>import("./chunk-X4OBCZKS.js").then(e=>e.PlatformAiProvidersComponent)},{path:"admin/ai-models/new",canActivate:[t],loadComponent:()=>import("./chunk-DIAV5ZVT.js").then(e=>e.AiModelFormComponent)},{path:"admin/ai-models/:modelId/edit",canActivate:[t],loadComponent:()=>import("./chunk-DIAV5ZVT.js").then(e=>e.AiModelFormComponent)},{path:"admin/ai-models",canActivate:[t],loadComponent:()=>import("./chunk-7DUVQCGC.js").then(e=>e.PlatformAiModelsComponent)},{path:"admin/agent-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-T6U3WDDW.js").then(e=>e.AgentConfigFormComponent)},{path:"admin/agent-configs/:agentConfigId/edit",canActivate:[t],loadComponent:()=>import("./chunk-T6U3WDDW.js").then(e=>e.AgentConfigFormComponent)},{path:"admin/agent-configs/:agentConfigId/inspect",canActivate:[t],loadComponent:()=>import("./chunk-4OZZANXO.js").then(e=>e.AgentConfigInspectComponent)},{path:"admin/agent-configs",canActivate:[t],loadComponent:()=>import("./chunk-PZWORCU2.js").then(e=>e.PlatformAgentConfigsComponent)},{path:"me",canActivate:[t],loadComponent:()=>import("./chunk-POQ6PK6P.js").then(e=>e.UserProfileComponent)},{path:"user",canActivate:[t],loadComponent:()=>import("./chunk-POQ6PK6P.js").then(e=>e.UserProfileComponent)},{path:":namespaceId/integrations/new",canActivate:[t],loadComponent:()=>import("./chunk-24EMVCMJ.js").then(e=>e.IntegrationFormComponent)},{path:":namespaceId/integrations/:integrationId/edit",canActivate:[t],loadComponent:()=>import("./chunk-24EMVCMJ.js").then(e=>e.IntegrationFormComponent)},{path:":namespaceId/integrations",canActivate:[t],loadComponent:()=>import("./chunk-WRTC44LF.js").then(e=>e.IntegrationsAllScopesComponent)},{path:":namespaceId/ai-providers/new",canActivate:[t],loadComponent:()=>import("./chunk-KP7JXEQ6.js").then(e=>e.AiProviderFormComponent)},{path:":namespaceId/ai-providers/:aiProviderId/edit",canActivate:[t],loadComponent:()=>import("./chunk-KP7JXEQ6.js").then(e=>e.AiProviderFormComponent)},{path:":namespaceId/ai-providers",canActivate:[t],loadComponent:()=>import("./chunk-P6D3VN2I.js").then(e=>e.AiProvidersAllScopesComponent)},{path:":namespaceId/ai-models/new",canActivate:[t],loadComponent:()=>import("./chunk-DIAV5ZVT.js").then(e=>e.AiModelFormComponent)},{path:":namespaceId/ai-models/:modelId/edit",canActivate:[t],loadComponent:()=>import("./chunk-DIAV5ZVT.js").then(e=>e.AiModelFormComponent)},{path:":namespaceId/ai-models",canActivate:[t],loadComponent:()=>import("./chunk-S4E4KZRV.js").then(e=>e.NamespaceAiModelsComponent)},{path:":namespaceId/prompts/new",canActivate:[t],loadComponent:()=>import("./chunk-2XIUD7DV.js").then(e=>e.PromptFormComponent)},{path:":namespaceId/prompts/:promptId/edit",canActivate:[t],loadComponent:()=>import("./chunk-2XIUD7DV.js").then(e=>e.PromptFormComponent)},{path:":namespaceId/prompts",canActivate:[t],loadComponent:()=>import("./chunk-TJUGTTPT.js").then(e=>e.NamespacePromptsComponent)},{path:":namespaceId/agent-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-T6U3WDDW.js").then(e=>e.AgentConfigFormComponent)},{path:":namespaceId/agent-configs/:agentConfigId/edit",canActivate:[t],loadComponent:()=>import("./chunk-T6U3WDDW.js").then(e=>e.AgentConfigFormComponent)},{path:":namespaceId/agent-configs/:agentConfigId/inspect",canActivate:[t],loadComponent:()=>import("./chunk-4OZZANXO.js").then(e=>e.AgentConfigInspectComponent)},{path:":namespaceId/agent-configs",canActivate:[t],loadComponent:()=>import("./chunk-QWADOF7R.js").then(e=>e.NamespaceAgentConfigsComponent)},{path:"",redirectTo:"namespaces",pathMatch:"full"}]}]}];function j(e,n){e&1&&(c(0,"p",6),a(1,"No cases yet. Start one below."),d())}function G(e,n){if(e&1&&(c(0,"div",7)(1,"span",8),a(2),d(),c(3,"span",9),a(4),d()()),e&2){let o=n.$implicit;p(2),C(o.id),p(2),C(o.status)}}function K(e,n){if(e&1&&A(0,G,5,2,"div",7,x().trackById,!0),e&2){let o=_();y(o)}}function q(e,n){e&1&&f(0,j,2,0,"p",6)(1,K,2,0),e&2&&h(n.length===0?0:1)}var R=class e{http=l(F);router=l(T);route=l(k);config=l(L);caseController=l(N);preferences=l(D);namespaceId=this.route.snapshot.params.namespaceId;cases$=this.caseController.listByParentCase(this.namespaceId);inputValue=v("");onInput(n){this.inputValue.set(n.target.value)}onKeydown(n){this.preferences.shouldSend(n)&&(n.preventDefault(),this.submit())}submit(){this.inputValue().trim()&&this.http.post(`${this.config.basePath}/api/cases`,{namespaceId:this.namespaceId,metadata:{}}).subscribe(o=>{this.inputValue.set(""),this.router.navigate(["/agentos",this.namespaceId,"cases",o.id??""])})}trackById(n,o){return o.id??""}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=g({type:e,selectors:[["agentos-case-list"]],decls:11,vars:5,consts:[[1,"case-list"],[1,"case-list__header"],[1,"case-list__items"],[1,"case-list__composer"],["placeholder","Start a new case\u2026","rows","3",1,"case-list__input",3,"input","keydown","value"],[1,"case-list__hint"],[1,"case-list__empty"],[1,"case-list__item"],[1,"case-list__item-id"],[1,"case-list__item-status"]],template:function(o,m){if(o&1&&(c(0,"div",0)(1,"header",1)(2,"h2"),a(3,"Cases"),d()(),c(4,"div",2),f(5,q,2,1),M(6,"async"),d(),c(7,"div",3)(8,"textarea",4),E("input",function(b){return m.onInput(b)})("keydown",function(b){return m.onKeydown(b)}),d(),c(9,"p",5),a(10),d()()()),o&2){let s;p(5),h((s=O(6,3,m.cases$))?5:-1,s),p(3),S("value",m.inputValue()),p(2),C(m.preferences.composerHint())}},dependencies:[w],styles:[".case-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;max-width:720px;margin:0 auto;padding:2rem;gap:1.5rem}.case-list__header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.case-list__items[_ngcontent-%COMP%]{flex:1;overflow-y:auto}.case-list__empty[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.case-list__composer[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.case-list__input[_ngcontent-%COMP%]{width:100%;resize:none;padding:.75rem 1rem;border-radius:12px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--glass-bg, rgba(255, 255, 255, .72));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px));color:var(--color-text, #1d1d1f);font-size:.95rem;font-family:inherit;line-height:1.5;outline:none;box-sizing:border-box;transition:border-color .15s ease}.case-list__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.case-list__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.case-list__hint[_ngcontent-%COMP%]{margin:0;font-size:.75rem;color:var(--color-text-secondary, #6e6e73);opacity:.7}"]})};var V=class e{case;static toListItem(n){return{id:n.id??"",name:n.title??n.id??"\u2014",description:void 0}}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=g({type:e,selectors:[["agentos-case-item"]],inputs:{case:"case"},decls:0,vars:0,template:function(o,m){},encapsulation:2,changeDetection:0})};function J(e,n){if(e&1&&(i(0,"p",11),a(1," Last action: "),i(2,"strong"),a(3),r()()),e&2){let o=_();p(3),C(o.lastAction())}}var $=class e{lastAction=v(null);onSend(){this.lastAction.set("send")}onStop(){this.lastAction.set("stop")}onAttach(){this.lastAction.set("attach")}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=g({type:e,selectors:[["agentos-hello"]],decls:35,vars:2,consts:[[1,"hello-agentos"],[1,"card"],[1,"badge"],[1,"principles"],[1,"demo"],[1,"demo-label"],[1,"demo-buttons"],["icon","send","variant","primary","title","Send",3,"action"],["icon","stop","variant","danger","title","Stop",3,"action"],["icon","attach_file","variant","default","title","Attach",3,"action"],["icon","mic","variant","default","title","Record",3,"action","disabled"],[1,"demo-feedback"]],template:function(o,m){o&1&&(i(0,"div",0)(1,"div",1)(2,"div",2),a(3,"AgentOS UI"),r(),i(4,"h1"),a(5,"Hello AgentOS"),r(),i(6,"p"),a(7," This component lives in "),i(8,"code"),a(9,"libs/agentos-ui"),r(),a(10," \u2014 isolated from Coday internals, ready to be published as "),i(11,"code"),a(12,"@whoz-oss/agentos-ui"),r(),a(13,". "),r(),P(14,"agentos-backend-status"),i(15,"ul",3)(16,"li"),a(17,"\u2726 No imports from Coday app"),r(),i(18,"li"),a(19,"\u2726 CSS custom properties as host contract"),r(),i(20,"li"),a(21,"\u2726 Standalone Angular components"),r(),i(22,"li"),a(23,"\u2726 Signals-first reactive state"),r()(),i(24,"div",4)(25,"p",5),a(26,"ds-icon-button from "),i(27,"code"),a(28,"@whoz-oss/design-system"),r()(),i(29,"div",6)(30,"ds-icon-button",7),u("action",function(){return m.onSend()}),r(),i(31,"ds-icon-button",8),u("action",function(){return m.onStop()}),r(),i(32,"ds-icon-button",9),u("action",function(){return m.onAttach()}),r(),i(33,"ds-icon-button",10),u("action",function(){return m.onAttach()}),r()(),f(34,J,4,1,"p",11),r()()()),o&2&&(p(33),I("disabled",!0),p(),h(m.lastAction()?34:-1))},dependencies:[z,H],styles:['@charset "UTF-8";.hello-agentos[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:2rem}.card[_ngcontent-%COMP%]{background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));box-shadow:var(--glass-shadow, 0 8px 32px 0 rgba(31, 38, 135, .15));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:20px;padding:3rem;max-width:480px;width:100%;text-align:center}.badge[_ngcontent-%COMP%]{display:inline-block;background:var(--color-primary, #007aff);color:var(--color-text-inverse, #ffffff);font-size:.75rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;padding:.25rem .75rem;border-radius:100px;margin-bottom:1.5rem}h1[_ngcontent-%COMP%]{color:var(--color-text, #1d1d1f);font-size:2rem;font-weight:700;margin:0 0 1rem;letter-spacing:-.02em}p[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);line-height:1.6;margin:0 0 1.5rem}p[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(142, 142, 147, .12));color:var(--color-code-text, #ff375f);padding:.125rem .375rem;border-radius:6px;font-size:.875em;border:1px solid var(--color-border, rgba(0, 0, 0, .1))}.principles[_ngcontent-%COMP%]{list-style:none;margin:0 0 1.5rem;padding:0;text-align:left;display:flex;flex-direction:column;gap:.5rem}.principles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;padding:.5rem .75rem;background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-radius:8px;border:1px solid var(--color-border-light, rgba(40, 40, 40, .08))}.demo[_ngcontent-%COMP%]{border-top:1px solid var(--color-border-light, rgba(40, 40, 40, .08));padding-top:1.25rem}.demo[_ngcontent-%COMP%] .demo-label[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.8rem;margin:0 0 .75rem}.demo[_ngcontent-%COMP%] .demo-label[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(142, 142, 147, .12));color:var(--color-code-text, #ff375f);padding:.125rem .375rem;border-radius:6px;font-size:.875em;border:1px solid var(--color-border, rgba(0, 0, 0, .1))}.demo[_ngcontent-%COMP%] .demo-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center;justify-content:center;padding:.75rem;background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-radius:12px;border:1px solid var(--color-border-light, rgba(40, 40, 40, .08))}.demo[_ngcontent-%COMP%] .demo-feedback[_ngcontent-%COMP%]{margin:.75rem 0 0;font-size:.85rem;color:var(--color-text-secondary, #6e6e73)}.demo[_ngcontent-%COMP%] .demo-feedback[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--color-primary, #007aff)}']})};export{he as AGENTOS_ROUTES,Y as AgentosShellComponent,W as AgentosThemeService,ee as AgentosUserPreferencesService,H as BackendStatusComponent,te as CaseChatComponent,oe as CaseDrawerComponent,ne as CaseHomeComponent,V as CaseItemComponent,R as CaseListComponent,ae as CaseShellComponent,Z as ENTER_KEY_BEHAVIORS,ie as HeaderComponent,$ as HelloAgentosComponent,re as LayoutComponent,ge as MarkdownPipe,me as NamespaceItemComponent,pe as NamespaceListComponent,Q as THEME_MODES,X as THEME_PORT,D as USER_PREFERENCES_PORT,se as UserAdminStateService,ce as UserFormComponent,de as UserItemComponent,le as UserListComponent,t as agentosReadyGuard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as a}from"./chunk-
|
|
1
|
+
import{d as a}from"./chunk-PCPMONQV.js";import"./chunk-J6XN2QQO.js";import"./chunk-Q7GPLEGX.js";import"./chunk-TPZGV5NA.js";import"./chunk-J3CZ3MOZ.js";import"./chunk-TIPIHEBG.js";import"./chunk-H7A4LOFH.js";import"./chunk-GN7KRTUQ.js";import"./chunk-4URCDOMP.js";import"./chunk-RBAVAHXW.js";import"./chunk-RI2JQRSB.js";import"./chunk-QJ3OBGZZ.js";import"./chunk-XG3WOI3P.js";import"./chunk-TZKO65ML.js";import"./chunk-RYEX2DR7.js";export{a as CaseShellComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as me}from"./chunk-J6XN2QQO.js";import{c as ze}from"./chunk-Q7GPLEGX.js";import{a as $e}from"./chunk-TPZGV5NA.js";import{a as se,e as le,h as Ae}from"./chunk-J3CZ3MOZ.js";import{a as qe,b as Ve,c as Le}from"./chunk-TIPIHEBG.js";import{a as j,c as re}from"./chunk-H7A4LOFH.js";import{o as de,t as Fe}from"./chunk-GN7KRTUQ.js";import{a as ce,c as X}from"./chunk-RI2JQRSB.js";import{Ab as fe,Bb as M,Db as g,Eb as q,Fb as c,Ga as Se,Gc as Ne,Jb as B,Jc as De,Ka as l,Kb as F,Lb as z,Ma as te,Pb as oe,Qb as ae,Rb as I,S as Y,Sb as ve,Tb as d,Tc as ie,Ub as b,Vb as $,Wa as E,Wc as Re,Z as Te,a as J,ab as ne,b as Z,bc as Ee,ca as y,cc as Oe,dc as Pe,ec as Ie,ga as f,ha as v,hc as xe,i as we,jb as be,kb as ke,kc as S,lb as u,ma as ee,mb as h,nc as C,oc as p,pa as Me,pb as R,qb as A,rb as T,sb as r,t as K,ta as w,tb as s,ua as U,ub as D,vb as k,wb as O,xb as W}from"./chunk-RYEX2DR7.js";var Q=class o{caseController=y(le);cases=w([]);loadSubscription=null;loadCases(t){this.loadSubscription?.unsubscribe(),this.loadSubscription=this.caseController.listByParentCase(t).subscribe(e=>{this.cases.set(e),this.loadSubscription=null})}addCase(t){this.cases.update(e=>[t,...e])}updateCaseTitle(t,e){this.cases.update(n=>n.map(a=>a.id===t?Z(J({},a),{title:e}):a))}static \u0275fac=function(e){return new(e||o)};static \u0275prov=Te({token:o,factory:o.\u0275fac,providedIn:"root"})};var Be=["composerInput"],je=["messagesContainer"],Qe=(o,t)=>t.phaseIndex;function Ge(o,t){o&1&&(r(0,"div",4)(1,"p"),d(2,"No messages yet."),s()())}function Ke(o,t){if(o&1&&(r(0,"div",18)(1,"span",21),d(2,"session context"),s(),r(3,"pre",22),d(4),Pe(5,"json"),s()()),o&2){let e=c(2).$implicit;l(4),b(Ie(5,1,e.event.sessionContext))}}function Ye(o,t){if(o&1&&(r(0,"div",17),u(1,Ke,6,3,"div",18),r(2,"span",19),d(3),s(),D(4,"div",20),s()),o&2){let e=c().$implicit,n=c(2);I("case-chat__message--user",e.event.actor.role==="USER")("case-chat__message--agent",e.event.actor.role==="AGENT"),l(),h(n.showTechnical()&&e.event.sessionContext?1:-1),l(2),b(e.event.actor.displayName),l(),T("innerHTML",e.html,Se)}}function Xe(o,t){if(o&1&&(r(0,"div",14)(1,"span",19),d(2),s(),r(3,"p",23),d(4),s()()),o&2){let e=c().$implicit,n=c(2);l(2),b(n.agentDisplayName()),l(2),b(e.text)}}function Je(o,t){if(o&1&&(r(0,"div",28),d(1),s()),o&2){let e=c(3).$implicit;l(),b(e.item.detail)}}function Ze(o,t){if(o&1){let e=M();r(0,"button",26),g("click",function(){f(e);let a=c(2).$implicit,i=c(2);return v(i.toggleTechnical(a.eventId))}),r(1,"span",25),d(2),s(),r(3,"span",27),d(4),s()(),u(5,Je,2,1,"div",28)}if(o&2){let e=c(2).$implicit,n=c(2);be("aria-expanded",n.isTechnicalExpanded(e.eventId)),l(2),b(e.item.label),l(2),b(n.isTechnicalExpanded(e.eventId)?"\u25BC":"\u25B6"),l(),h(n.isTechnicalExpanded(e.eventId)?5:-1)}}function et(o,t){if(o&1&&(r(0,"span",25),d(1),s()),o&2){let e=c(2).$implicit;l(),b(e.item.label)}}function tt(o,t){if(o&1&&(r(0,"div",24),u(1,Ze,6,4)(2,et,2,1,"span",25),s()),o&2){let e=c().$implicit;I("case-chat__technical--warn",e.item.type==="WarnEvent")("case-chat__technical--error",e.item.type==="ErrorEvent"),l(),h(e.item.detail?1:2)}}function nt(o,t){o&1&&d(0," \u23F3 ")}function ot(o,t){o&1&&d(0," \u2705 ")}function at(o,t){o&1&&d(0," \u274C ")}function it(o,t){if(o&1&&(r(0,"div",45)(1,"span",46),d(2,"Enrichment content"),s(),r(3,"pre"),d(4),s()()),o&2){let e=c().$implicit;l(4),b(e.enrichmentContent)}}function rt(o,t){if(o&1&&(r(0,"div",41)(1,"div",42)(2,"span",43),d(3),s(),r(4,"span",44),d(5),s()(),r(6,"div",45)(7,"span",46),d(8,"Prompt"),s(),r(9,"pre"),d(10),s()(),r(11,"div",45)(12,"span",46),d(13,"LLM output"),s(),r(14,"pre"),d(15),s()(),u(16,it,5,1,"div",45),s()),o&2){let e=t.$implicit;I("case-chat__enrichment-phase--failed",!e.success),l(3),$("Phase ",e.phaseIndex),l(2),b(e.success?"\u2705":"\u274C"),l(5),b(e.prompt),l(5),b(e.llmOutput),l(),h(e.enrichmentContent?16:-1)}}function st(o,t){if(o&1&&(r(0,"div",35)(1,"span",37),d(2,"Enrichment phases"),s(),R(3,rt,17,7,"div",40,Qe),s()),o&2){let e=c(3).$implicit;l(3),A(e.call.enrichmentPhases)}}function lt(o,t){if(o&1&&(r(0,"div",36)(1,"span",37),d(2,"Payload"),s(),r(3,"pre"),d(4),s()()),o&2){let e=c(3).$implicit;l(4),b(e.call.args)}}function ct(o,t){o&1&&(r(0,"pre"),d(1),s()),o&2&&(l(),b(t))}function dt(o,t){o&1&&(r(0,"span",38),d(1,"Running\u2026"),s())}function mt(o,t){o&1&&(r(0,"span",39),d(1,"No output"),s())}function pt(o,t){if(o&1&&(r(0,"div",34),u(1,st,5,0,"div",35),u(2,lt,5,1,"div",36),r(3,"div",36)(4,"span",37),d(5,"Output"),s(),u(6,ct,2,1,"pre")(7,dt,2,0,"span",38)(8,mt,2,0,"span",39),s()()),o&2){let e,n=c(2).$implicit,a=c(2);l(),h(a.showTechnical()&&(n.call.enrichmentPhases!=null&&n.call.enrichmentPhases.length)?1:-1),l(),h(n.call.args?2:-1),l(4),h((e=a.extractToolOutput(n.call))?6:n.call.response?8:7,e)}}function _t(o,t){if(o&1){let e=M();r(0,"div",29)(1,"button",30),g("click",function(){f(e);let a=c().$implicit,i=c(2);return v(i.toggleToolCall(a.call.requestId))}),r(2,"span",31),u(3,nt,1,0)(4,ot,1,0)(5,at,1,0),s(),r(6,"span",32),d(7),s(),r(8,"span",33),d(9),s()(),u(10,pt,9,3,"div",34),s()}if(o&2){let e=c().$implicit,n=c(2);I("case-chat__tool-call--pending",!e.call.response)("case-chat__tool-call--success",(e.call.response==null?null:e.call.response.success)===!0)("case-chat__tool-call--error",(e.call.response==null?null:e.call.response.success)===!1),l(),be("aria-expanded",n.isToolCallExpanded(e.call.requestId)),l(2),h(e.call.response?e.call.response.success?4:5:3),l(4),b(e.call.toolName),l(2),b(n.isToolCallExpanded(e.call.requestId)?"\u25BC":"\u25B6"),l(),h(n.isToolCallExpanded(e.call.requestId)?10:-1)}}function ut(o,t){if(o&1&&u(0,Ye,5,7,"div",13)(1,Xe,5,2,"div",14)(2,tt,3,5,"div",15)(3,_t,11,11,"div",16),o&2){let e=t.$implicit;h(e.kind==="message"?0:e.kind==="streaming"?1:e.kind==="technical"?2:3)}}function ht(o,t){if(o&1&&R(0,ut,4,1,null,null,ke().trackTimelineItem,!0),o&2){let e=c();A(e.timeline())}}function gt(o,t){o&1&&(r(0,"div",5),D(1,"span",47)(2,"span",47)(3,"span",47),s())}function Ct(o,t){if(o&1){let e=M();r(0,"div",6)(1,"ds-icon-button",48),g("action",function(){f(e);let a=c();return v(a.onScrollToBottomClick())}),s()()}}function bt(o,t){if(o&1){let e=M();r(0,"ds-icon-button",49),g("action",function(){f(e);let a=c();return v(a.interrupt())}),s()}}function ft(o,t){if(o&1){let e=M();r(0,"ds-icon-button",50),g("action",function(){f(e);let a=c();return v(a.submit())}),s()}if(o&2){let e=c();T("title",e.preferences.composerHint())("disabled",!e.canSend)}}var vt=64,pe=class o{route=y(j);http=y(ie);zone=y(Me);destroyRef=y(ee);domSanitizer=y(Re);config=y(se);preferences=y(me);caseState=y(Q);caseId=this.route.snapshot.queryParams.case;namespaceId=this.route.snapshot.queryParams.ns;markdownRenderer=this.buildMarkdownRenderer();agentDisplayName=S(()=>{let t=this.events();for(let e=t.length-1;e>=0;e--){let n=t[e];if(n){if(n.type==="AgentRunningEvent"||n.type==="AgentSelectedEvent"||n.type==="AgentFinishedEvent"){let a=n.agentName;if(a&&a.trim().length>0)return a}if(n.type==="MessageEvent"&&n.actor.role==="AGENT"&&n.actor.displayName)return n.actor.displayName}}return"Assistant"});eventSource=null;composerInput;messagesContainer;events=w([]);messageHtmlCache=new Map;inputValue=w("");isRunning=w(!1);isTerminal=w(!1);static SHOW_TECHNICAL_KEY="agentos.case-chat.showTechnical";showTechnical=w(localStorage.getItem(o.SHOW_TECHNICAL_KEY)==="true");showTechnicalOverride=p(!1);streamingText=w("");collapsedTools=w(new Set);expandedTechnicals=w(new Set);isAtBottom=w(!0);scrollListenerCleanup=null;constructor(){U(()=>{this.showTechnical.set(this.showTechnicalOverride())}),U(()=>{this.isRunning()||this.isTerminal()||queueMicrotask(()=>this.composerInput?.nativeElement.focus())}),U(()=>{this.timeline(),this.streamingText(),this.isAtBottom()&&queueMicrotask(()=>this.scrollToBottom())}),te(()=>{this.attachScrollListener()})}baseTimeline=S(()=>{let t=this.events(),e=this.showTechnical(),n=new Map;for(let x of t)if(x.type==="ToolRequestEvent"){let m=x,_=m.toolRequestId??x.id,N=n.get(_);n.set(_,{requestId:_,toolName:m.toolName??"unknown",args:m.args??null,response:N?.response,enrichmentPhases:m.enrichmentPhases??null})}else if(x.type==="ToolResponseEvent"){let m=x,_=m.toolRequestId??x.id,N=n.get(_);n.set(_,{requestId:_,toolName:N?.toolName??m.toolName??"unknown",args:N?.args??null,response:m,enrichmentPhases:N?.enrichmentPhases??null})}let a=[],i=new Set;for(let x of t)if(x.type==="MessageEvent"){let m=x;a.push({kind:"message",event:m,html:this.messageHtmlCache.get(x.id)??""})}else if(x.type==="ToolRequestEvent"||x.type==="ToolResponseEvent"){let m=x.toolRequestId??x.id;i.has(m)||(i.add(m),a.push({kind:"tool",call:n.get(m)}))}else if(e){let m=this.toTechnicalItem(x);m&&a.push({kind:"technical",item:m,eventId:x.id})}return a});timeline=S(()=>{let t=this.baseTimeline(),e=this.streamingText();return e.trim().length===0?t:[...t,{kind:"streaming",text:e}]});trackTimelineItem(t,e){switch(e.kind){case"message":return e.event.id;case"tool":return e.call.requestId;case"technical":return e.eventId;case"streaming":return"streaming"}}get canSend(){return!!this.inputValue().trim()&&!this.isRunning()&&!this.isTerminal()}ngOnInit(){this.connectSse(),this.route.queryParams.pipe(ce(this.destroyRef)).subscribe(t=>{let e=t.case;e&&e!==this.caseId&&(this.caseId=e,this.reinitialise())})}ngOnDestroy(){this.eventSource?.close(),this.scrollListenerCleanup?.()}attachScrollListener(){let t=this.messagesContainer?.nativeElement;if(!t)return;let e=()=>{let n=t.scrollHeight-t.scrollTop-t.clientHeight;this.isAtBottom.set(n<=vt)};t.addEventListener("scroll",e,{passive:!0}),this.scrollListenerCleanup=()=>t.removeEventListener("scroll",e)}scrollToBottom(){let t=this.messagesContainer?.nativeElement;t&&(t.scrollTop=t.scrollHeight)}onScrollToBottomClick(){this.isAtBottom.set(!0),this.scrollToBottom()}connectSse(){let t=`${this.config.basePath}/api/cases/${this.caseId}/events`;console.log("[AgentOS SSE] connecting",{url:t,basePath:this.config.basePath,caseId:this.caseId,namespaceId:this.namespaceId,now:new Date().toISOString()}),this.eventSource=this.zone.runOutsideAngular(()=>new EventSource(t));let e=a=>{let i=performance.now(),x=a.type,m=a.data;console.log("[AgentOS SSE] frame received",{sseEventName:x,dataLength:m?.length??0,dataPreview:m?.slice(0,120),receivedAtMs:i});try{let _=JSON.parse(m);this.zone.run(()=>{let N=this.events().length;if(_.type==="MessageEvent"){let P=_,V=this.extractText(P);this.messageHtmlCache.has(_.id)||this.messageHtmlCache.set(_.id,this.renderMarkdown(V))}this.events.update(P=>P.some(V=>V.id===_.id)?P:[...P,_]);let We=this.events().length;if(console.log("[AgentOS SSE] event processed",{sseEventName:x,eventType:_.type,eventId:_.id,beforeLen:N,afterLen:We,running:this.isRunning(),terminal:this.isTerminal()}),_.type==="TextChunkEvent"){let P=_.chunk;P&&this.streamingText.update(V=>V+P);return}if(_.type==="CaseUpdatedEvent"){let P=_;P.title&&this.caseState.updateCaseTitle(_.caseId,P.title);return}if(_.type==="CaseStatusEvent"){let P=_.status,V=P==="KILLED"||P==="ERROR";if(this.isTerminal.set(V),V)this.isRunning.set(!1),this.eventSource?.close(),this.eventSource=null;else{let ye=P==="RUNNING";this.isRunning.set(ye),ye||this.streamingText.set("")}return}if(_.type==="AgentFinishedEvent"){this.isRunning.set(!1),this.streamingText.set("");return}})}catch(_){console.warn("[AgentOS SSE] failed to parse event data",{sseEventName:x,error:_,dataPreview:m?.slice(0,500)})}},n=["MessageEvent","CaseStatusEvent","CaseUpdatedEvent","AgentSelectedEvent","AgentRunningEvent","AgentFinishedEvent","ThinkingEvent","TextChunkEvent","ToolRequestEvent","ToolResponseEvent","PendingConfirmationEvent","ConfirmationResolvedEvent","ErrorEvent","WarnEvent","IntentionGeneratedEvent"];for(let a of n)console.log("[AgentOS SSE] addEventListener",a),this.eventSource.addEventListener(a,e);this.eventSource.onopen=()=>{console.log("[AgentOS SSE] connection open",{readyState:this.eventSource?.readyState,at:new Date().toISOString()})},this.eventSource.onmessage=a=>{console.log("[AgentOS SSE] onmessage (unnamed event) received",{dataLength:a.data?.length??0,dataPreview:a.data?.slice(0,120)})},this.eventSource.onerror=a=>{console.warn("[AgentOS SSE] connection error",{err:a,readyState:this.eventSource?.readyState,at:new Date().toISOString()}),this.zone.run(()=>{this.isRunning.set(!1)})}}onInput(t){this.inputValue.set(t.target.value)}onKeydown(t){this.preferences.shouldSend(t)&&(t.preventDefault(),this.submit())}reinitialise(){this.eventSource?.close(),this.eventSource=null,this.events.set([]),this.messageHtmlCache.clear(),this.inputValue.set(""),this.isRunning.set(!1),this.isTerminal.set(!1),this.streamingText.set(""),this.collapsedTools.set(new Set),this.isAtBottom.set(!0),this.connectSse()}submit(){if(!this.canSend)return;let t=this.inputValue().trim();this.inputValue.set(""),this.sendMessage(t)}sendMessage(t){this.isRunning.set(!0),this.streamingText.set(""),this.http.post(`${this.config.basePath}/api/cases/${this.caseId}/messages`,{content:t,userId:"default-user"}).subscribe({error:e=>{console.error("[CaseChat] Failed to send message",e),this.isRunning.set(!1)}})}interrupt(){this.http.post(`${this.config.basePath}/api/cases/${this.caseId}/interrupt`,{}).subscribe({error:t=>console.error("[CaseChat] Failed to interrupt case",t)})}kill(){this.http.post(`${this.config.basePath}/api/cases/${this.caseId}/kill`,{}).subscribe({error:t=>console.error("[CaseChat] Failed to kill case",t)})}extractText(t){return t.content?.filter(e=>"content"in e).map(e=>e.content).join("")??""}extractToolOutput(t){if(!t.response)return null;let e=t.response.output;return e?e.content??null:null}toggleToolCall(t){this.collapsedTools.update(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})}isToolCallExpanded(t){return this.collapsedTools().has(t)}toggleShowTechnical(){this.showTechnical.update(t=>{let e=!t;return localStorage.setItem(o.SHOW_TECHNICAL_KEY,String(e)),e})}toggleTechnical(t){this.expandedTechnicals.update(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})}isTechnicalExpanded(t){return this.expandedTechnicals().has(t)}renderMarkdown(t){if(!t)return"";let e=Ve.parse(t,{renderer:this.markdownRenderer,breaks:!0,gfm:!0,async:!1}),n=Le.sanitize(e,{ADD_TAGS:["span"],ADD_ATTR:["aria-hidden","aria-label","target","rel"],ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))/i});return this.domSanitizer.bypassSecurityTrustHtml(n)}buildMarkdownRenderer(){let t=new qe,e=t.link.bind(t);return t.link=n=>{let a=e(n);return this.isExternalLink(n.href)&&(a=a.replace("<a ",'<a target="_blank" rel="noopener noreferrer" ').replace("</a>",'<span class="external-link-icon" aria-hidden="true">\u2197</span></a>')),a},t}isExternalLink(t){if(!t||t.startsWith("/")||t.startsWith("#")||t.startsWith("?"))return!1;if(t.startsWith("//"))return!0;try{return new URL(t,window.location.href).hostname!==window.location.hostname}catch(e){return!1}}toTechnicalItem(t){switch(t.type){case"WarnEvent":return{type:"WarnEvent",label:"\u26A0\uFE0F Warn",detail:t.message};case"ErrorEvent":return{type:"ErrorEvent",label:"\u274C Error",detail:t.message};case"CaseStatusEvent":return{type:"CaseStatusEvent",label:`\u{1F7E1} Status: ${t.status}`};case"AgentRunningEvent":return{type:"AgentRunningEvent",label:`\u25B6\uFE0F Agent running: ${t.agentName}`};case"AgentFinishedEvent":return{type:"AgentFinishedEvent",label:`\u2705 Agent finished: ${t.agentName}`};case"AgentSelectedEvent":return{type:"AgentSelectedEvent",label:`\u{1F3AF} Agent selected: ${t.agentName}`};case"IntentionGeneratedEvent":{let e=t;return{type:"IntentionGeneratedEvent",label:`\u{1F9E0} Intention \u2192 ${e.toolName}`,detail:e.intention}}default:return null}}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=E({type:o,selectors:[["agentos-case-chat"]],viewQuery:function(e,n){if(e&1&&B(Be,5)(je,5),e&2){let a;F(a=z())&&(n.composerInput=a.first),F(a=z())&&(n.messagesContainer=a.first)}},inputs:{showTechnicalOverride:[1,"showTechnicalOverride"]},decls:14,vars:7,consts:[["messagesContainer",""],["composerInput",""],[1,"case-chat"],[1,"case-chat__messages"],[1,"case-chat__empty"],[1,"case-chat__thinking"],[1,"case-chat__scroll-anchor"],[1,"case-chat__composer"],["placeholder","Reply\u2026","rows","3",1,"case-chat__input",3,"input","keydown","value","disabled"],[1,"case-chat__actions"],["icon","stop","variant","danger","title","Interrupt"],["icon","send","variant","primary",3,"title","disabled"],["icon","cancel","variant","danger","title","Kill",3,"action","disabled"],[1,"case-chat__message",3,"case-chat__message--user","case-chat__message--agent"],[1,"case-chat__message","case-chat__message--agent","case-chat__message--streaming"],[1,"case-chat__technical",3,"case-chat__technical--warn","case-chat__technical--error"],[1,"case-chat__tool-call",3,"case-chat__tool-call--pending","case-chat__tool-call--success","case-chat__tool-call--error"],[1,"case-chat__message"],[1,"case-chat__session-context"],[1,"case-chat__message-author"],[1,"case-chat__message-text","case-chat__message-text--markdown",3,"innerHTML"],[1,"case-chat__session-context-label"],[1,"case-chat__session-context-body"],[1,"case-chat__message-text"],[1,"case-chat__technical"],[1,"case-chat__technical-label"],["type","button",1,"case-chat__technical-header",3,"click"],[1,"case-chat__technical-chevron"],[1,"case-chat__technical-body"],[1,"case-chat__tool-call"],["type","button",1,"case-chat__tool-call-header",3,"click"],[1,"case-chat__tool-call-icon"],[1,"case-chat__tool-call-name"],[1,"case-chat__tool-call-chevron"],[1,"case-chat__tool-call-output"],[1,"case-chat__tool-call-section","case-chat__enrichment-section"],[1,"case-chat__tool-call-section"],[1,"case-chat__tool-call-label"],[1,"case-chat__tool-call-pending"],[1,"case-chat__tool-call-empty"],[1,"case-chat__enrichment-phase",3,"case-chat__enrichment-phase--failed"],[1,"case-chat__enrichment-phase"],[1,"case-chat__enrichment-phase-header"],[1,"case-chat__enrichment-phase-index"],[1,"case-chat__enrichment-phase-status"],[1,"case-chat__enrichment-phase-row"],[1,"case-chat__enrichment-phase-label"],[1,"thinking-dot"],["icon","keyboard_arrow_down","variant","default","title","Scroll to bottom",3,"action"],["icon","stop","variant","danger","title","Interrupt",3,"action"],["icon","send","variant","primary",3,"action","title","disabled"]],template:function(e,n){e&1&&(r(0,"div",2)(1,"div",3,0),u(3,Ge,3,0,"div",4)(4,ht,2,0),u(5,gt,4,0,"div",5),s(),u(6,Ct,2,0,"div",6),r(7,"div",7)(8,"textarea",8,1),g("input",function(i){return n.onInput(i)})("keydown",function(i){return n.onKeydown(i)}),s(),r(10,"div",9),u(11,bt,1,0,"ds-icon-button",10)(12,ft,1,2,"ds-icon-button",11),r(13,"ds-icon-button",12),g("action",function(){return n.kill()}),s()()()()),e&2&&(l(3),h(n.timeline().length===0?3:4),l(2),h(n.isRunning()?5:-1),l(),h(n.isAtBottom()?-1:6),l(2),T("value",n.inputValue())("disabled",n.isRunning()||n.isTerminal()),l(3),h(n.isRunning()?11:12),l(2),T("disabled",n.isTerminal()))},dependencies:[de,De],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}.case-chat[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;max-width:800px;width:100%;margin:0 auto;padding:1.5rem;gap:1rem;position:relative}.case-chat__messages[_ngcontent-%COMP%]{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:.75rem;padding-bottom:.5rem;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:var(--color-border, rgba(0, 0, 0, .15)) transparent}.case-chat__empty[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex:1}.case-chat__empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.case-chat__tool-calls[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.4rem;margin-top:.25rem}.case-chat__tool-call[_ngcontent-%COMP%]{flex-shrink:0;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--glass-bg, rgba(255, 255, 255, .72));font-size:.8rem;overflow:hidden;transition:border-color .2s ease}.case-chat__tool-call--pending[_ngcontent-%COMP%]{border-color:var(--color-warning, #f5a623);opacity:.8}.case-chat__tool-call--success[_ngcontent-%COMP%]{border-color:var(--color-success, #34c759)}.case-chat__tool-call--error[_ngcontent-%COMP%]{border-color:var(--color-error, #ff3b30)}.case-chat__tool-call-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.4rem;width:100%;padding:.4rem .6rem;background:transparent;border:none;cursor:pointer;text-align:left;color:var(--color-text, #1d1d1f);font-family:inherit;font-size:.8rem}.case-chat__tool-call-header[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04))}.case-chat__tool-call-icon[_ngcontent-%COMP%]{flex-shrink:0;font-size:.75rem}.case-chat__tool-call-name[_ngcontent-%COMP%]{font-weight:600;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);color:var(--color-primary, #0071e3);flex-shrink:0}.case-chat__tool-call-args[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.case-chat__tool-call-chevron[_ngcontent-%COMP%]{flex-shrink:0;font-size:.6rem;color:var(--color-text-secondary, #6e6e73);margin-left:auto}.case-chat__tool-call-output[_ngcontent-%COMP%]{border-top:1px solid var(--color-border, rgba(0, 0, 0, .08));display:flex;flex-direction:column}.case-chat__tool-call-section[_ngcontent-%COMP%]{padding:.4rem .6rem .5rem}.case-chat__tool-call-section[_ngcontent-%COMP%] + .case-chat__tool-call-section[_ngcontent-%COMP%]{border-top:1px solid var(--color-border, rgba(0, 0, 0, .06))}.case-chat__tool-call-section[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:.25rem 0 0;white-space:pre-wrap;word-break:break-all;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.75rem;color:var(--color-text, #1d1d1f);max-height:200px;overflow-y:auto}.case-chat__tool-call-label[_ngcontent-%COMP%]{display:block;font-size:.65rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--color-text-secondary, #6e6e73)}.case-chat__enrichment-section[_ngcontent-%COMP%]{background:var(--color-surface-secondary, rgba(0, 0, 0, .02))}.case-chat__enrichment-phase[_ngcontent-%COMP%]{margin-top:.35rem;border-radius:4px;border:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--glass-bg, rgba(255, 255, 255, .6));overflow:hidden}.case-chat__enrichment-phase--failed[_ngcontent-%COMP%]{border-color:var(--color-error, #ff3b30);background:#ff3b300a}.case-chat__enrichment-phase-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:.2rem .5rem;background:var(--color-surface-secondary, rgba(0, 0, 0, .03));border-bottom:1px solid var(--color-border, rgba(0, 0, 0, .06))}.case-chat__enrichment-phase-index[_ngcontent-%COMP%]{font-weight:600;font-size:.7rem;text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-secondary, #6e6e73)}.case-chat__enrichment-phase-status[_ngcontent-%COMP%]{font-size:.7rem}.case-chat__enrichment-phase-row[_ngcontent-%COMP%]{padding:.25rem .5rem}.case-chat__enrichment-phase-row[_ngcontent-%COMP%] + .case-chat__enrichment-phase-row[_ngcontent-%COMP%]{border-top:1px solid var(--color-border, rgba(0, 0, 0, .04))}.case-chat__enrichment-phase-row[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:.15rem 0 0;white-space:pre-wrap;word-break:break-all;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.7rem;color:var(--color-text, #1d1d1f);max-height:150px;overflow-y:auto}.case-chat__enrichment-phase-label[_ngcontent-%COMP%]{display:block;font-size:.6rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-secondary, #6e6e73)}.case-chat__tool-call-pending[_ngcontent-%COMP%], .case-chat__tool-call-empty[_ngcontent-%COMP%]{display:block;margin-top:.25rem;color:var(--color-text-secondary, #6e6e73);font-style:italic;font-size:.75rem}.case-chat__technical[_ngcontent-%COMP%]{flex-shrink:0;border-radius:6px;background:var(--color-surface-secondary, rgba(0, 0, 0, .03));border-left:3px solid var(--color-border, rgba(0, 0, 0, .12));font-size:.78rem;color:var(--color-text-secondary, #6e6e73);overflow:hidden}.case-chat__technical--warn[_ngcontent-%COMP%]{border-left-color:var(--color-warning, #f5a623);background:#f5a6230f;color:var(--color-text, #1d1d1f)}.case-chat__technical--error[_ngcontent-%COMP%]{border-left-color:var(--color-error, #ff3b30);background:#ff3b300f;color:var(--color-text, #1d1d1f)}.case-chat__technical-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:100%;padding:.2rem .75rem;background:transparent;border:none;cursor:pointer;text-align:left;color:inherit;font-family:inherit;font-size:inherit}.case-chat__technical-header[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04))}.case-chat__technical-label[_ngcontent-%COMP%]{font-weight:500;white-space:nowrap}.case-chat__technical-label[_ngcontent-%COMP%]:only-child{display:block;padding:.2rem .75rem}.case-chat__technical-chevron[_ngcontent-%COMP%]{flex-shrink:0;font-size:.6rem;color:var(--color-text-secondary, #6e6e73);margin-left:auto}.case-chat__technical-body[_ngcontent-%COMP%]{padding:.3rem .75rem .5rem;border-top:1px solid var(--color-border, rgba(0, 0, 0, .08));white-space:pre-wrap;word-break:break-word;font-size:.75rem;line-height:1.5;color:var(--color-text, #1d1d1f)}.case-chat__session-context[_ngcontent-%COMP%]{flex-shrink:0;border-radius:6px;background:var(--color-surface-secondary, rgba(0, 0, 0, .03));border-left:3px solid var(--color-primary, #0071e3);padding:.25rem .75rem .4rem;margin-bottom:.25rem;font-size:.75rem;color:var(--color-text-secondary, #6e6e73);overflow:hidden}.case-chat__session-context-label[_ngcontent-%COMP%]{display:block;font-size:.65rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--color-primary, #0071e3);margin-bottom:.2rem}.case-chat__session-context-body[_ngcontent-%COMP%]{margin:0;white-space:pre-wrap;word-break:break-all;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.75rem;color:var(--color-text, #1d1d1f);max-height:160px;overflow-y:auto}.case-chat__message[_ngcontent-%COMP%]{flex-shrink:0}.case-chat__thinking[_ngcontent-%COMP%]{flex-shrink:0;display:flex;gap:.3rem;padding:.75rem 1rem;align-self:flex-start}.case-chat__message-text--markdown[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 .5em}.case-chat__message-text--markdown[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:last-child{margin-bottom:0}.case-chat__message-text--markdown[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] ol[_ngcontent-%COMP%]{margin:.25em 0 .5em;padding-left:1.4em}.case-chat__message-text--markdown[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-bottom:.2em}.case-chat__message-text--markdown[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.85em;background:var(--color-code-bg, rgba(0, 0, 0, .06));border-radius:3px;padding:.1em .35em}.case-chat__message-text--markdown[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(0, 0, 0, .06));border-radius:6px;padding:.6em .8em;overflow-x:auto;margin:.4em 0}.case-chat__message-text--markdown[_ngcontent-%COMP%] pre[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:none;padding:0;font-size:.8rem}.case-chat__message-text--markdown[_ngcontent-%COMP%] blockquote[_ngcontent-%COMP%]{margin:.4em 0;padding-left:.8em;border-left:3px solid var(--color-border, rgba(0, 0, 0, .15));color:var(--color-text-secondary, #6e6e73)}.case-chat__message-text--markdown[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--color-primary, #0071e3);text-decoration:underline}.case-chat__message-text--markdown[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:.5em 0 .25em;font-size:1em;font-weight:600}.case-chat__message-text--markdown[_ngcontent-%COMP%] .external-link-icon[_ngcontent-%COMP%]{font-size:.75em;margin-left:.15em;vertical-align:super}.case-chat__message--streaming[_ngcontent-%COMP%]{opacity:.95}.case-chat__scroll-anchor[_ngcontent-%COMP%]{position:absolute;bottom:calc(2rem + 80px);left:50%;transform:translate(-50%);z-index:10;background:var(--glass-bg, rgba(255, 255, 255, .88));border:1px solid var(--glass-border, rgba(255, 255, 255, .3));backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-radius:50%;box-shadow:0 2px 12px var(--color-shadow, rgba(0, 0, 0, .12));animation:_ngcontent-%COMP%_scroll-anchor-in .15s ease}.case-chat__composer[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:flex-end;gap:.5rem;background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:16px;padding:.5rem .5rem .5rem 1rem}.case-chat__input[_ngcontent-%COMP%]{flex:1;resize:none;padding:.5rem 0;border:none;background:transparent;color:var(--color-text, #1d1d1f);font-size:.95rem;font-family:inherit;line-height:1.5;outline:none;min-height:40px}.case-chat__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.case-chat__input[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.case-chat__actions[_ngcontent-%COMP%]{display:flex;align-items:center;flex-shrink:0}.thinking-dot[_ngcontent-%COMP%]{width:8px;height:8px;border-radius:50%;background:var(--color-text-secondary, #6e6e73);animation:_ngcontent-%COMP%_thinking-bounce 1.2s ease-in-out infinite}.thinking-dot[_ngcontent-%COMP%]:nth-child(2){animation-delay:.2s}.thinking-dot[_ngcontent-%COMP%]:nth-child(3){animation-delay:.4s}@keyframes _ngcontent-%COMP%_thinking-bounce{0%,80%,to{transform:translateY(0);opacity:.4}40%{transform:translateY(-6px);opacity:1}}@keyframes _ngcontent-%COMP%_scroll-anchor-in{0%{opacity:0;transform:translate(-50%) translateY(8px)}to{opacity:1;transform:translate(-50%) translateY(0)}}']})};var xt=["composerInput"],_e=class o{http=y(ie);router=y(re);route=y(j);config=y(se);caseState=y(Q);destroyRef=y(ee);preferences=y(me);composerInput;namespaceId=this.route.snapshot.queryParams.ns;inputValue=w("");isCreating=w(!1);constructor(){te(()=>{this.composerInput?.nativeElement.focus()})}get canSend(){return!!this.inputValue().trim()&&!this.isCreating()}onInput(t){this.inputValue.set(t.target.value)}onKeydown(t){this.preferences.shouldSend(t)&&(t.preventDefault(),this.submit())}submit(){if(!this.canSend)return;let t=this.inputValue().trim();this.inputValue.set(""),this.isCreating.set(!0),this.http.post(`${this.config.basePath}/api/cases`,{namespaceId:this.namespaceId,metadata:{}}).pipe(Y(e=>(this.caseState.addCase(e),this.http.post(`${this.config.basePath}/api/cases/${e.id}/messages`,{content:t,userId:"default-user"}).pipe(K(()=>e)))),ce(this.destroyRef)).subscribe({next:e=>{this.router.navigate(["/agentos/home"],{queryParams:{ns:this.namespaceId,case:e.id??""}})},error:e=>{console.error("[CaseHome] Failed to create case or send first message",e),this.isCreating.set(!1),this.inputValue.set(t)}})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=E({type:o,selectors:[["agentos-case-home"]],viewQuery:function(e,n){if(e&1&&B(xt,5),e&2){let a;F(a=z())&&(n.composerInput=a.first)}},decls:11,vars:4,consts:[["composerInput",""],[1,"case-home"],[1,"case-home__hero"],[1,"case-home__headline"],[1,"case-home__composer"],["placeholder","Describe your task or ask a question\u2026","rows","4",1,"case-home__input",3,"input","keydown","value","disabled"],[1,"case-home__composer-footer"],[1,"case-home__hint"],["icon","send","variant","primary","title","Start case",3,"action","disabled"]],template:function(e,n){e&1&&(r(0,"div",1)(1,"div",2)(2,"h1",3),d(3,"What can I help you with?"),s(),r(4,"div",4)(5,"textarea",5,0),g("input",function(i){return n.onInput(i)})("keydown",function(i){return n.onKeydown(i)}),s(),r(7,"div",6)(8,"span",7),d(9),s(),r(10,"ds-icon-button",8),g("action",function(){return n.submit()}),s()()()()()),e&2&&(l(5),T("value",n.inputValue())("disabled",n.isCreating()),l(4),b(n.preferences.composerHint()),l(),T("disabled",!n.canSend))},dependencies:[de],styles:[".case-home[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;align-items:center;justify-content:center}.case-home__hero[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:2rem;padding:2rem 1.5rem 4rem;max-width:680px;width:100%}.case-home__headline[_ngcontent-%COMP%]{margin:0;font-size:clamp(1.5rem,4vw,2.25rem);font-weight:700;letter-spacing:-.03em;color:var(--color-text, #1d1d1f);text-align:center}.case-home__composer[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:16px;box-shadow:0 4px 24px var(--color-shadow, rgba(0, 0, 0, .07));overflow:hidden;transition:box-shadow .2s ease,border-color .2s ease}.case-home__composer[_ngcontent-%COMP%]:focus-within{box-shadow:0 4px 32px #007aff26;border-color:var(--color-primary, #007aff)}.case-home__input[_ngcontent-%COMP%]{width:100%;resize:none;padding:1rem 1.25rem .5rem;border:none;background:transparent;color:var(--color-text, #1d1d1f);font-size:1rem;font-family:inherit;line-height:1.6;outline:none;box-sizing:border-box}.case-home__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.case-home__input[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.case-home__composer-footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:.5rem .5rem .5rem 1.25rem}.case-home__hint[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);opacity:.7}"]})};var yt=["caseItemTpl"],wt=o=>({node:o,depth:0}),Tt=(o,t)=>({node:o,depth:t}),Mt=(o,t)=>t.id;function St(o,t){o&1&&fe(0)}function kt(o,t){if(o&1&&ne(0,St,1,0,"ng-container",3),o&2){let e=t.$implicit;c();let n=oe(4);T("ngTemplateOutlet",n)("ngTemplateOutletContext",Ee(2,wt,e))}}function Et(o,t){if(o&1){let e=M();r(0,"button",9),g("click",function(a){f(e);let i=c().node,x=c();return v(x.toggleExpand(a,i.id))}),r(1,"span",10),d(2,"\u203A"),s()()}if(o&2){let e=c().node,n=c();T("title",n.isExpanded(e.id)?"Collapse":"Expand"),l(),I("case-tree-node__toggle-icon--open",n.isExpanded(e.id))}}function Ot(o,t){o&1&&fe(0)}function Pt(o,t){if(o&1&&ne(0,Ot,1,0,"ng-container",3),o&2){let e=t.$implicit,n=c(2).depth;c();let a=oe(4);T("ngTemplateOutlet",a)("ngTemplateOutletContext",Oe(2,Tt,e,n+1))}}function It(o,t){if(o&1&&R(0,Pt,1,5,"ng-container",null,Mt),o&2){let e=c().node;A(e.children)}}function Nt(o,t){if(o&1){let e=M();r(0,"div",4)(1,"button",5),g("click",function(){let a=f(e).node,i=c();return v(i.onItemSelected(a.id))}),r(2,"span",6),u(3,Et,3,3,"button",7),s(),r(4,"span",8),d(5),s()(),u(6,It,2,0),s()}if(o&2){let e=t.node,n=t.depth,a=c();ae("--depth",n),l(),I("case-tree-node__row--active",e.id===a.activeCaseId()),l(2),h(e.children.length?3:-1),l(2),b(e.name),l(),h(a.isExpanded(e.id)&&e.children.length?6:-1)}}var ue=class o{cases=p([]);activeCaseId=p(null);caseSelected=C();createRequested=C();caseItemTpl;rootItems=S(()=>Dt(this.cases()));autoExpandedIds=S(()=>{let t=this.activeCaseId();if(!t)return new Set;let e=new Set;return He(this.rootItems(),t,e),e});expandedIds=w(new Set);isExpanded(t){return this.expandedIds().has(t)||this.autoExpandedIds().has(t)}toggleExpand(t,e){t.stopPropagation(),this.expandedIds.update(n=>{let a=new Set(n);return a.has(e)?a.delete(e):a.add(e),a})}onItemSelected(t){this.caseSelected.emit(t)}onCreateRequested(){this.createRequested.emit()}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=E({type:o,selectors:[["agentos-case-drawer"]],viewQuery:function(e,n){if(e&1&&B(yt,7),e&2){let a;F(a=z())&&(n.caseItemTpl=a.first)}},inputs:{cases:[1,"cases"],activeCaseId:[1,"activeCaseId"]},outputs:{caseSelected:"caseSelected",createRequested:"createRequested"},decls:5,vars:3,consts:[["caseItemTpl",""],["caseRowTpl",""],["title","Cases","emptyMessage","No cases yet. Start one below.","searchPlaceholder","Filter cases\u2026","cardMinWidth","220px","contentMaxWidth","100%",3,"itemSelected","createRequested","items","itemTemplate","showCreate"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"case-tree-node"],["type","button",1,"case-tree-node__row",3,"click"],[1,"case-tree-node__expand-slot"],["type","button",1,"case-tree-node__toggle",3,"title"],[1,"case-tree-node__name"],["type","button",1,"case-tree-node__toggle",3,"click","title"],[1,"case-tree-node__toggle-icon"]],template:function(e,n){if(e&1&&(r(0,"ds-entity-list",2),g("itemSelected",function(i){return n.onItemSelected(i)})("createRequested",function(){return n.onCreateRequested()}),s(),ne(1,kt,1,4,"ng-template",null,0,xe)(3,Nt,7,7,"ng-template",null,1,xe)),e&2){let a=oe(2);T("items",n.rootItems())("itemTemplate",a)("showCreate",!0)}},dependencies:[Fe,Ne],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}.case-tree-node[_ngcontent-%COMP%]{width:100%}.case-tree-node__row[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;padding:.375rem .5rem;padding-left:calc(.5rem + var(--depth, 0) * 1.25rem);border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;font-size:.875rem;color:var(--color-text, #1d1d1f);border-radius:6px;gap:.375rem;transition:background .12s ease;box-sizing:border-box}.case-tree-node__row[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .05))}.case-tree-node__row--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);color:var(--color-text-inverse, #fff)}.case-tree-node__row--active[_ngcontent-%COMP%]:hover{background:var(--color-primary-hover, #0051d5)}.case-tree-node__expand-slot[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:1rem;flex-shrink:0}.case-tree-node__toggle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:1rem;height:1rem;padding:0;border:none;background:transparent;cursor:pointer;color:inherit;border-radius:3px;transition:background .1s ease}.case-tree-node__toggle[_ngcontent-%COMP%]:hover{background:#00000014}.case-tree-node__toggle-icon[_ngcontent-%COMP%]{display:inline-block;font-size:1.1rem;line-height:1;transition:transform .15s ease;transform:rotate(0)}.case-tree-node__toggle-icon--open[_ngcontent-%COMP%]{transform:rotate(90deg)}.case-tree-node__name[_ngcontent-%COMP%]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.8rem}'],changeDetection:0})};function Dt(o){let t=new Set(o.map(m=>m.id??"")),e=new Map(o.map(m=>[m.id??"",m.created??""])),n=m=>({id:m.id??"",name:m.title??m.id??"\u2014",children:[]}),a=new Map;for(let m of o)a.set(m.id??"",n(m));let i=[];for(let m of o){let _=a.get(m.id??""),N=m.parentCaseId;N&&t.has(N)?a.get(N).children.push(_):i.push(_)}let x=m=>m.sort((_,N)=>(e.get(N.id)??"")>(e.get(_.id)??"")?1:-1).map(_=>Z(J({},_),{children:x(_.children)}));return x(i)}function He(o,t,e){for(let n of o){if(n.id===t)return!0;if(n.children.length&&He(n.children,t,e))return e.add(n.id),!0}return!1}function Rt(o,t){if(o&1){let e=M();k(0,"button",2),q("click",function(){f(e);let a=c(2);return v(a.onNavigate("/agentos/admin"))}),d(1,"\u2699\uFE0F Admin"),O()}}function At(o,t){o&1&&d(0," \u2600\uFE0F Light mode ")}function qt(o,t){o&1&&d(0," \u{1F319} Dark mode ")}function Vt(o,t){if(o&1){let e=M();k(0,"div",0),q("click",function(a){f(e);let i=c();return v(i.onClose(a))})("keyup.escape",function(a){f(e);let i=c();return v(i.onClose(a))}),O(),k(1,"div",1)(2,"button",2),q("click",function(){f(e);let a=c();return v(a.onNavigate("/agentos/user"))}),d(3,"\u{1F464} User"),O(),u(4,Rt,2,0,"button",3),W(5,"div",4),k(6,"button",2),q("click",function(){f(e);let a=c();return v(a.onNavigate("/agentos/namespaces"))}),d(7," \u{1F310} Namespaces "),O(),W(8,"div",4),k(9,"button",2),q("click",function(){f(e);let a=c();return v(a.onThemeToggle())}),u(10,At,1,0)(11,qt,1,0),O(),k(12,"button",2),q("click",function(){f(e);let a=c();return v(a.onLogsToggle())}),d(13," </> Technical logs "),O()()}if(o&2){let e=c();l(),I("shell-user-menu__overlay--mobile",e.variant()==="mobile"),l(3),h(e.isAdmin()?4:-1),l(6),h(e.isDark()?10:11),l(2),I("shell-user-menu__item--active",e.showTechnical())}}var G=class o{open=p.required();isAdmin=p.required();isDark=p.required();showTechnical=p.required();variant=p("desktop");navigateTo=C();themeToggled=C();logsToggled=C();closed=C();onNavigate(t){this.navigateTo.emit(t)}onThemeToggle(){this.themeToggled.emit()}onLogsToggle(){this.logsToggled.emit()}onClose(t){t.stopPropagation(),this.closed.emit(t)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=E({type:o,selectors:[["agentos-shell-user-menu"]],inputs:{open:[1,"open"],isAdmin:[1,"isAdmin"],isDark:[1,"isDark"],showTechnical:[1,"showTechnical"],variant:[1,"variant"]},outputs:{navigateTo:"navigateTo",themeToggled:"themeToggled",logsToggled:"logsToggled",closed:"closed"},decls:1,vars:1,consts:[["role","presentation","tabindex","-1",1,"shell-user-menu__backdrop",3,"click","keyup.escape"],[1,"shell-user-menu__overlay"],["type","button",1,"shell-user-menu__item",3,"click"],["type","button",1,"shell-user-menu__item"],[1,"shell-user-menu__separator"]],template:function(e,n){e&1&&u(0,Vt,14,6),e&2&&h(n.open()?0:-1)},styles:[".shell-user-menu__backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:199}.shell-user-menu__overlay[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 6px);right:0;min-width:180px;background:var(--color-bg, #f4f3ef);border:1px solid var(--color-border, rgba(0, 0, 0, .09));border-radius:14px;padding:6px;z-index:200;box-shadow:0 6px 20px #00000017,0 1px 4px #0000000d}.shell-user-menu__overlay--mobile[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 4px);right:16px;left:auto;z-index:300}.shell-user-menu__item[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;gap:8px;padding:9px 10px;border-radius:10px;border:none;background:transparent;cursor:pointer;color:var(--color-text, #1b1916);font:inherit;font-size:.8rem;text-align:left;transition:all .13s}.shell-user-menu__item[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .05))}.shell-user-menu__item--active[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-primary, #016b71) 12%,transparent);color:var(--color-primary, #016b71)}.shell-user-menu__separator[_ngcontent-%COMP%]{height:1px;background:var(--color-border, rgba(0, 0, 0, .09));margin:4px 6px}"],changeDetection:0})};var Lt=(o,t)=>t.id;function Ft(o,t){if(o&1&&d(0),o&2){let e=c();$(" ",e.userInitials()," ")}}function zt(o,t){o&1&&d(0," \u2022\u2022\u2022 ")}function $t(o,t){o&1&&(r(0,"span"),d(1,"\u2713"),s())}function Ht(o,t){if(o&1){let e=M();r(0,"button",19),g("click",function(){let a=f(e).$implicit,i=c(3);return v(i.namespaceSelected.emit(a))}),D(1,"span",14),r(2,"span",20),d(3),s(),u(4,$t,2,0,"span"),s()}if(o&2){let e,n,a=t.$implicit,i=c(3);I("shell-sidebar__ns-item--active",a.id===((e=i.selectedNamespace())==null?null:e.id)),l(3),b(a.name),l(),h(a.id===((n=i.selectedNamespace())==null?null:n.id)?4:-1)}}function Ut(o,t){if(o&1&&(r(0,"div",17),R(1,Ht,5,4,"button",18,Lt),s()),o&2){let e=c(2);l(),A(e.namespaces())}}function Wt(o,t){if(o&1){let e=M();r(0,"div",9)(1,"button",13),g("click",function(){f(e);let a=c();return v(a.nsMenuToggled.emit())}),D(2,"span",14),r(3,"span",15),d(4),s(),r(5,"span",16),d(6,"\u25BE"),s()(),u(7,Ut,3,0,"div",17),s()}if(o&2){let e,n=c();l(4),b(((e=n.selectedNamespace())==null?null:e.name)??"Select namespace"),l(3),h(n.nsMenuOpen()?7:-1)}}function Bt(o,t){if(o&1&&(r(0,"span",10),d(1),s()),o&2){let e,n=c();l(),b((e=n.selectedNamespace())==null?null:e.name)}}var he=class o{sidebarWidth=p.required();selectedNamespace=p.required();namespaces=p.required();showNsPicker=p.required();nsMenuOpen=p.required();cases=p.required();activeCaseId=p.required();userInitials=p.required();menuOpen=p.required();isAdmin=p.required();isDark=p.required();showTechnical=p.required();homeClicked=C();namespaceSelected=C();nsMenuToggled=C();nsMenuClosed=C();caseSelected=C();createRequested=C();menuToggled=C();menuClosed=C();navigateTo=C();themeToggled=C();logsToggled=C();static \u0275fac=function(e){return new(e||o)};static \u0275cmp=E({type:o,selectors:[["agentos-shell-sidebar"]],inputs:{sidebarWidth:[1,"sidebarWidth"],selectedNamespace:[1,"selectedNamespace"],namespaces:[1,"namespaces"],showNsPicker:[1,"showNsPicker"],nsMenuOpen:[1,"nsMenuOpen"],cases:[1,"cases"],activeCaseId:[1,"activeCaseId"],userInitials:[1,"userInitials"],menuOpen:[1,"menuOpen"],isAdmin:[1,"isAdmin"],isDark:[1,"isDark"],showTechnical:[1,"showTechnical"]},outputs:{homeClicked:"homeClicked",namespaceSelected:"namespaceSelected",nsMenuToggled:"nsMenuToggled",nsMenuClosed:"nsMenuClosed",caseSelected:"caseSelected",createRequested:"createRequested",menuToggled:"menuToggled",menuClosed:"menuClosed",navigateTo:"navigateTo",themeToggled:"themeToggled",logsToggled:"logsToggled"},decls:16,vars:10,consts:[[1,"shell-sidebar"],[1,"shell-sidebar__top"],["type","button","title","Home",1,"shell-sidebar__brand",3,"click"],["src","CODAY-Logo.png","alt","Coday",1,"shell-sidebar__logo-img"],[1,"shell-sidebar__user-menu"],["type","button","title","Menu",1,"shell-sidebar__user-btn",3,"click"],["variant","desktop",3,"navigateTo","themeToggled","logsToggled","closed","open","isAdmin","isDark","showTechnical"],[1,"shell-sidebar__ns-wrap"],[1,"shell-sidebar__ns-label"],[1,"shell-sidebar__ns-picker"],[1,"shell-sidebar__ns-name-static"],[1,"shell-sidebar__cases-scroll"],[3,"caseSelected","createRequested","cases","activeCaseId"],[1,"shell-sidebar__ns-trigger",3,"click"],[1,"shell-sidebar__ns-dot"],[1,"shell-sidebar__ns-name"],[1,"shell-sidebar__ns-chevron"],[1,"shell-sidebar__ns-menu"],[1,"shell-sidebar__ns-item",3,"shell-sidebar__ns-item--active"],[1,"shell-sidebar__ns-item",3,"click"],[1,"shell-sidebar__ns-item-name"]],template:function(e,n){e&1&&(r(0,"div",0)(1,"div",1)(2,"button",2),g("click",function(){return n.homeClicked.emit()}),D(3,"img",3),s(),r(4,"div",4)(5,"button",5),g("click",function(i){return n.menuToggled.emit(i)}),u(6,Ft,1,1)(7,zt,1,0),s(),r(8,"agentos-shell-user-menu",6),g("navigateTo",function(i){return n.navigateTo.emit(i)})("themeToggled",function(){return n.themeToggled.emit()})("logsToggled",function(){return n.logsToggled.emit()})("closed",function(i){return n.menuClosed.emit(i)}),s()()(),r(9,"div",7)(10,"div",8),d(11,"Namespace"),s(),u(12,Wt,8,2,"div",9)(13,Bt,2,1,"span",10),s(),r(14,"div",11)(15,"agentos-case-drawer",12),g("caseSelected",function(i){return n.caseSelected.emit(i)})("createRequested",function(){return n.createRequested.emit()}),s()()()),e&2&&(ae("width",n.sidebarWidth(),"px"),l(6),h(n.userInitials()?6:7),l(2),T("open",n.menuOpen())("isAdmin",n.isAdmin())("isDark",n.isDark())("showTechnical",n.showTechnical()),l(4),h(n.showNsPicker()?12:13),l(3),T("cases",n.cases())("activeCaseId",n.activeCaseId()))},dependencies:[ue,G],styles:["[_nghost-%COMP%]{display:contents}@media(max-width:900px){[_nghost-%COMP%]{display:none!important}}.shell-sidebar[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden;border-right:1px solid var(--color-border, rgba(0, 0, 0, .09));background:var(--color-bg, #f4f3ef);flex-shrink:0}.shell-sidebar__top[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:14px 12px 6px;flex-shrink:0}.shell-sidebar__brand[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:4px 6px;border-radius:8px;border:none;background:transparent;cursor:pointer;transition:background .14s}.shell-sidebar__brand[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .05))}.shell-sidebar__logo-img[_ngcontent-%COMP%]{width:24px;height:24px;border-radius:6px;object-fit:contain}.shell-sidebar__user-menu[_ngcontent-%COMP%]{position:relative;flex-shrink:0}.shell-sidebar__user-btn[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:50%;border:1px solid var(--color-border, rgba(0, 0, 0, .09));background:color-mix(in srgb,var(--color-primary, #016b71) 15%,transparent);cursor:pointer;display:grid;place-items:center;font-size:.7rem;font-weight:700;letter-spacing:.02em;color:var(--color-primary, #016b71);transition:all .14s}.shell-sidebar__user-btn[_ngcontent-%COMP%]:hover{background:color-mix(in srgb,var(--color-primary, #016b71) 25%,transparent)}.shell-sidebar__ns-wrap[_ngcontent-%COMP%]{padding:12px 12px 6px;position:relative}.shell-sidebar__ns-label[_ngcontent-%COMP%]{padding:0 2px 7px;font-size:.7rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--color-text-tertiary, #5a5449)}.shell-sidebar__ns-picker[_ngcontent-%COMP%]{position:relative}.shell-sidebar__ns-trigger[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:12px;border:1px solid var(--color-border, rgba(0, 0, 0, .09));background:var(--color-bg-secondary, #faf9f7);cursor:pointer;color:var(--color-text, #1b1916);transition:all .15s;font:inherit;font-size:.82rem;font-weight:700}.shell-sidebar__ns-trigger[_ngcontent-%COMP%]:hover{border-color:var(--color-border-light, rgba(0, 0, 0, .15))}.shell-sidebar__ns-dot[_ngcontent-%COMP%]{width:10px;height:10px;border-radius:50%;background:var(--color-primary, #5aadb5);flex-shrink:0}.shell-sidebar__ns-name[_ngcontent-%COMP%]{flex:1;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.shell-sidebar__ns-chevron[_ngcontent-%COMP%]{color:var(--color-text-secondary, #968f85);font-size:.75rem}.shell-sidebar__ns-menu[_ngcontent-%COMP%]{position:absolute;left:0;right:0;top:calc(100% + 4px);background:var(--color-bg, #f4f3ef);border:1px solid var(--color-border, rgba(0, 0, 0, .09));border-radius:14px;padding:6px;z-index:100;box-shadow:0 6px 20px #00000017,0 1px 4px #0000000d}.shell-sidebar__ns-item[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;gap:10px;padding:10px;border-radius:10px;border:none;background:transparent;cursor:pointer;color:var(--color-text, #1b1916);font:inherit;font-size:.8rem;transition:all .13s}.shell-sidebar__ns-item[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .05))}.shell-sidebar__ns-item--active[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-primary, #016b71) 12%,transparent);color:var(--color-primary, #016b71)}.shell-sidebar__ns-item-name[_ngcontent-%COMP%]{flex:1;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.shell-sidebar__ns-name-static[_ngcontent-%COMP%]{display:block;padding:10px 12px;font-size:.82rem;font-weight:700;color:var(--color-text, #1b1916);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.shell-sidebar__cases-scroll[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding-bottom:16px}.shell-sidebar__cases-scroll[_ngcontent-%COMP%]::-webkit-scrollbar{width:4px}.shell-sidebar__cases-scroll[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--color-border-light, rgba(255, 255, 255, .12));border-radius:999px}"],changeDetection:0})};var jt=(o,t)=>t.id;function Qt(o,t){o&1&&(r(0,"span"),d(1,"\u2713"),s())}function Gt(o,t){if(o&1){let e=M();r(0,"button",13),g("click",function(){let a=f(e).$implicit,i=c(2);return v(i.namespaceSelected.emit(a))}),D(1,"span",14),r(2,"span",15),d(3),s(),u(4,Qt,2,0,"span"),s()}if(o&2){let e,n,a=t.$implicit,i=c(2);I("shell-topbar-mobile__ns-item--active",a.id===((e=i.selectedNamespace())==null?null:e.id)),l(3),b(a.name),l(),h(a.id===((n=i.selectedNamespace())==null?null:n.id)?4:-1)}}function Kt(o,t){if(o&1){let e=M();r(0,"div",10),g("click",function(a){f(e);let i=c();return v(i.nsMenuClosed.emit(a))})("keyup.escape",function(a){f(e);let i=c();return v(i.nsMenuClosed.emit(a))}),s(),r(1,"div",11),R(2,Gt,5,4,"button",12,jt),s()}if(o&2){let e=c();l(2),A(e.namespaces())}}var ge=class o{selectedNamespace=p.required();namespaces=p.required();nsMenuOpen=p.required();userInitials=p.required();menuOpen=p.required();isAdmin=p.required();isDark=p.required();showTechnical=p.required();homeClicked=C();namespaceSelected=C();nsMenuToggled=C();nsMenuClosed=C();menuToggled=C();menuClosed=C();navigateTo=C();themeToggled=C();logsToggled=C();static \u0275fac=function(e){return new(e||o)};static \u0275cmp=E({type:o,selectors:[["agentos-shell-topbar-mobile"]],inputs:{selectedNamespace:[1,"selectedNamespace"],namespaces:[1,"namespaces"],nsMenuOpen:[1,"nsMenuOpen"],userInitials:[1,"userInitials"],menuOpen:[1,"menuOpen"],isAdmin:[1,"isAdmin"],isDark:[1,"isDark"],showTechnical:[1,"showTechnical"]},outputs:{homeClicked:"homeClicked",namespaceSelected:"namespaceSelected",nsMenuToggled:"nsMenuToggled",nsMenuClosed:"nsMenuClosed",menuToggled:"menuToggled",menuClosed:"menuClosed",navigateTo:"navigateTo",themeToggled:"themeToggled",logsToggled:"logsToggled"},decls:15,vars:7,consts:[[1,"shell-topbar-mobile__brand"],["type","button","title","Home",1,"shell-topbar-mobile__logo-btn",3,"click"],["src","CODAY-Logo.png","alt","Coday",1,"shell-topbar-mobile__logo-img"],[1,"shell-topbar-mobile__sep"],[1,"shell-topbar-mobile__ns-wrap"],["type","button",1,"shell-topbar-mobile__ns-btn",3,"click"],[1,"shell-topbar-mobile__chevron"],[1,"shell-topbar-mobile__avatar-wrap"],["tabindex","0","role","button","aria-label","User menu",1,"shell-topbar-mobile__avatar",3,"click","keyup.enter"],["variant","mobile",3,"navigateTo","themeToggled","logsToggled","closed","open","isAdmin","isDark","showTechnical"],["role","presentation","tabindex","-1",1,"shell-topbar-mobile__ns-backdrop",3,"click","keyup.escape"],[1,"shell-topbar-mobile__ns-menu"],[1,"shell-topbar-mobile__ns-item",3,"shell-topbar-mobile__ns-item--active"],[1,"shell-topbar-mobile__ns-item",3,"click"],[1,"shell-topbar-mobile__ns-dot"],[1,"shell-topbar-mobile__ns-item-name"]],template:function(e,n){if(e&1&&(r(0,"div",0)(1,"button",1),g("click",function(){return n.homeClicked.emit()}),D(2,"img",2),s(),r(3,"span",3),d(4,"/"),s(),r(5,"div",4)(6,"button",5),g("click",function(i){return n.nsMenuToggled.emit(i)}),d(7),r(8,"span",6),d(9,"\u25BE"),s()(),u(10,Kt,4,0),s()(),r(11,"div",7)(12,"div",8),g("click",function(i){return n.menuToggled.emit(i)})("keyup.enter",function(){return n.menuToggled.emit(void 0)}),d(13),s(),r(14,"agentos-shell-user-menu",9),g("navigateTo",function(i){return n.navigateTo.emit(i)})("themeToggled",function(){return n.themeToggled.emit()})("logsToggled",function(){return n.logsToggled.emit()})("closed",function(i){return n.menuClosed.emit(i)}),s()()),e&2){let a;l(7),$(" ",((a=n.selectedNamespace())==null?null:a.name)??""," "),l(3),h(n.nsMenuOpen()?10:-1),l(3),$(" ",n.userInitials()||"\xB7\xB7\xB7"," "),l(),T("open",n.menuOpen())("isAdmin",n.isAdmin())("isDark",n.isDark())("showTechnical",n.showTechnical())}},dependencies:[G],styles:["[_nghost-%COMP%]{display:none}.shell-topbar-mobile__brand[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;min-width:0;flex:1;overflow:hidden}.shell-topbar-mobile__logo-btn[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;flex:none;padding:0;border:none;background:transparent;cursor:pointer}.shell-topbar-mobile__logo-img[_ngcontent-%COMP%]{width:20px;height:20px;border-radius:6px;object-fit:contain}.shell-topbar-mobile__sep[_ngcontent-%COMP%]{color:#00000040;font:400 12px Inter,sans-serif;flex:none}.shell-topbar-mobile__ns-wrap[_ngcontent-%COMP%]{position:static;min-width:0}.shell-topbar-mobile__ns-btn[_ngcontent-%COMP%]{font:600 12.5px Inter,sans-serif;color:var(--color-text, #161616);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;gap:3px;cursor:pointer;background:none;border:none;padding:0}.shell-topbar-mobile__chevron[_ngcontent-%COMP%]{color:#00000059;font-size:9px;flex:none}.shell-topbar-mobile__ns-backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:299}.shell-topbar-mobile__ns-menu[_ngcontent-%COMP%]{position:fixed;top:44px;left:16px;min-width:180px;background:var(--color-bg, #f4f3ef);border:1px solid var(--color-border, rgba(0, 0, 0, .09));border-radius:14px;padding:6px;z-index:300;box-shadow:0 6px 20px #00000017,0 1px 4px #0000000d}.shell-topbar-mobile__ns-item[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;gap:10px;padding:10px;border-radius:10px;border:none;background:transparent;cursor:pointer;color:var(--color-text, #1b1916);font:inherit;font-size:.8rem;transition:all .13s}.shell-topbar-mobile__ns-item[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .05))}.shell-topbar-mobile__ns-item--active[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-primary, #016b71) 12%,transparent);color:var(--color-primary, #016b71)}.shell-topbar-mobile__ns-dot[_ngcontent-%COMP%]{width:10px;height:10px;background:var(--color-primary, #5aadb5);flex-shrink:0;border-radius:50%}.shell-topbar-mobile__ns-item-name[_ngcontent-%COMP%]{flex:1;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.shell-topbar-mobile__avatar-wrap[_ngcontent-%COMP%]{position:relative;flex-shrink:0}.shell-topbar-mobile__avatar[_ngcontent-%COMP%]{width:44px;height:44px;border-radius:50%;background:#dfedff;background:oklch(94% .03 255deg);border:1px solid oklch(82% .06 255deg);color:#2a5fc9;display:flex;align-items:center;justify-content:center;font:600 10px Inter,sans-serif;cursor:pointer;-webkit-user-select:none;user-select:none}@media(max-width:900px){[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 16px;min-height:44px;border-bottom:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--color-bg, #fff);flex-shrink:0;position:relative}}"],changeDetection:0})};var Yt=(o,t)=>t.id;function Xt(o,t){if(o&1){let e=M();k(0,"div",9),q("click",function(){let a=f(e).$implicit,i=c(2);return v(i.caseSelected.emit(a.id??""))})("keyup.enter",function(){let a=f(e).$implicit,i=c(2);return v(i.caseSelected.emit(a.id??""))}),W(1,"span",1),k(2,"span",2),d(3),O(),k(4,"span",3),d(5),O()()}if(o&2){let e=t.$implicit,n=c(2);l(),ve("shell-case-switcher__dot--"+n.deriveMobileStatus(e.status)),l(2),b(e.title??e.id),l(2),b(e.status.toLowerCase())}}function Jt(o,t){if(o&1){let e=M();k(0,"div",5)(1,"div",6),q("click",function(){f(e);let a=c();return v(a.createRequested.emit())})("keyup.enter",function(){f(e);let a=c();return v(a.createRequested.emit())}),k(2,"span",7),d(3,"+"),O(),k(4,"span",2),d(5,"New case"),O()(),R(6,Xt,6,4,"div",8,Yt),O()}if(o&2){let e=c();l(6),A(e.otherCases())}}var Ce=class o{cases=p.required();activeCaseId=p.required();open=p.required();activeCase=S(()=>{let t=this.activeCaseId();return t?this.cases().find(e=>e.id===t)??null:null});activeCaseTitle=S(()=>this.activeCase()?.title??this.activeCaseId()??"New case");activeCaseStatus=S(()=>this.deriveMobileStatus(this.activeCase()?.status));activeCaseStatusLabel=S(()=>this.activeCase()?.status?.toLowerCase()??"");otherCases=S(()=>this.cases().filter(t=>t.id!==this.activeCaseId()));caseSelected=C();createRequested=C();toggled=C();deriveMobileStatus(t){switch(t){case"RUNNING":return"run";case"KILLED":return"killed";case"ERROR":return"error";default:return"idle"}}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=E({type:o,selectors:[["agentos-shell-case-switcher-mobile"]],inputs:{cases:[1,"cases"],activeCaseId:[1,"activeCaseId"],open:[1,"open"]},outputs:{caseSelected:"caseSelected",createRequested:"createRequested",toggled:"toggled"},decls:9,vars:5,consts:[["tabindex","0","role","button",1,"shell-case-switcher__trigger",3,"click","keyup.enter"],[1,"shell-case-switcher__dot"],[1,"shell-case-switcher__title"],[1,"shell-case-switcher__status"],[1,"shell-case-switcher__chevron"],[1,"shell-case-switcher__list"],["tabindex","0","role","button",1,"shell-case-switcher__item","shell-case-switcher__item--new",3,"click","keyup.enter"],[1,"shell-case-switcher__new-icon"],["tabindex","0","role","button",1,"shell-case-switcher__item"],["tabindex","0","role","button",1,"shell-case-switcher__item",3,"click","keyup.enter"]],template:function(e,n){e&1&&(k(0,"div",0),q("click",function(){return n.toggled.emit()})("keyup.enter",function(){return n.toggled.emit()}),W(1,"span",1),k(2,"span",2),d(3),O(),k(4,"span",3),d(5),O(),k(6,"span",4),d(7,"\u2304"),O()(),u(8,Jt,8,0,"div",5)),e&2&&(l(),ve("shell-case-switcher__dot--"+n.activeCaseStatus()),l(2),b(n.activeCaseTitle()),l(2),b(n.activeCaseStatusLabel()),l(3),h(n.open()?8:-1))},styles:["[_nghost-%COMP%]{display:none}.shell-case-switcher__trigger[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px;padding:10px 16px;min-height:44px;cursor:pointer;-webkit-user-select:none;user-select:none}.shell-case-switcher__trigger[_ngcontent-%COMP%]:hover{background:#00000005}.shell-case-switcher__title[_ngcontent-%COMP%]{font:600 12.5px Inter,sans-serif;color:var(--color-text, #161616);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.shell-case-switcher__status[_ngcontent-%COMP%]{font:400 11px Inter,sans-serif;color:#0006;flex:none}.shell-case-switcher__chevron[_ngcontent-%COMP%]{color:#00000059;font-size:9px;flex:none}.shell-case-switcher__list[_ngcontent-%COMP%]{display:flex;flex-direction:column;border-top:1px solid rgba(0,0,0,.06);max-height:60vh;overflow-y:auto}.shell-case-switcher__item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px;padding:0 16px;height:44px;flex-shrink:0;cursor:pointer}.shell-case-switcher__item[_ngcontent-%COMP%] .shell-case-switcher__title[_ngcontent-%COMP%]{font-weight:500;color:#000000b3}.shell-case-switcher__item[_ngcontent-%COMP%]:hover{background:#00000008}.shell-case-switcher__item--new[_ngcontent-%COMP%]{border-bottom:1px solid var(--color-border, rgba(0, 0, 0, .08))}.shell-case-switcher__item--new[_ngcontent-%COMP%] .shell-case-switcher__title[_ngcontent-%COMP%]{font-weight:600;color:var(--color-primary, #016b71)}.shell-case-switcher__new-icon[_ngcontent-%COMP%]{width:6px;height:6px;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:300;color:var(--color-primary, #016b71);flex:none}.shell-case-switcher__dot[_ngcontent-%COMP%]{width:6px;height:6px;border-radius:50%;flex:none}.shell-case-switcher__dot--run[_ngcontent-%COMP%]{background:#2a9d4a}.shell-case-switcher__dot--idle[_ngcontent-%COMP%]{background:#0003}.shell-case-switcher__dot--killed[_ngcontent-%COMP%], .shell-case-switcher__dot--error[_ngcontent-%COMP%]{background:#dc2614}@media(max-width:900px){[_nghost-%COMP%]{display:flex;flex-direction:column;border-bottom:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--color-bg, #fff);flex-shrink:0}}"],changeDetection:0})};function Zt(o,t){if(o&1&&D(0,"agentos-case-chat",6),o&2){let e=c();T("showTechnicalOverride",e.showTechnical())}}function en(o,t){o&1&&D(0,"agentos-case-home")}var Ue=class o{router=y(re);route=y(j);caseController=y(le);namespaceController=y(Ae);themePort=y(ze);userState=y($e);isAdmin=S(()=>this.userState.currentUser()?.isAdmin===!0);userInitials=S(()=>{let t=this.userState.currentUser();if(!t)return"";let e=t.firstname?.[0]??"",n=t.lastname?.[0]??"";return(e+n).toUpperCase()||t.email?.[0]?.toUpperCase()||""});isDark=S(()=>{let t=this.themePort.theme();return t==="dark"?!0:t==="light"?!1:typeof document<"u"&&document.documentElement.hasAttribute("data-theme")});sidebarWidth=w(300);menuOpen=w(!1);nsMenuOpen=w(!1);mobileSwitcherOpen=w(!1);showTechnical=w(!1);showNsPicker=S(()=>this.isAdmin()||this.namespaces().length>1);namespaceId$=this.route.queryParams.pipe(K(t=>t.ns??null));_namespaceIdRaw=X(this.namespaceId$);namespaceId=S(()=>this._namespaceIdRaw()??null);_activeCaseIdRaw=X(this.route.queryParams.pipe(K(t=>t.case??null)));activeCaseId=S(()=>this._activeCaseIdRaw()??null);refresh$=new we(void 0);cases$=this.namespaceId$.pipe(Y(t=>t?this.refresh$.pipe(Y(()=>this.caseController.listByParentCase(t))):[[]]));cases=X(this.cases$,{initialValue:[]});namespaces=X(this.namespaceController.listAllNamespace(),{initialValue:[]});selectedNamespace=w(null);constructor(){U(()=>{let t=this.namespaces(),e=this.namespaceId();if(t.length)if(e){let n=t.find(a=>a.id===e);this.selectedNamespace.set(n??t[0]??null)}else{let n=t[0];n?.id&&this.router.navigate(["/agentos/home"],{queryParams:{ns:n.id},replaceUrl:!0})}})}onNamespaceSelected(t){this.selectedNamespace.set(t),this.nsMenuOpen.set(!1),this.router.navigate(["/agentos/home"],{queryParams:{ns:t.id}})}toggleNsMenu(t){t?.stopPropagation(),t?.preventDefault(),this.nsMenuOpen.update(e=>!e)}closeNsMenu(t){t.stopPropagation(),this.nsMenuOpen.set(!1)}onCaseSelected(t){this.router.navigate(["/agentos/home"],{queryParams:{ns:this.namespaceId(),case:t}})}onCreateRequested(){this.router.navigate(["/agentos/home"],{queryParams:{ns:this.namespaceId()}})}navigateHome(){this.router.navigate(["/agentos/home"])}onMenuNavigate(t){this.menuOpen.set(!1),this.router.navigate([t])}toggleMenu(t){t?.stopPropagation(),t?.preventDefault(),this.menuOpen.update(e=>!e)}closeMenu(t){t.stopPropagation(),this.menuOpen.set(!1)}onMenuToggleTheme(){this.menuOpen.set(!1);let t=this.isDark()?"light":"dark";this.themePort.setTheme(t)}onMenuToggleLogs(){this.menuOpen.set(!1),this.showTechnical.update(t=>!t)}toggleMobileSwitcher(){this.mobileSwitcherOpen.update(t=>!t)}onMobileCaseSelect(t){this.mobileSwitcherOpen.set(!1),this.onCaseSelected(t)}onMobileCreateCase(){this.mobileSwitcherOpen.set(!1),this.onCreateRequested()}onResizeStart(t){t.preventDefault();let e=t.clientX,n=this.sidebarWidth(),a=x=>{let m=x.clientX-e,_=Math.max(200,Math.min(500,n+m));this.sidebarWidth.set(_)},i=()=>{document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",i)};document.addEventListener("mousemove",a),document.addEventListener("mouseup",i)}refreshCases(){this.refresh$.next()}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=E({type:o,selectors:[["agentos-case-shell"]],decls:8,vars:24,consts:[[1,"case-shell"],[3,"homeClicked","namespaceSelected","nsMenuToggled","nsMenuClosed","menuToggled","menuClosed","navigateTo","themeToggled","logsToggled","selectedNamespace","namespaces","nsMenuOpen","userInitials","menuOpen","isAdmin","isDark","showTechnical"],[3,"caseSelected","createRequested","toggled","cases","activeCaseId","open"],[3,"homeClicked","namespaceSelected","nsMenuToggled","nsMenuClosed","caseSelected","createRequested","menuToggled","menuClosed","navigateTo","themeToggled","logsToggled","sidebarWidth","selectedNamespace","namespaces","showNsPicker","nsMenuOpen","cases","activeCaseId","userInitials","menuOpen","isAdmin","isDark","showTechnical"],["role","separator","tabindex","-1","aria-label","Resize sidebar",1,"case-shell__resize-handle",3,"mousedown"],[1,"case-shell__main"],[3,"showTechnicalOverride"]],template:function(e,n){e&1&&(r(0,"div",0)(1,"agentos-shell-topbar-mobile",1),g("homeClicked",function(){return n.navigateHome()})("namespaceSelected",function(i){return n.onNamespaceSelected(i)})("nsMenuToggled",function(i){return n.toggleNsMenu(i)})("nsMenuClosed",function(i){return n.closeNsMenu(i)})("menuToggled",function(i){return n.toggleMenu(i)})("menuClosed",function(i){return n.closeMenu(i)})("navigateTo",function(i){return n.onMenuNavigate(i)})("themeToggled",function(){return n.onMenuToggleTheme()})("logsToggled",function(){return n.onMenuToggleLogs()}),s(),r(2,"agentos-shell-case-switcher-mobile",2),g("caseSelected",function(i){return n.onMobileCaseSelect(i)})("createRequested",function(){return n.onMobileCreateCase()})("toggled",function(){return n.toggleMobileSwitcher()}),s(),r(3,"agentos-shell-sidebar",3),g("homeClicked",function(){return n.navigateHome()})("namespaceSelected",function(i){return n.onNamespaceSelected(i)})("nsMenuToggled",function(){return n.toggleNsMenu()})("nsMenuClosed",function(i){return n.closeNsMenu(i)})("caseSelected",function(i){return n.onCaseSelected(i)})("createRequested",function(){return n.onCreateRequested()})("menuToggled",function(i){return n.toggleMenu(i)})("menuClosed",function(i){return n.closeMenu(i)})("navigateTo",function(i){return n.onMenuNavigate(i)})("themeToggled",function(){return n.onMenuToggleTheme()})("logsToggled",function(){return n.onMenuToggleLogs()}),s(),r(4,"div",4),g("mousedown",function(i){return n.onResizeStart(i)}),s(),r(5,"main",5),u(6,Zt,1,1,"agentos-case-chat",6)(7,en,1,0,"agentos-case-home"),s()()),e&2&&(l(),T("selectedNamespace",n.selectedNamespace())("namespaces",n.namespaces())("nsMenuOpen",n.nsMenuOpen())("userInitials",n.userInitials())("menuOpen",n.menuOpen())("isAdmin",n.isAdmin())("isDark",n.isDark())("showTechnical",n.showTechnical()),l(),T("cases",n.cases())("activeCaseId",n.activeCaseId())("open",n.mobileSwitcherOpen()),l(),T("sidebarWidth",n.sidebarWidth())("selectedNamespace",n.selectedNamespace())("namespaces",n.namespaces())("showNsPicker",n.showNsPicker())("nsMenuOpen",n.nsMenuOpen())("cases",n.cases())("activeCaseId",n.activeCaseId())("userInitials",n.userInitials())("menuOpen",n.menuOpen())("isAdmin",n.isAdmin())("isDark",n.isDark())("showTechnical",n.showTechnical()),l(3),h(n.activeCaseId()?6:7))},dependencies:[pe,_e,he,ge,Ce],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100dvh}.case-shell[_ngcontent-%COMP%]{display:flex;height:100%;overflow:hidden}.case-shell__resize-handle[_ngcontent-%COMP%]{width:4px;flex-shrink:0;cursor:col-resize;background:var(--color-border, rgba(0, 0, 0, .09));transition:background .15s;position:relative;z-index:10}.case-shell__resize-handle[_ngcontent-%COMP%]:hover, .case-shell__resize-handle[_ngcontent-%COMP%]:active{background:var(--color-primary, #016b71)}.case-shell__main[_ngcontent-%COMP%]{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}.case-shell__main[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1;min-height:0}@media(max-width:900px){.case-shell[_ngcontent-%COMP%]{flex-direction:column;overflow:hidden}.case-shell__resize-handle[_ngcontent-%COMP%]{display:none!important}.case-shell__main[_ngcontent-%COMP%]{flex:1;min-height:0;overflow:hidden}}"],changeDetection:0})};export{pe as a,_e as b,ue as c,Ue as d};
|
package/browser/index.html
CHANGED
|
@@ -21,5 +21,5 @@
|
|
|
21
21
|
<style>:root{--color-bg:linear-gradient(135deg, #fafbfc 0%, #f5f6f8 100%);--color-bg-solid:#fafbfc;--color-bg-secondary:rgba(255, 255, 255, .7);--color-bg-secondary-rgb:255 255 255;--color-text:#1d1d1f;--color-text-secondary:#6e6e73;--color-text-inverse:#ffffff;--color-primary:#007aff;--color-primary-hover:#0051d5;--color-accent:#8b5cf6;--color-link:#007aff;--color-border:rgba(0, 0, 0, .1);--color-border-light:rgba(40, 40, 40, .08);--color-input-bg:rgba(255, 255, 255, .8);--color-success:#34c759;--color-error:#ff3b30;--color-warning:#ff9500;--color-info:#5ac8fa;--color-message-user:rgba(0, 122, 255, .1);--color-message-ai:rgba(255, 255, 255, .8);--color-code-bg:rgba(142, 142, 147, .12);--color-code-text:#ff375f;--color-bg-hover:rgba(0, 0, 0, .04);--glass-bg:rgba(255, 255, 255, .72);--glass-border:rgba(255, 255, 255, .18);--glass-shadow:0 8px 32px 0 rgba(31, 38, 135, .15);--glass-backdrop-blur:blur(20px);--color-modal-bg:#ffffff;--color-modal-border:rgba(0, 0, 0, .12);--color-modal-shadow:0 8px 40px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .1);--color-shadow:rgba(0, 0, 0, .08);--color-overlay:rgba(0, 0, 0, .4);--color-text-tertiary:#a1a1a6;--color-surface-hover:var(--color-bg-hover);--color-surface-secondary:rgba(0, 0, 0, .03);--color-surface-muted:rgba(0, 0, 0, .05);--color-success-bg:#e3f5e1}@media print{html,body,app-root{height:auto!important;max-height:none!important;min-height:auto!important;overflow:visible!important;position:static!important}body{background:#fff!important;color:#000!important;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif!important;font-size:11pt;line-height:1.6;padding:1rem!important}*{animation:none!important;transition:none!important;box-shadow:none!important;text-shadow:none!important}}*{box-sizing:border-box}html{color-scheme:light}html{--mat-sys-background:light-dark(#faf9fd, #121316);--mat-sys-error:light-dark(#ba1a1a, #ffb4ab);--mat-sys-error-container:light-dark(#ffdad6, #93000a);--mat-sys-inverse-on-surface:light-dark(#f2f0f4, #2f3033);--mat-sys-inverse-primary:light-dark(#abc7ff, #005cbb);--mat-sys-inverse-surface:light-dark(#2f3033, #e3e2e6);--mat-sys-on-background:light-dark(#1a1b1f, #e3e2e6);--mat-sys-on-error:light-dark(#ffffff, #690005);--mat-sys-on-error-container:light-dark(#93000a, #ffdad6);--mat-sys-on-primary:light-dark(#ffffff, #002f65);--mat-sys-on-primary-container:light-dark(#00458f, #d7e3ff);--mat-sys-on-primary-fixed:light-dark(#001b3f, #001b3f);--mat-sys-on-primary-fixed-variant:light-dark(#00458f, #00458f);--mat-sys-on-secondary:light-dark(#ffffff, #283041);--mat-sys-on-secondary-container:light-dark(#3e4759, #dae2f9);--mat-sys-on-secondary-fixed:light-dark(#131c2b, #131c2b);--mat-sys-on-secondary-fixed-variant:light-dark(#3e4759, #3e4759);--mat-sys-on-surface:light-dark(#1a1b1f, #e3e2e6);--mat-sys-on-surface-variant:light-dark(#44474e, #e0e2ec);--mat-sys-on-tertiary:light-dark(#ffffff, #002f65);--mat-sys-on-tertiary-container:light-dark(#00458f, #d7e3ff);--mat-sys-on-tertiary-fixed:light-dark(#001b3f, #001b3f);--mat-sys-on-tertiary-fixed-variant:light-dark(#00458f, #00458f);--mat-sys-outline:light-dark(#74777f, #8e9099);--mat-sys-outline-variant:light-dark(#c4c6d0, #44474e);--mat-sys-primary:light-dark(#005cbb, #abc7ff);--mat-sys-primary-container:light-dark(#d7e3ff, #00458f);--mat-sys-primary-fixed:light-dark(#d7e3ff, #d7e3ff);--mat-sys-primary-fixed-dim:light-dark(#abc7ff, #abc7ff);--mat-sys-scrim:light-dark(#000000, #000000);--mat-sys-secondary:light-dark(#565e71, #bec6dc);--mat-sys-secondary-container:light-dark(#dae2f9, #3e4759);--mat-sys-secondary-fixed:light-dark(#dae2f9, #dae2f9);--mat-sys-secondary-fixed-dim:light-dark(#bec6dc, #bec6dc);--mat-sys-shadow:light-dark(#000000, #000000);--mat-sys-surface:light-dark(#faf9fd, #121316);--mat-sys-surface-bright:light-dark(#faf9fd, #38393c);--mat-sys-surface-container:light-dark(#efedf0, #1f2022);--mat-sys-surface-container-high:light-dark(#e9e7eb, #292a2c);--mat-sys-surface-container-highest:light-dark(#e3e2e6, #343537);--mat-sys-surface-container-low:light-dark(#f4f3f6, #1a1b1f);--mat-sys-surface-container-lowest:light-dark(#ffffff, #0d0e11);--mat-sys-surface-dim:light-dark(#dbd9dd, #121316);--mat-sys-surface-tint:light-dark(#005cbb, #abc7ff);--mat-sys-surface-variant:light-dark(#e0e2ec, #44474e);--mat-sys-tertiary:light-dark(#005cbb, #abc7ff);--mat-sys-tertiary-container:light-dark(#d7e3ff, #00458f);--mat-sys-tertiary-fixed:light-dark(#d7e3ff, #d7e3ff);--mat-sys-tertiary-fixed-dim:light-dark(#abc7ff, #abc7ff);--mat-sys-neutral-variant20:#2d3038;--mat-sys-neutral10:#1a1b1f;--mat-sys-level0:0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mat-sys-level1:0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mat-sys-level2:0px 3px 3px -2px rgba(0, 0, 0, .2), 0px 3px 4px 0px rgba(0, 0, 0, .14), 0px 1px 8px 0px rgba(0, 0, 0, .12);--mat-sys-level3:0px 3px 5px -1px rgba(0, 0, 0, .2), 0px 6px 10px 0px rgba(0, 0, 0, .14), 0px 1px 18px 0px rgba(0, 0, 0, .12);--mat-sys-level4:0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mat-sys-level5:0px 7px 8px -4px rgba(0, 0, 0, .2), 0px 12px 17px 2px rgba(0, 0, 0, .14), 0px 5px 22px 4px rgba(0, 0, 0, .12);--mat-sys-body-large:400 1rem / 1.5rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-large-line-height:1.5rem;--mat-sys-body-large-size:1rem;--mat-sys-body-large-tracking:.031rem;--mat-sys-body-large-weight:400;--mat-sys-body-medium:400 .875rem / 1.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-medium-line-height:1.25rem;--mat-sys-body-medium-size:.875rem;--mat-sys-body-medium-tracking:.016rem;--mat-sys-body-medium-weight:400;--mat-sys-body-small:400 .75rem / 1rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-small-line-height:1rem;--mat-sys-body-small-size:.75rem;--mat-sys-body-small-tracking:.025rem;--mat-sys-body-small-weight:400;--mat-sys-display-large:400 3.562rem / 4rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-large-line-height:4rem;--mat-sys-display-large-size:3.562rem;--mat-sys-display-large-tracking:-.016rem;--mat-sys-display-large-weight:400;--mat-sys-display-medium:400 2.812rem / 3.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-medium-line-height:3.25rem;--mat-sys-display-medium-size:2.812rem;--mat-sys-display-medium-tracking:0;--mat-sys-display-medium-weight:400;--mat-sys-display-small:400 2.25rem / 2.75rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-small-line-height:2.75rem;--mat-sys-display-small-size:2.25rem;--mat-sys-display-small-tracking:0;--mat-sys-display-small-weight:400;--mat-sys-headline-large:400 2rem / 2.5rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-large-line-height:2.5rem;--mat-sys-headline-large-size:2rem;--mat-sys-headline-large-tracking:0;--mat-sys-headline-large-weight:400;--mat-sys-headline-medium:400 1.75rem / 2.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-medium-line-height:2.25rem;--mat-sys-headline-medium-size:1.75rem;--mat-sys-headline-medium-tracking:0;--mat-sys-headline-medium-weight:400;--mat-sys-headline-small:400 1.5rem / 2rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-small-line-height:2rem;--mat-sys-headline-small-size:1.5rem;--mat-sys-headline-small-tracking:0;--mat-sys-headline-small-weight:400;--mat-sys-label-large:500 .875rem / 1.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-large-line-height:1.25rem;--mat-sys-label-large-size:.875rem;--mat-sys-label-large-tracking:.006rem;--mat-sys-label-large-weight:500;--mat-sys-label-large-weight-prominent:700;--mat-sys-label-medium:500 .75rem / 1rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-medium-line-height:1rem;--mat-sys-label-medium-size:.75rem;--mat-sys-label-medium-tracking:.031rem;--mat-sys-label-medium-weight:500;--mat-sys-label-medium-weight-prominent:700;--mat-sys-label-small:500 .688rem / 1rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-small-line-height:1rem;--mat-sys-label-small-size:.688rem;--mat-sys-label-small-tracking:.031rem;--mat-sys-label-small-weight:500;--mat-sys-title-large:400 1.375rem / 1.75rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-large-line-height:1.75rem;--mat-sys-title-large-size:1.375rem;--mat-sys-title-large-tracking:0;--mat-sys-title-large-weight:400;--mat-sys-title-medium:500 1rem / 1.5rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-medium-line-height:1.5rem;--mat-sys-title-medium-size:1rem;--mat-sys-title-medium-tracking:.009rem;--mat-sys-title-medium-weight:500;--mat-sys-title-small:500 .875rem / 1.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-small-line-height:1.25rem;--mat-sys-title-small-size:.875rem;--mat-sys-title-small-tracking:.006rem;--mat-sys-title-small-weight:500;--mat-sys-corner-extra-large:28px;--mat-sys-corner-extra-large-top:28px 28px 0 0;--mat-sys-corner-extra-small:4px;--mat-sys-corner-extra-small-top:4px 4px 0 0;--mat-sys-corner-full:9999px;--mat-sys-corner-large:16px;--mat-sys-corner-large-end:0 16px 16px 0;--mat-sys-corner-large-start:16px 0 0 16px;--mat-sys-corner-large-top:16px 16px 0 0;--mat-sys-corner-medium:12px;--mat-sys-corner-none:0;--mat-sys-corner-small:8px;--mat-sys-dragged-state-layer-opacity:.16;--mat-sys-focus-state-layer-opacity:.12;--mat-sys-hover-state-layer-opacity:.08;--mat-sys-pressed-state-layer-opacity:.12;--mat-snack-bar-container-shape:transparent;--mat-snack-bar-container-color:transparent;--mat-snack-bar-supporting-text-color:var(--color-text)}html,body{margin:0;padding:0;width:100%;height:100%}body{background:var(--color-bg);color:var(--color-text);font-family:-apple-system,BlinkMacSystemFont,SF Pro Display,Segoe UI,Helvetica Neue,Arial,sans-serif;transition:background .3s ease,color .3s ease;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;padding:0!important}</style><link rel="stylesheet" href="styles-OTP4QCB4.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-OTP4QCB4.css"></noscript></head>
|
|
22
22
|
<body>
|
|
23
23
|
<app-root></app-root>
|
|
24
|
-
<link rel="modulepreload" href="chunk-J3CZ3MOZ.js"><link rel="modulepreload" href="chunk-QVW2GZXC.js"><link rel="modulepreload" href="chunk-RFEQZZ65.js"><link rel="modulepreload" href="chunk-ATOA52OV.js"><link rel="modulepreload" href="chunk-JLGR5C43.js"><link rel="modulepreload" href="chunk-H7A4LOFH.js"><link rel="modulepreload" href="chunk-SR3JKZ3U.js"><link rel="modulepreload" href="chunk-7BYLIOKV.js"><link rel="modulepreload" href="chunk-RBAVAHXW.js"><link rel="modulepreload" href="chunk-RI2JQRSB.js"><script src="polyfills-2FSRUXKO.js" type="module"></script><script src="main-
|
|
24
|
+
<link rel="modulepreload" href="chunk-J3CZ3MOZ.js"><link rel="modulepreload" href="chunk-QVW2GZXC.js"><link rel="modulepreload" href="chunk-RFEQZZ65.js"><link rel="modulepreload" href="chunk-ATOA52OV.js"><link rel="modulepreload" href="chunk-JLGR5C43.js"><link rel="modulepreload" href="chunk-H7A4LOFH.js"><link rel="modulepreload" href="chunk-SR3JKZ3U.js"><link rel="modulepreload" href="chunk-7BYLIOKV.js"><link rel="modulepreload" href="chunk-RBAVAHXW.js"><link rel="modulepreload" href="chunk-RI2JQRSB.js"><script src="polyfills-2FSRUXKO.js" type="module"></script><script src="main-45HGAOBW.js" type="module"></script></body>
|
|
25
25
|
</html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as ii}from"./chunk-J3CZ3MOZ.js";import{a as S,b as K,e as Jt,f as Xe,h as X,i as ve,j as ce}from"./chunk-QVW2GZXC.js";import{a as oi}from"./chunk-RFEQZZ65.js";import{b as si,c as ri,e as Ae}from"./chunk-ATOA52OV.js";import"./chunk-JLGR5C43.js";import{b as Xt,e as xt,f as Zt}from"./chunk-H7A4LOFH.js";import{a as ti}from"./chunk-SR3JKZ3U.js";import{c as ei}from"./chunk-7BYLIOKV.js";import"./chunk-RBAVAHXW.js";import{c as ni}from"./chunk-RI2JQRSB.js";import{b as Te}from"./chunk-H2NKOG3U.js";import"./chunk-TZKO65ML.js";import{B as It,Ca as He,G as Ft,L as Lt,La as qt,Oa as Qt,Oc as Wt,Pc as Ht,Uc as Yt,V as zt,W as v,Wa as Vt,Z as Se,a as _e,ba as Ee,c as Dt,ca as z,d as se,fb as Ye,la as Kt,pa as jt,q as We,r as Rt,rc as $t,sa as Bt,sc as Gt,t as kt,u as Ot,ub as Ut}from"./chunk-RYEX2DR7.js";function ai(s){return new v(3e3,!1)}function un(){return new v(3100,!1)}function hn(){return new v(3101,!1)}function dn(s){return new v(3001,!1)}function mn(s){return new v(3003,!1)}function fn(s){return new v(3004,!1)}function ci(s,e){return new v(3005,!1)}function ui(){return new v(3006,!1)}function hi(){return new v(3007,!1)}function di(s,e){return new v(3008,!1)}function mi(s){return new v(3002,!1)}function fi(s,e,t,i,n){return new v(3010,!1)}function pi(){return new v(3011,!1)}function gi(){return new v(3012,!1)}function yi(){return new v(3200,!1)}function _i(){return new v(3202,!1)}function Si(){return new v(3013,!1)}function Ei(s){return new v(3014,!1)}function vi(s){return new v(3015,!1)}function Ti(s){return new v(3016,!1)}function Ai(s,e){return new v(3404,!1)}function pn(s){return new v(3502,!1)}function wi(s){return new v(3503,!1)}function bi(){return new v(3300,!1)}function Pi(s){return new v(3504,!1)}function Ni(s){return new v(3301,!1)}function Mi(s,e){return new v(3302,!1)}function Ci(s){return new v(3303,!1)}function Di(s,e){return new v(3400,!1)}function Ri(s){return new v(3401,!1)}function ki(s){return new v(3402,!1)}function Oi(s,e){return new v(3505,!1)}function U(s){switch(s.length){case 0:return new X;case 1:return s[0];default:return new ve(s)}}function et(s,e,t=new Map,i=new Map){let n=[],r=[],o=-1,a=null;if(e.forEach(l=>{let c=l.get("offset"),h=c==o,u=h&&a||new Map;l.forEach((_,y)=>{let m=y,g=_;if(y!=="offset")switch(m=s.normalizePropertyName(m,n),g){case ce:g=t.get(y);break;case K:g=i.get(y);break;default:g=s.normalizeStyleValue(y,m,g,n);break}u.set(m,g)}),h||r.push(u),a=u,o=c}),n.length)throw pn(n);return r}function we(s,e,t,i){switch(e){case"start":s.onStart(()=>i(t&&xe(t,"start",s)));break;case"done":s.onDone(()=>i(t&&xe(t,"done",s)));break;case"destroy":s.onDestroy(()=>i(t&&xe(t,"destroy",s)));break}}function xe(s,e,t){let i=t.totalTime,n=!!t.disabled,r=be(s.element,s.triggerName,s.fromState,s.toState,e||s.phaseName,i??s.totalTime,n),o=s._data;return o!=null&&(r._data=o),r}function be(s,e,t,i,n="",r=0,o){return{element:s,triggerName:e,fromState:t,toState:i,phaseName:n,totalTime:r,disabled:!!o}}function k(s,e,t){let i=s.get(e);return i||s.set(e,i=t),i}function tt(s){let e=s.indexOf(":"),t=s.substring(1,e),i=s.slice(e+1);return[t,i]}var gn=typeof document>"u"?null:document.documentElement;function Pe(s){let e=s.parentNode||s.host||null;return e===gn?null:e}function yn(s){return s.substring(1,6)=="ebkit"}var x=null,li=!1;function Ii(s){x||(x=_n()||{},li=x.style?"WebkitAppearance"in x.style:!1);let e=!0;return x.style&&!yn(s)&&(e=s in x.style,!e&&li&&(e="Webkit"+s.charAt(0).toUpperCase()+s.slice(1)in x.style)),e}function _n(){return typeof document<"u"?document.body:null}function it(s,e){for(;e;){if(e===s)return!0;e=Pe(e)}return!1}function nt(s,e,t){if(t)return Array.from(s.querySelectorAll(e));let i=s.querySelector(e);return i?[i]:[]}var Sn=1e3,st="{{",En="}}",rt="ng-enter",Ne="ng-leave",ue="ng-trigger",he=".ng-trigger",ot="ng-animating",Me=".ng-animating";function V(s){if(typeof s=="number")return s;let e=s.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:Ze(parseFloat(e[1]),e[2])}function Ze(s,e){return e==="s"?s*Sn:s}function de(s,e,t){return s.hasOwnProperty("duration")?s:Tn(s,e,t)}var vn=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function Tn(s,e,t){let i,n=0,r="";if(typeof s=="string"){let o=s.match(vn);if(o===null)return e.push(ai(s)),{duration:0,delay:0,easing:""};i=Ze(parseFloat(o[1]),o[2]);let a=o[3];a!=null&&(n=Ze(parseFloat(a),o[4]));let l=o[5];l&&(r=l)}else i=s;if(!t){let o=!1,a=e.length;i<0&&(e.push(un()),o=!0),n<0&&(e.push(hn()),o=!0),o&&e.splice(a,0,ai(s))}return{duration:i,delay:n,easing:r}}function Fi(s){return s.length?s[0]instanceof Map?s:s.map(e=>new Map(Object.entries(e))):[]}function j(s,e,t){e.forEach((i,n)=>{let r=Ce(n);t&&!t.has(n)&&t.set(n,s.style[r]),s.style[r]=i})}function G(s,e){e.forEach((t,i)=>{let n=Ce(i);s.style[n]=""})}function re(s){return Array.isArray(s)?s.length==1?s[0]:Jt(s):s}function Li(s,e,t){let i=e.params||{},n=at(s);n.length&&n.forEach(r=>{i.hasOwnProperty(r)||t.push(dn(r))})}var Je=new RegExp(`${st}\\s*(.+?)\\s*${En}`,"g");function at(s){let e=[];if(typeof s=="string"){let t;for(;t=Je.exec(s);)e.push(t[1]);Je.lastIndex=0}return e}function oe(s,e,t){let i=`${s}`,n=i.replace(Je,(r,o)=>{let a=e[o];return a==null&&(t.push(mn(o)),a=""),a.toString()});return n==i?s:n}var An=/-+([a-z0-9])/g;function Ce(s){return s.replace(An,(...e)=>e[1].toUpperCase())}function zi(s,e){return s===0||e===0}function Ki(s,e,t){if(t.size&&e.length){let i=e[0],n=[];if(t.forEach((r,o)=>{i.has(o)||n.push(o),i.set(o,r)}),n.length)for(let r=1;r<e.length;r++){let o=e[r];n.forEach(a=>o.set(a,De(s,a)))}}return e}function O(s,e,t){switch(e.type){case S.Trigger:return s.visitTrigger(e,t);case S.State:return s.visitState(e,t);case S.Transition:return s.visitTransition(e,t);case S.Sequence:return s.visitSequence(e,t);case S.Group:return s.visitGroup(e,t);case S.Animate:return s.visitAnimate(e,t);case S.Keyframes:return s.visitKeyframes(e,t);case S.Style:return s.visitStyle(e,t);case S.Reference:return s.visitReference(e,t);case S.AnimateChild:return s.visitAnimateChild(e,t);case S.AnimateRef:return s.visitAnimateRef(e,t);case S.Query:return s.visitQuery(e,t);case S.Stagger:return s.visitStagger(e,t);default:throw fn(e.type)}}function De(s,e){return window.getComputedStyle(s)[e]}var wt=(()=>{class s{validateStyleProperty(t){return Ii(t)}containsElement(t,i){return it(t,i)}getParentElement(t){return Pe(t)}query(t,i,n){return nt(t,i,n)}computeStyle(t,i,n){return n||""}animate(t,i,n,r,o,a=[],l){return new X(n,r)}static \u0275fac=function(i){return new(i||s)};static \u0275prov=Se({token:s,factory:s.\u0275fac})}return s})(),J=class{static NOOP=new wt},ee=class{};var wn=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),Fe=class extends ee{normalizePropertyName(e,t){return Ce(e)}normalizeStyleValue(e,t,i,n){let r="",o=i.toString().trim();if(wn.has(t)&&i!==0&&i!=="0")if(typeof i=="number")r="px";else{let a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&n.push(ci(e,i))}return o+r}};var Le="*";function bn(s,e){let t=[];return typeof s=="string"?s.split(/\s*,\s*/).forEach(i=>Pn(i,t,e)):t.push(s),t}function Pn(s,e,t){if(s[0]==":"){let l=Nn(s,t);if(typeof l=="function"){e.push(l);return}s=l}let i=s.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(i==null||i.length<4)return t.push(vi(s)),e;let n=i[1],r=i[2],o=i[3];e.push(ji(n,o));let a=n==Le&&o==Le;r[0]=="<"&&!a&&e.push(ji(o,n))}function Nn(s,e){switch(s){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,i)=>parseFloat(i)>parseFloat(t);case":decrement":return(t,i)=>parseFloat(i)<parseFloat(t);default:return e.push(Ti(s)),"* => *"}}var Re=new Set(["true","1"]),ke=new Set(["false","0"]);function ji(s,e){let t=Re.has(s)||ke.has(s),i=Re.has(e)||ke.has(e);return(n,r)=>{let o=s==Le||s==n,a=e==Le||e==r;return!o&&t&&typeof n=="boolean"&&(o=n?Re.has(s):ke.has(s)),!a&&i&&typeof r=="boolean"&&(a=r?Re.has(e):ke.has(e)),o&&a}}var Xi=":self",Mn=new RegExp(`s*${Xi}s*,?`,"g");function xi(s,e,t,i){return new mt(s).build(e,t,i)}var Bi="",mt=class{_driver;constructor(e){this._driver=e}build(e,t,i){let n=new ft(t);return this._resetContextStyleTimingState(n),O(this,re(e),n)}_resetContextStyleTimingState(e){e.currentQuerySelector=Bi,e.collectedStyles=new Map,e.collectedStyles.set(Bi,new Map),e.currentTime=0}visitTrigger(e,t){let i=t.queryCount=0,n=t.depCount=0,r=[],o=[];return e.name.charAt(0)=="@"&&t.errors.push(ui()),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(t),a.type==S.State){let l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(h=>{l.name=h,r.push(this.visitState(l,t))}),l.name=c}else if(a.type==S.Transition){let l=this.visitTransition(a,t);i+=l.queryCount,n+=l.depCount,o.push(l)}else t.errors.push(hi())}),{type:S.Trigger,name:e.name,states:r,transitions:o,queryCount:i,depCount:n,options:null}}visitState(e,t){let i=this.visitStyle(e.styles,t),n=e.options&&e.options.params||null;if(i.containsDynamicStyles){let r=new Set,o=n||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{at(l).forEach(c=>{o.hasOwnProperty(c)||r.add(c)})})}),r.size&&t.errors.push(di(e.name,[...r.values()]))}return{type:S.State,name:e.name,style:i,options:n?{params:n}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;let i=O(this,re(e.animation),t),n=bn(e.expr,t.errors);return{type:S.Transition,matchers:n,animation:i,queryCount:t.queryCount,depCount:t.depCount,options:Z(e.options)}}visitSequence(e,t){return{type:S.Sequence,steps:e.steps.map(i=>O(this,i,t)),options:Z(e.options)}}visitGroup(e,t){let i=t.currentTime,n=0,r=e.steps.map(o=>{t.currentTime=i;let a=O(this,o,t);return n=Math.max(n,t.currentTime),a});return t.currentTime=n,{type:S.Group,steps:r,options:Z(e.options)}}visitAnimate(e,t){let i=kn(e.timings,t.errors);t.currentAnimateTimings=i;let n,r=e.styles?e.styles:Xe({});if(r.type==S.Keyframes)n=this.visitKeyframes(r,t);else{let o=e.styles,a=!1;if(!o){a=!0;let c={};i.easing&&(c.easing=i.easing),o=Xe(c)}t.currentTime+=i.duration+i.delay;let l=this.visitStyle(o,t);l.isEmptyStep=a,n=l}return t.currentAnimateTimings=null,{type:S.Animate,timings:i,style:n,options:null}}visitStyle(e,t){let i=this._makeStyleAst(e,t);return this._validateStyleAst(i,t),i}_makeStyleAst(e,t){let i=[],n=Array.isArray(e.styles)?e.styles:[e.styles];for(let a of n)typeof a=="string"?a===K?i.push(a):t.errors.push(mi(a)):i.push(new Map(Object.entries(a)));let r=!1,o=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(o=a.get("easing"),a.delete("easing")),!r)){for(let l of a.values())if(l.toString().indexOf(st)>=0){r=!0;break}}}),{type:S.Style,styles:i,easing:o,offset:e.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(e,t){let i=t.currentAnimateTimings,n=t.currentTime,r=t.currentTime;i&&r>0&&(r-=i.duration+i.delay),e.styles.forEach(o=>{typeof o!="string"&&o.forEach((a,l)=>{let c=t.collectedStyles.get(t.currentQuerySelector),h=c.get(l),u=!0;h&&(r!=n&&r>=h.startTime&&n<=h.endTime&&(t.errors.push(fi(l,h.startTime,h.endTime,r,n)),u=!1),r=h.startTime),u&&c.set(l,{startTime:r,endTime:n}),t.options&&Li(a,t.options,t.errors)})})}visitKeyframes(e,t){let i={type:S.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(pi()),i;let n=1,r=0,o=[],a=!1,l=!1,c=0,h=e.steps.map(w=>{let b=this._makeStyleAst(w,t),C=b.offset!=null?b.offset:Rn(b.styles),N=0;return C!=null&&(r++,N=b.offset=C),l=l||N<0||N>1,a=a||N<c,c=N,o.push(N),b});l&&t.errors.push(gi()),a&&t.errors.push(yi());let u=e.steps.length,_=0;r>0&&r<u?t.errors.push(_i()):r==0&&(_=n/(u-1));let y=u-1,m=t.currentTime,g=t.currentAnimateTimings,T=g.duration;return h.forEach((w,b)=>{let C=_>0?b==y?1:_*b:o[b],N=C*T;t.currentTime=m+g.delay+N,g.duration=N,this._validateStyleAst(w,t),w.offset=C,i.styles.push(w)}),i}visitReference(e,t){return{type:S.Reference,animation:O(this,re(e.animation),t),options:Z(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:S.AnimateChild,options:Z(e.options)}}visitAnimateRef(e,t){return{type:S.AnimateRef,animation:this.visitReference(e.animation,t),options:Z(e.options)}}visitQuery(e,t){let i=t.currentQuerySelector,n=e.options||{};t.queryCount++,t.currentQuery=e;let[r,o]=Cn(e.selector);t.currentQuerySelector=i.length?i+" "+r:r,k(t.collectedStyles,t.currentQuerySelector,new Map);let a=O(this,re(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=i,{type:S.Query,selector:r,limit:n.limit||0,optional:!!n.optional,includeSelf:o,animation:a,originalSelector:e.selector,options:Z(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(Si());let i=e.timings==="full"?{duration:0,delay:0,easing:"full"}:de(e.timings,t.errors,!0);return{type:S.Stagger,animation:O(this,re(e.animation),t),timings:i,options:null}}};function Cn(s){let e=!!s.split(/\s*,\s*/).find(t=>t==Xi);return e&&(s=s.replace(Mn,"")),s=s.replace(/@\*/g,he).replace(/@\w+/g,t=>he+"-"+t.slice(1)).replace(/:animating/g,Me),[s,e]}function Dn(s){return s?_e({},s):null}var ft=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(e){this.errors=e}};function Rn(s){if(typeof s=="string")return null;let e=null;if(Array.isArray(s))s.forEach(t=>{if(t instanceof Map&&t.has("offset")){let i=t;e=parseFloat(i.get("offset")),i.delete("offset")}});else if(s instanceof Map&&s.has("offset")){let t=s;e=parseFloat(t.get("offset")),t.delete("offset")}return e}function kn(s,e){if(s.hasOwnProperty("duration"))return s;if(typeof s=="number"){let r=de(s,e).duration;return lt(r,0,"")}let t=s;if(t.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=lt(0,0,"");return r.dynamic=!0,r.strValue=t,r}let n=de(t,e);return lt(n.duration,n.delay,n.easing)}function Z(s){return s?(s=_e({},s),s.params&&(s.params=Dn(s.params))):s={},s}function lt(s,e,t){return{duration:s,delay:e,easing:t}}function bt(s,e,t,i,n,r,o=null,a=!1){return{type:1,element:s,keyframes:e,preStyleProps:t,postStyleProps:i,duration:n,delay:r,totalTime:n+r,easing:o,subTimeline:a}}var fe=class{_map=new Map;get(e){return this._map.get(e)||[]}append(e,t){let i=this._map.get(e);i||this._map.set(e,i=[]),i.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}},On=1,In=":enter",Fn=new RegExp(In,"g"),Ln=":leave",zn=new RegExp(Ln,"g");function Zi(s,e,t,i,n,r=new Map,o=new Map,a,l,c=[]){return new pt().buildKeyframes(s,e,t,i,n,r,o,a,l,c)}var pt=class{buildKeyframes(e,t,i,n,r,o,a,l,c,h=[]){c=c||new fe;let u=new gt(e,t,c,n,r,h,[]);u.options=l;let _=l.delay?V(l.delay):0;u.currentTimeline.delayNextStep(_),u.currentTimeline.setStyles([o],null,u.errors,l),O(this,i,u);let y=u.timelines.filter(m=>m.containsAnimation());if(y.length&&a.size){let m;for(let g=y.length-1;g>=0;g--){let T=y[g];if(T.element===t){m=T;break}}m&&!m.allowOnlyTimelineStyles()&&m.setStyles([a],null,u.errors,l)}return y.length?y.map(m=>m.buildKeyframes()):[bt(t,[],[],[],0,_,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){let i=t.subInstructions.get(t.element);if(i){let n=t.createSubContext(e.options),r=t.currentTimeline.currentTime,o=this._visitSubInstructions(i,n,n.options);r!=o&&t.transformIntoNewTimeline(o)}t.previousNode=e}visitAnimateRef(e,t){let i=t.createSubContext(e.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,i),this.visitReference(e.animation,i),t.transformIntoNewTimeline(i.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,i){for(let n of e){let r=n?.delay;if(r){let o=typeof r=="number"?r:V(oe(r,n?.params??{},t.errors));i.delayNextStep(o)}}}_visitSubInstructions(e,t,i){let r=t.currentTimeline.currentTime,o=i.duration!=null?V(i.duration):null,a=i.delay!=null?V(i.delay):null;return o!==0&&e.forEach(l=>{let c=t.appendInstructionToTimeline(l,o,a);r=Math.max(r,c.duration+c.delay)}),r}visitReference(e,t){t.updateOptions(e.options,!0),O(this,e.animation,t),t.previousNode=e}visitSequence(e,t){let i=t.subContextCount,n=t,r=e.options;if(r&&(r.params||r.delay)&&(n=t.createSubContext(r),n.transformIntoNewTimeline(),r.delay!=null)){n.previousNode.type==S.Style&&(n.currentTimeline.snapshotCurrentStyles(),n.previousNode=ze);let o=V(r.delay);n.delayNextStep(o)}e.steps.length&&(e.steps.forEach(o=>O(this,o,n)),n.currentTimeline.applyStylesToKeyframe(),n.subContextCount>i&&n.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){let i=[],n=t.currentTimeline.currentTime,r=e.options&&e.options.delay?V(e.options.delay):0;e.steps.forEach(o=>{let a=t.createSubContext(e.options);r&&a.delayNextStep(r),O(this,o,a),n=Math.max(n,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(o=>t.currentTimeline.mergeTimelineCollectedStyles(o)),t.transformIntoNewTimeline(n),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){let i=e.strValue,n=t.params?oe(i,t.params,t.errors):i;return de(n,t.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){let i=t.currentAnimateTimings=this._visitTiming(e.timings,t),n=t.currentTimeline;i.delay&&(t.incrementTime(i.delay),n.snapshotCurrentStyles());let r=e.style;r.type==S.Keyframes?this.visitKeyframes(r,t):(t.incrementTime(i.duration),this.visitStyle(r,t),n.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){let i=t.currentTimeline,n=t.currentAnimateTimings;!n&&i.hasCurrentStyleProperties()&&i.forwardFrame();let r=n&&n.easing||e.easing;e.isEmptyStep?i.applyEmptyStep(r):i.setStyles(e.styles,r,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){let i=t.currentAnimateTimings,n=t.currentTimeline.duration,r=i.duration,a=t.createSubContext().currentTimeline;a.easing=i.easing,e.styles.forEach(l=>{let c=l.offset||0;a.forwardTime(c*r),a.setStyles(l.styles,l.easing,t.errors,t.options),a.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(a),t.transformIntoNewTimeline(n+r),t.previousNode=e}visitQuery(e,t){let i=t.currentTimeline.currentTime,n=e.options||{},r=n.delay?V(n.delay):0;r&&(t.previousNode.type===S.Style||i==0&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=ze);let o=i,a=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!n.optional,t.errors);t.currentQueryTotal=a.length;let l=null;a.forEach((c,h)=>{t.currentQueryIndex=h;let u=t.createSubContext(e.options,c);r&&u.delayNextStep(r),c===t.element&&(l=u.currentTimeline),O(this,e.animation,u),u.currentTimeline.applyStylesToKeyframe();let _=u.currentTimeline.currentTime;o=Math.max(o,_)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(o),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){let i=t.parentContext,n=t.currentTimeline,r=e.timings,o=Math.abs(r.duration),a=o*(t.currentQueryTotal-1),l=o*t.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime;break}let h=t.currentTimeline;l&&h.delayNextStep(l);let u=h.currentTime;O(this,e.animation,t),t.previousNode=e,i.currentStaggerTime=n.currentTime-u+(n.startTime-i.currentTimeline.startTime)}},ze={},gt=class s{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=ze;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(e,t,i,n,r,o,a,l){this._driver=e,this.element=t,this.subInstructions=i,this._enterClassName=n,this._leaveClassName=r,this.errors=o,this.timelines=a,this.currentTimeline=l||new Ke(this._driver,t,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;let i=e,n=this.options;i.duration!=null&&(n.duration=V(i.duration)),i.delay!=null&&(n.delay=V(i.delay));let r=i.params;if(r){let o=n.params;o||(o=this.options.params={}),Object.keys(r).forEach(a=>{(!t||!o.hasOwnProperty(a))&&(o[a]=oe(r[a],o,this.errors))})}}_copyOptions(){let e={};if(this.options){let t=this.options.params;if(t){let i=e.params={};Object.keys(t).forEach(n=>{i[n]=t[n]})}}return e}createSubContext(e=null,t,i){let n=t||this.element,r=new s(this._driver,n,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(n,i||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(e),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(e){return this.previousNode=ze,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,i){let n={duration:t??e.duration,delay:this.currentTimeline.currentTime+(i??0)+e.delay,easing:""},r=new yt(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,n,e.stretchStartingKeyframe);return this.timelines.push(r),n}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,i,n,r,o){let a=[];if(n&&a.push(this.element),e.length>0){e=e.replace(Fn,"."+this._enterClassName),e=e.replace(zn,"."+this._leaveClassName);let l=i!=1,c=this._driver.query(this.element,e,l);i!==0&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!r&&a.length==0&&o.push(Ei(t)),a}},Ke=class s{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(e,t,i,n){this._driver=e,this.element=t,this.startTime=i,this._elementTimelineStylesLookup=n,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let t=this._keyframes.size===1&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new s(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=On,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles.set(e,t),this._globalTimelineStyles.set(e,t),this._styleSummary.set(e,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[t,i]of this._globalTimelineStyles)this._backFill.set(t,i||K),this._currentKeyframe.set(t,K);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,i,n){t&&this._previousKeyframe.set("easing",t);let r=n&&n.params||{},o=Kn(e,this._globalTimelineStyles);for(let[a,l]of o){let c=oe(l,r,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??K),this._updateStyle(a,c)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,t)=>{this._currentKeyframe.set(t,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,e)}))}snapshotCurrentStyles(){for(let[e,t]of this._localTimelineStyles)this._pendingStyles.set(e,t),this._updateStyle(e,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((t,i)=>{let n=this._styleSummary.get(i);(!n||t.time>n.time)&&this._updateStyle(i,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,t=new Set,i=this._keyframes.size===1&&this.duration===0,n=[];this._keyframes.forEach((a,l)=>{let c=new Map([...this._backFill,...a]);c.forEach((h,u)=>{h===ce?e.add(u):h===K&&t.add(u)}),i||c.set("offset",l/this.duration),n.push(c)});let r=[...e.values()],o=[...t.values()];if(i){let a=n[0],l=new Map(a);a.set("offset",0),l.set("offset",1),n=[a,l]}return bt(this.element,n,r,o,this.duration,this.startTime,this.easing,!1)}},yt=class extends Ke{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(e,t,i,n,r,o,a=!1){super(e,t,o.delay),this.keyframes=i,this.preStyleProps=n,this.postStyleProps=r,this._stretchStartingKeyframe=a,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:i,easing:n}=this.timings;if(this._stretchStartingKeyframe&&t){let r=[],o=i+t,a=t/o,l=new Map(e[0]);l.set("offset",0),r.push(l);let c=new Map(e[0]);c.set("offset",qi(a)),r.push(c);let h=e.length-1;for(let u=1;u<=h;u++){let _=new Map(e[u]),y=_.get("offset"),m=t+y*i;_.set("offset",qi(m/o)),r.push(_)}i=o,t=0,n="",e=r}return bt(this.element,e,this.preStyleProps,this.postStyleProps,i,t,n,!0)}};function qi(s,e=3){let t=Math.pow(10,e-1);return Math.round(s*t)/t}function Kn(s,e){let t=new Map,i;return s.forEach(n=>{if(n==="*"){i??=e.keys();for(let r of i)t.set(r,K)}else for(let[r,o]of n)t.set(r,o)}),t}function Qi(s,e,t,i,n,r,o,a,l,c,h,u,_){return{type:0,element:s,triggerName:e,isRemovalTransition:n,fromState:t,fromStyles:r,toState:i,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:h,totalTime:u,errors:_}}var ct={},je=class{_triggerName;ast;_stateStyles;constructor(e,t,i){this._triggerName=e,this.ast=t,this._stateStyles=i}match(e,t,i,n){return jn(this.ast.matchers,e,t,i,n)}buildStyles(e,t,i){let n=this._stateStyles.get("*");return e!==void 0&&(n=this._stateStyles.get(e?.toString())||n),n?n.buildStyles(t,i):new Map}build(e,t,i,n,r,o,a,l,c,h){let u=[],_=this.ast.options&&this.ast.options.params||ct,y=a&&a.params||ct,m=this.buildStyles(i,y,u),g=l&&l.params||ct,T=this.buildStyles(n,g,u),w=new Set,b=new Map,C=new Map,N=n==="void",ie={params:Ji(g,_),delay:this.ast.options?.delay},q=h?[]:Zi(e,t,this.ast.animation,r,o,m,T,ie,c,u),D=0;return q.forEach(R=>{D=Math.max(R.duration+R.delay,D)}),u.length?Qi(t,this._triggerName,i,n,N,m,T,[],[],b,C,D,u):(q.forEach(R=>{let W=R.element,ne=k(b,W,new Set);R.preStyleProps.forEach(H=>ne.add(H));let Pt=k(C,W,new Set);R.postStyleProps.forEach(H=>Pt.add(H)),W!==t&&w.add(W)}),Qi(t,this._triggerName,i,n,N,m,T,q,[...w.values()],b,C,D))}};function jn(s,e,t,i,n){return s.some(r=>r(e,t,i,n))}function Ji(s,e){let t=_e({},e);return Object.entries(s).forEach(([i,n])=>{n!=null&&(t[i]=n)}),t}var _t=class{styles;defaultParams;normalizer;constructor(e,t,i){this.styles=e,this.defaultParams=t,this.normalizer=i}buildStyles(e,t){let i=new Map,n=Ji(e,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((o,a)=>{o&&(o=oe(o,n,t));let l=this.normalizer.normalizePropertyName(a,t);o=this.normalizer.normalizeStyleValue(a,l,o,t),i.set(a,o)})}),i}};function Bn(s,e,t){return new St(s,e,t)}var St=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(e,t,i){this.name=e,this.ast=t,this._normalizer=i,t.states.forEach(n=>{let r=n.options&&n.options.params||{};this.states.set(n.name,new _t(n.style,r,i))}),Vi(this.states,"true","1"),Vi(this.states,"false","0"),t.transitions.forEach(n=>{this.transitionFactories.push(new je(e,n,this.states))}),this.fallbackTransition=qn(e,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,i,n){return this.transitionFactories.find(o=>o.match(e,t,i,n))||null}matchStyles(e,t,i){return this.fallbackTransition.buildStyles(e,t,i)}};function qn(s,e,t){let i=[(o,a)=>!0],n={type:S.Sequence,steps:[],options:null},r={type:S.Transition,animation:n,matchers:i,options:null,queryCount:0,depCount:0};return new je(s,r,e)}function Vi(s,e,t){s.has(e)?s.has(t)||s.set(t,s.get(e)):s.has(t)&&s.set(e,s.get(t))}var Qn=new fe,Et=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(e,t,i){this.bodyNode=e,this._driver=t,this._normalizer=i}register(e,t){let i=[],n=[],r=xi(this._driver,t,i,n);if(i.length)throw wi(i);this._animations.set(e,r)}_buildPlayer(e,t,i){let n=e.element,r=et(this._normalizer,e.keyframes,t,i);return this._driver.animate(n,r,e.duration,e.delay,e.easing,[],!0)}create(e,t,i={}){let n=[],r=this._animations.get(e),o,a=new Map;if(r?(o=Zi(this._driver,t,r,rt,Ne,new Map,new Map,i,Qn,n),o.forEach(h=>{let u=k(a,h.element,new Map);h.postStyleProps.forEach(_=>u.set(_,null))})):(n.push(bi()),o=[]),n.length)throw Pi(n);a.forEach((h,u)=>{h.forEach((_,y)=>{h.set(y,this._driver.computeStyle(u,y,K))})});let l=o.map(h=>{let u=a.get(h.element);return this._buildPlayer(h,new Map,u)}),c=U(l);return this._playersById.set(e,c),c.onDestroy(()=>this.destroy(e)),this.players.push(c),c}destroy(e){let t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);let i=this.players.indexOf(t);i>=0&&this.players.splice(i,1)}_getPlayer(e){let t=this._playersById.get(e);if(!t)throw Ni(e);return t}listen(e,t,i,n){let r=be(t,"","","");return we(this._getPlayer(e),i,r,n),()=>{}}command(e,t,i,n){if(i=="register"){this.register(e,n[0]);return}if(i=="create"){let o=n[0]||{};this.create(e,t,o);return}let r=this._getPlayer(e);switch(i){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(n[0]));break;case"destroy":this.destroy(e);break}}},Ui="ng-animate-queued",Vn=".ng-animate-queued",ut="ng-animate-disabled",Un=".ng-animate-disabled",$n="ng-star-inserted",Gn=".ng-star-inserted",Wn=[],en={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Hn={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},B="__ng_removed",pe=class{namespaceId;value;options;get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;let i=e&&e.hasOwnProperty("value"),n=i?e.value:e;if(this.value=Xn(n),i){let r=e,{value:o}=r,a=Dt(r,["value"]);this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let t=e.params;if(t){let i=this.options.params;Object.keys(t).forEach(n=>{i[n]==null&&(i[n]=t[n])})}}},me="void",ht=new pe(me),vt=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(e,t,i){this.id=e,this.hostElement=t,this._engine=i,this._hostClassName="ng-tns-"+e,L(t,this._hostClassName)}listen(e,t,i,n){if(!this._triggers.has(t))throw Mi(i,t);if(i==null||i.length==0)throw Ci(t);if(!xn(i))throw Di(i,t);let r=k(this._elementListeners,e,[]),o={name:t,phase:i,callback:n};r.push(o);let a=k(this._engine.statesByElement,e,new Map);return a.has(t)||(L(e,ue),L(e,ue+"-"+t),a.set(t,ht)),()=>{this._engine.afterFlush(()=>{let l=r.indexOf(o);l>=0&&r.splice(l,1),this._triggers.has(t)||a.delete(t)})}}register(e,t){return this._triggers.has(e)?!1:(this._triggers.set(e,t),!0)}_getTrigger(e){let t=this._triggers.get(e);if(!t)throw Ri(e);return t}trigger(e,t,i,n=!0){let r=this._getTrigger(t),o=new ge(this.id,t,e),a=this._engine.statesByElement.get(e);a||(L(e,ue),L(e,ue+"-"+t),this._engine.statesByElement.set(e,a=new Map));let l=a.get(t),c=new pe(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(t,c),l||(l=ht),!(c.value===me)&&l.value===c.value){if(!es(l.params,c.params)){let g=[],T=r.matchStyles(l.value,l.params,g),w=r.matchStyles(c.value,c.params,g);g.length?this._engine.reportError(g):this._engine.afterFlush(()=>{G(e,T),j(e,w)})}return}let _=k(this._engine.playersByElement,e,[]);_.forEach(g=>{g.namespaceId==this.id&&g.triggerName==t&&g.queued&&g.destroy()});let y=r.matchTransition(l.value,c.value,e,c.params),m=!1;if(!y){if(!n)return;y=r.fallbackTransition,m=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:y,fromState:l,toState:c,player:o,isFallbackTransition:m}),m||(L(e,Ui),o.onStart(()=>{ae(e,Ui)})),o.onDone(()=>{let g=this.players.indexOf(o);g>=0&&this.players.splice(g,1);let T=this._engine.playersByElement.get(e);if(T){let w=T.indexOf(o);w>=0&&T.splice(w,1)}}),this.players.push(o),_.push(o),o}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(t=>t.delete(e)),this._elementListeners.forEach((t,i)=>{this._elementListeners.set(i,t.filter(n=>n.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let t=this._engine.playersByElement.get(e);t&&(t.forEach(i=>i.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){let i=this._engine.driver.query(e,he,!0);i.forEach(n=>{if(n[B])return;let r=this._engine.fetchNamespacesByElement(n);r.size?r.forEach(o=>o.triggerLeaveAnimation(n,t,!1,!0)):this.clearElementCache(n)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(n=>this.clearElementCache(n)))}triggerLeaveAnimation(e,t,i,n){let r=this._engine.statesByElement.get(e),o=new Map;if(r){let a=[];if(r.forEach((l,c)=>{if(o.set(c,l.value),this._triggers.has(c)){let h=this.trigger(e,c,me,n);h&&a.push(h)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,o),i&&U(a).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let t=this._elementListeners.get(e),i=this._engine.statesByElement.get(e);if(t&&i){let n=new Set;t.forEach(r=>{let o=r.name;if(n.has(o))return;n.add(o);let l=this._triggers.get(o).fallbackTransition,c=i.get(o)||ht,h=new pe(me),u=new ge(this.id,o,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:o,transition:l,fromState:c,toState:h,player:u,isFallbackTransition:!0})})}}removeNode(e,t){let i=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let n=!1;if(i.totalAnimations){let r=i.players.length?i.playersByQueriedElement.get(e):[];if(r&&r.length)n=!0;else{let o=e;for(;o=o.parentNode;)if(i.statesByElement.get(o)){n=!0;break}}}if(this.prepareLeaveAnimationListeners(e),n)i.markElementAsRemoved(this.id,e,!1,t);else{let r=e[B];(!r||r===en)&&(i.afterFlush(()=>this.clearElementCache(e)),i.destroyInnerAnimations(e),i._onRemovalComplete(e,t))}}insertNode(e,t){L(e,this._hostClassName)}drainQueuedTransitions(e){let t=[];return this._queue.forEach(i=>{let n=i.player;if(n.destroyed)return;let r=i.element,o=this._elementListeners.get(r);o&&o.forEach(a=>{if(a.name==i.triggerName){let l=be(r,i.triggerName,i.fromState.value,i.toState.value);l._data=e,we(i.player,a.phase,l,a.callback)}}),n.markedForDestroy?this._engine.afterFlush(()=>{n.destroy()}):t.push(i)}),this._queue=[],t.sort((i,n)=>{let r=i.transition.ast.depCount,o=n.transition.ast.depCount;return r==0||o==0?r-o:this._engine.driver.containsElement(i.element,n.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},Tt=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(e,t)=>{};_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,i){this.bodyNode=e,this.driver=t,this._normalizer=i}get queuedPlayers(){let e=[];return this._namespaceList.forEach(t=>{t.players.forEach(i=>{i.queued&&e.push(i)})}),e}createNamespace(e,t){let i=new vt(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(i,t):(this.newHostElements.set(t,i),this.collectEnterElement(t)),this._namespaceLookup[e]=i}_balanceNamespaceList(e,t){let i=this._namespaceList,n=this.namespacesByHostElement;if(i.length-1>=0){let o=!1,a=this.driver.getParentElement(t);for(;a;){let l=n.get(a);if(l){let c=i.indexOf(l);i.splice(c+1,0,e),o=!0;break}a=this.driver.getParentElement(a)}o||i.unshift(e)}else i.push(e);return n.set(t,e),e}register(e,t){let i=this._namespaceLookup[e];return i||(i=this.createNamespace(e,t)),i}registerTrigger(e,t,i){let n=this._namespaceLookup[e];n&&n.register(t,i)&&this.totalAnimations++}destroy(e,t){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let i=this._fetchNamespace(e);this.namespacesByHostElement.delete(i.hostElement);let n=this._namespaceList.indexOf(i);n>=0&&this._namespaceList.splice(n,1),i.destroy(t),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let t=new Set,i=this.statesByElement.get(e);if(i){for(let n of i.values())if(n.namespaceId){let r=this._fetchNamespace(n.namespaceId);r&&t.add(r)}}return t}trigger(e,t,i,n){if(Oe(t)){let r=this._fetchNamespace(e);if(r)return r.trigger(t,i,n),!0}return!1}insertNode(e,t,i,n){if(!Oe(t))return;let r=t[B];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let o=this.collectedLeaveElements.indexOf(t);o>=0&&this.collectedLeaveElements.splice(o,1)}if(e){let o=this._fetchNamespace(e);o&&o.insertNode(t,i)}n&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),L(e,ut)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),ae(e,ut))}removeNode(e,t,i){if(Oe(t)){let n=e?this._fetchNamespace(e):null;n?n.removeNode(t,i):this.markElementAsRemoved(e,t,!1,i);let r=this.namespacesByHostElement.get(t);r&&r.id!==e&&r.removeNode(t,i)}else this._onRemovalComplete(t,i)}markElementAsRemoved(e,t,i,n,r){this.collectedLeaveElements.push(t),t[B]={namespaceId:e,setForRemoval:n,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:r}}listen(e,t,i,n,r){return Oe(t)?this._fetchNamespace(e).listen(t,i,n,r):()=>{}}_buildInstruction(e,t,i,n,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,i,n,e.fromState.options,e.toState.options,t,r)}destroyInnerAnimations(e){let t=this.driver.query(e,he,!0);t.forEach(i=>this.destroyActiveAnimationsForElement(i)),this.playersByQueriedElement.size!=0&&(t=this.driver.query(e,Me,!0),t.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(e){let t=this.playersByElement.get(e);t&&t.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(e){let t=this.playersByQueriedElement.get(e);t&&t.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return U(this.players).onDone(()=>e());e()})}processLeaveNode(e){let t=e[B];if(t&&t.setForRemoval){if(e[B]=en,t.namespaceId){this.destroyInnerAnimations(e);let i=this._fetchNamespace(t.namespaceId);i&&i.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains(ut)&&this.markElementAsDisabled(e,!1),this.driver.query(e,Un,!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,n)=>this._balanceNamespaceList(i,n)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;i<this.collectedEnterElements.length;i++){let n=this.collectedEnterElements[i];L(n,$n)}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let i=[];try{t=this._flushAnimations(i,e)}finally{for(let n=0;n<i.length;n++)i[n]()}}else for(let i=0;i<this.collectedLeaveElements.length;i++){let n=this.collectedLeaveElements[i];this.processLeaveNode(n)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(i=>i()),this._flushFns=[],this._whenQuietFns.length){let i=this._whenQuietFns;this._whenQuietFns=[],t.length?U(t).onDone(()=>{i.forEach(n=>n())}):i.forEach(n=>n())}}reportError(e){throw ki(e)}_flushAnimations(e,t){let i=new fe,n=[],r=new Map,o=[],a=new Map,l=new Map,c=new Map,h=new Set;this.disabledNodes.forEach(d=>{h.add(d);let f=this.driver.query(d,Vn,!0);for(let p=0;p<f.length;p++)h.add(f[p])});let u=this.bodyNode,_=Array.from(this.statesByElement.keys()),y=Wi(_,this.collectedEnterElements),m=new Map,g=0;y.forEach((d,f)=>{let p=rt+g++;m.set(f,p),d.forEach(E=>L(E,p))});let T=[],w=new Set,b=new Set;for(let d=0;d<this.collectedLeaveElements.length;d++){let f=this.collectedLeaveElements[d],p=f[B];p&&p.setForRemoval&&(T.push(f),w.add(f),p.hasAnimation?this.driver.query(f,Gn,!0).forEach(E=>w.add(E)):b.add(f))}let C=new Map,N=Wi(_,Array.from(w));N.forEach((d,f)=>{let p=Ne+g++;C.set(f,p),d.forEach(E=>L(E,p))}),e.push(()=>{y.forEach((d,f)=>{let p=m.get(f);d.forEach(E=>ae(E,p))}),N.forEach((d,f)=>{let p=C.get(f);d.forEach(E=>ae(E,p))}),T.forEach(d=>{this.processLeaveNode(d)})});let ie=[],q=[];for(let d=this._namespaceList.length-1;d>=0;d--)this._namespaceList[d].drainQueuedTransitions(t).forEach(p=>{let E=p.player,P=p.element;if(ie.push(E),this.collectedEnterElements.length){let M=P[B];if(M&&M.setForMove){if(M.previousTriggersValues&&M.previousTriggersValues.has(p.triggerName)){let Y=M.previousTriggersValues.get(p.triggerName),F=this.statesByElement.get(p.element);if(F&&F.has(p.triggerName)){let ye=F.get(p.triggerName);ye.value=Y,F.set(p.triggerName,ye)}}E.destroy();return}}let Q=!u||!this.driver.containsElement(u,P),I=C.get(P),$=m.get(P),A=this._buildInstruction(p,i,$,I,Q);if(A.errors&&A.errors.length){q.push(A);return}if(Q){E.onStart(()=>G(P,A.fromStyles)),E.onDestroy(()=>j(P,A.toStyles)),n.push(E);return}if(p.isFallbackTransition){E.onStart(()=>G(P,A.fromStyles)),E.onDestroy(()=>j(P,A.toStyles)),n.push(E);return}let Ct=[];A.timelines.forEach(M=>{M.stretchStartingKeyframe=!0,this.disabledNodes.has(M.element)||Ct.push(M)}),A.timelines=Ct,i.append(P,A.timelines);let cn={instruction:A,player:E,element:P};o.push(cn),A.queriedElements.forEach(M=>k(a,M,[]).push(E)),A.preStyleProps.forEach((M,Y)=>{if(M.size){let F=l.get(Y);F||l.set(Y,F=new Set),M.forEach((ye,Ge)=>F.add(Ge))}}),A.postStyleProps.forEach((M,Y)=>{let F=c.get(Y);F||c.set(Y,F=new Set),M.forEach((ye,Ge)=>F.add(Ge))})});if(q.length){let d=[];q.forEach(f=>{d.push(Oi(f.triggerName,f.errors))}),ie.forEach(f=>f.destroy()),this.reportError(d)}let D=new Map,R=new Map;o.forEach(d=>{let f=d.element;i.has(f)&&(R.set(f,f),this._beforeAnimationBuild(d.player.namespaceId,d.instruction,D))}),n.forEach(d=>{let f=d.element;this._getPreviousPlayers(f,!1,d.namespaceId,d.triggerName,null).forEach(E=>{k(D,f,[]).push(E),E.destroy()})});let W=T.filter(d=>Hi(d,l,c)),ne=new Map;Gi(ne,this.driver,b,c,K).forEach(d=>{Hi(d,l,c)&&W.push(d)});let H=new Map;y.forEach((d,f)=>{Gi(H,this.driver,new Set(d),l,ce)}),W.forEach(d=>{let f=ne.get(d),p=H.get(d);ne.set(d,new Map([...f?.entries()??[],...p?.entries()??[]]))});let $e=[],Nt=[],Mt={};o.forEach(d=>{let{element:f,player:p,instruction:E}=d;if(i.has(f)){if(h.has(f)){p.onDestroy(()=>j(f,E.toStyles)),p.disabled=!0,p.overrideTotalTime(E.totalTime),n.push(p);return}let P=Mt;if(R.size>1){let I=f,$=[];for(;I=I.parentNode;){let A=R.get(I);if(A){P=A;break}$.push(I)}$.forEach(A=>R.set(A,P))}let Q=this._buildAnimation(p.namespaceId,E,D,r,H,ne);if(p.setRealPlayer(Q),P===Mt)$e.push(p);else{let I=this.playersByElement.get(P);I&&I.length&&(p.parentPlayer=U(I)),n.push(p)}}else G(f,E.fromStyles),p.onDestroy(()=>j(f,E.toStyles)),Nt.push(p),h.has(f)&&n.push(p)}),Nt.forEach(d=>{let f=r.get(d.element);if(f&&f.length){let p=U(f);d.setRealPlayer(p)}}),n.forEach(d=>{d.parentPlayer?d.syncPlayerEvents(d.parentPlayer):d.destroy()});for(let d=0;d<T.length;d++){let f=T[d],p=f[B];if(ae(f,Ne),p&&p.hasAnimation)continue;let E=[];if(a.size){let Q=a.get(f);Q&&Q.length&&E.push(...Q);let I=this.driver.query(f,Me,!0);for(let $=0;$<I.length;$++){let A=a.get(I[$]);A&&A.length&&E.push(...A)}}let P=E.filter(Q=>!Q.destroyed);P.length?Zn(this,f,P):this.processLeaveNode(f)}return T.length=0,$e.forEach(d=>{this.players.push(d),d.onDone(()=>{d.destroy();let f=this.players.indexOf(d);this.players.splice(f,1)}),d.play()}),$e}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,i,n,r){let o=[];if(t){let a=this.playersByQueriedElement.get(e);a&&(o=a)}else{let a=this.playersByElement.get(e);if(a){let l=!r||r==me;a.forEach(c=>{c.queued||!l&&c.triggerName!=n||o.push(c)})}}return(i||n)&&(o=o.filter(a=>!(i&&i!=a.namespaceId||n&&n!=a.triggerName))),o}_beforeAnimationBuild(e,t,i){let n=t.triggerName,r=t.element,o=t.isRemovalTransition?void 0:e,a=t.isRemovalTransition?void 0:n;for(let l of t.timelines){let c=l.element,h=c!==r,u=k(i,c,[]);this._getPreviousPlayers(c,h,o,a,t.toState).forEach(y=>{let m=y.getRealPlayer();m.beforeDestroy&&m.beforeDestroy(),y.destroy(),u.push(y)})}G(r,t.fromStyles)}_buildAnimation(e,t,i,n,r,o){let a=t.triggerName,l=t.element,c=[],h=new Set,u=new Set,_=t.timelines.map(m=>{let g=m.element;h.add(g);let T=g[B];if(T&&T.removedBeforeQueried)return new X(m.duration,m.delay);let w=g!==l,b=Jn((i.get(g)||Wn).map(D=>D.getRealPlayer())).filter(D=>{let R=D;return R.element?R.element===g:!1}),C=r.get(g),N=o.get(g),ie=et(this._normalizer,m.keyframes,C,N),q=this._buildPlayer(m,ie,b);if(m.subTimeline&&n&&u.add(g),w){let D=new ge(e,a,g);D.setRealPlayer(q),c.push(D)}return q});c.forEach(m=>{k(this.playersByQueriedElement,m.element,[]).push(m),m.onDone(()=>Yn(this.playersByQueriedElement,m.element,m))}),h.forEach(m=>L(m,ot));let y=U(_);return y.onDestroy(()=>{h.forEach(m=>ae(m,ot)),j(l,t.toStyles)}),u.forEach(m=>{k(n,m,[]).push(y)}),y}_buildPlayer(e,t,i){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,i):new X(e.duration,e.delay)}},ge=class{namespaceId;triggerName;element;_player=new X;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(e,t,i){this.namespaceId=e,this.triggerName=t,this.element=i}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,i)=>{t.forEach(n=>we(e,i,void 0,n))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){k(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let t=this._player;t.triggerCallback&&t.triggerCallback(e)}};function Yn(s,e,t){let i=s.get(e);if(i){if(i.length){let n=i.indexOf(t);i.splice(n,1)}i.length==0&&s.delete(e)}return i}function Xn(s){return s??null}function Oe(s){return s&&s.nodeType===1}function xn(s){return s=="start"||s=="done"}function $i(s,e){let t=s.style.display;return s.style.display=e??"none",t}function Gi(s,e,t,i,n){let r=[];t.forEach(l=>r.push($i(l)));let o=[];i.forEach((l,c)=>{let h=new Map;l.forEach(u=>{let _=e.computeStyle(c,u,n);h.set(u,_),(!_||_.length==0)&&(c[B]=Hn,o.push(c))}),s.set(c,h)});let a=0;return t.forEach(l=>$i(l,r[a++])),o}function Wi(s,e){let t=new Map;if(s.forEach(a=>t.set(a,[])),e.length==0)return t;let i=1,n=new Set(e),r=new Map;function o(a){if(!a)return i;let l=r.get(a);if(l)return l;let c=a.parentNode;return t.has(c)?l=c:n.has(c)?l=i:l=o(c),r.set(a,l),l}return e.forEach(a=>{let l=o(a);l!==i&&t.get(l).push(a)}),t}function L(s,e){s.classList?.add(e)}function ae(s,e){s.classList?.remove(e)}function Zn(s,e,t){U(t).onDone(()=>s.processLeaveNode(e))}function Jn(s){let e=[];return tn(s,e),e}function tn(s,e){for(let t=0;t<s.length;t++){let i=s[t];i instanceof ve?tn(i.players,e):e.push(i)}}function es(s,e){let t=Object.keys(s),i=Object.keys(e);if(t.length!=i.length)return!1;for(let n=0;n<t.length;n++){let r=t[n];if(!e.hasOwnProperty(r)||s[r]!==e[r])return!1}return!0}function Hi(s,e,t){let i=t.get(s);if(!i)return!1;let n=e.get(s);return n?i.forEach(r=>n.add(r)):e.set(s,i),t.delete(s),!0}var le=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(e,t)=>{};constructor(e,t,i){this._driver=t,this._normalizer=i,this._transitionEngine=new Tt(e.body,t,i),this._timelineEngine=new Et(e.body,t,i),this._transitionEngine.onRemovalComplete=(n,r)=>this.onRemovalComplete(n,r)}registerTrigger(e,t,i,n,r){let o=e+"-"+n,a=this._triggerCache[o];if(!a){let l=[],c=[],h=xi(this._driver,r,l,c);if(l.length)throw Ai(n,l);a=Bn(n,h,this._normalizer),this._triggerCache[o]=a}this._transitionEngine.registerTrigger(t,n,a)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,i,n){this._transitionEngine.insertNode(e,t,i,n)}onRemove(e,t,i){this._transitionEngine.removeNode(e,t,i)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,i,n){if(i.charAt(0)=="@"){let[r,o]=tt(i),a=n;this._timelineEngine.command(r,t,o,a)}else this._transitionEngine.trigger(e,t,i,n)}listen(e,t,i,n,r){if(i.charAt(0)=="@"){let[o,a]=tt(i);return this._timelineEngine.listen(o,t,a,r)}return this._transitionEngine.listen(e,t,i,n,r)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}};function ts(s,e){let t=null,i=null;return Array.isArray(e)&&e.length?(t=dt(e[0]),e.length>1&&(i=dt(e[e.length-1]))):e instanceof Map&&(t=dt(e)),t||i?new is(s,t,i):null}var is=(()=>{class s{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(t,i,n){this._element=t,this._startStyles=i,this._endStyles=n;let r=s.initialStylesByElement.get(t);r||s.initialStylesByElement.set(t,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&j(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(j(this._element,this._initialStyles),this._endStyles&&(j(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(s.initialStylesByElement.delete(this._element),this._startStyles&&(G(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(G(this._element,this._endStyles),this._endStyles=null),j(this._element,this._initialStyles),this._state=3)}}return s})();function dt(s){let e=null;return s.forEach((t,i)=>{ns(i)&&(e=e||new Map,e.set(i,t))}),e}function ns(s){return s==="display"||s==="position"}var Be=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer=null;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(e,t,i,n){this.element=e,this.keyframes=t,this.options=i,this._specialStyles=n,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer()&&this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return this.domPlayer;this._initialized=!0;let e=this.keyframes,t=this._triggerWebAnimation(this.element,e,this.options);if(!t)return this._onFinish(),null;this.domPlayer=t,this._finalKeyframe=e.length?e[e.length-1]:new Map;let i=()=>this._onFinish();return t.addEventListener("finish",i),this.onDestroy(()=>{t.removeEventListener("finish",i)}),t}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer?.pause()}_convertKeyframesToObject(e){let t=[];return e.forEach(i=>{t.push(Object.fromEntries(i))}),t}_triggerWebAnimation(e,t,i){let n=this._convertKeyframesToObject(t);try{return e.animate(n,i)}catch(r){return null}}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){let e=this._buildPlayer();e&&(this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),e.play())}pause(){this.init(),this.domPlayer?.pause()}finish(){this.init(),this.domPlayer&&(this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish())}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer?.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer||this.init(),this.domPlayer&&(this.domPlayer.currentTime=e*this.time)}getPosition(){return this.domPlayer?+(this.domPlayer.currentTime??0)/this.time:this._initialized?1:0}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,n)=>{n!=="offset"&&e.set(n,this._finished?i:De(this.element,n))}),this.currentSnapshot=e}triggerCallback(e){let t=e==="start"?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}},qe=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,t){return it(e,t)}getParentElement(e){return Pe(e)}query(e,t,i){return nt(e,t,i)}computeStyle(e,t,i){return De(e,t)}animate(e,t,i,n,r,o=[]){let a=n==0?"both":"forwards",l={duration:i,delay:n,fill:a};r&&(l.easing=r);let c=new Map,h=o.filter(y=>y instanceof Be);zi(i,n)&&h.forEach(y=>{y.currentSnapshot.forEach((m,g)=>c.set(g,m))});let u=Fi(t).map(y=>new Map(y));u=Ki(e,u,c);let _=ts(e,u);return new Be(e,u,l,_)}};var Ie="@",nn="@.disabled",Qe=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(e,t,i,n){this.namespaceId=e,this.delegate=t,this.engine=i,this._onDestroy=n}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,i,n=!0){this.delegate.insertBefore(e,t,i),this.engine.onInsert(this.namespaceId,t,e,n)}removeChild(e,t,i,n){if(n){this.delegate.removeChild(e,t,i,n);return}this.parentNode(t)&&this.engine.onRemove(this.namespaceId,t,this.delegate)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,i,n){this.delegate.setAttribute(e,t,i,n)}removeAttribute(e,t,i){this.delegate.removeAttribute(e,t,i)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,i,n){this.delegate.setStyle(e,t,i,n)}removeStyle(e,t,i){this.delegate.removeStyle(e,t,i)}setProperty(e,t,i){t.charAt(0)==Ie&&t==nn?this.disableAnimations(e,!!i):this.delegate.setProperty(e,t,i)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,i,n){return this.delegate.listen(e,t,i,n)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}},At=class extends Qe{factory;constructor(e,t,i,n,r){super(t,i,n,r),this.factory=e,this.namespaceId=t}setProperty(e,t,i){t.charAt(0)==Ie?t.charAt(1)=="."&&t==nn?(i=i===void 0?!0:!!i,this.disableAnimations(e,i)):this.engine.process(this.namespaceId,e,t.slice(1),i):this.delegate.setProperty(e,t,i)}listen(e,t,i,n){if(t.charAt(0)==Ie){let r=ss(e),o=t.slice(1),a="";return o.charAt(0)!=Ie&&([o,a]=rs(o)),this.engine.listen(this.namespaceId,r,o,a,l=>{let c=l._data||-1;this.factory.scheduleListenerCallback(c,i,l)})}return this.delegate.listen(e,t,i,n)}};function ss(s){switch(s){case"body":return document.body;case"document":return document;case"window":return window;default:return s}}function rs(s){let e=s.indexOf("."),t=s.substring(0,e),i=s.slice(e+1);return[t,i]}var Ve=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(e,t,i){this.delegate=e,this.engine=t,this._zone=i,t.onRemovalComplete=(n,r)=>{r?.removeChild(null,n)}}createRenderer(e,t){let n=this.delegate.createRenderer(e,t);if(!e||!t?.data?.animation){let c=this._rendererCache,h=c.get(n);if(!h){let u=()=>c.delete(n);h=new Qe("",n,this.engine,u),c.set(n,h)}return h}let r=t.id,o=t.id+"-"+this._currentId;this._currentId++,this.engine.register(o,e);let a=c=>{Array.isArray(c)?c.forEach(a):this.engine.registerTrigger(r,o,e,c.name,c)};return t.data.animation.forEach(a),new At(this,o,n,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,t,i){if(e>=0&&e<this._microtaskId){this._zone.run(()=>t(i));return}let n=this._animationCallbacksBuffer;n.length==0&&queueMicrotask(()=>{this._zone.run(()=>{n.forEach(r=>{let[o,a]=r;o(a)}),this._animationCallbacksBuffer=[]})}),n.push([t,i])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}componentReplaced(e){this.engine.flush(),this.delegate.componentReplaced?.(e)}};var as=(()=>{class s extends le{constructor(t,i,n){super(t,i,n)}ngOnDestroy(){this.flush()}static \u0275fac=function(i){return new(i||s)(Ee(Kt),Ee(J),Ee(ee))};static \u0275prov=Se({token:s,factory:s.\u0275fac})}return s})();function ls(){return new Fe}function cs(){return new Ve(z(Wt),z(le),z(jt))}var sn=[{provide:ee,useFactory:ls},{provide:le,useClass:as},{provide:Qt,useFactory:cs}],Os=[{provide:J,useClass:wt},{provide:He,useValue:"NoopAnimations"},...sn],us=[{provide:J,useFactory:()=>new qe},{provide:He,useFactory:()=>"BrowserAnimations"},...sn];function rn(){return qt("NgEagerAnimations"),[...us]}var te=s=>se(null,null,function*(){let e=z(Te),t=s.params.projectName;return t?e.getSelectedProjectId()===t?!0:(e.selectProject(t),(yield Rt(e.selectedProject$.pipe(Lt(n=>n?.name===t))))?.name===t):(console.log("[PROJECT GUARD] no project id in route"),!1)});var on=s=>se(null,null,function*(){let e=z(si),t=z(ri),i=s.params.threadId;if(!t.getUsername())try{yield We(t.fetchCurrentUser())}catch(n){console.error("[THREAD GUARD] Failed to load current user:",n)}if(!i)return console.log("[THREAD GUARD] no threadId in route"),!1;if(console.log("[THREAD GUARD] Checking thread:",i),console.log("[THREAD GUARD] Current selected thread:",e.getSelectedThreadId()),e.getSelectedThreadId()===i)return console.log("[THREAD GUARD] Thread already selected, allowing navigation"),!0;console.log("[THREAD GUARD] Selecting thread:",i),e.selectThread(i);try{let n=yield We(Ot([e.isLoading$,e.selectedThread$]).pipe(zt(([o,a])=>console.log(`\u{1F43C} [${o?"loading":"loaded"}]`,a?.id)),It(([o,a])=>!o&&!!a),Ft(1),kt(([o,a])=>a?.id))),r=n===i;return r?console.log("[THREAD GUARD] Thread validated, allowing navigation"):console.error("[THREAD GUARD] Thread ID mismatch - route:",i,"loaded:",n),r}catch(n){return console.error("[THREAD GUARD] Error loading thread:",n),!1}});var an=[{path:"",loadComponent:()=>import("./chunk-IZMOVLXM.js").then(s=>s.GlobalTaskControlComponent)},{path:"projects",loadComponent:()=>import("./chunk-ZH3XQHLJ.js").then(s=>s.ProjectListComponent)},{path:"oauth/callback",loadComponent:()=>import("./chunk-OQBPCHYW.js").then(s=>s.OAuthCallbackComponent)},{path:"project/new",loadComponent:()=>import("./chunk-5ZZOXT2B.js").then(s=>s.ProjectNewComponent)},{path:"project/:projectName",loadComponent:()=>import("./chunk-OCT6NWLB.js").then(s=>s.MainAppComponent),canActivate:[te]},{path:"project/:projectName/prompts",loadComponent:()=>import("./chunk-MQIE2KBB.js").then(s=>s.PromptListComponent),canActivate:[te]},{path:"project/:projectName/schedulers",loadComponent:()=>import("./chunk-XIWUSJ3U.js").then(s=>s.SchedulerListComponent),canActivate:[te]},{path:"project/:projectName/agents",loadComponent:()=>import("./chunk-IWORAUIR.js").then(s=>s.AgentListComponent),canActivate:[te]},{path:"project/:projectName/tasks",loadComponent:()=>import("./chunk-7UX5UET4.js").then(s=>s.TaskControlComponent),canActivate:[te]},{path:"project/:projectName/missions",redirectTo:"project/:projectName/tasks"},{path:"project/:projectName/thread/:threadId",loadComponent:()=>import("./chunk-OCT6NWLB.js").then(s=>s.MainAppComponent),canActivate:[te,on]},{path:"token-usage",loadComponent:()=>import("./chunk-PN75DG7I.js").then(s=>s.TokenUsageComponent)},{path:"agentos",loadChildren:()=>se(null,null,function*(){let{AGENTOS_ROUTES:s,THEME_PORT:e}=yield import("./chunk-EN3JS6XQ.js");return[{path:"",providers:[{provide:e,useFactory:t=>({theme:ni(t.currentTheme$,{initialValue:t.getCurrentTheme()}),setTheme:i=>t.setTheme(i)}),deps:[Ae]}],children:s}]})},{path:"**",redirectTo:""}];function hs(s){return()=>s.initializeDefaultProject()}function ds(s){return()=>{console.log("[APP_INIT] OAuthService initialized")}}var ln={providers:[Bt(),$t({eventCoalescing:!0}),xt(an),Yt(),rn(),{provide:ti,useValue:{duration:3e3}},{provide:Ye,useFactory:hs,deps:[Te],multi:!0},{provide:Ye,useFactory:ds,deps:[oi],multi:!0},ii({basePath:"/api/agentos"}),{provide:ei,useValue:{width:"80vw",maxWidth:"80vw",maxHeight:"80vh"}}]};var Ue=class s{title="client";themeService=z(Ae);ngOnInit(){console.log("[APP] Application initialized with theme:",this.themeService.getCurrentTheme())}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=Vt({type:s,selectors:[["app-root"]],decls:1,vars:0,template:function(t,i){t&1&&Ut(0,"router-outlet")},dependencies:[Zt,Xt],encapsulation:2})};Ht(Ue,ln).catch(s=>console.error(s));"serviceWorker"in navigator&&!Gt()&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/sw.js").catch(s=>console.error("[SW] Registration failed:",s))});
|
|
1
|
+
import{m as ii}from"./chunk-J3CZ3MOZ.js";import{a as S,b as K,e as Jt,f as Xe,h as X,i as ve,j as ce}from"./chunk-QVW2GZXC.js";import{a as oi}from"./chunk-RFEQZZ65.js";import{b as si,c as ri,e as Ae}from"./chunk-ATOA52OV.js";import"./chunk-JLGR5C43.js";import{b as Xt,e as xt,f as Zt}from"./chunk-H7A4LOFH.js";import{a as ti}from"./chunk-SR3JKZ3U.js";import{c as ei}from"./chunk-7BYLIOKV.js";import"./chunk-RBAVAHXW.js";import{c as ni}from"./chunk-RI2JQRSB.js";import{b as Te}from"./chunk-H2NKOG3U.js";import"./chunk-TZKO65ML.js";import{B as It,Ca as He,G as Ft,L as Lt,La as qt,Oa as Qt,Oc as Wt,Pc as Ht,Uc as Yt,V as zt,W as v,Wa as Vt,Z as Se,a as _e,ba as Ee,c as Dt,ca as z,d as se,fb as Ye,la as Kt,pa as jt,q as We,r as Rt,rc as $t,sa as Bt,sc as Gt,t as kt,u as Ot,ub as Ut}from"./chunk-RYEX2DR7.js";function ai(s){return new v(3e3,!1)}function un(){return new v(3100,!1)}function hn(){return new v(3101,!1)}function dn(s){return new v(3001,!1)}function mn(s){return new v(3003,!1)}function fn(s){return new v(3004,!1)}function ci(s,e){return new v(3005,!1)}function ui(){return new v(3006,!1)}function hi(){return new v(3007,!1)}function di(s,e){return new v(3008,!1)}function mi(s){return new v(3002,!1)}function fi(s,e,t,i,n){return new v(3010,!1)}function pi(){return new v(3011,!1)}function gi(){return new v(3012,!1)}function yi(){return new v(3200,!1)}function _i(){return new v(3202,!1)}function Si(){return new v(3013,!1)}function Ei(s){return new v(3014,!1)}function vi(s){return new v(3015,!1)}function Ti(s){return new v(3016,!1)}function Ai(s,e){return new v(3404,!1)}function pn(s){return new v(3502,!1)}function wi(s){return new v(3503,!1)}function bi(){return new v(3300,!1)}function Pi(s){return new v(3504,!1)}function Ni(s){return new v(3301,!1)}function Mi(s,e){return new v(3302,!1)}function Ci(s){return new v(3303,!1)}function Di(s,e){return new v(3400,!1)}function Ri(s){return new v(3401,!1)}function ki(s){return new v(3402,!1)}function Oi(s,e){return new v(3505,!1)}function U(s){switch(s.length){case 0:return new X;case 1:return s[0];default:return new ve(s)}}function et(s,e,t=new Map,i=new Map){let n=[],r=[],o=-1,a=null;if(e.forEach(l=>{let c=l.get("offset"),h=c==o,u=h&&a||new Map;l.forEach((_,y)=>{let m=y,g=_;if(y!=="offset")switch(m=s.normalizePropertyName(m,n),g){case ce:g=t.get(y);break;case K:g=i.get(y);break;default:g=s.normalizeStyleValue(y,m,g,n);break}u.set(m,g)}),h||r.push(u),a=u,o=c}),n.length)throw pn(n);return r}function we(s,e,t,i){switch(e){case"start":s.onStart(()=>i(t&&xe(t,"start",s)));break;case"done":s.onDone(()=>i(t&&xe(t,"done",s)));break;case"destroy":s.onDestroy(()=>i(t&&xe(t,"destroy",s)));break}}function xe(s,e,t){let i=t.totalTime,n=!!t.disabled,r=be(s.element,s.triggerName,s.fromState,s.toState,e||s.phaseName,i??s.totalTime,n),o=s._data;return o!=null&&(r._data=o),r}function be(s,e,t,i,n="",r=0,o){return{element:s,triggerName:e,fromState:t,toState:i,phaseName:n,totalTime:r,disabled:!!o}}function k(s,e,t){let i=s.get(e);return i||s.set(e,i=t),i}function tt(s){let e=s.indexOf(":"),t=s.substring(1,e),i=s.slice(e+1);return[t,i]}var gn=typeof document>"u"?null:document.documentElement;function Pe(s){let e=s.parentNode||s.host||null;return e===gn?null:e}function yn(s){return s.substring(1,6)=="ebkit"}var x=null,li=!1;function Ii(s){x||(x=_n()||{},li=x.style?"WebkitAppearance"in x.style:!1);let e=!0;return x.style&&!yn(s)&&(e=s in x.style,!e&&li&&(e="Webkit"+s.charAt(0).toUpperCase()+s.slice(1)in x.style)),e}function _n(){return typeof document<"u"?document.body:null}function it(s,e){for(;e;){if(e===s)return!0;e=Pe(e)}return!1}function nt(s,e,t){if(t)return Array.from(s.querySelectorAll(e));let i=s.querySelector(e);return i?[i]:[]}var Sn=1e3,st="{{",En="}}",rt="ng-enter",Ne="ng-leave",ue="ng-trigger",he=".ng-trigger",ot="ng-animating",Me=".ng-animating";function V(s){if(typeof s=="number")return s;let e=s.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:Ze(parseFloat(e[1]),e[2])}function Ze(s,e){return e==="s"?s*Sn:s}function de(s,e,t){return s.hasOwnProperty("duration")?s:Tn(s,e,t)}var vn=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;function Tn(s,e,t){let i,n=0,r="";if(typeof s=="string"){let o=s.match(vn);if(o===null)return e.push(ai(s)),{duration:0,delay:0,easing:""};i=Ze(parseFloat(o[1]),o[2]);let a=o[3];a!=null&&(n=Ze(parseFloat(a),o[4]));let l=o[5];l&&(r=l)}else i=s;if(!t){let o=!1,a=e.length;i<0&&(e.push(un()),o=!0),n<0&&(e.push(hn()),o=!0),o&&e.splice(a,0,ai(s))}return{duration:i,delay:n,easing:r}}function Fi(s){return s.length?s[0]instanceof Map?s:s.map(e=>new Map(Object.entries(e))):[]}function j(s,e,t){e.forEach((i,n)=>{let r=Ce(n);t&&!t.has(n)&&t.set(n,s.style[r]),s.style[r]=i})}function G(s,e){e.forEach((t,i)=>{let n=Ce(i);s.style[n]=""})}function re(s){return Array.isArray(s)?s.length==1?s[0]:Jt(s):s}function Li(s,e,t){let i=e.params||{},n=at(s);n.length&&n.forEach(r=>{i.hasOwnProperty(r)||t.push(dn(r))})}var Je=new RegExp(`${st}\\s*(.+?)\\s*${En}`,"g");function at(s){let e=[];if(typeof s=="string"){let t;for(;t=Je.exec(s);)e.push(t[1]);Je.lastIndex=0}return e}function oe(s,e,t){let i=`${s}`,n=i.replace(Je,(r,o)=>{let a=e[o];return a==null&&(t.push(mn(o)),a=""),a.toString()});return n==i?s:n}var An=/-+([a-z0-9])/g;function Ce(s){return s.replace(An,(...e)=>e[1].toUpperCase())}function zi(s,e){return s===0||e===0}function Ki(s,e,t){if(t.size&&e.length){let i=e[0],n=[];if(t.forEach((r,o)=>{i.has(o)||n.push(o),i.set(o,r)}),n.length)for(let r=1;r<e.length;r++){let o=e[r];n.forEach(a=>o.set(a,De(s,a)))}}return e}function O(s,e,t){switch(e.type){case S.Trigger:return s.visitTrigger(e,t);case S.State:return s.visitState(e,t);case S.Transition:return s.visitTransition(e,t);case S.Sequence:return s.visitSequence(e,t);case S.Group:return s.visitGroup(e,t);case S.Animate:return s.visitAnimate(e,t);case S.Keyframes:return s.visitKeyframes(e,t);case S.Style:return s.visitStyle(e,t);case S.Reference:return s.visitReference(e,t);case S.AnimateChild:return s.visitAnimateChild(e,t);case S.AnimateRef:return s.visitAnimateRef(e,t);case S.Query:return s.visitQuery(e,t);case S.Stagger:return s.visitStagger(e,t);default:throw fn(e.type)}}function De(s,e){return window.getComputedStyle(s)[e]}var wt=(()=>{class s{validateStyleProperty(t){return Ii(t)}containsElement(t,i){return it(t,i)}getParentElement(t){return Pe(t)}query(t,i,n){return nt(t,i,n)}computeStyle(t,i,n){return n||""}animate(t,i,n,r,o,a=[],l){return new X(n,r)}static \u0275fac=function(i){return new(i||s)};static \u0275prov=Se({token:s,factory:s.\u0275fac})}return s})(),J=class{static NOOP=new wt},ee=class{};var wn=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),Fe=class extends ee{normalizePropertyName(e,t){return Ce(e)}normalizeStyleValue(e,t,i,n){let r="",o=i.toString().trim();if(wn.has(t)&&i!==0&&i!=="0")if(typeof i=="number")r="px";else{let a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&n.push(ci(e,i))}return o+r}};var Le="*";function bn(s,e){let t=[];return typeof s=="string"?s.split(/\s*,\s*/).forEach(i=>Pn(i,t,e)):t.push(s),t}function Pn(s,e,t){if(s[0]==":"){let l=Nn(s,t);if(typeof l=="function"){e.push(l);return}s=l}let i=s.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(i==null||i.length<4)return t.push(vi(s)),e;let n=i[1],r=i[2],o=i[3];e.push(ji(n,o));let a=n==Le&&o==Le;r[0]=="<"&&!a&&e.push(ji(o,n))}function Nn(s,e){switch(s){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,i)=>parseFloat(i)>parseFloat(t);case":decrement":return(t,i)=>parseFloat(i)<parseFloat(t);default:return e.push(Ti(s)),"* => *"}}var Re=new Set(["true","1"]),ke=new Set(["false","0"]);function ji(s,e){let t=Re.has(s)||ke.has(s),i=Re.has(e)||ke.has(e);return(n,r)=>{let o=s==Le||s==n,a=e==Le||e==r;return!o&&t&&typeof n=="boolean"&&(o=n?Re.has(s):ke.has(s)),!a&&i&&typeof r=="boolean"&&(a=r?Re.has(e):ke.has(e)),o&&a}}var Xi=":self",Mn=new RegExp(`s*${Xi}s*,?`,"g");function xi(s,e,t,i){return new mt(s).build(e,t,i)}var Bi="",mt=class{_driver;constructor(e){this._driver=e}build(e,t,i){let n=new ft(t);return this._resetContextStyleTimingState(n),O(this,re(e),n)}_resetContextStyleTimingState(e){e.currentQuerySelector=Bi,e.collectedStyles=new Map,e.collectedStyles.set(Bi,new Map),e.currentTime=0}visitTrigger(e,t){let i=t.queryCount=0,n=t.depCount=0,r=[],o=[];return e.name.charAt(0)=="@"&&t.errors.push(ui()),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(t),a.type==S.State){let l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(h=>{l.name=h,r.push(this.visitState(l,t))}),l.name=c}else if(a.type==S.Transition){let l=this.visitTransition(a,t);i+=l.queryCount,n+=l.depCount,o.push(l)}else t.errors.push(hi())}),{type:S.Trigger,name:e.name,states:r,transitions:o,queryCount:i,depCount:n,options:null}}visitState(e,t){let i=this.visitStyle(e.styles,t),n=e.options&&e.options.params||null;if(i.containsDynamicStyles){let r=new Set,o=n||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{at(l).forEach(c=>{o.hasOwnProperty(c)||r.add(c)})})}),r.size&&t.errors.push(di(e.name,[...r.values()]))}return{type:S.State,name:e.name,style:i,options:n?{params:n}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;let i=O(this,re(e.animation),t),n=bn(e.expr,t.errors);return{type:S.Transition,matchers:n,animation:i,queryCount:t.queryCount,depCount:t.depCount,options:Z(e.options)}}visitSequence(e,t){return{type:S.Sequence,steps:e.steps.map(i=>O(this,i,t)),options:Z(e.options)}}visitGroup(e,t){let i=t.currentTime,n=0,r=e.steps.map(o=>{t.currentTime=i;let a=O(this,o,t);return n=Math.max(n,t.currentTime),a});return t.currentTime=n,{type:S.Group,steps:r,options:Z(e.options)}}visitAnimate(e,t){let i=kn(e.timings,t.errors);t.currentAnimateTimings=i;let n,r=e.styles?e.styles:Xe({});if(r.type==S.Keyframes)n=this.visitKeyframes(r,t);else{let o=e.styles,a=!1;if(!o){a=!0;let c={};i.easing&&(c.easing=i.easing),o=Xe(c)}t.currentTime+=i.duration+i.delay;let l=this.visitStyle(o,t);l.isEmptyStep=a,n=l}return t.currentAnimateTimings=null,{type:S.Animate,timings:i,style:n,options:null}}visitStyle(e,t){let i=this._makeStyleAst(e,t);return this._validateStyleAst(i,t),i}_makeStyleAst(e,t){let i=[],n=Array.isArray(e.styles)?e.styles:[e.styles];for(let a of n)typeof a=="string"?a===K?i.push(a):t.errors.push(mi(a)):i.push(new Map(Object.entries(a)));let r=!1,o=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(o=a.get("easing"),a.delete("easing")),!r)){for(let l of a.values())if(l.toString().indexOf(st)>=0){r=!0;break}}}),{type:S.Style,styles:i,easing:o,offset:e.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(e,t){let i=t.currentAnimateTimings,n=t.currentTime,r=t.currentTime;i&&r>0&&(r-=i.duration+i.delay),e.styles.forEach(o=>{typeof o!="string"&&o.forEach((a,l)=>{let c=t.collectedStyles.get(t.currentQuerySelector),h=c.get(l),u=!0;h&&(r!=n&&r>=h.startTime&&n<=h.endTime&&(t.errors.push(fi(l,h.startTime,h.endTime,r,n)),u=!1),r=h.startTime),u&&c.set(l,{startTime:r,endTime:n}),t.options&&Li(a,t.options,t.errors)})})}visitKeyframes(e,t){let i={type:S.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(pi()),i;let n=1,r=0,o=[],a=!1,l=!1,c=0,h=e.steps.map(w=>{let b=this._makeStyleAst(w,t),C=b.offset!=null?b.offset:Rn(b.styles),N=0;return C!=null&&(r++,N=b.offset=C),l=l||N<0||N>1,a=a||N<c,c=N,o.push(N),b});l&&t.errors.push(gi()),a&&t.errors.push(yi());let u=e.steps.length,_=0;r>0&&r<u?t.errors.push(_i()):r==0&&(_=n/(u-1));let y=u-1,m=t.currentTime,g=t.currentAnimateTimings,T=g.duration;return h.forEach((w,b)=>{let C=_>0?b==y?1:_*b:o[b],N=C*T;t.currentTime=m+g.delay+N,g.duration=N,this._validateStyleAst(w,t),w.offset=C,i.styles.push(w)}),i}visitReference(e,t){return{type:S.Reference,animation:O(this,re(e.animation),t),options:Z(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:S.AnimateChild,options:Z(e.options)}}visitAnimateRef(e,t){return{type:S.AnimateRef,animation:this.visitReference(e.animation,t),options:Z(e.options)}}visitQuery(e,t){let i=t.currentQuerySelector,n=e.options||{};t.queryCount++,t.currentQuery=e;let[r,o]=Cn(e.selector);t.currentQuerySelector=i.length?i+" "+r:r,k(t.collectedStyles,t.currentQuerySelector,new Map);let a=O(this,re(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=i,{type:S.Query,selector:r,limit:n.limit||0,optional:!!n.optional,includeSelf:o,animation:a,originalSelector:e.selector,options:Z(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(Si());let i=e.timings==="full"?{duration:0,delay:0,easing:"full"}:de(e.timings,t.errors,!0);return{type:S.Stagger,animation:O(this,re(e.animation),t),timings:i,options:null}}};function Cn(s){let e=!!s.split(/\s*,\s*/).find(t=>t==Xi);return e&&(s=s.replace(Mn,"")),s=s.replace(/@\*/g,he).replace(/@\w+/g,t=>he+"-"+t.slice(1)).replace(/:animating/g,Me),[s,e]}function Dn(s){return s?_e({},s):null}var ft=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(e){this.errors=e}};function Rn(s){if(typeof s=="string")return null;let e=null;if(Array.isArray(s))s.forEach(t=>{if(t instanceof Map&&t.has("offset")){let i=t;e=parseFloat(i.get("offset")),i.delete("offset")}});else if(s instanceof Map&&s.has("offset")){let t=s;e=parseFloat(t.get("offset")),t.delete("offset")}return e}function kn(s,e){if(s.hasOwnProperty("duration"))return s;if(typeof s=="number"){let r=de(s,e).duration;return lt(r,0,"")}let t=s;if(t.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=lt(0,0,"");return r.dynamic=!0,r.strValue=t,r}let n=de(t,e);return lt(n.duration,n.delay,n.easing)}function Z(s){return s?(s=_e({},s),s.params&&(s.params=Dn(s.params))):s={},s}function lt(s,e,t){return{duration:s,delay:e,easing:t}}function bt(s,e,t,i,n,r,o=null,a=!1){return{type:1,element:s,keyframes:e,preStyleProps:t,postStyleProps:i,duration:n,delay:r,totalTime:n+r,easing:o,subTimeline:a}}var fe=class{_map=new Map;get(e){return this._map.get(e)||[]}append(e,t){let i=this._map.get(e);i||this._map.set(e,i=[]),i.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}},On=1,In=":enter",Fn=new RegExp(In,"g"),Ln=":leave",zn=new RegExp(Ln,"g");function Zi(s,e,t,i,n,r=new Map,o=new Map,a,l,c=[]){return new pt().buildKeyframes(s,e,t,i,n,r,o,a,l,c)}var pt=class{buildKeyframes(e,t,i,n,r,o,a,l,c,h=[]){c=c||new fe;let u=new gt(e,t,c,n,r,h,[]);u.options=l;let _=l.delay?V(l.delay):0;u.currentTimeline.delayNextStep(_),u.currentTimeline.setStyles([o],null,u.errors,l),O(this,i,u);let y=u.timelines.filter(m=>m.containsAnimation());if(y.length&&a.size){let m;for(let g=y.length-1;g>=0;g--){let T=y[g];if(T.element===t){m=T;break}}m&&!m.allowOnlyTimelineStyles()&&m.setStyles([a],null,u.errors,l)}return y.length?y.map(m=>m.buildKeyframes()):[bt(t,[],[],[],0,_,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){let i=t.subInstructions.get(t.element);if(i){let n=t.createSubContext(e.options),r=t.currentTimeline.currentTime,o=this._visitSubInstructions(i,n,n.options);r!=o&&t.transformIntoNewTimeline(o)}t.previousNode=e}visitAnimateRef(e,t){let i=t.createSubContext(e.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,i),this.visitReference(e.animation,i),t.transformIntoNewTimeline(i.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,i){for(let n of e){let r=n?.delay;if(r){let o=typeof r=="number"?r:V(oe(r,n?.params??{},t.errors));i.delayNextStep(o)}}}_visitSubInstructions(e,t,i){let r=t.currentTimeline.currentTime,o=i.duration!=null?V(i.duration):null,a=i.delay!=null?V(i.delay):null;return o!==0&&e.forEach(l=>{let c=t.appendInstructionToTimeline(l,o,a);r=Math.max(r,c.duration+c.delay)}),r}visitReference(e,t){t.updateOptions(e.options,!0),O(this,e.animation,t),t.previousNode=e}visitSequence(e,t){let i=t.subContextCount,n=t,r=e.options;if(r&&(r.params||r.delay)&&(n=t.createSubContext(r),n.transformIntoNewTimeline(),r.delay!=null)){n.previousNode.type==S.Style&&(n.currentTimeline.snapshotCurrentStyles(),n.previousNode=ze);let o=V(r.delay);n.delayNextStep(o)}e.steps.length&&(e.steps.forEach(o=>O(this,o,n)),n.currentTimeline.applyStylesToKeyframe(),n.subContextCount>i&&n.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){let i=[],n=t.currentTimeline.currentTime,r=e.options&&e.options.delay?V(e.options.delay):0;e.steps.forEach(o=>{let a=t.createSubContext(e.options);r&&a.delayNextStep(r),O(this,o,a),n=Math.max(n,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(o=>t.currentTimeline.mergeTimelineCollectedStyles(o)),t.transformIntoNewTimeline(n),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){let i=e.strValue,n=t.params?oe(i,t.params,t.errors):i;return de(n,t.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){let i=t.currentAnimateTimings=this._visitTiming(e.timings,t),n=t.currentTimeline;i.delay&&(t.incrementTime(i.delay),n.snapshotCurrentStyles());let r=e.style;r.type==S.Keyframes?this.visitKeyframes(r,t):(t.incrementTime(i.duration),this.visitStyle(r,t),n.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){let i=t.currentTimeline,n=t.currentAnimateTimings;!n&&i.hasCurrentStyleProperties()&&i.forwardFrame();let r=n&&n.easing||e.easing;e.isEmptyStep?i.applyEmptyStep(r):i.setStyles(e.styles,r,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){let i=t.currentAnimateTimings,n=t.currentTimeline.duration,r=i.duration,a=t.createSubContext().currentTimeline;a.easing=i.easing,e.styles.forEach(l=>{let c=l.offset||0;a.forwardTime(c*r),a.setStyles(l.styles,l.easing,t.errors,t.options),a.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(a),t.transformIntoNewTimeline(n+r),t.previousNode=e}visitQuery(e,t){let i=t.currentTimeline.currentTime,n=e.options||{},r=n.delay?V(n.delay):0;r&&(t.previousNode.type===S.Style||i==0&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=ze);let o=i,a=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!n.optional,t.errors);t.currentQueryTotal=a.length;let l=null;a.forEach((c,h)=>{t.currentQueryIndex=h;let u=t.createSubContext(e.options,c);r&&u.delayNextStep(r),c===t.element&&(l=u.currentTimeline),O(this,e.animation,u),u.currentTimeline.applyStylesToKeyframe();let _=u.currentTimeline.currentTime;o=Math.max(o,_)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(o),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){let i=t.parentContext,n=t.currentTimeline,r=e.timings,o=Math.abs(r.duration),a=o*(t.currentQueryTotal-1),l=o*t.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime;break}let h=t.currentTimeline;l&&h.delayNextStep(l);let u=h.currentTime;O(this,e.animation,t),t.previousNode=e,i.currentStaggerTime=n.currentTime-u+(n.startTime-i.currentTimeline.startTime)}},ze={},gt=class s{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=ze;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(e,t,i,n,r,o,a,l){this._driver=e,this.element=t,this.subInstructions=i,this._enterClassName=n,this._leaveClassName=r,this.errors=o,this.timelines=a,this.currentTimeline=l||new Ke(this._driver,t,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;let i=e,n=this.options;i.duration!=null&&(n.duration=V(i.duration)),i.delay!=null&&(n.delay=V(i.delay));let r=i.params;if(r){let o=n.params;o||(o=this.options.params={}),Object.keys(r).forEach(a=>{(!t||!o.hasOwnProperty(a))&&(o[a]=oe(r[a],o,this.errors))})}}_copyOptions(){let e={};if(this.options){let t=this.options.params;if(t){let i=e.params={};Object.keys(t).forEach(n=>{i[n]=t[n]})}}return e}createSubContext(e=null,t,i){let n=t||this.element,r=new s(this._driver,n,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(n,i||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(e),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(e){return this.previousNode=ze,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,i){let n={duration:t??e.duration,delay:this.currentTimeline.currentTime+(i??0)+e.delay,easing:""},r=new yt(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,n,e.stretchStartingKeyframe);return this.timelines.push(r),n}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,i,n,r,o){let a=[];if(n&&a.push(this.element),e.length>0){e=e.replace(Fn,"."+this._enterClassName),e=e.replace(zn,"."+this._leaveClassName);let l=i!=1,c=this._driver.query(this.element,e,l);i!==0&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!r&&a.length==0&&o.push(Ei(t)),a}},Ke=class s{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(e,t,i,n){this._driver=e,this.element=t,this.startTime=i,this._elementTimelineStylesLookup=n,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let t=this._keyframes.size===1&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new s(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=On,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles.set(e,t),this._globalTimelineStyles.set(e,t),this._styleSummary.set(e,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[t,i]of this._globalTimelineStyles)this._backFill.set(t,i||K),this._currentKeyframe.set(t,K);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,i,n){t&&this._previousKeyframe.set("easing",t);let r=n&&n.params||{},o=Kn(e,this._globalTimelineStyles);for(let[a,l]of o){let c=oe(l,r,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??K),this._updateStyle(a,c)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,t)=>{this._currentKeyframe.set(t,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,e)}))}snapshotCurrentStyles(){for(let[e,t]of this._localTimelineStyles)this._pendingStyles.set(e,t),this._updateStyle(e,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((t,i)=>{let n=this._styleSummary.get(i);(!n||t.time>n.time)&&this._updateStyle(i,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,t=new Set,i=this._keyframes.size===1&&this.duration===0,n=[];this._keyframes.forEach((a,l)=>{let c=new Map([...this._backFill,...a]);c.forEach((h,u)=>{h===ce?e.add(u):h===K&&t.add(u)}),i||c.set("offset",l/this.duration),n.push(c)});let r=[...e.values()],o=[...t.values()];if(i){let a=n[0],l=new Map(a);a.set("offset",0),l.set("offset",1),n=[a,l]}return bt(this.element,n,r,o,this.duration,this.startTime,this.easing,!1)}},yt=class extends Ke{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(e,t,i,n,r,o,a=!1){super(e,t,o.delay),this.keyframes=i,this.preStyleProps=n,this.postStyleProps=r,this._stretchStartingKeyframe=a,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:i,easing:n}=this.timings;if(this._stretchStartingKeyframe&&t){let r=[],o=i+t,a=t/o,l=new Map(e[0]);l.set("offset",0),r.push(l);let c=new Map(e[0]);c.set("offset",qi(a)),r.push(c);let h=e.length-1;for(let u=1;u<=h;u++){let _=new Map(e[u]),y=_.get("offset"),m=t+y*i;_.set("offset",qi(m/o)),r.push(_)}i=o,t=0,n="",e=r}return bt(this.element,e,this.preStyleProps,this.postStyleProps,i,t,n,!0)}};function qi(s,e=3){let t=Math.pow(10,e-1);return Math.round(s*t)/t}function Kn(s,e){let t=new Map,i;return s.forEach(n=>{if(n==="*"){i??=e.keys();for(let r of i)t.set(r,K)}else for(let[r,o]of n)t.set(r,o)}),t}function Qi(s,e,t,i,n,r,o,a,l,c,h,u,_){return{type:0,element:s,triggerName:e,isRemovalTransition:n,fromState:t,fromStyles:r,toState:i,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:h,totalTime:u,errors:_}}var ct={},je=class{_triggerName;ast;_stateStyles;constructor(e,t,i){this._triggerName=e,this.ast=t,this._stateStyles=i}match(e,t,i,n){return jn(this.ast.matchers,e,t,i,n)}buildStyles(e,t,i){let n=this._stateStyles.get("*");return e!==void 0&&(n=this._stateStyles.get(e?.toString())||n),n?n.buildStyles(t,i):new Map}build(e,t,i,n,r,o,a,l,c,h){let u=[],_=this.ast.options&&this.ast.options.params||ct,y=a&&a.params||ct,m=this.buildStyles(i,y,u),g=l&&l.params||ct,T=this.buildStyles(n,g,u),w=new Set,b=new Map,C=new Map,N=n==="void",ie={params:Ji(g,_),delay:this.ast.options?.delay},q=h?[]:Zi(e,t,this.ast.animation,r,o,m,T,ie,c,u),D=0;return q.forEach(R=>{D=Math.max(R.duration+R.delay,D)}),u.length?Qi(t,this._triggerName,i,n,N,m,T,[],[],b,C,D,u):(q.forEach(R=>{let W=R.element,ne=k(b,W,new Set);R.preStyleProps.forEach(H=>ne.add(H));let Pt=k(C,W,new Set);R.postStyleProps.forEach(H=>Pt.add(H)),W!==t&&w.add(W)}),Qi(t,this._triggerName,i,n,N,m,T,q,[...w.values()],b,C,D))}};function jn(s,e,t,i,n){return s.some(r=>r(e,t,i,n))}function Ji(s,e){let t=_e({},e);return Object.entries(s).forEach(([i,n])=>{n!=null&&(t[i]=n)}),t}var _t=class{styles;defaultParams;normalizer;constructor(e,t,i){this.styles=e,this.defaultParams=t,this.normalizer=i}buildStyles(e,t){let i=new Map,n=Ji(e,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((o,a)=>{o&&(o=oe(o,n,t));let l=this.normalizer.normalizePropertyName(a,t);o=this.normalizer.normalizeStyleValue(a,l,o,t),i.set(a,o)})}),i}};function Bn(s,e,t){return new St(s,e,t)}var St=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(e,t,i){this.name=e,this.ast=t,this._normalizer=i,t.states.forEach(n=>{let r=n.options&&n.options.params||{};this.states.set(n.name,new _t(n.style,r,i))}),Vi(this.states,"true","1"),Vi(this.states,"false","0"),t.transitions.forEach(n=>{this.transitionFactories.push(new je(e,n,this.states))}),this.fallbackTransition=qn(e,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,i,n){return this.transitionFactories.find(o=>o.match(e,t,i,n))||null}matchStyles(e,t,i){return this.fallbackTransition.buildStyles(e,t,i)}};function qn(s,e,t){let i=[(o,a)=>!0],n={type:S.Sequence,steps:[],options:null},r={type:S.Transition,animation:n,matchers:i,options:null,queryCount:0,depCount:0};return new je(s,r,e)}function Vi(s,e,t){s.has(e)?s.has(t)||s.set(t,s.get(e)):s.has(t)&&s.set(e,s.get(t))}var Qn=new fe,Et=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(e,t,i){this.bodyNode=e,this._driver=t,this._normalizer=i}register(e,t){let i=[],n=[],r=xi(this._driver,t,i,n);if(i.length)throw wi(i);this._animations.set(e,r)}_buildPlayer(e,t,i){let n=e.element,r=et(this._normalizer,e.keyframes,t,i);return this._driver.animate(n,r,e.duration,e.delay,e.easing,[],!0)}create(e,t,i={}){let n=[],r=this._animations.get(e),o,a=new Map;if(r?(o=Zi(this._driver,t,r,rt,Ne,new Map,new Map,i,Qn,n),o.forEach(h=>{let u=k(a,h.element,new Map);h.postStyleProps.forEach(_=>u.set(_,null))})):(n.push(bi()),o=[]),n.length)throw Pi(n);a.forEach((h,u)=>{h.forEach((_,y)=>{h.set(y,this._driver.computeStyle(u,y,K))})});let l=o.map(h=>{let u=a.get(h.element);return this._buildPlayer(h,new Map,u)}),c=U(l);return this._playersById.set(e,c),c.onDestroy(()=>this.destroy(e)),this.players.push(c),c}destroy(e){let t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);let i=this.players.indexOf(t);i>=0&&this.players.splice(i,1)}_getPlayer(e){let t=this._playersById.get(e);if(!t)throw Ni(e);return t}listen(e,t,i,n){let r=be(t,"","","");return we(this._getPlayer(e),i,r,n),()=>{}}command(e,t,i,n){if(i=="register"){this.register(e,n[0]);return}if(i=="create"){let o=n[0]||{};this.create(e,t,o);return}let r=this._getPlayer(e);switch(i){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(n[0]));break;case"destroy":this.destroy(e);break}}},Ui="ng-animate-queued",Vn=".ng-animate-queued",ut="ng-animate-disabled",Un=".ng-animate-disabled",$n="ng-star-inserted",Gn=".ng-star-inserted",Wn=[],en={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Hn={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},B="__ng_removed",pe=class{namespaceId;value;options;get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;let i=e&&e.hasOwnProperty("value"),n=i?e.value:e;if(this.value=Xn(n),i){let r=e,{value:o}=r,a=Dt(r,["value"]);this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let t=e.params;if(t){let i=this.options.params;Object.keys(t).forEach(n=>{i[n]==null&&(i[n]=t[n])})}}},me="void",ht=new pe(me),vt=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(e,t,i){this.id=e,this.hostElement=t,this._engine=i,this._hostClassName="ng-tns-"+e,L(t,this._hostClassName)}listen(e,t,i,n){if(!this._triggers.has(t))throw Mi(i,t);if(i==null||i.length==0)throw Ci(t);if(!xn(i))throw Di(i,t);let r=k(this._elementListeners,e,[]),o={name:t,phase:i,callback:n};r.push(o);let a=k(this._engine.statesByElement,e,new Map);return a.has(t)||(L(e,ue),L(e,ue+"-"+t),a.set(t,ht)),()=>{this._engine.afterFlush(()=>{let l=r.indexOf(o);l>=0&&r.splice(l,1),this._triggers.has(t)||a.delete(t)})}}register(e,t){return this._triggers.has(e)?!1:(this._triggers.set(e,t),!0)}_getTrigger(e){let t=this._triggers.get(e);if(!t)throw Ri(e);return t}trigger(e,t,i,n=!0){let r=this._getTrigger(t),o=new ge(this.id,t,e),a=this._engine.statesByElement.get(e);a||(L(e,ue),L(e,ue+"-"+t),this._engine.statesByElement.set(e,a=new Map));let l=a.get(t),c=new pe(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(t,c),l||(l=ht),!(c.value===me)&&l.value===c.value){if(!es(l.params,c.params)){let g=[],T=r.matchStyles(l.value,l.params,g),w=r.matchStyles(c.value,c.params,g);g.length?this._engine.reportError(g):this._engine.afterFlush(()=>{G(e,T),j(e,w)})}return}let _=k(this._engine.playersByElement,e,[]);_.forEach(g=>{g.namespaceId==this.id&&g.triggerName==t&&g.queued&&g.destroy()});let y=r.matchTransition(l.value,c.value,e,c.params),m=!1;if(!y){if(!n)return;y=r.fallbackTransition,m=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:y,fromState:l,toState:c,player:o,isFallbackTransition:m}),m||(L(e,Ui),o.onStart(()=>{ae(e,Ui)})),o.onDone(()=>{let g=this.players.indexOf(o);g>=0&&this.players.splice(g,1);let T=this._engine.playersByElement.get(e);if(T){let w=T.indexOf(o);w>=0&&T.splice(w,1)}}),this.players.push(o),_.push(o),o}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(t=>t.delete(e)),this._elementListeners.forEach((t,i)=>{this._elementListeners.set(i,t.filter(n=>n.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let t=this._engine.playersByElement.get(e);t&&(t.forEach(i=>i.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){let i=this._engine.driver.query(e,he,!0);i.forEach(n=>{if(n[B])return;let r=this._engine.fetchNamespacesByElement(n);r.size?r.forEach(o=>o.triggerLeaveAnimation(n,t,!1,!0)):this.clearElementCache(n)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(n=>this.clearElementCache(n)))}triggerLeaveAnimation(e,t,i,n){let r=this._engine.statesByElement.get(e),o=new Map;if(r){let a=[];if(r.forEach((l,c)=>{if(o.set(c,l.value),this._triggers.has(c)){let h=this.trigger(e,c,me,n);h&&a.push(h)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,o),i&&U(a).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let t=this._elementListeners.get(e),i=this._engine.statesByElement.get(e);if(t&&i){let n=new Set;t.forEach(r=>{let o=r.name;if(n.has(o))return;n.add(o);let l=this._triggers.get(o).fallbackTransition,c=i.get(o)||ht,h=new pe(me),u=new ge(this.id,o,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:o,transition:l,fromState:c,toState:h,player:u,isFallbackTransition:!0})})}}removeNode(e,t){let i=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let n=!1;if(i.totalAnimations){let r=i.players.length?i.playersByQueriedElement.get(e):[];if(r&&r.length)n=!0;else{let o=e;for(;o=o.parentNode;)if(i.statesByElement.get(o)){n=!0;break}}}if(this.prepareLeaveAnimationListeners(e),n)i.markElementAsRemoved(this.id,e,!1,t);else{let r=e[B];(!r||r===en)&&(i.afterFlush(()=>this.clearElementCache(e)),i.destroyInnerAnimations(e),i._onRemovalComplete(e,t))}}insertNode(e,t){L(e,this._hostClassName)}drainQueuedTransitions(e){let t=[];return this._queue.forEach(i=>{let n=i.player;if(n.destroyed)return;let r=i.element,o=this._elementListeners.get(r);o&&o.forEach(a=>{if(a.name==i.triggerName){let l=be(r,i.triggerName,i.fromState.value,i.toState.value);l._data=e,we(i.player,a.phase,l,a.callback)}}),n.markedForDestroy?this._engine.afterFlush(()=>{n.destroy()}):t.push(i)}),this._queue=[],t.sort((i,n)=>{let r=i.transition.ast.depCount,o=n.transition.ast.depCount;return r==0||o==0?r-o:this._engine.driver.containsElement(i.element,n.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},Tt=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(e,t)=>{};_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,i){this.bodyNode=e,this.driver=t,this._normalizer=i}get queuedPlayers(){let e=[];return this._namespaceList.forEach(t=>{t.players.forEach(i=>{i.queued&&e.push(i)})}),e}createNamespace(e,t){let i=new vt(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(i,t):(this.newHostElements.set(t,i),this.collectEnterElement(t)),this._namespaceLookup[e]=i}_balanceNamespaceList(e,t){let i=this._namespaceList,n=this.namespacesByHostElement;if(i.length-1>=0){let o=!1,a=this.driver.getParentElement(t);for(;a;){let l=n.get(a);if(l){let c=i.indexOf(l);i.splice(c+1,0,e),o=!0;break}a=this.driver.getParentElement(a)}o||i.unshift(e)}else i.push(e);return n.set(t,e),e}register(e,t){let i=this._namespaceLookup[e];return i||(i=this.createNamespace(e,t)),i}registerTrigger(e,t,i){let n=this._namespaceLookup[e];n&&n.register(t,i)&&this.totalAnimations++}destroy(e,t){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let i=this._fetchNamespace(e);this.namespacesByHostElement.delete(i.hostElement);let n=this._namespaceList.indexOf(i);n>=0&&this._namespaceList.splice(n,1),i.destroy(t),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let t=new Set,i=this.statesByElement.get(e);if(i){for(let n of i.values())if(n.namespaceId){let r=this._fetchNamespace(n.namespaceId);r&&t.add(r)}}return t}trigger(e,t,i,n){if(Oe(t)){let r=this._fetchNamespace(e);if(r)return r.trigger(t,i,n),!0}return!1}insertNode(e,t,i,n){if(!Oe(t))return;let r=t[B];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let o=this.collectedLeaveElements.indexOf(t);o>=0&&this.collectedLeaveElements.splice(o,1)}if(e){let o=this._fetchNamespace(e);o&&o.insertNode(t,i)}n&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),L(e,ut)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),ae(e,ut))}removeNode(e,t,i){if(Oe(t)){let n=e?this._fetchNamespace(e):null;n?n.removeNode(t,i):this.markElementAsRemoved(e,t,!1,i);let r=this.namespacesByHostElement.get(t);r&&r.id!==e&&r.removeNode(t,i)}else this._onRemovalComplete(t,i)}markElementAsRemoved(e,t,i,n,r){this.collectedLeaveElements.push(t),t[B]={namespaceId:e,setForRemoval:n,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:r}}listen(e,t,i,n,r){return Oe(t)?this._fetchNamespace(e).listen(t,i,n,r):()=>{}}_buildInstruction(e,t,i,n,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,i,n,e.fromState.options,e.toState.options,t,r)}destroyInnerAnimations(e){let t=this.driver.query(e,he,!0);t.forEach(i=>this.destroyActiveAnimationsForElement(i)),this.playersByQueriedElement.size!=0&&(t=this.driver.query(e,Me,!0),t.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(e){let t=this.playersByElement.get(e);t&&t.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(e){let t=this.playersByQueriedElement.get(e);t&&t.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return U(this.players).onDone(()=>e());e()})}processLeaveNode(e){let t=e[B];if(t&&t.setForRemoval){if(e[B]=en,t.namespaceId){this.destroyInnerAnimations(e);let i=this._fetchNamespace(t.namespaceId);i&&i.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains(ut)&&this.markElementAsDisabled(e,!1),this.driver.query(e,Un,!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,n)=>this._balanceNamespaceList(i,n)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;i<this.collectedEnterElements.length;i++){let n=this.collectedEnterElements[i];L(n,$n)}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let i=[];try{t=this._flushAnimations(i,e)}finally{for(let n=0;n<i.length;n++)i[n]()}}else for(let i=0;i<this.collectedLeaveElements.length;i++){let n=this.collectedLeaveElements[i];this.processLeaveNode(n)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(i=>i()),this._flushFns=[],this._whenQuietFns.length){let i=this._whenQuietFns;this._whenQuietFns=[],t.length?U(t).onDone(()=>{i.forEach(n=>n())}):i.forEach(n=>n())}}reportError(e){throw ki(e)}_flushAnimations(e,t){let i=new fe,n=[],r=new Map,o=[],a=new Map,l=new Map,c=new Map,h=new Set;this.disabledNodes.forEach(d=>{h.add(d);let f=this.driver.query(d,Vn,!0);for(let p=0;p<f.length;p++)h.add(f[p])});let u=this.bodyNode,_=Array.from(this.statesByElement.keys()),y=Wi(_,this.collectedEnterElements),m=new Map,g=0;y.forEach((d,f)=>{let p=rt+g++;m.set(f,p),d.forEach(E=>L(E,p))});let T=[],w=new Set,b=new Set;for(let d=0;d<this.collectedLeaveElements.length;d++){let f=this.collectedLeaveElements[d],p=f[B];p&&p.setForRemoval&&(T.push(f),w.add(f),p.hasAnimation?this.driver.query(f,Gn,!0).forEach(E=>w.add(E)):b.add(f))}let C=new Map,N=Wi(_,Array.from(w));N.forEach((d,f)=>{let p=Ne+g++;C.set(f,p),d.forEach(E=>L(E,p))}),e.push(()=>{y.forEach((d,f)=>{let p=m.get(f);d.forEach(E=>ae(E,p))}),N.forEach((d,f)=>{let p=C.get(f);d.forEach(E=>ae(E,p))}),T.forEach(d=>{this.processLeaveNode(d)})});let ie=[],q=[];for(let d=this._namespaceList.length-1;d>=0;d--)this._namespaceList[d].drainQueuedTransitions(t).forEach(p=>{let E=p.player,P=p.element;if(ie.push(E),this.collectedEnterElements.length){let M=P[B];if(M&&M.setForMove){if(M.previousTriggersValues&&M.previousTriggersValues.has(p.triggerName)){let Y=M.previousTriggersValues.get(p.triggerName),F=this.statesByElement.get(p.element);if(F&&F.has(p.triggerName)){let ye=F.get(p.triggerName);ye.value=Y,F.set(p.triggerName,ye)}}E.destroy();return}}let Q=!u||!this.driver.containsElement(u,P),I=C.get(P),$=m.get(P),A=this._buildInstruction(p,i,$,I,Q);if(A.errors&&A.errors.length){q.push(A);return}if(Q){E.onStart(()=>G(P,A.fromStyles)),E.onDestroy(()=>j(P,A.toStyles)),n.push(E);return}if(p.isFallbackTransition){E.onStart(()=>G(P,A.fromStyles)),E.onDestroy(()=>j(P,A.toStyles)),n.push(E);return}let Ct=[];A.timelines.forEach(M=>{M.stretchStartingKeyframe=!0,this.disabledNodes.has(M.element)||Ct.push(M)}),A.timelines=Ct,i.append(P,A.timelines);let cn={instruction:A,player:E,element:P};o.push(cn),A.queriedElements.forEach(M=>k(a,M,[]).push(E)),A.preStyleProps.forEach((M,Y)=>{if(M.size){let F=l.get(Y);F||l.set(Y,F=new Set),M.forEach((ye,Ge)=>F.add(Ge))}}),A.postStyleProps.forEach((M,Y)=>{let F=c.get(Y);F||c.set(Y,F=new Set),M.forEach((ye,Ge)=>F.add(Ge))})});if(q.length){let d=[];q.forEach(f=>{d.push(Oi(f.triggerName,f.errors))}),ie.forEach(f=>f.destroy()),this.reportError(d)}let D=new Map,R=new Map;o.forEach(d=>{let f=d.element;i.has(f)&&(R.set(f,f),this._beforeAnimationBuild(d.player.namespaceId,d.instruction,D))}),n.forEach(d=>{let f=d.element;this._getPreviousPlayers(f,!1,d.namespaceId,d.triggerName,null).forEach(E=>{k(D,f,[]).push(E),E.destroy()})});let W=T.filter(d=>Hi(d,l,c)),ne=new Map;Gi(ne,this.driver,b,c,K).forEach(d=>{Hi(d,l,c)&&W.push(d)});let H=new Map;y.forEach((d,f)=>{Gi(H,this.driver,new Set(d),l,ce)}),W.forEach(d=>{let f=ne.get(d),p=H.get(d);ne.set(d,new Map([...f?.entries()??[],...p?.entries()??[]]))});let $e=[],Nt=[],Mt={};o.forEach(d=>{let{element:f,player:p,instruction:E}=d;if(i.has(f)){if(h.has(f)){p.onDestroy(()=>j(f,E.toStyles)),p.disabled=!0,p.overrideTotalTime(E.totalTime),n.push(p);return}let P=Mt;if(R.size>1){let I=f,$=[];for(;I=I.parentNode;){let A=R.get(I);if(A){P=A;break}$.push(I)}$.forEach(A=>R.set(A,P))}let Q=this._buildAnimation(p.namespaceId,E,D,r,H,ne);if(p.setRealPlayer(Q),P===Mt)$e.push(p);else{let I=this.playersByElement.get(P);I&&I.length&&(p.parentPlayer=U(I)),n.push(p)}}else G(f,E.fromStyles),p.onDestroy(()=>j(f,E.toStyles)),Nt.push(p),h.has(f)&&n.push(p)}),Nt.forEach(d=>{let f=r.get(d.element);if(f&&f.length){let p=U(f);d.setRealPlayer(p)}}),n.forEach(d=>{d.parentPlayer?d.syncPlayerEvents(d.parentPlayer):d.destroy()});for(let d=0;d<T.length;d++){let f=T[d],p=f[B];if(ae(f,Ne),p&&p.hasAnimation)continue;let E=[];if(a.size){let Q=a.get(f);Q&&Q.length&&E.push(...Q);let I=this.driver.query(f,Me,!0);for(let $=0;$<I.length;$++){let A=a.get(I[$]);A&&A.length&&E.push(...A)}}let P=E.filter(Q=>!Q.destroyed);P.length?Zn(this,f,P):this.processLeaveNode(f)}return T.length=0,$e.forEach(d=>{this.players.push(d),d.onDone(()=>{d.destroy();let f=this.players.indexOf(d);this.players.splice(f,1)}),d.play()}),$e}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,i,n,r){let o=[];if(t){let a=this.playersByQueriedElement.get(e);a&&(o=a)}else{let a=this.playersByElement.get(e);if(a){let l=!r||r==me;a.forEach(c=>{c.queued||!l&&c.triggerName!=n||o.push(c)})}}return(i||n)&&(o=o.filter(a=>!(i&&i!=a.namespaceId||n&&n!=a.triggerName))),o}_beforeAnimationBuild(e,t,i){let n=t.triggerName,r=t.element,o=t.isRemovalTransition?void 0:e,a=t.isRemovalTransition?void 0:n;for(let l of t.timelines){let c=l.element,h=c!==r,u=k(i,c,[]);this._getPreviousPlayers(c,h,o,a,t.toState).forEach(y=>{let m=y.getRealPlayer();m.beforeDestroy&&m.beforeDestroy(),y.destroy(),u.push(y)})}G(r,t.fromStyles)}_buildAnimation(e,t,i,n,r,o){let a=t.triggerName,l=t.element,c=[],h=new Set,u=new Set,_=t.timelines.map(m=>{let g=m.element;h.add(g);let T=g[B];if(T&&T.removedBeforeQueried)return new X(m.duration,m.delay);let w=g!==l,b=Jn((i.get(g)||Wn).map(D=>D.getRealPlayer())).filter(D=>{let R=D;return R.element?R.element===g:!1}),C=r.get(g),N=o.get(g),ie=et(this._normalizer,m.keyframes,C,N),q=this._buildPlayer(m,ie,b);if(m.subTimeline&&n&&u.add(g),w){let D=new ge(e,a,g);D.setRealPlayer(q),c.push(D)}return q});c.forEach(m=>{k(this.playersByQueriedElement,m.element,[]).push(m),m.onDone(()=>Yn(this.playersByQueriedElement,m.element,m))}),h.forEach(m=>L(m,ot));let y=U(_);return y.onDestroy(()=>{h.forEach(m=>ae(m,ot)),j(l,t.toStyles)}),u.forEach(m=>{k(n,m,[]).push(y)}),y}_buildPlayer(e,t,i){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,i):new X(e.duration,e.delay)}},ge=class{namespaceId;triggerName;element;_player=new X;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(e,t,i){this.namespaceId=e,this.triggerName=t,this.element=i}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,i)=>{t.forEach(n=>we(e,i,void 0,n))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){k(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let t=this._player;t.triggerCallback&&t.triggerCallback(e)}};function Yn(s,e,t){let i=s.get(e);if(i){if(i.length){let n=i.indexOf(t);i.splice(n,1)}i.length==0&&s.delete(e)}return i}function Xn(s){return s??null}function Oe(s){return s&&s.nodeType===1}function xn(s){return s=="start"||s=="done"}function $i(s,e){let t=s.style.display;return s.style.display=e??"none",t}function Gi(s,e,t,i,n){let r=[];t.forEach(l=>r.push($i(l)));let o=[];i.forEach((l,c)=>{let h=new Map;l.forEach(u=>{let _=e.computeStyle(c,u,n);h.set(u,_),(!_||_.length==0)&&(c[B]=Hn,o.push(c))}),s.set(c,h)});let a=0;return t.forEach(l=>$i(l,r[a++])),o}function Wi(s,e){let t=new Map;if(s.forEach(a=>t.set(a,[])),e.length==0)return t;let i=1,n=new Set(e),r=new Map;function o(a){if(!a)return i;let l=r.get(a);if(l)return l;let c=a.parentNode;return t.has(c)?l=c:n.has(c)?l=i:l=o(c),r.set(a,l),l}return e.forEach(a=>{let l=o(a);l!==i&&t.get(l).push(a)}),t}function L(s,e){s.classList?.add(e)}function ae(s,e){s.classList?.remove(e)}function Zn(s,e,t){U(t).onDone(()=>s.processLeaveNode(e))}function Jn(s){let e=[];return tn(s,e),e}function tn(s,e){for(let t=0;t<s.length;t++){let i=s[t];i instanceof ve?tn(i.players,e):e.push(i)}}function es(s,e){let t=Object.keys(s),i=Object.keys(e);if(t.length!=i.length)return!1;for(let n=0;n<t.length;n++){let r=t[n];if(!e.hasOwnProperty(r)||s[r]!==e[r])return!1}return!0}function Hi(s,e,t){let i=t.get(s);if(!i)return!1;let n=e.get(s);return n?i.forEach(r=>n.add(r)):e.set(s,i),t.delete(s),!0}var le=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(e,t)=>{};constructor(e,t,i){this._driver=t,this._normalizer=i,this._transitionEngine=new Tt(e.body,t,i),this._timelineEngine=new Et(e.body,t,i),this._transitionEngine.onRemovalComplete=(n,r)=>this.onRemovalComplete(n,r)}registerTrigger(e,t,i,n,r){let o=e+"-"+n,a=this._triggerCache[o];if(!a){let l=[],c=[],h=xi(this._driver,r,l,c);if(l.length)throw Ai(n,l);a=Bn(n,h,this._normalizer),this._triggerCache[o]=a}this._transitionEngine.registerTrigger(t,n,a)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,i,n){this._transitionEngine.insertNode(e,t,i,n)}onRemove(e,t,i){this._transitionEngine.removeNode(e,t,i)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,i,n){if(i.charAt(0)=="@"){let[r,o]=tt(i),a=n;this._timelineEngine.command(r,t,o,a)}else this._transitionEngine.trigger(e,t,i,n)}listen(e,t,i,n,r){if(i.charAt(0)=="@"){let[o,a]=tt(i);return this._timelineEngine.listen(o,t,a,r)}return this._transitionEngine.listen(e,t,i,n,r)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}};function ts(s,e){let t=null,i=null;return Array.isArray(e)&&e.length?(t=dt(e[0]),e.length>1&&(i=dt(e[e.length-1]))):e instanceof Map&&(t=dt(e)),t||i?new is(s,t,i):null}var is=(()=>{class s{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(t,i,n){this._element=t,this._startStyles=i,this._endStyles=n;let r=s.initialStylesByElement.get(t);r||s.initialStylesByElement.set(t,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&j(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(j(this._element,this._initialStyles),this._endStyles&&(j(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(s.initialStylesByElement.delete(this._element),this._startStyles&&(G(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(G(this._element,this._endStyles),this._endStyles=null),j(this._element,this._initialStyles),this._state=3)}}return s})();function dt(s){let e=null;return s.forEach((t,i)=>{ns(i)&&(e=e||new Map,e.set(i,t))}),e}function ns(s){return s==="display"||s==="position"}var Be=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer=null;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(e,t,i,n){this.element=e,this.keyframes=t,this.options=i,this._specialStyles=n,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer()&&this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return this.domPlayer;this._initialized=!0;let e=this.keyframes,t=this._triggerWebAnimation(this.element,e,this.options);if(!t)return this._onFinish(),null;this.domPlayer=t,this._finalKeyframe=e.length?e[e.length-1]:new Map;let i=()=>this._onFinish();return t.addEventListener("finish",i),this.onDestroy(()=>{t.removeEventListener("finish",i)}),t}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer?.pause()}_convertKeyframesToObject(e){let t=[];return e.forEach(i=>{t.push(Object.fromEntries(i))}),t}_triggerWebAnimation(e,t,i){let n=this._convertKeyframesToObject(t);try{return e.animate(n,i)}catch(r){return null}}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){let e=this._buildPlayer();e&&(this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),e.play())}pause(){this.init(),this.domPlayer?.pause()}finish(){this.init(),this.domPlayer&&(this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish())}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer?.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer||this.init(),this.domPlayer&&(this.domPlayer.currentTime=e*this.time)}getPosition(){return this.domPlayer?+(this.domPlayer.currentTime??0)/this.time:this._initialized?1:0}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,n)=>{n!=="offset"&&e.set(n,this._finished?i:De(this.element,n))}),this.currentSnapshot=e}triggerCallback(e){let t=e==="start"?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}},qe=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,t){return it(e,t)}getParentElement(e){return Pe(e)}query(e,t,i){return nt(e,t,i)}computeStyle(e,t,i){return De(e,t)}animate(e,t,i,n,r,o=[]){let a=n==0?"both":"forwards",l={duration:i,delay:n,fill:a};r&&(l.easing=r);let c=new Map,h=o.filter(y=>y instanceof Be);zi(i,n)&&h.forEach(y=>{y.currentSnapshot.forEach((m,g)=>c.set(g,m))});let u=Fi(t).map(y=>new Map(y));u=Ki(e,u,c);let _=ts(e,u);return new Be(e,u,l,_)}};var Ie="@",nn="@.disabled",Qe=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(e,t,i,n){this.namespaceId=e,this.delegate=t,this.engine=i,this._onDestroy=n}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,i,n=!0){this.delegate.insertBefore(e,t,i),this.engine.onInsert(this.namespaceId,t,e,n)}removeChild(e,t,i,n){if(n){this.delegate.removeChild(e,t,i,n);return}this.parentNode(t)&&this.engine.onRemove(this.namespaceId,t,this.delegate)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,i,n){this.delegate.setAttribute(e,t,i,n)}removeAttribute(e,t,i){this.delegate.removeAttribute(e,t,i)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,i,n){this.delegate.setStyle(e,t,i,n)}removeStyle(e,t,i){this.delegate.removeStyle(e,t,i)}setProperty(e,t,i){t.charAt(0)==Ie&&t==nn?this.disableAnimations(e,!!i):this.delegate.setProperty(e,t,i)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,i,n){return this.delegate.listen(e,t,i,n)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}},At=class extends Qe{factory;constructor(e,t,i,n,r){super(t,i,n,r),this.factory=e,this.namespaceId=t}setProperty(e,t,i){t.charAt(0)==Ie?t.charAt(1)=="."&&t==nn?(i=i===void 0?!0:!!i,this.disableAnimations(e,i)):this.engine.process(this.namespaceId,e,t.slice(1),i):this.delegate.setProperty(e,t,i)}listen(e,t,i,n){if(t.charAt(0)==Ie){let r=ss(e),o=t.slice(1),a="";return o.charAt(0)!=Ie&&([o,a]=rs(o)),this.engine.listen(this.namespaceId,r,o,a,l=>{let c=l._data||-1;this.factory.scheduleListenerCallback(c,i,l)})}return this.delegate.listen(e,t,i,n)}};function ss(s){switch(s){case"body":return document.body;case"document":return document;case"window":return window;default:return s}}function rs(s){let e=s.indexOf("."),t=s.substring(0,e),i=s.slice(e+1);return[t,i]}var Ve=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(e,t,i){this.delegate=e,this.engine=t,this._zone=i,t.onRemovalComplete=(n,r)=>{r?.removeChild(null,n)}}createRenderer(e,t){let n=this.delegate.createRenderer(e,t);if(!e||!t?.data?.animation){let c=this._rendererCache,h=c.get(n);if(!h){let u=()=>c.delete(n);h=new Qe("",n,this.engine,u),c.set(n,h)}return h}let r=t.id,o=t.id+"-"+this._currentId;this._currentId++,this.engine.register(o,e);let a=c=>{Array.isArray(c)?c.forEach(a):this.engine.registerTrigger(r,o,e,c.name,c)};return t.data.animation.forEach(a),new At(this,o,n,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,t,i){if(e>=0&&e<this._microtaskId){this._zone.run(()=>t(i));return}let n=this._animationCallbacksBuffer;n.length==0&&queueMicrotask(()=>{this._zone.run(()=>{n.forEach(r=>{let[o,a]=r;o(a)}),this._animationCallbacksBuffer=[]})}),n.push([t,i])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}componentReplaced(e){this.engine.flush(),this.delegate.componentReplaced?.(e)}};var as=(()=>{class s extends le{constructor(t,i,n){super(t,i,n)}ngOnDestroy(){this.flush()}static \u0275fac=function(i){return new(i||s)(Ee(Kt),Ee(J),Ee(ee))};static \u0275prov=Se({token:s,factory:s.\u0275fac})}return s})();function ls(){return new Fe}function cs(){return new Ve(z(Wt),z(le),z(jt))}var sn=[{provide:ee,useFactory:ls},{provide:le,useClass:as},{provide:Qt,useFactory:cs}],Os=[{provide:J,useClass:wt},{provide:He,useValue:"NoopAnimations"},...sn],us=[{provide:J,useFactory:()=>new qe},{provide:He,useFactory:()=>"BrowserAnimations"},...sn];function rn(){return qt("NgEagerAnimations"),[...us]}var te=s=>se(null,null,function*(){let e=z(Te),t=s.params.projectName;return t?e.getSelectedProjectId()===t?!0:(e.selectProject(t),(yield Rt(e.selectedProject$.pipe(Lt(n=>n?.name===t))))?.name===t):(console.log("[PROJECT GUARD] no project id in route"),!1)});var on=s=>se(null,null,function*(){let e=z(si),t=z(ri),i=s.params.threadId;if(!t.getUsername())try{yield We(t.fetchCurrentUser())}catch(n){console.error("[THREAD GUARD] Failed to load current user:",n)}if(!i)return console.log("[THREAD GUARD] no threadId in route"),!1;if(console.log("[THREAD GUARD] Checking thread:",i),console.log("[THREAD GUARD] Current selected thread:",e.getSelectedThreadId()),e.getSelectedThreadId()===i)return console.log("[THREAD GUARD] Thread already selected, allowing navigation"),!0;console.log("[THREAD GUARD] Selecting thread:",i),e.selectThread(i);try{let n=yield We(Ot([e.isLoading$,e.selectedThread$]).pipe(zt(([o,a])=>console.log(`\u{1F43C} [${o?"loading":"loaded"}]`,a?.id)),It(([o,a])=>!o&&!!a),Ft(1),kt(([o,a])=>a?.id))),r=n===i;return r?console.log("[THREAD GUARD] Thread validated, allowing navigation"):console.error("[THREAD GUARD] Thread ID mismatch - route:",i,"loaded:",n),r}catch(n){return console.error("[THREAD GUARD] Error loading thread:",n),!1}});var an=[{path:"",loadComponent:()=>import("./chunk-IZMOVLXM.js").then(s=>s.GlobalTaskControlComponent)},{path:"projects",loadComponent:()=>import("./chunk-ZH3XQHLJ.js").then(s=>s.ProjectListComponent)},{path:"oauth/callback",loadComponent:()=>import("./chunk-OQBPCHYW.js").then(s=>s.OAuthCallbackComponent)},{path:"project/new",loadComponent:()=>import("./chunk-5ZZOXT2B.js").then(s=>s.ProjectNewComponent)},{path:"project/:projectName",loadComponent:()=>import("./chunk-OCT6NWLB.js").then(s=>s.MainAppComponent),canActivate:[te]},{path:"project/:projectName/prompts",loadComponent:()=>import("./chunk-MQIE2KBB.js").then(s=>s.PromptListComponent),canActivate:[te]},{path:"project/:projectName/schedulers",loadComponent:()=>import("./chunk-XIWUSJ3U.js").then(s=>s.SchedulerListComponent),canActivate:[te]},{path:"project/:projectName/agents",loadComponent:()=>import("./chunk-IWORAUIR.js").then(s=>s.AgentListComponent),canActivate:[te]},{path:"project/:projectName/tasks",loadComponent:()=>import("./chunk-7UX5UET4.js").then(s=>s.TaskControlComponent),canActivate:[te]},{path:"project/:projectName/missions",redirectTo:"project/:projectName/tasks"},{path:"project/:projectName/thread/:threadId",loadComponent:()=>import("./chunk-OCT6NWLB.js").then(s=>s.MainAppComponent),canActivate:[te,on]},{path:"token-usage",loadComponent:()=>import("./chunk-PN75DG7I.js").then(s=>s.TokenUsageComponent)},{path:"agentos",loadChildren:()=>se(null,null,function*(){let{AGENTOS_ROUTES:s,THEME_PORT:e}=yield import("./chunk-DX7KUYUN.js");return[{path:"",providers:[{provide:e,useFactory:t=>({theme:ni(t.currentTheme$,{initialValue:t.getCurrentTheme()}),setTheme:i=>t.setTheme(i)}),deps:[Ae]}],children:s}]})},{path:"**",redirectTo:""}];function hs(s){return()=>s.initializeDefaultProject()}function ds(s){return()=>{console.log("[APP_INIT] OAuthService initialized")}}var ln={providers:[Bt(),$t({eventCoalescing:!0}),xt(an),Yt(),rn(),{provide:ti,useValue:{duration:3e3}},{provide:Ye,useFactory:hs,deps:[Te],multi:!0},{provide:Ye,useFactory:ds,deps:[oi],multi:!0},ii({basePath:"/api/agentos"}),{provide:ei,useValue:{width:"80vw",maxWidth:"80vw",maxHeight:"80vh"}}]};var Ue=class s{title="client";themeService=z(Ae);ngOnInit(){console.log("[APP] Application initialized with theme:",this.themeService.getCurrentTheme())}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=Vt({type:s,selectors:[["app-root"]],decls:1,vars:0,template:function(t,i){t&1&&Ut(0,"router-outlet")},dependencies:[Zt,Xt],encapsulation:2})};Ht(Ue,ln).catch(s=>console.error(s));"serviceWorker"in navigator&&!Gt()&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/sw.js").catch(s=>console.error("[SW] Registration failed:",s))});
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as ne}from"./chunk-J6XN2QQO.js";import{c as De}from"./chunk-Q7GPLEGX.js";import{a as Ve}from"./chunk-TPZGV5NA.js";import{a as J,e as Z,h as Oe}from"./chunk-J3CZ3MOZ.js";import{a as Pe,b as Ie,c as Ne}from"./chunk-TIPIHEBG.js";import{a as z,c as X}from"./chunk-H7A4LOFH.js";import{o as te,t as Re}from"./chunk-GN7KRTUQ.js";import{a as ee,c as H}from"./chunk-RI2JQRSB.js";import{Ab as ce,Bb as y,Db as m,Fb as l,Ga as ve,Gc as ke,Jb as F,Jc as Te,Ka as s,Kb as R,Lb as D,Ma as j,Pb as G,Qb as K,Rb as E,S as q,Sb as de,Tb as c,Tc as Y,Ub as f,Vb as A,Wa as N,Wc as Ee,Z as ge,a as B,ab as Q,b as W,bc as be,ca as x,cc as ye,dc as we,ec as Se,ga as g,ha as C,hc as me,i as he,jb as le,kb as xe,kc as k,lb as u,ma as U,mb as h,oa as se,oc as Me,pa as Ce,pb as O,qb as P,rb as S,sb as a,t as $,ta as b,tb as r,ua as V,ub as w,va as fe}from"./chunk-RYEX2DR7.js";var ze=["caseItemTpl"],Le=o=>({node:o,depth:0}),$e=(o,t)=>({node:o,depth:t}),qe=(o,t)=>t.id;function He(o,t){o&1&&ce(0)}function Be(o,t){if(o&1&&Q(0,He,1,0,"ng-container",3),o&2){let e=t.$implicit;l();let n=G(4);S("ngTemplateOutlet",n)("ngTemplateOutletContext",be(2,Le,e))}}function We(o,t){if(o&1){let e=y();a(0,"button",9),m("click",function(i){g(e);let d=l().node,v=l();return C(v.toggleExpand(i,d.id))}),a(1,"span",10),c(2,"\u203A"),r()()}if(o&2){let e=l().node,n=l();S("title",n.isExpanded(e.id)?"Collapse":"Expand"),s(),E("case-tree-node__toggle-icon--open",n.isExpanded(e.id))}}function Ue(o,t){o&1&&ce(0)}function je(o,t){if(o&1&&Q(0,Ue,1,0,"ng-container",3),o&2){let e=t.$implicit,n=l(2).depth;l();let i=G(4);S("ngTemplateOutlet",i)("ngTemplateOutletContext",ye(2,$e,e,n+1))}}function Qe(o,t){if(o&1&&O(0,je,1,5,"ng-container",null,qe),o&2){let e=l().node;P(e.children)}}function Ge(o,t){if(o&1){let e=y();a(0,"div",4)(1,"button",5),m("click",function(){let i=g(e).node,d=l();return C(d.onItemSelected(i.id))}),a(2,"span",6),u(3,We,3,3,"button",7),r(),a(4,"span",8),c(5),r()(),u(6,Qe,2,0),r()}if(o&2){let e=t.node,n=t.depth,i=l();K("--depth",n),s(),E("case-tree-node__row--active",e.id===i.activeCaseId),s(2),h(e.children.length?3:-1),s(2),f(e.name),s(),h(i.isExpanded(e.id)&&e.children.length?6:-1)}}var oe=class o{cases=[];activeCaseId=null;caseSelected=new se;createRequested=new se;caseItemTpl;rootItems=[];expandedIds=new Set;ngOnChanges(t){t.cases&&(this.rootItems=Ke(this.cases)),(t.cases||t.activeCaseId)&&this.autoExpandAncestors()}autoExpandAncestors(){if(!this.activeCaseId)return;let t=(e,n)=>{for(let i of e){if(i.id===n)return!0;if(i.children.length&&t(i.children,n))return this.expandedIds.add(i.id),!0}return!1};t(this.rootItems,this.activeCaseId)}isExpanded(t){return this.expandedIds.has(t)}toggleExpand(t,e){t.stopPropagation(),this.expandedIds.has(e)?this.expandedIds.delete(e):this.expandedIds.add(e)}onItemSelected(t){this.caseSelected.emit(t)}onCreateRequested(){this.createRequested.emit()}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=N({type:o,selectors:[["agentos-case-drawer"]],viewQuery:function(e,n){if(e&1&&F(ze,7),e&2){let i;R(i=D())&&(n.caseItemTpl=i.first)}},inputs:{cases:"cases",activeCaseId:"activeCaseId"},outputs:{caseSelected:"caseSelected",createRequested:"createRequested"},features:[fe],decls:5,vars:3,consts:[["caseItemTpl",""],["caseRowTpl",""],["title","Cases","emptyMessage","No cases yet. Start one below.","searchPlaceholder","Filter cases\u2026","cardMinWidth","220px","contentMaxWidth","100%",3,"itemSelected","createRequested","items","itemTemplate","showCreate"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"case-tree-node"],["type","button",1,"case-tree-node__row",3,"click"],[1,"case-tree-node__expand-slot"],["type","button",1,"case-tree-node__toggle",3,"title"],[1,"case-tree-node__name"],["type","button",1,"case-tree-node__toggle",3,"click","title"],[1,"case-tree-node__toggle-icon"]],template:function(e,n){if(e&1&&(a(0,"ds-entity-list",2),m("itemSelected",function(d){return n.onItemSelected(d)})("createRequested",function(){return n.onCreateRequested()}),r(),Q(1,Be,1,4,"ng-template",null,0,me)(3,Ge,7,7,"ng-template",null,1,me)),e&2){let i=G(2);S("items",n.rootItems)("itemTemplate",i)("showCreate",!0)}},dependencies:[Re,ke],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}.case-tree-node[_ngcontent-%COMP%]{width:100%}.case-tree-node__row[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;padding:.375rem .5rem;padding-left:calc(.5rem + var(--depth, 0) * 1.25rem);border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;font-size:.875rem;color:var(--color-text, #1d1d1f);border-radius:6px;gap:.375rem;transition:background .12s ease;box-sizing:border-box}.case-tree-node__row[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .05))}.case-tree-node__row--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);color:var(--color-text-inverse, #fff)}.case-tree-node__row--active[_ngcontent-%COMP%]:hover{background:var(--color-primary-hover, #0051d5)}.case-tree-node__expand-slot[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:1rem;flex-shrink:0}.case-tree-node__toggle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:1rem;height:1rem;padding:0;border:none;background:transparent;cursor:pointer;color:inherit;border-radius:3px;transition:background .1s ease}.case-tree-node__toggle[_ngcontent-%COMP%]:hover{background:#00000014}.case-tree-node__toggle-icon[_ngcontent-%COMP%]{display:inline-block;font-size:1.1rem;line-height:1;transition:transform .15s ease;transform:rotate(0)}.case-tree-node__toggle-icon--open[_ngcontent-%COMP%]{transform:rotate(90deg)}.case-tree-node__name[_ngcontent-%COMP%]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.8rem}'],changeDetection:0})};function Ke(o){let t=new Set(o.map(_=>_.id??"")),e=new Map(o.map(_=>[_.id??"",_.created??""])),n=_=>({id:_.id??"",name:_.title??_.id??"\u2014",children:[]}),i=new Map;for(let _ of o)i.set(_.id??"",n(_));let d=[];for(let _ of o){let p=i.get(_.id??""),T=_.parentCaseId;T&&t.has(T)?i.get(T).children.push(p):d.push(p)}let v=_=>_.sort((p,T)=>(e.get(T.id)??"")>(e.get(p.id)??"")?1:-1).map(p=>W(B({},p),{children:v(p.children)}));return v(d)}var L=class o{caseController=x(Z);cases=b([]);loadSubscription=null;loadCases(t){this.loadSubscription?.unsubscribe(),this.loadSubscription=this.caseController.listByParentCase(t).subscribe(e=>{this.cases.set(e),this.loadSubscription=null})}addCase(t){this.cases.update(e=>[t,...e])}updateCaseTitle(t,e){this.cases.update(n=>n.map(i=>i.id===t?W(B({},i),{title:e}):i))}static \u0275fac=function(e){return new(e||o)};static \u0275prov=ge({token:o,factory:o.\u0275fac,providedIn:"root"})};var Ye=["composerInput"],Xe=["messagesContainer"],Je=(o,t)=>t.phaseIndex;function Ze(o,t){o&1&&(a(0,"div",4)(1,"p"),c(2,"No messages yet."),r()())}function et(o,t){if(o&1&&(a(0,"div",18)(1,"span",21),c(2,"session context"),r(),a(3,"pre",22),c(4),we(5,"json"),r()()),o&2){let e=l(2).$implicit;s(4),f(Se(5,1,e.event.sessionContext))}}function tt(o,t){if(o&1&&(a(0,"div",17),u(1,et,6,3,"div",18),a(2,"span",19),c(3),r(),w(4,"div",20),r()),o&2){let e=l().$implicit,n=l(2);E("case-chat__message--user",e.event.actor.role==="USER")("case-chat__message--agent",e.event.actor.role==="AGENT"),s(),h(n.showTechnical()&&e.event.sessionContext?1:-1),s(2),f(e.event.actor.displayName),s(),S("innerHTML",e.html,ve)}}function nt(o,t){if(o&1&&(a(0,"div",14)(1,"span",19),c(2),r(),a(3,"p",23),c(4),r()()),o&2){let e=l().$implicit,n=l(2);s(2),f(n.agentDisplayName()),s(2),f(e.text)}}function ot(o,t){if(o&1&&(a(0,"div",28),c(1),r()),o&2){let e=l(3).$implicit;s(),f(e.item.detail)}}function it(o,t){if(o&1){let e=y();a(0,"button",26),m("click",function(){g(e);let i=l(2).$implicit,d=l(2);return C(d.toggleTechnical(i.eventId))}),a(1,"span",25),c(2),r(),a(3,"span",27),c(4),r()(),u(5,ot,2,1,"div",28)}if(o&2){let e=l(2).$implicit,n=l(2);le("aria-expanded",n.isTechnicalExpanded(e.eventId)),s(2),f(e.item.label),s(2),f(n.isTechnicalExpanded(e.eventId)?"\u25BC":"\u25B6"),s(),h(n.isTechnicalExpanded(e.eventId)?5:-1)}}function at(o,t){if(o&1&&(a(0,"span",25),c(1),r()),o&2){let e=l(2).$implicit;s(),f(e.item.label)}}function rt(o,t){if(o&1&&(a(0,"div",24),u(1,it,6,4)(2,at,2,1,"span",25),r()),o&2){let e=l().$implicit;E("case-chat__technical--warn",e.item.type==="WarnEvent")("case-chat__technical--error",e.item.type==="ErrorEvent"),s(),h(e.item.detail?1:2)}}function st(o,t){o&1&&c(0," \u23F3 ")}function lt(o,t){o&1&&c(0," \u2705 ")}function ct(o,t){o&1&&c(0," \u274C ")}function dt(o,t){if(o&1&&(a(0,"div",45)(1,"span",46),c(2,"Enrichment content"),r(),a(3,"pre"),c(4),r()()),o&2){let e=l().$implicit;s(4),f(e.enrichmentContent)}}function mt(o,t){if(o&1&&(a(0,"div",41)(1,"div",42)(2,"span",43),c(3),r(),a(4,"span",44),c(5),r()(),a(6,"div",45)(7,"span",46),c(8,"Prompt"),r(),a(9,"pre"),c(10),r()(),a(11,"div",45)(12,"span",46),c(13,"LLM output"),r(),a(14,"pre"),c(15),r()(),u(16,dt,5,1,"div",45),r()),o&2){let e=t.$implicit;E("case-chat__enrichment-phase--failed",!e.success),s(3),A("Phase ",e.phaseIndex),s(2),f(e.success?"\u2705":"\u274C"),s(5),f(e.prompt),s(5),f(e.llmOutput),s(),h(e.enrichmentContent?16:-1)}}function _t(o,t){if(o&1&&(a(0,"div",35)(1,"span",37),c(2,"Enrichment phases"),r(),O(3,mt,17,7,"div",40,Je),r()),o&2){let e=l(3).$implicit;s(3),P(e.call.enrichmentPhases)}}function pt(o,t){if(o&1&&(a(0,"div",36)(1,"span",37),c(2,"Payload"),r(),a(3,"pre"),c(4),r()()),o&2){let e=l(3).$implicit;s(4),f(e.call.args)}}function ut(o,t){o&1&&(a(0,"pre"),c(1),r()),o&2&&(s(),f(t))}function ht(o,t){o&1&&(a(0,"span",38),c(1,"Running\u2026"),r())}function gt(o,t){o&1&&(a(0,"span",39),c(1,"No output"),r())}function Ct(o,t){if(o&1&&(a(0,"div",34),u(1,_t,5,0,"div",35),u(2,pt,5,1,"div",36),a(3,"div",36)(4,"span",37),c(5,"Output"),r(),u(6,ut,2,1,"pre")(7,ht,2,0,"span",38)(8,gt,2,0,"span",39),r()()),o&2){let e,n=l(2).$implicit,i=l(2);s(),h(i.showTechnical()&&(n.call.enrichmentPhases!=null&&n.call.enrichmentPhases.length)?1:-1),s(),h(n.call.args?2:-1),s(4),h((e=i.extractToolOutput(n.call))?6:n.call.response?8:7,e)}}function ft(o,t){if(o&1){let e=y();a(0,"div",29)(1,"button",30),m("click",function(){g(e);let i=l().$implicit,d=l(2);return C(d.toggleToolCall(i.call.requestId))}),a(2,"span",31),u(3,st,1,0)(4,lt,1,0)(5,ct,1,0),r(),a(6,"span",32),c(7),r(),a(8,"span",33),c(9),r()(),u(10,Ct,9,3,"div",34),r()}if(o&2){let e=l().$implicit,n=l(2);E("case-chat__tool-call--pending",!e.call.response)("case-chat__tool-call--success",(e.call.response==null?null:e.call.response.success)===!0)("case-chat__tool-call--error",(e.call.response==null?null:e.call.response.success)===!1),s(),le("aria-expanded",n.isToolCallExpanded(e.call.requestId)),s(2),h(e.call.response?e.call.response.success?4:5:3),s(4),f(e.call.toolName),s(2),f(n.isToolCallExpanded(e.call.requestId)?"\u25BC":"\u25B6"),s(),h(n.isToolCallExpanded(e.call.requestId)?10:-1)}}function vt(o,t){if(o&1&&u(0,tt,5,7,"div",13)(1,nt,5,2,"div",14)(2,rt,3,5,"div",15)(3,ft,11,11,"div",16),o&2){let e=t.$implicit;h(e.kind==="message"?0:e.kind==="streaming"?1:e.kind==="technical"?2:3)}}function xt(o,t){if(o&1&&O(0,vt,4,1,null,null,xe().trackTimelineItem,!0),o&2){let e=l();P(e.timeline())}}function bt(o,t){o&1&&(a(0,"div",5),w(1,"span",47)(2,"span",47)(3,"span",47),r())}function yt(o,t){if(o&1){let e=y();a(0,"div",6)(1,"ds-icon-button",48),m("action",function(){g(e);let i=l();return C(i.onScrollToBottomClick())}),r()()}}function wt(o,t){if(o&1){let e=y();a(0,"ds-icon-button",49),m("action",function(){g(e);let i=l();return C(i.interrupt())}),r()}}function St(o,t){if(o&1){let e=y();a(0,"ds-icon-button",50),m("action",function(){g(e);let i=l();return C(i.submit())}),r()}if(o&2){let e=l();S("title",e.preferences.composerHint())("disabled",!e.canSend)}}var Mt=64,ae=class o{route=x(z);http=x(Y);zone=x(Ce);destroyRef=x(U);domSanitizer=x(Ee);config=x(J);preferences=x(ne);caseState=x(L);caseId=this.route.snapshot.queryParams.case;namespaceId=this.route.snapshot.queryParams.ns;markdownRenderer=this.buildMarkdownRenderer();agentDisplayName=k(()=>{let t=this.events();for(let e=t.length-1;e>=0;e--){let n=t[e];if(n){if(n.type==="AgentRunningEvent"||n.type==="AgentSelectedEvent"||n.type==="AgentFinishedEvent"){let i=n.agentName;if(i&&i.trim().length>0)return i}if(n.type==="MessageEvent"&&n.actor.role==="AGENT"&&n.actor.displayName)return n.actor.displayName}}return"Assistant"});eventSource=null;composerInput;messagesContainer;events=b([]);messageHtmlCache=new Map;inputValue=b("");isRunning=b(!1);isTerminal=b(!1);static SHOW_TECHNICAL_KEY="agentos.case-chat.showTechnical";showTechnical=b(localStorage.getItem(o.SHOW_TECHNICAL_KEY)==="true");showTechnicalOverride=Me(!1);streamingText=b("");collapsedTools=b(new Set);expandedTechnicals=b(new Set);isAtBottom=b(!0);scrollListenerCleanup=null;constructor(){V(()=>{this.showTechnical.set(this.showTechnicalOverride())}),V(()=>{this.isRunning()||this.isTerminal()||queueMicrotask(()=>this.composerInput?.nativeElement.focus())}),V(()=>{this.timeline(),this.streamingText(),this.isAtBottom()&&queueMicrotask(()=>this.scrollToBottom())}),j(()=>{this.attachScrollListener()})}baseTimeline=k(()=>{let t=this.events(),e=this.showTechnical(),n=new Map;for(let v of t)if(v.type==="ToolRequestEvent"){let _=v,p=_.toolRequestId??v.id,T=n.get(p);n.set(p,{requestId:p,toolName:_.toolName??"unknown",args:_.args??null,response:T?.response,enrichmentPhases:_.enrichmentPhases??null})}else if(v.type==="ToolResponseEvent"){let _=v,p=_.toolRequestId??v.id,T=n.get(p);n.set(p,{requestId:p,toolName:T?.toolName??_.toolName??"unknown",args:T?.args??null,response:_,enrichmentPhases:T?.enrichmentPhases??null})}let i=[],d=new Set;for(let v of t)if(v.type==="MessageEvent"){let _=v;i.push({kind:"message",event:_,html:this.messageHtmlCache.get(v.id)??""})}else if(v.type==="ToolRequestEvent"||v.type==="ToolResponseEvent"){let _=v.toolRequestId??v.id;d.has(_)||(d.add(_),i.push({kind:"tool",call:n.get(_)}))}else if(e){let _=this.toTechnicalItem(v);_&&i.push({kind:"technical",item:_,eventId:v.id})}return i});timeline=k(()=>{let t=this.baseTimeline(),e=this.streamingText();return e.trim().length===0?t:[...t,{kind:"streaming",text:e}]});trackTimelineItem(t,e){switch(e.kind){case"message":return e.event.id;case"tool":return e.call.requestId;case"technical":return e.eventId;case"streaming":return"streaming"}}get canSend(){return!!this.inputValue().trim()&&!this.isRunning()&&!this.isTerminal()}ngOnInit(){this.connectSse(),this.route.queryParams.pipe(ee(this.destroyRef)).subscribe(t=>{let e=t.case;e&&e!==this.caseId&&(this.caseId=e,this.reinitialise())})}ngOnDestroy(){this.eventSource?.close(),this.scrollListenerCleanup?.()}attachScrollListener(){let t=this.messagesContainer?.nativeElement;if(!t)return;let e=()=>{let n=t.scrollHeight-t.scrollTop-t.clientHeight;this.isAtBottom.set(n<=Mt)};t.addEventListener("scroll",e,{passive:!0}),this.scrollListenerCleanup=()=>t.removeEventListener("scroll",e)}scrollToBottom(){let t=this.messagesContainer?.nativeElement;t&&(t.scrollTop=t.scrollHeight)}onScrollToBottomClick(){this.isAtBottom.set(!0),this.scrollToBottom()}connectSse(){let t=`${this.config.basePath}/api/cases/${this.caseId}/events`;console.log("[AgentOS SSE] connecting",{url:t,basePath:this.config.basePath,caseId:this.caseId,namespaceId:this.namespaceId,now:new Date().toISOString()}),this.eventSource=this.zone.runOutsideAngular(()=>new EventSource(t));let e=i=>{let d=performance.now(),v=i.type,_=i.data;console.log("[AgentOS SSE] frame received",{sseEventName:v,dataLength:_?.length??0,dataPreview:_?.slice(0,120),receivedAtMs:d});try{let p=JSON.parse(_);this.zone.run(()=>{let T=this.events().length;if(p.type==="MessageEvent"){let M=p,I=this.extractText(M);this.messageHtmlCache.has(p.id)||this.messageHtmlCache.set(p.id,this.renderMarkdown(I))}this.events.update(M=>M.some(I=>I.id===p.id)?M:[...M,p]);let Ae=this.events().length;if(console.log("[AgentOS SSE] event processed",{sseEventName:v,eventType:p.type,eventId:p.id,beforeLen:T,afterLen:Ae,running:this.isRunning(),terminal:this.isTerminal()}),p.type==="TextChunkEvent"){let M=p.chunk;M&&this.streamingText.update(I=>I+M);return}if(p.type==="CaseUpdatedEvent"){let M=p;M.title&&this.caseState.updateCaseTitle(p.caseId,M.title);return}if(p.type==="CaseStatusEvent"){let M=p.status,I=M==="KILLED"||M==="ERROR";if(this.isTerminal.set(I),I)this.isRunning.set(!1),this.eventSource?.close(),this.eventSource=null;else{let ue=M==="RUNNING";this.isRunning.set(ue),ue||this.streamingText.set("")}return}if(p.type==="AgentFinishedEvent"){this.isRunning.set(!1),this.streamingText.set("");return}})}catch(p){console.warn("[AgentOS SSE] failed to parse event data",{sseEventName:v,error:p,dataPreview:_?.slice(0,500)})}},n=["MessageEvent","CaseStatusEvent","CaseUpdatedEvent","AgentSelectedEvent","AgentRunningEvent","AgentFinishedEvent","ThinkingEvent","TextChunkEvent","ToolRequestEvent","ToolResponseEvent","PendingConfirmationEvent","ConfirmationResolvedEvent","ErrorEvent","WarnEvent","IntentionGeneratedEvent"];for(let i of n)console.log("[AgentOS SSE] addEventListener",i),this.eventSource.addEventListener(i,e);this.eventSource.onopen=()=>{console.log("[AgentOS SSE] connection open",{readyState:this.eventSource?.readyState,at:new Date().toISOString()})},this.eventSource.onmessage=i=>{console.log("[AgentOS SSE] onmessage (unnamed event) received",{dataLength:i.data?.length??0,dataPreview:i.data?.slice(0,120)})},this.eventSource.onerror=i=>{console.warn("[AgentOS SSE] connection error",{err:i,readyState:this.eventSource?.readyState,at:new Date().toISOString()}),this.zone.run(()=>{this.isRunning.set(!1)})}}onInput(t){this.inputValue.set(t.target.value)}onKeydown(t){this.preferences.shouldSend(t)&&(t.preventDefault(),this.submit())}reinitialise(){this.eventSource?.close(),this.eventSource=null,this.events.set([]),this.messageHtmlCache.clear(),this.inputValue.set(""),this.isRunning.set(!1),this.isTerminal.set(!1),this.streamingText.set(""),this.collapsedTools.set(new Set),this.isAtBottom.set(!0),this.connectSse()}submit(){if(!this.canSend)return;let t=this.inputValue().trim();this.inputValue.set(""),this.sendMessage(t)}sendMessage(t){this.isRunning.set(!0),this.streamingText.set(""),this.http.post(`${this.config.basePath}/api/cases/${this.caseId}/messages`,{content:t,userId:"default-user"}).subscribe({error:e=>{console.error("[CaseChat] Failed to send message",e),this.isRunning.set(!1)}})}interrupt(){this.http.post(`${this.config.basePath}/api/cases/${this.caseId}/interrupt`,{}).subscribe({error:t=>console.error("[CaseChat] Failed to interrupt case",t)})}kill(){this.http.post(`${this.config.basePath}/api/cases/${this.caseId}/kill`,{}).subscribe({error:t=>console.error("[CaseChat] Failed to kill case",t)})}extractText(t){return t.content?.filter(e=>"content"in e).map(e=>e.content).join("")??""}extractToolOutput(t){if(!t.response)return null;let e=t.response.output;return e?e.content??null:null}toggleToolCall(t){this.collapsedTools.update(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})}isToolCallExpanded(t){return this.collapsedTools().has(t)}toggleShowTechnical(){this.showTechnical.update(t=>{let e=!t;return localStorage.setItem(o.SHOW_TECHNICAL_KEY,String(e)),e})}toggleTechnical(t){this.expandedTechnicals.update(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})}isTechnicalExpanded(t){return this.expandedTechnicals().has(t)}renderMarkdown(t){if(!t)return"";let e=Ie.parse(t,{renderer:this.markdownRenderer,breaks:!0,gfm:!0,async:!1}),n=Ne.sanitize(e,{ADD_TAGS:["span"],ADD_ATTR:["aria-hidden","aria-label","target","rel"],ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))/i});return this.domSanitizer.bypassSecurityTrustHtml(n)}buildMarkdownRenderer(){let t=new Pe,e=t.link.bind(t);return t.link=n=>{let i=e(n);return this.isExternalLink(n.href)&&(i=i.replace("<a ",'<a target="_blank" rel="noopener noreferrer" ').replace("</a>",'<span class="external-link-icon" aria-hidden="true">\u2197</span></a>')),i},t}isExternalLink(t){if(!t||t.startsWith("/")||t.startsWith("#")||t.startsWith("?"))return!1;if(t.startsWith("//"))return!0;try{return new URL(t,window.location.href).hostname!==window.location.hostname}catch(e){return!1}}toTechnicalItem(t){switch(t.type){case"WarnEvent":return{type:"WarnEvent",label:"\u26A0\uFE0F Warn",detail:t.message};case"ErrorEvent":return{type:"ErrorEvent",label:"\u274C Error",detail:t.message};case"CaseStatusEvent":return{type:"CaseStatusEvent",label:`\u{1F7E1} Status: ${t.status}`};case"AgentRunningEvent":return{type:"AgentRunningEvent",label:`\u25B6\uFE0F Agent running: ${t.agentName}`};case"AgentFinishedEvent":return{type:"AgentFinishedEvent",label:`\u2705 Agent finished: ${t.agentName}`};case"AgentSelectedEvent":return{type:"AgentSelectedEvent",label:`\u{1F3AF} Agent selected: ${t.agentName}`};case"IntentionGeneratedEvent":{let e=t;return{type:"IntentionGeneratedEvent",label:`\u{1F9E0} Intention \u2192 ${e.toolName}`,detail:e.intention}}default:return null}}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=N({type:o,selectors:[["agentos-case-chat"]],viewQuery:function(e,n){if(e&1&&F(Ye,5)(Xe,5),e&2){let i;R(i=D())&&(n.composerInput=i.first),R(i=D())&&(n.messagesContainer=i.first)}},inputs:{showTechnicalOverride:[1,"showTechnicalOverride"]},decls:14,vars:7,consts:[["messagesContainer",""],["composerInput",""],[1,"case-chat"],[1,"case-chat__messages"],[1,"case-chat__empty"],[1,"case-chat__thinking"],[1,"case-chat__scroll-anchor"],[1,"case-chat__composer"],["placeholder","Reply\u2026","rows","3",1,"case-chat__input",3,"input","keydown","value","disabled"],[1,"case-chat__actions"],["icon","stop","variant","danger","title","Interrupt"],["icon","send","variant","primary",3,"title","disabled"],["icon","cancel","variant","danger","title","Kill",3,"action","disabled"],[1,"case-chat__message",3,"case-chat__message--user","case-chat__message--agent"],[1,"case-chat__message","case-chat__message--agent","case-chat__message--streaming"],[1,"case-chat__technical",3,"case-chat__technical--warn","case-chat__technical--error"],[1,"case-chat__tool-call",3,"case-chat__tool-call--pending","case-chat__tool-call--success","case-chat__tool-call--error"],[1,"case-chat__message"],[1,"case-chat__session-context"],[1,"case-chat__message-author"],[1,"case-chat__message-text","case-chat__message-text--markdown",3,"innerHTML"],[1,"case-chat__session-context-label"],[1,"case-chat__session-context-body"],[1,"case-chat__message-text"],[1,"case-chat__technical"],[1,"case-chat__technical-label"],["type","button",1,"case-chat__technical-header",3,"click"],[1,"case-chat__technical-chevron"],[1,"case-chat__technical-body"],[1,"case-chat__tool-call"],["type","button",1,"case-chat__tool-call-header",3,"click"],[1,"case-chat__tool-call-icon"],[1,"case-chat__tool-call-name"],[1,"case-chat__tool-call-chevron"],[1,"case-chat__tool-call-output"],[1,"case-chat__tool-call-section","case-chat__enrichment-section"],[1,"case-chat__tool-call-section"],[1,"case-chat__tool-call-label"],[1,"case-chat__tool-call-pending"],[1,"case-chat__tool-call-empty"],[1,"case-chat__enrichment-phase",3,"case-chat__enrichment-phase--failed"],[1,"case-chat__enrichment-phase"],[1,"case-chat__enrichment-phase-header"],[1,"case-chat__enrichment-phase-index"],[1,"case-chat__enrichment-phase-status"],[1,"case-chat__enrichment-phase-row"],[1,"case-chat__enrichment-phase-label"],[1,"thinking-dot"],["icon","keyboard_arrow_down","variant","default","title","Scroll to bottom",3,"action"],["icon","stop","variant","danger","title","Interrupt",3,"action"],["icon","send","variant","primary",3,"action","title","disabled"]],template:function(e,n){e&1&&(a(0,"div",2)(1,"div",3,0),u(3,Ze,3,0,"div",4)(4,xt,2,0),u(5,bt,4,0,"div",5),r(),u(6,yt,2,0,"div",6),a(7,"div",7)(8,"textarea",8,1),m("input",function(d){return n.onInput(d)})("keydown",function(d){return n.onKeydown(d)}),r(),a(10,"div",9),u(11,wt,1,0,"ds-icon-button",10)(12,St,1,2,"ds-icon-button",11),a(13,"ds-icon-button",12),m("action",function(){return n.kill()}),r()()()()),e&2&&(s(3),h(n.timeline().length===0?3:4),s(2),h(n.isRunning()?5:-1),s(),h(n.isAtBottom()?-1:6),s(2),S("value",n.inputValue())("disabled",n.isRunning()||n.isTerminal()),s(3),h(n.isRunning()?11:12),s(2),S("disabled",n.isTerminal()))},dependencies:[te,Te],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}.case-chat[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;max-width:800px;width:100%;margin:0 auto;padding:1.5rem;gap:1rem;position:relative}.case-chat__messages[_ngcontent-%COMP%]{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:.75rem;padding-bottom:.5rem;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:var(--color-border, rgba(0, 0, 0, .15)) transparent}.case-chat__empty[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex:1}.case-chat__empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.case-chat__tool-calls[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.4rem;margin-top:.25rem}.case-chat__tool-call[_ngcontent-%COMP%]{flex-shrink:0;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--glass-bg, rgba(255, 255, 255, .72));font-size:.8rem;overflow:hidden;transition:border-color .2s ease}.case-chat__tool-call--pending[_ngcontent-%COMP%]{border-color:var(--color-warning, #f5a623);opacity:.8}.case-chat__tool-call--success[_ngcontent-%COMP%]{border-color:var(--color-success, #34c759)}.case-chat__tool-call--error[_ngcontent-%COMP%]{border-color:var(--color-error, #ff3b30)}.case-chat__tool-call-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.4rem;width:100%;padding:.4rem .6rem;background:transparent;border:none;cursor:pointer;text-align:left;color:var(--color-text, #1d1d1f);font-family:inherit;font-size:.8rem}.case-chat__tool-call-header[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04))}.case-chat__tool-call-icon[_ngcontent-%COMP%]{flex-shrink:0;font-size:.75rem}.case-chat__tool-call-name[_ngcontent-%COMP%]{font-weight:600;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);color:var(--color-primary, #0071e3);flex-shrink:0}.case-chat__tool-call-args[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.case-chat__tool-call-chevron[_ngcontent-%COMP%]{flex-shrink:0;font-size:.6rem;color:var(--color-text-secondary, #6e6e73);margin-left:auto}.case-chat__tool-call-output[_ngcontent-%COMP%]{border-top:1px solid var(--color-border, rgba(0, 0, 0, .08));display:flex;flex-direction:column}.case-chat__tool-call-section[_ngcontent-%COMP%]{padding:.4rem .6rem .5rem}.case-chat__tool-call-section[_ngcontent-%COMP%] + .case-chat__tool-call-section[_ngcontent-%COMP%]{border-top:1px solid var(--color-border, rgba(0, 0, 0, .06))}.case-chat__tool-call-section[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:.25rem 0 0;white-space:pre-wrap;word-break:break-all;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.75rem;color:var(--color-text, #1d1d1f);max-height:200px;overflow-y:auto}.case-chat__tool-call-label[_ngcontent-%COMP%]{display:block;font-size:.65rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--color-text-secondary, #6e6e73)}.case-chat__enrichment-section[_ngcontent-%COMP%]{background:var(--color-surface-secondary, rgba(0, 0, 0, .02))}.case-chat__enrichment-phase[_ngcontent-%COMP%]{margin-top:.35rem;border-radius:4px;border:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--glass-bg, rgba(255, 255, 255, .6));overflow:hidden}.case-chat__enrichment-phase--failed[_ngcontent-%COMP%]{border-color:var(--color-error, #ff3b30);background:#ff3b300a}.case-chat__enrichment-phase-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:.2rem .5rem;background:var(--color-surface-secondary, rgba(0, 0, 0, .03));border-bottom:1px solid var(--color-border, rgba(0, 0, 0, .06))}.case-chat__enrichment-phase-index[_ngcontent-%COMP%]{font-weight:600;font-size:.7rem;text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-secondary, #6e6e73)}.case-chat__enrichment-phase-status[_ngcontent-%COMP%]{font-size:.7rem}.case-chat__enrichment-phase-row[_ngcontent-%COMP%]{padding:.25rem .5rem}.case-chat__enrichment-phase-row[_ngcontent-%COMP%] + .case-chat__enrichment-phase-row[_ngcontent-%COMP%]{border-top:1px solid var(--color-border, rgba(0, 0, 0, .04))}.case-chat__enrichment-phase-row[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:.15rem 0 0;white-space:pre-wrap;word-break:break-all;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.7rem;color:var(--color-text, #1d1d1f);max-height:150px;overflow-y:auto}.case-chat__enrichment-phase-label[_ngcontent-%COMP%]{display:block;font-size:.6rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-secondary, #6e6e73)}.case-chat__tool-call-pending[_ngcontent-%COMP%], .case-chat__tool-call-empty[_ngcontent-%COMP%]{display:block;margin-top:.25rem;color:var(--color-text-secondary, #6e6e73);font-style:italic;font-size:.75rem}.case-chat__technical[_ngcontent-%COMP%]{flex-shrink:0;border-radius:6px;background:var(--color-surface-secondary, rgba(0, 0, 0, .03));border-left:3px solid var(--color-border, rgba(0, 0, 0, .12));font-size:.78rem;color:var(--color-text-secondary, #6e6e73);overflow:hidden}.case-chat__technical--warn[_ngcontent-%COMP%]{border-left-color:var(--color-warning, #f5a623);background:#f5a6230f;color:var(--color-text, #1d1d1f)}.case-chat__technical--error[_ngcontent-%COMP%]{border-left-color:var(--color-error, #ff3b30);background:#ff3b300f;color:var(--color-text, #1d1d1f)}.case-chat__technical-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:100%;padding:.2rem .75rem;background:transparent;border:none;cursor:pointer;text-align:left;color:inherit;font-family:inherit;font-size:inherit}.case-chat__technical-header[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04))}.case-chat__technical-label[_ngcontent-%COMP%]{font-weight:500;white-space:nowrap}.case-chat__technical-label[_ngcontent-%COMP%]:only-child{display:block;padding:.2rem .75rem}.case-chat__technical-chevron[_ngcontent-%COMP%]{flex-shrink:0;font-size:.6rem;color:var(--color-text-secondary, #6e6e73);margin-left:auto}.case-chat__technical-body[_ngcontent-%COMP%]{padding:.3rem .75rem .5rem;border-top:1px solid var(--color-border, rgba(0, 0, 0, .08));white-space:pre-wrap;word-break:break-word;font-size:.75rem;line-height:1.5;color:var(--color-text, #1d1d1f)}.case-chat__session-context[_ngcontent-%COMP%]{flex-shrink:0;border-radius:6px;background:var(--color-surface-secondary, rgba(0, 0, 0, .03));border-left:3px solid var(--color-primary, #0071e3);padding:.25rem .75rem .4rem;margin-bottom:.25rem;font-size:.75rem;color:var(--color-text-secondary, #6e6e73);overflow:hidden}.case-chat__session-context-label[_ngcontent-%COMP%]{display:block;font-size:.65rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--color-primary, #0071e3);margin-bottom:.2rem}.case-chat__session-context-body[_ngcontent-%COMP%]{margin:0;white-space:pre-wrap;word-break:break-all;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.75rem;color:var(--color-text, #1d1d1f);max-height:160px;overflow-y:auto}.case-chat__message[_ngcontent-%COMP%]{flex-shrink:0}.case-chat__thinking[_ngcontent-%COMP%]{flex-shrink:0;display:flex;gap:.3rem;padding:.75rem 1rem;align-self:flex-start}.case-chat__message-text--markdown[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 .5em}.case-chat__message-text--markdown[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:last-child{margin-bottom:0}.case-chat__message-text--markdown[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] ol[_ngcontent-%COMP%]{margin:.25em 0 .5em;padding-left:1.4em}.case-chat__message-text--markdown[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-bottom:.2em}.case-chat__message-text--markdown[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.85em;background:var(--color-code-bg, rgba(0, 0, 0, .06));border-radius:3px;padding:.1em .35em}.case-chat__message-text--markdown[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(0, 0, 0, .06));border-radius:6px;padding:.6em .8em;overflow-x:auto;margin:.4em 0}.case-chat__message-text--markdown[_ngcontent-%COMP%] pre[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:none;padding:0;font-size:.8rem}.case-chat__message-text--markdown[_ngcontent-%COMP%] blockquote[_ngcontent-%COMP%]{margin:.4em 0;padding-left:.8em;border-left:3px solid var(--color-border, rgba(0, 0, 0, .15));color:var(--color-text-secondary, #6e6e73)}.case-chat__message-text--markdown[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--color-primary, #0071e3);text-decoration:underline}.case-chat__message-text--markdown[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:.5em 0 .25em;font-size:1em;font-weight:600}.case-chat__message-text--markdown[_ngcontent-%COMP%] .external-link-icon[_ngcontent-%COMP%]{font-size:.75em;margin-left:.15em;vertical-align:super}.case-chat__message--streaming[_ngcontent-%COMP%]{opacity:.95}.case-chat__scroll-anchor[_ngcontent-%COMP%]{position:absolute;bottom:calc(2rem + 80px);left:50%;transform:translate(-50%);z-index:10;background:var(--glass-bg, rgba(255, 255, 255, .88));border:1px solid var(--glass-border, rgba(255, 255, 255, .3));backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-radius:50%;box-shadow:0 2px 12px var(--color-shadow, rgba(0, 0, 0, .12));animation:_ngcontent-%COMP%_scroll-anchor-in .15s ease}.case-chat__composer[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:flex-end;gap:.5rem;background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:16px;padding:.5rem .5rem .5rem 1rem}.case-chat__input[_ngcontent-%COMP%]{flex:1;resize:none;padding:.5rem 0;border:none;background:transparent;color:var(--color-text, #1d1d1f);font-size:.95rem;font-family:inherit;line-height:1.5;outline:none;min-height:40px}.case-chat__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.case-chat__input[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.case-chat__actions[_ngcontent-%COMP%]{display:flex;align-items:center;flex-shrink:0}.thinking-dot[_ngcontent-%COMP%]{width:8px;height:8px;border-radius:50%;background:var(--color-text-secondary, #6e6e73);animation:_ngcontent-%COMP%_thinking-bounce 1.2s ease-in-out infinite}.thinking-dot[_ngcontent-%COMP%]:nth-child(2){animation-delay:.2s}.thinking-dot[_ngcontent-%COMP%]:nth-child(3){animation-delay:.4s}@keyframes _ngcontent-%COMP%_thinking-bounce{0%,80%,to{transform:translateY(0);opacity:.4}40%{transform:translateY(-6px);opacity:1}}@keyframes _ngcontent-%COMP%_scroll-anchor-in{0%{opacity:0;transform:translate(-50%) translateY(8px)}to{opacity:1;transform:translate(-50%) translateY(0)}}']})};var kt=["composerInput"],re=class o{http=x(Y);router=x(X);route=x(z);config=x(J);caseState=x(L);destroyRef=x(U);preferences=x(ne);composerInput;namespaceId=this.route.snapshot.queryParams.ns;inputValue=b("");isCreating=b(!1);constructor(){j(()=>{this.composerInput?.nativeElement.focus()})}get canSend(){return!!this.inputValue().trim()&&!this.isCreating()}onInput(t){this.inputValue.set(t.target.value)}onKeydown(t){this.preferences.shouldSend(t)&&(t.preventDefault(),this.submit())}submit(){if(!this.canSend)return;let t=this.inputValue().trim();this.inputValue.set(""),this.isCreating.set(!0),this.http.post(`${this.config.basePath}/api/cases`,{namespaceId:this.namespaceId,metadata:{}}).pipe(q(e=>(this.caseState.addCase(e),this.http.post(`${this.config.basePath}/api/cases/${e.id}/messages`,{content:t,userId:"default-user"}).pipe($(()=>e)))),ee(this.destroyRef)).subscribe({next:e=>{this.router.navigate(["/agentos/home"],{queryParams:{ns:this.namespaceId,case:e.id??""}})},error:e=>{console.error("[CaseHome] Failed to create case or send first message",e),this.isCreating.set(!1),this.inputValue.set(t)}})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=N({type:o,selectors:[["agentos-case-home"]],viewQuery:function(e,n){if(e&1&&F(kt,5),e&2){let i;R(i=D())&&(n.composerInput=i.first)}},decls:11,vars:4,consts:[["composerInput",""],[1,"case-home"],[1,"case-home__hero"],[1,"case-home__headline"],[1,"case-home__composer"],["placeholder","Describe your task or ask a question\u2026","rows","4",1,"case-home__input",3,"input","keydown","value","disabled"],[1,"case-home__composer-footer"],[1,"case-home__hint"],["icon","send","variant","primary","title","Start case",3,"action","disabled"]],template:function(e,n){e&1&&(a(0,"div",1)(1,"div",2)(2,"h1",3),c(3,"What can I help you with?"),r(),a(4,"div",4)(5,"textarea",5,0),m("input",function(d){return n.onInput(d)})("keydown",function(d){return n.onKeydown(d)}),r(),a(7,"div",6)(8,"span",7),c(9),r(),a(10,"ds-icon-button",8),m("action",function(){return n.submit()}),r()()()()()),e&2&&(s(5),S("value",n.inputValue())("disabled",n.isCreating()),s(4),f(n.preferences.composerHint()),s(),S("disabled",!n.canSend))},dependencies:[te],styles:[".case-home[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;align-items:center;justify-content:center}.case-home__hero[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:2rem;padding:2rem 1.5rem 4rem;max-width:680px;width:100%}.case-home__headline[_ngcontent-%COMP%]{margin:0;font-size:clamp(1.5rem,4vw,2.25rem);font-weight:700;letter-spacing:-.03em;color:var(--color-text, #1d1d1f);text-align:center}.case-home__composer[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:16px;box-shadow:0 4px 24px var(--color-shadow, rgba(0, 0, 0, .07));overflow:hidden;transition:box-shadow .2s ease,border-color .2s ease}.case-home__composer[_ngcontent-%COMP%]:focus-within{box-shadow:0 4px 32px #007aff26;border-color:var(--color-primary, #007aff)}.case-home__input[_ngcontent-%COMP%]{width:100%;resize:none;padding:1rem 1.25rem .5rem;border:none;background:transparent;color:var(--color-text, #1d1d1f);font-size:1rem;font-family:inherit;line-height:1.6;outline:none;box-sizing:border-box}.case-home__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.case-home__input[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.case-home__composer-footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:.5rem .5rem .5rem 1.25rem}.case-home__hint[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);opacity:.7}"]})};var pe=(o,t)=>t.id;function Tt(o,t){o&1&&(a(0,"span"),c(1,"\u2713"),r())}function Et(o,t){if(o&1){let e=y();a(0,"button",34),m("click",function(){let i=g(e).$implicit,d=l(2);return C(d.onNamespaceSelected(i))}),w(1,"span",35),a(2,"span",36),c(3),r(),u(4,Tt,2,0,"span"),r()}if(o&2){let e,n,i=t.$implicit,d=l(2);E("case-shell__ns-item--active",i.id===((e=d.selectedNamespace())==null?null:e.id)),s(3),f(i.name),s(),h(i.id===((n=d.selectedNamespace())==null?null:n.id)?4:-1)}}function Ot(o,t){if(o&1){let e=y();a(0,"div",31),m("click",function(i){g(e);let d=l();return C(d.closeNsMenu(i))})("keyup.escape",function(i){g(e);let d=l();return C(d.closeNsMenu(i))}),r(),a(1,"div",32),O(2,Et,5,4,"button",33,pe),r()}if(o&2){let e=l();s(2),P(e.namespaces())}}function Pt(o,t){if(o&1){let e=y();a(0,"button",39),m("click",function(){g(e);let i=l(2);return C(i.onMenuNavigate("/agentos/admin"))}),c(1," \u2699\uFE0F Admin "),r()}}function It(o,t){o&1&&c(0," \u2600\uFE0F Light mode ")}function Nt(o,t){o&1&&c(0," \u{1F319} Dark mode ")}function Rt(o,t){if(o&1){let e=y();a(0,"div",37),m("click",function(i){g(e);let d=l();return C(d.closeMenu(i))})("keyup.escape",function(i){g(e);let d=l();return C(d.closeMenu(i))}),r(),a(1,"div",38)(2,"button",39),m("click",function(){g(e);let i=l();return C(i.onMenuNavigate("/agentos/user"))}),c(3,"\u{1F464} User"),r(),u(4,Pt,2,0,"button",40),w(5,"div",41),a(6,"button",39),m("click",function(){g(e);let i=l();return C(i.onMenuNavigate("/agentos/namespaces"))}),c(7," \u{1F310} Namespaces "),r(),w(8,"div",41),a(9,"button",39),m("click",function(){g(e);let i=l();return C(i.onMenuToggleTheme())}),u(10,It,1,0)(11,Nt,1,0),r(),a(12,"button",39),m("click",function(){g(e);let i=l();return C(i.onMenuToggleLogs())}),c(13," </> Technical logs "),r()()}if(o&2){let e=l();s(4),h(e.isAdmin()?4:-1),s(6),h(e.isDark()?10:11),s(2),E("case-shell__menu-item--active",e.showTechnical())}}function Dt(o,t){if(o&1){let e=y();a(0,"div",45),m("click",function(){g(e);let i=l().$implicit,d=l(2);return C(d.onMobileCaseSelect(i.id??""))})("keyup.enter",function(){g(e);let i=l().$implicit,d=l(2);return C(d.onMobileCaseSelect(i.id??""))}),w(1,"span",13),a(2,"span",14),c(3),r(),a(4,"span",15),c(5),r()()}if(o&2){let e=l().$implicit,n=l(2);s(),de("case-shell__mobile-dot--"+n.deriveMobileStatus(e.status)),s(2),f(e.title??e.id),s(2),f(e.status.toLowerCase())}}function Vt(o,t){if(o&1&&u(0,Dt,6,4,"div",44),o&2){let e=t.$implicit,n=l(2);h(e.id!==n.activeCaseId()?0:-1)}}function Ft(o,t){if(o&1){let e=y();a(0,"div",16)(1,"div",42),m("click",function(){g(e);let i=l();return C(i.onMobileCreateCase())})("keyup.enter",function(){g(e);let i=l();return C(i.onMobileCreateCase())}),a(2,"span",43),c(3,"+"),r(),a(4,"span",14),c(5,"New case"),r()(),O(6,Vt,1,1,null,null,pe),r()}if(o&2){let e=l();s(6),P(e.cases())}}function At(o,t){if(o&1&&c(0),o&2){let e=l();A(" ",e.userInitials()," ")}}function zt(o,t){o&1&&c(0," \u2022\u2022\u2022 ")}function Lt(o,t){if(o&1){let e=y();a(0,"button",39),m("click",function(){g(e);let i=l(2);return C(i.onMenuNavigate("/agentos/admin"))}),c(1," \u2699\uFE0F Admin "),r()}}function $t(o,t){o&1&&c(0," \u2600\uFE0F Light mode ")}function qt(o,t){o&1&&c(0," \u{1F319} Dark mode ")}function Ht(o,t){if(o&1){let e=y();a(0,"div",37),m("click",function(i){g(e);let d=l();return C(d.closeMenu(i))})("keyup.escape",function(i){g(e);let d=l();return C(d.closeMenu(i))}),r(),a(1,"div",46)(2,"button",39),m("click",function(){g(e);let i=l();return C(i.onMenuNavigate("/agentos/user"))}),c(3," \u{1F464} User "),r(),u(4,Lt,2,0,"button",40),w(5,"div",41),a(6,"button",39),m("click",function(){g(e);let i=l();return C(i.onMenuNavigate("/agentos/namespaces"))}),c(7," \u{1F310} Namespaces "),r(),w(8,"div",41),a(9,"button",39),m("click",function(){g(e);let i=l();return C(i.onMenuToggleTheme())}),u(10,$t,1,0)(11,qt,1,0),r(),a(12,"button",39),m("click",function(){g(e);let i=l();return C(i.onMenuToggleLogs())}),c(13," </> Technical logs "),r()()}if(o&2){let e=l();s(4),h(e.isAdmin()?4:-1),s(6),h(e.isDark()?10:11),s(2),E("case-shell__menu-item--active",e.showTechnical())}}function Bt(o,t){o&1&&(a(0,"span"),c(1,"\u2713"),r())}function Wt(o,t){if(o&1){let e=y();a(0,"button",34),m("click",function(){let i=g(e).$implicit,d=l(3);return C(d.onNamespaceSelected(i))}),w(1,"span",35),a(2,"span",36),c(3),r(),u(4,Bt,2,0,"span"),r()}if(o&2){let e,n,i=t.$implicit,d=l(3);E("case-shell__ns-item--active",i.id===((e=d.selectedNamespace())==null?null:e.id)),s(3),f(i.name),s(),h(i.id===((n=d.selectedNamespace())==null?null:n.id)?4:-1)}}function Ut(o,t){if(o&1&&(a(0,"div",50),O(1,Wt,5,4,"button",33,pe),r()),o&2){let e=l(2);s(),P(e.namespaces())}}function jt(o,t){if(o&1){let e=y();a(0,"div",24)(1,"button",47),m("click",function(){g(e);let i=l();return C(i.toggleNsMenu())}),w(2,"span",35),a(3,"span",48),c(4),r(),a(5,"span",49),c(6,"\u25BE"),r()(),u(7,Ut,3,0,"div",50),r()}if(o&2){let e,n=l();s(4),f(((e=n.selectedNamespace())==null?null:e.name)??"Select namespace"),s(3),h(n.nsMenuOpen()?7:-1)}}function Qt(o,t){if(o&1&&(a(0,"span",25),c(1),r()),o&2){let e,n=l();s(),f((e=n.selectedNamespace())==null?null:e.name)}}function Gt(o,t){if(o&1&&w(0,"agentos-case-chat",30),o&2){let e=l();S("showTechnicalOverride",e.showTechnical())}}function Kt(o,t){o&1&&w(0,"agentos-case-home")}var Fe=class o{router=x(X);route=x(z);caseController=x(Z);namespaceController=x(Oe);themePort=x(De);userState=x(Ve);isAdmin=k(()=>this.userState.currentUser()?.isAdmin===!0);nsMenuOpen=b(!1);sidebarWidth=b(300);isDark=k(()=>{let t=this.themePort.theme();return t==="dark"?!0:t==="light"?!1:typeof document<"u"&&document.documentElement.hasAttribute("data-theme")});showTechnical=b(!1);showNsPicker=k(()=>this.isAdmin()||this.namespaces().length>1);menuOpen=b(!1);mobileSwitcherOpen=b(!1);namespaceId$=this.route.queryParams.pipe($(t=>t.ns??null));_namespaceIdRaw=H(this.namespaceId$);namespaceId=k(()=>this._namespaceIdRaw()??null);_activeCaseIdRaw=H(this.route.queryParams.pipe($(t=>t.case??null)));activeCaseId=k(()=>this._activeCaseIdRaw()??null);refresh$=new he(void 0);cases$=this.namespaceId$.pipe(q(t=>t?this.refresh$.pipe(q(()=>this.caseController.listByParentCase(t))):[[]]));cases=H(this.cases$,{initialValue:[]});namespaces=H(this.namespaceController.listAllNamespace(),{initialValue:[]});selectedNamespace=b(null);userInitials=k(()=>{let t=this.userState.currentUser();if(!t)return"";let e=t.firstname?.[0]??"",n=t.lastname?.[0]??"";return(e+n).toUpperCase()||t.email?.[0]?.toUpperCase()||""});constructor(){V(()=>{let t=this.namespaces(),e=this.namespaceId();if(t.length)if(e){let n=t.find(i=>i.id===e);this.selectedNamespace.set(n??t[0]??null)}else{let n=t[0];n?.id&&this.router.navigate(["/agentos/home"],{queryParams:{ns:n.id},replaceUrl:!0})}})}toggleNsMenu(t){t?.stopPropagation(),t?.preventDefault(),this.nsMenuOpen.update(e=>!e)}closeNsMenu(t){t.stopPropagation(),this.nsMenuOpen.set(!1)}onNamespaceSelected(t){this.selectedNamespace.set(t),this.nsMenuOpen.set(!1),this.router.navigate(["/agentos/home"],{queryParams:{ns:t.id}})}onCaseSelected(t){this.router.navigate(["/agentos/home"],{queryParams:{ns:this.namespaceId(),case:t}})}onCreateRequested(){this.router.navigate(["/agentos/home"],{queryParams:{ns:this.namespaceId()}})}navigateHome(){this.router.navigate(["/agentos/home"])}navigateToNamespaces(){this.router.navigate(["/agentos/namespaces"])}navigateToAdmin(){this.router.navigate(["/agentos/admin"])}navigateToProfile(){this.router.navigate(["/agentos/user"])}toggleTheme(){let t=this.isDark()?"light":"dark";this.themePort.setTheme(t)}toggleMenu(t){t?.stopPropagation(),t?.preventDefault(),this.menuOpen.update(e=>!e)}closeMenu(t){t.stopPropagation(),this.menuOpen.set(!1)}onMenuNavigate(t){this.menuOpen.set(!1),this.router.navigate([t])}onMenuToggleTheme(){this.menuOpen.set(!1),this.toggleTheme()}onMenuToggleLogs(){this.menuOpen.set(!1),this.showTechnical.update(t=>!t)}toggleMobileSwitcher(){this.mobileSwitcherOpen.update(t=>!t)}onMobileCaseSelect(t){this.mobileSwitcherOpen.set(!1),this.onCaseSelected(t)}onMobileCreateCase(){this.mobileSwitcherOpen.set(!1),this.onCreateRequested()}activeCaseTitle=k(()=>{let t=this.activeCaseId();return t?this.cases().find(n=>n.id===t)?.title??t:"New case"});activeCaseStatus=k(()=>{let t=this.activeCaseId();if(!t)return"idle";let e=this.cases().find(n=>n.id===t);return this.deriveMobileStatus(e?.status)});activeCaseStatusLabel=k(()=>{let t=this.activeCaseId();return t?this.cases().find(n=>n.id===t)?.status?.toLowerCase()??"":""});deriveMobileStatus(t){switch(t){case"RUNNING":return"run";case"KILLED":return"killed";case"ERROR":return"error";default:return"idle"}}onResizeStart(t){t.preventDefault();let e=t.clientX,n=this.sidebarWidth(),i=v=>{let _=v.clientX-e,p=Math.max(200,Math.min(500,n+_));this.sidebarWidth.set(p)},d=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",d)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",d)}refreshCases(){this.refresh$.next()}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=N({type:o,selectors:[["agentos-case-shell"]],decls:50,vars:17,consts:[[1,"case-shell"],[1,"case-shell__mobile-topbar"],[1,"case-shell__mobile-brand"],["type","button","title","Home",1,"case-shell__brand","case-shell__brand--mobile",3,"click"],["src","CODAY-Logo.png","alt","Coday",1,"case-shell__logo-img"],[1,"case-shell__logo-text"],[1,"case-shell__mobile-sep"],[1,"case-shell__mobile-ns-wrap"],["type","button",1,"case-shell__mobile-ns",3,"click"],[1,"case-shell__mobile-chevron"],["tabindex","0","role","button","aria-label","User menu",1,"case-shell__mobile-avatar",3,"click","keyup.enter"],[1,"case-shell__mobile-switcher"],["tabindex","0","role","button",1,"case-shell__mobile-switcher-trigger",3,"click","keyup.enter"],[1,"case-shell__mobile-dot"],[1,"case-shell__mobile-case-title"],[1,"case-shell__mobile-case-status"],[1,"case-shell__mobile-switcher-list"],[1,"case-shell__sidebar"],[1,"case-shell__sb-top"],["type","button","title","Home",1,"case-shell__brand",3,"click"],[1,"case-shell__user-menu"],["type","button","title","Menu",1,"case-shell__user-btn",3,"click"],[1,"case-shell__ns-wrap"],[1,"case-shell__ns-label"],[1,"case-shell__ns-picker"],[1,"case-shell__ns-name-static"],[1,"case-shell__cases-scroll"],[3,"caseSelected","createRequested","cases","activeCaseId"],["role","separator","tabindex","-1","aria-label","Resize sidebar",1,"case-shell__resize-handle",3,"mousedown"],[1,"case-shell__main"],[3,"showTechnicalOverride"],["role","presentation","tabindex","-1",1,"case-shell__ns-backdrop",3,"click","keyup.escape"],[1,"case-shell__ns-menu","case-shell__ns-menu--mobile"],[1,"case-shell__ns-item",3,"case-shell__ns-item--active"],[1,"case-shell__ns-item",3,"click"],[1,"case-shell__ns-dot"],[1,"case-shell__ns-item-name"],["role","presentation","tabindex","-1",1,"case-shell__menu-backdrop",3,"click","keyup.escape"],[1,"case-shell__menu-overlay","case-shell__menu-overlay--mobile"],["type","button",1,"case-shell__menu-item",3,"click"],["type","button",1,"case-shell__menu-item"],[1,"case-shell__menu-separator"],["tabindex","0","role","button",1,"case-shell__mobile-switcher-item","case-shell__mobile-switcher-item--new",3,"click","keyup.enter"],[1,"case-shell__mobile-new-icon"],["tabindex","0","role","button",1,"case-shell__mobile-switcher-item"],["tabindex","0","role","button",1,"case-shell__mobile-switcher-item",3,"click","keyup.enter"],[1,"case-shell__menu-overlay"],[1,"case-shell__ns-trigger",3,"click"],[1,"case-shell__ns-name"],[1,"case-shell__ns-chevron"],[1,"case-shell__ns-menu"]],template:function(e,n){if(e&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"button",3),m("click",function(){return n.navigateHome()}),w(4,"img",4),a(5,"span",5),c(6,"Coday"),r()(),a(7,"span",6),c(8,"/"),r(),a(9,"div",7)(10,"button",8),m("click",function(d){return n.toggleNsMenu(d)}),c(11),a(12,"span",9),c(13,"\u25BE"),r()(),u(14,Ot,4,0),r()(),a(15,"div",10),m("click",function(d){return n.toggleMenu(d)})("keyup.enter",function(){return n.toggleMenu()}),c(16),r(),u(17,Rt,14,4),r(),a(18,"div",11)(19,"div",12),m("click",function(){return n.toggleMobileSwitcher()})("keyup.enter",function(){return n.toggleMobileSwitcher()}),w(20,"span",13),a(21,"span",14),c(22),r(),a(23,"span",15),c(24),r(),a(25,"span",9),c(26,"\u2304"),r()(),u(27,Ft,8,0,"div",16),r(),a(28,"aside",17)(29,"div",18)(30,"button",19),m("click",function(){return n.navigateHome()}),w(31,"img",4),a(32,"span",5),c(33,"Coday"),r()(),a(34,"div",20)(35,"button",21),m("click",function(d){return n.toggleMenu(d)}),u(36,At,1,1)(37,zt,1,0),r(),u(38,Ht,14,4),r()(),a(39,"div",22)(40,"div",23),c(41,"Namespace"),r(),u(42,jt,8,2,"div",24)(43,Qt,2,1,"span",25),r(),a(44,"div",26)(45,"agentos-case-drawer",27),m("caseSelected",function(d){return n.onCaseSelected(d)})("createRequested",function(){return n.onCreateRequested()}),r()()(),a(46,"div",28),m("mousedown",function(d){return n.onResizeStart(d)}),r(),a(47,"main",29),u(48,Gt,1,1,"agentos-case-chat",30)(49,Kt,1,0,"agentos-case-home"),r()()),e&2){let i;s(11),A(" ",((i=n.selectedNamespace())==null?null:i.name)??""),s(3),h(n.nsMenuOpen()?14:-1),s(2),A(" ",n.userInitials()||"\xB7\xB7\xB7"," "),s(),h(n.menuOpen()?17:-1),s(3),de("case-shell__mobile-dot--"+n.activeCaseStatus()),s(2),f(n.activeCaseTitle()),s(2),f(n.activeCaseStatusLabel()),s(3),h(n.mobileSwitcherOpen()?27:-1),s(),K("width",n.sidebarWidth(),"px"),s(8),h(n.userInitials()?36:37),s(2),h(n.menuOpen()?38:-1),s(4),h(n.showNsPicker()?42:43),s(3),S("cases",n.cases())("activeCaseId",n.activeCaseId()),s(3),h(n.activeCaseId()?48:49)}},dependencies:[oe,ae,re],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;height:100dvh}.case-shell[_ngcontent-%COMP%]{display:flex;height:100%;overflow:hidden}.case-shell__sidebar[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden;border-right:1px solid var(--color-border, rgba(0, 0, 0, .09));background:var(--color-bg, #f4f3ef);flex-shrink:0}.case-shell__sb-top[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:14px 12px 6px;flex-shrink:0}.case-shell__brand[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:4px 6px;border-radius:8px;border:none;background:transparent;cursor:pointer;transition:background .14s}.case-shell__brand[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .05))}.case-shell__logo-img[_ngcontent-%COMP%]{width:24px;height:24px;border-radius:6px;object-fit:contain}.case-shell__logo-text[_ngcontent-%COMP%]{font-size:1rem;font-weight:800;letter-spacing:-.02em;color:var(--color-text, #1b1916);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.case-shell__user-menu[_ngcontent-%COMP%]{position:relative;flex-shrink:0}.case-shell__user-btn[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:50%;border:1px solid var(--color-border, rgba(0, 0, 0, .09));background:color-mix(in srgb,var(--color-primary, #016b71) 15%,transparent);cursor:pointer;display:grid;place-items:center;font-size:.7rem;font-weight:700;letter-spacing:.02em;color:var(--color-primary, #016b71);transition:all .14s}.case-shell__user-btn[_ngcontent-%COMP%]:hover{background:color-mix(in srgb,var(--color-primary, #016b71) 25%,transparent)}.case-shell__menu-backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:199}.case-shell__menu-overlay[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 6px);right:0;min-width:180px;background:var(--color-bg, #f4f3ef);border:1px solid var(--color-border, rgba(0, 0, 0, .09));border-radius:14px;padding:6px;z-index:200;box-shadow:0 6px 20px #00000017,0 1px 4px #0000000d}.case-shell__menu-item[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;gap:8px;padding:9px 10px;border-radius:10px;border:none;background:transparent;cursor:pointer;color:var(--color-text, #1b1916);font:inherit;font-size:.8rem;text-align:left;transition:all .13s}.case-shell__menu-item[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .05))}.case-shell__menu-item--active[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-primary, #016b71) 12%,transparent);color:var(--color-primary, #016b71)}.case-shell__menu-separator[_ngcontent-%COMP%]{height:1px;background:var(--color-border, rgba(0, 0, 0, .09));margin:4px 6px}.case-shell__resize-handle[_ngcontent-%COMP%]{width:4px;flex-shrink:0;cursor:col-resize;background:var(--color-border, rgba(0, 0, 0, .09));transition:background .15s;position:relative;z-index:10}.case-shell__resize-handle[_ngcontent-%COMP%]:hover, .case-shell__resize-handle[_ngcontent-%COMP%]:active{background:var(--color-primary, #016b71)}.case-shell__ns-wrap[_ngcontent-%COMP%]{padding:12px 12px 6px;position:relative}.case-shell__ns-label[_ngcontent-%COMP%]{padding:0 2px 7px;font-size:.7rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--color-text-tertiary, #5a5449)}.case-shell__ns-picker[_ngcontent-%COMP%]{position:relative}.case-shell__ns-trigger[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:12px;border:1px solid var(--color-border, rgba(0, 0, 0, .09));background:var(--color-bg-secondary, #faf9f7);cursor:pointer;color:var(--color-text, #1b1916);transition:all .15s;font:inherit;font-size:.82rem;font-weight:700}.case-shell__ns-trigger[_ngcontent-%COMP%]:hover{border-color:var(--color-border-light, rgba(0, 0, 0, .15))}.case-shell__ns-dot[_ngcontent-%COMP%]{width:10px;height:10px;border-radius:50%;background:var(--color-primary, #5aadb5);flex-shrink:0}.case-shell__ns-name[_ngcontent-%COMP%]{flex:1;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.case-shell__ns-chevron[_ngcontent-%COMP%]{color:var(--color-text-secondary, #968f85);font-size:.75rem}.case-shell__ns-menu[_ngcontent-%COMP%]{position:absolute;left:0;right:0;top:calc(100% + 4px);background:var(--color-bg, #f4f3ef);border:1px solid var(--color-border, rgba(0, 0, 0, .09));border-radius:14px;padding:6px;z-index:100;box-shadow:0 6px 20px #00000017,0 1px 4px #0000000d}.case-shell__ns-item[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;gap:10px;padding:10px;border-radius:10px;border:none;background:transparent;cursor:pointer;color:var(--color-text, #1b1916);font:inherit;font-size:.8rem;transition:all .13s}.case-shell__ns-item[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .05))}.case-shell__ns-item--active[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-primary, #016b71) 12%,transparent);color:var(--color-primary, #016b71)}.case-shell__ns-item-name[_ngcontent-%COMP%]{flex:1;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.case-shell__ns-name-static[_ngcontent-%COMP%]{display:block;padding:10px 12px;font-size:.82rem;font-weight:700;color:var(--color-text, #1b1916);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.case-shell__cases-scroll[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding-bottom:16px}.case-shell__cases-scroll[_ngcontent-%COMP%]::-webkit-scrollbar{width:4px}.case-shell__cases-scroll[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--color-border-light, rgba(255, 255, 255, .12));border-radius:999px}.case-shell__main[_ngcontent-%COMP%]{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}.case-shell__main[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1;min-height:0}.case-shell__mobile-topbar[_ngcontent-%COMP%], .case-shell__mobile-switcher[_ngcontent-%COMP%]{display:none}@media(max-width:900px){.case-shell[_ngcontent-%COMP%]{flex-direction:column;overflow:hidden}.case-shell__sidebar[_ngcontent-%COMP%], .case-shell__resize-handle[_ngcontent-%COMP%]{display:none!important}.case-shell__mobile-topbar[_ngcontent-%COMP%], .case-shell__mobile-switcher[_ngcontent-%COMP%]{display:flex;flex-shrink:0}.case-shell__mobile-topbar[_ngcontent-%COMP%]{position:relative;align-items:center;justify-content:space-between;gap:8px;padding:0 16px;min-height:44px;border-bottom:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--color-bg, #fff)}.case-shell__mobile-brand[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;min-width:0;flex:1;overflow:hidden}.case-shell__brand--mobile[_ngcontent-%COMP%]{flex:none;padding:0}.case-shell__brand--mobile[_ngcontent-%COMP%] .case-shell__logo-img[_ngcontent-%COMP%]{width:20px;height:20px}.case-shell__brand--mobile[_ngcontent-%COMP%] .case-shell__logo-text[_ngcontent-%COMP%]{font-size:.82rem}.case-shell__mobile-sep[_ngcontent-%COMP%]{color:#00000040;font:400 12px Inter,sans-serif;flex:none}.case-shell__mobile-ns-wrap[_ngcontent-%COMP%]{position:static;min-width:0}.case-shell__mobile-ns[_ngcontent-%COMP%]{font:600 12.5px Inter,sans-serif;color:var(--color-text, #161616);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;gap:3px;cursor:pointer;background:none;border:none;padding:0}.case-shell__ns-backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:299}.case-shell__ns-menu--mobile[_ngcontent-%COMP%]{position:fixed;top:44px;left:16px;min-width:180px;z-index:300}.case-shell__mobile-avatar[_ngcontent-%COMP%]{width:44px;height:44px;border-radius:50%;background:#dfedff;background:oklch(94% .03 255deg);border:1px solid oklch(82% .06 255deg);color:#2a5fc9;display:flex;align-items:center;justify-content:center;font:600 10px Inter,sans-serif;flex:none;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative}.case-shell__mobile-avatar[_ngcontent-%COMP%]:after{content:"";position:absolute;inset:0;border-radius:50%}.case-shell__mobile-chevron[_ngcontent-%COMP%]{color:#00000059;font-size:9px;flex:none}.case-shell__menu-overlay--mobile[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 4px);right:16px;left:auto;z-index:300}.case-shell__mobile-switcher[_ngcontent-%COMP%]{flex-direction:column;border-bottom:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--color-bg, #fff)}.case-shell__mobile-switcher-trigger[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px;padding:10px 16px;min-height:44px;cursor:pointer;-webkit-user-select:none;user-select:none}.case-shell__mobile-switcher-trigger[_ngcontent-%COMP%]:hover{background:#00000005}.case-shell__mobile-case-title[_ngcontent-%COMP%]{font:600 12.5px Inter,sans-serif;color:var(--color-text, #161616);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.case-shell__mobile-case-status[_ngcontent-%COMP%]{font:400 11px Inter,sans-serif;color:#0006;flex:none}.case-shell__mobile-switcher-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;border-top:1px solid rgba(0,0,0,.06);max-height:60vh;overflow-y:auto}.case-shell__mobile-switcher-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px;padding:0 16px;height:44px;flex-shrink:0;cursor:pointer}.case-shell__mobile-switcher-item[_ngcontent-%COMP%] .case-shell__mobile-case-title[_ngcontent-%COMP%]{font-weight:500;color:#000000b3}.case-shell__mobile-switcher-item[_ngcontent-%COMP%]:hover{background:#00000008}.case-shell__mobile-switcher-item--new[_ngcontent-%COMP%]{border-bottom:1px solid var(--color-border, rgba(0, 0, 0, .08))}.case-shell__mobile-switcher-item--new[_ngcontent-%COMP%] .case-shell__mobile-case-title[_ngcontent-%COMP%]{font-weight:600;color:var(--color-primary, #016b71)}.case-shell__mobile-new-icon[_ngcontent-%COMP%]{width:6px;height:6px;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:300;color:var(--color-primary, #016b71);flex:none}.case-shell__mobile-dot[_ngcontent-%COMP%]{width:6px;height:6px;border-radius:50%;flex:none}.case-shell__mobile-dot--run[_ngcontent-%COMP%]{background:#2a9d4a}.case-shell__mobile-dot--idle[_ngcontent-%COMP%]{background:#0003}.case-shell__mobile-dot--killed[_ngcontent-%COMP%], .case-shell__mobile-dot--error[_ngcontent-%COMP%]{background:#dc2614}.case-shell__main[_ngcontent-%COMP%]{flex:1;min-height:0;overflow:hidden}}'],changeDetection:0})};export{oe as a,ae as b,re as c,Fe as d};
|