@whoz-oss/coday-client 1.3.4 → 1.3.7

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.
Files changed (70) hide show
  1. package/browser/{chunk-BbOdBhQy.js → chunk-9ZIVSIz9.js} +1 -1
  2. package/browser/{chunk-Brj8HlXc.js → chunk-ALF3Etyg.js} +1 -1
  3. package/browser/{chunk-3QjpTDpt.js → chunk-ALup_Ly_.js} +1 -1
  4. package/browser/{chunk-CekA5yLC.js → chunk-B1vCx0Aw.js} +1 -1
  5. package/browser/{chunk-CTjZECqR.js → chunk-B5WBKaLQ.js} +1 -1
  6. package/browser/{chunk-DLhvPTZP.js → chunk-B5hayZW5.js} +1 -1
  7. package/browser/{chunk-_Wj2M8II.js → chunk-BC3HH9Va.js} +1 -1
  8. package/browser/{chunk-i62b6Gtt.js → chunk-BIPTZVDt.js} +1 -1
  9. package/browser/{chunk-_kolzKbl.js → chunk-BJDJk0Qw.js} +1 -1
  10. package/browser/{chunk-Cy-MbcIf.js → chunk-BOeKkAt9.js} +1 -1
  11. package/browser/{chunk-Cek4dv2K.js → chunk-BPJN1TJ6.js} +1 -1
  12. package/browser/{chunk-Bc_JiT75.js → chunk-BUhk1lXE.js} +1 -1
  13. package/browser/{chunk-Cm42_zF7.js → chunk-BXjEydcy.js} +1 -1
  14. package/browser/{chunk-CH0b9ss9.js → chunk-B_mBd-rJ.js} +1 -1
  15. package/browser/{chunk-CbSC-SSJ.js → chunk-BaLweBz6.js} +1 -1
  16. package/browser/{chunk-D1ggthOI.js → chunk-BabsTpOI.js} +1 -1
  17. package/browser/{chunk-By4bK8Lp.js → chunk-Bgpsos5f.js} +1 -1
  18. package/browser/{chunk-CpMYZ9dG.js → chunk-BmuS0ENl.js} +1 -1
  19. package/browser/{chunk-eqpKdy80.js → chunk-BpE5xudb.js} +1 -1
  20. package/browser/{chunk-vkYtcaIT.js → chunk-BqE69IJ1.js} +1 -1
  21. package/browser/{chunk-DgFkTqkZ.js → chunk-Br-xdmwY.js} +1 -1
  22. package/browser/{chunk-hL6iczXD.js → chunk-BunwHHGw.js} +1 -1
  23. package/browser/{chunk-DXVBbChn.js → chunk-BxdDXOEe.js} +1 -1
  24. package/browser/{chunk-8RFsf09R.js → chunk-C6kRPJL_.js} +1 -1
  25. package/browser/{chunk-CeTVH-vp.js → chunk-C6mFVPqf.js} +1 -1
  26. package/browser/{chunk-C8qVsVH8.js → chunk-CLDRxFlZ.js} +1 -1
  27. package/browser/{chunk-BxT6IsjS.js → chunk-CMmtnH6_.js} +1 -1
  28. package/browser/{chunk-DpRS0jIN.js → chunk-CNG_Bi14.js} +1 -1
  29. package/browser/{chunk-CTx3Z0hA.js → chunk-CTyQQD3V.js} +1 -1
  30. package/browser/{chunk-X4zIHpcE.js → chunk-CZnExQ8R.js} +1 -1
  31. package/browser/{chunk-BDqV-dXo.js → chunk-Cd2C0rIT.js} +1 -1
  32. package/browser/{chunk-BYAMVo7F.js → chunk-CfYSvYjI.js} +1 -1
  33. package/browser/{chunk-7IEj5tud.js → chunk-CgvdMQUi.js} +1 -1
  34. package/browser/{chunk-OpV-oEpT.js → chunk-Ckg9-rFg.js} +1 -1
  35. package/browser/{chunk-BGM4NjUk.js → chunk-CnkX6sMv.js} +1 -1
  36. package/browser/{chunk-CywonzJi.js → chunk-CubZY2rj.js} +1 -1
  37. package/browser/{chunk-CisLHTrk.js → chunk-D26OOz0C.js} +1 -1
  38. package/browser/{chunk-_si25xRH.js → chunk-D4ES5TMV.js} +1 -1
  39. package/browser/{chunk-BhKcjruH.js → chunk-D73vXOHn.js} +1 -1
  40. package/browser/chunk-D8_VVodV.js +1 -0
  41. package/browser/{chunk-9rFJllaP.js → chunk-D9kPNzC_.js} +1 -1
  42. package/browser/{chunk-CJpYYZh2.js → chunk-DCFeDlSq.js} +1 -1
  43. package/browser/{chunk-DWrJdp3G.js → chunk-DDhqox9Y.js} +1 -1
  44. package/browser/{chunk-DJz2cMcV.js → chunk-DLXvIMAi.js} +1 -1
  45. package/browser/{chunk-BfoCTjUr.js → chunk-DNDvYXLF.js} +1 -1
  46. package/browser/{chunk-Cb82rqle.js → chunk-DPOrpckU.js} +5 -5
  47. package/browser/{chunk-CFw8eyQX.js → chunk-DPfl06Mj.js} +1 -1
  48. package/browser/{chunk-S_TYzsa6.js → chunk-DW0qghBO.js} +1 -1
  49. package/browser/{chunk-DoS8-ZTX.js → chunk-DYB4CuDq.js} +1 -1
  50. package/browser/{chunk-Lluy_pM_.js → chunk-D_f8A0gu.js} +1 -1
  51. package/browser/{chunk-BMBD8g8i.js → chunk-DaR7d7B8.js} +1 -1
  52. package/browser/{chunk-eCkjwC-y.js → chunk-DajFJ9f4.js} +1 -1
  53. package/browser/{chunk-B3mPWOwM.js → chunk-Dd1MXCU4.js} +1 -1
  54. package/browser/{chunk-Bj9y8qST.js → chunk-DdQGvevi.js} +1 -1
  55. package/browser/{chunk-CInfUnUL.js → chunk-DhQrwAbV.js} +1 -1
  56. package/browser/{chunk-DvV6rFWO.js → chunk-DiDEqeDl.js} +1 -1
  57. package/browser/{chunk-DVSN51SP.js → chunk-DtIy18G6.js} +1 -1
  58. package/browser/{chunk-CrExrE4n.js → chunk-DvruZLJd.js} +1 -1
  59. package/browser/{chunk-NPBU5yIa.js → chunk-DxrUPGvH.js} +1 -1
  60. package/browser/{chunk-CsvLyu6R.js → chunk-Dz0byKBh.js} +1 -1
  61. package/browser/{chunk-zyGtaVKQ.js → chunk-DzItpRbk.js} +1 -1
  62. package/browser/{chunk-CVuNrNOH.js → chunk-Fa0LLSZf.js} +1 -1
  63. package/browser/{chunk-CXVQ4M5H.js → chunk-IeUdKidF.js} +1 -1
  64. package/browser/{chunk-DFaRJnOg.js → chunk-OltVHUw7.js} +1 -1
  65. package/browser/{chunk-hcl2JPuw.js → chunk-XZia3sF0.js} +1 -1
  66. package/browser/{chunk-xk_bqNV0.js → chunk-j91G9621.js} +1 -1
  67. package/browser/index.html +1 -1
  68. package/browser/{main-FEA3BAHM.js → main-5DW6JQ3Z.js} +1 -1
  69. package/package.json +1 -1
  70. package/browser/chunk-Cm35aeo6.js +0 -1
