@whoz-oss/coday-client 3.3.0 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/browser/{chunk-Cix5vmvF.js → chunk-0Vh5lyZK.js} +1 -1
  2. package/browser/{chunk-qRp_60F5.js → chunk-309mcMST.js} +1 -1
  3. package/browser/{chunk-CLcLLGWk.js → chunk-3ZsX4ZgS.js} +1 -1
  4. package/browser/{chunk-8v01wE3r.js → chunk-4GO2M8hT.js} +1 -1
  5. package/browser/{chunk-tYI69pxY.js → chunk-8tkEJANN.js} +1 -1
  6. package/browser/{chunk-jg8IIJti.js → chunk-B-VPDMd-.js} +1 -1
  7. package/browser/{chunk-D29_gPoW.js → chunk-B1NBvx67.js} +1 -1
  8. package/browser/{chunk-Ddve8eXJ.js → chunk-B8eYgbiK.js} +1 -1
  9. package/browser/{chunk-Wl0Mu9Ba.js → chunk-BBAS2_RT.js} +1 -1
  10. package/browser/{chunk-BReEzJTt.js → chunk-BBIOnLKr.js} +1 -1
  11. package/browser/{chunk-yr_6-dSo.js → chunk-BCFfyeMI.js} +1 -1
  12. package/browser/{chunk-BTSq1yp8.js → chunk-BE5BA5B4.js} +1 -1
  13. package/browser/{chunk-D4g4I30m.js → chunk-BELvJ8hu.js} +1 -1
  14. package/browser/{chunk-BOoQVfiw.js → chunk-BY6hwFXp.js} +1 -1
  15. package/browser/{chunk-zjf6Y2-q.js → chunk-Bbmmdt_f.js} +1 -1
  16. package/browser/{chunk-DS855pzA.js → chunk-BkJ_QNI6.js} +1 -1
  17. package/browser/{chunk-BUtf9yKK.js → chunk-BnW3N14A.js} +1 -1
  18. package/browser/{chunk-Dg1d1XBn.js → chunk-BoNA4fJz.js} +1 -1
  19. package/browser/{chunk-FIgfn9bI.js → chunk-BoVLpL7Z.js} +1 -1
  20. package/browser/{chunk-BhDrA9iN.js → chunk-BxI7jpz_.js} +1 -1
  21. package/browser/chunk-C3bVyvCC.js +2 -0
  22. package/browser/{chunk-xH-xVbwT.js → chunk-CA1fZ5_Q.js} +1 -1
  23. package/browser/{chunk-ciSHZI2F.js → chunk-CAZxbE68.js} +1 -1
  24. package/browser/{chunk-8Z_HvjaL.js → chunk-CBq1zNMs.js} +1 -1
  25. package/browser/{chunk-2_BBR3ej.js → chunk-CDyGWj0V.js} +1 -1
  26. package/browser/{chunk-DJBbIbii.js → chunk-CIsTlMrZ.js} +1 -1
  27. package/browser/{chunk-DvXqS7Sb.js → chunk-CUJZQ4UR.js} +1 -1
  28. package/browser/{chunk-FQTKLHXY.js → chunk-C_hp_VDq.js} +1 -1
  29. package/browser/{chunk-Bu8NHsWv.js → chunk-C_qUg4bH.js} +1 -1
  30. package/browser/{chunk-B22dvHxJ.js → chunk-Ck8v7bTv.js} +1 -1
  31. package/browser/{chunk-CcXOwTvX.js → chunk-Cn0FSvue.js} +1 -1
  32. package/browser/{chunk-BPp7UKCF.js → chunk-CsQMEH2N.js} +1 -1
  33. package/browser/{chunk-BHJPoh3M.js → chunk-Csv2uMFT.js} +1 -1
  34. package/browser/{chunk-BbMMjtpL.js → chunk-CzzKvJ6f.js} +1 -1
  35. package/browser/{chunk-By8x10iE.js → chunk-D41-hZBF.js} +1 -1
  36. package/browser/{chunk-wTW1YRSg.js → chunk-D4WR8qG4.js} +1 -1
  37. package/browser/{chunk-B7c_faZK.js → chunk-D4ehIKRn.js} +1 -1
  38. package/browser/{chunk-MT0Figq0.js → chunk-DJSlGrxA.js} +1 -1
  39. package/browser/{chunk-GHmZXChc.js → chunk-DL0Qzq5H.js} +1 -1
  40. package/browser/{chunk-BcqjfPzD.js → chunk-DNNmz0J7.js} +1 -1
  41. package/browser/{chunk-BB4zCw7X.js → chunk-DPzNeSq_.js} +1 -1
  42. package/browser/{chunk-CinHjHqk.js → chunk-DUXGBaAU.js} +3 -3
  43. package/browser/{chunk-rHrSoLcV.js → chunk-DXYxKL4O.js} +1 -1
  44. package/browser/{chunk-Cm0tD0om.js → chunk-DXbXll23.js} +1 -1
  45. package/browser/{chunk-8OK_6DuK.js → chunk-DayWt1hO.js} +1 -1
  46. package/browser/chunk-DbVl9TZ7.js +1 -0
  47. package/browser/{chunk-Bgz0YSqs.js → chunk-Dk5jUdzK.js} +1 -1
  48. package/browser/{chunk-BR6R4gpW.js → chunk-Dkk0aLyn.js} +1 -1
  49. package/browser/{chunk-Dr2eg2L_.js → chunk-DnT5oOBU.js} +1 -1
  50. package/browser/{chunk-BYZZOwP6.js → chunk-Dnwbvx9O.js} +1 -1
  51. package/browser/{chunk-K-jE-YGO.js → chunk-GBZQG1M4.js} +1 -1
  52. package/browser/{chunk-D2hh5Ex3.js → chunk-JIL5IyE3.js} +1 -1
  53. package/browser/{chunk-Cw18oPF0.js → chunk-Kp2ec6yl.js} +1 -1
  54. package/browser/{chunk-DwrSqNJu.js → chunk-OSIa_n8q.js} +1 -1
  55. package/browser/{chunk-CsChsLgw.js → chunk-R0Oerx4i.js} +1 -1
  56. package/browser/{chunk-BCn5ZD_c.js → chunk-R0q_3wcj.js} +1 -1
  57. package/browser/{chunk-C8P9SuaA.js → chunk-WEG2brZJ.js} +1 -1
  58. package/browser/{chunk-C39RA_bw.js → chunk-Y9h1W4BJ.js} +1 -1
  59. package/browser/{chunk-D3Kj4T8Y.js → chunk-Z5t25nYs.js} +1 -1
  60. package/browser/{chunk-BU-kFi7p.js → chunk-bvOEo9pV.js} +1 -1
  61. package/browser/{chunk-dOYABY0k.js → chunk-jgoIoM7q.js} +1 -1
  62. package/browser/{chunk-Ck-XMTcy.js → chunk-kRQc7zeI.js} +1 -1
  63. package/browser/{chunk-CXHlTmz0.js → chunk-wYGCCU_V.js} +1 -1
  64. package/browser/{chunk-Dm2zo81i.js → chunk-wYePVzy5.js} +1 -1
  65. package/browser/{chunk-DB8HcHes.js → chunk-z0RY6Set.js} +1 -1
  66. package/browser/{chunk-Bofelq_e.js → chunk-zwGXUhQZ.js} +1 -1
  67. package/browser/index.html +1 -1
  68. package/browser/{main-MB7Y2AR2.js → main-YBERLDOH.js} +1 -1
  69. package/package.json +1 -1
  70. package/browser/chunk--fxx5Oa-.js +0 -1
  71. package/browser/chunk-JSqlYB97.js +0 -1
@@ -1 +1 @@
1
- import {I}from'./chunk-BUtf9yKK.js';import {g,G,w as we,dd as B,dc as $,aI as Tr,H as Hi,bR as ma,aD as Ly,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-MB7Y2AR2.js';import {W as Wn,S as Se}from'./chunk-Dg1d1XBn.js';import'./chunk-C8P9SuaA.js';import'./chunk-jg8IIJti.js';var V=()=>[];function F(n,t){if(n&1){let o=dC();vs(0,"agentos-ai-model-item",4),Ag("editRequested",function(e){If(o);let s=mC(2);return wf(s.onEdit(e))})("deleteRequested",function(e){If(o);let s=mC(2);return wf(s.deleteModel(e))}),fl();}n&2&&Tg("model",t);}function O(n,t){if(n&1&&eC(0,F,1,1,"agentos-ai-model-item",3),n&2){let o,i=t.$implicit,e=mC();tC((o=e.resolveModel(i.id))?0:-1,o);}}var S=class n{router=g(G);destroyRef=g(we);aiModelController=g(B);aiProviderController=g($);refresh$=new Tr(void 0);isLoading=Hi(true);data$=this.refresh$.pipe(ma(()=>(this.isLoading.set(true),Ly([this.aiModelController.listPlatformLevelAiModel(),this.aiProviderController.listAiProvider("none")]))));modelItems$=this.data$.pipe(ue(([t,o])=>{let i=new Map(o.map(e=>[e.id??"",e.name]));return t.map(e=>({id:e.id??"",name:e.alias??e.apiModelName,description:e.apiModelName,groupKey:e.aiProviderId,groupLabel:i.get(e.aiProviderId)??e.aiProviderId}))}));modelsById=new Map;constructor(){this.data$.pipe(U(this.destroyRef)).subscribe({next:([t])=>{this.modelsById=new Map(t.map(o=>[o.id??"",o])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","ai-models","new"]);}deleteModel(t){this.aiModelController.deleteAiModel(t.id??"").pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}onEdit(t){t.id&&this.router.navigate(["/agentos","admin","ai-models",t.id,"edit"]);}resolveModel(t){return this.modelsById.get(t)??null}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=Aw({type:n,selectors:[["agentos-platform-ai-models"]],decls:5,vars:7,consts:[["aiModelItemTpl",""],["title","Platform AI Models","emptyMessage","No platform AI models defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"model"],[3,"editRequested","deleteRequested","model"]],template:function(o,i){if(o&1&&(vs(0,"ds-entity-list",1),aT(1,"async"),Ag("createRequested",function(){return i.openCreateForm()}),vs(2,"ds-icon-button",2),Ag("action",function(){return i.goBack()}),fl()(),Dg(3,O,1,1,"ng-template",null,0,fT)),o&2){let e=TC(4);Tg("items",uT(1,4,i.modelItems$)??rT(6,V))("loading",i.isLoading())("showCreate",true)("itemTemplate",e);}},dependencies:[Wn,I,Se,Nb],styles:[".platform-ai-models__back[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font-family:inherit;font-size:.875rem;color:var(--color-text-secondary, #6e6e73);padding:.25rem .5rem;border-radius:4px;transition:color .15s ease}.platform-ai-models__back[_ngcontent-%COMP%]:hover{color:var(--color-primary, #007aff)}"]})};export{S as PlatformAiModelsComponent};
1
+ import {I}from'./chunk-BnW3N14A.js';import {g,G,w as we,dd as B,dc as $,aI as Tr,H as Hi,bR as ma,aD as Ly,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-YBERLDOH.js';import {W as Wn,S as Se}from'./chunk-BoNA4fJz.js';import'./chunk-WEG2brZJ.js';import'./chunk-B-VPDMd-.js';var V=()=>[];function F(n,t){if(n&1){let o=dC();vs(0,"agentos-ai-model-item",4),Ag("editRequested",function(e){If(o);let s=mC(2);return wf(s.onEdit(e))})("deleteRequested",function(e){If(o);let s=mC(2);return wf(s.deleteModel(e))}),fl();}n&2&&Tg("model",t);}function O(n,t){if(n&1&&eC(0,F,1,1,"agentos-ai-model-item",3),n&2){let o,i=t.$implicit,e=mC();tC((o=e.resolveModel(i.id))?0:-1,o);}}var S=class n{router=g(G);destroyRef=g(we);aiModelController=g(B);aiProviderController=g($);refresh$=new Tr(void 0);isLoading=Hi(true);data$=this.refresh$.pipe(ma(()=>(this.isLoading.set(true),Ly([this.aiModelController.listPlatformLevelAiModel(),this.aiProviderController.listAiProvider("none")]))));modelItems$=this.data$.pipe(ue(([t,o])=>{let i=new Map(o.map(e=>[e.id??"",e.name]));return t.map(e=>({id:e.id??"",name:e.alias??e.apiModelName,description:e.apiModelName,groupKey:e.aiProviderId,groupLabel:i.get(e.aiProviderId)??e.aiProviderId}))}));modelsById=new Map;constructor(){this.data$.pipe(U(this.destroyRef)).subscribe({next:([t])=>{this.modelsById=new Map(t.map(o=>[o.id??"",o])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","ai-models","new"]);}deleteModel(t){this.aiModelController.deleteAiModel(t.id??"").pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}onEdit(t){t.id&&this.router.navigate(["/agentos","admin","ai-models",t.id,"edit"]);}resolveModel(t){return this.modelsById.get(t)??null}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=Aw({type:n,selectors:[["agentos-platform-ai-models"]],decls:5,vars:7,consts:[["aiModelItemTpl",""],["title","Platform AI Models","emptyMessage","No platform AI models defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"model"],[3,"editRequested","deleteRequested","model"]],template:function(o,i){if(o&1&&(vs(0,"ds-entity-list",1),aT(1,"async"),Ag("createRequested",function(){return i.openCreateForm()}),vs(2,"ds-icon-button",2),Ag("action",function(){return i.goBack()}),fl()(),Dg(3,O,1,1,"ng-template",null,0,fT)),o&2){let e=TC(4);Tg("items",uT(1,4,i.modelItems$)??rT(6,V))("loading",i.isLoading())("showCreate",true)("itemTemplate",e);}},dependencies:[Wn,I,Se,Nb],styles:[".platform-ai-models__back[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font-family:inherit;font-size:.875rem;color:var(--color-text-secondary, #6e6e73);padding:.25rem .5rem;border-radius:4px;transition:color .15s ease}.platform-ai-models__back[_ngcontent-%COMP%]:hover{color:var(--color-primary, #007aff)}"]})};export{S as PlatformAiModelsComponent};
@@ -1 +1 @@
1
- import {K as Kn,S as Se}from'./chunk-Dg1d1XBn.js';import {ca as mB,cb as gB,H as Hi,m as mT,A as Aw,v as vs,W as WC,k as fl,n as eC,X as XE,a8 as Zg,C as Cg,a5 as yl,t as tC,a9 as dC,l as Ag,ac as mC,aa as If,ab as wf}from'./main-MB7Y2AR2.js';function M(o,m){if(o&1){let e=dC();vs(0,"span",7),WC(1,"Delete?"),fl(),vs(2,"ds-icon-button",8),Ag("action",function(){If(e);let a=mC();return wf(a.onDeleteConfirmed())}),fl(),vs(3,"ds-icon-button",9),Ag("action",function(){If(e);let a=mC();return wf(a.onDeleteCancelled())}),fl();}}function S(o,m){if(o&1){let e=dC();vs(0,"ds-icon-button",11),Ag("action",function(){If(e);let a=mC(2);return wf(a.onEdit())}),fl(),vs(1,"ds-icon-button",12),Ag("action",function(){If(e);let a=mC(2);return wf(a.onDeleteArmed())}),fl();}}function P(o,m){if(o&1){let e=dC();vs(0,"ds-icon-button",10),Ag("action",function(){If(e);let a=mC();return wf(a.onDuplicate())}),fl(),eC(1,S,2,0);}if(o&2){let e=mC();XE(),tC(e.readOnly()?-1:1);}}var E=Object.freeze({platform:{label:"PLATFORM",ariaLabel:"Configuration partag\xE9e plateforme",variant:"neutral"},namespace:{label:"NS",ariaLabel:"Configuration partag\xE9e du namespace",variant:"neutral"},userOnNs:{label:"USER \xD7 NS",ariaLabel:"Configuration utilisateur sur ce namespace",variant:"info"},userGlobal:{label:"USER GLOBAL",ariaLabel:"Configuration utilisateur globale",variant:"warning"}}),O=class o{config=mB.required();scope=mB.required();readOnly=mB(false);editRequested=gB();deleteRequested=gB();duplicateRequested=gB();pendingDelete=Hi(false);badge=mT(()=>E[this.scope()]);onEdit(){this.editRequested.emit(this.config());}onDuplicate(){this.duplicateRequested.emit(this.config());}onDeleteArmed(){this.pendingDelete.set(true);}onDeleteConfirmed(){this.pendingDelete.set(false),this.deleteRequested.emit(this.config());}onDeleteCancelled(){this.pendingDelete.set(false);}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Aw({type:o,selectors:[["agentos-integration-config-item"]],inputs:{config:[1,"config"],scope:[1,"scope"],readOnly:[1,"readOnly"]},outputs:{editRequested:"editRequested",deleteRequested:"deleteRequested",duplicateRequested:"duplicateRequested"},decls:12,vars:6,consts:[["role","listitem","dsBlueprint","",1,"integration-config-item"],[1,"integration-config-item__body"],[1,"integration-config-item__heading"],[1,"integration-config-item__name"],[1,"integration-config-item__badge"],[1,"integration-config-item__type"],[1,"integration-config-item__actions"],[1,"integration-config-item__confirm-label"],["icon","check","variant","danger","title","Confirm deletion",3,"action"],["icon","close","title","Cancel deletion",3,"action"],["icon","content_copy","title","Duplicate this configuration",3,"action"],["icon","edit","title","Edit integration",3,"action"],["icon","delete","variant","danger","title","Delete integration",3,"action"]],template:function(e,t){e&1&&(vs(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),WC(4),fl(),vs(5,"span",4),WC(6),fl()(),vs(7,"span",5),WC(8),fl()(),vs(9,"div",6),eC(10,M,4,0)(11,P,2,1),fl()()),e&2&&(XE(4),Zg(t.config().name),XE(),Cg("data-variant",t.badge().variant)("aria-label",t.badge().ariaLabel),XE(),yl(" ",t.badge().label," "),XE(2),Zg(t.config().integrationType),XE(2),tC(t.pendingDelete()?10:11));},dependencies:[Kn,Se],styles:[".integration-config-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:14px 16px;position:relative;border-radius:0;border:1px solid var(--color-divider);background:var(--color-bg);box-shadow:var(--shadow-sm);overflow:visible;transition:border-color .15s ease}.integration-config-item[_ngcontent-%COMP%]:hover{border-color:var(--color-accent)}.integration-config-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.integration-config-item__heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.integration-config-item__name[_ngcontent-%COMP%]{font-size:15px;font-weight:600;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.integration-config-item__badge[_ngcontent-%COMP%]{flex-shrink:0;font-family:var(--font-heading);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;border-radius:0;padding:.15rem .5rem;white-space:nowrap}.integration-config-item__badge[data-variant=neutral][_ngcontent-%COMP%]{border:1px solid var(--color-divider);color:var(--color-neutral-600);background:transparent}.integration-config-item__badge[data-variant=info][_ngcontent-%COMP%]{border:1px solid color-mix(in srgb,var(--color-info) 40%,transparent);color:var(--color-info);background:color-mix(in srgb,var(--color-info) 10%,transparent)}.integration-config-item__badge[data-variant=warning][_ngcontent-%COMP%]{border:1px solid color-mix(in srgb,var(--color-warning) 40%,transparent);color:var(--color-warning);background:color-mix(in srgb,var(--color-warning) 10%,transparent)}.integration-config-item__type[_ngcontent-%COMP%]{font-size:13px;color:var(--color-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.integration-config-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.integration-config-item[_ngcontent-%COMP%]:hover .integration-config-item__actions[_ngcontent-%COMP%], .integration-config-item[_ngcontent-%COMP%]:focus-within .integration-config-item__actions[_ngcontent-%COMP%]{opacity:1}.integration-config-item__confirm-label[_ngcontent-%COMP%]{font-family:var(--font-heading);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--red-deep);margin-right:.25rem;white-space:nowrap}"]})};export{O};
1
+ import {K as Kn,S as Se}from'./chunk-BoNA4fJz.js';import {ca as mB,cb as gB,H as Hi,m as mT,A as Aw,v as vs,W as WC,k as fl,n as eC,X as XE,a8 as Zg,C as Cg,a5 as yl,t as tC,a9 as dC,l as Ag,ac as mC,aa as If,ab as wf}from'./main-YBERLDOH.js';function M(o,m){if(o&1){let e=dC();vs(0,"span",7),WC(1,"Delete?"),fl(),vs(2,"ds-icon-button",8),Ag("action",function(){If(e);let a=mC();return wf(a.onDeleteConfirmed())}),fl(),vs(3,"ds-icon-button",9),Ag("action",function(){If(e);let a=mC();return wf(a.onDeleteCancelled())}),fl();}}function S(o,m){if(o&1){let e=dC();vs(0,"ds-icon-button",11),Ag("action",function(){If(e);let a=mC(2);return wf(a.onEdit())}),fl(),vs(1,"ds-icon-button",12),Ag("action",function(){If(e);let a=mC(2);return wf(a.onDeleteArmed())}),fl();}}function P(o,m){if(o&1){let e=dC();vs(0,"ds-icon-button",10),Ag("action",function(){If(e);let a=mC();return wf(a.onDuplicate())}),fl(),eC(1,S,2,0);}if(o&2){let e=mC();XE(),tC(e.readOnly()?-1:1);}}var E=Object.freeze({platform:{label:"PLATFORM",ariaLabel:"Configuration partag\xE9e plateforme",variant:"neutral"},namespace:{label:"NS",ariaLabel:"Configuration partag\xE9e du namespace",variant:"neutral"},userOnNs:{label:"USER \xD7 NS",ariaLabel:"Configuration utilisateur sur ce namespace",variant:"info"},userGlobal:{label:"USER GLOBAL",ariaLabel:"Configuration utilisateur globale",variant:"warning"}}),O=class o{config=mB.required();scope=mB.required();readOnly=mB(false);editRequested=gB();deleteRequested=gB();duplicateRequested=gB();pendingDelete=Hi(false);badge=mT(()=>E[this.scope()]);onEdit(){this.editRequested.emit(this.config());}onDuplicate(){this.duplicateRequested.emit(this.config());}onDeleteArmed(){this.pendingDelete.set(true);}onDeleteConfirmed(){this.pendingDelete.set(false),this.deleteRequested.emit(this.config());}onDeleteCancelled(){this.pendingDelete.set(false);}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Aw({type:o,selectors:[["agentos-integration-config-item"]],inputs:{config:[1,"config"],scope:[1,"scope"],readOnly:[1,"readOnly"]},outputs:{editRequested:"editRequested",deleteRequested:"deleteRequested",duplicateRequested:"duplicateRequested"},decls:12,vars:6,consts:[["role","listitem","dsBlueprint","",1,"integration-config-item"],[1,"integration-config-item__body"],[1,"integration-config-item__heading"],[1,"integration-config-item__name"],[1,"integration-config-item__badge"],[1,"integration-config-item__type"],[1,"integration-config-item__actions"],[1,"integration-config-item__confirm-label"],["icon","check","variant","danger","title","Confirm deletion",3,"action"],["icon","close","title","Cancel deletion",3,"action"],["icon","content_copy","title","Duplicate this configuration",3,"action"],["icon","edit","title","Edit integration",3,"action"],["icon","delete","variant","danger","title","Delete integration",3,"action"]],template:function(e,t){e&1&&(vs(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),WC(4),fl(),vs(5,"span",4),WC(6),fl()(),vs(7,"span",5),WC(8),fl()(),vs(9,"div",6),eC(10,M,4,0)(11,P,2,1),fl()()),e&2&&(XE(4),Zg(t.config().name),XE(),Cg("data-variant",t.badge().variant)("aria-label",t.badge().ariaLabel),XE(),yl(" ",t.badge().label," "),XE(2),Zg(t.config().integrationType),XE(2),tC(t.pendingDelete()?10:11));},dependencies:[Kn,Se],styles:[".integration-config-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:14px 16px;position:relative;border-radius:0;border:1px solid var(--color-divider);background:var(--color-bg);box-shadow:var(--shadow-sm);overflow:visible;transition:border-color .15s ease}.integration-config-item[_ngcontent-%COMP%]:hover{border-color:var(--color-accent)}.integration-config-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.integration-config-item__heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.integration-config-item__name[_ngcontent-%COMP%]{font-size:15px;font-weight:600;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.integration-config-item__badge[_ngcontent-%COMP%]{flex-shrink:0;font-family:var(--font-heading);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;border-radius:0;padding:.15rem .5rem;white-space:nowrap}.integration-config-item__badge[data-variant=neutral][_ngcontent-%COMP%]{border:1px solid var(--color-divider);color:var(--color-neutral-600);background:transparent}.integration-config-item__badge[data-variant=info][_ngcontent-%COMP%]{border:1px solid color-mix(in srgb,var(--color-info) 40%,transparent);color:var(--color-info);background:color-mix(in srgb,var(--color-info) 10%,transparent)}.integration-config-item__badge[data-variant=warning][_ngcontent-%COMP%]{border:1px solid color-mix(in srgb,var(--color-warning) 40%,transparent);color:var(--color-warning);background:color-mix(in srgb,var(--color-warning) 10%,transparent)}.integration-config-item__type[_ngcontent-%COMP%]{font-size:13px;color:var(--color-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.integration-config-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.integration-config-item[_ngcontent-%COMP%]:hover .integration-config-item__actions[_ngcontent-%COMP%], .integration-config-item[_ngcontent-%COMP%]:focus-within .integration-config-item__actions[_ngcontent-%COMP%]{opacity:1}.integration-config-item__confirm-label[_ngcontent-%COMP%]{font-family:var(--font-heading);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--red-deep);margin-right:.25rem;white-space:nowrap}"]})};export{O};
@@ -1,2 +1,2 @@
1
- import {v}from'./chunk-DvXqS7Sb.js';import {R,q,J}from'./chunk-By8x10iE.js';import {g,ao as V,G,w as we,H as Hi,F,m as mT,cc as Hf,b as U,z as z$1,a as P$1,A as Aw,v as vs,l as Ag,W as WC,k as fl,n as eC,X as XE,a8 as Zg,t as tC,a9 as dC,q as oC,a4 as rC,a3 as HI,o as bg,ac as mC,r as Tg,a6 as $I,x as iC,a5 as yl,cG as Xw,aa as If,ab as wf,b_ as FC,C as Cg}from'./main-MB7Y2AR2.js';import'./chunk-CinHjHqk.js';import {k as _t,b as _e$1,o as z,n as ni,J as Jn,Q as Qn,e as ei,Y as Ye,A as At,m as mn,Z as Zn,l as Xn,C as Cn,E as En}from'./chunk-jg8IIJti.js';import'./chunk-JSqlYB97.js';import'./chunk-ciSHZI2F.js';import'./chunk-Dg1d1XBn.js';import'./chunk-C8P9SuaA.js';function se(i,t){i&1&&(vs(0,"p",5),WC(1,"Loading\u2026"),fl());}function ce(i,t){if(i&1&&(vs(0,"label",23),bg(1,"input",24),HI(),vs(2,"span"),WC(3),fl()()),i&2){let e=t.$implicit,o=mC(3);XE(),Tg("formControl",o.scopeControl)("value",e.value)("disabled",e.value==="namespace"&&!o.isAdmin()),$I(),XE(2),Zg(e.label);}}function de(i,t){if(i&1&&(vs(0,"fieldset",8)(1,"legend",22),WC(2,"Configuration scope"),fl(),oC(3,ce,4,4,"label",23,Xw().trackByScope,true),fl()),i&2){let e=mC(2);Tg("disabled",e.isEditMode()),XE(3),iC(e.scopeOptions);}}function ue(i,t){if(i&1&&(vs(0,"option",13),WC(1),fl()),i&2){let e=t.$implicit,o=mC(2);Tg("value",e),XE(),Zg(o.authTypeLabel[e]);}}function pe(i,t){i&1&&WC(0," Leave a field unchanged to keep the stored credential. ");}function he(i,t){i&1&&(vs(0,"span",11),WC(1,"*"),fl());}function me(i,t){if(i&1&&(vs(0,"p",28),WC(1),fl()),i&2){let e=mC(2).$implicit;Tg("id","as-hint-"+e.key),XE(),Zg(e.hint);}}function ge(i,t){if(i&1&&(bg(0,"input",27),HI(),eC(1,me,2,2,"p",28)),i&2){let e=mC().$implicit;FC("auth-setting-form__input"+(e.secret?" auth-setting-form__input--secret":"")),Tg("id","as-cred-"+e.key)("type",e.secret?"password":"text")("placeholder",e.placeholder)("formControl",t)("autocomplete",e.secret?"new-password":"off"),Cg("aria-describedby",e.hint?"as-hint-"+e.key:null),$I(),XE(),tC(e.hint?1:-1);}}function Ce(i,t){if(i&1&&(vs(0,"div",9)(1,"label",26),WC(2),eC(3,he,2,0,"span",11),fl(),eC(4,ge,2,9),fl()),i&2){let e,o=t.$implicit,l=mC(3);XE(),Tg("for","as-cred-"+o.key),XE(),yl(" ",o.label," "),XE(),tC(o.required?3:-1),XE(),tC((e=l.controlForField(o.key))?4:-1,e);}}function fe(i,t){if(i&1&&(vs(0,"fieldset",18)(1,"legend",22),WC(2,"Credentials"),fl(),vs(3,"p",25),WC(4," Values are stored encrypted and masked on read. "),eC(5,pe,1,0),fl(),oC(6,Ce,5,4,"div",9,Xw().trackByField,true),fl()),i&2){let e=mC(2);XE(5),tC(e.isEditMode()?5:-1),XE(),iC(e.credentialFields());}}function ye(i,t){if(i&1){let e=dC();vs(0,"form",7),Ag("ngSubmit",function(){If(e);let l=mC();return wf(l.submit())}),eC(1,de,5,1,"fieldset",8),vs(2,"div",9)(3,"label",10),WC(4,"Auth type "),vs(5,"span",11),WC(6,"*"),fl()(),vs(7,"select",12),oC(8,ue,2,2,"option",13,rC),fl(),HI(),fl(),vs(10,"div",9)(11,"label",14),WC(12,"Name "),vs(13,"span",11),WC(14,"*"),fl()(),bg(15,"input",15),HI(),fl(),vs(16,"div",9)(17,"label",16),WC(18,"Description"),fl(),bg(19,"input",17),HI(),fl(),eC(20,fe,8,1,"fieldset",18),vs(21,"div",19)(22,"button",20),WC(23),fl(),vs(24,"button",21),Ag("click",function(){If(e);let l=mC();return wf(l.cancel())}),WC(25,"Cancel"),fl()()();}if(i&2){let e=mC();Tg("formGroup",e.form),XE(),tC(e.isPlatformMode?-1:1),XE(6),Tg("formControl",e.authTypeControl),$I(),XE(),iC(e.authTypeOptions),XE(7),Tg("formControl",e.nameControl),$I(),XE(4),Tg("formControl",e.descriptionControl),$I(),XE(),tC(e.credentialFields().length>0?20:-1),XE(2),Tg("disabled",e.form.invalid||e.isSubmitting()),XE(),yl(" ",e.isEditMode()?"Save changes":"Create"," ");}}var _e=new Set(["namespace","userOnNs","userGlobal"]),P=Object.freeze({platform:"Platform (read-only)",namespace:"Namespace configuration",userOnNs:"Personal \u2014 this namespace only",userGlobal:"Personal \u2014 all namespaces"}),Se={ApiKeyAuthSetting:[{key:"apiKey",label:"API Key",placeholder:"sk-\u2026",secret:true,required:false}],BasicAuthAuthSetting:[{key:"username",label:"Username",placeholder:"user@example.com",secret:false,required:false},{key:"password",label:"Password",placeholder:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",secret:true,required:false}],BearerTokenAuthSetting:[{key:"token",label:"Bearer token",placeholder:"eyJ\u2026",secret:true,required:false}],OAuthDiscoverableAuthSetting:[{key:"discoveryUrl",label:"Discovery URL",placeholder:"https://\u2026/.well-known/openid-configuration",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthCustomAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthRegisteredAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthMcpDiscoverableAuthSetting:[{key:"resourceUrl",label:"Resource URL",placeholder:"https://mcp.example.com",hint:"Use the base URL exactly as documented by your provider \u2014 do not append a path suffix. Examples: https://mcp.hubspot.com (HubSpot), https://mcp.atlassian.com/v1/mcp (Atlassian).",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",hint:"Leave empty to let the server register an OAuth client automatically (RFC 7591 dynamic registration). Fill in only if you have a pre-registered client ID from your provider.",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Leave empty in most cases \u2014 the MCP server declares the required scopes itself. Fill in only if your provider explicitly requires client-declared scopes.",secret:false,required:false}]},le=class i{route=g(V);router=g(G);destroyRef=g(we);state=g(R);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=this.namespaceId===void 0;isAdmin=this.isPlatformMode?Hi(true):F(this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:false});authTypeOptions=q;authTypeLabel=J;scopeOptions=[{value:"namespace",label:P.namespace},{value:"userOnNs",label:P.userOnNs},{value:"userGlobal",label:P.userGlobal}];nameControl=new _t("",{nonNullable:true,validators:[_e$1.required,_e$1.minLength(1)]});descriptionControl=new _t(null);authTypeControl=new _t("ApiKeyAuthSetting",{nonNullable:true,validators:[_e$1.required]});scopeControl=new _t("namespace",{nonNullable:true});form=new z({name:this.nameControl,description:this.descriptionControl,authType:this.authTypeControl,scope:this.scopeControl});apiKeyControl=new _t("",{nonNullable:true});usernameControl=new _t("",{nonNullable:true});passwordControl=new _t("",{nonNullable:true});tokenControl=new _t("",{nonNullable:true});discoveryUrlControl=new _t("",{nonNullable:true});authorizationUrlControl=new _t("",{nonNullable:true});tokenUrlControl=new _t("",{nonNullable:true});clientIdControl=new _t("",{nonNullable:true});clientSecretControl=new _t("",{nonNullable:true});scopesControl=new _t("",{nonNullable:true});resourceUrlControl=new _t("",{nonNullable:true});selectedAuthType=F(this.authTypeControl.valueChanges,{initialValue:this.authTypeControl.value});credentialFields=mT(()=>Se[this.selectedAuthType()]);isEditMode=Hi(false);isSubmitting=Hi(false);isLoading=Hi(false);existingConfig=null;initialCredentials={};constructor(){this.isPlatformMode||Hf(()=>{this.isAdmin()||this.isEditMode()||this.scopeControl.value==="namespace"&&this.scopeControl.setValue("userOnNs");});}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let t=this.route.snapshot.paramMap,e=this.route.snapshot.queryParamMap,o=t.get("authSettingId");if(o){this.isEditMode.set(true),this.scopeControl.disable(),this.authTypeControl.disable(),this.loadConfig(o);return}if(this.isPlatformMode){this.scopeControl.setValue("platform"),this.scopeControl.disable();return}let l=this.parseScope(e.get("scope"));this.scopeControl.setValue(l);let v=e.get("template");v&&this.hydrateFromTemplate(v);}parseScope(t){return t&&_e.has(t)?t:"namespace"}deriveScopeFromConfig(t){return !t.userId&&!t.namespaceId?"platform":t.userId?t.namespaceId?"userOnNs":"userGlobal":"namespace"}loadConfig(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.existingConfig=e,this.scopeControl.setValue(this.deriveScopeFromConfig(e)),this.applyConfigToForm(e),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),console.warn(`[AuthSettingForm] Could not load auth setting '${t}' \u2014 navigating back`),this.navigateBack();}});}hydrateFromTemplate(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.authTypeControl.setValue(e.authType),this.clearCredentialControls(),this.initialCredentials={},this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});},error:e=>{console.warn(`[AuthSettingForm] Could not hydrate from template ${t}:`,e),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});}});}applyConfigToForm(t){switch(this.nameControl.setValue(t.name),this.descriptionControl.setValue(t.description??null),this.authTypeControl.setValue(t.authType),this.clearCredentialControls(),this.initialCredentials={},t.authType){case "ApiKeyAuthSetting":{let e=t.apiKey??"";this.apiKeyControl.setValue(e),this.initialCredentials.apiKey=e;break}case "BasicAuthAuthSetting":{let e=t,o=e.username??"",l=e.password??"";this.usernameControl.setValue(o),this.passwordControl.setValue(l),this.initialCredentials.username=o,this.initialCredentials.password=l;break}case "BearerTokenAuthSetting":{let e=t.token??"";this.tokenControl.setValue(e),this.initialCredentials.token=e;break}case "OAuthDiscoverableAuthSetting":{let e=t;this.discoveryUrlControl.setValue(e.discoveryUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.discoveryUrl=e.discoveryUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthCustomAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthRegisteredAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthMcpDiscoverableAuthSetting":{let e=t;this.resourceUrlControl.setValue(e.resourceUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.resourceUrl=e.resourceUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}}}clearCredentialControls(){this.apiKeyControl.setValue(""),this.usernameControl.setValue(""),this.passwordControl.setValue(""),this.tokenControl.setValue(""),this.discoveryUrlControl.setValue(""),this.authorizationUrlControl.setValue(""),this.tokenUrlControl.setValue(""),this.clientIdControl.setValue(""),this.clientSecretControl.setValue(""),this.scopesControl.setValue(""),this.resourceUrlControl.setValue("");}credentialValue(t,e){if(!(this.isEditMode()&&e===this.initialCredentials[t]))return e||void 0}submit(){if(this.form.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(true);let t=this.nameControl.value.trim(),e=this.descriptionControl.value?.trim()||void 0,o=this.authTypeControl.value,l=this.form.getRawValue().scope,v=this.isPlatformMode?null:this.namespaceId??null,w=this.buildTypedPayload(o,t,e);(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,w,this.existingConfig):this.state.create(w,l,v)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}buildTypedPayload(t,e,o){let l={name:e,description:o};switch(t){case "ApiKeyAuthSetting":return z$1(P$1({},l),{authType:"ApiKeyAuthSetting",apiKey:this.credentialValue("apiKey",this.apiKeyControl.value)});case "BasicAuthAuthSetting":return z$1(P$1({},l),{authType:"BasicAuthAuthSetting",username:this.credentialValue("username",this.usernameControl.value),password:this.credentialValue("password",this.passwordControl.value)});case "BearerTokenAuthSetting":return z$1(P$1({},l),{authType:"BearerTokenAuthSetting",token:this.credentialValue("token",this.tokenControl.value)});case "OAuthDiscoverableAuthSetting":return z$1(P$1({},l),{authType:"OAuthDiscoverableAuthSetting",discoveryUrl:this.credentialValue("discoveryUrl",this.discoveryUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthCustomAuthSetting":return z$1(P$1({},l),{authType:"OAuthCustomAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthRegisteredAuthSetting":return z$1(P$1({},l),{authType:"OAuthRegisteredAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthMcpDiscoverableAuthSetting":return z$1(P$1({},l),{authType:"OAuthMcpDiscoverableAuthSetting",resourceUrl:this.credentialValue("resourceUrl",this.resourceUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)})}}controlForField(t){return {apiKey:this.apiKeyControl,username:this.usernameControl,password:this.passwordControl,token:this.tokenControl,discoveryUrl:this.discoveryUrlControl,authorizationUrl:this.authorizationUrlControl,tokenUrl:this.tokenUrlControl,clientId:this.clientIdControl,clientSecret:this.clientSecretControl,scopes:this.scopesControl,resourceUrl:this.resourceUrlControl}[t]}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","auth-settings"]):this.router.navigate(["/agentos",this.namespaceId,"auth-settings"]);}trackByScope(t,e){return e.value}trackByField(t,e){return e.key}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=Aw({type:i,selectors:[["agentos-auth-setting-form"]],decls:10,vars:2,consts:[[1,"auth-setting-form"],[1,"auth-setting-form__header"],["type","button","title","Back to auth settings",1,"auth-setting-form__back",3,"click"],[1,"auth-setting-form__back-icon"],[1,"auth-setting-form__title"],[1,"auth-setting-form__loading"],[1,"auth-setting-form__form",3,"formGroup"],[1,"auth-setting-form__form",3,"ngSubmit","formGroup"],[1,"auth-setting-form__scope",3,"disabled"],[1,"auth-setting-form__field"],["for","as-auth-type",1,"auth-setting-form__label"],["aria-hidden","true"],["id","as-auth-type",1,"auth-setting-form__select",3,"formControl"],[3,"value"],["for","as-name",1,"auth-setting-form__label"],["id","as-name","type","text","placeholder","e.g. GitHub OAuth App","autocomplete","off",1,"auth-setting-form__input",3,"formControl"],["for","as-description",1,"auth-setting-form__label"],["id","as-description","type","text","placeholder","Optional \u2014 short description of this auth setting","autocomplete","off",1,"auth-setting-form__input",3,"formControl"],[1,"auth-setting-form__credentials"],[1,"auth-setting-form__actions"],["type","submit",1,"auth-setting-form__btn","auth-setting-form__btn--primary",3,"disabled"],["type","button",1,"auth-setting-form__btn",3,"click"],[1,"auth-setting-form__label"],[1,"auth-setting-form__scope-option"],["type","radio",3,"formControl","value","disabled"],[1,"auth-setting-form__credentials-hint"],[1,"auth-setting-form__label",3,"for"],[3,"id","type","placeholder","formControl","autocomplete"],[1,"auth-setting-form__field-hint",3,"id"]],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," Auth Settings "),fl(),vs(6,"h1",4),WC(7),fl()(),eC(8,se,2,0,"p",5)(9,ye,26,8,"form",6),fl()),e&2&&(XE(7),Zg(o.isEditMode()?"Edit auth setting":"New auth setting"),XE(),tC(o.isLoading()?8:9));},dependencies:[ni,Jn,Qn,ei,Ye,At,mn,Zn,Xn,Cn,En],styles:[".auth-setting-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem;max-width:640px}.auth-setting-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.auth-setting-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.4rem;background:none;border:none;cursor:pointer;color:var(--color-text-secondary);font-size:.85rem;padding:0}.auth-setting-form__back[_ngcontent-%COMP%]:hover{color:var(--color-primary)}.auth-setting-form__back-icon[_ngcontent-%COMP%]{font-size:1rem}.auth-setting-form__title[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:600;color:var(--color-text);margin:0}.auth-setting-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem}.auth-setting-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.auth-setting-form__scope[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:8px;padding:.75rem 1rem;display:flex;flex-direction:column;gap:.5rem}.auth-setting-form__scope[_ngcontent-%COMP%] legend[_ngcontent-%COMP%]{padding:0 .25rem}.auth-setting-form__scope-option[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;font-size:.9rem;color:var(--color-text)}.auth-setting-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem}.auth-setting-form__field-hint[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);margin:0;line-height:1.4}.auth-setting-form__label[_ngcontent-%COMP%]{font-size:.85rem;font-weight:500;color:var(--color-text-secondary)}.auth-setting-form__input[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:6px;padding:.5rem .75rem;background:var(--color-bg-secondary);color:var(--color-text);font-size:.9rem;outline:none;transition:border-color .15s ease;width:100%;box-sizing:border-box}.auth-setting-form__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary)}.auth-setting-form__input--secret[_ngcontent-%COMP%]{font-family:monospace;letter-spacing:.05em}.auth-setting-form__select[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:6px;padding:.5rem .75rem;background:var(--color-bg-secondary);color:var(--color-text);font-size:.9rem;outline:none;cursor:pointer;transition:border-color .15s ease}.auth-setting-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-primary)}.auth-setting-form__credentials[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:8px;padding:.75rem 1rem 1rem;display:flex;flex-direction:column;gap:.75rem;margin:0}.auth-setting-form__credentials[_ngcontent-%COMP%] legend[_ngcontent-%COMP%]{padding:0 .25rem}.auth-setting-form__credentials-hint[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary);margin:0}.auth-setting-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;align-items:center;padding-top:.5rem}.auth-setting-form__btn[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:6px;padding:.5rem 1.25rem;cursor:pointer;font-size:.9rem;font-weight:500;background:var(--color-bg-secondary);color:var(--color-text);transition:background .15s ease}.auth-setting-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover)}.auth-setting-form__btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.auth-setting-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary);color:var(--color-on-primary, #fff);border-color:var(--color-primary)}.auth-setting-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, var(--color-primary))}"]})};
1
+ import {v}from'./chunk-CUJZQ4UR.js';import {R,q,J}from'./chunk-D41-hZBF.js';import {g,ao as V,G,w as we,H as Hi,F,m as mT,cc as Hf,b as U,z as z$1,a as P$1,A as Aw,v as vs,l as Ag,W as WC,k as fl,n as eC,X as XE,a8 as Zg,t as tC,a9 as dC,q as oC,a4 as rC,a3 as HI,o as bg,ac as mC,r as Tg,a6 as $I,x as iC,a5 as yl,cG as Xw,aa as If,ab as wf,b_ as FC,C as Cg}from'./main-YBERLDOH.js';import'./chunk-DUXGBaAU.js';import {k as _t,b as _e$1,o as z,n as ni,J as Jn,Q as Qn,e as ei,Y as Ye,A as At,m as mn,Z as Zn,l as Xn,C as Cn,E as En}from'./chunk-B-VPDMd-.js';import'./chunk-DbVl9TZ7.js';import'./chunk-CAZxbE68.js';import'./chunk-BoNA4fJz.js';import'./chunk-WEG2brZJ.js';function se(i,t){i&1&&(vs(0,"p",5),WC(1,"Loading\u2026"),fl());}function ce(i,t){if(i&1&&(vs(0,"label",23),bg(1,"input",24),HI(),vs(2,"span"),WC(3),fl()()),i&2){let e=t.$implicit,o=mC(3);XE(),Tg("formControl",o.scopeControl)("value",e.value)("disabled",e.value==="namespace"&&!o.isAdmin()),$I(),XE(2),Zg(e.label);}}function de(i,t){if(i&1&&(vs(0,"fieldset",8)(1,"legend",22),WC(2,"Configuration scope"),fl(),oC(3,ce,4,4,"label",23,Xw().trackByScope,true),fl()),i&2){let e=mC(2);Tg("disabled",e.isEditMode()),XE(3),iC(e.scopeOptions);}}function ue(i,t){if(i&1&&(vs(0,"option",13),WC(1),fl()),i&2){let e=t.$implicit,o=mC(2);Tg("value",e),XE(),Zg(o.authTypeLabel[e]);}}function pe(i,t){i&1&&WC(0," Leave a field unchanged to keep the stored credential. ");}function he(i,t){i&1&&(vs(0,"span",11),WC(1,"*"),fl());}function me(i,t){if(i&1&&(vs(0,"p",28),WC(1),fl()),i&2){let e=mC(2).$implicit;Tg("id","as-hint-"+e.key),XE(),Zg(e.hint);}}function ge(i,t){if(i&1&&(bg(0,"input",27),HI(),eC(1,me,2,2,"p",28)),i&2){let e=mC().$implicit;FC("auth-setting-form__input"+(e.secret?" auth-setting-form__input--secret":"")),Tg("id","as-cred-"+e.key)("type",e.secret?"password":"text")("placeholder",e.placeholder)("formControl",t)("autocomplete",e.secret?"new-password":"off"),Cg("aria-describedby",e.hint?"as-hint-"+e.key:null),$I(),XE(),tC(e.hint?1:-1);}}function Ce(i,t){if(i&1&&(vs(0,"div",9)(1,"label",26),WC(2),eC(3,he,2,0,"span",11),fl(),eC(4,ge,2,9),fl()),i&2){let e,o=t.$implicit,l=mC(3);XE(),Tg("for","as-cred-"+o.key),XE(),yl(" ",o.label," "),XE(),tC(o.required?3:-1),XE(),tC((e=l.controlForField(o.key))?4:-1,e);}}function fe(i,t){if(i&1&&(vs(0,"fieldset",18)(1,"legend",22),WC(2,"Credentials"),fl(),vs(3,"p",25),WC(4," Values are stored encrypted and masked on read. "),eC(5,pe,1,0),fl(),oC(6,Ce,5,4,"div",9,Xw().trackByField,true),fl()),i&2){let e=mC(2);XE(5),tC(e.isEditMode()?5:-1),XE(),iC(e.credentialFields());}}function ye(i,t){if(i&1){let e=dC();vs(0,"form",7),Ag("ngSubmit",function(){If(e);let l=mC();return wf(l.submit())}),eC(1,de,5,1,"fieldset",8),vs(2,"div",9)(3,"label",10),WC(4,"Auth type "),vs(5,"span",11),WC(6,"*"),fl()(),vs(7,"select",12),oC(8,ue,2,2,"option",13,rC),fl(),HI(),fl(),vs(10,"div",9)(11,"label",14),WC(12,"Name "),vs(13,"span",11),WC(14,"*"),fl()(),bg(15,"input",15),HI(),fl(),vs(16,"div",9)(17,"label",16),WC(18,"Description"),fl(),bg(19,"input",17),HI(),fl(),eC(20,fe,8,1,"fieldset",18),vs(21,"div",19)(22,"button",20),WC(23),fl(),vs(24,"button",21),Ag("click",function(){If(e);let l=mC();return wf(l.cancel())}),WC(25,"Cancel"),fl()()();}if(i&2){let e=mC();Tg("formGroup",e.form),XE(),tC(e.isPlatformMode?-1:1),XE(6),Tg("formControl",e.authTypeControl),$I(),XE(),iC(e.authTypeOptions),XE(7),Tg("formControl",e.nameControl),$I(),XE(4),Tg("formControl",e.descriptionControl),$I(),XE(),tC(e.credentialFields().length>0?20:-1),XE(2),Tg("disabled",e.form.invalid||e.isSubmitting()),XE(),yl(" ",e.isEditMode()?"Save changes":"Create"," ");}}var _e=new Set(["namespace","userOnNs","userGlobal"]),P=Object.freeze({platform:"Platform (read-only)",namespace:"Namespace configuration",userOnNs:"Personal \u2014 this namespace only",userGlobal:"Personal \u2014 all namespaces"}),Se={ApiKeyAuthSetting:[{key:"apiKey",label:"API Key",placeholder:"sk-\u2026",secret:true,required:false}],BasicAuthAuthSetting:[{key:"username",label:"Username",placeholder:"user@example.com",secret:false,required:false},{key:"password",label:"Password",placeholder:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",secret:true,required:false}],BearerTokenAuthSetting:[{key:"token",label:"Bearer token",placeholder:"eyJ\u2026",secret:true,required:false}],OAuthDiscoverableAuthSetting:[{key:"discoveryUrl",label:"Discovery URL",placeholder:"https://\u2026/.well-known/openid-configuration",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthCustomAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthRegisteredAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthMcpDiscoverableAuthSetting:[{key:"resourceUrl",label:"Resource URL",placeholder:"https://mcp.example.com",hint:"Use the base URL exactly as documented by your provider \u2014 do not append a path suffix. Examples: https://mcp.hubspot.com (HubSpot), https://mcp.atlassian.com/v1/mcp (Atlassian).",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",hint:"Leave empty to let the server register an OAuth client automatically (RFC 7591 dynamic registration). Fill in only if you have a pre-registered client ID from your provider.",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Leave empty in most cases \u2014 the MCP server declares the required scopes itself. Fill in only if your provider explicitly requires client-declared scopes.",secret:false,required:false}]},le=class i{route=g(V);router=g(G);destroyRef=g(we);state=g(R);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=this.namespaceId===void 0;isAdmin=this.isPlatformMode?Hi(true):F(this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:false});authTypeOptions=q;authTypeLabel=J;scopeOptions=[{value:"namespace",label:P.namespace},{value:"userOnNs",label:P.userOnNs},{value:"userGlobal",label:P.userGlobal}];nameControl=new _t("",{nonNullable:true,validators:[_e$1.required,_e$1.minLength(1)]});descriptionControl=new _t(null);authTypeControl=new _t("ApiKeyAuthSetting",{nonNullable:true,validators:[_e$1.required]});scopeControl=new _t("namespace",{nonNullable:true});form=new z({name:this.nameControl,description:this.descriptionControl,authType:this.authTypeControl,scope:this.scopeControl});apiKeyControl=new _t("",{nonNullable:true});usernameControl=new _t("",{nonNullable:true});passwordControl=new _t("",{nonNullable:true});tokenControl=new _t("",{nonNullable:true});discoveryUrlControl=new _t("",{nonNullable:true});authorizationUrlControl=new _t("",{nonNullable:true});tokenUrlControl=new _t("",{nonNullable:true});clientIdControl=new _t("",{nonNullable:true});clientSecretControl=new _t("",{nonNullable:true});scopesControl=new _t("",{nonNullable:true});resourceUrlControl=new _t("",{nonNullable:true});selectedAuthType=F(this.authTypeControl.valueChanges,{initialValue:this.authTypeControl.value});credentialFields=mT(()=>Se[this.selectedAuthType()]);isEditMode=Hi(false);isSubmitting=Hi(false);isLoading=Hi(false);existingConfig=null;initialCredentials={};constructor(){this.isPlatformMode||Hf(()=>{this.isAdmin()||this.isEditMode()||this.scopeControl.value==="namespace"&&this.scopeControl.setValue("userOnNs");});}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let t=this.route.snapshot.paramMap,e=this.route.snapshot.queryParamMap,o=t.get("authSettingId");if(o){this.isEditMode.set(true),this.scopeControl.disable(),this.authTypeControl.disable(),this.loadConfig(o);return}if(this.isPlatformMode){this.scopeControl.setValue("platform"),this.scopeControl.disable();return}let l=this.parseScope(e.get("scope"));this.scopeControl.setValue(l);let v=e.get("template");v&&this.hydrateFromTemplate(v);}parseScope(t){return t&&_e.has(t)?t:"namespace"}deriveScopeFromConfig(t){return !t.userId&&!t.namespaceId?"platform":t.userId?t.namespaceId?"userOnNs":"userGlobal":"namespace"}loadConfig(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.existingConfig=e,this.scopeControl.setValue(this.deriveScopeFromConfig(e)),this.applyConfigToForm(e),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),console.warn(`[AuthSettingForm] Could not load auth setting '${t}' \u2014 navigating back`),this.navigateBack();}});}hydrateFromTemplate(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.authTypeControl.setValue(e.authType),this.clearCredentialControls(),this.initialCredentials={},this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});},error:e=>{console.warn(`[AuthSettingForm] Could not hydrate from template ${t}:`,e),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});}});}applyConfigToForm(t){switch(this.nameControl.setValue(t.name),this.descriptionControl.setValue(t.description??null),this.authTypeControl.setValue(t.authType),this.clearCredentialControls(),this.initialCredentials={},t.authType){case "ApiKeyAuthSetting":{let e=t.apiKey??"";this.apiKeyControl.setValue(e),this.initialCredentials.apiKey=e;break}case "BasicAuthAuthSetting":{let e=t,o=e.username??"",l=e.password??"";this.usernameControl.setValue(o),this.passwordControl.setValue(l),this.initialCredentials.username=o,this.initialCredentials.password=l;break}case "BearerTokenAuthSetting":{let e=t.token??"";this.tokenControl.setValue(e),this.initialCredentials.token=e;break}case "OAuthDiscoverableAuthSetting":{let e=t;this.discoveryUrlControl.setValue(e.discoveryUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.discoveryUrl=e.discoveryUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthCustomAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthRegisteredAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthMcpDiscoverableAuthSetting":{let e=t;this.resourceUrlControl.setValue(e.resourceUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.resourceUrl=e.resourceUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}}}clearCredentialControls(){this.apiKeyControl.setValue(""),this.usernameControl.setValue(""),this.passwordControl.setValue(""),this.tokenControl.setValue(""),this.discoveryUrlControl.setValue(""),this.authorizationUrlControl.setValue(""),this.tokenUrlControl.setValue(""),this.clientIdControl.setValue(""),this.clientSecretControl.setValue(""),this.scopesControl.setValue(""),this.resourceUrlControl.setValue("");}credentialValue(t,e){if(!(this.isEditMode()&&e===this.initialCredentials[t]))return e||void 0}submit(){if(this.form.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(true);let t=this.nameControl.value.trim(),e=this.descriptionControl.value?.trim()||void 0,o=this.authTypeControl.value,l=this.form.getRawValue().scope,v=this.isPlatformMode?null:this.namespaceId??null,w=this.buildTypedPayload(o,t,e);(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,w,this.existingConfig):this.state.create(w,l,v)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}buildTypedPayload(t,e,o){let l={name:e,description:o};switch(t){case "ApiKeyAuthSetting":return z$1(P$1({},l),{authType:"ApiKeyAuthSetting",apiKey:this.credentialValue("apiKey",this.apiKeyControl.value)});case "BasicAuthAuthSetting":return z$1(P$1({},l),{authType:"BasicAuthAuthSetting",username:this.credentialValue("username",this.usernameControl.value),password:this.credentialValue("password",this.passwordControl.value)});case "BearerTokenAuthSetting":return z$1(P$1({},l),{authType:"BearerTokenAuthSetting",token:this.credentialValue("token",this.tokenControl.value)});case "OAuthDiscoverableAuthSetting":return z$1(P$1({},l),{authType:"OAuthDiscoverableAuthSetting",discoveryUrl:this.credentialValue("discoveryUrl",this.discoveryUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthCustomAuthSetting":return z$1(P$1({},l),{authType:"OAuthCustomAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthRegisteredAuthSetting":return z$1(P$1({},l),{authType:"OAuthRegisteredAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthMcpDiscoverableAuthSetting":return z$1(P$1({},l),{authType:"OAuthMcpDiscoverableAuthSetting",resourceUrl:this.credentialValue("resourceUrl",this.resourceUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)})}}controlForField(t){return {apiKey:this.apiKeyControl,username:this.usernameControl,password:this.passwordControl,token:this.tokenControl,discoveryUrl:this.discoveryUrlControl,authorizationUrl:this.authorizationUrlControl,tokenUrl:this.tokenUrlControl,clientId:this.clientIdControl,clientSecret:this.clientSecretControl,scopes:this.scopesControl,resourceUrl:this.resourceUrlControl}[t]}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","auth-settings"]):this.router.navigate(["/agentos",this.namespaceId,"auth-settings"]);}trackByScope(t,e){return e.value}trackByField(t,e){return e.key}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=Aw({type:i,selectors:[["agentos-auth-setting-form"]],decls:10,vars:2,consts:[[1,"auth-setting-form"],[1,"auth-setting-form__header"],["type","button","title","Back to auth settings",1,"auth-setting-form__back",3,"click"],[1,"auth-setting-form__back-icon"],[1,"auth-setting-form__title"],[1,"auth-setting-form__loading"],[1,"auth-setting-form__form",3,"formGroup"],[1,"auth-setting-form__form",3,"ngSubmit","formGroup"],[1,"auth-setting-form__scope",3,"disabled"],[1,"auth-setting-form__field"],["for","as-auth-type",1,"auth-setting-form__label"],["aria-hidden","true"],["id","as-auth-type",1,"auth-setting-form__select",3,"formControl"],[3,"value"],["for","as-name",1,"auth-setting-form__label"],["id","as-name","type","text","placeholder","e.g. GitHub OAuth App","autocomplete","off",1,"auth-setting-form__input",3,"formControl"],["for","as-description",1,"auth-setting-form__label"],["id","as-description","type","text","placeholder","Optional \u2014 short description of this auth setting","autocomplete","off",1,"auth-setting-form__input",3,"formControl"],[1,"auth-setting-form__credentials"],[1,"auth-setting-form__actions"],["type","submit",1,"auth-setting-form__btn","auth-setting-form__btn--primary",3,"disabled"],["type","button",1,"auth-setting-form__btn",3,"click"],[1,"auth-setting-form__label"],[1,"auth-setting-form__scope-option"],["type","radio",3,"formControl","value","disabled"],[1,"auth-setting-form__credentials-hint"],[1,"auth-setting-form__label",3,"for"],[3,"id","type","placeholder","formControl","autocomplete"],[1,"auth-setting-form__field-hint",3,"id"]],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," Auth Settings "),fl(),vs(6,"h1",4),WC(7),fl()(),eC(8,se,2,0,"p",5)(9,ye,26,8,"form",6),fl()),e&2&&(XE(7),Zg(o.isEditMode()?"Edit auth setting":"New auth setting"),XE(),tC(o.isLoading()?8:9));},dependencies:[ni,Jn,Qn,ei,Ye,At,mn,Zn,Xn,Cn,En],styles:[".auth-setting-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem;max-width:640px}.auth-setting-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.auth-setting-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.4rem;background:none;border:none;cursor:pointer;color:var(--color-text-secondary);font-size:.85rem;padding:0}.auth-setting-form__back[_ngcontent-%COMP%]:hover{color:var(--color-primary)}.auth-setting-form__back-icon[_ngcontent-%COMP%]{font-size:1rem}.auth-setting-form__title[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:600;color:var(--color-text);margin:0}.auth-setting-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem}.auth-setting-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.auth-setting-form__scope[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:8px;padding:.75rem 1rem;display:flex;flex-direction:column;gap:.5rem}.auth-setting-form__scope[_ngcontent-%COMP%] legend[_ngcontent-%COMP%]{padding:0 .25rem}.auth-setting-form__scope-option[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;font-size:.9rem;color:var(--color-text)}.auth-setting-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem}.auth-setting-form__field-hint[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);margin:0;line-height:1.4}.auth-setting-form__label[_ngcontent-%COMP%]{font-size:.85rem;font-weight:500;color:var(--color-text-secondary)}.auth-setting-form__input[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:6px;padding:.5rem .75rem;background:var(--color-bg-secondary);color:var(--color-text);font-size:.9rem;outline:none;transition:border-color .15s ease;width:100%;box-sizing:border-box}.auth-setting-form__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary)}.auth-setting-form__input--secret[_ngcontent-%COMP%]{font-family:monospace;letter-spacing:.05em}.auth-setting-form__select[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:6px;padding:.5rem .75rem;background:var(--color-bg-secondary);color:var(--color-text);font-size:.9rem;outline:none;cursor:pointer;transition:border-color .15s ease}.auth-setting-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-primary)}.auth-setting-form__credentials[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:8px;padding:.75rem 1rem 1rem;display:flex;flex-direction:column;gap:.75rem;margin:0}.auth-setting-form__credentials[_ngcontent-%COMP%] legend[_ngcontent-%COMP%]{padding:0 .25rem}.auth-setting-form__credentials-hint[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary);margin:0}.auth-setting-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;align-items:center;padding-top:.5rem}.auth-setting-form__btn[_ngcontent-%COMP%]{border:1px solid var(--color-border);border-radius:6px;padding:.5rem 1.25rem;cursor:pointer;font-size:.9rem;font-weight:500;background:var(--color-bg-secondary);color:var(--color-text);transition:background .15s ease}.auth-setting-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover)}.auth-setting-form__btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.auth-setting-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary);color:var(--color-on-primary, #fff);border-color:var(--color-primary)}.auth-setting-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, var(--color-primary))}"]})};
2
2
  export{le as AuthSettingFormComponent};
@@ -1 +1 @@
1
- import {R}from'./chunk-DB8HcHes.js';import {c}from'./chunk-Cw18oPF0.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-MB7Y2AR2.js';import {W as Wn,S as Se}from'./chunk-Dg1d1XBn.js';import'./chunk-C8P9SuaA.js';import'./chunk-jg8IIJti.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-z0RY6Set.js';import {c}from'./chunk-Kp2ec6yl.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-YBERLDOH.js';import {W as Wn,S as Se}from'./chunk-BoNA4fJz.js';import'./chunk-WEG2brZJ.js';import'./chunk-B-VPDMd-.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-MT0Figq0.js';import {v}from'./chunk-DvXqS7Sb.js';import {g,ao as V,G,w as we,H as Hi,F as F$1,db as ue$1,cc as Hf,b as U,A as Aw,v as vs,l as Ag,W as WC,k as fl,n as eC,X as XE,a8 as Zg,t as tC,a9 as dC,q as oC,a4 as rC,a3 as HI,o as bg,bn as nC,ac as mC,r as Tg,a6 as $I,x as iC,a5 as yl,cG as Xw,aa as If,ab as wf}from'./main-MB7Y2AR2.js';import'./chunk-CinHjHqk.js';import {o as z,z as ze,k as _t,b as _e$1,n as ni,J as Jn,Q as Qn,e as ei,Y as Ye,A as At,m as mn,Z as Zn,l as Xn,C as Cn,E as En,p as An,q as Ct,V as Vt}from'./chunk-jg8IIJti.js';import'./chunk-JSqlYB97.js';import'./chunk-ciSHZI2F.js';import'./chunk-Dg1d1XBn.js';import'./chunk-C8P9SuaA.js';function ce(a,r){a&1&&(vs(0,"p",5),WC(1,"Loading\u2026"),fl());}function me(a,r){if(a&1&&(vs(0,"label",30),bg(1,"input",31),HI(),vs(2,"span"),WC(3),fl()()),a&2){let e=r.$implicit,l=mC(3);XE(),Tg("formControl",l.scopeControl)("value",e.value)("disabled",e.value==="namespace"&&!l.isAdmin()),$I(),XE(2),Zg(e.label);}}function ue(a,r){if(a&1&&(vs(0,"fieldset",8)(1,"legend",24),WC(2,"Port\xE9e de la configuration"),fl(),oC(3,me,4,4,"label",30,Xw().trackByScope,true),fl()),a&2){let e=mC(2);Tg("disabled",e.isEditMode()),XE(3),iC(e.scopeOptions);}}function ve(a,r){if(a&1&&(vs(0,"option",13),WC(1),fl()),a&2){let e=r.$implicit;Tg("value",e),XE(),Zg(e);}}function fe(a,r){if(a&1){let e=dC();vs(0,"div",26),bg(1,"input",32),HI(),bg(2,"input",33),HI(),vs(3,"button",34),Ag("click",function(){let s=If(e).$index,f=mC(2);return wf(f.removeHeader(s))}),WC(4," \xD7 "),fl()();}if(a&2){let e=r.$index;Tg("formGroupName",e),XE(),$I(),XE(),$I();}}function _e(a,r){if(a&1){let e=dC();vs(0,"form",7),Ag("ngSubmit",function(){If(e);let s=mC();return wf(s.submit())}),eC(1,ue,5,1,"fieldset",8),vs(2,"div",9)(3,"label",10),WC(4,"API type "),vs(5,"span",11),WC(6,"*"),fl()(),vs(7,"select",12),oC(8,ve,2,2,"option",13,rC),fl(),HI(),fl(),vs(10,"div",9)(11,"label",14),WC(12,"Name "),vs(13,"span",11),WC(14,"*"),fl()(),bg(15,"input",15),HI(),fl(),vs(16,"div",9)(17,"label",16),WC(18,"Description"),fl(),bg(19,"input",17),HI(),fl(),vs(20,"div",9)(21,"label",18),WC(22,"Base URL"),fl(),bg(23,"input",19),HI(),fl(),vs(24,"div",9)(25,"label",20),WC(26,"API key"),fl(),bg(27,"input",21),HI(),fl(),vs(28,"div",22)(29,"div",23)(30,"span",24),WC(31,"Custom headers"),fl(),vs(32,"button",25),Ag("click",function(){If(e);let s=mC();return wf(s.addHeader())}),WC(33,"+ Add header"),fl()(),oC(34,fe,5,1,"div",26,nC),fl(),vs(36,"div",27)(37,"button",28),WC(38),fl(),vs(39,"button",29),Ag("click",function(){If(e);let s=mC();return wf(s.cancel())}),WC(40,"Cancel"),fl()()();}if(a&2){let e=mC();Tg("formGroup",e.form),XE(),tC(e.isPlatformMode?-1:1),XE(6),Tg("formControl",e.apiTypeControl),$I(),XE(),iC(e.apiTypeOptions),XE(7),Tg("formControl",e.nameControl),$I(),XE(4),Tg("formControl",e.descriptionControl),$I(),XE(4),Tg("formControl",e.baseUrlControl),$I(),XE(4),Tg("formControl",e.apiKeyControl),$I(),XE(),Tg("formArrayName","headers"),XE(6),iC(e.headersArray.controls),XE(3),Tg("disabled",e.form.invalid||e.isSubmitting()),XE(),yl(" ",e.isEditMode()?"Save changes":"Create"," ");}}var ge=new Set(["namespace","userOnNs","userGlobal"]),F=Object.freeze({platform:"Configuration de niveau plateforme",namespace:"Configuration du namespace",userOnNs:"Pour moi sur ce namespace",userGlobal:"Pour moi globalement"}),se=class a{route=g(V);router=g(G);destroyRef=g(we);state=g(O);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=this.namespaceId===void 0;isAdmin=this.isPlatformMode?Hi(true):F$1(this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:false});apiTypeOptions=Object.values(ue$1);scopeOptions=[{value:"namespace",label:F.namespace},{value:"userOnNs",label:F.userOnNs},{value:"userGlobal",label:F.userGlobal}];form=new z({name:new _t("",{nonNullable:true,validators:[_e$1.required,_e$1.minLength(1)]}),description:new _t(null),apiType:new _t("OpenAI",{nonNullable:true,validators:[_e$1.required]}),baseUrl:new _t("",{nonNullable:true}),apiKey:new _t("",{nonNullable:true}),scope:new _t("namespace",{nonNullable:true}),headers:new ze([],{validators:[]})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get apiTypeControl(){return this.form.controls.apiType}get baseUrlControl(){return this.form.controls.baseUrl}get apiKeyControl(){return this.form.controls.apiKey}get scopeControl(){return this.form.controls.scope}get headersArray(){return this.form.controls.headers}addHeader(){this.headersArray.push(new z({key:new _t("",{nonNullable:true,validators:[_e$1.required]}),value:new _t("",{nonNullable:true})}));}removeHeader(r){this.headersArray.removeAt(r);}isEditMode=Hi(false);isSubmitting=Hi(false);isLoading=Hi(false);existingConfig=null;initialApiKey="";constructor(){this.isPlatformMode||Hf(()=>{this.isAdmin()||this.isEditMode()||this.scopeControl.value==="namespace"&&this.scopeControl.setValue("userOnNs");});}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let r=this.route.snapshot.paramMap,e=this.route.snapshot.queryParamMap,l=r.get("aiProviderId"),s=this.isPlatformMode?"namespace":this.parseScope(e.get("scope"));if(l){this.isEditMode.set(true),this.scopeControl.disable(),this.apiTypeControl.disable(),this.loadConfig(l);return}this.scopeControl.setValue(s);let f=e.get("template");f&&this.hydrateFromTemplate(f);}parseScope(r){return r&&ge.has(r)?r:"namespace"}deriveScopeFromConfig(r){return !r.userId?"namespace":r.namespaceId?"userOnNs":"userGlobal"}loadConfig(r){this.isLoading.set(true),this.state.getById(r).pipe(U(this.destroyRef)).subscribe({next:e=>{this.existingConfig=e,this.scopeControl.setValue(this.deriveScopeFromConfig(e)),this.applyConfigToForm(e),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),console.warn(`[AiProviderForm] Could not load provider '${r}' \u2014 navigating back`),this.navigateBack();}});}hydrateFromTemplate(r){this.isLoading.set(true),this.state.getById(r).pipe(U(this.destroyRef)).subscribe({next:e=>{this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.apiTypeControl.setValue(e.apiType),this.baseUrlControl.setValue(e.baseUrl??""),this.apiKeyControl.setValue(""),this.initialApiKey="",this.apiKeyControl.markAsTouched(),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});},error:e=>{console.warn(`[AiProviderForm] Could not hydrate from template ${r}:`,e),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});}});}applyConfigToForm(r){this.nameControl.setValue(r.name),this.descriptionControl.setValue(r.description??null),this.apiTypeControl.setValue(r.apiType),this.baseUrlControl.setValue(r.baseUrl??"");let e=r.apiKey??"";this.apiKeyControl.setValue(e),this.initialApiKey=e,this.headersArray.clear();for(let[l,s]of Object.entries(r.headers??{}))this.headersArray.push(new z({key:new _t(l,{nonNullable:true,validators:[_e$1.required]}),value:new _t(s,{nonNullable:true})}));}submit(){if(this.form.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(true);let r=this.descriptionControl.value?.trim(),e=this.baseUrlControl.value.trim(),l=this.apiKeyControl.value,s=this.isEditMode()&&l===this.initialApiKey?null:l,f=this.headersArray.controls.filter(x=>x.controls.key.value.trim()).map(x=>[x.controls.key.value.trim(),x.controls.value.value]),de=f.length>0?Object.fromEntries(f):null,N={name:this.nameControl.value.trim(),apiType:this.apiTypeControl.value,description:r||null,baseUrl:e||null,apiKey:s,headers:de},T=this.form.getRawValue().scope,pe=this.isPlatformMode?null:this.namespaceId??null;(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,N,T,this.existingConfig):this.state.create(N,T,pe)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","ai-providers"]):this.router.navigate(["/agentos",this.namespaceId,"ai-providers"]);}trackByScope(r,e){return e.value}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=Aw({type:a,selectors:[["agentos-ai-provider-form"]],decls:10,vars:2,consts:[[1,"ai-provider-form"],[1,"ai-provider-form__header"],["type","button","title","Back to AI providers",1,"ai-provider-form__back",3,"click"],[1,"ai-provider-form__back-icon"],[1,"ai-provider-form__title"],[1,"ai-provider-form__loading"],[1,"ai-provider-form__form",3,"formGroup"],[1,"ai-provider-form__form",3,"ngSubmit","formGroup"],[1,"ai-provider-form__scope",3,"disabled"],[1,"ai-provider-form__field"],["for","llm-api-type",1,"ai-provider-form__label"],["aria-hidden","true"],["id","llm-api-type",1,"ai-provider-form__select",3,"formControl"],[3,"value"],["for","llm-name",1,"ai-provider-form__label"],["id","llm-name","type","text","placeholder","e.g. OpenAI prod","autocomplete","off",1,"ai-provider-form__input",3,"formControl"],["for","llm-description",1,"ai-provider-form__label"],["id","llm-description","type","text","placeholder","Optional \u2014 short description of this provider","autocomplete","off",1,"ai-provider-form__input",3,"formControl"],["for","llm-base-url",1,"ai-provider-form__label"],["id","llm-base-url","type","url","placeholder","Optional \u2014 leave empty for default endpoint","autocomplete","off",1,"ai-provider-form__input",3,"formControl"],["for","llm-api-key",1,"ai-provider-form__label"],["id","llm-api-key","type","password","placeholder","sk-\u2026","autocomplete","new-password",1,"ai-provider-form__input","ai-provider-form__input--secret",3,"formControl"],[1,"ai-provider-form__headers",3,"formArrayName"],[1,"ai-provider-form__headers-title"],[1,"ai-provider-form__label"],["type","button",1,"ai-provider-form__headers-add",3,"click"],[1,"ai-provider-form__header-row",3,"formGroupName"],[1,"ai-provider-form__actions"],["type","submit",1,"ai-provider-form__btn","ai-provider-form__btn--primary",3,"disabled"],["type","button",1,"ai-provider-form__btn",3,"click"],[1,"ai-provider-form__scope-option"],["type","radio",3,"formControl","value","disabled"],["type","text","placeholder","Header name","formControlName","key","autocomplete","off",1,"ai-provider-form__input"],["type","text","placeholder","Value","formControlName","value","autocomplete","off",1,"ai-provider-form__input"],["type","button","title","Remove header","aria-label","Remove header",1,"ai-provider-form__header-remove",3,"click"]],template:function(e,l){e&1&&(vs(0,"div",0)(1,"header",1)(2,"button",2),Ag("click",function(){return l.cancel()}),vs(3,"span",3),WC(4,"\u2190"),fl(),WC(5," AI Providers "),fl(),vs(6,"h1",4),WC(7),fl()(),eC(8,ce,2,0,"p",5)(9,_e,41,10,"form",6),fl()),e&2&&(XE(7),Zg(l.isEditMode()?"Edit AI provider":"New AI provider"),XE(),tC(l.isLoading()?8:9));},dependencies:[ni,Jn,Qn,ei,Ye,At,mn,Zn,Xn,Cn,En,An,Ct,Vt],styles:[".ai-provider-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:480px;margin:0 auto;padding:2rem 1rem}.ai-provider-form__scope[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.4rem;border:1px solid var(--color-divider);border-radius:0;padding:.75rem 1rem;margin:0}.ai-provider-form__scope[disabled][_ngcontent-%COMP%]{opacity:.6}.ai-provider-form__scope-option[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;font-size:.85rem;color:var(--color-text);cursor:pointer}.ai-provider-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.ai-provider-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)}.ai-provider-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.ai-provider-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.ai-provider-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.ai-provider-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.ai-provider-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.ai-provider-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.ai-provider-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.ai-provider-form__input[_ngcontent-%COMP%], .ai-provider-form__select[_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}.ai-provider-form__input[_ngcontent-%COMP%]:focus, .ai-provider-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.ai-provider-form__input[_ngcontent-%COMP%]::placeholder, .ai-provider-form__select[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.ai-provider-form__input--secret[_ngcontent-%COMP%]{font-family:monospace;letter-spacing:.05em}.ai-provider-form__headers[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.ai-provider-form__headers-title[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.ai-provider-form__headers-add[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.8125rem;color:var(--color-accent)}.ai-provider-form__headers-add[_ngcontent-%COMP%]:hover{text-decoration:underline}.ai-provider-form__header-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr auto;gap:.5rem;align-items:center}.ai-provider-form__header-remove[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;background:none;border:1px solid transparent;border-radius:0;cursor:pointer;font-size:1rem;color:var(--color-neutral-500);transition:background .15s ease,color .15s ease,border-color .15s ease;flex-shrink:0}.ai-provider-form__header-remove[_ngcontent-%COMP%]:hover{color:var(--red);background:color-mix(in srgb,var(--red) 10%,transparent);border-color:var(--red)}.ai-provider-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.ai-provider-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}.ai-provider-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.ai-provider-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.ai-provider-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.ai-provider-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}"]})};export{se as AiProviderFormComponent};
1
+ import {O}from'./chunk-DJSlGrxA.js';import {v}from'./chunk-CUJZQ4UR.js';import {g,ao as V,G,w as we,H as Hi,F as F$1,db as ue$1,cc as Hf,b as U,A as Aw,v as vs,l as Ag,W as WC,k as fl,n as eC,X as XE,a8 as Zg,t as tC,a9 as dC,q as oC,a4 as rC,a3 as HI,o as bg,bn as nC,ac as mC,r as Tg,a6 as $I,x as iC,a5 as yl,cG as Xw,aa as If,ab as wf}from'./main-YBERLDOH.js';import'./chunk-DUXGBaAU.js';import {o as z,z as ze,k as _t,b as _e$1,n as ni,J as Jn,Q as Qn,e as ei,Y as Ye,A as At,m as mn,Z as Zn,l as Xn,C as Cn,E as En,p as An,q as Ct,V as Vt}from'./chunk-B-VPDMd-.js';import'./chunk-DbVl9TZ7.js';import'./chunk-CAZxbE68.js';import'./chunk-BoNA4fJz.js';import'./chunk-WEG2brZJ.js';function ce(a,r){a&1&&(vs(0,"p",5),WC(1,"Loading\u2026"),fl());}function me(a,r){if(a&1&&(vs(0,"label",30),bg(1,"input",31),HI(),vs(2,"span"),WC(3),fl()()),a&2){let e=r.$implicit,l=mC(3);XE(),Tg("formControl",l.scopeControl)("value",e.value)("disabled",e.value==="namespace"&&!l.isAdmin()),$I(),XE(2),Zg(e.label);}}function ue(a,r){if(a&1&&(vs(0,"fieldset",8)(1,"legend",24),WC(2,"Port\xE9e de la configuration"),fl(),oC(3,me,4,4,"label",30,Xw().trackByScope,true),fl()),a&2){let e=mC(2);Tg("disabled",e.isEditMode()),XE(3),iC(e.scopeOptions);}}function ve(a,r){if(a&1&&(vs(0,"option",13),WC(1),fl()),a&2){let e=r.$implicit;Tg("value",e),XE(),Zg(e);}}function fe(a,r){if(a&1){let e=dC();vs(0,"div",26),bg(1,"input",32),HI(),bg(2,"input",33),HI(),vs(3,"button",34),Ag("click",function(){let s=If(e).$index,f=mC(2);return wf(f.removeHeader(s))}),WC(4," \xD7 "),fl()();}if(a&2){let e=r.$index;Tg("formGroupName",e),XE(),$I(),XE(),$I();}}function _e(a,r){if(a&1){let e=dC();vs(0,"form",7),Ag("ngSubmit",function(){If(e);let s=mC();return wf(s.submit())}),eC(1,ue,5,1,"fieldset",8),vs(2,"div",9)(3,"label",10),WC(4,"API type "),vs(5,"span",11),WC(6,"*"),fl()(),vs(7,"select",12),oC(8,ve,2,2,"option",13,rC),fl(),HI(),fl(),vs(10,"div",9)(11,"label",14),WC(12,"Name "),vs(13,"span",11),WC(14,"*"),fl()(),bg(15,"input",15),HI(),fl(),vs(16,"div",9)(17,"label",16),WC(18,"Description"),fl(),bg(19,"input",17),HI(),fl(),vs(20,"div",9)(21,"label",18),WC(22,"Base URL"),fl(),bg(23,"input",19),HI(),fl(),vs(24,"div",9)(25,"label",20),WC(26,"API key"),fl(),bg(27,"input",21),HI(),fl(),vs(28,"div",22)(29,"div",23)(30,"span",24),WC(31,"Custom headers"),fl(),vs(32,"button",25),Ag("click",function(){If(e);let s=mC();return wf(s.addHeader())}),WC(33,"+ Add header"),fl()(),oC(34,fe,5,1,"div",26,nC),fl(),vs(36,"div",27)(37,"button",28),WC(38),fl(),vs(39,"button",29),Ag("click",function(){If(e);let s=mC();return wf(s.cancel())}),WC(40,"Cancel"),fl()()();}if(a&2){let e=mC();Tg("formGroup",e.form),XE(),tC(e.isPlatformMode?-1:1),XE(6),Tg("formControl",e.apiTypeControl),$I(),XE(),iC(e.apiTypeOptions),XE(7),Tg("formControl",e.nameControl),$I(),XE(4),Tg("formControl",e.descriptionControl),$I(),XE(4),Tg("formControl",e.baseUrlControl),$I(),XE(4),Tg("formControl",e.apiKeyControl),$I(),XE(),Tg("formArrayName","headers"),XE(6),iC(e.headersArray.controls),XE(3),Tg("disabled",e.form.invalid||e.isSubmitting()),XE(),yl(" ",e.isEditMode()?"Save changes":"Create"," ");}}var ge=new Set(["namespace","userOnNs","userGlobal"]),F=Object.freeze({platform:"Configuration de niveau plateforme",namespace:"Configuration du namespace",userOnNs:"Pour moi sur ce namespace",userGlobal:"Pour moi globalement"}),se=class a{route=g(V);router=g(G);destroyRef=g(we);state=g(O);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=this.namespaceId===void 0;isAdmin=this.isPlatformMode?Hi(true):F$1(this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:false});apiTypeOptions=Object.values(ue$1);scopeOptions=[{value:"namespace",label:F.namespace},{value:"userOnNs",label:F.userOnNs},{value:"userGlobal",label:F.userGlobal}];form=new z({name:new _t("",{nonNullable:true,validators:[_e$1.required,_e$1.minLength(1)]}),description:new _t(null),apiType:new _t("OpenAI",{nonNullable:true,validators:[_e$1.required]}),baseUrl:new _t("",{nonNullable:true}),apiKey:new _t("",{nonNullable:true}),scope:new _t("namespace",{nonNullable:true}),headers:new ze([],{validators:[]})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get apiTypeControl(){return this.form.controls.apiType}get baseUrlControl(){return this.form.controls.baseUrl}get apiKeyControl(){return this.form.controls.apiKey}get scopeControl(){return this.form.controls.scope}get headersArray(){return this.form.controls.headers}addHeader(){this.headersArray.push(new z({key:new _t("",{nonNullable:true,validators:[_e$1.required]}),value:new _t("",{nonNullable:true})}));}removeHeader(r){this.headersArray.removeAt(r);}isEditMode=Hi(false);isSubmitting=Hi(false);isLoading=Hi(false);existingConfig=null;initialApiKey="";constructor(){this.isPlatformMode||Hf(()=>{this.isAdmin()||this.isEditMode()||this.scopeControl.value==="namespace"&&this.scopeControl.setValue("userOnNs");});}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let r=this.route.snapshot.paramMap,e=this.route.snapshot.queryParamMap,l=r.get("aiProviderId"),s=this.isPlatformMode?"namespace":this.parseScope(e.get("scope"));if(l){this.isEditMode.set(true),this.scopeControl.disable(),this.apiTypeControl.disable(),this.loadConfig(l);return}this.scopeControl.setValue(s);let f=e.get("template");f&&this.hydrateFromTemplate(f);}parseScope(r){return r&&ge.has(r)?r:"namespace"}deriveScopeFromConfig(r){return !r.userId?"namespace":r.namespaceId?"userOnNs":"userGlobal"}loadConfig(r){this.isLoading.set(true),this.state.getById(r).pipe(U(this.destroyRef)).subscribe({next:e=>{this.existingConfig=e,this.scopeControl.setValue(this.deriveScopeFromConfig(e)),this.applyConfigToForm(e),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),console.warn(`[AiProviderForm] Could not load provider '${r}' \u2014 navigating back`),this.navigateBack();}});}hydrateFromTemplate(r){this.isLoading.set(true),this.state.getById(r).pipe(U(this.destroyRef)).subscribe({next:e=>{this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.apiTypeControl.setValue(e.apiType),this.baseUrlControl.setValue(e.baseUrl??""),this.apiKeyControl.setValue(""),this.initialApiKey="",this.apiKeyControl.markAsTouched(),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});},error:e=>{console.warn(`[AiProviderForm] Could not hydrate from template ${r}:`,e),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});}});}applyConfigToForm(r){this.nameControl.setValue(r.name),this.descriptionControl.setValue(r.description??null),this.apiTypeControl.setValue(r.apiType),this.baseUrlControl.setValue(r.baseUrl??"");let e=r.apiKey??"";this.apiKeyControl.setValue(e),this.initialApiKey=e,this.headersArray.clear();for(let[l,s]of Object.entries(r.headers??{}))this.headersArray.push(new z({key:new _t(l,{nonNullable:true,validators:[_e$1.required]}),value:new _t(s,{nonNullable:true})}));}submit(){if(this.form.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(true);let r=this.descriptionControl.value?.trim(),e=this.baseUrlControl.value.trim(),l=this.apiKeyControl.value,s=this.isEditMode()&&l===this.initialApiKey?null:l,f=this.headersArray.controls.filter(x=>x.controls.key.value.trim()).map(x=>[x.controls.key.value.trim(),x.controls.value.value]),de=f.length>0?Object.fromEntries(f):null,N={name:this.nameControl.value.trim(),apiType:this.apiTypeControl.value,description:r||null,baseUrl:e||null,apiKey:s,headers:de},T=this.form.getRawValue().scope,pe=this.isPlatformMode?null:this.namespaceId??null;(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,N,T,this.existingConfig):this.state.create(N,T,pe)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","ai-providers"]):this.router.navigate(["/agentos",this.namespaceId,"ai-providers"]);}trackByScope(r,e){return e.value}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=Aw({type:a,selectors:[["agentos-ai-provider-form"]],decls:10,vars:2,consts:[[1,"ai-provider-form"],[1,"ai-provider-form__header"],["type","button","title","Back to AI providers",1,"ai-provider-form__back",3,"click"],[1,"ai-provider-form__back-icon"],[1,"ai-provider-form__title"],[1,"ai-provider-form__loading"],[1,"ai-provider-form__form",3,"formGroup"],[1,"ai-provider-form__form",3,"ngSubmit","formGroup"],[1,"ai-provider-form__scope",3,"disabled"],[1,"ai-provider-form__field"],["for","llm-api-type",1,"ai-provider-form__label"],["aria-hidden","true"],["id","llm-api-type",1,"ai-provider-form__select",3,"formControl"],[3,"value"],["for","llm-name",1,"ai-provider-form__label"],["id","llm-name","type","text","placeholder","e.g. OpenAI prod","autocomplete","off",1,"ai-provider-form__input",3,"formControl"],["for","llm-description",1,"ai-provider-form__label"],["id","llm-description","type","text","placeholder","Optional \u2014 short description of this provider","autocomplete","off",1,"ai-provider-form__input",3,"formControl"],["for","llm-base-url",1,"ai-provider-form__label"],["id","llm-base-url","type","url","placeholder","Optional \u2014 leave empty for default endpoint","autocomplete","off",1,"ai-provider-form__input",3,"formControl"],["for","llm-api-key",1,"ai-provider-form__label"],["id","llm-api-key","type","password","placeholder","sk-\u2026","autocomplete","new-password",1,"ai-provider-form__input","ai-provider-form__input--secret",3,"formControl"],[1,"ai-provider-form__headers",3,"formArrayName"],[1,"ai-provider-form__headers-title"],[1,"ai-provider-form__label"],["type","button",1,"ai-provider-form__headers-add",3,"click"],[1,"ai-provider-form__header-row",3,"formGroupName"],[1,"ai-provider-form__actions"],["type","submit",1,"ai-provider-form__btn","ai-provider-form__btn--primary",3,"disabled"],["type","button",1,"ai-provider-form__btn",3,"click"],[1,"ai-provider-form__scope-option"],["type","radio",3,"formControl","value","disabled"],["type","text","placeholder","Header name","formControlName","key","autocomplete","off",1,"ai-provider-form__input"],["type","text","placeholder","Value","formControlName","value","autocomplete","off",1,"ai-provider-form__input"],["type","button","title","Remove header","aria-label","Remove header",1,"ai-provider-form__header-remove",3,"click"]],template:function(e,l){e&1&&(vs(0,"div",0)(1,"header",1)(2,"button",2),Ag("click",function(){return l.cancel()}),vs(3,"span",3),WC(4,"\u2190"),fl(),WC(5," AI Providers "),fl(),vs(6,"h1",4),WC(7),fl()(),eC(8,ce,2,0,"p",5)(9,_e,41,10,"form",6),fl()),e&2&&(XE(7),Zg(l.isEditMode()?"Edit AI provider":"New AI provider"),XE(),tC(l.isLoading()?8:9));},dependencies:[ni,Jn,Qn,ei,Ye,At,mn,Zn,Xn,Cn,En,An,Ct,Vt],styles:[".ai-provider-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:480px;margin:0 auto;padding:2rem 1rem}.ai-provider-form__scope[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.4rem;border:1px solid var(--color-divider);border-radius:0;padding:.75rem 1rem;margin:0}.ai-provider-form__scope[disabled][_ngcontent-%COMP%]{opacity:.6}.ai-provider-form__scope-option[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;font-size:.85rem;color:var(--color-text);cursor:pointer}.ai-provider-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.ai-provider-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)}.ai-provider-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.ai-provider-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.ai-provider-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.ai-provider-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.ai-provider-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.ai-provider-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.ai-provider-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.ai-provider-form__input[_ngcontent-%COMP%], .ai-provider-form__select[_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}.ai-provider-form__input[_ngcontent-%COMP%]:focus, .ai-provider-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.ai-provider-form__input[_ngcontent-%COMP%]::placeholder, .ai-provider-form__select[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.ai-provider-form__input--secret[_ngcontent-%COMP%]{font-family:monospace;letter-spacing:.05em}.ai-provider-form__headers[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.ai-provider-form__headers-title[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.ai-provider-form__headers-add[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.8125rem;color:var(--color-accent)}.ai-provider-form__headers-add[_ngcontent-%COMP%]:hover{text-decoration:underline}.ai-provider-form__header-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr auto;gap:.5rem;align-items:center}.ai-provider-form__header-remove[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;background:none;border:1px solid transparent;border-radius:0;cursor:pointer;font-size:1rem;color:var(--color-neutral-500);transition:background .15s ease,color .15s ease,border-color .15s ease;flex-shrink:0}.ai-provider-form__header-remove[_ngcontent-%COMP%]:hover{color:var(--red);background:color-mix(in srgb,var(--red) 10%,transparent);border-color:var(--red)}.ai-provider-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.ai-provider-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}.ai-provider-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.ai-provider-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.ai-provider-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.ai-provider-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}"]})};export{se as AiProviderFormComponent};
@@ -1 +1 @@
1
- import {g,G,ca as mB,cb as gB,H as Hi,d9 as fe,dj as Ce,A as Aw,v as vs,W as WC,k as fl,n as eC,X as XE,a8 as Zg,y as Hg,a5 as yl,t as tC,ac as mC,a9 as dC,l as Ag,r as Tg,aa as If,ab as wf}from'./main-MB7Y2AR2.js';import {Z as Zn,S as Se}from'./chunk-Dg1d1XBn.js';function L(n,t){if(n&1&&(vs(0,"span",5),WC(1),fl()),n&2){let e=mC();XE(),Zg(e.definition().description);}}function q(n,t){if(n&1&&(vs(0,"span",7),WC(1),fl()),n&2){let e=mC();XE(),yl("Next: ",e.nextRunLabel);}}function U(n,t){if(n&1&&(vs(0,"span",8),WC(1),fl()),n&2){let e=mC();XE(),yl("Last run: ",e.lastRunLabel);}}function $(n,t){if(n&1){let e=dC();vs(0,"span",12),WC(1,"Delete?"),fl(),vs(2,"ds-icon-button",13),Ag("action",function(){If(e);let a=mC(2);return wf(a.onDeleteConfirmed())}),fl(),vs(3,"ds-icon-button",14),Ag("action",function(){If(e);let a=mC(2);return wf(a.onDeleteCancelled())}),fl();}}function N(n,t){if(n&1){let e=dC();vs(0,"ds-kebab-menu",15),Ag("itemSelected",function(a){If(e);let p=mC(2);return wf(p.onMenuAction(a))}),fl();}if(n&2){let e=mC(2);Tg("items",e.menuItems);}}function V(n,t){if(n&1&&(vs(0,"div",10),eC(1,$,4,0)(2,N,1,1,"ds-kebab-menu",11),fl()),n&2){let e=mC();Hg("scheduled-prompt-item__actions--confirming",e.pendingDelete()),XE(),tC(e.pendingDelete()?1:2);}}var R=class n{router=g(G);definition=mB.required();namespaceId=mB(void 0);platformMode=mB(false);readOnly=mB(false);enableRequested=gB();disableRequested=gB();deleteRequested=gB();pendingDelete=Hi(false);get scheduleLabel(){let{recurrence:t}=this.definition(),e=t.unit,i=t.timeUtc,a=e===fe.WEEK?"week":"month",p=e===fe.WEEK&&t.days?.length?` (${t.days.map(_=>Ce[_]??_).join(", ")})`:"";return `Every ${a}${p} at ${i} UTC`}formatInstant(t){if(!t)return null;let e=new Date(t),i=e.getUTCDate(),a=e.toLocaleString("en-GB",{month:"short",timeZone:"UTC"}),p=e.getUTCFullYear(),_=String(e.getUTCHours()).padStart(2,"0"),T=String(e.getUTCMinutes()).padStart(2,"0");return `${i} ${a} ${p} at ${_}:${T} UTC`}get nextRunLabel(){return this.formatInstant(this.definition().nextRunAt)}get lastRunLabel(){return this.formatInstant(this.definition().lastRunAt)}get menuItems(){let t=this.definition();return [{key:"edit",label:"Edit scheduled prompt",icon:"edit"},{key:"toggle",label:t.enabled?"Disable":"Enable",icon:t.enabled?"toggle_on":"toggle_off"},{key:"delete",label:"Delete scheduled prompt",icon:"delete",variant:"danger"}]}onMenuAction(t){let e=this.definition();switch(t){case "edit":this.platformMode()?this.router.navigate(["/agentos","admin","scheduled-prompts",e.id,"edit"]):this.router.navigate(["/agentos",this.namespaceId(),"scheduled-prompts",e.id,"edit"]);break;case "toggle":e.enabled?this.disableRequested.emit(e):this.enableRequested.emit(e);break;case "delete":this.pendingDelete.set(true);break}}onDeleteConfirmed(){this.pendingDelete.set(false),this.deleteRequested.emit(this.definition());}onDeleteCancelled(){this.pendingDelete.set(false);}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Aw({type:n,selectors:[["agentos-scheduled-prompt-item"]],inputs:{definition:[1,"definition"],namespaceId:[1,"namespaceId"],platformMode:[1,"platformMode"],readOnly:[1,"readOnly"]},outputs:{enableRequested:"enableRequested",disableRequested:"disableRequested",deleteRequested:"deleteRequested"},decls:13,vars:11,consts:[["role","listitem",1,"scheduled-prompt-item"],[1,"scheduled-prompt-item__body"],[1,"scheduled-prompt-item__header"],[1,"scheduled-prompt-item__name"],[1,"scheduled-prompt-item__status"],[1,"scheduled-prompt-item__description"],[1,"scheduled-prompt-item__schedule"],[1,"scheduled-prompt-item__next-run"],[1,"scheduled-prompt-item__last-run"],[1,"scheduled-prompt-item__actions",3,"scheduled-prompt-item__actions--confirming"],[1,"scheduled-prompt-item__actions"],[3,"items"],[1,"scheduled-prompt-item__confirm-label"],["icon","check","variant","danger","title","Confirm deletion",3,"action"],["icon","close","title","Cancel deletion",3,"action"],[3,"itemSelected","items"]],template:function(e,i){e&1&&(vs(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),WC(4),fl(),vs(5,"span",4),WC(6),fl()(),eC(7,L,2,1,"span",5),vs(8,"span",6),WC(9),fl(),eC(10,q,2,1,"span",7),eC(11,U,2,1,"span",8),fl(),eC(12,V,3,3,"div",9),fl()),e&2&&(XE(4),Zg(i.definition().name),XE(),Hg("scheduled-prompt-item__status--enabled",i.definition().enabled)("scheduled-prompt-item__status--disabled",!i.definition().enabled),XE(),yl(" ",i.definition().enabled?"Enabled":"Disabled"," "),XE(),tC(i.definition().description?7:-1),XE(2),Zg(i.scheduleLabel),XE(),tC(i.nextRunLabel?10:-1),XE(),tC(i.lastRunLabel?11:-1),XE(),tC(i.readOnly()?-1:12));},dependencies:[Zn,Se],styles:[".scheduled-prompt-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;border-radius:10px;border:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--glass-bg, rgba(255, 255, 255, .72));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px));transition:background .15s ease,border-color .15s ease}.scheduled-prompt-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-color:var(--color-primary, #007aff)}.scheduled-prompt-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.scheduled-prompt-item__header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.scheduled-prompt-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.scheduled-prompt-item__status[_ngcontent-%COMP%]{font-size:.7rem;font-weight:600;padding:.15rem .5rem;border-radius:999px;white-space:nowrap;flex-shrink:0;text-transform:uppercase;letter-spacing:.04em}.scheduled-prompt-item__status--enabled[_ngcontent-%COMP%]{background:var(--color-success-bg, rgba(52, 199, 89, .12));color:var(--color-success, #34c759)}.scheduled-prompt-item__status--disabled[_ngcontent-%COMP%]{background:var(--color-warning-bg, rgba(255, 159, 10, .12));color:var(--color-warning, #ff9f0a)}.scheduled-prompt-item__description[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary, #6e6e73);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.scheduled-prompt-item__schedule[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary, #6e6e73);font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.scheduled-prompt-item__next-run[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.scheduled-prompt-item__last-run[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.scheduled-prompt-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.scheduled-prompt-item[_ngcontent-%COMP%]:hover .scheduled-prompt-item__actions[_ngcontent-%COMP%], .scheduled-prompt-item[_ngcontent-%COMP%]:focus-within .scheduled-prompt-item__actions[_ngcontent-%COMP%]{opacity:1}.scheduled-prompt-item__actions--confirming[_ngcontent-%COMP%]{opacity:1}.scheduled-prompt-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error, #ff3b30);margin-right:.25rem;white-space:nowrap}"]})};export{R};
1
+ import {g,G,ca as mB,cb as gB,H as Hi,d9 as fe,dj as Ce,A as Aw,v as vs,W as WC,k as fl,n as eC,X as XE,a8 as Zg,y as Hg,a5 as yl,t as tC,ac as mC,a9 as dC,l as Ag,r as Tg,aa as If,ab as wf}from'./main-YBERLDOH.js';import {Z as Zn,S as Se}from'./chunk-BoNA4fJz.js';function L(n,t){if(n&1&&(vs(0,"span",5),WC(1),fl()),n&2){let e=mC();XE(),Zg(e.definition().description);}}function q(n,t){if(n&1&&(vs(0,"span",7),WC(1),fl()),n&2){let e=mC();XE(),yl("Next: ",e.nextRunLabel);}}function U(n,t){if(n&1&&(vs(0,"span",8),WC(1),fl()),n&2){let e=mC();XE(),yl("Last run: ",e.lastRunLabel);}}function $(n,t){if(n&1){let e=dC();vs(0,"span",12),WC(1,"Delete?"),fl(),vs(2,"ds-icon-button",13),Ag("action",function(){If(e);let a=mC(2);return wf(a.onDeleteConfirmed())}),fl(),vs(3,"ds-icon-button",14),Ag("action",function(){If(e);let a=mC(2);return wf(a.onDeleteCancelled())}),fl();}}function N(n,t){if(n&1){let e=dC();vs(0,"ds-kebab-menu",15),Ag("itemSelected",function(a){If(e);let p=mC(2);return wf(p.onMenuAction(a))}),fl();}if(n&2){let e=mC(2);Tg("items",e.menuItems);}}function V(n,t){if(n&1&&(vs(0,"div",10),eC(1,$,4,0)(2,N,1,1,"ds-kebab-menu",11),fl()),n&2){let e=mC();Hg("scheduled-prompt-item__actions--confirming",e.pendingDelete()),XE(),tC(e.pendingDelete()?1:2);}}var R=class n{router=g(G);definition=mB.required();namespaceId=mB(void 0);platformMode=mB(false);readOnly=mB(false);enableRequested=gB();disableRequested=gB();deleteRequested=gB();pendingDelete=Hi(false);get scheduleLabel(){let{recurrence:t}=this.definition(),e=t.unit,i=t.timeUtc,a=e===fe.WEEK?"week":"month",p=e===fe.WEEK&&t.days?.length?` (${t.days.map(_=>Ce[_]??_).join(", ")})`:"";return `Every ${a}${p} at ${i} UTC`}formatInstant(t){if(!t)return null;let e=new Date(t),i=e.getUTCDate(),a=e.toLocaleString("en-GB",{month:"short",timeZone:"UTC"}),p=e.getUTCFullYear(),_=String(e.getUTCHours()).padStart(2,"0"),T=String(e.getUTCMinutes()).padStart(2,"0");return `${i} ${a} ${p} at ${_}:${T} UTC`}get nextRunLabel(){return this.formatInstant(this.definition().nextRunAt)}get lastRunLabel(){return this.formatInstant(this.definition().lastRunAt)}get menuItems(){let t=this.definition();return [{key:"edit",label:"Edit scheduled prompt",icon:"edit"},{key:"toggle",label:t.enabled?"Disable":"Enable",icon:t.enabled?"toggle_on":"toggle_off"},{key:"delete",label:"Delete scheduled prompt",icon:"delete",variant:"danger"}]}onMenuAction(t){let e=this.definition();switch(t){case "edit":this.platformMode()?this.router.navigate(["/agentos","admin","scheduled-prompts",e.id,"edit"]):this.router.navigate(["/agentos",this.namespaceId(),"scheduled-prompts",e.id,"edit"]);break;case "toggle":e.enabled?this.disableRequested.emit(e):this.enableRequested.emit(e);break;case "delete":this.pendingDelete.set(true);break}}onDeleteConfirmed(){this.pendingDelete.set(false),this.deleteRequested.emit(this.definition());}onDeleteCancelled(){this.pendingDelete.set(false);}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Aw({type:n,selectors:[["agentos-scheduled-prompt-item"]],inputs:{definition:[1,"definition"],namespaceId:[1,"namespaceId"],platformMode:[1,"platformMode"],readOnly:[1,"readOnly"]},outputs:{enableRequested:"enableRequested",disableRequested:"disableRequested",deleteRequested:"deleteRequested"},decls:13,vars:11,consts:[["role","listitem",1,"scheduled-prompt-item"],[1,"scheduled-prompt-item__body"],[1,"scheduled-prompt-item__header"],[1,"scheduled-prompt-item__name"],[1,"scheduled-prompt-item__status"],[1,"scheduled-prompt-item__description"],[1,"scheduled-prompt-item__schedule"],[1,"scheduled-prompt-item__next-run"],[1,"scheduled-prompt-item__last-run"],[1,"scheduled-prompt-item__actions",3,"scheduled-prompt-item__actions--confirming"],[1,"scheduled-prompt-item__actions"],[3,"items"],[1,"scheduled-prompt-item__confirm-label"],["icon","check","variant","danger","title","Confirm deletion",3,"action"],["icon","close","title","Cancel deletion",3,"action"],[3,"itemSelected","items"]],template:function(e,i){e&1&&(vs(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),WC(4),fl(),vs(5,"span",4),WC(6),fl()(),eC(7,L,2,1,"span",5),vs(8,"span",6),WC(9),fl(),eC(10,q,2,1,"span",7),eC(11,U,2,1,"span",8),fl(),eC(12,V,3,3,"div",9),fl()),e&2&&(XE(4),Zg(i.definition().name),XE(),Hg("scheduled-prompt-item__status--enabled",i.definition().enabled)("scheduled-prompt-item__status--disabled",!i.definition().enabled),XE(),yl(" ",i.definition().enabled?"Enabled":"Disabled"," "),XE(),tC(i.definition().description?7:-1),XE(2),Zg(i.scheduleLabel),XE(),tC(i.nextRunLabel?10:-1),XE(),tC(i.lastRunLabel?11:-1),XE(),tC(i.readOnly()?-1:12));},dependencies:[Zn,Se],styles:[".scheduled-prompt-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;border-radius:10px;border:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--glass-bg, rgba(255, 255, 255, .72));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px));transition:background .15s ease,border-color .15s ease}.scheduled-prompt-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-color:var(--color-primary, #007aff)}.scheduled-prompt-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.scheduled-prompt-item__header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.scheduled-prompt-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.scheduled-prompt-item__status[_ngcontent-%COMP%]{font-size:.7rem;font-weight:600;padding:.15rem .5rem;border-radius:999px;white-space:nowrap;flex-shrink:0;text-transform:uppercase;letter-spacing:.04em}.scheduled-prompt-item__status--enabled[_ngcontent-%COMP%]{background:var(--color-success-bg, rgba(52, 199, 89, .12));color:var(--color-success, #34c759)}.scheduled-prompt-item__status--disabled[_ngcontent-%COMP%]{background:var(--color-warning-bg, rgba(255, 159, 10, .12));color:var(--color-warning, #ff9f0a)}.scheduled-prompt-item__description[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary, #6e6e73);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.scheduled-prompt-item__schedule[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary, #6e6e73);font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.scheduled-prompt-item__next-run[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.scheduled-prompt-item__last-run[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.scheduled-prompt-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.scheduled-prompt-item[_ngcontent-%COMP%]:hover .scheduled-prompt-item__actions[_ngcontent-%COMP%], .scheduled-prompt-item[_ngcontent-%COMP%]:focus-within .scheduled-prompt-item__actions[_ngcontent-%COMP%]{opacity:1}.scheduled-prompt-item__actions--confirming[_ngcontent-%COMP%]{opacity:1}.scheduled-prompt-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error, #ff3b30);margin-right:.25rem;white-space:nowrap}"]})};export{R};
@@ -1,4 +1,4 @@
1
- import {s as se}from'./chunk-tYI69pxY.js';import {a as Dr,z as zi,F as Fn,H as Hi,h as ht,b as gr,_ as _r}from'./chunk-Dg1d1XBn.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-MB7Y2AR2.js';import {D}from'./chunk-jg8IIJti.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-8tkEJANN.js';import {a as Dr,z as zi,F as Fn,H as Hi,h as ht,b as gr,_ as _r}from'./chunk-BoNA4fJz.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-YBERLDOH.js';import {D}from'./chunk-B-VPDMd-.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;
@@ -31,5 +31,5 @@
31
31
  <style>:root{--color-bg:#f5f6f8;--color-bg-solid:#f5f6f8;--color-bg-secondary:rgba(255, 255, 255, .7);--color-bg-secondary-rgb:255 255 255;--color-text:#1d1d1f;--color-text-secondary:#6e6e73;--color-text-inverse:#ffffff;--color-text-tertiary:#a1a1a6;--color-primary:#007aff;--color-primary-hover:#0051d5;--color-accent:#8b5cf6;--color-link:#007aff;--color-border:rgba(0, 0, 0, .1);--color-border-light:rgba(40, 40, 40, .08);--color-input-bg:rgba(255, 255, 255, .8);--color-bg-hover:rgba(0, 0, 0, .04);--color-success:#34c759;--color-success-bg:#e3f5e1;--color-error:#ff3b30;--color-warning:#ff9500;--color-info:#5ac8fa;--color-message-user:rgba(0, 122, 255, .1);--color-message-ai:rgba(255, 255, 255, .8);--color-code-bg:rgba(142, 142, 147, .12);--color-code-text:#ff375f;--glass-bg:rgba(255, 255, 255, .72);--glass-border:rgba(255, 255, 255, .18);--glass-shadow:0 8px 32px 0 rgba(31, 38, 135, .15);--glass-backdrop-blur:blur(20px);--color-modal-bg:#ffffff;--color-surface:#ffffff;--color-modal-border:rgba(0, 0, 0, .12);--color-modal-shadow:0 8px 40px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .1);--color-shadow:rgba(0, 0, 0, .08);--color-overlay:rgba(0, 0, 0, .4);--color-surface-hover:var(--color-bg-hover);--color-surface-secondary:rgba(0, 0, 0, .03);--color-surface-muted:rgba(0, 0, 0, .05);--color-divider:rgba(0, 0, 0, .1)}@media print{html,body,app-root{height:auto!important;max-height:none!important;min-height:auto!important;overflow:visible!important;position:static!important}body{background:#fff!important;color:#000!important;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif!important;font-size:11pt;line-height:1.6;padding:1rem!important}*{animation:none!important;transition:none!important;box-shadow:none!important;text-shadow:none!important}}*{box-sizing:border-box}html{color-scheme:light}html{--mat-sys-background:light-dark(#faf9fd, #121316);--mat-sys-error:light-dark(#ba1a1a, #ffb4ab);--mat-sys-error-container:light-dark(#ffdad6, #93000a);--mat-sys-inverse-on-surface:light-dark(#f2f0f4, #2f3033);--mat-sys-inverse-primary:light-dark(#abc7ff, #005cbb);--mat-sys-inverse-surface:light-dark(#2f3033, #e3e2e6);--mat-sys-on-background:light-dark(#1a1b1f, #e3e2e6);--mat-sys-on-error:light-dark(#ffffff, #690005);--mat-sys-on-error-container:light-dark(#93000a, #ffdad6);--mat-sys-on-primary:light-dark(#ffffff, #002f65);--mat-sys-on-primary-container:light-dark(#00458f, #d7e3ff);--mat-sys-on-primary-fixed:light-dark(#001b3f, #001b3f);--mat-sys-on-primary-fixed-variant:light-dark(#00458f, #00458f);--mat-sys-on-secondary:light-dark(#ffffff, #283041);--mat-sys-on-secondary-container:light-dark(#3e4759, #dae2f9);--mat-sys-on-secondary-fixed:light-dark(#131c2b, #131c2b);--mat-sys-on-secondary-fixed-variant:light-dark(#3e4759, #3e4759);--mat-sys-on-surface:light-dark(#1a1b1f, #e3e2e6);--mat-sys-on-surface-variant:light-dark(#44474e, #e0e2ec);--mat-sys-on-tertiary:light-dark(#ffffff, #002f65);--mat-sys-on-tertiary-container:light-dark(#00458f, #d7e3ff);--mat-sys-on-tertiary-fixed:light-dark(#001b3f, #001b3f);--mat-sys-on-tertiary-fixed-variant:light-dark(#00458f, #00458f);--mat-sys-outline:light-dark(#74777f, #8e9099);--mat-sys-outline-variant:light-dark(#c4c6d0, #44474e);--mat-sys-primary:light-dark(#005cbb, #abc7ff);--mat-sys-primary-container:light-dark(#d7e3ff, #00458f);--mat-sys-primary-fixed:light-dark(#d7e3ff, #d7e3ff);--mat-sys-primary-fixed-dim:light-dark(#abc7ff, #abc7ff);--mat-sys-scrim:light-dark(#000000, #000000);--mat-sys-secondary:light-dark(#565e71, #bec6dc);--mat-sys-secondary-container:light-dark(#dae2f9, #3e4759);--mat-sys-secondary-fixed:light-dark(#dae2f9, #dae2f9);--mat-sys-secondary-fixed-dim:light-dark(#bec6dc, #bec6dc);--mat-sys-shadow:light-dark(#000000, #000000);--mat-sys-surface:light-dark(#faf9fd, #121316);--mat-sys-surface-bright:light-dark(#faf9fd, #38393c);--mat-sys-surface-container:light-dark(#efedf0, #1f2022);--mat-sys-surface-container-high:light-dark(#e9e7eb, #292a2c);--mat-sys-surface-container-highest:light-dark(#e3e2e6, #343537);--mat-sys-surface-container-low:light-dark(#f4f3f6, #1a1b1f);--mat-sys-surface-container-lowest:light-dark(#ffffff, #0d0e11);--mat-sys-surface-dim:light-dark(#dbd9dd, #121316);--mat-sys-surface-tint:light-dark(#005cbb, #abc7ff);--mat-sys-surface-variant:light-dark(#e0e2ec, #44474e);--mat-sys-tertiary:light-dark(#005cbb, #abc7ff);--mat-sys-tertiary-container:light-dark(#d7e3ff, #00458f);--mat-sys-tertiary-fixed:light-dark(#d7e3ff, #d7e3ff);--mat-sys-tertiary-fixed-dim:light-dark(#abc7ff, #abc7ff);--mat-sys-neutral-variant20:#2d3038;--mat-sys-neutral10:#1a1b1f;--mat-sys-level0:0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mat-sys-level1:0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mat-sys-level2:0px 3px 3px -2px rgba(0, 0, 0, .2), 0px 3px 4px 0px rgba(0, 0, 0, .14), 0px 1px 8px 0px rgba(0, 0, 0, .12);--mat-sys-level3:0px 3px 5px -1px rgba(0, 0, 0, .2), 0px 6px 10px 0px rgba(0, 0, 0, .14), 0px 1px 18px 0px rgba(0, 0, 0, .12);--mat-sys-level4:0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mat-sys-level5:0px 7px 8px -4px rgba(0, 0, 0, .2), 0px 12px 17px 2px rgba(0, 0, 0, .14), 0px 5px 22px 4px rgba(0, 0, 0, .12);--mat-sys-body-large:400 1rem / 1.5rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-large-line-height:1.5rem;--mat-sys-body-large-size:1rem;--mat-sys-body-large-tracking:.031rem;--mat-sys-body-large-weight:400;--mat-sys-body-medium:400 .875rem / 1.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-medium-line-height:1.25rem;--mat-sys-body-medium-size:.875rem;--mat-sys-body-medium-tracking:.016rem;--mat-sys-body-medium-weight:400;--mat-sys-body-small:400 .75rem / 1rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-small-line-height:1rem;--mat-sys-body-small-size:.75rem;--mat-sys-body-small-tracking:.025rem;--mat-sys-body-small-weight:400;--mat-sys-display-large:400 3.562rem / 4rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-large-line-height:4rem;--mat-sys-display-large-size:3.562rem;--mat-sys-display-large-tracking:-.016rem;--mat-sys-display-large-weight:400;--mat-sys-display-medium:400 2.812rem / 3.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-medium-line-height:3.25rem;--mat-sys-display-medium-size:2.812rem;--mat-sys-display-medium-tracking:0;--mat-sys-display-medium-weight:400;--mat-sys-display-small:400 2.25rem / 2.75rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-small-line-height:2.75rem;--mat-sys-display-small-size:2.25rem;--mat-sys-display-small-tracking:0;--mat-sys-display-small-weight:400;--mat-sys-headline-large:400 2rem / 2.5rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-large-line-height:2.5rem;--mat-sys-headline-large-size:2rem;--mat-sys-headline-large-tracking:0;--mat-sys-headline-large-weight:400;--mat-sys-headline-medium:400 1.75rem / 2.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-medium-line-height:2.25rem;--mat-sys-headline-medium-size:1.75rem;--mat-sys-headline-medium-tracking:0;--mat-sys-headline-medium-weight:400;--mat-sys-headline-small:400 1.5rem / 2rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-small-line-height:2rem;--mat-sys-headline-small-size:1.5rem;--mat-sys-headline-small-tracking:0;--mat-sys-headline-small-weight:400;--mat-sys-label-large:500 .875rem / 1.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-large-line-height:1.25rem;--mat-sys-label-large-size:.875rem;--mat-sys-label-large-tracking:.006rem;--mat-sys-label-large-weight:500;--mat-sys-label-large-weight-prominent:700;--mat-sys-label-medium:500 .75rem / 1rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-medium-line-height:1rem;--mat-sys-label-medium-size:.75rem;--mat-sys-label-medium-tracking:.031rem;--mat-sys-label-medium-weight:500;--mat-sys-label-medium-weight-prominent:700;--mat-sys-label-small:500 .688rem / 1rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-small-line-height:1rem;--mat-sys-label-small-size:.688rem;--mat-sys-label-small-tracking:.031rem;--mat-sys-label-small-weight:500;--mat-sys-title-large:400 1.375rem / 1.75rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-large-line-height:1.75rem;--mat-sys-title-large-size:1.375rem;--mat-sys-title-large-tracking:0;--mat-sys-title-large-weight:400;--mat-sys-title-medium:500 1rem / 1.5rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-medium-line-height:1.5rem;--mat-sys-title-medium-size:1rem;--mat-sys-title-medium-tracking:.009rem;--mat-sys-title-medium-weight:500;--mat-sys-title-small:500 .875rem / 1.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-small-line-height:1.25rem;--mat-sys-title-small-size:.875rem;--mat-sys-title-small-tracking:.006rem;--mat-sys-title-small-weight:500;--mat-sys-corner-extra-large:28px;--mat-sys-corner-extra-large-top:28px 28px 0 0;--mat-sys-corner-extra-small:4px;--mat-sys-corner-extra-small-top:4px 4px 0 0;--mat-sys-corner-full:9999px;--mat-sys-corner-large:16px;--mat-sys-corner-large-end:0 16px 16px 0;--mat-sys-corner-large-start:16px 0 0 16px;--mat-sys-corner-large-top:16px 16px 0 0;--mat-sys-corner-medium:12px;--mat-sys-corner-none:0;--mat-sys-corner-small:8px;--mat-sys-dragged-state-layer-opacity:.16;--mat-sys-focus-state-layer-opacity:.12;--mat-sys-hover-state-layer-opacity:.08;--mat-sys-pressed-state-layer-opacity:.12;--mat-snack-bar-container-shape:transparent;--mat-snack-bar-container-color:transparent;--mat-snack-bar-supporting-text-color:var(--color-text)}html,body{margin:0;padding:0;width:100%;height:100%}body{background:var(--color-bg);color:var(--color-text);font-family:-apple-system,BlinkMacSystemFont,SF Pro Display,Segoe UI,Helvetica Neue,Arial,sans-serif;transition:background .3s ease,color .3s ease;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;padding:0!important}</style><link rel="stylesheet" href="styles-HDA2O7OH.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-HDA2O7OH.css"></noscript></head>
32
32
  <body>
33
33
  <app-root></app-root>
34
- <script src="polyfills-2FSRUXKO.js" type="module"></script><script src="main-MB7Y2AR2.js" type="module"></script></body>
34
+ <script src="polyfills-2FSRUXKO.js" type="module"></script><script src="main-YBERLDOH.js" type="module"></script></body>
35
35
  </html>