@@ -1 +1 @@
1
- import {O}from'./chunk-CFw8eyQX.js';import {g,ao as V$1,G as G$1,w as we,d7 as M,aI as Tr,H as Hi,bR as ma,Q as By,a7 as ga,S as ha,u as ue,b as U$1,A as Aw,aJ as Nb,v as vs,be as aT,l as Ag,W as WC,k as fl,af as Dg,T as TC,r as Tg,bf as uT,ah as rT,n as eC,ac as mC,t as tC,a9 as dC,aa as If,ab as wf,ag as fT}from'./main-FEA3BAHM.js';import {W as Wn}from'./chunk-DXVBbChn.js';import'./chunk-BxT6IsjS.js';import'./chunk-DFaRJnOg.js';var U=()=>[];function V(i,t){if(i&1){let n=dC();vs(0,"agentos-agent-config-item",4),Ag("deleteRequested",function(o){If(n);let F=mC(2);return wf(F.deleteConfig(o))}),fl();}if(i&2){let n=mC().$implicit,e=mC();Tg("config",t)("namespaceId",e.namespaceId)("readOnly",e.isPlatformConfig(n.id));}}function j(i,t){if(i&1&&eC(0,V,1,3,"agentos-agent-config-item",3),i&2){let n,e=t.$implicit,o=mC();tC((n=o.resolveConfig(e.id))?0:-1,n);}}var G="namespace",K="platform",q=class i{route=g(V$1);router=g(G$1);destroyRef=g(we);agentConfigController=g(M);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new Tr(void 0);isLoading=Hi(true);allConfigs$=this.refresh$.pipe(ma(()=>(this.isLoading.set(true),By({namespace:this.agentConfigController.listByParentAgentConfig(this.namespaceId),platform:this.agentConfigController.listPlatformAgentsAgentConfig().pipe(ga(()=>ha([])))}))));configItems$=this.allConfigs$.pipe(ue(({namespace:t,platform:n})=>[...n.map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:K,groupLabel:"Platform (read-only)"})),...t.map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:G,groupLabel:"Namespace"}))]));namespaceConfigsById=new Map;platformConfigsById=new Map;constructor(){this.allConfigs$.pipe(U$1(this.destroyRef)).subscribe({next:({namespace:t,platform:n})=>{this.namespaceConfigsById=new Map(t.map(e=>[e.id??"",e])),this.platformConfigsById=new Map(n.map(e=>[e.id??"",e])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","namespaces"]);}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"agent-configs","new"]);}deleteConfig(t){this.agentConfigController.deleteAgentConfig(t.id??"").pipe(U$1(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolveConfig(t){return this.namespaceConfigsById.get(t)??this.platformConfigsById.get(t)??null}isPlatformConfig(t){return this.platformConfigsById.has(t)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=Aw({type:i,selectors:[["agentos-namespace-agent-configs"]],decls:6,vars:7,consts:[["agentConfigItemTpl",""],["title","Agent Configs","emptyMessage","No agent configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","type","button",1,"namespace-agent-configs__back",3,"click"],[3,"config","namespaceId","readOnly"],[3,"deleteRequested","config","namespaceId","readOnly"]],template:function(n,e){if(n&1&&(vs(0,"ds-entity-list",1),aT(1,"async"),Ag("createRequested",function(){return e.openCreateForm()}),vs(2,"button",2),Ag("click",function(){return e.goBack()}),WC(3," \u2190 Namespaces "),fl()(),Dg(4,j,1,1,"ng-template",null,0,fT)),n&2){let o=TC(5);Tg("items",uT(1,4,e.configItems$)??rT(6,U))("loading",e.isLoading())("showCreate",true)("itemTemplate",o);}},dependencies:[Wn,O,Nb],styles:[".namespace-agent-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.namespace-agent-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})};export{q as NamespaceAgentConfigsComponent};
1
+ import {O}from'./chunk-DPfl06Mj.js';import {g,ao as V$1,G as G$1,w as we,d7 as M,aI as Tr,H as Hi,bR as ma,Q as By,a7 as ga,S as ha,u as ue,b as U$1,A as Aw,aJ as Nb,v as vs,be as aT,l as Ag,W as WC,k as fl,af as Dg,T as TC,r as Tg,bf as uT,ah as rT,n as eC,ac as mC,t as tC,a9 as dC,aa as If,ab as wf,ag as fT}from'./main-5DW6JQ3Z.js';import {W as Wn}from'./chunk-BxdDXOEe.js';import'./chunk-CMmtnH6_.js';import'./chunk-OltVHUw7.js';var U=()=>[];function V(i,t){if(i&1){let n=dC();vs(0,"agentos-agent-config-item",4),Ag("deleteRequested",function(o){If(n);let F=mC(2);return wf(F.deleteConfig(o))}),fl();}if(i&2){let n=mC().$implicit,e=mC();Tg("config",t)("namespaceId",e.namespaceId)("readOnly",e.isPlatformConfig(n.id));}}function j(i,t){if(i&1&&eC(0,V,1,3,"agentos-agent-config-item",3),i&2){let n,e=t.$implicit,o=mC();tC((n=o.resolveConfig(e.id))?0:-1,n);}}var G="namespace",K="platform",q=class i{route=g(V$1);router=g(G$1);destroyRef=g(we);agentConfigController=g(M);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new Tr(void 0);isLoading=Hi(true);allConfigs$=this.refresh$.pipe(ma(()=>(this.isLoading.set(true),By({namespace:this.agentConfigController.listByParentAgentConfig(this.namespaceId),platform:this.agentConfigController.listPlatformAgentsAgentConfig().pipe(ga(()=>ha([])))}))));configItems$=this.allConfigs$.pipe(ue(({namespace:t,platform:n})=>[...n.map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:K,groupLabel:"Platform (read-only)"})),...t.map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:G,groupLabel:"Namespace"}))]));namespaceConfigsById=new Map;platformConfigsById=new Map;constructor(){this.allConfigs$.pipe(U$1(this.destroyRef)).subscribe({next:({namespace:t,platform:n})=>{this.namespaceConfigsById=new Map(t.map(e=>[e.id??"",e])),this.platformConfigsById=new Map(n.map(e=>[e.id??"",e])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","namespaces"]);}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"agent-configs","new"]);}deleteConfig(t){this.agentConfigController.deleteAgentConfig(t.id??"").pipe(U$1(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolveConfig(t){return this.namespaceConfigsById.get(t)??this.platformConfigsById.get(t)??null}isPlatformConfig(t){return this.platformConfigsById.has(t)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=Aw({type:i,selectors:[["agentos-namespace-agent-configs"]],decls:6,vars:7,consts:[["agentConfigItemTpl",""],["title","Agent Configs","emptyMessage","No agent configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","type","button",1,"namespace-agent-configs__back",3,"click"],[3,"config","namespaceId","readOnly"],[3,"deleteRequested","config","namespaceId","readOnly"]],template:function(n,e){if(n&1&&(vs(0,"ds-entity-list",1),aT(1,"async"),Ag("createRequested",function(){return e.openCreateForm()}),vs(2,"button",2),Ag("click",function(){return e.goBack()}),WC(3," \u2190 Namespaces "),fl()(),Dg(4,j,1,1,"ng-template",null,0,fT)),n&2){let o=TC(5);Tg("items",uT(1,4,e.configItems$)??rT(6,U))("loading",e.isLoading())("showCreate",true)("itemTemplate",o);}},dependencies:[Wn,O,Nb],styles:[".namespace-agent-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.namespace-agent-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})};export{q as NamespaceAgentConfigsComponent};
@@ -1 +1 @@
1
- import {N}from'./chunk-BYAMVo7F.js';import {g,ao as V,G,w as we,d7 as M,dk as G$1,d5 as F,H as Hi,Q as By,S as ha,b as U,u as ue$1,a7 as ga,z as z$1,a as P,A as Aw,s as si,v as vs,l as Ag,W as WC,k as fl,n as eC,X as XE,a8 as Zg,t as tC,ac as mC,r as Tg,a9 as dC,o as bg,a3 as HI,a6 as $I,a5 as yl,q as oC,x as iC,bn as nC,aa as If,ab as wf,C as Cg}from'./main-FEA3BAHM.js';import'./chunk-Cb82rqle.js';import {o as z,k as _t,b as _e$1,n as ni,J as Jn,Q as Qn,e as ei,Y as Ye,a as wt,Z as Zn,l as Xn,C as Cn,E as En}from'./chunk-DFaRJnOg.js';import'./chunk-Cm35aeo6.js';import'./chunk-Lluy_pM_.js';import'./chunk-DXVBbChn.js';import'./chunk-BxT6IsjS.js';var le=(r,t)=>t.config.id,ce=(r,t)=>t.type;function ge(r,t){if(r&1&&(vs(0,"a",5),WC(1,"View resolved definition \u2192"),fl()),r&2){let e=mC();Tg("routerLink",e.inspectRoute());}}function se(r,t){r&1&&(vs(0,"span",6),WC(1,"Platform level"),fl());}function de(r,t){r&1&&(vs(0,"p",7),WC(1,"Loading\u2026"),fl());}function me(r,t){if(r&1&&(vs(0,"span",41),WC(1),fl()),r&2){let e=mC().$implicit;XE(),Zg(e.config.integrationType);}}function fe(r,t){if(r&1&&(bg(0,"input",42),HI()),r&2){let e=mC().$implicit;Tg("formControl",e.toolsControl),$I();}}function pe(r,t){if(r&1){let e=dC();vs(0,"div",37)(1,"label",38)(2,"input",39),Ag("change",function(){let l=If(e).$implicit,g=mC(3);return wf(g.toggleIntegration(l))}),fl(),vs(3,"span",40),WC(4),fl(),eC(5,me,2,1,"span",41),fl(),eC(6,fe,1,1,"input",42),fl();}if(r&2){let e=t.$implicit;XE(2),Tg("checked",e.enabled()),XE(2),Zg(e.config.name),XE(),tC(e.config.integrationType?5:-1),XE(),tC(e.enabled()?6:-1);}}function _e(r,t){if(r&1&&(vs(0,"p",48),WC(1),fl()),r&2){let e=mC().$implicit;XE(),yl(" Restricted to: ",e.restrictedTools.join(", ")," (set outside this form, preserved on save) ");}}function ue(r,t){if(r&1){let e=dC();vs(0,"div",37)(1,"label",38)(2,"span",40),WC(3),fl(),vs(4,"span",41),WC(5,"built-in"),fl()(),vs(6,"select",44),Ag("change",function(l){let g=If(e).$implicit,m=mC(4);return wf(m.setBuiltInState(g,l.target.value))}),vs(7,"option",45),WC(8),fl(),vs(9,"option",46),WC(10,"Enabled"),fl(),vs(11,"option",47),WC(12,"Disabled"),fl()(),eC(13,_e,2,1,"p",48),vs(14,"p",49),WC(15),fl()();}if(r&2){let e=t.$implicit,o=mC(4);XE(),Cg("for","built-in-"+e.type),XE(2),Zg(e.displayName),XE(3),Tg("id","built-in-"+e.type)("value",e.state()),XE(2),Zg(o.builtInDefaultLabel(e)),XE(5),tC(e.state()==="on"&&e.restrictedTools?13:-1),XE(2),Zg(e.description);}}function be(r,t){if(r&1&&(vs(0,"p",43),WC(1,"Built-in integrations"),fl(),oC(2,ue,16,7,"div",37,ce)),r&2){let e=mC(3);XE(2),iC(e.builtInRows());}}function Ce(r,t){if(r&1&&(vs(0,"fieldset",20)(1,"legend",25),WC(2,"Integrations"),fl(),vs(3,"p",36),WC(4," Select which integrations this agent can use. Leave tool names empty to allow all tools from an integration. "),fl(),oC(5,pe,7,4,"div",37,le),eC(7,be,4,0),fl()),r&2){let e=mC(2);XE(5),iC(e.integrationRows()),XE(2),tC(e.builtInRows().length>0?7:-1);}}function xe(r,t){if(r&1){let e=dC();vs(0,"li",50),bg(1,"input",51),HI(),vs(2,"button",52),Ag("click",function(){let l=If(e).$implicit,g=mC(3);return wf(g.removeSubAgent(l))}),WC(3," \u{1F5D1} "),fl()();}if(r&2){let e=t.$implicit;XE(),Tg("formControl",e.control),$I();}}function ye(r,t){if(r&1&&(vs(0,"ul",28),oC(1,xe,4,1,"li",50,nC),fl()),r&2){let e=mC(2);XE(),iC(e.subAgentRows());}}function he(r,t){if(r&1){let e=dC();vs(0,"button",53),Ag("click",function(){If(e);let l=mC(2);return wf(l.exportYaml())}),WC(1),fl();}if(r&2){let e=mC(2);Tg("disabled",e.isExporting()),XE(),yl(" ",e.isExporting()?"Exporting\u2026":"Export as YAML"," ");}}function ve(r,t){if(r&1){let e=dC();vs(0,"form",9),Ag("ngSubmit",function(){If(e);let l=mC();return wf(l.submit())}),vs(1,"div",10)(2,"label",11),WC(3,"Name "),vs(4,"span",12),WC(5,"*"),fl()(),bg(6,"input",13),HI(),fl(),vs(7,"div",10)(8,"label",14),WC(9,"Description"),fl(),bg(10,"input",15),HI(),fl(),vs(11,"div",10)(12,"label",16),WC(13,"Model name"),fl(),bg(14,"input",17),HI(),fl(),vs(15,"div",10)(16,"label",18),WC(17,"Instructions"),fl(),bg(18,"textarea",19),HI(),fl(),eC(19,Ce,8,1,"fieldset",20),vs(20,"div",10)(21,"label",21),bg(22,"input",22),HI(),vs(23,"span",23),WC(24,"Advanced mode"),fl()(),vs(25,"p",24),WC(26," When enabled, this agent uses a multi-step reasoning loop instead of a single LLM call. "),fl()(),vs(27,"div",10)(28,"label",21),bg(29,"input",22),HI(),vs(30,"span",23),WC(31,"Enabled"),fl()(),vs(32,"p",24),WC(33,"Disabled agents are excluded from namespace resolution."),fl()(),vs(34,"div",10)(35,"span",25),WC(36,"Sub-agents"),fl(),vs(37,"p",26),WC(38," Glob patterns for agents this agent may delegate to. "),vs(39,"code",27),WC(40,"*"),fl(),WC(41," matches any sequence of characters (e.g.\xA0"),vs(42,"code",27),WC(43,"*Fixer"),fl(),WC(44,", "),vs(45,"code",27),WC(46,"*"),fl(),WC(47," for all). Leave empty to disable delegation. "),fl(),eC(48,ye,3,0,"ul",28),vs(49,"div",29)(50,"input",30),Ag("keydown.enter",function(){If(e);let l=mC();return wf(l.addSubAgent())}),fl(),HI(),vs(51,"button",31),Ag("click",function(){If(e);let l=mC();return wf(l.addSubAgent())}),WC(52," + "),fl()()(),vs(53,"div",32)(54,"button",33),WC(55),fl(),eC(56,he,2,2,"button",34),vs(57,"button",35),Ag("click",function(){If(e);let l=mC();return wf(l.cancel())}),WC(58,"Cancel"),fl()()();}if(r&2){let e=mC();Tg("formGroup",e.form),XE(6),Tg("formControl",e.nameControl),$I(),XE(4),Tg("formControl",e.descriptionControl),$I(),XE(4),Tg("formControl",e.modelNameControl),$I(),XE(4),Tg("formControl",e.instructionsControl),$I(),XE(),tC(e.integrationRows().length>0||e.builtInRows().length>0?19:-1),XE(3),Tg("formControl",e.advancedExecutionControl),$I(),XE(7),Tg("formControl",e.enabledControl),$I(),XE(19),tC(e.subAgentRows().length>0?48:-1),XE(2),Tg("formControl",e.newSubAgentControl),$I(),XE(),Tg("disabled",!e.newSubAgentControl.value.trim()),XE(3),Tg("disabled",e.form.invalid||e.isSubmitting()),XE(),yl(" ",e.isEditMode()?"Save changes":"Create"," "),XE(),tC(e.isEditMode()?56:-1);}}var ae=class r{route=g(V);router=g(G);destroyRef=g(we);agentConfigController=g(M);exportService=g(G$1);integrationConfigState=g(N);integrationTypeController=g(F);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;form=new z({name:new _t("",{nonNullable:true,validators:[_e$1.required,_e$1.minLength(1)]}),description:new _t(null),modelName:new _t(null),instructions:new _t(null),advancedExecution:new _t(false,{nonNullable:true}),enabled:new _t(false,{nonNullable:true})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get modelNameControl(){return this.form.controls.modelName}get instructionsControl(){return this.form.controls.instructions}get advancedExecutionControl(){return this.form.controls.advancedExecution}get enabledControl(){return this.form.controls.enabled}subAgentRows=Hi([]);newSubAgentControl=new _t("",{nonNullable:true});isEditMode=Hi(false);isSubmitting=Hi(false);isLoading=Hi(false);isExporting=Hi(false);builtInRows=Hi([]);inspectRoute(){let t=this.route.snapshot.paramMap.get("agentConfigId")??"";return this.isPlatformMode?["/agentos","admin","agent-configs",t,"inspect"]:["/agentos",this.namespaceId,"agent-configs",t,"inspect"]}integrationRows=Hi([]);existingConfig=null;ngOnInit(){let t=this.route.snapshot.paramMap.get("agentConfigId");t?(this.isEditMode.set(true),this.loadConfigAndIntegrations(t)):this.loadIntegrations(void 0);}loadConfigAndIntegrations(t){this.isLoading.set(true),By({config:this.agentConfigController.getByIdAgentConfig(t),namespaceIntegrations:this.namespaceId?this.integrationConfigState.loadNamespaceConfigs(this.namespaceId):ha([]),platformIntegrations:this.integrationConfigState.loadPlatformConfigs(),builtInTypes:this.loadBuiltInTypes()}).pipe(U(this.destroyRef)).subscribe({next:({config:e,namespaceIntegrations:o,platformIntegrations:l,builtInTypes:g})=>{this.existingConfig=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.modelNameControl.setValue(e.modelName??null),this.instructionsControl.setValue(e.instructions??null),this.advancedExecutionControl.setValue(e.advancedExecution??false),this.enabledControl.setValue(e.enabled??true);let m=[...l,...o];this.integrationRows.set(this.buildIntegrationRows(m,e.integrations??void 0)),this.builtInRows.set(this.buildBuiltInRows(g,e.integrations??void 0)),this.subAgentRows.set((e.subAgents??[]).map(P=>({control:new _t(P,{nonNullable:true})}))),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}});}loadIntegrations(t){By({namespaceIntegrations:this.namespaceId?this.integrationConfigState.loadNamespaceConfigs(this.namespaceId):ha([]),platformIntegrations:this.integrationConfigState.loadPlatformConfigs(),builtInTypes:this.loadBuiltInTypes()}).pipe(U(this.destroyRef)).subscribe({next:({namespaceIntegrations:e,platformIntegrations:o,builtInTypes:l})=>{let g=[...o,...e];this.integrationRows.set(this.buildIntegrationRows(g,t??void 0)),this.builtInRows.set(this.buildBuiltInRows(l,t??void 0));}});}loadBuiltInTypes(){return this.integrationTypeController.listTypesIntegrationType().pipe(ue$1(t=>t.filter(e=>!e.configSchema)),ga(t=>(console.error("[agent-config-form] failed to load integration types",t),ha([]))))}buildIntegrationRows(t,e){return t.map(o=>{let l=o.name??"",g=e?.[l],m=e!=null&&l in e,P=Array.isArray(g)?g.join(", "):"";return {config:o,enabled:Hi(m),toolsControl:new _t(P,{nonNullable:true})}})}buildBuiltInRows(t,e){return t.map(o=>{let l=e!=null&&o.type in e,g=e?.[o.type],m=l?Array.isArray(g)&&g.length===0?"off":"on":"default";return {type:o.type,displayName:o.displayName,description:o.description,enabledByDefault:o.enabledByDefault===true,state:Hi(m),restrictedTools:Array.isArray(g)&&g.length>0?g:null}})}toggleIntegration(t){t.enabled.update(e=>!e);}setBuiltInState(t,e){t.state.set(e);}builtInDefaultLabel(t){return t.enabledByDefault?"Platform default (enabled)":"Platform default (disabled)"}addSubAgent(){let t=this.newSubAgentControl.value.trim();t&&(this.subAgentRows.update(e=>[...e,{control:new _t(t,{nonNullable:true})}]),this.newSubAgentControl.reset(""));}removeSubAgent(t){this.subAgentRows.update(e=>e.filter(o=>o!==t));}buildSubAgentsPayload(){let t=this.subAgentRows().map(e=>e.control.value.trim()).filter(e=>e.length>0);return t.length>0?t:void 0}buildIntegrationsPayload(){let t={};for(let o of this.integrationRows().filter(l=>l.enabled())){let l=o.config.name??"",g=o.toolsControl.value.trim();t[l]=g===""?null:g.split(",").map(m=>m.trim()).filter(m=>m.length>0);}for(let o of this.builtInRows()){let l=o.state();l==="on"?t[o.type]=o.restrictedTools??null:l==="off"&&(t[o.type]=[]);}let e=new Set([...this.integrationRows().map(o=>o.config.name??""),...this.builtInRows().map(o=>o.type)]);for(let[o,l]of Object.entries(this.existingConfig?.integrations??{}))e.has(o)||(t[o]=l);return Object.keys(t).length>0?t:void 0}submit(){if(this.form.invalid||this.isSubmitting())return;this.addSubAgent(),this.isSubmitting.set(true);let t=z$1(P({},this.existingConfig??{}),{createdOn:this.existingConfig?.createdOn,updatedOn:this.existingConfig?.updatedOn,namespaceId:this.namespaceId,name:this.nameControl.value.trim(),description:this.descriptionControl.value?.trim()||void 0,modelName:this.modelNameControl.value?.trim()||void 0,instructions:this.instructionsControl.value?.trim()||void 0,integrations:this.buildIntegrationsPayload(),advancedExecution:this.advancedExecutionControl.value,enabled:this.enabledControl.value,subAgents:this.buildSubAgentsPayload()});(this.isEditMode()?this.agentConfigController.updateAgentConfig(this.existingConfig.id??"",t):this.agentConfigController.createAgentConfig(t)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}exportYaml(){let t=this.existingConfig?.id;!t||this.isExporting()||(this.isExporting.set(true),this.exportService.exportAsYaml(t).pipe(U(this.destroyRef)).subscribe({next:e=>{let o=new Blob([e],{type:"application/yaml"}),l=URL.createObjectURL(o),g=document.createElement("a");g.href=l,g.download=`${this.existingConfig?.name??"agent"}.yaml`,g.click(),URL.revokeObjectURL(l),this.isExporting.set(false);},error:()=>this.isExporting.set(false)}));}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","agent-configs"]):this.router.navigate(["/agentos",this.namespaceId,"agent-configs"]);}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=Aw({type:r,selectors:[["agentos-agent-config-form"]],decls:12,vars:4,consts:[[1,"agent-config-form"],[1,"agent-config-form__header"],["type","button","title","Back to agent configs",1,"agent-config-form__back",3,"click"],[1,"agent-config-form__back-icon"],[1,"agent-config-form__title"],[1,"agent-config-form__sibling-link",3,"routerLink"],[1,"agent-config-form__platform-badge"],[1,"agent-config-form__loading"],[1,"agent-config-form__form",3,"formGroup"],[1,"agent-config-form__form",3,"ngSubmit","formGroup"],[1,"agent-config-form__field"],["for","agent-config-name",1,"agent-config-form__label"],["aria-hidden","true"],["id","agent-config-name","type","text","placeholder","e.g. Support agent","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-description",1,"agent-config-form__label"],["id","agent-config-description","type","text","placeholder","Optional \u2014 short description of this agent","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-model-name",1,"agent-config-form__label"],["id","agent-config-model-name","type","text","placeholder","Optional \u2014 model alias or name to use","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-instructions",1,"agent-config-form__label"],["id","agent-config-instructions","rows","6","placeholder","Optional \u2014 system instructions for this agent",1,"agent-config-form__textarea",3,"formControl"],[1,"agent-config-form__integrations"],[1,"agent-config-form__toggle-label"],["type","checkbox",1,"agent-config-form__toggle-checkbox",3,"formControl"],[1,"agent-config-form__toggle-text"],[1,"agent-config-form__toggle-hint"],[1,"agent-config-form__label"],[1,"agent-config-form__field-hint"],[1,"agent-config-form__code"],[1,"agent-config-form__sub-agent-list"],[1,"agent-config-form__sub-agent-add"],["type","text","placeholder","e.g. *Fixer or *","autocomplete","off",1,"agent-config-form__input","agent-config-form__sub-agent-input",3,"keydown.enter","formControl"],["type","button","title","Add pattern",1,"agent-config-form__sub-agent-btn","agent-config-form__sub-agent-btn--add",3,"click","disabled"],[1,"agent-config-form__actions"],["type","submit",1,"agent-config-form__btn","agent-config-form__btn--primary",3,"disabled"],["type","button",1,"agent-config-form__btn","agent-config-form__btn--export",3,"disabled"],["type","button",1,"agent-config-form__btn",3,"click"],[1,"agent-config-form__integrations-hint"],[1,"agent-config-form__integration-row"],[1,"agent-config-form__integration-toggle"],["type","checkbox",1,"agent-config-form__integration-checkbox",3,"change","checked"],[1,"agent-config-form__integration-name"],[1,"agent-config-form__integration-type"],["type","text","placeholder","Tool names, comma-separated (empty = all tools)","autocomplete","off",1,"agent-config-form__input","agent-config-form__integration-tools",3,"formControl"],[1,"agent-config-form__integrations-separator"],[1,"agent-config-form__integration-state",3,"change","id","value"],["value","default"],["value","on"],["value","off"],[1,"agent-config-form__integration-restriction"],[1,"agent-config-form__integration-builtin-desc"],[1,"agent-config-form__sub-agent-row"],["type","text","autocomplete","off",1,"agent-config-form__input","agent-config-form__sub-agent-input",3,"formControl"],["type","button","title","Remove",1,"agent-config-form__sub-agent-btn","agent-config-form__sub-agent-btn--danger",3,"click"],["type","button",1,"agent-config-form__btn","agent-config-form__btn--export",3,"click","disabled"]],template:function(e,o){e&1&&(vs(0,"div",0)(1,"header",1)(2,"button",2),Ag("click",function(){return o.cancel()}),vs(3,"span",3),WC(4,"\u2190"),fl(),WC(5," Agent Configs "),fl(),vs(6,"h1",4),WC(7),fl(),eC(8,ge,2,1,"a",5),eC(9,se,2,0,"span",6),fl(),eC(10,de,2,0,"p",7)(11,ve,59,14,"form",8),fl()),e&2&&(XE(7),Zg(o.isEditMode()?"Edit agent config":"New agent config"),XE(),tC(o.isEditMode()?8:-1),XE(),tC(o.isPlatformMode?9:-1),XE(),tC(o.isLoading()?10:11));},dependencies:[ni,Jn,Qn,ei,Ye,wt,Zn,Xn,Cn,En,si],styles:[".agent-config-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.agent-config-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.agent-config-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-accent)}.agent-config-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.agent-config-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.agent-config-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.agent-config-form__sibling-link[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-accent);text-decoration:none}.agent-config-form__sibling-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.agent-config-form__platform-badge[_ngcontent-%COMP%]{display:inline-block;font-size:.75rem;font-weight:500;color:var(--color-text-secondary);background:var(--color-surface);border:1px solid var(--color-divider);border-radius:0;padding:.125rem .5rem;letter-spacing:.02em;align-self:flex-start}.agent-config-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.agent-config-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.agent-config-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.agent-config-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.agent-config-form__input[_ngcontent-%COMP%], .agent-config-form__textarea[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:0;border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.agent-config-form__input[_ngcontent-%COMP%]:focus, .agent-config-form__textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.agent-config-form__input[_ngcontent-%COMP%]::placeholder, .agent-config-form__textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.agent-config-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:120px;line-height:1.5}.agent-config-form__integrations[_ngcontent-%COMP%]{border:1px solid var(--color-divider);border-radius:0;padding:1rem;margin:0;display:flex;flex-direction:column;gap:.75rem}.agent-config-form__integrations-hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.agent-config-form__integration-row[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.agent-config-form__integration-toggle[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none}.agent-config-form__integration-checkbox[_ngcontent-%COMP%]{width:1rem;height:1rem;flex-shrink:0;accent-color:var(--color-accent);cursor:pointer}.agent-config-form__integration-name[_ngcontent-%COMP%]{font-size:.9rem;font-weight:500;color:var(--color-text)}.agent-config-form__integration-type[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);font-family:monospace}.agent-config-form__integration-tools[_ngcontent-%COMP%]{margin-left:1.5rem;font-size:.875rem}.agent-config-form__integrations-separator[_ngcontent-%COMP%]{margin:.25rem 0 0;padding-top:.5rem;border-top:1px solid var(--color-divider);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--color-neutral-500);font-family:var(--font-heading)}.agent-config-form__integration-state[_ngcontent-%COMP%]{margin-left:1.5rem;padding:.375rem .625rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.875rem;font-family:inherit;outline:none;transition:border-color .15s ease}.agent-config-form__integration-state[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.agent-config-form__integration-restriction[_ngcontent-%COMP%]{margin:0 0 0 1.5rem;font-size:.8rem;font-style:italic;color:var(--color-text-secondary, #6e6e73);line-height:1.4}.agent-config-form__integration-builtin-desc[_ngcontent-%COMP%]{margin:0 0 0 1.5rem;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.agent-config-form__field-hint[_ngcontent-%COMP%]{margin:.25rem 0 0;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.agent-config-form__code[_ngcontent-%COMP%]{font-family:monospace;font-size:.85em;background:var(--color-surface-muted, rgba(0, 0, 0, .06));padding:.1em .3em;border-radius:0}.agent-config-form__sub-agent-list[_ngcontent-%COMP%]{list-style:none;margin:.5rem 0 0;padding:0;display:flex;flex-direction:column;gap:.375rem}.agent-config-form__sub-agent-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.375rem}.agent-config-form__sub-agent-input[_ngcontent-%COMP%]{flex:1;min-width:0}.agent-config-form__sub-agent-add[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.375rem;margin-top:.5rem}.agent-config-form__sub-agent-btn[_ngcontent-%COMP%]{flex-shrink:0;width:2rem;height:2rem;padding:0;border-radius:0;border:1px solid var(--color-divider);background:transparent;color:var(--color-text-secondary);font-size:.9rem;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s ease,border-color .15s ease,color .15s ease}.agent-config-form__sub-agent-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500);color:var(--color-text)}.agent-config-form__sub-agent-btn[_ngcontent-%COMP%]:disabled{opacity:.35;cursor:not-allowed}.agent-config-form__sub-agent-btn--add[_ngcontent-%COMP%]{width:2rem;height:2rem;font-size:1.25rem;font-weight:300;border-color:var(--color-accent);color:var(--color-accent)}.agent-config-form__sub-agent-btn--add[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent);color:#fff}.agent-config-form__sub-agent-btn--danger[_ngcontent-%COMP%]{border:1px solid transparent;color:var(--color-neutral-500)}.agent-config-form__sub-agent-btn--danger[_ngcontent-%COMP%]:hover:not(:disabled){border-color:var(--red);color:var(--red);background:color-mix(in srgb,var(--red) 10%,transparent)}.agent-config-form__toggle-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none}.agent-config-form__toggle-checkbox[_ngcontent-%COMP%]{width:1rem;height:1rem;flex-shrink:0;accent-color:var(--color-accent);cursor:pointer}.agent-config-form__toggle-text[_ngcontent-%COMP%]{font-size:.9rem;font-weight:500;color:var(--color-text)}.agent-config-form__toggle-hint[_ngcontent-%COMP%]{margin:.25rem 0 0 1.5rem;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.agent-config-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.agent-config-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:0;border:1px solid var(--color-divider);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;cursor:pointer;transition:background .15s ease,border-color .15s ease}.agent-config-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.agent-config-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.agent-config-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.agent-config-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}"]})};export{ae as AgentConfigFormComponent};
1
+ import {N}from'./chunk-CfYSvYjI.js';import {g,ao as V,G,w as we,d7 as M,dk as G$1,d5 as F,H as Hi,Q as By,S as ha,b as U,u as ue$1,a7 as ga,z as z$1,a as P,A as Aw,s as si,v as vs,l as Ag,W as WC,k as fl,n as eC,X as XE,a8 as Zg,t as tC,ac as mC,r as Tg,a9 as dC,o as bg,a3 as HI,a6 as $I,a5 as yl,q as oC,x as iC,bn as nC,aa as If,ab as wf,C as Cg}from'./main-5DW6JQ3Z.js';import'./chunk-DPOrpckU.js';import {o as z,k as _t,b as _e$1,n as ni,J as Jn,Q as Qn,e as ei,Y as Ye,a as wt,Z as Zn,l as Xn,C as Cn,E as En}from'./chunk-OltVHUw7.js';import'./chunk-D8_VVodV.js';import'./chunk-D_f8A0gu.js';import'./chunk-BxdDXOEe.js';import'./chunk-CMmtnH6_.js';var le=(r,t)=>t.config.id,ce=(r,t)=>t.type;function ge(r,t){if(r&1&&(vs(0,"a",5),WC(1,"View resolved definition \u2192"),fl()),r&2){let e=mC();Tg("routerLink",e.inspectRoute());}}function se(r,t){r&1&&(vs(0,"span",6),WC(1,"Platform level"),fl());}function de(r,t){r&1&&(vs(0,"p",7),WC(1,"Loading\u2026"),fl());}function me(r,t){if(r&1&&(vs(0,"span",41),WC(1),fl()),r&2){let e=mC().$implicit;XE(),Zg(e.config.integrationType);}}function fe(r,t){if(r&1&&(bg(0,"input",42),HI()),r&2){let e=mC().$implicit;Tg("formControl",e.toolsControl),$I();}}function pe(r,t){if(r&1){let e=dC();vs(0,"div",37)(1,"label",38)(2,"input",39),Ag("change",function(){let l=If(e).$implicit,g=mC(3);return wf(g.toggleIntegration(l))}),fl(),vs(3,"span",40),WC(4),fl(),eC(5,me,2,1,"span",41),fl(),eC(6,fe,1,1,"input",42),fl();}if(r&2){let e=t.$implicit;XE(2),Tg("checked",e.enabled()),XE(2),Zg(e.config.name),XE(),tC(e.config.integrationType?5:-1),XE(),tC(e.enabled()?6:-1);}}function _e(r,t){if(r&1&&(vs(0,"p",48),WC(1),fl()),r&2){let e=mC().$implicit;XE(),yl(" Restricted to: ",e.restrictedTools.join(", ")," (set outside this form, preserved on save) ");}}function ue(r,t){if(r&1){let e=dC();vs(0,"div",37)(1,"label",38)(2,"span",40),WC(3),fl(),vs(4,"span",41),WC(5,"built-in"),fl()(),vs(6,"select",44),Ag("change",function(l){let g=If(e).$implicit,m=mC(4);return wf(m.setBuiltInState(g,l.target.value))}),vs(7,"option",45),WC(8),fl(),vs(9,"option",46),WC(10,"Enabled"),fl(),vs(11,"option",47),WC(12,"Disabled"),fl()(),eC(13,_e,2,1,"p",48),vs(14,"p",49),WC(15),fl()();}if(r&2){let e=t.$implicit,o=mC(4);XE(),Cg("for","built-in-"+e.type),XE(2),Zg(e.displayName),XE(3),Tg("id","built-in-"+e.type)("value",e.state()),XE(2),Zg(o.builtInDefaultLabel(e)),XE(5),tC(e.state()==="on"&&e.restrictedTools?13:-1),XE(2),Zg(e.description);}}function be(r,t){if(r&1&&(vs(0,"p",43),WC(1,"Built-in integrations"),fl(),oC(2,ue,16,7,"div",37,ce)),r&2){let e=mC(3);XE(2),iC(e.builtInRows());}}function Ce(r,t){if(r&1&&(vs(0,"fieldset",20)(1,"legend",25),WC(2,"Integrations"),fl(),vs(3,"p",36),WC(4," Select which integrations this agent can use. Leave tool names empty to allow all tools from an integration. "),fl(),oC(5,pe,7,4,"div",37,le),eC(7,be,4,0),fl()),r&2){let e=mC(2);XE(5),iC(e.integrationRows()),XE(2),tC(e.builtInRows().length>0?7:-1);}}function xe(r,t){if(r&1){let e=dC();vs(0,"li",50),bg(1,"input",51),HI(),vs(2,"button",52),Ag("click",function(){let l=If(e).$implicit,g=mC(3);return wf(g.removeSubAgent(l))}),WC(3," \u{1F5D1} "),fl()();}if(r&2){let e=t.$implicit;XE(),Tg("formControl",e.control),$I();}}function ye(r,t){if(r&1&&(vs(0,"ul",28),oC(1,xe,4,1,"li",50,nC),fl()),r&2){let e=mC(2);XE(),iC(e.subAgentRows());}}function he(r,t){if(r&1){let e=dC();vs(0,"button",53),Ag("click",function(){If(e);let l=mC(2);return wf(l.exportYaml())}),WC(1),fl();}if(r&2){let e=mC(2);Tg("disabled",e.isExporting()),XE(),yl(" ",e.isExporting()?"Exporting\u2026":"Export as YAML"," ");}}function ve(r,t){if(r&1){let e=dC();vs(0,"form",9),Ag("ngSubmit",function(){If(e);let l=mC();return wf(l.submit())}),vs(1,"div",10)(2,"label",11),WC(3,"Name "),vs(4,"span",12),WC(5,"*"),fl()(),bg(6,"input",13),HI(),fl(),vs(7,"div",10)(8,"label",14),WC(9,"Description"),fl(),bg(10,"input",15),HI(),fl(),vs(11,"div",10)(12,"label",16),WC(13,"Model name"),fl(),bg(14,"input",17),HI(),fl(),vs(15,"div",10)(16,"label",18),WC(17,"Instructions"),fl(),bg(18,"textarea",19),HI(),fl(),eC(19,Ce,8,1,"fieldset",20),vs(20,"div",10)(21,"label",21),bg(22,"input",22),HI(),vs(23,"span",23),WC(24,"Advanced mode"),fl()(),vs(25,"p",24),WC(26," When enabled, this agent uses a multi-step reasoning loop instead of a single LLM call. "),fl()(),vs(27,"div",10)(28,"label",21),bg(29,"input",22),HI(),vs(30,"span",23),WC(31,"Enabled"),fl()(),vs(32,"p",24),WC(33,"Disabled agents are excluded from namespace resolution."),fl()(),vs(34,"div",10)(35,"span",25),WC(36,"Sub-agents"),fl(),vs(37,"p",26),WC(38," Glob patterns for agents this agent may delegate to. "),vs(39,"code",27),WC(40,"*"),fl(),WC(41," matches any sequence of characters (e.g.\xA0"),vs(42,"code",27),WC(43,"*Fixer"),fl(),WC(44,", "),vs(45,"code",27),WC(46,"*"),fl(),WC(47," for all). Leave empty to disable delegation. "),fl(),eC(48,ye,3,0,"ul",28),vs(49,"div",29)(50,"input",30),Ag("keydown.enter",function(){If(e);let l=mC();return wf(l.addSubAgent())}),fl(),HI(),vs(51,"button",31),Ag("click",function(){If(e);let l=mC();return wf(l.addSubAgent())}),WC(52," + "),fl()()(),vs(53,"div",32)(54,"button",33),WC(55),fl(),eC(56,he,2,2,"button",34),vs(57,"button",35),Ag("click",function(){If(e);let l=mC();return wf(l.cancel())}),WC(58,"Cancel"),fl()()();}if(r&2){let e=mC();Tg("formGroup",e.form),XE(6),Tg("formControl",e.nameControl),$I(),XE(4),Tg("formControl",e.descriptionControl),$I(),XE(4),Tg("formControl",e.modelNameControl),$I(),XE(4),Tg("formControl",e.instructionsControl),$I(),XE(),tC(e.integrationRows().length>0||e.builtInRows().length>0?19:-1),XE(3),Tg("formControl",e.advancedExecutionControl),$I(),XE(7),Tg("formControl",e.enabledControl),$I(),XE(19),tC(e.subAgentRows().length>0?48:-1),XE(2),Tg("formControl",e.newSubAgentControl),$I(),XE(),Tg("disabled",!e.newSubAgentControl.value.trim()),XE(3),Tg("disabled",e.form.invalid||e.isSubmitting()),XE(),yl(" ",e.isEditMode()?"Save changes":"Create"," "),XE(),tC(e.isEditMode()?56:-1);}}var ae=class r{route=g(V);router=g(G);destroyRef=g(we);agentConfigController=g(M);exportService=g(G$1);integrationConfigState=g(N);integrationTypeController=g(F);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;form=new z({name:new _t("",{nonNullable:true,validators:[_e$1.required,_e$1.minLength(1)]}),description:new _t(null),modelName:new _t(null),instructions:new _t(null),advancedExecution:new _t(false,{nonNullable:true}),enabled:new _t(false,{nonNullable:true})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get modelNameControl(){return this.form.controls.modelName}get instructionsControl(){return this.form.controls.instructions}get advancedExecutionControl(){return this.form.controls.advancedExecution}get enabledControl(){return this.form.controls.enabled}subAgentRows=Hi([]);newSubAgentControl=new _t("",{nonNullable:true});isEditMode=Hi(false);isSubmitting=Hi(false);isLoading=Hi(false);isExporting=Hi(false);builtInRows=Hi([]);inspectRoute(){let t=this.route.snapshot.paramMap.get("agentConfigId")??"";return this.isPlatformMode?["/agentos","admin","agent-configs",t,"inspect"]:["/agentos",this.namespaceId,"agent-configs",t,"inspect"]}integrationRows=Hi([]);existingConfig=null;ngOnInit(){let t=this.route.snapshot.paramMap.get("agentConfigId");t?(this.isEditMode.set(true),this.loadConfigAndIntegrations(t)):this.loadIntegrations(void 0);}loadConfigAndIntegrations(t){this.isLoading.set(true),By({config:this.agentConfigController.getByIdAgentConfig(t),namespaceIntegrations:this.namespaceId?this.integrationConfigState.loadNamespaceConfigs(this.namespaceId):ha([]),platformIntegrations:this.integrationConfigState.loadPlatformConfigs(),builtInTypes:this.loadBuiltInTypes()}).pipe(U(this.destroyRef)).subscribe({next:({config:e,namespaceIntegrations:o,platformIntegrations:l,builtInTypes:g})=>{this.existingConfig=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.modelNameControl.setValue(e.modelName??null),this.instructionsControl.setValue(e.instructions??null),this.advancedExecutionControl.setValue(e.advancedExecution??false),this.enabledControl.setValue(e.enabled??true);let m=[...l,...o];this.integrationRows.set(this.buildIntegrationRows(m,e.integrations??void 0)),this.builtInRows.set(this.buildBuiltInRows(g,e.integrations??void 0)),this.subAgentRows.set((e.subAgents??[]).map(P=>({control:new _t(P,{nonNullable:true})}))),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}});}loadIntegrations(t){By({namespaceIntegrations:this.namespaceId?this.integrationConfigState.loadNamespaceConfigs(this.namespaceId):ha([]),platformIntegrations:this.integrationConfigState.loadPlatformConfigs(),builtInTypes:this.loadBuiltInTypes()}).pipe(U(this.destroyRef)).subscribe({next:({namespaceIntegrations:e,platformIntegrations:o,builtInTypes:l})=>{let g=[...o,...e];this.integrationRows.set(this.buildIntegrationRows(g,t??void 0)),this.builtInRows.set(this.buildBuiltInRows(l,t??void 0));}});}loadBuiltInTypes(){return this.integrationTypeController.listTypesIntegrationType().pipe(ue$1(t=>t.filter(e=>!e.configSchema)),ga(t=>(console.error("[agent-config-form] failed to load integration types",t),ha([]))))}buildIntegrationRows(t,e){return t.map(o=>{let l=o.name??"",g=e?.[l],m=e!=null&&l in e,P=Array.isArray(g)?g.join(", "):"";return {config:o,enabled:Hi(m),toolsControl:new _t(P,{nonNullable:true})}})}buildBuiltInRows(t,e){return t.map(o=>{let l=e!=null&&o.type in e,g=e?.[o.type],m=l?Array.isArray(g)&&g.length===0?"off":"on":"default";return {type:o.type,displayName:o.displayName,description:o.description,enabledByDefault:o.enabledByDefault===true,state:Hi(m),restrictedTools:Array.isArray(g)&&g.length>0?g:null}})}toggleIntegration(t){t.enabled.update(e=>!e);}setBuiltInState(t,e){t.state.set(e);}builtInDefaultLabel(t){return t.enabledByDefault?"Platform default (enabled)":"Platform default (disabled)"}addSubAgent(){let t=this.newSubAgentControl.value.trim();t&&(this.subAgentRows.update(e=>[...e,{control:new _t(t,{nonNullable:true})}]),this.newSubAgentControl.reset(""));}removeSubAgent(t){this.subAgentRows.update(e=>e.filter(o=>o!==t));}buildSubAgentsPayload(){let t=this.subAgentRows().map(e=>e.control.value.trim()).filter(e=>e.length>0);return t.length>0?t:void 0}buildIntegrationsPayload(){let t={};for(let o of this.integrationRows().filter(l=>l.enabled())){let l=o.config.name??"",g=o.toolsControl.value.trim();t[l]=g===""?null:g.split(",").map(m=>m.trim()).filter(m=>m.length>0);}for(let o of this.builtInRows()){let l=o.state();l==="on"?t[o.type]=o.restrictedTools??null:l==="off"&&(t[o.type]=[]);}let e=new Set([...this.integrationRows().map(o=>o.config.name??""),...this.builtInRows().map(o=>o.type)]);for(let[o,l]of Object.entries(this.existingConfig?.integrations??{}))e.has(o)||(t[o]=l);return Object.keys(t).length>0?t:void 0}submit(){if(this.form.invalid||this.isSubmitting())return;this.addSubAgent(),this.isSubmitting.set(true);let t=z$1(P({},this.existingConfig??{}),{createdOn:this.existingConfig?.createdOn,updatedOn:this.existingConfig?.updatedOn,namespaceId:this.namespaceId,name:this.nameControl.value.trim(),description:this.descriptionControl.value?.trim()||void 0,modelName:this.modelNameControl.value?.trim()||void 0,instructions:this.instructionsControl.value?.trim()||void 0,integrations:this.buildIntegrationsPayload(),advancedExecution:this.advancedExecutionControl.value,enabled:this.enabledControl.value,subAgents:this.buildSubAgentsPayload()});(this.isEditMode()?this.agentConfigController.updateAgentConfig(this.existingConfig.id??"",t):this.agentConfigController.createAgentConfig(t)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}exportYaml(){let t=this.existingConfig?.id;!t||this.isExporting()||(this.isExporting.set(true),this.exportService.exportAsYaml(t).pipe(U(this.destroyRef)).subscribe({next:e=>{let o=new Blob([e],{type:"application/yaml"}),l=URL.createObjectURL(o),g=document.createElement("a");g.href=l,g.download=`${this.existingConfig?.name??"agent"}.yaml`,g.click(),URL.revokeObjectURL(l),this.isExporting.set(false);},error:()=>this.isExporting.set(false)}));}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","agent-configs"]):this.router.navigate(["/agentos",this.namespaceId,"agent-configs"]);}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=Aw({type:r,selectors:[["agentos-agent-config-form"]],decls:12,vars:4,consts:[[1,"agent-config-form"],[1,"agent-config-form__header"],["type","button","title","Back to agent configs",1,"agent-config-form__back",3,"click"],[1,"agent-config-form__back-icon"],[1,"agent-config-form__title"],[1,"agent-config-form__sibling-link",3,"routerLink"],[1,"agent-config-form__platform-badge"],[1,"agent-config-form__loading"],[1,"agent-config-form__form",3,"formGroup"],[1,"agent-config-form__form",3,"ngSubmit","formGroup"],[1,"agent-config-form__field"],["for","agent-config-name",1,"agent-config-form__label"],["aria-hidden","true"],["id","agent-config-name","type","text","placeholder","e.g. Support agent","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-description",1,"agent-config-form__label"],["id","agent-config-description","type","text","placeholder","Optional \u2014 short description of this agent","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-model-name",1,"agent-config-form__label"],["id","agent-config-model-name","type","text","placeholder","Optional \u2014 model alias or name to use","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-instructions",1,"agent-config-form__label"],["id","agent-config-instructions","rows","6","placeholder","Optional \u2014 system instructions for this agent",1,"agent-config-form__textarea",3,"formControl"],[1,"agent-config-form__integrations"],[1,"agent-config-form__toggle-label"],["type","checkbox",1,"agent-config-form__toggle-checkbox",3,"formControl"],[1,"agent-config-form__toggle-text"],[1,"agent-config-form__toggle-hint"],[1,"agent-config-form__label"],[1,"agent-config-form__field-hint"],[1,"agent-config-form__code"],[1,"agent-config-form__sub-agent-list"],[1,"agent-config-form__sub-agent-add"],["type","text","placeholder","e.g. *Fixer or *","autocomplete","off",1,"agent-config-form__input","agent-config-form__sub-agent-input",3,"keydown.enter","formControl"],["type","button","title","Add pattern",1,"agent-config-form__sub-agent-btn","agent-config-form__sub-agent-btn--add",3,"click","disabled"],[1,"agent-config-form__actions"],["type","submit",1,"agent-config-form__btn","agent-config-form__btn--primary",3,"disabled"],["type","button",1,"agent-config-form__btn","agent-config-form__btn--export",3,"disabled"],["type","button",1,"agent-config-form__btn",3,"click"],[1,"agent-config-form__integrations-hint"],[1,"agent-config-form__integration-row"],[1,"agent-config-form__integration-toggle"],["type","checkbox",1,"agent-config-form__integration-checkbox",3,"change","checked"],[1,"agent-config-form__integration-name"],[1,"agent-config-form__integration-type"],["type","text","placeholder","Tool names, comma-separated (empty = all tools)","autocomplete","off",1,"agent-config-form__input","agent-config-form__integration-tools",3,"formControl"],[1,"agent-config-form__integrations-separator"],[1,"agent-config-form__integration-state",3,"change","id","value"],["value","default"],["value","on"],["value","off"],[1,"agent-config-form__integration-restriction"],[1,"agent-config-form__integration-builtin-desc"],[1,"agent-config-form__sub-agent-row"],["type","text","autocomplete","off",1,"agent-config-form__input","agent-config-form__sub-agent-input",3,"formControl"],["type","button","title","Remove",1,"agent-config-form__sub-agent-btn","agent-config-form__sub-agent-btn--danger",3,"click"],["type","button",1,"agent-config-form__btn","agent-config-form__btn--export",3,"click","disabled"]],template:function(e,o){e&1&&(vs(0,"div",0)(1,"header",1)(2,"button",2),Ag("click",function(){return o.cancel()}),vs(3,"span",3),WC(4,"\u2190"),fl(),WC(5," Agent Configs "),fl(),vs(6,"h1",4),WC(7),fl(),eC(8,ge,2,1,"a",5),eC(9,se,2,0,"span",6),fl(),eC(10,de,2,0,"p",7)(11,ve,59,14,"form",8),fl()),e&2&&(XE(7),Zg(o.isEditMode()?"Edit agent config":"New agent config"),XE(),tC(o.isEditMode()?8:-1),XE(),tC(o.isPlatformMode?9:-1),XE(),tC(o.isLoading()?10:11));},dependencies:[ni,Jn,Qn,ei,Ye,wt,Zn,Xn,Cn,En,si],styles:[".agent-config-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.agent-config-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.agent-config-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-accent)}.agent-config-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.agent-config-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.agent-config-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.agent-config-form__sibling-link[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-accent);text-decoration:none}.agent-config-form__sibling-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.agent-config-form__platform-badge[_ngcontent-%COMP%]{display:inline-block;font-size:.75rem;font-weight:500;color:var(--color-text-secondary);background:var(--color-surface);border:1px solid var(--color-divider);border-radius:0;padding:.125rem .5rem;letter-spacing:.02em;align-self:flex-start}.agent-config-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.agent-config-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.agent-config-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.agent-config-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.agent-config-form__input[_ngcontent-%COMP%], .agent-config-form__textarea[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:0;border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.agent-config-form__input[_ngcontent-%COMP%]:focus, .agent-config-form__textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.agent-config-form__input[_ngcontent-%COMP%]::placeholder, .agent-config-form__textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.agent-config-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:120px;line-height:1.5}.agent-config-form__integrations[_ngcontent-%COMP%]{border:1px solid var(--color-divider);border-radius:0;padding:1rem;margin:0;display:flex;flex-direction:column;gap:.75rem}.agent-config-form__integrations-hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.agent-config-form__integration-row[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.agent-config-form__integration-toggle[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none}.agent-config-form__integration-checkbox[_ngcontent-%COMP%]{width:1rem;height:1rem;flex-shrink:0;accent-color:var(--color-accent);cursor:pointer}.agent-config-form__integration-name[_ngcontent-%COMP%]{font-size:.9rem;font-weight:500;color:var(--color-text)}.agent-config-form__integration-type[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);font-family:monospace}.agent-config-form__integration-tools[_ngcontent-%COMP%]{margin-left:1.5rem;font-size:.875rem}.agent-config-form__integrations-separator[_ngcontent-%COMP%]{margin:.25rem 0 0;padding-top:.5rem;border-top:1px solid var(--color-divider);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--color-neutral-500);font-family:var(--font-heading)}.agent-config-form__integration-state[_ngcontent-%COMP%]{margin-left:1.5rem;padding:.375rem .625rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.875rem;font-family:inherit;outline:none;transition:border-color .15s ease}.agent-config-form__integration-state[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.agent-config-form__integration-restriction[_ngcontent-%COMP%]{margin:0 0 0 1.5rem;font-size:.8rem;font-style:italic;color:var(--color-text-secondary, #6e6e73);line-height:1.4}.agent-config-form__integration-builtin-desc[_ngcontent-%COMP%]{margin:0 0 0 1.5rem;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.agent-config-form__field-hint[_ngcontent-%COMP%]{margin:.25rem 0 0;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.agent-config-form__code[_ngcontent-%COMP%]{font-family:monospace;font-size:.85em;background:var(--color-surface-muted, rgba(0, 0, 0, .06));padding:.1em .3em;border-radius:0}.agent-config-form__sub-agent-list[_ngcontent-%COMP%]{list-style:none;margin:.5rem 0 0;padding:0;display:flex;flex-direction:column;gap:.375rem}.agent-config-form__sub-agent-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.375rem}.agent-config-form__sub-agent-input[_ngcontent-%COMP%]{flex:1;min-width:0}.agent-config-form__sub-agent-add[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.375rem;margin-top:.5rem}.agent-config-form__sub-agent-btn[_ngcontent-%COMP%]{flex-shrink:0;width:2rem;height:2rem;padding:0;border-radius:0;border:1px solid var(--color-divider);background:transparent;color:var(--color-text-secondary);font-size:.9rem;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s ease,border-color .15s ease,color .15s ease}.agent-config-form__sub-agent-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500);color:var(--color-text)}.agent-config-form__sub-agent-btn[_ngcontent-%COMP%]:disabled{opacity:.35;cursor:not-allowed}.agent-config-form__sub-agent-btn--add[_ngcontent-%COMP%]{width:2rem;height:2rem;font-size:1.25rem;font-weight:300;border-color:var(--color-accent);color:var(--color-accent)}.agent-config-form__sub-agent-btn--add[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent);color:#fff}.agent-config-form__sub-agent-btn--danger[_ngcontent-%COMP%]{border:1px solid transparent;color:var(--color-neutral-500)}.agent-config-form__sub-agent-btn--danger[_ngcontent-%COMP%]:hover:not(:disabled){border-color:var(--red);color:var(--red);background:color-mix(in srgb,var(--red) 10%,transparent)}.agent-config-form__toggle-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none}.agent-config-form__toggle-checkbox[_ngcontent-%COMP%]{width:1rem;height:1rem;flex-shrink:0;accent-color:var(--color-accent);cursor:pointer}.agent-config-form__toggle-text[_ngcontent-%COMP%]{font-size:.9rem;font-weight:500;color:var(--color-text)}.agent-config-form__toggle-hint[_ngcontent-%COMP%]{margin:.25rem 0 0 1.5rem;font-size:.8rem;color:var(--color-text-secondary);line-height:1.4}.agent-config-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.agent-config-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:0;border:1px solid var(--color-divider);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;cursor:pointer;transition:background .15s ease,border-color .15s ease}.agent-config-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.agent-config-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.agent-config-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.agent-config-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}"]})};export{ae as AgentConfigFormComponent};
@@ -1 +1 @@
1
- import {O}from'./chunk-By4bK8Lp.js';import {R}from'./chunk-Cm42_zF7.js';import {N}from'./chunk-BYAMVo7F.js';import {g,G,bl as Sm,w as we$1,H as Hi,m as mT,F as F$1,aD as Ly,u as ue$1,b as U,A as Aw,v as vs,l as Ag,k as fl,W as WC,n as eC,X as XE,t as tC,q as oC,ac as mC,x as iC,a9 as dC,y as Hg,C as Cg,a8 as Zg,a5 as yl,o as bg,a3 as HI,r as Tg,a6 as $I,aa as If,ab as wf,cG as Xw}from'./main-FEA3BAHM.js';import {u,I,f}from'./chunk-Cb82rqle.js';import {S as Se$1}from'./chunk-DXVBbChn.js';import'./chunk-BxT6IsjS.js';import {o as z,k as _t,n as ni,J as Jn,Y as Ye,Z as Zn,l as Xn,E as En,p as An}from'./chunk-DFaRJnOg.js';import'./chunk-Cm35aeo6.js';import'./chunk-Lluy_pM_.js';var F=(o,i)=>i.value;function re(o,i){o&1&&(vs(0,"p",4),WC(1,"Loading\u2026"),fl());}function ae(o,i){if(o&1){let e=dC();vs(0,"button",18),Ag("click",function(){let _=If(e).$implicit,d=mC(2);return wf(d.setThemeVariant(_.value))}),vs(1,"span",19),WC(2),fl(),vs(3,"span",20),WC(4),fl()();}if(o&2){let e=i.$implicit,a=mC(2);Hg("user-profile__theme-variant--active",a.themeVariant()===e.value),Cg("aria-pressed",a.themeVariant()===e.value),XE(2),Zg(e.label),XE(2),Zg(e.description);}}function le(o,i){if(o&1){let e=dC();vs(0,"button",21),Ag("click",function(){let _=If(e).$implicit,d=mC(2);return wf(d.setTheme(_.value))}),WC(1),fl();}if(o&2){let e=i.$implicit,a=mC(2);Hg("user-profile__segmented-option--active",a.themeMode()===e.value),Cg("aria-pressed",a.themeMode()===e.value),XE(),yl(" ",e.label," ");}}function se(o,i){if(o&1){let e=dC();vs(0,"button",21),Ag("click",function(){let _=If(e).$implicit,d=mC(2);return wf(d.setEnterKeyBehavior(_.value))}),WC(1),fl();}if(o&2){let e=i.$implicit,a=mC(2);Hg("user-profile__segmented-option--active",a.enterKeyBehavior()===e.value),Cg("aria-pressed",a.enterKeyBehavior()===e.value),XE(),yl(" ",e.label," ");}}function _e(o,i){if(o&1){let e=dC();vs(0,"form",22),Ag("ngSubmit",function(){If(e);let _=mC(2);return wf(_.save())}),vs(1,"div",5)(2,"h2",6),WC(3,"Identity"),fl(),vs(4,"div",7)(5,"span",8),WC(6,"Email"),fl(),vs(7,"span",23),WC(8),fl()(),vs(9,"div",7)(10,"span",8),WC(11,"External ID"),fl(),vs(12,"span",23),WC(13),fl()()(),vs(14,"div",5)(15,"h2",6),WC(16,"Profile"),fl(),vs(17,"div",7)(18,"label",24),WC(19,"First name"),fl(),bg(20,"input",25),HI(),fl(),vs(21,"div",7)(22,"label",26),WC(23,"Last name"),fl(),bg(24,"input",27),HI(),fl(),vs(25,"div",7)(26,"label",28),WC(27,"Bio"),fl(),bg(28,"textarea",29),HI(),fl()(),vs(29,"div",30)(30,"button",31),WC(31),fl(),vs(32,"button",32),Ag("click",function(){If(e);let _=mC(2);return wf(_.cancelEditing())}),WC(33,"Cancel"),fl()()();}if(o&2){let e=mC(),a=mC();Tg("formGroup",a.form),XE(8),Zg(e.email),XE(5),Zg(e.externalId),XE(7),$I(),XE(4),$I(),XE(4),$I(),XE(2),Tg("disabled",a.isSaving()),XE(),yl(" ",a.isSaving()?"Saving\u2026":"Save changes"," ");}}function de(o,i){o&1&&(vs(0,"p",40),WC(1," No global configuration yet. Create one from the Integrations / AI Providers / Auth Settings pages of your namespaces. "),fl());}function ce(o,i){if(o&1){let e=dC();vs(0,"span",47),WC(1,"Delete?"),fl(),vs(2,"button",48),Ag("click",function(){If(e);let _=mC().$implicit,d=mC(6);return wf(d.confirmDelete(_))}),WC(3," Confirm "),fl(),vs(4,"button",49),Ag("click",function(){If(e);let _=mC(7);return wf(_.cancelDelete())}),WC(5," Cancel "),fl();}}function pe(o,i){if(o&1){let e=dC();vs(0,"button",49),Ag("click",function(){If(e);let _=mC().$implicit,d=mC(6);return wf(d.armDelete(_))}),WC(1," Delete "),fl();}}function me(o,i){if(o&1&&(vs(0,"li",43)(1,"span",44),WC(2),fl(),vs(3,"span",45),WC(4),fl(),eC(5,ce,6,0)(6,pe,2,0,"button",46),fl()),o&2){let e=i.$implicit,a=mC(6);XE(2),Zg(e.name),XE(2),Zg(e.subtitle),XE(),tC(a.isPendingDelete(e)?5:6);}}function ue(o,i){if(o&1&&(vs(0,"h3",41),WC(1,"Integrations"),fl(),vs(2,"ul",42),oC(3,me,7,3,"li",43,Xw().trackEntry,true),fl()),o&2){let e=mC(5);XE(3),iC(e.recap().integrations);}}function fe(o,i){if(o&1){let e=dC();vs(0,"span",47),WC(1,"Delete?"),fl(),vs(2,"button",48),Ag("click",function(){If(e);let _=mC().$implicit,d=mC(6);return wf(d.confirmDelete(_))}),WC(3," Confirm "),fl(),vs(4,"button",49),Ag("click",function(){If(e);let _=mC(7);return wf(_.cancelDelete())}),WC(5," Cancel "),fl();}}function Ce(o,i){if(o&1){let e=dC();vs(0,"button",49),Ag("click",function(){If(e);let _=mC().$implicit,d=mC(6);return wf(d.armDelete(_))}),WC(1," Delete "),fl();}}function ge(o,i){if(o&1&&(vs(0,"li",43)(1,"span",44),WC(2),fl(),vs(3,"span",45),WC(4),fl(),eC(5,fe,6,0)(6,Ce,2,0,"button",46),fl()),o&2){let e=i.$implicit,a=mC(6);XE(2),Zg(e.name),XE(2),Zg(e.subtitle),XE(),tC(a.isPendingDelete(e)?5:6);}}function ve(o,i){if(o&1&&(vs(0,"h3",41),WC(1,"AI Providers"),fl(),vs(2,"ul",42),oC(3,ge,7,3,"li",43,Xw().trackEntry,true),fl()),o&2){let e=mC(5);XE(3),iC(e.recap().aiProviders);}}function xe(o,i){if(o&1){let e=dC();vs(0,"span",47),WC(1,"Delete?"),fl(),vs(2,"button",48),Ag("click",function(){If(e);let _=mC().$implicit,d=mC(6);return wf(d.confirmDelete(_))}),WC(3," Confirm "),fl(),vs(4,"button",49),Ag("click",function(){If(e);let _=mC(7);return wf(_.cancelDelete())}),WC(5," Cancel "),fl();}}function be(o,i){if(o&1){let e=dC();vs(0,"button",49),Ag("click",function(){If(e);let _=mC().$implicit,d=mC(6);return wf(d.armDelete(_))}),WC(1," Delete "),fl();}}function ye(o,i){if(o&1&&(vs(0,"li",43)(1,"span",44),WC(2),fl(),vs(3,"span",45),WC(4),fl(),eC(5,xe,6,0)(6,be,2,0,"button",46),fl()),o&2){let e=i.$implicit,a=mC(6);XE(2),Zg(e.name),XE(2),Zg(e.subtitle),XE(),tC(a.isPendingDelete(e)?5:6);}}function he(o,i){if(o&1&&(vs(0,"h3",41),WC(1,"My global auth settings"),fl(),vs(2,"ul",42),oC(3,ye,7,3,"li",43,Xw().trackEntry,true),fl()),o&2){let e=mC(5);XE(3),iC(e.recap().authSettings);}}function Pe(o,i){if(o&1&&(eC(0,ue,5,0),eC(1,ve,5,0),eC(2,he,5,0)),o&2){let e=mC(4);tC(e.recap().integrations.length>0?0:-1),XE(),tC(e.recap().aiProviders.length>0?1:-1),XE(),tC(e.recap().authSettings.length>0?2:-1);}}function Ee(o,i){if(o&1&&eC(0,de,2,0,"p",40)(1,Pe,3,3),o&2){let e=mC(3);tC(e.recap().total===0?0:1);}}function Se(o,i){if(o&1){let e=dC();vs(0,"div",17)(1,"div",5)(2,"h2",6),WC(3,"Identity"),fl(),vs(4,"div",7)(5,"span",8),WC(6,"Email"),fl(),vs(7,"span",33),WC(8),fl()(),vs(9,"div",7)(10,"span",8),WC(11,"External ID"),fl(),vs(12,"span",33),WC(13),fl()()(),vs(14,"div",5)(15,"h2",6),WC(16,"Profile"),fl(),vs(17,"div",7)(18,"span",8),WC(19,"First name"),fl(),vs(20,"span",33),WC(21),fl()(),vs(22,"div",7)(23,"span",8),WC(24,"Last name"),fl(),vs(25,"span",33),WC(26),fl()(),vs(27,"div",34)(28,"span",8),WC(29,"Bio"),fl(),vs(30,"span",33),WC(31),fl()()(),vs(32,"div",30)(33,"button",35),Ag("click",function(){If(e);let _=mC(2);return wf(_.startEditing())}),WC(34," Edit profile "),fl()(),vs(35,"div",36)(36,"button",37),Ag("click",function(){If(e);let _=mC(2);return wf(_.toggleOverrides())}),vs(37,"span",38),WC(38,"\u25B6"),fl(),WC(39," My global user configurations "),vs(40,"span",39),WC(41),fl()(),eC(42,Ee,2,1),fl()();}if(o&2){let e=mC(),a=mC();XE(8),Zg(e.email),XE(5),Zg(e.externalId),XE(8),Zg(e.firstname||"\u2014"),XE(5),Zg(e.lastname||"\u2014"),XE(5),Zg(e.bio||"\u2014"),XE(5),Cg("aria-expanded",a.isOverridesExpanded()),XE(),Hg("user-profile__overrides-arrow--open",a.isOverridesExpanded()),XE(4),yl("(",a.recap().total,")"),XE(),tC(a.isOverridesExpanded()?42:-1);}}function we(o,i){if(o&1&&(vs(0,"div",5)(1,"h2",6),WC(2,"Appearance"),fl(),vs(3,"div",7)(4,"span",8),WC(5,"Skin"),fl(),vs(6,"div",9),oC(7,ae,5,5,"button",10,F),fl()(),vs(9,"div",7)(10,"span",8),WC(11,"Mode"),fl(),vs(12,"div",11),oC(13,le,2,4,"button",12,F),fl()()(),vs(15,"div",5)(16,"h2",6),WC(17,"Composer"),fl(),vs(18,"div",7)(19,"span",8),WC(20,"Enter key"),fl(),vs(21,"div",13)(22,"div",14),oC(23,se,2,4,"button",12,F),fl(),vs(25,"p",15),WC(26,'In "New line" mode, press Ctrl or Cmd + Enter to send.'),fl()()()(),eC(27,_e,34,5,"form",16)(28,Se,43,10,"div",17)),o&2){let e=mC();XE(7),iC(e.themeVariantOptions),XE(6),iC(e.themeOptions),XE(10),iC(e.enterKeyOptions),XE(4),tC(e.isEditing()?27:28);}}function Me(o,i){o&1&&(vs(0,"p",4),WC(1,"Unable to load profile."),fl());}var oe=class o{userState=g(u);router=g(G);location=g(Sm);destroyRef=g(we$1);integrationState=g(N);providerState=g(O);authSettingState=g(R);themePort=g(I);preferencesPort=g(f);isEditing=Hi(false);isLoading=Hi(false);isSaving=Hi(false);isOverridesExpanded=Hi(false);currentUser=this.userState.currentUser;theme=this.themePort.theme;themeMode=mT(()=>this.themePort.theme().mode);themeOptions=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];themeVariant=mT(()=>this.themePort.theme().variant);themeVariantOptions=[{value:"industry",label:"Industry",description:"Bleu acier, Barlow"},{value:"terminal",label:"Terminal",description:"Ambre CRT, JetBrains Mono"}];enterKeyBehavior=this.preferencesPort.enterKeyBehavior;enterKeyOptions=[{value:"send",label:"Send"},{value:"newline",label:"New line"}];form=new z({firstname:new _t("",{nonNullable:true}),lastname:new _t("",{nonNullable:true}),bio:new _t("",{nonNullable:true})});recap=F$1(Ly([this.integrationState.userGlobal$,this.providerState.userGlobal$,this.authSettingState.userGlobal$]).pipe(ue$1(([i,e,a])=>{let _=i.map(C=>({category:"integration",id:C.id??"",name:C.name,subtitle:C.integrationType})),d=e.map(C=>({category:"aiProvider",id:C.id??"",name:C.name,subtitle:C.apiType})),I=a.map(C=>({category:"authSetting",id:C.id??"",name:C.name,subtitle:C.authType}));return {integrations:_,aiProviders:d,authSettings:I,total:_.length+d.length+I.length}})),{initialValue:{integrations:[],aiProviders:[],authSettings:[],total:0}});ngOnInit(){if(this.currentUser()){this.syncFormFromState();return}this.isLoading.set(true),this.userState.loadMe().pipe(U(this.destroyRef)).subscribe({next:()=>{this.syncFormFromState(),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}startEditing(){this.syncFormFromState(),this.isEditing.set(true);}cancelEditing(){this.isEditing.set(false);}setTheme(i){this.themePort.setTheme({variant:this.themePort.theme().variant,mode:i});}setThemeVariant(i){this.themePort.setTheme({variant:i,mode:this.themePort.theme().mode});}setEnterKeyBehavior(i){this.preferencesPort.setEnterKeyBehavior(i);}save(){this.isSaving()||(this.isSaving.set(true),this.userState.updateMe({firstname:this.form.controls.firstname.value.trim()||void 0,lastname:this.form.controls.lastname.value.trim()||void 0,bio:this.form.controls.bio.value.trim()||void 0}).pipe(U(this.destroyRef)).subscribe({next:()=>{this.isSaving.set(false),this.isEditing.set(false);},error:()=>this.isSaving.set(false)}));}toggleOverrides(){this.isOverridesExpanded.update(i=>!i),this.pendingDeleteKey.set(null);}pendingDeleteKey=Hi(null);isPendingDelete(i){return this.pendingDeleteKey()===this.entryKey(i)}armDelete(i){i.id&&this.pendingDeleteKey.set(this.entryKey(i));}cancelDelete(){this.pendingDeleteKey.set(null);}confirmDelete(i){if(!i.id)return;this.pendingDeleteKey.set(null),(i.category==="integration"?this.integrationState.delete(i.id,"userGlobal"):i.category==="authSetting"?this.authSettingState.delete(i.id,"userGlobal"):this.providerState.delete(i.id,"userGlobal")).pipe(U(this.destroyRef)).subscribe({error:a=>{console.error(`[UserProfile] Delete failed for ${i.category}:${i.id}:`,a);}});}entryKey(i){return `${i.category}:${i.id}`}goBack(){window.history.length>1?this.location.back():this.router.navigate(["/agentos"]);}trackEntry(i,e){return this.entryKey(e)}syncFormFromState(){let i=this.currentUser();i&&this.form.setValue({firstname:i.firstname??"",lastname:i.lastname??"",bio:i.bio??""});}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Aw({type:o,selectors:[["agentos-user-profile"]],decls:8,vars:1,consts:[[1,"user-profile"],[1,"user-profile__header"],["icon","arrow_back","title","Back",3,"action"],[1,"user-profile__title"],[1,"user-profile__loading"],[1,"user-profile__section"],[1,"user-profile__section-title"],[1,"user-profile__field"],[1,"user-profile__label"],[1,"user-profile__theme-variants"],["type","button",1,"user-profile__theme-variant",3,"user-profile__theme-variant--active"],["role","group","aria-label","Color mode",1,"user-profile__segmented"],["type","button",1,"user-profile__segmented-option",3,"user-profile__segmented-option--active"],[1,"user-profile__field-control"],["role","group","aria-label","Enter key behavior",1,"user-profile__segmented"],[1,"user-profile__hint"],[1,"user-profile__form",3,"formGroup"],[1,"user-profile__view"],["type","button",1,"user-profile__theme-variant",3,"click"],[1,"user-profile__theme-variant-name"],[1,"user-profile__theme-variant-desc"],["type","button",1,"user-profile__segmented-option",3,"click"],[1,"user-profile__form",3,"ngSubmit","formGroup"],[1,"user-profile__value","user-profile__value--readonly"],["for","up-firstname",1,"user-profile__label"],["id","up-firstname","type","text","placeholder","Your first name","formControlName","firstname","autocomplete","given-name",1,"user-profile__input"],["for","up-lastname",1,"user-profile__label"],["id","up-lastname","type","text","placeholder","Your last name","formControlName","lastname","autocomplete","family-name",1,"user-profile__input"],["for","up-bio",1,"user-profile__label"],["id","up-bio","placeholder","A short description about yourself","formControlName","bio","rows","4",1,"user-profile__input","user-profile__input--textarea"],[1,"user-profile__actions"],["type","submit",1,"user-profile__btn","user-profile__btn--primary",3,"disabled"],["type","button",1,"user-profile__btn",3,"click"],[1,"user-profile__value"],[1,"user-profile__field","user-profile__field--bio"],["type","button",1,"user-profile__btn","user-profile__btn--primary",3,"click"],[1,"user-profile__overrides"],["type","button",1,"user-profile__overrides-toggle",3,"click"],[1,"user-profile__overrides-arrow"],[1,"user-profile__overrides-count"],[1,"user-profile__overrides-empty"],[1,"user-profile__overrides-subtitle"],[1,"user-profile__overrides-list"],[1,"user-profile__overrides-row"],[1,"user-profile__overrides-name"],[1,"user-profile__overrides-subtitle-text"],["type","button",1,"user-profile__overrides-delete"],[1,"user-profile__overrides-confirm-label"],["type","button",1,"user-profile__overrides-delete","user-profile__overrides-delete--confirm",3,"click"],["type","button",1,"user-profile__overrides-delete",3,"click"]],template:function(e,a){if(e&1&&(vs(0,"div",0)(1,"header",1)(2,"ds-icon-button",2),Ag("action",function(){return a.goBack()}),fl(),vs(3,"h1",3),WC(4,"My profile"),fl()(),eC(5,re,2,0,"p",4)(6,we,29,1)(7,Me,2,0,"p",4),fl()),e&2){let _;XE(5),tC(a.isLoading()?5:(_=a.currentUser())?6:7,_);}},dependencies:[ni,Jn,Ye,Zn,Xn,En,An,Se$1],styles:[".user-profile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.user-profile__header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:.5rem}.user-profile__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-accent)}.user-profile__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.user-profile__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.user-profile__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.user-profile__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.user-profile__view[_ngcontent-%COMP%], .user-profile__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.user-profile__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.user-profile__section-title[_ngcontent-%COMP%]{margin:0;font-family:var(--font-heading);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--color-neutral-500);border-bottom:1px solid var(--color-divider);padding-bottom:.5rem}.user-profile__field[_ngcontent-%COMP%]{display:grid;grid-template-columns:140px 1fr;align-items:baseline;gap:.75rem}.user-profile__field--bio[_ngcontent-%COMP%]{align-items:start}.user-profile__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text-secondary);white-space:nowrap}.user-profile__value[_ngcontent-%COMP%]{font-size:.9375rem;color:var(--color-text);word-break:break-word;white-space:pre-wrap}.user-profile__value--readonly[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.875rem}.user-profile__segmented[_ngcontent-%COMP%]{display:inline-flex;justify-self:start;border:1px solid var(--color-divider);overflow:hidden}.user-profile__segmented-option[_ngcontent-%COMP%]{padding:.4rem .85rem;background:transparent;border:none;border-right:1px solid var(--color-divider);color:var(--color-text-secondary);font-size:.875rem;cursor:pointer;transition:background .15s ease,color .15s ease}.user-profile__segmented-option[_ngcontent-%COMP%]:last-child{border-right:none}.user-profile__segmented-option[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.user-profile__segmented-option--active[_ngcontent-%COMP%]{background:var(--color-accent);color:#fff}.user-profile__segmented-option--active[_ngcontent-%COMP%]:hover{background:var(--color-accent-700)}.user-profile__field-control[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.4rem}.user-profile__hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--color-text-secondary)}.user-profile__input[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;border-radius:0;transition:border-color .15s ease;resize:none}.user-profile__input[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.user-profile__input[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.user-profile__input--textarea[_ngcontent-%COMP%]{line-height:1.5;resize:vertical}.user-profile__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.user-profile__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border:1px solid var(--color-divider);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;cursor:pointer;border-radius:0;transition:background .15s ease,border-color .15s ease}.user-profile__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.user-profile__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.user-profile__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.user-profile__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}.user-profile__theme-variants[_ngcontent-%COMP%]{display:flex;gap:8px;justify-self:start}.user-profile__theme-variant[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:10px 16px;border:1px solid var(--color-divider);background:transparent;cursor:pointer;min-width:120px;transition:background .12s,border-color .12s}.user-profile__theme-variant[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.user-profile__theme-variant--active[_ngcontent-%COMP%]{border-color:var(--color-accent);background:color-mix(in srgb,var(--color-accent) 8%,transparent)}.user-profile__theme-variant-name[_ngcontent-%COMP%]{font-family:var(--font-heading);font-size:13px;font-weight:600;color:var(--color-text)}.user-profile__theme-variant-desc[_ngcontent-%COMP%]{font-size:11px;color:var(--color-text-secondary);font-family:var(--font-body)}.user-profile__overrides[_ngcontent-%COMP%]{margin-top:1rem;padding-top:1rem;border-top:1px solid var(--color-divider)}.user-profile__overrides-toggle[_ngcontent-%COMP%]{background:transparent;border:none;padding:.25rem 0;font-size:.85rem;color:var(--color-text-secondary);cursor:pointer;display:flex;align-items:center;gap:.4rem}.user-profile__overrides-toggle[_ngcontent-%COMP%]:hover{color:var(--color-text)}.user-profile__overrides-arrow[_ngcontent-%COMP%]{display:inline-block;font-size:.65rem;transition:transform .15s ease}.user-profile__overrides-arrow--open[_ngcontent-%COMP%]{transform:rotate(90deg)}.user-profile__overrides-count[_ngcontent-%COMP%]{color:var(--color-text-tertiary)}.user-profile__overrides-empty[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary);font-style:italic;padding:.5rem 0 0;margin:0}.user-profile__overrides-subtitle[_ngcontent-%COMP%]{font-family:var(--font-heading);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--color-neutral-500);margin:.75rem 0 .25rem}.user-profile__overrides-list[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.25rem}.user-profile__overrides-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.4rem .5rem;font-size:.85rem;border-radius:0}.user-profile__overrides-row[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.user-profile__overrides-name[_ngcontent-%COMP%]{flex:1;color:var(--color-text);font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-profile__overrides-subtitle-text[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);font-family:var(--font-heading)}.user-profile__overrides-confirm-label[_ngcontent-%COMP%]{font-size:11px;font-family:var(--font-heading);font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--red-deep);white-space:nowrap}.user-profile__overrides-delete[_ngcontent-%COMP%]{background:transparent;border:1px solid transparent;font-size:11px;font-family:var(--font-heading);font-weight:600;color:var(--color-neutral-500);cursor:pointer;padding:3px 8px;border-radius:0;transition:color .12s,background .12s,border-color .12s}.user-profile__overrides-delete[_ngcontent-%COMP%]:hover{color:var(--red);background:color-mix(in srgb,var(--red) 10%,transparent);border-color:var(--red)}.user-profile__overrides-delete--confirm[_ngcontent-%COMP%]{border-color:var(--red);background:var(--red);color:#fff}.user-profile__overrides-delete--confirm[_ngcontent-%COMP%]:hover{background:var(--red-deep);border-color:var(--red-deep)}"]})};export{oe as UserProfileComponent};
1
+ import {O}from'./chunk-Bgpsos5f.js';import {R}from'./chunk-BXjEydcy.js';import {N}from'./chunk-CfYSvYjI.js';import {g,G,bl as Sm,w as we$1,H as Hi,m as mT,F as F$1,aD as Ly,u as ue$1,b as U,A as Aw,v as vs,l as Ag,k as fl,W as WC,n as eC,X as XE,t as tC,q as oC,ac as mC,x as iC,a9 as dC,y as Hg,C as Cg,a8 as Zg,a5 as yl,o as bg,a3 as HI,r as Tg,a6 as $I,aa as If,ab as wf,cG as Xw}from'./main-5DW6JQ3Z.js';import {u,I,f}from'./chunk-DPOrpckU.js';import {S as Se$1}from'./chunk-BxdDXOEe.js';import'./chunk-CMmtnH6_.js';import {o as z,k as _t,n as ni,J as Jn,Y as Ye,Z as Zn,l as Xn,E as En,p as An}from'./chunk-OltVHUw7.js';import'./chunk-D8_VVodV.js';import'./chunk-D_f8A0gu.js';var F=(o,i)=>i.value;function re(o,i){o&1&&(vs(0,"p",4),WC(1,"Loading\u2026"),fl());}function ae(o,i){if(o&1){let e=dC();vs(0,"button",18),Ag("click",function(){let _=If(e).$implicit,d=mC(2);return wf(d.setThemeVariant(_.value))}),vs(1,"span",19),WC(2),fl(),vs(3,"span",20),WC(4),fl()();}if(o&2){let e=i.$implicit,a=mC(2);Hg("user-profile__theme-variant--active",a.themeVariant()===e.value),Cg("aria-pressed",a.themeVariant()===e.value),XE(2),Zg(e.label),XE(2),Zg(e.description);}}function le(o,i){if(o&1){let e=dC();vs(0,"button",21),Ag("click",function(){let _=If(e).$implicit,d=mC(2);return wf(d.setTheme(_.value))}),WC(1),fl();}if(o&2){let e=i.$implicit,a=mC(2);Hg("user-profile__segmented-option--active",a.themeMode()===e.value),Cg("aria-pressed",a.themeMode()===e.value),XE(),yl(" ",e.label," ");}}function se(o,i){if(o&1){let e=dC();vs(0,"button",21),Ag("click",function(){let _=If(e).$implicit,d=mC(2);return wf(d.setEnterKeyBehavior(_.value))}),WC(1),fl();}if(o&2){let e=i.$implicit,a=mC(2);Hg("user-profile__segmented-option--active",a.enterKeyBehavior()===e.value),Cg("aria-pressed",a.enterKeyBehavior()===e.value),XE(),yl(" ",e.label," ");}}function _e(o,i){if(o&1){let e=dC();vs(0,"form",22),Ag("ngSubmit",function(){If(e);let _=mC(2);return wf(_.save())}),vs(1,"div",5)(2,"h2",6),WC(3,"Identity"),fl(),vs(4,"div",7)(5,"span",8),WC(6,"Email"),fl(),vs(7,"span",23),WC(8),fl()(),vs(9,"div",7)(10,"span",8),WC(11,"External ID"),fl(),vs(12,"span",23),WC(13),fl()()(),vs(14,"div",5)(15,"h2",6),WC(16,"Profile"),fl(),vs(17,"div",7)(18,"label",24),WC(19,"First name"),fl(),bg(20,"input",25),HI(),fl(),vs(21,"div",7)(22,"label",26),WC(23,"Last name"),fl(),bg(24,"input",27),HI(),fl(),vs(25,"div",7)(26,"label",28),WC(27,"Bio"),fl(),bg(28,"textarea",29),HI(),fl()(),vs(29,"div",30)(30,"button",31),WC(31),fl(),vs(32,"button",32),Ag("click",function(){If(e);let _=mC(2);return wf(_.cancelEditing())}),WC(33,"Cancel"),fl()()();}if(o&2){let e=mC(),a=mC();Tg("formGroup",a.form),XE(8),Zg(e.email),XE(5),Zg(e.externalId),XE(7),$I(),XE(4),$I(),XE(4),$I(),XE(2),Tg("disabled",a.isSaving()),XE(),yl(" ",a.isSaving()?"Saving\u2026":"Save changes"," ");}}function de(o,i){o&1&&(vs(0,"p",40),WC(1," No global configuration yet. Create one from the Integrations / AI Providers / Auth Settings pages of your namespaces. "),fl());}function ce(o,i){if(o&1){let e=dC();vs(0,"span",47),WC(1,"Delete?"),fl(),vs(2,"button",48),Ag("click",function(){If(e);let _=mC().$implicit,d=mC(6);return wf(d.confirmDelete(_))}),WC(3," Confirm "),fl(),vs(4,"button",49),Ag("click",function(){If(e);let _=mC(7);return wf(_.cancelDelete())}),WC(5," Cancel "),fl();}}function pe(o,i){if(o&1){let e=dC();vs(0,"button",49),Ag("click",function(){If(e);let _=mC().$implicit,d=mC(6);return wf(d.armDelete(_))}),WC(1," Delete "),fl();}}function me(o,i){if(o&1&&(vs(0,"li",43)(1,"span",44),WC(2),fl(),vs(3,"span",45),WC(4),fl(),eC(5,ce,6,0)(6,pe,2,0,"button",46),fl()),o&2){let e=i.$implicit,a=mC(6);XE(2),Zg(e.name),XE(2),Zg(e.subtitle),XE(),tC(a.isPendingDelete(e)?5:6);}}function ue(o,i){if(o&1&&(vs(0,"h3",41),WC(1,"Integrations"),fl(),vs(2,"ul",42),oC(3,me,7,3,"li",43,Xw().trackEntry,true),fl()),o&2){let e=mC(5);XE(3),iC(e.recap().integrations);}}function fe(o,i){if(o&1){let e=dC();vs(0,"span",47),WC(1,"Delete?"),fl(),vs(2,"button",48),Ag("click",function(){If(e);let _=mC().$implicit,d=mC(6);return wf(d.confirmDelete(_))}),WC(3," Confirm "),fl(),vs(4,"button",49),Ag("click",function(){If(e);let _=mC(7);return wf(_.cancelDelete())}),WC(5," Cancel "),fl();}}function Ce(o,i){if(o&1){let e=dC();vs(0,"button",49),Ag("click",function(){If(e);let _=mC().$implicit,d=mC(6);return wf(d.armDelete(_))}),WC(1," Delete "),fl();}}function ge(o,i){if(o&1&&(vs(0,"li",43)(1,"span",44),WC(2),fl(),vs(3,"span",45),WC(4),fl(),eC(5,fe,6,0)(6,Ce,2,0,"button",46),fl()),o&2){let e=i.$implicit,a=mC(6);XE(2),Zg(e.name),XE(2),Zg(e.subtitle),XE(),tC(a.isPendingDelete(e)?5:6);}}function ve(o,i){if(o&1&&(vs(0,"h3",41),WC(1,"AI Providers"),fl(),vs(2,"ul",42),oC(3,ge,7,3,"li",43,Xw().trackEntry,true),fl()),o&2){let e=mC(5);XE(3),iC(e.recap().aiProviders);}}function xe(o,i){if(o&1){let e=dC();vs(0,"span",47),WC(1,"Delete?"),fl(),vs(2,"button",48),Ag("click",function(){If(e);let _=mC().$implicit,d=mC(6);return wf(d.confirmDelete(_))}),WC(3," Confirm "),fl(),vs(4,"button",49),Ag("click",function(){If(e);let _=mC(7);return wf(_.cancelDelete())}),WC(5," Cancel "),fl();}}function be(o,i){if(o&1){let e=dC();vs(0,"button",49),Ag("click",function(){If(e);let _=mC().$implicit,d=mC(6);return wf(d.armDelete(_))}),WC(1," Delete "),fl();}}function ye(o,i){if(o&1&&(vs(0,"li",43)(1,"span",44),WC(2),fl(),vs(3,"span",45),WC(4),fl(),eC(5,xe,6,0)(6,be,2,0,"button",46),fl()),o&2){let e=i.$implicit,a=mC(6);XE(2),Zg(e.name),XE(2),Zg(e.subtitle),XE(),tC(a.isPendingDelete(e)?5:6);}}function he(o,i){if(o&1&&(vs(0,"h3",41),WC(1,"My global auth settings"),fl(),vs(2,"ul",42),oC(3,ye,7,3,"li",43,Xw().trackEntry,true),fl()),o&2){let e=mC(5);XE(3),iC(e.recap().authSettings);}}function Pe(o,i){if(o&1&&(eC(0,ue,5,0),eC(1,ve,5,0),eC(2,he,5,0)),o&2){let e=mC(4);tC(e.recap().integrations.length>0?0:-1),XE(),tC(e.recap().aiProviders.length>0?1:-1),XE(),tC(e.recap().authSettings.length>0?2:-1);}}function Ee(o,i){if(o&1&&eC(0,de,2,0,"p",40)(1,Pe,3,3),o&2){let e=mC(3);tC(e.recap().total===0?0:1);}}function Se(o,i){if(o&1){let e=dC();vs(0,"div",17)(1,"div",5)(2,"h2",6),WC(3,"Identity"),fl(),vs(4,"div",7)(5,"span",8),WC(6,"Email"),fl(),vs(7,"span",33),WC(8),fl()(),vs(9,"div",7)(10,"span",8),WC(11,"External ID"),fl(),vs(12,"span",33),WC(13),fl()()(),vs(14,"div",5)(15,"h2",6),WC(16,"Profile"),fl(),vs(17,"div",7)(18,"span",8),WC(19,"First name"),fl(),vs(20,"span",33),WC(21),fl()(),vs(22,"div",7)(23,"span",8),WC(24,"Last name"),fl(),vs(25,"span",33),WC(26),fl()(),vs(27,"div",34)(28,"span",8),WC(29,"Bio"),fl(),vs(30,"span",33),WC(31),fl()()(),vs(32,"div",30)(33,"button",35),Ag("click",function(){If(e);let _=mC(2);return wf(_.startEditing())}),WC(34," Edit profile "),fl()(),vs(35,"div",36)(36,"button",37),Ag("click",function(){If(e);let _=mC(2);return wf(_.toggleOverrides())}),vs(37,"span",38),WC(38,"\u25B6"),fl(),WC(39," My global user configurations "),vs(40,"span",39),WC(41),fl()(),eC(42,Ee,2,1),fl()();}if(o&2){let e=mC(),a=mC();XE(8),Zg(e.email),XE(5),Zg(e.externalId),XE(8),Zg(e.firstname||"\u2014"),XE(5),Zg(e.lastname||"\u2014"),XE(5),Zg(e.bio||"\u2014"),XE(5),Cg("aria-expanded",a.isOverridesExpanded()),XE(),Hg("user-profile__overrides-arrow--open",a.isOverridesExpanded()),XE(4),yl("(",a.recap().total,")"),XE(),tC(a.isOverridesExpanded()?42:-1);}}function we(o,i){if(o&1&&(vs(0,"div",5)(1,"h2",6),WC(2,"Appearance"),fl(),vs(3,"div",7)(4,"span",8),WC(5,"Skin"),fl(),vs(6,"div",9),oC(7,ae,5,5,"button",10,F),fl()(),vs(9,"div",7)(10,"span",8),WC(11,"Mode"),fl(),vs(12,"div",11),oC(13,le,2,4,"button",12,F),fl()()(),vs(15,"div",5)(16,"h2",6),WC(17,"Composer"),fl(),vs(18,"div",7)(19,"span",8),WC(20,"Enter key"),fl(),vs(21,"div",13)(22,"div",14),oC(23,se,2,4,"button",12,F),fl(),vs(25,"p",15),WC(26,'In "New line" mode, press Ctrl or Cmd + Enter to send.'),fl()()()(),eC(27,_e,34,5,"form",16)(28,Se,43,10,"div",17)),o&2){let e=mC();XE(7),iC(e.themeVariantOptions),XE(6),iC(e.themeOptions),XE(10),iC(e.enterKeyOptions),XE(4),tC(e.isEditing()?27:28);}}function Me(o,i){o&1&&(vs(0,"p",4),WC(1,"Unable to load profile."),fl());}var oe=class o{userState=g(u);router=g(G);location=g(Sm);destroyRef=g(we$1);integrationState=g(N);providerState=g(O);authSettingState=g(R);themePort=g(I);preferencesPort=g(f);isEditing=Hi(false);isLoading=Hi(false);isSaving=Hi(false);isOverridesExpanded=Hi(false);currentUser=this.userState.currentUser;theme=this.themePort.theme;themeMode=mT(()=>this.themePort.theme().mode);themeOptions=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];themeVariant=mT(()=>this.themePort.theme().variant);themeVariantOptions=[{value:"industry",label:"Industry",description:"Bleu acier, Barlow"},{value:"terminal",label:"Terminal",description:"Ambre CRT, JetBrains Mono"}];enterKeyBehavior=this.preferencesPort.enterKeyBehavior;enterKeyOptions=[{value:"send",label:"Send"},{value:"newline",label:"New line"}];form=new z({firstname:new _t("",{nonNullable:true}),lastname:new _t("",{nonNullable:true}),bio:new _t("",{nonNullable:true})});recap=F$1(Ly([this.integrationState.userGlobal$,this.providerState.userGlobal$,this.authSettingState.userGlobal$]).pipe(ue$1(([i,e,a])=>{let _=i.map(C=>({category:"integration",id:C.id??"",name:C.name,subtitle:C.integrationType})),d=e.map(C=>({category:"aiProvider",id:C.id??"",name:C.name,subtitle:C.apiType})),I=a.map(C=>({category:"authSetting",id:C.id??"",name:C.name,subtitle:C.authType}));return {integrations:_,aiProviders:d,authSettings:I,total:_.length+d.length+I.length}})),{initialValue:{integrations:[],aiProviders:[],authSettings:[],total:0}});ngOnInit(){if(this.currentUser()){this.syncFormFromState();return}this.isLoading.set(true),this.userState.loadMe().pipe(U(this.destroyRef)).subscribe({next:()=>{this.syncFormFromState(),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}startEditing(){this.syncFormFromState(),this.isEditing.set(true);}cancelEditing(){this.isEditing.set(false);}setTheme(i){this.themePort.setTheme({variant:this.themePort.theme().variant,mode:i});}setThemeVariant(i){this.themePort.setTheme({variant:i,mode:this.themePort.theme().mode});}setEnterKeyBehavior(i){this.preferencesPort.setEnterKeyBehavior(i);}save(){this.isSaving()||(this.isSaving.set(true),this.userState.updateMe({firstname:this.form.controls.firstname.value.trim()||void 0,lastname:this.form.controls.lastname.value.trim()||void 0,bio:this.form.controls.bio.value.trim()||void 0}).pipe(U(this.destroyRef)).subscribe({next:()=>{this.isSaving.set(false),this.isEditing.set(false);},error:()=>this.isSaving.set(false)}));}toggleOverrides(){this.isOverridesExpanded.update(i=>!i),this.pendingDeleteKey.set(null);}pendingDeleteKey=Hi(null);isPendingDelete(i){return this.pendingDeleteKey()===this.entryKey(i)}armDelete(i){i.id&&this.pendingDeleteKey.set(this.entryKey(i));}cancelDelete(){this.pendingDeleteKey.set(null);}confirmDelete(i){if(!i.id)return;this.pendingDeleteKey.set(null),(i.category==="integration"?this.integrationState.delete(i.id,"userGlobal"):i.category==="authSetting"?this.authSettingState.delete(i.id,"userGlobal"):this.providerState.delete(i.id,"userGlobal")).pipe(U(this.destroyRef)).subscribe({error:a=>{console.error(`[UserProfile] Delete failed for ${i.category}:${i.id}:`,a);}});}entryKey(i){return `${i.category}:${i.id}`}goBack(){window.history.length>1?this.location.back():this.router.navigate(["/agentos"]);}trackEntry(i,e){return this.entryKey(e)}syncFormFromState(){let i=this.currentUser();i&&this.form.setValue({firstname:i.firstname??"",lastname:i.lastname??"",bio:i.bio??""});}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Aw({type:o,selectors:[["agentos-user-profile"]],decls:8,vars:1,consts:[[1,"user-profile"],[1,"user-profile__header"],["icon","arrow_back","title","Back",3,"action"],[1,"user-profile__title"],[1,"user-profile__loading"],[1,"user-profile__section"],[1,"user-profile__section-title"],[1,"user-profile__field"],[1,"user-profile__label"],[1,"user-profile__theme-variants"],["type","button",1,"user-profile__theme-variant",3,"user-profile__theme-variant--active"],["role","group","aria-label","Color mode",1,"user-profile__segmented"],["type","button",1,"user-profile__segmented-option",3,"user-profile__segmented-option--active"],[1,"user-profile__field-control"],["role","group","aria-label","Enter key behavior",1,"user-profile__segmented"],[1,"user-profile__hint"],[1,"user-profile__form",3,"formGroup"],[1,"user-profile__view"],["type","button",1,"user-profile__theme-variant",3,"click"],[1,"user-profile__theme-variant-name"],[1,"user-profile__theme-variant-desc"],["type","button",1,"user-profile__segmented-option",3,"click"],[1,"user-profile__form",3,"ngSubmit","formGroup"],[1,"user-profile__value","user-profile__value--readonly"],["for","up-firstname",1,"user-profile__label"],["id","up-firstname","type","text","placeholder","Your first name","formControlName","firstname","autocomplete","given-name",1,"user-profile__input"],["for","up-lastname",1,"user-profile__label"],["id","up-lastname","type","text","placeholder","Your last name","formControlName","lastname","autocomplete","family-name",1,"user-profile__input"],["for","up-bio",1,"user-profile__label"],["id","up-bio","placeholder","A short description about yourself","formControlName","bio","rows","4",1,"user-profile__input","user-profile__input--textarea"],[1,"user-profile__actions"],["type","submit",1,"user-profile__btn","user-profile__btn--primary",3,"disabled"],["type","button",1,"user-profile__btn",3,"click"],[1,"user-profile__value"],[1,"user-profile__field","user-profile__field--bio"],["type","button",1,"user-profile__btn","user-profile__btn--primary",3,"click"],[1,"user-profile__overrides"],["type","button",1,"user-profile__overrides-toggle",3,"click"],[1,"user-profile__overrides-arrow"],[1,"user-profile__overrides-count"],[1,"user-profile__overrides-empty"],[1,"user-profile__overrides-subtitle"],[1,"user-profile__overrides-list"],[1,"user-profile__overrides-row"],[1,"user-profile__overrides-name"],[1,"user-profile__overrides-subtitle-text"],["type","button",1,"user-profile__overrides-delete"],[1,"user-profile__overrides-confirm-label"],["type","button",1,"user-profile__overrides-delete","user-profile__overrides-delete--confirm",3,"click"],["type","button",1,"user-profile__overrides-delete",3,"click"]],template:function(e,a){if(e&1&&(vs(0,"div",0)(1,"header",1)(2,"ds-icon-button",2),Ag("action",function(){return a.goBack()}),fl(),vs(3,"h1",3),WC(4,"My profile"),fl()(),eC(5,re,2,0,"p",4)(6,we,29,1)(7,Me,2,0,"p",4),fl()),e&2){let _;XE(5),tC(a.isLoading()?5:(_=a.currentUser())?6:7,_);}},dependencies:[ni,Jn,Ye,Zn,Xn,En,An,Se$1],styles:[".user-profile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.user-profile__header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:.5rem}.user-profile__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-accent)}.user-profile__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.user-profile__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.user-profile__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.user-profile__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.user-profile__view[_ngcontent-%COMP%], .user-profile__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.user-profile__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.user-profile__section-title[_ngcontent-%COMP%]{margin:0;font-family:var(--font-heading);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--color-neutral-500);border-bottom:1px solid var(--color-divider);padding-bottom:.5rem}.user-profile__field[_ngcontent-%COMP%]{display:grid;grid-template-columns:140px 1fr;align-items:baseline;gap:.75rem}.user-profile__field--bio[_ngcontent-%COMP%]{align-items:start}.user-profile__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text-secondary);white-space:nowrap}.user-profile__value[_ngcontent-%COMP%]{font-size:.9375rem;color:var(--color-text);word-break:break-word;white-space:pre-wrap}.user-profile__value--readonly[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.875rem}.user-profile__segmented[_ngcontent-%COMP%]{display:inline-flex;justify-self:start;border:1px solid var(--color-divider);overflow:hidden}.user-profile__segmented-option[_ngcontent-%COMP%]{padding:.4rem .85rem;background:transparent;border:none;border-right:1px solid var(--color-divider);color:var(--color-text-secondary);font-size:.875rem;cursor:pointer;transition:background .15s ease,color .15s ease}.user-profile__segmented-option[_ngcontent-%COMP%]:last-child{border-right:none}.user-profile__segmented-option[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.user-profile__segmented-option--active[_ngcontent-%COMP%]{background:var(--color-accent);color:#fff}.user-profile__segmented-option--active[_ngcontent-%COMP%]:hover{background:var(--color-accent-700)}.user-profile__field-control[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.4rem}.user-profile__hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--color-text-secondary)}.user-profile__input[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;border-radius:0;transition:border-color .15s ease;resize:none}.user-profile__input[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.user-profile__input[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.user-profile__input--textarea[_ngcontent-%COMP%]{line-height:1.5;resize:vertical}.user-profile__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.user-profile__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border:1px solid var(--color-divider);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;cursor:pointer;border-radius:0;transition:background .15s ease,border-color .15s ease}.user-profile__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.user-profile__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.user-profile__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.user-profile__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}.user-profile__theme-variants[_ngcontent-%COMP%]{display:flex;gap:8px;justify-self:start}.user-profile__theme-variant[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:10px 16px;border:1px solid var(--color-divider);background:transparent;cursor:pointer;min-width:120px;transition:background .12s,border-color .12s}.user-profile__theme-variant[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.user-profile__theme-variant--active[_ngcontent-%COMP%]{border-color:var(--color-accent);background:color-mix(in srgb,var(--color-accent) 8%,transparent)}.user-profile__theme-variant-name[_ngcontent-%COMP%]{font-family:var(--font-heading);font-size:13px;font-weight:600;color:var(--color-text)}.user-profile__theme-variant-desc[_ngcontent-%COMP%]{font-size:11px;color:var(--color-text-secondary);font-family:var(--font-body)}.user-profile__overrides[_ngcontent-%COMP%]{margin-top:1rem;padding-top:1rem;border-top:1px solid var(--color-divider)}.user-profile__overrides-toggle[_ngcontent-%COMP%]{background:transparent;border:none;padding:.25rem 0;font-size:.85rem;color:var(--color-text-secondary);cursor:pointer;display:flex;align-items:center;gap:.4rem}.user-profile__overrides-toggle[_ngcontent-%COMP%]:hover{color:var(--color-text)}.user-profile__overrides-arrow[_ngcontent-%COMP%]{display:inline-block;font-size:.65rem;transition:transform .15s ease}.user-profile__overrides-arrow--open[_ngcontent-%COMP%]{transform:rotate(90deg)}.user-profile__overrides-count[_ngcontent-%COMP%]{color:var(--color-text-tertiary)}.user-profile__overrides-empty[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary);font-style:italic;padding:.5rem 0 0;margin:0}.user-profile__overrides-subtitle[_ngcontent-%COMP%]{font-family:var(--font-heading);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--color-neutral-500);margin:.75rem 0 .25rem}.user-profile__overrides-list[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.25rem}.user-profile__overrides-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.4rem .5rem;font-size:.85rem;border-radius:0}.user-profile__overrides-row[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.user-profile__overrides-name[_ngcontent-%COMP%]{flex:1;color:var(--color-text);font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-profile__overrides-subtitle-text[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);font-family:var(--font-heading)}.user-profile__overrides-confirm-label[_ngcontent-%COMP%]{font-size:11px;font-family:var(--font-heading);font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--red-deep);white-space:nowrap}.user-profile__overrides-delete[_ngcontent-%COMP%]{background:transparent;border:1px solid transparent;font-size:11px;font-family:var(--font-heading);font-weight:600;color:var(--color-neutral-500);cursor:pointer;padding:3px 8px;border-radius:0;transition:color .12s,background .12s,border-color .12s}.user-profile__overrides-delete[_ngcontent-%COMP%]:hover{color:var(--red);background:color-mix(in srgb,var(--red) 10%,transparent);border-color:var(--red)}.user-profile__overrides-delete--confirm[_ngcontent-%COMP%]{border-color:var(--red);background:var(--red);color:#fff}.user-profile__overrides-delete--confirm[_ngcontent-%COMP%]:hover{background:var(--red-deep);border-color:var(--red-deep)}"]})};export{oe as UserProfileComponent};
@@ -0,0 +1 @@
1
+ import {bR as ma,a7 as ga,S as ha,cD as Rd}from'./main-5DW6JQ3Z.js';function i(t,o,p){return t.pipe(ma(()=>o().pipe(ga(()=>ha(p)))),Rd({bufferSize:1,refCount:true}))}export{i};
@@ -1 +1 @@
1
- import {I}from'./chunk-CekA5yLC.js';import {m}from'./chunk-Cb82rqle.js';import {g,G,w as we,aI as Tr,H as Hi,bR as ma,u as ue,b as U,A as Aw,aJ as Nb,v as vs,be as aT,l as Ag,k as fl,af as Dg,T as TC,r as Tg,bf as uT,ah as rT,n as eC,ac as mC,t as tC,a9 as dC,aa as If,ab as wf,ag as fT}from'./main-FEA3BAHM.js';import {W as Wn,S as Se}from'./chunk-DXVBbChn.js';import'./chunk-BxT6IsjS.js';import'./chunk-DFaRJnOg.js';import'./chunk-Lluy_pM_.js';var F=()=>[];function N(o,e){if(o&1){let t=dC();vs(0,"agentos-prompt-item",4),Ag("deleteRequested",function(n){If(t);let E=mC(2);return wf(E.deletePrompt(n))}),fl();}o&2&&Tg("prompt",e)("platformMode",true);}function V(o,e){if(o&1&&eC(0,N,1,2,"agentos-prompt-item",3),o&2){let t,r=e.$implicit,n=mC();tC((t=n.resolvePrompt(r.id))?0:-1,t);}}var q=class o{router=g(G);destroyRef=g(we);promptState=g(m);refresh$=new Tr(void 0);isLoading=Hi(true);prompts$=this.refresh$.pipe(ma(()=>(this.isLoading.set(true),this.promptState.listPlatform())));promptItems$=this.prompts$.pipe(ue(e=>e.map(t=>({id:t.id??"",name:t.name,description:t.description}))));promptsById=new Map;constructor(){this.prompts$.pipe(U(this.destroyRef)).subscribe({next:e=>{this.promptsById=new Map(e.map(t=>[t.id??"",t])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","prompts","new"]);}deletePrompt(e){this.promptState.delete(e.id??"").pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolvePrompt(e){return this.promptsById.get(e)??null}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=Aw({type:o,selectors:[["agentos-platform-prompts"]],decls:5,vars:7,consts:[["promptItemTpl",""],["title","Platform Prompts","emptyMessage","No platform prompts defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"prompt","platformMode"],[3,"deleteRequested","prompt","platformMode"]],template:function(t,r){if(t&1&&(vs(0,"ds-entity-list",1),aT(1,"async"),Ag("createRequested",function(){return r.openCreateForm()}),vs(2,"ds-icon-button",2),Ag("action",function(){return r.goBack()}),fl()(),Dg(3,V,1,1,"ng-template",null,0,fT)),t&2){let n=TC(4);Tg("items",uT(1,4,r.promptItems$)??rT(6,F))("loading",r.isLoading())("showCreate",true)("itemTemplate",n);}},dependencies:[Wn,I,Se,Nb],styles:[".platform-prompts__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-prompts__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})};export{q as PlatformPromptsComponent};
1
+ import {I}from'./chunk-B1vCx0Aw.js';import {m}from'./chunk-DPOrpckU.js';import {g,G,w as we,aI as Tr,H as Hi,bR as ma,u as ue,b as U,A as Aw,aJ as Nb,v as vs,be as aT,l as Ag,k as fl,af as Dg,T as TC,r as Tg,bf as uT,ah as rT,n as eC,ac as mC,t as tC,a9 as dC,aa as If,ab as wf,ag as fT}from'./main-5DW6JQ3Z.js';import {W as Wn,S as Se}from'./chunk-BxdDXOEe.js';import'./chunk-CMmtnH6_.js';import'./chunk-OltVHUw7.js';import'./chunk-D_f8A0gu.js';var F=()=>[];function N(o,e){if(o&1){let t=dC();vs(0,"agentos-prompt-item",4),Ag("deleteRequested",function(n){If(t);let E=mC(2);return wf(E.deletePrompt(n))}),fl();}o&2&&Tg("prompt",e)("platformMode",true);}function V(o,e){if(o&1&&eC(0,N,1,2,"agentos-prompt-item",3),o&2){let t,r=e.$implicit,n=mC();tC((t=n.resolvePrompt(r.id))?0:-1,t);}}var q=class o{router=g(G);destroyRef=g(we);promptState=g(m);refresh$=new Tr(void 0);isLoading=Hi(true);prompts$=this.refresh$.pipe(ma(()=>(this.isLoading.set(true),this.promptState.listPlatform())));promptItems$=this.prompts$.pipe(ue(e=>e.map(t=>({id:t.id??"",name:t.name,description:t.description}))));promptsById=new Map;constructor(){this.prompts$.pipe(U(this.destroyRef)).subscribe({next:e=>{this.promptsById=new Map(e.map(t=>[t.id??"",t])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","prompts","new"]);}deletePrompt(e){this.promptState.delete(e.id??"").pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolvePrompt(e){return this.promptsById.get(e)??null}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=Aw({type:o,selectors:[["agentos-platform-prompts"]],decls:5,vars:7,consts:[["promptItemTpl",""],["title","Platform Prompts","emptyMessage","No platform prompts defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"prompt","platformMode"],[3,"deleteRequested","prompt","platformMode"]],template:function(t,r){if(t&1&&(vs(0,"ds-entity-list",1),aT(1,"async"),Ag("createRequested",function(){return r.openCreateForm()}),vs(2,"ds-icon-button",2),Ag("action",function(){return r.goBack()}),fl()(),Dg(3,V,1,1,"ng-template",null,0,fT)),t&2){let n=TC(4);Tg("items",uT(1,4,r.promptItems$)??rT(6,F))("loading",r.isLoading())("showCreate",true)("itemTemplate",n);}},dependencies:[Wn,I,Se,Nb],styles:[".platform-prompts__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-prompts__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})};export{q as PlatformPromptsComponent};
@@ -1,4 +1,4 @@
1
- import {s as se}from'./chunk-BfoCTjUr.js';import {a as Dr,z as zi,F as Fn,H as Hi,h as ht,b as gr,_ as _r}from'./chunk-DXVBbChn.js';import {g,J as dy,P,Y as x,aK as Do,aL as qn,bC as ge,bD as vt,aN as wt,br as Cl,az as Qt,aV as w,aR as K,bE as X,al as yt,aS as Ut,bF as p,bG as Pt,A as Aw,aZ as YT,bz as vC,bH as Eg,b4 as nT,D as Fg,bI as dr,I as IC,E as wC,bu as kg,bJ as fe,bK as pe,bL as mr,aO as G,bs as Qn,bM as F,aQ as As,an as ce,O as Ot,bN as mt,bO as Yy,ae as Ot$1,S as ha,u as ue,bP as Zy,bQ as bd,bR as ma,aE as A,bt as Ve$1,bS as pn,bT as Od,bU as Ky,aA as sn,bV as Y,bW as Pt$1,bX as po,bY as X$1,bZ as xt,aY as ks,aC as Cu,l as Ag,C as Cg,aw as pl,bA as DC,ax as hl,ac as mC,b_ as FC,y as Hg,b$ as Ng,c0 as E,c1 as ME,c2 as kt$1,bB as Ii}from'./main-FEA3BAHM.js';import {D}from'./chunk-DFaRJnOg.js';var xe=class a{http=g(dy);projectState=g(P);getBaseUrl(){return `/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/schedulers`}listSchedulers(){return this.http.get(this.getBaseUrl())}getScheduler(o){return this.http.get(`${this.getBaseUrl()}/${o}`)}createScheduler(o){return this.http.post(this.getBaseUrl(),o)}listSchedulersForProject(o){return this.http.get(`/api/projects/${o}/schedulers`)}enableSchedulerForProject(o,e){return this.http.post(`/api/projects/${o}/schedulers/${e}/enable`,{})}disableSchedulerForProject(o,e){return this.http.post(`/api/projects/${o}/schedulers/${e}/disable`,{})}runSchedulerNowForProject(o,e){return this.http.post(`/api/projects/${o}/schedulers/${e}/run-now`,{})}deleteSchedulerForProject(o,e){return this.http.delete(`/api/projects/${o}/schedulers/${e}`)}updateSchedulerForProject(o,e,t){return this.http.put(`/api/projects/${o}/schedulers/${e}`,t)}createSchedulerForProject(o,e){return this.http.post(`/api/projects/${o}/schedulers`,e)}updateScheduler(o,e){return this.http.put(`${this.getBaseUrl()}/${o}`,e)}deleteScheduler(o){return this.http.delete(`${this.getBaseUrl()}/${o}`)}enableScheduler(o){return this.http.post(`${this.getBaseUrl()}/${o}/enable`,{})}disableScheduler(o){return this.http.post(`${this.getBaseUrl()}/${o}/disable`,{})}runSchedulerNow(o){return this.http.post(`${this.getBaseUrl()}/${o}/run-now`,{})}static \u0275fac=function(e){return new(e||a)};static \u0275prov=x({token:a,factory:a.\u0275fac,providedIn:"root"})};var Ke=["panel"],Ue=["*"];function qe(a,o){if(a&1&&(pl(0,"div",1,0),DC(2),hl()),a&2){let e=o.id,t=mC();FC(t._classList),Hg("mat-mdc-autocomplete-visible",t.showPanel)("mat-mdc-autocomplete-hidden",!t.showPanel)("mat-autocomplete-panel-animations-enabled",!t._animationsDisabled)("mat-primary",t._color==="primary")("mat-accent",t._color==="accent")("mat-warn",t._color==="warn"),Ng("id",t.id),Cg("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby(e));}}var R=class{source;option;constructor(o,e){this.source=o,this.option=e;}},Ve=new w("mat-autocomplete-default-options",{providedIn:"root",factory:()=>({autoActiveFirstOption:false,autoSelectActiveOption:false,hideSingleSelectionIndicator:false,requireSelection:false,hasBackdrop:false})}),Ct=(()=>{class a{_changeDetectorRef=g(Cl);_elementRef=g(Qt);_defaults=g(Ve);_animationsDisabled=K();_activeOptionChanges=X.EMPTY;_keyManager;showPanel=false;get isOpen(){return this._isOpen&&this.showPanel}_isOpen=false;_latestOpeningTrigger;_setColor(e){this._color=e,this._changeDetectorRef.markForCheck();}_color;template;panel;options;optionGroups;ariaLabel;ariaLabelledby;displayWith=null;autoActiveFirstOption;autoSelectActiveOption;requireSelection;panelWidth;disableRipple=false;optionSelected=new yt;opened=new yt;closed=new yt;optionActivated=new yt;set classList(e){this._classList=e,this._elementRef.nativeElement.className="";}_classList;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties();}_hideSingleSelectionIndicator;_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck();}id=g(Ut).getId("mat-autocomplete-");inertGroups;constructor(){let e=g(p);this.inertGroups=e?.SAFARI||false,this.autoActiveFirstOption=!!this._defaults.autoActiveFirstOption,this.autoSelectActiveOption=!!this._defaults.autoSelectActiveOption,this.requireSelection=!!this._defaults.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??false;}ngAfterContentInit(){this._keyManager=new Pt(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null});}),this._setVisibility();}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe();}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e);}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options?.length,this._changeDetectorRef.markForCheck();}_emitSelectEvent(e){let t=new R(this,e);this.optionSelected.emit(t);}_getPanelAriaLabelledby(e){if(this.ariaLabel)return null;let t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_skipPredicate(){return false}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=Aw({type:a,selectors:[["mat-autocomplete"]],contentQueries:function(t,i,n){if(t&1&&kg(n,Fn,5)(n,Hi,5),t&2){let s;IC(s=wC())&&(i.options=s),IC(s=wC())&&(i.optionGroups=s);}},viewQuery:function(t,i){if(t&1&&Fg(dr,7)(Ke,5),t&2){let n;IC(n=wC())&&(i.template=n.first),IC(n=wC())&&(i.panel=n.first);}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",YT],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",YT],requireSelection:[2,"requireSelection","requireSelection",YT],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",YT],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",YT]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],features:[nT([{provide:zi,useExisting:a}])],ngContentSelectors:Ue,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(t,i){t&1&&(vC(),Eg(0,qe,3,17,"ng-template"));},styles:[`div.mat-mdc-autocomplete-panel {
1
+ import {s as se}from'./chunk-DNDvYXLF.js';import {a as Dr,z as zi,F as Fn,H as Hi,h as ht,b as gr,_ as _r}from'./chunk-BxdDXOEe.js';import {g,J as dy,P,Y as x,aK as Do,aL as qn,bC as ge,bD as vt,aN as wt,br as Cl,az as Qt,aV as w,aR as K,bE as X,al as yt,aS as Ut,bF as p,bG as Pt,A as Aw,aZ as YT,bz as vC,bH as Eg,b4 as nT,D as Fg,bI as dr,I as IC,E as wC,bu as kg,bJ as fe,bK as pe,bL as mr,aO as G,bs as Qn,bM as F,aQ as As,an as ce,O as Ot,bN as mt,bO as Yy,ae as Ot$1,S as ha,u as ue,bP as Zy,bQ as bd,bR as ma,aE as A,bt as Ve$1,bS as pn,bT as Od,bU as Ky,aA as sn,bV as Y,bW as Pt$1,bX as po,bY as X$1,bZ as xt,aY as ks,aC as Cu,l as Ag,C as Cg,aw as pl,bA as DC,ax as hl,ac as mC,b_ as FC,y as Hg,b$ as Ng,c0 as E,c1 as ME,c2 as kt$1,bB as Ii}from'./main-5DW6JQ3Z.js';import {D}from'./chunk-OltVHUw7.js';var xe=class a{http=g(dy);projectState=g(P);getBaseUrl(){return `/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/schedulers`}listSchedulers(){return this.http.get(this.getBaseUrl())}getScheduler(o){return this.http.get(`${this.getBaseUrl()}/${o}`)}createScheduler(o){return this.http.post(this.getBaseUrl(),o)}listSchedulersForProject(o){return this.http.get(`/api/projects/${o}/schedulers`)}enableSchedulerForProject(o,e){return this.http.post(`/api/projects/${o}/schedulers/${e}/enable`,{})}disableSchedulerForProject(o,e){return this.http.post(`/api/projects/${o}/schedulers/${e}/disable`,{})}runSchedulerNowForProject(o,e){return this.http.post(`/api/projects/${o}/schedulers/${e}/run-now`,{})}deleteSchedulerForProject(o,e){return this.http.delete(`/api/projects/${o}/schedulers/${e}`)}updateSchedulerForProject(o,e,t){return this.http.put(`/api/projects/${o}/schedulers/${e}`,t)}createSchedulerForProject(o,e){return this.http.post(`/api/projects/${o}/schedulers`,e)}updateScheduler(o,e){return this.http.put(`${this.getBaseUrl()}/${o}`,e)}deleteScheduler(o){return this.http.delete(`${this.getBaseUrl()}/${o}`)}enableScheduler(o){return this.http.post(`${this.getBaseUrl()}/${o}/enable`,{})}disableScheduler(o){return this.http.post(`${this.getBaseUrl()}/${o}/disable`,{})}runSchedulerNow(o){return this.http.post(`${this.getBaseUrl()}/${o}/run-now`,{})}static \u0275fac=function(e){return new(e||a)};static \u0275prov=x({token:a,factory:a.\u0275fac,providedIn:"root"})};var Ke=["panel"],Ue=["*"];function qe(a,o){if(a&1&&(pl(0,"div",1,0),DC(2),hl()),a&2){let e=o.id,t=mC();FC(t._classList),Hg("mat-mdc-autocomplete-visible",t.showPanel)("mat-mdc-autocomplete-hidden",!t.showPanel)("mat-autocomplete-panel-animations-enabled",!t._animationsDisabled)("mat-primary",t._color==="primary")("mat-accent",t._color==="accent")("mat-warn",t._color==="warn"),Ng("id",t.id),Cg("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby(e));}}var R=class{source;option;constructor(o,e){this.source=o,this.option=e;}},Ve=new w("mat-autocomplete-default-options",{providedIn:"root",factory:()=>({autoActiveFirstOption:false,autoSelectActiveOption:false,hideSingleSelectionIndicator:false,requireSelection:false,hasBackdrop:false})}),Ct=(()=>{class a{_changeDetectorRef=g(Cl);_elementRef=g(Qt);_defaults=g(Ve);_animationsDisabled=K();_activeOptionChanges=X.EMPTY;_keyManager;showPanel=false;get isOpen(){return this._isOpen&&this.showPanel}_isOpen=false;_latestOpeningTrigger;_setColor(e){this._color=e,this._changeDetectorRef.markForCheck();}_color;template;panel;options;optionGroups;ariaLabel;ariaLabelledby;displayWith=null;autoActiveFirstOption;autoSelectActiveOption;requireSelection;panelWidth;disableRipple=false;optionSelected=new yt;opened=new yt;closed=new yt;optionActivated=new yt;set classList(e){this._classList=e,this._elementRef.nativeElement.className="";}_classList;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties();}_hideSingleSelectionIndicator;_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck();}id=g(Ut).getId("mat-autocomplete-");inertGroups;constructor(){let e=g(p);this.inertGroups=e?.SAFARI||false,this.autoActiveFirstOption=!!this._defaults.autoActiveFirstOption,this.autoSelectActiveOption=!!this._defaults.autoSelectActiveOption,this.requireSelection=!!this._defaults.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??false;}ngAfterContentInit(){this._keyManager=new Pt(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null});}),this._setVisibility();}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe();}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e);}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options?.length,this._changeDetectorRef.markForCheck();}_emitSelectEvent(e){let t=new R(this,e);this.optionSelected.emit(t);}_getPanelAriaLabelledby(e){if(this.ariaLabel)return null;let t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_skipPredicate(){return false}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=Aw({type:a,selectors:[["mat-autocomplete"]],contentQueries:function(t,i,n){if(t&1&&kg(n,Fn,5)(n,Hi,5),t&2){let s;IC(s=wC())&&(i.options=s),IC(s=wC())&&(i.optionGroups=s);}},viewQuery:function(t,i){if(t&1&&Fg(dr,7)(Ke,5),t&2){let n;IC(n=wC())&&(i.template=n.first),IC(n=wC())&&(i.panel=n.first);}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",YT],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",YT],requireSelection:[2,"requireSelection","requireSelection",YT],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",YT],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",YT]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],features:[nT([{provide:zi,useExisting:a}])],ngContentSelectors:Ue,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(t,i){t&1&&(vC(),Eg(0,qe,3,17,"ng-template"));},styles:[`div.mat-mdc-autocomplete-panel {
2
2
  width: 100%;
3
3
  max-height: 256px;
4
4
  visibility: hidden;
@@ -1 +1 @@
1
- import {R}from'./chunk-Brj8HlXc.js';import {c}from'./chunk-CsvLyu6R.js';import {g,G,w as we,H as Hi,m as mT,b as U,A as Aw,v as vs,l as Ag,k as fl,af as Dg,T as TC,r as Tg,n as eC,ac as mC,t as tC,a9 as dC,aa as If,ab as wf,ag as fT}from'./main-FEA3BAHM.js';import {W as Wn,S as Se}from'./chunk-DXVBbChn.js';import'./chunk-BxT6IsjS.js';import'./chunk-DFaRJnOg.js';function M(i,e){if(i&1){let t=dC();vs(0,"agentos-scheduled-prompt-item",4),Ag("enableRequested",function(n){If(t);let r=mC(2);return wf(r.enablePrompt(n))})("disableRequested",function(n){If(t);let r=mC(2);return wf(r.disablePrompt(n))})("deleteRequested",function(n){If(t);let r=mC(2);return wf(r.deletePrompt(n))}),fl();}i&2&&Tg("definition",e)("platformMode",true);}function L(i,e){if(i&1&&eC(0,M,1,2,"agentos-scheduled-prompt-item",3),i&2){let t,o=e.$implicit,n=mC();tC((t=n.resolvePrompt(o.id))?0:-1,t);}}var D=class i{router=g(G);destroyRef=g(we);state=g(c);prompts=Hi([]);isLoading=Hi(true);promptItems=mT(()=>this.prompts().map(e=>({id:e.id??"",name:e.name,description:e.description,badges:[{label:e.enabled?"Enabled":"Disabled",variant:e.enabled?"success":"warning"}]})));constructor(){this.state.listPlatform().pipe(U(this.destroyRef)).subscribe({next:e=>{this.prompts.set(e),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","scheduled-prompts","new"]);}enablePrompt(e){this.state.enable(e.id??"").pipe(U(this.destroyRef)).subscribe(t=>this.patchPrompt(t));}disablePrompt(e){this.state.disable(e.id??"").pipe(U(this.destroyRef)).subscribe(t=>this.patchPrompt(t));}deletePrompt(e){let t=e.id??"";this.state.delete(t).pipe(U(this.destroyRef)).subscribe(()=>this.prompts.update(o=>o.filter(n=>n.id!==t)));}resolvePrompt(e){return this.prompts().find(t=>t.id===e)??null}patchPrompt(e){this.prompts.update(t=>t.map(o=>o.id===e.id?e:o));}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Aw({type:i,selectors:[["agentos-platform-scheduled-prompts"]],decls:4,vars:4,consts:[["scheduledPromptItemTpl",""],["title","Platform Scheduled Prompts","emptyMessage","No platform scheduled prompts defined yet. Add one above.","cardMinWidth","420px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"definition","platformMode"],[3,"enableRequested","disableRequested","deleteRequested","definition","platformMode"]],template:function(t,o){if(t&1&&(vs(0,"ds-entity-list",1),Ag("createRequested",function(){return o.openCreateForm()}),vs(1,"ds-icon-button",2),Ag("action",function(){return o.goBack()}),fl()(),Dg(2,L,1,1,"ng-template",null,0,fT)),t&2){let n=TC(3);Tg("items",o.promptItems())("loading",o.isLoading())("showCreate",true)("itemTemplate",n);}},dependencies:[Wn,R,Se],encapsulation:2})};export{D as PlatformScheduledPromptsComponent};
1
+ import {R}from'./chunk-ALF3Etyg.js';import {c}from'./chunk-Dz0byKBh.js';import {g,G,w as we,H as Hi,m as mT,b as U,A as Aw,v as vs,l as Ag,k as fl,af as Dg,T as TC,r as Tg,n as eC,ac as mC,t as tC,a9 as dC,aa as If,ab as wf,ag as fT}from'./main-5DW6JQ3Z.js';import {W as Wn,S as Se}from'./chunk-BxdDXOEe.js';import'./chunk-CMmtnH6_.js';import'./chunk-OltVHUw7.js';function M(i,e){if(i&1){let t=dC();vs(0,"agentos-scheduled-prompt-item",4),Ag("enableRequested",function(n){If(t);let r=mC(2);return wf(r.enablePrompt(n))})("disableRequested",function(n){If(t);let r=mC(2);return wf(r.disablePrompt(n))})("deleteRequested",function(n){If(t);let r=mC(2);return wf(r.deletePrompt(n))}),fl();}i&2&&Tg("definition",e)("platformMode",true);}function L(i,e){if(i&1&&eC(0,M,1,2,"agentos-scheduled-prompt-item",3),i&2){let t,o=e.$implicit,n=mC();tC((t=n.resolvePrompt(o.id))?0:-1,t);}}var D=class i{router=g(G);destroyRef=g(we);state=g(c);prompts=Hi([]);isLoading=Hi(true);promptItems=mT(()=>this.prompts().map(e=>({id:e.id??"",name:e.name,description:e.description,badges:[{label:e.enabled?"Enabled":"Disabled",variant:e.enabled?"success":"warning"}]})));constructor(){this.state.listPlatform().pipe(U(this.destroyRef)).subscribe({next:e=>{this.prompts.set(e),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","scheduled-prompts","new"]);}enablePrompt(e){this.state.enable(e.id??"").pipe(U(this.destroyRef)).subscribe(t=>this.patchPrompt(t));}disablePrompt(e){this.state.disable(e.id??"").pipe(U(this.destroyRef)).subscribe(t=>this.patchPrompt(t));}deletePrompt(e){let t=e.id??"";this.state.delete(t).pipe(U(this.destroyRef)).subscribe(()=>this.prompts.update(o=>o.filter(n=>n.id!==t)));}resolvePrompt(e){return this.prompts().find(t=>t.id===e)??null}patchPrompt(e){this.prompts.update(t=>t.map(o=>o.id===e.id?e:o));}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Aw({type:i,selectors:[["agentos-platform-scheduled-prompts"]],decls:4,vars:4,consts:[["scheduledPromptItemTpl",""],["title","Platform Scheduled Prompts","emptyMessage","No platform scheduled prompts defined yet. Add one above.","cardMinWidth","420px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"definition","platformMode"],[3,"enableRequested","disableRequested","deleteRequested","definition","platformMode"]],template:function(t,o){if(t&1&&(vs(0,"ds-entity-list",1),Ag("createRequested",function(){return o.openCreateForm()}),vs(1,"ds-icon-button",2),Ag("action",function(){return o.goBack()}),fl()(),Dg(2,L,1,1,"ng-template",null,0,fT)),t&2){let n=TC(3);Tg("items",o.promptItems())("loading",o.isLoading())("showCreate",true)("itemTemplate",n);}},dependencies:[Wn,R,Se],encapsulation:2})};export{D as PlatformScheduledPromptsComponent};
@@ -1 +1 @@
1
- import {O}from'./chunk-CFw8eyQX.js';import {g,G,w as we,d7 as M,aI as Tr,H as Hi,bR as ma,u as ue,b as U,A as Aw,aJ as Nb,v as vs,be as aT,l as Ag,k as fl,af as Dg,T as TC,r as Tg,bf as uT,ah as rT,n as eC,ac as mC,t as tC,a9 as dC,aa as If,ab as wf,ag as fT}from'./main-FEA3BAHM.js';import {W as Wn,S as Se}from'./chunk-DXVBbChn.js';import'./chunk-BxT6IsjS.js';import'./chunk-DFaRJnOg.js';var S=()=>[];function F(n,t){if(n&1){let e=dC();vs(0,"agentos-agent-config-item",4),Ag("deleteRequested",function(i){If(e);let E=mC(2);return wf(E.deleteConfig(i))}),fl();}n&2&&Tg("config",t)("platformMode",true);}function N(n,t){if(n&1&&eC(0,F,1,2,"agentos-agent-config-item",3),n&2){let e,o=t.$implicit,i=mC();tC((e=i.resolveConfig(o.id))?0:-1,e);}}var q=class n{router=g(G);destroyRef=g(we);agentConfigController=g(M);refresh$=new Tr(void 0);isLoading=Hi(true);configs$=this.refresh$.pipe(ma(()=>(this.isLoading.set(true),this.agentConfigController.listPlatformAgentsAgentConfig(true))));configItems$=this.configs$.pipe(ue(t=>t.map(e=>({id:e.id??"",name:e.name,description:e.description}))));configsById=new Map;constructor(){this.configs$.pipe(U(this.destroyRef)).subscribe({next:t=>{this.configsById=new Map(t.map(e=>[e.id??"",e])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","agent-configs","new"]);}deleteConfig(t){this.agentConfigController.deleteAgentConfig(t.id??"").pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolveConfig(t){return this.configsById.get(t)??null}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Aw({type:n,selectors:[["agentos-platform-agent-configs"]],decls:5,vars:7,consts:[["agentConfigItemTpl",""],["title","Platform Agent Configs","emptyMessage","No platform agent configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"config","platformMode"],[3,"deleteRequested","config","platformMode"]],template:function(e,o){if(e&1&&(vs(0,"ds-entity-list",1),aT(1,"async"),Ag("createRequested",function(){return o.openCreateForm()}),vs(2,"ds-icon-button",2),Ag("action",function(){return o.goBack()}),fl()(),Dg(3,N,1,1,"ng-template",null,0,fT)),e&2){let i=TC(4);Tg("items",uT(1,4,o.configItems$)??rT(6,S))("loading",o.isLoading())("showCreate",true)("itemTemplate",i);}},dependencies:[Wn,O,Se,Nb],styles:[".platform-agent-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-agent-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})};export{q as PlatformAgentConfigsComponent};
1
+ import {O}from'./chunk-DPfl06Mj.js';import {g,G,w as we,d7 as M,aI as Tr,H as Hi,bR as ma,u as ue,b as U,A as Aw,aJ as Nb,v as vs,be as aT,l as Ag,k as fl,af as Dg,T as TC,r as Tg,bf as uT,ah as rT,n as eC,ac as mC,t as tC,a9 as dC,aa as If,ab as wf,ag as fT}from'./main-5DW6JQ3Z.js';import {W as Wn,S as Se}from'./chunk-BxdDXOEe.js';import'./chunk-CMmtnH6_.js';import'./chunk-OltVHUw7.js';var S=()=>[];function F(n,t){if(n&1){let e=dC();vs(0,"agentos-agent-config-item",4),Ag("deleteRequested",function(i){If(e);let E=mC(2);return wf(E.deleteConfig(i))}),fl();}n&2&&Tg("config",t)("platformMode",true);}function N(n,t){if(n&1&&eC(0,F,1,2,"agentos-agent-config-item",3),n&2){let e,o=t.$implicit,i=mC();tC((e=i.resolveConfig(o.id))?0:-1,e);}}var q=class n{router=g(G);destroyRef=g(we);agentConfigController=g(M);refresh$=new Tr(void 0);isLoading=Hi(true);configs$=this.refresh$.pipe(ma(()=>(this.isLoading.set(true),this.agentConfigController.listPlatformAgentsAgentConfig(true))));configItems$=this.configs$.pipe(ue(t=>t.map(e=>({id:e.id??"",name:e.name,description:e.description}))));configsById=new Map;constructor(){this.configs$.pipe(U(this.destroyRef)).subscribe({next:t=>{this.configsById=new Map(t.map(e=>[e.id??"",e])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","agent-configs","new"]);}deleteConfig(t){this.agentConfigController.deleteAgentConfig(t.id??"").pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolveConfig(t){return this.configsById.get(t)??null}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Aw({type:n,selectors:[["agentos-platform-agent-configs"]],decls:5,vars:7,consts:[["agentConfigItemTpl",""],["title","Platform Agent Configs","emptyMessage","No platform agent configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"config","platformMode"],[3,"deleteRequested","config","platformMode"]],template:function(e,o){if(e&1&&(vs(0,"ds-entity-list",1),aT(1,"async"),Ag("createRequested",function(){return o.openCreateForm()}),vs(2,"ds-icon-button",2),Ag("action",function(){return o.goBack()}),fl()(),Dg(3,N,1,1,"ng-template",null,0,fT)),e&2){let i=TC(4);Tg("items",uT(1,4,o.configItems$)??rT(6,S))("loading",o.isLoading())("showCreate",true)("itemTemplate",i);}},dependencies:[Wn,O,Se,Nb],styles:[".platform-agent-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-agent-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})};export{q as PlatformAgentConfigsComponent};
@@ -1,4 +1,4 @@
1
- import {W as We$1,Q as Qt$1}from'./chunk-BxT6IsjS.js';import {_,b as _e,d as an,E as En}from'./chunk-DFaRJnOg.js';import {aK as Do,aL as qn,cp as Se,aN as wt$1,g,az as Qt,br as Cl,bF as p,aS as Ut$1,aO as G,aV as w,cq as vB,m as mT,cr as EB,cs as vi,H as Hi,an as ce$1,aR as K,bs as Qn,cc as Hf,bQ as bd,u as ue,au as tv,ae as Ot$1,ap as Vy,bO as Yy,ct as CB,A as Aw,cd as Sb,bz as vC,af as Dg,ag as fT,v as vs,l as Ag,n as eC,bA as DC,k as fl,X as XE,y as Hg,t as tC,b4 as nT,cu as Lg,D as Fg,cv as CC,I as IC,E as wC,cw as Pg,bu as kg,aY as ks,aQ as As,cx as si,cy as Xr,aC as Cu,aZ as YT,b$ as Ng,C as Cg,bE as X,b5 as Sg,aw as pl,ax as hl,ac as mC,o as bg,r as Tg,T as TC,cz as Sn$1,aW as D,cA as on,cB as R,cC as Ce,W as WC,a8 as Zg,aE as A,cD as Rd}from'./main-FEA3BAHM.js';var oe=class{_box;_destroyed=new ce$1;_resizeSubject=new ce$1;_resizeObserver;_elementObservables=new Map;constructor(l){this._box=l,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)));}observe(l){return this._elementObservables.has(l)||this._elementObservables.set(l,new A(e=>{let t=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(l,{box:this._box}),()=>{this._resizeObserver?.unobserve(l),t.unsubscribe(),this._elementObservables.delete(l);}}).pipe(Ot$1(e=>e.some(t=>t.target===l)),Rd({bufferSize:1,refCount:true}),Vy(this._destroyed))),this._elementObservables.get(l)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear();}},qe=(()=>{class i{_cleanupErrorListener;_observers=new Map;_ngZone=g(G);constructor(){}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),this._cleanupErrorListener?.();}observe(e,t){let n=t?.box||"content-box";return this._observers.has(n)||this._observers.set(n,new oe(n)),this._observers.get(n).observe(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Ce({token:i,factory:i.\u0275fac})}return i})();var ut=["notch"],ht=["*"],Ue=["iconPrefixContainer"],We=["textPrefixContainer"],Ge=["iconSuffixContainer"],$e=["textSuffixContainer"],pt=["textField"],_t=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],bt=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function gt(i,l){i&1&&bg(0,"span",21);}function vt(i,l){if(i&1&&(vs(0,"label",20),DC(1,1),eC(2,gt,1,0,"span",21),fl()),i&2){let e=mC(2);Tg("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),Cg("for",e._control.disableAutomaticLabeling?null:e._control.id),XE(2),tC(!e.hideRequiredMarker&&e._control.required?2:-1);}}function xt(i,l){if(i&1&&eC(0,vt,3,5,"label",20),i&2){let e=mC();tC(e._hasFloatingLabel()?0:-1);}}function yt(i,l){i&1&&bg(0,"div",7);}function Ft(i,l){}function Ct(i,l){if(i&1&&Dg(0,Ft,0,0,"ng-template",13),i&2){mC(2);let e=TC(1);Tg("ngTemplateOutlet",e);}}function wt(i,l){if(i&1&&(vs(0,"div",9),eC(1,Ct,1,1,null,13),fl()),i&2){let e=mC();Tg("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),XE(),tC(e._forceDisplayInfixLabel()?-1:1);}}function Mt(i,l){i&1&&(vs(0,"div",10,2),DC(2,2),fl());}function Et(i,l){i&1&&(vs(0,"div",11,3),DC(2,3),fl());}function St(i,l){}function Tt(i,l){if(i&1&&Dg(0,St,0,0,"ng-template",13),i&2){mC();let e=TC(1);Tg("ngTemplateOutlet",e);}}function Rt(i,l){i&1&&(vs(0,"div",14,4),DC(2,4),fl());}function Dt(i,l){i&1&&(vs(0,"div",15,5),DC(2,5),fl());}function Nt(i,l){i&1&&bg(0,"div",16);}function At(i,l){i&1&&(vs(0,"div",18),DC(1,6),fl());}function It(i,l){if(i&1&&(vs(0,"mat-hint",22),WC(1),fl()),i&2){let e=mC(2);Tg("id",e._hintLabelId),XE(),Zg(e.hintLabel);}}function Lt(i,l){if(i&1&&(vs(0,"div",19),eC(1,It,2,2,"mat-hint",22),DC(2,7),bg(3,"div",23),DC(4,8),fl()),i&2){let e=mC();XE(),tC(e.hintLabel?1:-1);}}var ae=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i,selectors:[["mat-label"]]})}return i})(),kt=new w("MatError");var le=(()=>{class i{align="start";id=g(Ut$1).getId("mat-mdc-hint-");static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(t,n){t&2&&(Ng("id",n.id),Cg("align",null),Hg("mat-mdc-form-field-hint-end",n.align==="end"));},inputs:{align:"align",id:"id"}})}return i})(),et=new w("MatPrefix"),Ot=(()=>{class i{set _isTextSelector(e){this._isText=true;}_isText=false;static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:[0,"matTextPrefix","_isTextSelector"]},features:[nT([{provide:et,useExisting:i}])]})}return i})(),tt=new w("MatSuffix"),zt=(()=>{class i{set _isTextSelector(e){this._isText=true;}_isText=false;static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:[0,"matTextSuffix","_isTextSelector"]},features:[nT([{provide:tt,useExisting:i}])]})}return i})(),it=new w("FloatingLabelParent"),Ze=(()=>{class i{_elementRef=g(Qt);get floating(){return this._floating}set floating(e){this._floating=e,this.monitorResize&&this._handleResize();}_floating=false;get monitorResize(){return this._monitorResize}set monitorResize(e){this._monitorResize=e,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe();}_monitorResize=false;_resizeObserver=g(qe);_ngZone=g(G);_parent=g(it);_resizeSubscription=new X;ngOnDestroy(){this._resizeSubscription.unsubscribe();}getWidth(){return Pt(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized());}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize());});}static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(t,n){t&2&&Hg("mdc-floating-label--float-above",n.floating);},inputs:{floating:"floating",monitorResize:"monitorResize"}})}return i})();function Pt(i){let l=i;if(l.offsetParent!==null)return l.scrollWidth;let e=l.cloneNode(true);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let t=e.scrollWidth;return e.remove(),t}var Qe="mdc-line-ripple--active",Z="mdc-line-ripple--deactivating",Xe=(()=>{class i{_elementRef=g(Qt);_cleanupTransitionEnd;constructor(){let e=g(G),t=g(As);e.runOutsideAngular(()=>{this._cleanupTransitionEnd=t.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd);});}activate(){let e=this._elementRef.nativeElement.classList;e.remove(Z),e.add(Qe);}deactivate(){this._elementRef.nativeElement.classList.add(Z);}_handleTransitionEnd=e=>{let t=this._elementRef.nativeElement.classList,n=t.contains(Z);e.propertyName==="opacity"&&n&&t.remove(Qe,Z);};ngOnDestroy(){this._cleanupTransitionEnd();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]})}return i})(),Ye=(()=>{class i{_elementRef=g(Qt);_ngZone=g(G);open=false;_notch;ngAfterViewInit(){let e=this._elementRef.nativeElement,t=e.querySelector(".mdc-floating-label");t?(e.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(t.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>t.style.transitionDuration="");}))):e.classList.add("mdc-notched-outline--no-label");}_setNotchWidth(e){let t=this._notch.nativeElement;!this.open||!e?t.style.width="":t.style.width=`calc(${e}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`;}_setMaxWidth(e){this._notch.nativeElement.style.setProperty("--mat-form-field-notch-max-width",`calc(100% - ${e}px)`);}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Aw({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(t,n){if(t&1&&Fg(ut,5),t&2){let r;IC(r=wC())&&(n._notch=r.first);}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(t,n){t&2&&Hg("mdc-notched-outline--notched",n.open);},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},ngContentSelectors:ht,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(t,n){t&1&&(vC(),Sg(0,"div",1),pl(1,"div",2,0),DC(3),hl(),Sg(4,"div",3));},encapsulation:2})}return i})(),de=(()=>{class i{value=null;stateChanges;id;placeholder;ngControl=null;focused=false;empty=false;shouldLabelFloat=false;required=false;disabled=false;errorState=false;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling;describedByIds;static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i})}return i})();var se=new w("MatFormField"),Bt=new w("MAT_FORM_FIELD_DEFAULT_OPTIONS"),Ke="fill",Vt="auto",Je="fixed",Ht="translateY(-50%)",nt=(()=>{class i{_elementRef=g(Qt);_changeDetectorRef=g(Cl);_platform=g(p);_idGenerator=g(Ut$1);_ngZone=g(G);_defaults=g(Bt,{optional:true});_currentDirection;_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_iconPrefixContainerSignal=vB("iconPrefixContainer");_textPrefixContainerSignal=vB("textPrefixContainer");_iconSuffixContainerSignal=vB("iconSuffixContainer");_textSuffixContainerSignal=vB("textSuffixContainer");_prefixSuffixContainers=mT(()=>[this._iconPrefixContainerSignal(),this._textPrefixContainerSignal(),this._iconSuffixContainerSignal(),this._textSuffixContainerSignal()].map(e=>e?.nativeElement).filter(e=>e!==void 0));_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=EB(ae);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=vi(e);}_hideRequiredMarker=false;color="primary";get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||Vt}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck());}_floatLabel;get appearance(){return this._appearanceSignal()}set appearance(e){let t=e||this._defaults?.appearance||Ke;this._appearanceSignal.set(t);}_appearanceSignal=Hi(Ke);get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||Je}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||Je;}_subscriptSizing=null;get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints();}_hintLabel="";_hasIconPrefix=false;_hasTextPrefix=false;_hasIconSuffix=false;_hasTextSuffix=false;_labelId=this._idGenerator.getId("mat-mdc-form-field-label-");_hintLabelId=this._idGenerator.getId("mat-mdc-hint-");_describedByIds;get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(e){this._explicitFormFieldControl=e;}_destroyed=new ce$1;_isFocused=null;_explicitFormFieldControl;_previousControl=null;_previousControlValidatorFn=null;_stateChanges;_valueChanges;_describedByChanges;_outlineLabelOffsetResizeObserver=null;_animationsDisabled=K();constructor(){let e=this._defaults,t=g(Qn);e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color)),Hf(()=>this._currentDirection=t.valueSignal()),this._syncOutlineLabelOffset();}ngAfterViewInit(){this._updateFocusState(),this._animationsDisabled||this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-form-field-animations-enabled");},300);}),this._changeDetectorRef.detectChanges();}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeSubscript(),this._initializePrefixAndSuffix();}ngAfterContentChecked(){this._assertFormFieldControl(),this._control!==this._previousControl&&(this._initializeControl(this._previousControl),this._control.ngControl&&this._control.ngControl.control&&(this._previousControlValidatorFn=this._control.ngControl.control.validator),this._previousControl=this._control),this._control.ngControl&&this._control.ngControl.control&&this._control.ngControl.control.validator!==this._previousControlValidatorFn&&this._changeDetectorRef.markForCheck();}ngOnDestroy(){this._outlineLabelOffsetResizeObserver?.disconnect(),this._stateChanges?.unsubscribe(),this._valueChanges?.unsubscribe(),this._describedByChanges?.unsubscribe(),this._destroyed.next(),this._destroyed.complete();}getLabelId=mT(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always");}_initializeControl(e){let t=this._control,n="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(n+e.controlType),t.controlType&&this._elementRef.nativeElement.classList.add(n+t.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=t.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck();}),this._describedByChanges?.unsubscribe(),this._describedByChanges=t.stateChanges.pipe(bd([void 0,void 0]),ue(()=>[t.errorState,t.userAriaDescribedBy]),tv(),Ot$1(([[r,a],[s,C]])=>r!==s||a!==C)).subscribe(()=>this._syncDescribedByIds()),this._valueChanges?.unsubscribe(),t.ngControl&&t.ngControl.valueChanges&&(this._valueChanges=t.ngControl.valueChanges.pipe(Vy(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()));}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(e=>!e._isText),this._hasTextPrefix=!!this._prefixChildren.find(e=>e._isText),this._hasIconSuffix=!!this._suffixChildren.find(e=>!e._isText),this._hasTextSuffix=!!this._suffixChildren.find(e=>e._isText);}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),Yy(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck();});}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck();}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck();}),this._validateHints(),this._syncDescribedByIds();}_assertFormFieldControl(){this._control;}_updateFocusState(){let e=this._control.focused;e&&!this._isFocused?(this._isFocused=true,this._lineRipple?.activate()):!e&&(this._isFocused||this._isFocused===null)&&(this._isFocused=false,this._lineRipple?.deactivate()),this._elementRef.nativeElement.classList.toggle("mat-focused",e),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",e);}_syncOutlineLabelOffset(){CB({earlyRead:()=>{if(this._appearanceSignal()!=="outline")return this._outlineLabelOffsetResizeObserver?.disconnect(),null;if(globalThis.ResizeObserver){this._outlineLabelOffsetResizeObserver||=new globalThis.ResizeObserver(()=>{this._writeOutlinedLabelStyles(this._getOutlinedLabelOffset());});for(let e of this._prefixSuffixContainers())this._outlineLabelOffsetResizeObserver.observe(e,{box:"border-box"});}return this._getOutlinedLabelOffset()},write:e=>this._writeOutlinedLabelStyles(e())});}_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return !this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel=mT(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():false}_shouldForward(e){let t=this._control?this._control.ngControl:null;return t&&t[e]}_getSubscriptMessageType(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth();}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth());}_processHints(){this._validateHints(),this._syncDescribedByIds();}_validateHints(){this._hintChildren;}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&e.push(...this._control.userAriaDescribedBy.split(" ")),this._getSubscriptMessageType()==="hint"){let r=this._hintChildren?this._hintChildren.find(s=>s.align==="start"):null,a=this._hintChildren?this._hintChildren.find(s=>s.align==="end"):null;r?e.push(r.id):this._hintLabel&&e.push(this._hintLabelId),a&&e.push(a.id);}else this._errorChildren&&e.push(...this._errorChildren.map(r=>r.id));let t=this._control.describedByIds,n;if(t){let r=this._describedByIds||e;n=e.concat(t.filter(a=>a&&!r.includes(a)));}else n=e;this._control.setDescribedByIds(n),this._describedByIds=e;}}_getOutlinedLabelOffset(){if(!this._hasOutline()||!this._floatingLabel)return null;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return ["",null];if(!this._isAttachedToDom())return null;let e=this._iconPrefixContainer?.nativeElement,t=this._textPrefixContainer?.nativeElement,n=this._iconSuffixContainer?.nativeElement,r=this._textSuffixContainer?.nativeElement,a=e?.getBoundingClientRect().width??0,s=t?.getBoundingClientRect().width??0,C=n?.getBoundingClientRect().width??0,M=r?.getBoundingClientRect().width??0,dt=this._currentDirection==="rtl"?"-1":"1",st=`${a+s}px`,ct=`calc(${dt} * (${st} + var(--mat-mdc-form-field-label-offset-x, 0px)))`,ft=`var(--mat-mdc-form-field-label-transform, ${Ht} translateX(${ct}))`,mt=a+s+C+M;return [ft,mt]}_writeOutlinedLabelStyles(e){if(e!==null){let[t,n]=e;this._floatingLabel&&(this._floatingLabel.element.style.transform=t),n!==null&&this._notchedOutline?._setMaxWidth(n);}}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let t=e.getRootNode();return t&&t!==e}return document.documentElement.contains(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Aw({type:i,selectors:[["mat-form-field"]],contentQueries:function(t,n,r){if(t&1&&(Pg(r,n._labelChild,ae,5),kg(r,de,5)(r,et,5)(r,tt,5)(r,kt,5)(r,le,5)),t&2){CC();let a;IC(a=wC())&&(n._formFieldControl=a.first),IC(a=wC())&&(n._prefixChildren=a),IC(a=wC())&&(n._suffixChildren=a),IC(a=wC())&&(n._errorChildren=a),IC(a=wC())&&(n._hintChildren=a);}},viewQuery:function(t,n){if(t&1&&(Lg(n._iconPrefixContainerSignal,Ue,5)(n._textPrefixContainerSignal,We,5)(n._iconSuffixContainerSignal,Ge,5)(n._textSuffixContainerSignal,$e,5),Fg(pt,5)(Ue,5)(We,5)(Ge,5)($e,5)(Ze,5)(Ye,5)(Xe,5)),t&2){CC(4);let r;IC(r=wC())&&(n._textField=r.first),IC(r=wC())&&(n._iconPrefixContainer=r.first),IC(r=wC())&&(n._textPrefixContainer=r.first),IC(r=wC())&&(n._iconSuffixContainer=r.first),IC(r=wC())&&(n._textSuffixContainer=r.first),IC(r=wC())&&(n._floatingLabel=r.first),IC(r=wC())&&(n._notchedOutline=r.first),IC(r=wC())&&(n._lineRipple=r.first);}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:38,hostBindings:function(t,n){t&2&&Hg("mat-mdc-form-field-label-always-float",n._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",n._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",n._hasIconSuffix)("mat-form-field-invalid",n._control.errorState)("mat-form-field-disabled",n._control.disabled)("mat-form-field-autofilled",n._control.autofilled)("mat-form-field-appearance-fill",n.appearance=="fill")("mat-form-field-appearance-outline",n.appearance=="outline")("mat-form-field-hide-placeholder",n._hasFloatingLabel()&&!n._shouldLabelFloat())("mat-primary",n.color!=="accent"&&n.color!=="warn")("mat-accent",n.color==="accent")("mat-warn",n.color==="warn")("ng-untouched",n._shouldForward("untouched"))("ng-touched",n._shouldForward("touched"))("ng-pristine",n._shouldForward("pristine"))("ng-dirty",n._shouldForward("dirty"))("ng-valid",n._shouldForward("valid"))("ng-invalid",n._shouldForward("invalid"))("ng-pending",n._shouldForward("pending"));},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[nT([{provide:se,useExisting:i},{provide:it,useExisting:i}])],ngContentSelectors:bt,decls:18,vars:21,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],["textSuffixContainer",""],["iconSuffixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],["aria-atomic","true","aria-live","polite",1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(t,n){if(t&1&&(vC(_t),Dg(0,xt,1,1,"ng-template",null,0,fT),vs(2,"div",6,1),Ag("click",function(a){return n._control.onContainerClick(a)}),eC(4,yt,1,0,"div",7),vs(5,"div",8),eC(6,wt,2,2,"div",9),eC(7,Mt,3,0,"div",10),eC(8,Et,3,0,"div",11),vs(9,"div",12),eC(10,Tt,1,1,null,13),DC(11),fl(),eC(12,Rt,3,0,"div",14),eC(13,Dt,3,0,"div",15),fl(),eC(14,Nt,1,0,"div",16),fl(),vs(15,"div",17),eC(16,At,2,0,"div",18)(17,Lt,5,1,"div",19),fl()),t&2){let r;XE(2),Hg("mdc-text-field--filled",!n._hasOutline())("mdc-text-field--outlined",n._hasOutline())("mdc-text-field--no-label",!n._hasFloatingLabel())("mdc-text-field--disabled",n._control.disabled)("mdc-text-field--invalid",n._control.errorState),XE(2),tC(!n._hasOutline()&&!n._control.disabled?4:-1),XE(2),tC(n._hasOutline()?6:-1),XE(),tC(n._hasIconPrefix?7:-1),XE(),tC(n._hasTextPrefix?8:-1),XE(2),tC(!n._hasOutline()||n._forceDisplayInfixLabel()?10:-1),XE(2),tC(n._hasTextSuffix?12:-1),XE(),tC(n._hasIconSuffix?13:-1),XE(),tC(n._hasOutline()?-1:14),XE(),Hg("mat-mdc-form-field-subscript-dynamic-size",n.subscriptSizing==="dynamic");let a=n._getSubscriptMessageType();XE(),tC((r=a)==="error"?16:r==="hint"?17:-1);}},dependencies:[Ze,Ye,Sb,Xe,le],styles:[`.mdc-text-field {
1
+ import {W as We$1,Q as Qt$1}from'./chunk-CMmtnH6_.js';import {_,b as _e,d as an,E as En}from'./chunk-OltVHUw7.js';import {aK as Do,aL as qn,cp as Se,aN as wt$1,g,az as Qt,br as Cl,bF as p,aS as Ut$1,aO as G,aV as w,cq as vB,m as mT,cr as EB,cs as vi,H as Hi,an as ce$1,aR as K,bs as Qn,cc as Hf,bQ as bd,u as ue,au as tv,ae as Ot$1,ap as Vy,bO as Yy,ct as CB,A as Aw,cd as Sb,bz as vC,af as Dg,ag as fT,v as vs,l as Ag,n as eC,bA as DC,k as fl,X as XE,y as Hg,t as tC,b4 as nT,cu as Lg,D as Fg,cv as CC,I as IC,E as wC,cw as Pg,bu as kg,aY as ks,aQ as As,cx as si,cy as Xr,aC as Cu,aZ as YT,b$ as Ng,C as Cg,bE as X,b5 as Sg,aw as pl,ax as hl,ac as mC,o as bg,r as Tg,T as TC,cz as Sn$1,aW as D,cA as on,cB as R,cC as Ce,W as WC,a8 as Zg,aE as A,cD as Rd}from'./main-5DW6JQ3Z.js';var oe=class{_box;_destroyed=new ce$1;_resizeSubject=new ce$1;_resizeObserver;_elementObservables=new Map;constructor(l){this._box=l,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)));}observe(l){return this._elementObservables.has(l)||this._elementObservables.set(l,new A(e=>{let t=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(l,{box:this._box}),()=>{this._resizeObserver?.unobserve(l),t.unsubscribe(),this._elementObservables.delete(l);}}).pipe(Ot$1(e=>e.some(t=>t.target===l)),Rd({bufferSize:1,refCount:true}),Vy(this._destroyed))),this._elementObservables.get(l)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear();}},qe=(()=>{class i{_cleanupErrorListener;_observers=new Map;_ngZone=g(G);constructor(){}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),this._cleanupErrorListener?.();}observe(e,t){let n=t?.box||"content-box";return this._observers.has(n)||this._observers.set(n,new oe(n)),this._observers.get(n).observe(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Ce({token:i,factory:i.\u0275fac})}return i})();var ut=["notch"],ht=["*"],Ue=["iconPrefixContainer"],We=["textPrefixContainer"],Ge=["iconSuffixContainer"],$e=["textSuffixContainer"],pt=["textField"],_t=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],bt=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function gt(i,l){i&1&&bg(0,"span",21);}function vt(i,l){if(i&1&&(vs(0,"label",20),DC(1,1),eC(2,gt,1,0,"span",21),fl()),i&2){let e=mC(2);Tg("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),Cg("for",e._control.disableAutomaticLabeling?null:e._control.id),XE(2),tC(!e.hideRequiredMarker&&e._control.required?2:-1);}}function xt(i,l){if(i&1&&eC(0,vt,3,5,"label",20),i&2){let e=mC();tC(e._hasFloatingLabel()?0:-1);}}function yt(i,l){i&1&&bg(0,"div",7);}function Ft(i,l){}function Ct(i,l){if(i&1&&Dg(0,Ft,0,0,"ng-template",13),i&2){mC(2);let e=TC(1);Tg("ngTemplateOutlet",e);}}function wt(i,l){if(i&1&&(vs(0,"div",9),eC(1,Ct,1,1,null,13),fl()),i&2){let e=mC();Tg("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),XE(),tC(e._forceDisplayInfixLabel()?-1:1);}}function Mt(i,l){i&1&&(vs(0,"div",10,2),DC(2,2),fl());}function Et(i,l){i&1&&(vs(0,"div",11,3),DC(2,3),fl());}function St(i,l){}function Tt(i,l){if(i&1&&Dg(0,St,0,0,"ng-template",13),i&2){mC();let e=TC(1);Tg("ngTemplateOutlet",e);}}function Rt(i,l){i&1&&(vs(0,"div",14,4),DC(2,4),fl());}function Dt(i,l){i&1&&(vs(0,"div",15,5),DC(2,5),fl());}function Nt(i,l){i&1&&bg(0,"div",16);}function At(i,l){i&1&&(vs(0,"div",18),DC(1,6),fl());}function It(i,l){if(i&1&&(vs(0,"mat-hint",22),WC(1),fl()),i&2){let e=mC(2);Tg("id",e._hintLabelId),XE(),Zg(e.hintLabel);}}function Lt(i,l){if(i&1&&(vs(0,"div",19),eC(1,It,2,2,"mat-hint",22),DC(2,7),bg(3,"div",23),DC(4,8),fl()),i&2){let e=mC();XE(),tC(e.hintLabel?1:-1);}}var ae=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i,selectors:[["mat-label"]]})}return i})(),kt=new w("MatError");var le=(()=>{class i{align="start";id=g(Ut$1).getId("mat-mdc-hint-");static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(t,n){t&2&&(Ng("id",n.id),Cg("align",null),Hg("mat-mdc-form-field-hint-end",n.align==="end"));},inputs:{align:"align",id:"id"}})}return i})(),et=new w("MatPrefix"),Ot=(()=>{class i{set _isTextSelector(e){this._isText=true;}_isText=false;static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:[0,"matTextPrefix","_isTextSelector"]},features:[nT([{provide:et,useExisting:i}])]})}return i})(),tt=new w("MatSuffix"),zt=(()=>{class i{set _isTextSelector(e){this._isText=true;}_isText=false;static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:[0,"matTextSuffix","_isTextSelector"]},features:[nT([{provide:tt,useExisting:i}])]})}return i})(),it=new w("FloatingLabelParent"),Ze=(()=>{class i{_elementRef=g(Qt);get floating(){return this._floating}set floating(e){this._floating=e,this.monitorResize&&this._handleResize();}_floating=false;get monitorResize(){return this._monitorResize}set monitorResize(e){this._monitorResize=e,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe();}_monitorResize=false;_resizeObserver=g(qe);_ngZone=g(G);_parent=g(it);_resizeSubscription=new X;ngOnDestroy(){this._resizeSubscription.unsubscribe();}getWidth(){return Pt(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized());}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize());});}static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(t,n){t&2&&Hg("mdc-floating-label--float-above",n.floating);},inputs:{floating:"floating",monitorResize:"monitorResize"}})}return i})();function Pt(i){let l=i;if(l.offsetParent!==null)return l.scrollWidth;let e=l.cloneNode(true);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let t=e.scrollWidth;return e.remove(),t}var Qe="mdc-line-ripple--active",Z="mdc-line-ripple--deactivating",Xe=(()=>{class i{_elementRef=g(Qt);_cleanupTransitionEnd;constructor(){let e=g(G),t=g(As);e.runOutsideAngular(()=>{this._cleanupTransitionEnd=t.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd);});}activate(){let e=this._elementRef.nativeElement.classList;e.remove(Z),e.add(Qe);}deactivate(){this._elementRef.nativeElement.classList.add(Z);}_handleTransitionEnd=e=>{let t=this._elementRef.nativeElement.classList,n=t.contains(Z);e.propertyName==="opacity"&&n&&t.remove(Qe,Z);};ngOnDestroy(){this._cleanupTransitionEnd();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]})}return i})(),Ye=(()=>{class i{_elementRef=g(Qt);_ngZone=g(G);open=false;_notch;ngAfterViewInit(){let e=this._elementRef.nativeElement,t=e.querySelector(".mdc-floating-label");t?(e.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(t.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>t.style.transitionDuration="");}))):e.classList.add("mdc-notched-outline--no-label");}_setNotchWidth(e){let t=this._notch.nativeElement;!this.open||!e?t.style.width="":t.style.width=`calc(${e}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`;}_setMaxWidth(e){this._notch.nativeElement.style.setProperty("--mat-form-field-notch-max-width",`calc(100% - ${e}px)`);}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Aw({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(t,n){if(t&1&&Fg(ut,5),t&2){let r;IC(r=wC())&&(n._notch=r.first);}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(t,n){t&2&&Hg("mdc-notched-outline--notched",n.open);},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},ngContentSelectors:ht,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(t,n){t&1&&(vC(),Sg(0,"div",1),pl(1,"div",2,0),DC(3),hl(),Sg(4,"div",3));},encapsulation:2})}return i})(),de=(()=>{class i{value=null;stateChanges;id;placeholder;ngControl=null;focused=false;empty=false;shouldLabelFloat=false;required=false;disabled=false;errorState=false;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling;describedByIds;static \u0275fac=function(t){return new(t||i)};static \u0275dir=ks({type:i})}return i})();var se=new w("MatFormField"),Bt=new w("MAT_FORM_FIELD_DEFAULT_OPTIONS"),Ke="fill",Vt="auto",Je="fixed",Ht="translateY(-50%)",nt=(()=>{class i{_elementRef=g(Qt);_changeDetectorRef=g(Cl);_platform=g(p);_idGenerator=g(Ut$1);_ngZone=g(G);_defaults=g(Bt,{optional:true});_currentDirection;_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_iconPrefixContainerSignal=vB("iconPrefixContainer");_textPrefixContainerSignal=vB("textPrefixContainer");_iconSuffixContainerSignal=vB("iconSuffixContainer");_textSuffixContainerSignal=vB("textSuffixContainer");_prefixSuffixContainers=mT(()=>[this._iconPrefixContainerSignal(),this._textPrefixContainerSignal(),this._iconSuffixContainerSignal(),this._textSuffixContainerSignal()].map(e=>e?.nativeElement).filter(e=>e!==void 0));_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=EB(ae);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=vi(e);}_hideRequiredMarker=false;color="primary";get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||Vt}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck());}_floatLabel;get appearance(){return this._appearanceSignal()}set appearance(e){let t=e||this._defaults?.appearance||Ke;this._appearanceSignal.set(t);}_appearanceSignal=Hi(Ke);get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||Je}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||Je;}_subscriptSizing=null;get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints();}_hintLabel="";_hasIconPrefix=false;_hasTextPrefix=false;_hasIconSuffix=false;_hasTextSuffix=false;_labelId=this._idGenerator.getId("mat-mdc-form-field-label-");_hintLabelId=this._idGenerator.getId("mat-mdc-hint-");_describedByIds;get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(e){this._explicitFormFieldControl=e;}_destroyed=new ce$1;_isFocused=null;_explicitFormFieldControl;_previousControl=null;_previousControlValidatorFn=null;_stateChanges;_valueChanges;_describedByChanges;_outlineLabelOffsetResizeObserver=null;_animationsDisabled=K();constructor(){let e=this._defaults,t=g(Qn);e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color)),Hf(()=>this._currentDirection=t.valueSignal()),this._syncOutlineLabelOffset();}ngAfterViewInit(){this._updateFocusState(),this._animationsDisabled||this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-form-field-animations-enabled");},300);}),this._changeDetectorRef.detectChanges();}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeSubscript(),this._initializePrefixAndSuffix();}ngAfterContentChecked(){this._assertFormFieldControl(),this._control!==this._previousControl&&(this._initializeControl(this._previousControl),this._control.ngControl&&this._control.ngControl.control&&(this._previousControlValidatorFn=this._control.ngControl.control.validator),this._previousControl=this._control),this._control.ngControl&&this._control.ngControl.control&&this._control.ngControl.control.validator!==this._previousControlValidatorFn&&this._changeDetectorRef.markForCheck();}ngOnDestroy(){this._outlineLabelOffsetResizeObserver?.disconnect(),this._stateChanges?.unsubscribe(),this._valueChanges?.unsubscribe(),this._describedByChanges?.unsubscribe(),this._destroyed.next(),this._destroyed.complete();}getLabelId=mT(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always");}_initializeControl(e){let t=this._control,n="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(n+e.controlType),t.controlType&&this._elementRef.nativeElement.classList.add(n+t.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=t.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck();}),this._describedByChanges?.unsubscribe(),this._describedByChanges=t.stateChanges.pipe(bd([void 0,void 0]),ue(()=>[t.errorState,t.userAriaDescribedBy]),tv(),Ot$1(([[r,a],[s,C]])=>r!==s||a!==C)).subscribe(()=>this._syncDescribedByIds()),this._valueChanges?.unsubscribe(),t.ngControl&&t.ngControl.valueChanges&&(this._valueChanges=t.ngControl.valueChanges.pipe(Vy(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()));}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(e=>!e._isText),this._hasTextPrefix=!!this._prefixChildren.find(e=>e._isText),this._hasIconSuffix=!!this._suffixChildren.find(e=>!e._isText),this._hasTextSuffix=!!this._suffixChildren.find(e=>e._isText);}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),Yy(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck();});}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck();}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck();}),this._validateHints(),this._syncDescribedByIds();}_assertFormFieldControl(){this._control;}_updateFocusState(){let e=this._control.focused;e&&!this._isFocused?(this._isFocused=true,this._lineRipple?.activate()):!e&&(this._isFocused||this._isFocused===null)&&(this._isFocused=false,this._lineRipple?.deactivate()),this._elementRef.nativeElement.classList.toggle("mat-focused",e),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",e);}_syncOutlineLabelOffset(){CB({earlyRead:()=>{if(this._appearanceSignal()!=="outline")return this._outlineLabelOffsetResizeObserver?.disconnect(),null;if(globalThis.ResizeObserver){this._outlineLabelOffsetResizeObserver||=new globalThis.ResizeObserver(()=>{this._writeOutlinedLabelStyles(this._getOutlinedLabelOffset());});for(let e of this._prefixSuffixContainers())this._outlineLabelOffsetResizeObserver.observe(e,{box:"border-box"});}return this._getOutlinedLabelOffset()},write:e=>this._writeOutlinedLabelStyles(e())});}_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return !this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel=mT(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():false}_shouldForward(e){let t=this._control?this._control.ngControl:null;return t&&t[e]}_getSubscriptMessageType(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth();}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth());}_processHints(){this._validateHints(),this._syncDescribedByIds();}_validateHints(){this._hintChildren;}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&e.push(...this._control.userAriaDescribedBy.split(" ")),this._getSubscriptMessageType()==="hint"){let r=this._hintChildren?this._hintChildren.find(s=>s.align==="start"):null,a=this._hintChildren?this._hintChildren.find(s=>s.align==="end"):null;r?e.push(r.id):this._hintLabel&&e.push(this._hintLabelId),a&&e.push(a.id);}else this._errorChildren&&e.push(...this._errorChildren.map(r=>r.id));let t=this._control.describedByIds,n;if(t){let r=this._describedByIds||e;n=e.concat(t.filter(a=>a&&!r.includes(a)));}else n=e;this._control.setDescribedByIds(n),this._describedByIds=e;}}_getOutlinedLabelOffset(){if(!this._hasOutline()||!this._floatingLabel)return null;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return ["",null];if(!this._isAttachedToDom())return null;let e=this._iconPrefixContainer?.nativeElement,t=this._textPrefixContainer?.nativeElement,n=this._iconSuffixContainer?.nativeElement,r=this._textSuffixContainer?.nativeElement,a=e?.getBoundingClientRect().width??0,s=t?.getBoundingClientRect().width??0,C=n?.getBoundingClientRect().width??0,M=r?.getBoundingClientRect().width??0,dt=this._currentDirection==="rtl"?"-1":"1",st=`${a+s}px`,ct=`calc(${dt} * (${st} + var(--mat-mdc-form-field-label-offset-x, 0px)))`,ft=`var(--mat-mdc-form-field-label-transform, ${Ht} translateX(${ct}))`,mt=a+s+C+M;return [ft,mt]}_writeOutlinedLabelStyles(e){if(e!==null){let[t,n]=e;this._floatingLabel&&(this._floatingLabel.element.style.transform=t),n!==null&&this._notchedOutline?._setMaxWidth(n);}}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let t=e.getRootNode();return t&&t!==e}return document.documentElement.contains(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Aw({type:i,selectors:[["mat-form-field"]],contentQueries:function(t,n,r){if(t&1&&(Pg(r,n._labelChild,ae,5),kg(r,de,5)(r,et,5)(r,tt,5)(r,kt,5)(r,le,5)),t&2){CC();let a;IC(a=wC())&&(n._formFieldControl=a.first),IC(a=wC())&&(n._prefixChildren=a),IC(a=wC())&&(n._suffixChildren=a),IC(a=wC())&&(n._errorChildren=a),IC(a=wC())&&(n._hintChildren=a);}},viewQuery:function(t,n){if(t&1&&(Lg(n._iconPrefixContainerSignal,Ue,5)(n._textPrefixContainerSignal,We,5)(n._iconSuffixContainerSignal,Ge,5)(n._textSuffixContainerSignal,$e,5),Fg(pt,5)(Ue,5)(We,5)(Ge,5)($e,5)(Ze,5)(Ye,5)(Xe,5)),t&2){CC(4);let r;IC(r=wC())&&(n._textField=r.first),IC(r=wC())&&(n._iconPrefixContainer=r.first),IC(r=wC())&&(n._textPrefixContainer=r.first),IC(r=wC())&&(n._iconSuffixContainer=r.first),IC(r=wC())&&(n._textSuffixContainer=r.first),IC(r=wC())&&(n._floatingLabel=r.first),IC(r=wC())&&(n._notchedOutline=r.first),IC(r=wC())&&(n._lineRipple=r.first);}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:38,hostBindings:function(t,n){t&2&&Hg("mat-mdc-form-field-label-always-float",n._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",n._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",n._hasIconSuffix)("mat-form-field-invalid",n._control.errorState)("mat-form-field-disabled",n._control.disabled)("mat-form-field-autofilled",n._control.autofilled)("mat-form-field-appearance-fill",n.appearance=="fill")("mat-form-field-appearance-outline",n.appearance=="outline")("mat-form-field-hide-placeholder",n._hasFloatingLabel()&&!n._shouldLabelFloat())("mat-primary",n.color!=="accent"&&n.color!=="warn")("mat-accent",n.color==="accent")("mat-warn",n.color==="warn")("ng-untouched",n._shouldForward("untouched"))("ng-touched",n._shouldForward("touched"))("ng-pristine",n._shouldForward("pristine"))("ng-dirty",n._shouldForward("dirty"))("ng-valid",n._shouldForward("valid"))("ng-invalid",n._shouldForward("invalid"))("ng-pending",n._shouldForward("pending"));},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[nT([{provide:se,useExisting:i},{provide:it,useExisting:i}])],ngContentSelectors:bt,decls:18,vars:21,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],["textSuffixContainer",""],["iconSuffixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],["aria-atomic","true","aria-live","polite",1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(t,n){if(t&1&&(vC(_t),Dg(0,xt,1,1,"ng-template",null,0,fT),vs(2,"div",6,1),Ag("click",function(a){return n._control.onContainerClick(a)}),eC(4,yt,1,0,"div",7),vs(5,"div",8),eC(6,wt,2,2,"div",9),eC(7,Mt,3,0,"div",10),eC(8,Et,3,0,"div",11),vs(9,"div",12),eC(10,Tt,1,1,null,13),DC(11),fl(),eC(12,Rt,3,0,"div",14),eC(13,Dt,3,0,"div",15),fl(),eC(14,Nt,1,0,"div",16),fl(),vs(15,"div",17),eC(16,At,2,0,"div",18)(17,Lt,5,1,"div",19),fl()),t&2){let r;XE(2),Hg("mdc-text-field--filled",!n._hasOutline())("mdc-text-field--outlined",n._hasOutline())("mdc-text-field--no-label",!n._hasFloatingLabel())("mdc-text-field--disabled",n._control.disabled)("mdc-text-field--invalid",n._control.errorState),XE(2),tC(!n._hasOutline()&&!n._control.disabled?4:-1),XE(2),tC(n._hasOutline()?6:-1),XE(),tC(n._hasIconPrefix?7:-1),XE(),tC(n._hasTextPrefix?8:-1),XE(2),tC(!n._hasOutline()||n._forceDisplayInfixLabel()?10:-1),XE(2),tC(n._hasTextSuffix?12:-1),XE(),tC(n._hasIconSuffix?13:-1),XE(),tC(n._hasOutline()?-1:14),XE(),Hg("mat-mdc-form-field-subscript-dynamic-size",n.subscriptSizing==="dynamic");let a=n._getSubscriptMessageType();XE(),tC((r=a)==="error"?16:r==="hint"?17:-1);}},dependencies:[Ze,Ye,Sb,Xe,le],styles:[`.mdc-text-field {
2
2
  display: inline-flex;
3
3
  align-items: baseline;
4
4
  padding: 0 16px;