@whoz-oss/coday-client 0.0.0-workstream-forge.42 → 0.0.0-workstream-forge.43

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 (76) hide show
  1. package/browser/{chunk-DBb3Ag_j.js → chunk-8_4J6QVe.js} +1 -1
  2. package/browser/{chunk-DukEe_MA.js → chunk-B072vQwV.js} +1 -1
  3. package/browser/{chunk-BrjztqQb.js → chunk-B8BlhnyO.js} +1 -1
  4. package/browser/{chunk-D0xwAD2K.js → chunk-B990P9Py.js} +1 -1
  5. package/browser/{chunk-koMyao3Z.js → chunk-BG1uCwUL.js} +1 -1
  6. package/browser/{chunk-DJXjdRPh.js → chunk-BGUzVqK4.js} +6 -6
  7. package/browser/{chunk-CfKWuoIc.js → chunk-BLuuMWjm.js} +1 -1
  8. package/browser/{chunk-DqJZQM0r.js → chunk-BN0krnx_.js} +1 -1
  9. package/browser/{chunk-DyFQbcVJ.js → chunk-BPMVQi2q.js} +1 -1
  10. package/browser/{chunk-38LtiFva.js → chunk-BTCEs3J0.js} +1 -1
  11. package/browser/{chunk-DU2o9ntY.js → chunk-BYXp-98T.js} +1 -1
  12. package/browser/chunk-BcGPLDCP.js +1 -0
  13. package/browser/{chunk-BSUaPQCr.js → chunk-BdO-nXjF.js} +1 -1
  14. package/browser/{chunk-BVk_Hco8.js → chunk-BklVYxUM.js} +1 -1
  15. package/browser/{chunk-BHSI862J.js → chunk-BktzBCjW.js} +1 -1
  16. package/browser/{chunk-9qm9RQOD.js → chunk-BwBnWvZ9.js} +1 -1
  17. package/browser/{chunk-CGkdT7eW.js → chunk-C1UQ_4kg.js} +1 -1
  18. package/browser/{chunk-ZbU7HYf7.js → chunk-C3svnH2b.js} +1 -1
  19. package/browser/{chunk-B3P0Vf1p.js → chunk-C7_JV7A3.js} +1 -1
  20. package/browser/{chunk-Dd3KF8CV.js → chunk-C8iOOOY_.js} +1 -1
  21. package/browser/{chunk-CVJmrjP2.js → chunk-CAp_lfVu.js} +1 -1
  22. package/browser/{chunk-D5hyy3r-.js → chunk-CBTf-tDI.js} +1 -1
  23. package/browser/{chunk-andOA0uj.js → chunk-CJJFWKWB.js} +1 -1
  24. package/browser/{chunk-Con4O9r6.js → chunk-CKSlMf7M.js} +1 -1
  25. package/browser/{chunk-CePL5Cmp.js → chunk-CMXltUaw.js} +1 -1
  26. package/browser/{chunk-CIXhZyqx.js → chunk-COBkzJ-u.js} +1 -1
  27. package/browser/{chunk-qQblT1e5.js → chunk-CSOsSJN-.js} +1 -1
  28. package/browser/{chunk-cTlkgzQo.js → chunk-CUlEJdpX.js} +1 -1
  29. package/browser/{chunk-CblP6BaO.js → chunk-CUzyYjnK.js} +1 -1
  30. package/browser/{chunk-CIyeWnXA.js → chunk-CXG84hn8.js} +1 -1
  31. package/browser/{chunk-DbsC_qpJ.js → chunk-C_9_JbQU.js} +1 -1
  32. package/browser/{chunk-CAwfc7Nb.js → chunk-CbHR06PD.js} +1 -1
  33. package/browser/{chunk-Dnr8Kipj.js → chunk-CbhL5SV0.js} +1 -1
  34. package/browser/{chunk-DkyZZxQ_.js → chunk-CkCBl_UG.js} +1 -1
  35. package/browser/{chunk-CVn3eofO.js → chunk-CmMtmghN.js} +1 -1
  36. package/browser/{chunk-ZWFTbkhU.js → chunk-CpcddH1i.js} +1 -1
  37. package/browser/{chunk-BmSrNOun.js → chunk-Ct_2S-sl.js} +1 -1
  38. package/browser/{chunk-DTJt_Xjh.js → chunk-CzaqG5Fn.js} +1 -1
  39. package/browser/{chunk-D--qGbNj.js → chunk-D225c7Xz.js} +1 -1
  40. package/browser/{chunk-BvilnhaB.js → chunk-D624sHdG.js} +1 -1
  41. package/browser/{chunk-BBspryf8.js → chunk-D9_OKAzm.js} +1 -1
  42. package/browser/{chunk-BzOXylUO.js → chunk-DB_diwHv.js} +1 -1
  43. package/browser/{chunk-BxU-GJRt.js → chunk-DFrltwI3.js} +1 -1
  44. package/browser/{chunk--ZywtK1d.js → chunk-DJLmqEKS.js} +1 -1
  45. package/browser/{chunk-BcFanoxR.js → chunk-DQQOdU1U.js} +1 -1
  46. package/browser/{chunk-DfZxSBN3.js → chunk-DSkXYm2v.js} +1 -1
  47. package/browser/chunk-DWwzYMmI.js +1 -0
  48. package/browser/{chunk-DRE3ggxe.js → chunk-DXdSoNy4.js} +1 -1
  49. package/browser/{chunk-DllmIt06.js → chunk-DZckwiLN.js} +1 -1
  50. package/browser/{chunk-CALT6VHI.js → chunk-D_thO_Ag.js} +1 -1
  51. package/browser/{chunk-C49qY6-B.js → chunk-DcA4SQ_F.js} +1 -1
  52. package/browser/{chunk-C_zlksLc.js → chunk-Dcygvta2.js} +1 -1
  53. package/browser/{chunk-BKEwZuP8.js → chunk-DefJ0uW7.js} +1 -1
  54. package/browser/{chunk-Bctflxyb.js → chunk-Df3PzhTd.js} +1 -1
  55. package/browser/{chunk-Cm9zNWro.js → chunk-Dhf4vG-g.js} +1 -1
  56. package/browser/{chunk-CrE69j-L.js → chunk-DnkM9dIF.js} +1 -1
  57. package/browser/{chunk-BdwmxRZu.js → chunk-DrDv-6ZR.js} +1 -1
  58. package/browser/{chunk-Cfx08VxZ.js → chunk-F1-hM7f7.js} +1 -1
  59. package/browser/{chunk-DCzPzIQ-.js → chunk-FZmiz4Qr.js} +1 -1
  60. package/browser/{chunk-p9YQAFQg.js → chunk-H98syF3F.js} +1 -1
  61. package/browser/{chunk-BCjSbGaN.js → chunk-O7U04KOq.js} +1 -1
  62. package/browser/{chunk-BIbGleEZ.js → chunk-QNhyHoOU.js} +1 -1
  63. package/browser/{chunk-C1Pz1jYD.js → chunk-QrsQAI6B.js} +1 -1
  64. package/browser/{chunk-Di0F1Yd9.js → chunk-RFA99Ed8.js} +1 -1
  65. package/browser/{chunk-DsQTsYuJ.js → chunk-WkmNSaSs.js} +1 -1
  66. package/browser/{chunk-DYm6CUj7.js → chunk-ZJzMI5VP.js} +1 -1
  67. package/browser/{chunk-Ds8sqex6.js → chunk-_06xvpMi.js} +1 -1
  68. package/browser/{chunk-BObeuGli.js → chunk-bOymKVwq.js} +1 -1
  69. package/browser/{chunk-_FqnC2pm.js → chunk-fUMUoKB6.js} +1 -1
  70. package/browser/{chunk-PTUNx8uH.js → chunk-yVRLS86p.js} +1 -1
  71. package/browser/{chunk-CMl1mwpi.js → chunk-zPzzH02F.js} +1 -1
  72. package/browser/index.html +1 -1
  73. package/browser/{main-JJWS7R6M.js → main-WPRRV3C7.js} +11 -11
  74. package/package.json +1 -1
  75. package/browser/chunk-CpPgZDDE.js +0 -1
  76. package/browser/chunk-DNMvgrBd.js +0 -1
@@ -1 +1 @@
1
- import {v}from'./chunk-DNMvgrBd.js';import {R}from'./chunk-CrE69j-L.js';import {N}from'./chunk-DU2o9ntY.js';import {g,ao as V,G,C as Ce,d8 as W,F,W as br,a as Gi,m as mT,cd as Hf,b as U,e as xw,k as ws,q as Rg,n as GC,o as pl,J as Jw,X as XE,a8 as Yg,y as eC,a9 as lC,t as rC,cH as Kw,a3 as VI,S as Sg,a4 as nC,ac as gC,v as bg,z as oC,a6 as UI,a5 as vl,aa as If,ab as wf}from'./main-JJWS7R6M.js';import'./chunk-DJXjdRPh.js';import {n as nt}from'./chunk-p9YQAFQg.js';import'./chunk-DsQTsYuJ.js';import {o as z,k as _t,b as _e,n as ni,J as Jn,Q as Qn,e as ei,Y as Ye,a as wt,A as At,m as mn,Z as Zn,l as Xn,C as Cn,E as En}from'./chunk-Bctflxyb.js';import'./chunk-CpPgZDDE.js';import'./chunk-C_zlksLc.js';function le(r,t){r&1&&(ws(0,"p",5),GC(1,"Loading\u2026"),pl());}function se(r,t){if(r&1&&(ws(0,"label",10),Sg(1,"input",29),VI(),ws(2,"span"),GC(3),pl()()),r&2){let e=t.$implicit,n=gC(2);XE(),bg("value",e.value)("formControl",n.scopeControl)("disabled",e.value==="namespace"&&!n.isAdmin()),UI(),XE(2),Yg(e.label);}}function ce(r,t){if(r&1&&(ws(0,"option",16),GC(1),pl()),r&2){let e=t.$implicit;bg("value",e.type),XE(),Yg(e.displayName);}}function me(r,t){if(r&1&&(ws(0,"option",16),GC(1),pl()),r&2){let e=t.$implicit;bg("value",e),XE(),Yg(e);}}function pe(r,t){if(r&1&&(ws(0,"div",11)(1,"label",30),Sg(2,"input",31),VI(),ws(3,"span",9),GC(4,"Grant automatically"),pl()(),ws(5,"p",32),GC(6),pl()()),r&2){let e=gC(2);XE(2),bg("formControl",e.autoGrantControl),UI(),XE(4),vl(" Give this integration to ",e.autoGrantReach(),", without each agent having to declare it. An agent can still opt out by mapping this configuration to an empty tool list. ");}}function de(r,t){if(r&1){let e=lC();ws(0,"div",24)(1,"ds-json-schema-form",33),Rg("valueChange",function(s){If(e);let m=gC(2);return wf(m.onParamsChange(s))}),pl()();}if(r&2){let e=gC(2);XE(),bg("schema",t)("value",e.initialParams());}}function ge(r,t){if(r&1){let e=lC();ws(0,"button",34),Rg("click",function(){If(e);let s=gC(2);return wf(s.exportYaml())}),GC(1),pl();}if(r&2){let e=gC(2);bg("disabled",e.isExporting()),XE(),vl(" ",e.isExporting()?"Exporting\u2026":"Export as YAML"," ");}}function ue(r,t){if(r&1){let e=lC();ws(0,"form",7),Rg("ngSubmit",function(){If(e);let s=gC();return wf(s.submit())}),ws(1,"fieldset",8)(2,"legend",9),GC(3,"Scope"),pl(),rC(4,se,4,4,"label",10,Kw().trackByScope,true),pl(),ws(6,"div",11)(7,"label",12),GC(8,"Type "),ws(9,"span",13),GC(10,"*"),pl()(),ws(11,"select",14)(12,"option",15),GC(13,"Select type"),pl(),rC(14,ce,2,2,"option",16,Kw().trackByType,true),pl(),VI(),pl(),ws(16,"div",11)(17,"label",17),GC(18,"Name "),ws(19,"span",13),GC(20,"*"),pl()(),Sg(21,"input",18),VI(),pl(),ws(22,"div",11)(23,"label",19),GC(24,"Description"),pl(),Sg(25,"textarea",20),VI(),pl(),ws(26,"div",11)(27,"label",21),GC(28,"Auth Setting"),pl(),ws(29,"select",22)(30,"option",23),GC(31,"None"),pl(),rC(32,me,2,2,"option",16,nC),pl(),VI(),pl(),Jw(34,pe,7,2,"div",11),Jw(35,de,2,2,"div",24),ws(36,"div",25)(37,"button",26),GC(38),pl(),Jw(39,ge,2,2,"button",27),ws(40,"button",28),Rg("click",function(){If(e);let s=gC();return wf(s.cancel())}),GC(41,"Cancel"),pl()()();}if(r&2){let e,n=gC();bg("formGroup",n.form),XE(),bg("disabled",n.isEditMode()),XE(3),oC(n.scopeOptions),XE(7),bg("formControl",n.typeControl),UI(),XE(3),oC(n.integrationTypes()),XE(7),bg("formControl",n.nameControl),UI(),XE(4),bg("formControl",n.descriptionControl),UI(),XE(4),bg("formControl",n.authSettingNameControl),UI(),XE(),bg("ngValue",null),XE(2),oC(n.availableAuthSettings()),XE(2),eC(n.isAutoGrantable()?34:-1),XE(),eC((e=n.schema())?35:-1,e),XE(2),bg("disabled",n.nameControl.invalid||n.typeControl.invalid||n.isSubmitting()),XE(),vl(" ",n.isEditMode()?"Save changes":"Create"," "),XE(),eC(n.isEditMode()?39:-1);}}var fe=new Set(["platform","namespace","userOnNs","userGlobal"]),T=Object.freeze({platform:"Configuration plateforme",namespace:"Configuration du namespace",userOnNs:"Pour moi sur ce namespace",userGlobal:"Pour moi globalement"}),re=class r{route=g(V);router=g(G);destroyRef=g(Ce);state=g(N);integrationTypeController=g(W);authSettingState=g(R);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;isAdmin=F(this.isPlatformMode?br(true):this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:this.isPlatformMode});form=new z({name:new _t("",{nonNullable:true,validators:[_e.required,_e.minLength(1)]}),description:new _t(null),type:new _t("",{nonNullable:true,validators:[_e.required]}),scope:new _t("namespace",{nonNullable:true}),autoGrant:new _t(false,{nonNullable:true})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get typeControl(){return this.form.controls.type}get scopeControl(){return this.form.controls.scope}get autoGrantControl(){return this.form.controls.autoGrant}isEditMode=Gi(false);isSubmitting=Gi(false);isLoading=Gi(false);isExporting=Gi(false);scopeOptions=[{value:"platform",label:T.platform},{value:"namespace",label:T.namespace},{value:"userOnNs",label:T.userOnNs},{value:"userGlobal",label:T.userGlobal}];authSettingNameControl=new _t(null);availableAuthSettings=Gi([]);paramsValue=Gi(null);initialParams=Gi(null);integrationTypes=F(this.integrationTypeController.listTypesIntegrationType(),{initialValue:[]});selectedType=F(this.form.controls.type.valueChanges,{initialValue:this.form.controls.type.value});scopeValue=F(this.form.controls.scope.valueChanges,{initialValue:this.form.controls.scope.value});schema=mT(()=>{let t=this.selectedType();return t?this.integrationTypes().find(n=>n.type===t)?.configSchema??null:null});isAutoGrantable=mT(()=>{let t=this.selectedType();return t?this.integrationTypes().find(e=>e.type===t)?.autoGrantable??false:false});autoGrantReach=mT(()=>{switch(this.scopeValue()){case "platform":return "every agent of this environment";case "namespace":return "every agent of this namespace";default:return "your own runs"}});existingConfig=null;constructor(){Hf(()=>{if(this.isAdmin()||this.isEditMode())return;["platform","namespace"].includes(this.scopeControl.value)&&this.scopeControl.setValue("userOnNs");});}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let t=this.route.snapshot.paramMap,e=this.route.snapshot.queryParamMap,n=t.get("integrationId");if(n){this.isEditMode.set(true),this.scopeControl.disable(),this.loadConfig(n);return}if(this.isPlatformMode){this.scopeControl.setValue("platform"),this.scopeControl.disable(),this.loadAuthSettingsForScope("platform");return}let s=this.parseScope(e.get("scope"));this.scopeControl.setValue(s),this.loadAuthSettingsForScope(s),this.scopeControl.valueChanges.pipe(U(this.destroyRef)).subscribe(ae=>{this.loadAuthSettingsForScope(ae);});let m=e.get("template");m&&this.hydrateFromTemplate(m);}parseScope(t){return t&&fe.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;let n=this.deriveScopeFromConfig(e);this.scopeControl.setValue(n),this.applyConfigToForm(e),this.loadAuthSettingsForScope(n),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),console.warn(`[IntegrationForm] Could not load config '${t}' \u2014 navigating back`),this.navigateBack();}});}hydrateFromTemplate(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.applyConfigToForm(e),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});},error:e=>{console.warn(`[IntegrationForm] 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){this.nameControl.setValue(t.name),this.descriptionControl.setValue(t.description??null),this.typeControl.setValue(t.integrationType),this.initialParams.set(t.parameters),this.paramsValue.set(t.parameters),this.authSettingNameControl.setValue(t.authSettingName??null),this.autoGrantControl.setValue(t.autoGrant??false);}loadAuthSettingsForScope(t){let e;switch(t){case "platform":e=this.authSettingState.loadPlatformSettings();break;case "namespace":e=this.authSettingState.loadNamespaceSettings(this.namespaceId);break;case "userOnNs":e=this.authSettingState.loadUserSettings(this.namespaceId);break;case "userGlobal":e=this.authSettingState.loadUserSettings("global");break}e.pipe(U(this.destroyRef)).subscribe({next:n=>{let s=n.map(m=>m.name).filter(Boolean);this.availableAuthSettings.set([...new Set(s)]);},error:()=>this.availableAuthSettings.set([])});}onParamsChange(t){this.paramsValue.set(t);}submit(){if(this.nameControl.invalid||this.typeControl.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(true);let t=this.descriptionControl.value?.trim(),e={name:this.nameControl.value.trim(),description:t||null,integrationType:this.typeControl.value,parameters:this.paramsValue(),authSettingName:this.authSettingNameControl.value||null,autoGrant:this.isAutoGrantable()&&this.autoGrantControl.value},n=this.form.getRawValue().scope;(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,e,n,this.existingConfig):this.state.create(e,n,this.namespaceId??null)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}exportYaml(){let t=this.existingConfig?.id;!t||this.isExporting()||(this.isExporting.set(true),this.state.exportAsYaml(t).pipe(U(this.destroyRef)).subscribe({next:e=>{let n=new Blob([e],{type:"application/yaml"}),s=URL.createObjectURL(n),m=document.createElement("a");m.href=s,m.download=`${this.existingConfig?.name??"integration"}.yaml`,m.click(),URL.revokeObjectURL(s),this.isExporting.set(false);},error:()=>this.isExporting.set(false)}));}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","integration-configs"]):this.router.navigate(["/agentos",this.namespaceId,"integrations"]);}trackByType(t,e){return e.type}trackByScope(t,e){return e.value}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=xw({type:r,selectors:[["agentos-integration-form"]],decls:10,vars:2,consts:[[1,"integration-form"],[1,"integration-form__header"],["type","button","title","Back to integrations",1,"integration-form__back",3,"click"],[1,"integration-form__back-icon"],[1,"integration-form__title"],[1,"integration-form__loading"],[1,"integration-form__form",3,"formGroup"],[1,"integration-form__form",3,"ngSubmit","formGroup"],[1,"integration-form__field","integration-form__scope",3,"disabled"],[1,"integration-form__label"],[1,"integration-form__scope-option"],[1,"integration-form__field"],["for","integration-type",1,"integration-form__label"],["aria-hidden","true"],["id","integration-type",1,"integration-form__select",3,"formControl"],["value","","disabled",""],[3,"value"],["for","integration-name",1,"integration-form__label"],["id","integration-name","type","text","placeholder","Integration name","autocomplete","off",1,"integration-form__input",3,"formControl"],["for","integration-description",1,"integration-form__label"],["id","integration-description","placeholder","Optional description","rows","3",1,"integration-form__textarea",3,"formControl"],["for","integration-auth-setting",1,"integration-form__label"],["id","integration-auth-setting",1,"integration-form__select",3,"formControl"],[3,"ngValue"],[1,"integration-form__schema-form"],[1,"integration-form__actions"],["type","submit",1,"integration-form__btn","integration-form__btn--primary",3,"disabled"],["type","button",1,"integration-form__btn","integration-form__btn--export",3,"disabled"],["type","button",1,"integration-form__btn",3,"click"],["type","radio",3,"value","formControl","disabled"],[1,"integration-form__checkbox-row"],["type","checkbox",3,"formControl"],[1,"integration-form__hint"],[3,"valueChange","schema","value"],["type","button",1,"integration-form__btn","integration-form__btn--export",3,"click","disabled"]],template:function(e,n){e&1&&(ws(0,"div",0)(1,"header",1)(2,"button",2),Rg("click",function(){return n.cancel()}),ws(3,"span",3),GC(4,"\u2190"),pl(),GC(5," Integrations "),pl(),ws(6,"h1",4),GC(7),pl()(),Jw(8,le,2,0,"p",5)(9,ue,42,12,"form",6),pl()),e&2&&(XE(7),Yg(n.isEditMode()?"Edit integration":"New integration"),XE(),eC(n.isLoading()?8:9));},dependencies:[ni,Jn,Qn,ei,Ye,wt,At,mn,Zn,Xn,Cn,En,nt],styles:[".integration-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.integration-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.integration-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)}.integration-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.integration-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.integration-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.integration-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.integration-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.integration-form__scope[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.4rem;border:1px solid var(--color-divider);border-radius:0;padding:.75rem 1rem;background:transparent;margin:0}.integration-form__scope[disabled][_ngcontent-%COMP%]{opacity:.6}.integration-form__scope-option[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;font-size:.875rem;color:var(--color-text);cursor:pointer}.integration-form__scope-option[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin:0}.integration-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.integration-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.integration-form__input[_ngcontent-%COMP%], .integration-form__textarea[_ngcontent-%COMP%], .integration-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}.integration-form__input[_ngcontent-%COMP%]:focus, .integration-form__textarea[_ngcontent-%COMP%]:focus, .integration-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.integration-form__input[_ngcontent-%COMP%]::placeholder, .integration-form__textarea[_ngcontent-%COMP%]::placeholder, .integration-form__select[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.integration-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:4.5rem;line-height:1.5}.integration-form__select[_ngcontent-%COMP%]{cursor:pointer}.integration-form__select[_ngcontent-%COMP%] option[disabled][_ngcontent-%COMP%]{color:var(--color-text-secondary)}.integration-form__checkbox-row[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;cursor:pointer}.integration-form__checkbox-row[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{margin:0}.integration-form__hint[_ngcontent-%COMP%]{margin:0;font-size:.8125rem;line-height:1.4;color:var(--color-text-secondary)}.integration-form__schema-form[_ngcontent-%COMP%]{padding:1rem;border-radius:0;border:1px solid var(--color-divider);background:var(--color-surface)}.integration-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.integration-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}.integration-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.integration-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.integration-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.integration-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}.integration-form__btn--export[_ngcontent-%COMP%]{border-color:var(--color-divider);color:var(--color-text-secondary)}.integration-form__btn--export[_ngcontent-%COMP%]:hover:not(:disabled){border-color:var(--color-accent);color:var(--color-accent)}"]})};export{re as IntegrationFormComponent};
1
+ import {v}from'./chunk-DWwzYMmI.js';import {R}from'./chunk-DnkM9dIF.js';import {N}from'./chunk-BYXp-98T.js';import {g,ao as V,G,C as Ce,d8 as W,F,W as br,a as Gi,m as mT,cd as Hf,b as U,e as xw,k as ws,q as Rg,n as GC,o as pl,J as Jw,X as XE,a8 as Yg,y as eC,a9 as lC,t as rC,cH as Kw,a3 as VI,S as Sg,a4 as nC,ac as gC,v as bg,z as oC,a6 as UI,a5 as vl,aa as If,ab as wf}from'./main-WPRRV3C7.js';import'./chunk-BGUzVqK4.js';import {n as nt}from'./chunk-H98syF3F.js';import'./chunk-WkmNSaSs.js';import {o as z,k as _t,b as _e,n as ni,J as Jn,Q as Qn,e as ei,Y as Ye,a as wt,A as At,m as mn,Z as Zn,l as Xn,C as Cn,E as En}from'./chunk-Df3PzhTd.js';import'./chunk-BcGPLDCP.js';import'./chunk-Dcygvta2.js';function le(r,t){r&1&&(ws(0,"p",5),GC(1,"Loading\u2026"),pl());}function se(r,t){if(r&1&&(ws(0,"label",10),Sg(1,"input",29),VI(),ws(2,"span"),GC(3),pl()()),r&2){let e=t.$implicit,n=gC(2);XE(),bg("value",e.value)("formControl",n.scopeControl)("disabled",e.value==="namespace"&&!n.isAdmin()),UI(),XE(2),Yg(e.label);}}function ce(r,t){if(r&1&&(ws(0,"option",16),GC(1),pl()),r&2){let e=t.$implicit;bg("value",e.type),XE(),Yg(e.displayName);}}function me(r,t){if(r&1&&(ws(0,"option",16),GC(1),pl()),r&2){let e=t.$implicit;bg("value",e),XE(),Yg(e);}}function pe(r,t){if(r&1&&(ws(0,"div",11)(1,"label",30),Sg(2,"input",31),VI(),ws(3,"span",9),GC(4,"Grant automatically"),pl()(),ws(5,"p",32),GC(6),pl()()),r&2){let e=gC(2);XE(2),bg("formControl",e.autoGrantControl),UI(),XE(4),vl(" Give this integration to ",e.autoGrantReach(),", without each agent having to declare it. An agent can still opt out by mapping this configuration to an empty tool list. ");}}function de(r,t){if(r&1){let e=lC();ws(0,"div",24)(1,"ds-json-schema-form",33),Rg("valueChange",function(s){If(e);let m=gC(2);return wf(m.onParamsChange(s))}),pl()();}if(r&2){let e=gC(2);XE(),bg("schema",t)("value",e.initialParams());}}function ge(r,t){if(r&1){let e=lC();ws(0,"button",34),Rg("click",function(){If(e);let s=gC(2);return wf(s.exportYaml())}),GC(1),pl();}if(r&2){let e=gC(2);bg("disabled",e.isExporting()),XE(),vl(" ",e.isExporting()?"Exporting\u2026":"Export as YAML"," ");}}function ue(r,t){if(r&1){let e=lC();ws(0,"form",7),Rg("ngSubmit",function(){If(e);let s=gC();return wf(s.submit())}),ws(1,"fieldset",8)(2,"legend",9),GC(3,"Scope"),pl(),rC(4,se,4,4,"label",10,Kw().trackByScope,true),pl(),ws(6,"div",11)(7,"label",12),GC(8,"Type "),ws(9,"span",13),GC(10,"*"),pl()(),ws(11,"select",14)(12,"option",15),GC(13,"Select type"),pl(),rC(14,ce,2,2,"option",16,Kw().trackByType,true),pl(),VI(),pl(),ws(16,"div",11)(17,"label",17),GC(18,"Name "),ws(19,"span",13),GC(20,"*"),pl()(),Sg(21,"input",18),VI(),pl(),ws(22,"div",11)(23,"label",19),GC(24,"Description"),pl(),Sg(25,"textarea",20),VI(),pl(),ws(26,"div",11)(27,"label",21),GC(28,"Auth Setting"),pl(),ws(29,"select",22)(30,"option",23),GC(31,"None"),pl(),rC(32,me,2,2,"option",16,nC),pl(),VI(),pl(),Jw(34,pe,7,2,"div",11),Jw(35,de,2,2,"div",24),ws(36,"div",25)(37,"button",26),GC(38),pl(),Jw(39,ge,2,2,"button",27),ws(40,"button",28),Rg("click",function(){If(e);let s=gC();return wf(s.cancel())}),GC(41,"Cancel"),pl()()();}if(r&2){let e,n=gC();bg("formGroup",n.form),XE(),bg("disabled",n.isEditMode()),XE(3),oC(n.scopeOptions),XE(7),bg("formControl",n.typeControl),UI(),XE(3),oC(n.integrationTypes()),XE(7),bg("formControl",n.nameControl),UI(),XE(4),bg("formControl",n.descriptionControl),UI(),XE(4),bg("formControl",n.authSettingNameControl),UI(),XE(),bg("ngValue",null),XE(2),oC(n.availableAuthSettings()),XE(2),eC(n.isAutoGrantable()?34:-1),XE(),eC((e=n.schema())?35:-1,e),XE(2),bg("disabled",n.nameControl.invalid||n.typeControl.invalid||n.isSubmitting()),XE(),vl(" ",n.isEditMode()?"Save changes":"Create"," "),XE(),eC(n.isEditMode()?39:-1);}}var fe=new Set(["platform","namespace","userOnNs","userGlobal"]),T=Object.freeze({platform:"Configuration plateforme",namespace:"Configuration du namespace",userOnNs:"Pour moi sur ce namespace",userGlobal:"Pour moi globalement"}),re=class r{route=g(V);router=g(G);destroyRef=g(Ce);state=g(N);integrationTypeController=g(W);authSettingState=g(R);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;isAdmin=F(this.isPlatformMode?br(true):this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:this.isPlatformMode});form=new z({name:new _t("",{nonNullable:true,validators:[_e.required,_e.minLength(1)]}),description:new _t(null),type:new _t("",{nonNullable:true,validators:[_e.required]}),scope:new _t("namespace",{nonNullable:true}),autoGrant:new _t(false,{nonNullable:true})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get typeControl(){return this.form.controls.type}get scopeControl(){return this.form.controls.scope}get autoGrantControl(){return this.form.controls.autoGrant}isEditMode=Gi(false);isSubmitting=Gi(false);isLoading=Gi(false);isExporting=Gi(false);scopeOptions=[{value:"platform",label:T.platform},{value:"namespace",label:T.namespace},{value:"userOnNs",label:T.userOnNs},{value:"userGlobal",label:T.userGlobal}];authSettingNameControl=new _t(null);availableAuthSettings=Gi([]);paramsValue=Gi(null);initialParams=Gi(null);integrationTypes=F(this.integrationTypeController.listTypesIntegrationType(),{initialValue:[]});selectedType=F(this.form.controls.type.valueChanges,{initialValue:this.form.controls.type.value});scopeValue=F(this.form.controls.scope.valueChanges,{initialValue:this.form.controls.scope.value});schema=mT(()=>{let t=this.selectedType();return t?this.integrationTypes().find(n=>n.type===t)?.configSchema??null:null});isAutoGrantable=mT(()=>{let t=this.selectedType();return t?this.integrationTypes().find(e=>e.type===t)?.autoGrantable??false:false});autoGrantReach=mT(()=>{switch(this.scopeValue()){case "platform":return "every agent of this environment";case "namespace":return "every agent of this namespace";default:return "your own runs"}});existingConfig=null;constructor(){Hf(()=>{if(this.isAdmin()||this.isEditMode())return;["platform","namespace"].includes(this.scopeControl.value)&&this.scopeControl.setValue("userOnNs");});}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let t=this.route.snapshot.paramMap,e=this.route.snapshot.queryParamMap,n=t.get("integrationId");if(n){this.isEditMode.set(true),this.scopeControl.disable(),this.loadConfig(n);return}if(this.isPlatformMode){this.scopeControl.setValue("platform"),this.scopeControl.disable(),this.loadAuthSettingsForScope("platform");return}let s=this.parseScope(e.get("scope"));this.scopeControl.setValue(s),this.loadAuthSettingsForScope(s),this.scopeControl.valueChanges.pipe(U(this.destroyRef)).subscribe(ae=>{this.loadAuthSettingsForScope(ae);});let m=e.get("template");m&&this.hydrateFromTemplate(m);}parseScope(t){return t&&fe.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;let n=this.deriveScopeFromConfig(e);this.scopeControl.setValue(n),this.applyConfigToForm(e),this.loadAuthSettingsForScope(n),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),console.warn(`[IntegrationForm] Could not load config '${t}' \u2014 navigating back`),this.navigateBack();}});}hydrateFromTemplate(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.applyConfigToForm(e),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});},error:e=>{console.warn(`[IntegrationForm] 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){this.nameControl.setValue(t.name),this.descriptionControl.setValue(t.description??null),this.typeControl.setValue(t.integrationType),this.initialParams.set(t.parameters),this.paramsValue.set(t.parameters),this.authSettingNameControl.setValue(t.authSettingName??null),this.autoGrantControl.setValue(t.autoGrant??false);}loadAuthSettingsForScope(t){let e;switch(t){case "platform":e=this.authSettingState.loadPlatformSettings();break;case "namespace":e=this.authSettingState.loadNamespaceSettings(this.namespaceId);break;case "userOnNs":e=this.authSettingState.loadUserSettings(this.namespaceId);break;case "userGlobal":e=this.authSettingState.loadUserSettings("global");break}e.pipe(U(this.destroyRef)).subscribe({next:n=>{let s=n.map(m=>m.name).filter(Boolean);this.availableAuthSettings.set([...new Set(s)]);},error:()=>this.availableAuthSettings.set([])});}onParamsChange(t){this.paramsValue.set(t);}submit(){if(this.nameControl.invalid||this.typeControl.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(true);let t=this.descriptionControl.value?.trim(),e={name:this.nameControl.value.trim(),description:t||null,integrationType:this.typeControl.value,parameters:this.paramsValue(),authSettingName:this.authSettingNameControl.value||null,autoGrant:this.isAutoGrantable()&&this.autoGrantControl.value},n=this.form.getRawValue().scope;(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,e,n,this.existingConfig):this.state.create(e,n,this.namespaceId??null)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}exportYaml(){let t=this.existingConfig?.id;!t||this.isExporting()||(this.isExporting.set(true),this.state.exportAsYaml(t).pipe(U(this.destroyRef)).subscribe({next:e=>{let n=new Blob([e],{type:"application/yaml"}),s=URL.createObjectURL(n),m=document.createElement("a");m.href=s,m.download=`${this.existingConfig?.name??"integration"}.yaml`,m.click(),URL.revokeObjectURL(s),this.isExporting.set(false);},error:()=>this.isExporting.set(false)}));}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","integration-configs"]):this.router.navigate(["/agentos",this.namespaceId,"integrations"]);}trackByType(t,e){return e.type}trackByScope(t,e){return e.value}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=xw({type:r,selectors:[["agentos-integration-form"]],decls:10,vars:2,consts:[[1,"integration-form"],[1,"integration-form__header"],["type","button","title","Back to integrations",1,"integration-form__back",3,"click"],[1,"integration-form__back-icon"],[1,"integration-form__title"],[1,"integration-form__loading"],[1,"integration-form__form",3,"formGroup"],[1,"integration-form__form",3,"ngSubmit","formGroup"],[1,"integration-form__field","integration-form__scope",3,"disabled"],[1,"integration-form__label"],[1,"integration-form__scope-option"],[1,"integration-form__field"],["for","integration-type",1,"integration-form__label"],["aria-hidden","true"],["id","integration-type",1,"integration-form__select",3,"formControl"],["value","","disabled",""],[3,"value"],["for","integration-name",1,"integration-form__label"],["id","integration-name","type","text","placeholder","Integration name","autocomplete","off",1,"integration-form__input",3,"formControl"],["for","integration-description",1,"integration-form__label"],["id","integration-description","placeholder","Optional description","rows","3",1,"integration-form__textarea",3,"formControl"],["for","integration-auth-setting",1,"integration-form__label"],["id","integration-auth-setting",1,"integration-form__select",3,"formControl"],[3,"ngValue"],[1,"integration-form__schema-form"],[1,"integration-form__actions"],["type","submit",1,"integration-form__btn","integration-form__btn--primary",3,"disabled"],["type","button",1,"integration-form__btn","integration-form__btn--export",3,"disabled"],["type","button",1,"integration-form__btn",3,"click"],["type","radio",3,"value","formControl","disabled"],[1,"integration-form__checkbox-row"],["type","checkbox",3,"formControl"],[1,"integration-form__hint"],[3,"valueChange","schema","value"],["type","button",1,"integration-form__btn","integration-form__btn--export",3,"click","disabled"]],template:function(e,n){e&1&&(ws(0,"div",0)(1,"header",1)(2,"button",2),Rg("click",function(){return n.cancel()}),ws(3,"span",3),GC(4,"\u2190"),pl(),GC(5," Integrations "),pl(),ws(6,"h1",4),GC(7),pl()(),Jw(8,le,2,0,"p",5)(9,ue,42,12,"form",6),pl()),e&2&&(XE(7),Yg(n.isEditMode()?"Edit integration":"New integration"),XE(),eC(n.isLoading()?8:9));},dependencies:[ni,Jn,Qn,ei,Ye,wt,At,mn,Zn,Xn,Cn,En,nt],styles:[".integration-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.integration-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.integration-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)}.integration-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.integration-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.integration-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.integration-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.integration-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.integration-form__scope[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.4rem;border:1px solid var(--color-divider);border-radius:0;padding:.75rem 1rem;background:transparent;margin:0}.integration-form__scope[disabled][_ngcontent-%COMP%]{opacity:.6}.integration-form__scope-option[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;font-size:.875rem;color:var(--color-text);cursor:pointer}.integration-form__scope-option[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin:0}.integration-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.integration-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.integration-form__input[_ngcontent-%COMP%], .integration-form__textarea[_ngcontent-%COMP%], .integration-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}.integration-form__input[_ngcontent-%COMP%]:focus, .integration-form__textarea[_ngcontent-%COMP%]:focus, .integration-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.integration-form__input[_ngcontent-%COMP%]::placeholder, .integration-form__textarea[_ngcontent-%COMP%]::placeholder, .integration-form__select[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.integration-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:4.5rem;line-height:1.5}.integration-form__select[_ngcontent-%COMP%]{cursor:pointer}.integration-form__select[_ngcontent-%COMP%] option[disabled][_ngcontent-%COMP%]{color:var(--color-text-secondary)}.integration-form__checkbox-row[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;cursor:pointer}.integration-form__checkbox-row[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{margin:0}.integration-form__hint[_ngcontent-%COMP%]{margin:0;font-size:.8125rem;line-height:1.4;color:var(--color-text-secondary)}.integration-form__schema-form[_ngcontent-%COMP%]{padding:1rem;border-radius:0;border:1px solid var(--color-divider);background:var(--color-surface)}.integration-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.integration-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}.integration-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.integration-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.integration-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.integration-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}.integration-form__btn--export[_ngcontent-%COMP%]{border-color:var(--color-divider);color:var(--color-text-secondary)}.integration-form__btn--export[_ngcontent-%COMP%]:hover:not(:disabled){border-color:var(--color-accent);color:var(--color-accent)}"]})};export{re as IntegrationFormComponent};
@@ -1 +1 @@
1
- import {S as S$1}from'./chunk-DBb3Ag_j.js';import {g,G,C as Ce,df as N,aJ as Tr,a as Gi,bS as va,r as re,b as U,e as xw,aK as xb,k as ws,bf as aT,q as Rg,o as pl,af as Eg,u as CC,v as bg,bg as uT,ah as rT,J as Jw,ac as gC,y as eC,a9 as lC,aa as If,ab as wf,ag as fT}from'./main-JJWS7R6M.js';import {$ as $n,S as Se}from'./chunk-p9YQAFQg.js';import'./chunk-DsQTsYuJ.js';import'./chunk-Bctflxyb.js';var S=()=>[];function V(r,e){if(r&1){let t=lC();ws(0,"agentos-ai-provider-item",4),Rg("editRequested",function(i){If(t);let p=gC(2);return wf(p.onEdit(i))})("deleteRequested",function(i){If(t);let p=gC(2);return wf(p.onDelete(i))}),pl();}r&2&&bg("config",e)("showBadge",false);}function F(r,e){if(r&1&&Jw(0,V,1,2,"agentos-ai-provider-item",3),r&2){let t,o=e.$implicit,i=gC();eC((t=i.resolveProvider(o.id))?0:-1,t);}}var E=class r{router=g(G);destroyRef=g(Ce);aiProviderController=g(N);refresh$=new Tr(void 0);isLoading=Gi(true);providers$=this.refresh$.pipe(va(()=>(this.isLoading.set(true),this.aiProviderController.listAiProvider("none"))));providerItems$=this.providers$.pipe(re(e=>e.map(t=>({id:t.id??"",name:t.name,description:t.apiType}))));providersById=new Map;constructor(){this.providers$.pipe(U(this.destroyRef)).subscribe({next:e=>{this.providersById=new Map(e.map(t=>[t.id??"",t])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","ai-providers","new"]);}onEdit(e){e.id&&this.router.navigate(["/agentos","admin","ai-providers",e.id,"edit"]);}onDelete(e){e.id&&this.aiProviderController.deleteAiProvider(e.id).pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolveProvider(e){return this.providersById.get(e)??null}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=xw({type:r,selectors:[["agentos-platform-ai-providers"]],decls:5,vars:7,consts:[["aiProviderItemTpl",""],["title","Platform AI Providers","emptyMessage","No platform AI providers defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],["scope","namespace",3,"config","showBadge"],["scope","namespace",3,"editRequested","deleteRequested","config","showBadge"]],template:function(t,o){if(t&1&&(ws(0,"ds-entity-list",1),aT(1,"async"),Rg("createRequested",function(){return o.openCreateForm()}),ws(2,"ds-icon-button",2),Rg("action",function(){return o.goBack()}),pl()(),Eg(3,F,1,1,"ng-template",null,0,fT)),t&2){let i=CC(4);bg("items",uT(1,4,o.providerItems$)??rT(6,S))("loading",o.isLoading())("showCreate",true)("itemTemplate",i);}},dependencies:[$n,S$1,Se,xb],styles:[".platform-ai-providers__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-providers__back[_ngcontent-%COMP%]:hover{color:var(--color-primary, #007aff)}"]})};export{E as PlatformAiProvidersComponent};
1
+ import {S as S$1}from'./chunk-8_4J6QVe.js';import {g,G,C as Ce,df as N,aJ as Tr,a as Gi,bS as va,r as re,b as U,e as xw,aK as xb,k as ws,bf as aT,q as Rg,o as pl,af as Eg,u as CC,v as bg,bg as uT,ah as rT,J as Jw,ac as gC,y as eC,a9 as lC,aa as If,ab as wf,ag as fT}from'./main-WPRRV3C7.js';import {$ as $n,S as Se}from'./chunk-H98syF3F.js';import'./chunk-WkmNSaSs.js';import'./chunk-Df3PzhTd.js';var S=()=>[];function V(r,e){if(r&1){let t=lC();ws(0,"agentos-ai-provider-item",4),Rg("editRequested",function(i){If(t);let p=gC(2);return wf(p.onEdit(i))})("deleteRequested",function(i){If(t);let p=gC(2);return wf(p.onDelete(i))}),pl();}r&2&&bg("config",e)("showBadge",false);}function F(r,e){if(r&1&&Jw(0,V,1,2,"agentos-ai-provider-item",3),r&2){let t,o=e.$implicit,i=gC();eC((t=i.resolveProvider(o.id))?0:-1,t);}}var E=class r{router=g(G);destroyRef=g(Ce);aiProviderController=g(N);refresh$=new Tr(void 0);isLoading=Gi(true);providers$=this.refresh$.pipe(va(()=>(this.isLoading.set(true),this.aiProviderController.listAiProvider("none"))));providerItems$=this.providers$.pipe(re(e=>e.map(t=>({id:t.id??"",name:t.name,description:t.apiType}))));providersById=new Map;constructor(){this.providers$.pipe(U(this.destroyRef)).subscribe({next:e=>{this.providersById=new Map(e.map(t=>[t.id??"",t])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","ai-providers","new"]);}onEdit(e){e.id&&this.router.navigate(["/agentos","admin","ai-providers",e.id,"edit"]);}onDelete(e){e.id&&this.aiProviderController.deleteAiProvider(e.id).pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolveProvider(e){return this.providersById.get(e)??null}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=xw({type:r,selectors:[["agentos-platform-ai-providers"]],decls:5,vars:7,consts:[["aiProviderItemTpl",""],["title","Platform AI Providers","emptyMessage","No platform AI providers defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],["scope","namespace",3,"config","showBadge"],["scope","namespace",3,"editRequested","deleteRequested","config","showBadge"]],template:function(t,o){if(t&1&&(ws(0,"ds-entity-list",1),aT(1,"async"),Rg("createRequested",function(){return o.openCreateForm()}),ws(2,"ds-icon-button",2),Rg("action",function(){return o.goBack()}),pl()(),Eg(3,F,1,1,"ng-template",null,0,fT)),t&2){let i=CC(4);bg("items",uT(1,4,o.providerItems$)??rT(6,S))("loading",o.isLoading())("showCreate",true)("itemTemplate",i);}},dependencies:[$n,S$1,Se,xb],styles:[".platform-ai-providers__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-providers__back[_ngcontent-%COMP%]:hover{color:var(--color-primary, #007aff)}"]})};export{E as PlatformAiProvidersComponent};
@@ -1 +1 @@
1
- import {K as Kn,Z as Zn,S as Se}from'./chunk-p9YQAFQg.js';import {cb as ZB,cc as qB,a as Gi,e as xw,k as ws,n as GC,o as pl,J as Jw,X as XE,a8 as Yg,a5 as vl,y as eC,a9 as lC,q as Rg,ac as gC,v as bg,aa as If,ab as wf}from'./main-JJWS7R6M.js';function A(o,a){if(o&1){let e=lC();ws(0,"span",7),GC(1,"Delete?"),pl(),ws(2,"ds-icon-button",8),Rg("action",function(){If(e);let l=gC();return wf(l.onDeleteConfirmed())}),pl(),ws(3,"ds-icon-button",9),Rg("action",function(){If(e);let l=gC();return wf(l.onDeleteCancelled())}),pl();}}function P(o,a){if(o&1){let e=lC();ws(0,"ds-kebab-menu",10),Rg("itemSelected",function(l){If(e);let O=gC();return wf(O.onMenuAction(l))}),pl();}if(o&2){let e=gC();bg("items",e.menuItems);}}var I=class o{model=ZB.required();namespaceId=ZB(void 0);readOnly=ZB(false);deleteRequested=qB();editRequested=qB();pendingDelete=Gi(false);menuItems=[{key:"edit",label:"Edit model",icon:"edit"},{key:"delete",label:"Delete model",icon:"delete",variant:"danger"}];get displayTitle(){return this.model().alias??this.model().apiModelName}onMenuAction(a){switch(a){case "edit":this.editRequested.emit(this.model());break;case "delete":this.pendingDelete.set(true);break}}onDeleteConfirmed(){this.pendingDelete.set(false),this.deleteRequested.emit(this.model());}onDeleteCancelled(){this.pendingDelete.set(false);}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=xw({type:o,selectors:[["agentos-ai-model-item"]],inputs:{model:[1,"model"],namespaceId:[1,"namespaceId"],readOnly:[1,"readOnly"]},outputs:{deleteRequested:"deleteRequested",editRequested:"editRequested"},decls:12,vars:4,consts:[["role","listitem","dsBlueprint","",1,"ai-model-item"],[1,"ai-model-item__body"],[1,"ai-model-item__name"],[1,"ai-model-item__api-name"],[1,"ai-model-item__params"],[1,"ai-model-item__actions"],[3,"items"],[1,"ai-model-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&&(ws(0,"div",0)(1,"div",1)(2,"span",2),GC(3),pl(),ws(4,"span",3),GC(5),pl(),ws(6,"span",4)(7,"span"),GC(8),pl()()(),ws(9,"div",5),Jw(10,A,4,0)(11,P,1,1,"ds-kebab-menu",6),pl()()),e&2&&(XE(3),Yg(i.displayTitle),XE(2),Yg(i.model().apiModelName),XE(3),vl("priority: ",i.model().priority),XE(2),eC(i.pendingDelete()?10:i.readOnly()?-1:11));},dependencies:[Kn,Zn,Se],styles:[".ai-model-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}.ai-model-item[_ngcontent-%COMP%]:hover{border-color:var(--color-accent)}.ai-model-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.ai-model-item__name[_ngcontent-%COMP%]{font-size:15px;font-weight:600;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-model-item__api-name[_ngcontent-%COMP%]{font-size:13px;color:var(--color-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-model-item__params[_ngcontent-%COMP%]{display:flex;gap:.75rem;font-size:13px;color:var(--color-text-secondary)}.ai-model-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.ai-model-item[_ngcontent-%COMP%]:hover .ai-model-item__actions[_ngcontent-%COMP%], .ai-model-item[_ngcontent-%COMP%]:focus-within .ai-model-item__actions[_ngcontent-%COMP%]{opacity:1}.ai-model-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{I};
1
+ import {K as Kn,Z as Zn,S as Se}from'./chunk-H98syF3F.js';import {cb as ZB,cc as qB,a as Gi,e as xw,k as ws,n as GC,o as pl,J as Jw,X as XE,a8 as Yg,a5 as vl,y as eC,a9 as lC,q as Rg,ac as gC,v as bg,aa as If,ab as wf}from'./main-WPRRV3C7.js';function A(o,a){if(o&1){let e=lC();ws(0,"span",7),GC(1,"Delete?"),pl(),ws(2,"ds-icon-button",8),Rg("action",function(){If(e);let l=gC();return wf(l.onDeleteConfirmed())}),pl(),ws(3,"ds-icon-button",9),Rg("action",function(){If(e);let l=gC();return wf(l.onDeleteCancelled())}),pl();}}function P(o,a){if(o&1){let e=lC();ws(0,"ds-kebab-menu",10),Rg("itemSelected",function(l){If(e);let O=gC();return wf(O.onMenuAction(l))}),pl();}if(o&2){let e=gC();bg("items",e.menuItems);}}var I=class o{model=ZB.required();namespaceId=ZB(void 0);readOnly=ZB(false);deleteRequested=qB();editRequested=qB();pendingDelete=Gi(false);menuItems=[{key:"edit",label:"Edit model",icon:"edit"},{key:"delete",label:"Delete model",icon:"delete",variant:"danger"}];get displayTitle(){return this.model().alias??this.model().apiModelName}onMenuAction(a){switch(a){case "edit":this.editRequested.emit(this.model());break;case "delete":this.pendingDelete.set(true);break}}onDeleteConfirmed(){this.pendingDelete.set(false),this.deleteRequested.emit(this.model());}onDeleteCancelled(){this.pendingDelete.set(false);}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=xw({type:o,selectors:[["agentos-ai-model-item"]],inputs:{model:[1,"model"],namespaceId:[1,"namespaceId"],readOnly:[1,"readOnly"]},outputs:{deleteRequested:"deleteRequested",editRequested:"editRequested"},decls:12,vars:4,consts:[["role","listitem","dsBlueprint","",1,"ai-model-item"],[1,"ai-model-item__body"],[1,"ai-model-item__name"],[1,"ai-model-item__api-name"],[1,"ai-model-item__params"],[1,"ai-model-item__actions"],[3,"items"],[1,"ai-model-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&&(ws(0,"div",0)(1,"div",1)(2,"span",2),GC(3),pl(),ws(4,"span",3),GC(5),pl(),ws(6,"span",4)(7,"span"),GC(8),pl()()(),ws(9,"div",5),Jw(10,A,4,0)(11,P,1,1,"ds-kebab-menu",6),pl()()),e&2&&(XE(3),Yg(i.displayTitle),XE(2),Yg(i.model().apiModelName),XE(3),vl("priority: ",i.model().priority),XE(2),eC(i.pendingDelete()?10:i.readOnly()?-1:11));},dependencies:[Kn,Zn,Se],styles:[".ai-model-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}.ai-model-item[_ngcontent-%COMP%]:hover{border-color:var(--color-accent)}.ai-model-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.ai-model-item__name[_ngcontent-%COMP%]{font-size:15px;font-weight:600;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-model-item__api-name[_ngcontent-%COMP%]{font-size:13px;color:var(--color-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-model-item__params[_ngcontent-%COMP%]{display:flex;gap:.75rem;font-size:13px;color:var(--color-text-secondary)}.ai-model-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.ai-model-item[_ngcontent-%COMP%]:hover .ai-model-item__actions[_ngcontent-%COMP%], .ai-model-item[_ngcontent-%COMP%]:focus-within .ai-model-item__actions[_ngcontent-%COMP%]{opacity:1}.ai-model-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{I};
@@ -1 +1 @@
1
- import {p}from'./chunk-DJXjdRPh.js';import {g,ao as V,H as py,d4 as y,e as xw,aw as hl,n as GC,ax as gl,X as XE,a8 as Yg}from'./main-JJWS7R6M.js';import'./chunk-C_zlksLc.js';import'./chunk-p9YQAFQg.js';import'./chunk-DsQTsYuJ.js';import'./chunk-Bctflxyb.js';var A=class r{route=g(V);http=g(py);config=g(y);message="Authentication in progress\u2026";ngOnInit(){let e=this.route.snapshot.queryParamMap.get("code"),t=this.route.snapshot.queryParamMap.get("state"),o=this.route.snapshot.queryParamMap.get("error"),i=this.route.snapshot.queryParamMap.get("error_description");if(o){console.warn("[AgentOS OAuth Callback] OAuth error:",o,i),this.notifyParentAndClose({success:false,error:i||o});return}if(!e){console.error("[AgentOS OAuth Callback] Missing authorization code"),this.message="OAuth callback error: missing authorization code.",this.notifyParentAndClose({success:false,error:"Missing authorization code"});return}this.http.post(`${this.config.basePath}/api/oauth/callback`,{code:e,state:t}).subscribe({next:()=>{console.log("[AgentOS OAuth Callback] Backend callback resolved"),this.notifyParentAndClose({success:true});},error:a=>{console.error("[AgentOS OAuth Callback] Backend callback failed:",a),this.notifyParentAndClose({success:false,error:a?.error?.message||a?.message||"Token exchange failed"});}});}notifyParentAndClose(e){if(this.message=e.success?"Authentication complete. You can close this window.":`Authentication failed: ${e.error??"unknown error"}. You can close this window.`,window.opener)try{window.opener.postMessage(e,window.location.origin);}catch(t){console.error("[AgentOS OAuth Callback] postMessage failed:",t),localStorage.setItem(p,JSON.stringify(e));}else console.warn("[AgentOS OAuth Callback] No window.opener \u2014 localStorage fallback"),localStorage.setItem(p,JSON.stringify(e));setTimeout(()=>window.close(),1e3);}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=xw({type:r,selectors:[["agentos-oauth-callback"]],decls:2,vars:1,consts:[[2,"font-family","sans-serif","padding","2rem","text-align","center"]],template:function(t,o){t&1&&(hl(0,"p",0),GC(1),gl()),t&2&&(XE(),Yg(o.message));},encapsulation:2,changeDetection:1})};export{A as OAuthCallbackComponent};
1
+ import {p}from'./chunk-BGUzVqK4.js';import {g,ao as V,H as py,d4 as y,e as xw,aw as hl,n as GC,ax as gl,X as XE,a8 as Yg}from'./main-WPRRV3C7.js';import'./chunk-Dcygvta2.js';import'./chunk-H98syF3F.js';import'./chunk-WkmNSaSs.js';import'./chunk-Df3PzhTd.js';var A=class r{route=g(V);http=g(py);config=g(y);message="Authentication in progress\u2026";ngOnInit(){let e=this.route.snapshot.queryParamMap.get("code"),t=this.route.snapshot.queryParamMap.get("state"),o=this.route.snapshot.queryParamMap.get("error"),i=this.route.snapshot.queryParamMap.get("error_description");if(o){console.warn("[AgentOS OAuth Callback] OAuth error:",o,i),this.notifyParentAndClose({success:false,error:i||o});return}if(!e){console.error("[AgentOS OAuth Callback] Missing authorization code"),this.message="OAuth callback error: missing authorization code.",this.notifyParentAndClose({success:false,error:"Missing authorization code"});return}this.http.post(`${this.config.basePath}/api/oauth/callback`,{code:e,state:t}).subscribe({next:()=>{console.log("[AgentOS OAuth Callback] Backend callback resolved"),this.notifyParentAndClose({success:true});},error:a=>{console.error("[AgentOS OAuth Callback] Backend callback failed:",a),this.notifyParentAndClose({success:false,error:a?.error?.message||a?.message||"Token exchange failed"});}});}notifyParentAndClose(e){if(this.message=e.success?"Authentication complete. You can close this window.":`Authentication failed: ${e.error??"unknown error"}. You can close this window.`,window.opener)try{window.opener.postMessage(e,window.location.origin);}catch(t){console.error("[AgentOS OAuth Callback] postMessage failed:",t),localStorage.setItem(p,JSON.stringify(e));}else console.warn("[AgentOS OAuth Callback] No window.opener \u2014 localStorage fallback"),localStorage.setItem(p,JSON.stringify(e));setTimeout(()=>window.close(),1e3);}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=xw({type:r,selectors:[["agentos-oauth-callback"]],decls:2,vars:1,consts:[[2,"font-family","sans-serif","padding","2rem","text-align","center"]],template:function(t,o){t&1&&(hl(0,"p",0),GC(1),gl()),t&2&&(XE(),Yg(o.message));},encapsulation:2,changeDetection:1})};export{A as OAuthCallbackComponent};
@@ -1,4 +1,4 @@
1
- import {W as We$1,Q as Qt}from'./chunk-DsQTsYuJ.js';import {_,b as _e,d as an,E as En}from'./chunk-Bctflxyb.js';import {aL as wo,aM as Zn,cq as Se,aO as wt$1,g,az as Xt,bs as Tl,bG as p,aT as Ut$1,aP as G,aW as C,cr as QB,m as mT,cs as XB,ct as vi,a as Gi,an as ue,aS as K,bt as Qn,cd as Hf,bR as Id,r as re,au as tv,ae as kt$1,ap as wd,bP as Wy,cu as tV,e as xw,ce as _b,bA as yC,af as Eg,ag as fT,k as ws,q as Rg,J as Jw,bB as vC,o as pl,X as XE,A as Ug,y as eC,b5 as nT,cv as jg,D as Pg,cw as wC,E as EC,I as IC,cx as Lg,bv as Fg,aZ as js,aR as Fs,cy as si,cz as to,aC as Tu,a_ as QT,c0 as xg,T as Tg,bF as J,b6 as _g,aw as hl,ax as gl,ac as gC,S as Sg,v as bg,u as CC,cA as Mn,aX as D,cB as on,cC as R,cD as Te,n as GC,a8 as Yg,aF as R$1,cE as Ad}from'./main-JJWS7R6M.js';var oe=class{_box;_destroyed=new ue;_resizeSubject=new ue;_resizeObserver;_elementObservables=new Map;constructor(l){this._box=l,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)));}observe(l){return this._elementObservables.has(l)||this._elementObservables.set(l,new R$1(e=>{let t=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(l,{box:this._box}),()=>{this._resizeObserver?.unobserve(l),t.unsubscribe(),this._elementObservables.delete(l);}}).pipe(kt$1(e=>e.some(t=>t.target===l)),Ad({bufferSize:1,refCount:true}),wd(this._destroyed))),this._elementObservables.get(l)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear();}},qe=(()=>{class i{_cleanupErrorListener;_observers=new Map;_ngZone=g(G);constructor(){}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),this._cleanupErrorListener?.();}observe(e,t){let n=t?.box||"content-box";return this._observers.has(n)||this._observers.set(n,new oe(n)),this._observers.get(n).observe(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Te({token:i,factory:i.\u0275fac})}return i})();var ut=["notch"],ht=["*"],Ue=["iconPrefixContainer"],We=["textPrefixContainer"],Ge=["iconSuffixContainer"],$e=["textSuffixContainer"],pt=["textField"],_t=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],bt=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function gt(i,l){i&1&&Sg(0,"span",21);}function vt(i,l){if(i&1&&(ws(0,"label",20),vC(1,1),Jw(2,gt,1,0,"span",21),pl()),i&2){let e=gC(2);bg("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),Tg("for",e._control.disableAutomaticLabeling?null:e._control.id),XE(2),eC(!e.hideRequiredMarker&&e._control.required?2:-1);}}function xt(i,l){if(i&1&&Jw(0,vt,3,5,"label",20),i&2){let e=gC();eC(e._hasFloatingLabel()?0:-1);}}function yt(i,l){i&1&&Sg(0,"div",7);}function Ft(i,l){}function Ct(i,l){if(i&1&&Eg(0,Ft,0,0,"ng-template",13),i&2){gC(2);let e=CC(1);bg("ngTemplateOutlet",e);}}function wt(i,l){if(i&1&&(ws(0,"div",9),Jw(1,Ct,1,1,null,13),pl()),i&2){let e=gC();bg("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),XE(),eC(e._forceDisplayInfixLabel()?-1:1);}}function Mt(i,l){i&1&&(ws(0,"div",10,2),vC(2,2),pl());}function Et(i,l){i&1&&(ws(0,"div",11,3),vC(2,3),pl());}function St(i,l){}function Tt(i,l){if(i&1&&Eg(0,St,0,0,"ng-template",13),i&2){gC();let e=CC(1);bg("ngTemplateOutlet",e);}}function Rt(i,l){i&1&&(ws(0,"div",14,4),vC(2,4),pl());}function Dt(i,l){i&1&&(ws(0,"div",15,5),vC(2,5),pl());}function Nt(i,l){i&1&&Sg(0,"div",16);}function At(i,l){i&1&&(ws(0,"div",18),vC(1,6),pl());}function It(i,l){if(i&1&&(ws(0,"mat-hint",22),GC(1),pl()),i&2){let e=gC(2);bg("id",e._hintLabelId),XE(),Yg(e.hintLabel);}}function Lt(i,l){if(i&1&&(ws(0,"div",19),Jw(1,It,2,2,"mat-hint",22),vC(2,7),Sg(3,"div",23),vC(4,8),pl()),i&2){let e=gC();XE(),eC(e.hintLabel?1:-1);}}var ae=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i,selectors:[["mat-label"]]})}return i})(),kt=new C("MatError");var le=(()=>{class i{align="start";id=g(Ut$1).getId("mat-mdc-hint-");static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(t,n){t&2&&(xg("id",n.id),Tg("align",null),Ug("mat-mdc-form-field-hint-end",n.align==="end"));},inputs:{align:"align",id:"id"}})}return i})(),et=new C("MatPrefix"),Ot=(()=>{class i{set _isTextSelector(e){this._isText=true;}_isText=false;static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:[0,"matTextPrefix","_isTextSelector"]},features:[nT([{provide:et,useExisting:i}])]})}return i})(),tt=new C("MatSuffix"),zt=(()=>{class i{set _isTextSelector(e){this._isText=true;}_isText=false;static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:[0,"matTextSuffix","_isTextSelector"]},features:[nT([{provide:tt,useExisting:i}])]})}return i})(),it=new C("FloatingLabelParent"),Ze=(()=>{class i{_elementRef=g(Xt);get floating(){return this._floating}set floating(e){this._floating=e,this.monitorResize&&this._handleResize();}_floating=false;get monitorResize(){return this._monitorResize}set monitorResize(e){this._monitorResize=e,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe();}_monitorResize=false;_resizeObserver=g(qe);_ngZone=g(G);_parent=g(it);_resizeSubscription=new J;ngOnDestroy(){this._resizeSubscription.unsubscribe();}getWidth(){return Pt(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized());}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize());});}static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(t,n){t&2&&Ug("mdc-floating-label--float-above",n.floating);},inputs:{floating:"floating",monitorResize:"monitorResize"}})}return i})();function Pt(i){let l=i;if(l.offsetParent!==null)return l.scrollWidth;let e=l.cloneNode(true);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let t=e.scrollWidth;return e.remove(),t}var Qe="mdc-line-ripple--active",Z="mdc-line-ripple--deactivating",Xe=(()=>{class i{_elementRef=g(Xt);_cleanupTransitionEnd;constructor(){let e=g(G),t=g(Fs);e.runOutsideAngular(()=>{this._cleanupTransitionEnd=t.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd);});}activate(){let e=this._elementRef.nativeElement.classList;e.remove(Z),e.add(Qe);}deactivate(){this._elementRef.nativeElement.classList.add(Z);}_handleTransitionEnd=e=>{let t=this._elementRef.nativeElement.classList,n=t.contains(Z);e.propertyName==="opacity"&&n&&t.remove(Qe,Z);};ngOnDestroy(){this._cleanupTransitionEnd();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]})}return i})(),Ye=(()=>{class i{_elementRef=g(Xt);_ngZone=g(G);open=false;_notch;ngAfterViewInit(){let e=this._elementRef.nativeElement,t=e.querySelector(".mdc-floating-label");t?(e.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(t.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>t.style.transitionDuration="");}))):e.classList.add("mdc-notched-outline--no-label");}_setNotchWidth(e){let t=this._notch.nativeElement;!this.open||!e?t.style.width="":t.style.width=`calc(${e}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`;}_setMaxWidth(e){this._notch.nativeElement.style.setProperty("--mat-form-field-notch-max-width",`calc(100% - ${e}px)`);}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=xw({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(t,n){if(t&1&&Pg(ut,5),t&2){let r;EC(r=IC())&&(n._notch=r.first);}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(t,n){t&2&&Ug("mdc-notched-outline--notched",n.open);},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},ngContentSelectors:ht,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(t,n){t&1&&(yC(),_g(0,"div",1),hl(1,"div",2,0),vC(3),gl(),_g(4,"div",3));},encapsulation:2})}return i})(),de=(()=>{class i{value=null;stateChanges;id;placeholder;ngControl=null;focused=false;empty=false;shouldLabelFloat=false;required=false;disabled=false;errorState=false;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling;describedByIds;static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i})}return i})();var se=new C("MatFormField"),Bt=new C("MAT_FORM_FIELD_DEFAULT_OPTIONS"),Ke="fill",Vt="auto",Je="fixed",Ht="translateY(-50%)",nt=(()=>{class i{_elementRef=g(Xt);_changeDetectorRef=g(Tl);_platform=g(p);_idGenerator=g(Ut$1);_ngZone=g(G);_defaults=g(Bt,{optional:true});_currentDirection;_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_iconPrefixContainerSignal=QB("iconPrefixContainer");_textPrefixContainerSignal=QB("textPrefixContainer");_iconSuffixContainerSignal=QB("iconSuffixContainer");_textSuffixContainerSignal=QB("textSuffixContainer");_prefixSuffixContainers=mT(()=>[this._iconPrefixContainerSignal(),this._textPrefixContainerSignal(),this._iconSuffixContainerSignal(),this._textSuffixContainerSignal()].map(e=>e?.nativeElement).filter(e=>e!==void 0));_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=XB(ae);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=vi(e);}_hideRequiredMarker=false;color="primary";get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||Vt}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck());}_floatLabel;get appearance(){return this._appearanceSignal()}set appearance(e){let t=e||this._defaults?.appearance||Ke;this._appearanceSignal.set(t);}_appearanceSignal=Gi(Ke);get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||Je}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||Je;}_subscriptSizing=null;get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints();}_hintLabel="";_hasIconPrefix=false;_hasTextPrefix=false;_hasIconSuffix=false;_hasTextSuffix=false;_labelId=this._idGenerator.getId("mat-mdc-form-field-label-");_hintLabelId=this._idGenerator.getId("mat-mdc-hint-");_describedByIds;get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(e){this._explicitFormFieldControl=e;}_destroyed=new ue;_isFocused=null;_explicitFormFieldControl;_previousControl=null;_previousControlValidatorFn=null;_stateChanges;_valueChanges;_describedByChanges;_outlineLabelOffsetResizeObserver=null;_animationsDisabled=K();constructor(){let e=this._defaults,t=g(Qn);e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color)),Hf(()=>this._currentDirection=t.valueSignal()),this._syncOutlineLabelOffset();}ngAfterViewInit(){this._updateFocusState(),this._animationsDisabled||this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-form-field-animations-enabled");},300);}),this._changeDetectorRef.detectChanges();}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeSubscript(),this._initializePrefixAndSuffix();}ngAfterContentChecked(){this._assertFormFieldControl(),this._control!==this._previousControl&&(this._initializeControl(this._previousControl),this._control.ngControl&&this._control.ngControl.control&&(this._previousControlValidatorFn=this._control.ngControl.control.validator),this._previousControl=this._control),this._control.ngControl&&this._control.ngControl.control&&this._control.ngControl.control.validator!==this._previousControlValidatorFn&&this._changeDetectorRef.markForCheck();}ngOnDestroy(){this._outlineLabelOffsetResizeObserver?.disconnect(),this._stateChanges?.unsubscribe(),this._valueChanges?.unsubscribe(),this._describedByChanges?.unsubscribe(),this._destroyed.next(),this._destroyed.complete();}getLabelId=mT(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always");}_initializeControl(e){let t=this._control,n="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(n+e.controlType),t.controlType&&this._elementRef.nativeElement.classList.add(n+t.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=t.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck();}),this._describedByChanges?.unsubscribe(),this._describedByChanges=t.stateChanges.pipe(Id([void 0,void 0]),re(()=>[t.errorState,t.userAriaDescribedBy]),tv(),kt$1(([[r,a],[s,C]])=>r!==s||a!==C)).subscribe(()=>this._syncDescribedByIds()),this._valueChanges?.unsubscribe(),t.ngControl&&t.ngControl.valueChanges&&(this._valueChanges=t.ngControl.valueChanges.pipe(wd(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()));}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(e=>!e._isText),this._hasTextPrefix=!!this._prefixChildren.find(e=>e._isText),this._hasIconSuffix=!!this._suffixChildren.find(e=>!e._isText),this._hasTextSuffix=!!this._suffixChildren.find(e=>e._isText);}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),Wy(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck();});}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck();}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck();}),this._validateHints(),this._syncDescribedByIds();}_assertFormFieldControl(){this._control;}_updateFocusState(){let e=this._control.focused;e&&!this._isFocused?(this._isFocused=true,this._lineRipple?.activate()):!e&&(this._isFocused||this._isFocused===null)&&(this._isFocused=false,this._lineRipple?.deactivate()),this._elementRef.nativeElement.classList.toggle("mat-focused",e),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",e);}_syncOutlineLabelOffset(){tV({earlyRead:()=>{if(this._appearanceSignal()!=="outline")return this._outlineLabelOffsetResizeObserver?.disconnect(),null;if(globalThis.ResizeObserver){this._outlineLabelOffsetResizeObserver||=new globalThis.ResizeObserver(()=>{this._writeOutlinedLabelStyles(this._getOutlinedLabelOffset());});for(let e of this._prefixSuffixContainers())this._outlineLabelOffsetResizeObserver.observe(e,{box:"border-box"});}return this._getOutlinedLabelOffset()},write:e=>this._writeOutlinedLabelStyles(e())});}_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return !this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel=mT(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():false}_shouldForward(e){let t=this._control?this._control.ngControl:null;return t&&t[e]}_getSubscriptMessageType(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth();}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth());}_processHints(){this._validateHints(),this._syncDescribedByIds();}_validateHints(){this._hintChildren;}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&e.push(...this._control.userAriaDescribedBy.split(" ")),this._getSubscriptMessageType()==="hint"){let r=this._hintChildren?this._hintChildren.find(s=>s.align==="start"):null,a=this._hintChildren?this._hintChildren.find(s=>s.align==="end"):null;r?e.push(r.id):this._hintLabel&&e.push(this._hintLabelId),a&&e.push(a.id);}else this._errorChildren&&e.push(...this._errorChildren.map(r=>r.id));let t=this._control.describedByIds,n;if(t){let r=this._describedByIds||e;n=e.concat(t.filter(a=>a&&!r.includes(a)));}else n=e;this._control.setDescribedByIds(n),this._describedByIds=e;}}_getOutlinedLabelOffset(){if(!this._hasOutline()||!this._floatingLabel)return null;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return ["",null];if(!this._isAttachedToDom())return null;let e=this._iconPrefixContainer?.nativeElement,t=this._textPrefixContainer?.nativeElement,n=this._iconSuffixContainer?.nativeElement,r=this._textSuffixContainer?.nativeElement,a=e?.getBoundingClientRect().width??0,s=t?.getBoundingClientRect().width??0,C=n?.getBoundingClientRect().width??0,M=r?.getBoundingClientRect().width??0,dt=this._currentDirection==="rtl"?"-1":"1",st=`${a+s}px`,ct=`calc(${dt} * (${st} + var(--mat-mdc-form-field-label-offset-x, 0px)))`,ft=`var(--mat-mdc-form-field-label-transform, ${Ht} translateX(${ct}))`,mt=a+s+C+M;return [ft,mt]}_writeOutlinedLabelStyles(e){if(e!==null){let[t,n]=e;this._floatingLabel&&(this._floatingLabel.element.style.transform=t),n!==null&&this._notchedOutline?._setMaxWidth(n);}}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let t=e.getRootNode();return t&&t!==e}return document.documentElement.contains(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=xw({type:i,selectors:[["mat-form-field"]],contentQueries:function(t,n,r){if(t&1&&(Lg(r,n._labelChild,ae,5),Fg(r,de,5)(r,et,5)(r,tt,5)(r,kt,5)(r,le,5)),t&2){wC();let a;EC(a=IC())&&(n._formFieldControl=a.first),EC(a=IC())&&(n._prefixChildren=a),EC(a=IC())&&(n._suffixChildren=a),EC(a=IC())&&(n._errorChildren=a),EC(a=IC())&&(n._hintChildren=a);}},viewQuery:function(t,n){if(t&1&&(jg(n._iconPrefixContainerSignal,Ue,5)(n._textPrefixContainerSignal,We,5)(n._iconSuffixContainerSignal,Ge,5)(n._textSuffixContainerSignal,$e,5),Pg(pt,5)(Ue,5)(We,5)(Ge,5)($e,5)(Ze,5)(Ye,5)(Xe,5)),t&2){wC(4);let r;EC(r=IC())&&(n._textField=r.first),EC(r=IC())&&(n._iconPrefixContainer=r.first),EC(r=IC())&&(n._textPrefixContainer=r.first),EC(r=IC())&&(n._iconSuffixContainer=r.first),EC(r=IC())&&(n._textSuffixContainer=r.first),EC(r=IC())&&(n._floatingLabel=r.first),EC(r=IC())&&(n._notchedOutline=r.first),EC(r=IC())&&(n._lineRipple=r.first);}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:38,hostBindings:function(t,n){t&2&&Ug("mat-mdc-form-field-label-always-float",n._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",n._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",n._hasIconSuffix)("mat-form-field-invalid",n._control.errorState)("mat-form-field-disabled",n._control.disabled)("mat-form-field-autofilled",n._control.autofilled)("mat-form-field-appearance-fill",n.appearance=="fill")("mat-form-field-appearance-outline",n.appearance=="outline")("mat-form-field-hide-placeholder",n._hasFloatingLabel()&&!n._shouldLabelFloat())("mat-primary",n.color!=="accent"&&n.color!=="warn")("mat-accent",n.color==="accent")("mat-warn",n.color==="warn")("ng-untouched",n._shouldForward("untouched"))("ng-touched",n._shouldForward("touched"))("ng-pristine",n._shouldForward("pristine"))("ng-dirty",n._shouldForward("dirty"))("ng-valid",n._shouldForward("valid"))("ng-invalid",n._shouldForward("invalid"))("ng-pending",n._shouldForward("pending"));},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[nT([{provide:se,useExisting:i},{provide:it,useExisting:i}])],ngContentSelectors:bt,decls:18,vars:21,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],["textSuffixContainer",""],["iconSuffixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],["aria-atomic","true","aria-live","polite",1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(t,n){if(t&1&&(yC(_t),Eg(0,xt,1,1,"ng-template",null,0,fT),ws(2,"div",6,1),Rg("click",function(a){return n._control.onContainerClick(a)}),Jw(4,yt,1,0,"div",7),ws(5,"div",8),Jw(6,wt,2,2,"div",9),Jw(7,Mt,3,0,"div",10),Jw(8,Et,3,0,"div",11),ws(9,"div",12),Jw(10,Tt,1,1,null,13),vC(11),pl(),Jw(12,Rt,3,0,"div",14),Jw(13,Dt,3,0,"div",15),pl(),Jw(14,Nt,1,0,"div",16),pl(),ws(15,"div",17),Jw(16,At,2,0,"div",18)(17,Lt,5,1,"div",19),pl()),t&2){let r;XE(2),Ug("mdc-text-field--filled",!n._hasOutline())("mdc-text-field--outlined",n._hasOutline())("mdc-text-field--no-label",!n._hasFloatingLabel())("mdc-text-field--disabled",n._control.disabled)("mdc-text-field--invalid",n._control.errorState),XE(2),eC(!n._hasOutline()&&!n._control.disabled?4:-1),XE(2),eC(n._hasOutline()?6:-1),XE(),eC(n._hasIconPrefix?7:-1),XE(),eC(n._hasTextPrefix?8:-1),XE(2),eC(!n._hasOutline()||n._forceDisplayInfixLabel()?10:-1),XE(2),eC(n._hasTextSuffix?12:-1),XE(),eC(n._hasIconSuffix?13:-1),XE(),eC(n._hasOutline()?-1:14),XE(),Ug("mat-mdc-form-field-subscript-dynamic-size",n.subscriptSizing==="dynamic");let a=n._getSubscriptMessageType();XE(),eC((r=a)==="error"?16:r==="hint"?17:-1);}},dependencies:[Ze,Ye,_b,Xe,le],styles:[`.mdc-text-field {
1
+ import {W as We$1,Q as Qt}from'./chunk-WkmNSaSs.js';import {_,b as _e,d as an,E as En}from'./chunk-Df3PzhTd.js';import {aL as wo,aM as Zn,cq as Se,aO as wt$1,g,az as Xt,bs as Tl,bG as p,aT as Ut$1,aP as G,aW as C,cr as QB,m as mT,cs as XB,ct as vi,a as Gi,an as ue,aS as K,bt as Qn,cd as Hf,bR as Id,r as re,au as tv,ae as kt$1,ap as wd,bP as Wy,cu as tV,e as xw,ce as _b,bA as yC,af as Eg,ag as fT,k as ws,q as Rg,J as Jw,bB as vC,o as pl,X as XE,A as Ug,y as eC,b5 as nT,cv as jg,D as Pg,cw as wC,E as EC,I as IC,cx as Lg,bv as Fg,aZ as js,aR as Fs,cy as si,cz as to,aC as Tu,a_ as QT,c0 as xg,T as Tg,bF as J,b6 as _g,aw as hl,ax as gl,ac as gC,S as Sg,v as bg,u as CC,cA as Mn,aX as D,cB as on,cC as R,cD as Te,n as GC,a8 as Yg,aF as R$1,cE as Ad}from'./main-WPRRV3C7.js';var oe=class{_box;_destroyed=new ue;_resizeSubject=new ue;_resizeObserver;_elementObservables=new Map;constructor(l){this._box=l,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)));}observe(l){return this._elementObservables.has(l)||this._elementObservables.set(l,new R$1(e=>{let t=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(l,{box:this._box}),()=>{this._resizeObserver?.unobserve(l),t.unsubscribe(),this._elementObservables.delete(l);}}).pipe(kt$1(e=>e.some(t=>t.target===l)),Ad({bufferSize:1,refCount:true}),wd(this._destroyed))),this._elementObservables.get(l)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear();}},qe=(()=>{class i{_cleanupErrorListener;_observers=new Map;_ngZone=g(G);constructor(){}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),this._cleanupErrorListener?.();}observe(e,t){let n=t?.box||"content-box";return this._observers.has(n)||this._observers.set(n,new oe(n)),this._observers.get(n).observe(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Te({token:i,factory:i.\u0275fac})}return i})();var ut=["notch"],ht=["*"],Ue=["iconPrefixContainer"],We=["textPrefixContainer"],Ge=["iconSuffixContainer"],$e=["textSuffixContainer"],pt=["textField"],_t=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],bt=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function gt(i,l){i&1&&Sg(0,"span",21);}function vt(i,l){if(i&1&&(ws(0,"label",20),vC(1,1),Jw(2,gt,1,0,"span",21),pl()),i&2){let e=gC(2);bg("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),Tg("for",e._control.disableAutomaticLabeling?null:e._control.id),XE(2),eC(!e.hideRequiredMarker&&e._control.required?2:-1);}}function xt(i,l){if(i&1&&Jw(0,vt,3,5,"label",20),i&2){let e=gC();eC(e._hasFloatingLabel()?0:-1);}}function yt(i,l){i&1&&Sg(0,"div",7);}function Ft(i,l){}function Ct(i,l){if(i&1&&Eg(0,Ft,0,0,"ng-template",13),i&2){gC(2);let e=CC(1);bg("ngTemplateOutlet",e);}}function wt(i,l){if(i&1&&(ws(0,"div",9),Jw(1,Ct,1,1,null,13),pl()),i&2){let e=gC();bg("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),XE(),eC(e._forceDisplayInfixLabel()?-1:1);}}function Mt(i,l){i&1&&(ws(0,"div",10,2),vC(2,2),pl());}function Et(i,l){i&1&&(ws(0,"div",11,3),vC(2,3),pl());}function St(i,l){}function Tt(i,l){if(i&1&&Eg(0,St,0,0,"ng-template",13),i&2){gC();let e=CC(1);bg("ngTemplateOutlet",e);}}function Rt(i,l){i&1&&(ws(0,"div",14,4),vC(2,4),pl());}function Dt(i,l){i&1&&(ws(0,"div",15,5),vC(2,5),pl());}function Nt(i,l){i&1&&Sg(0,"div",16);}function At(i,l){i&1&&(ws(0,"div",18),vC(1,6),pl());}function It(i,l){if(i&1&&(ws(0,"mat-hint",22),GC(1),pl()),i&2){let e=gC(2);bg("id",e._hintLabelId),XE(),Yg(e.hintLabel);}}function Lt(i,l){if(i&1&&(ws(0,"div",19),Jw(1,It,2,2,"mat-hint",22),vC(2,7),Sg(3,"div",23),vC(4,8),pl()),i&2){let e=gC();XE(),eC(e.hintLabel?1:-1);}}var ae=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i,selectors:[["mat-label"]]})}return i})(),kt=new C("MatError");var le=(()=>{class i{align="start";id=g(Ut$1).getId("mat-mdc-hint-");static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(t,n){t&2&&(xg("id",n.id),Tg("align",null),Ug("mat-mdc-form-field-hint-end",n.align==="end"));},inputs:{align:"align",id:"id"}})}return i})(),et=new C("MatPrefix"),Ot=(()=>{class i{set _isTextSelector(e){this._isText=true;}_isText=false;static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:[0,"matTextPrefix","_isTextSelector"]},features:[nT([{provide:et,useExisting:i}])]})}return i})(),tt=new C("MatSuffix"),zt=(()=>{class i{set _isTextSelector(e){this._isText=true;}_isText=false;static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:[0,"matTextSuffix","_isTextSelector"]},features:[nT([{provide:tt,useExisting:i}])]})}return i})(),it=new C("FloatingLabelParent"),Ze=(()=>{class i{_elementRef=g(Xt);get floating(){return this._floating}set floating(e){this._floating=e,this.monitorResize&&this._handleResize();}_floating=false;get monitorResize(){return this._monitorResize}set monitorResize(e){this._monitorResize=e,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe();}_monitorResize=false;_resizeObserver=g(qe);_ngZone=g(G);_parent=g(it);_resizeSubscription=new J;ngOnDestroy(){this._resizeSubscription.unsubscribe();}getWidth(){return Pt(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized());}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize());});}static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(t,n){t&2&&Ug("mdc-floating-label--float-above",n.floating);},inputs:{floating:"floating",monitorResize:"monitorResize"}})}return i})();function Pt(i){let l=i;if(l.offsetParent!==null)return l.scrollWidth;let e=l.cloneNode(true);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let t=e.scrollWidth;return e.remove(),t}var Qe="mdc-line-ripple--active",Z="mdc-line-ripple--deactivating",Xe=(()=>{class i{_elementRef=g(Xt);_cleanupTransitionEnd;constructor(){let e=g(G),t=g(Fs);e.runOutsideAngular(()=>{this._cleanupTransitionEnd=t.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd);});}activate(){let e=this._elementRef.nativeElement.classList;e.remove(Z),e.add(Qe);}deactivate(){this._elementRef.nativeElement.classList.add(Z);}_handleTransitionEnd=e=>{let t=this._elementRef.nativeElement.classList,n=t.contains(Z);e.propertyName==="opacity"&&n&&t.remove(Qe,Z);};ngOnDestroy(){this._cleanupTransitionEnd();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]})}return i})(),Ye=(()=>{class i{_elementRef=g(Xt);_ngZone=g(G);open=false;_notch;ngAfterViewInit(){let e=this._elementRef.nativeElement,t=e.querySelector(".mdc-floating-label");t?(e.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(t.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>t.style.transitionDuration="");}))):e.classList.add("mdc-notched-outline--no-label");}_setNotchWidth(e){let t=this._notch.nativeElement;!this.open||!e?t.style.width="":t.style.width=`calc(${e}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`;}_setMaxWidth(e){this._notch.nativeElement.style.setProperty("--mat-form-field-notch-max-width",`calc(100% - ${e}px)`);}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=xw({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(t,n){if(t&1&&Pg(ut,5),t&2){let r;EC(r=IC())&&(n._notch=r.first);}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(t,n){t&2&&Ug("mdc-notched-outline--notched",n.open);},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},ngContentSelectors:ht,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(t,n){t&1&&(yC(),_g(0,"div",1),hl(1,"div",2,0),vC(3),gl(),_g(4,"div",3));},encapsulation:2})}return i})(),de=(()=>{class i{value=null;stateChanges;id;placeholder;ngControl=null;focused=false;empty=false;shouldLabelFloat=false;required=false;disabled=false;errorState=false;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling;describedByIds;static \u0275fac=function(t){return new(t||i)};static \u0275dir=js({type:i})}return i})();var se=new C("MatFormField"),Bt=new C("MAT_FORM_FIELD_DEFAULT_OPTIONS"),Ke="fill",Vt="auto",Je="fixed",Ht="translateY(-50%)",nt=(()=>{class i{_elementRef=g(Xt);_changeDetectorRef=g(Tl);_platform=g(p);_idGenerator=g(Ut$1);_ngZone=g(G);_defaults=g(Bt,{optional:true});_currentDirection;_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_iconPrefixContainerSignal=QB("iconPrefixContainer");_textPrefixContainerSignal=QB("textPrefixContainer");_iconSuffixContainerSignal=QB("iconSuffixContainer");_textSuffixContainerSignal=QB("textSuffixContainer");_prefixSuffixContainers=mT(()=>[this._iconPrefixContainerSignal(),this._textPrefixContainerSignal(),this._iconSuffixContainerSignal(),this._textSuffixContainerSignal()].map(e=>e?.nativeElement).filter(e=>e!==void 0));_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=XB(ae);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=vi(e);}_hideRequiredMarker=false;color="primary";get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||Vt}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck());}_floatLabel;get appearance(){return this._appearanceSignal()}set appearance(e){let t=e||this._defaults?.appearance||Ke;this._appearanceSignal.set(t);}_appearanceSignal=Gi(Ke);get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||Je}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||Je;}_subscriptSizing=null;get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints();}_hintLabel="";_hasIconPrefix=false;_hasTextPrefix=false;_hasIconSuffix=false;_hasTextSuffix=false;_labelId=this._idGenerator.getId("mat-mdc-form-field-label-");_hintLabelId=this._idGenerator.getId("mat-mdc-hint-");_describedByIds;get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(e){this._explicitFormFieldControl=e;}_destroyed=new ue;_isFocused=null;_explicitFormFieldControl;_previousControl=null;_previousControlValidatorFn=null;_stateChanges;_valueChanges;_describedByChanges;_outlineLabelOffsetResizeObserver=null;_animationsDisabled=K();constructor(){let e=this._defaults,t=g(Qn);e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color)),Hf(()=>this._currentDirection=t.valueSignal()),this._syncOutlineLabelOffset();}ngAfterViewInit(){this._updateFocusState(),this._animationsDisabled||this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-form-field-animations-enabled");},300);}),this._changeDetectorRef.detectChanges();}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeSubscript(),this._initializePrefixAndSuffix();}ngAfterContentChecked(){this._assertFormFieldControl(),this._control!==this._previousControl&&(this._initializeControl(this._previousControl),this._control.ngControl&&this._control.ngControl.control&&(this._previousControlValidatorFn=this._control.ngControl.control.validator),this._previousControl=this._control),this._control.ngControl&&this._control.ngControl.control&&this._control.ngControl.control.validator!==this._previousControlValidatorFn&&this._changeDetectorRef.markForCheck();}ngOnDestroy(){this._outlineLabelOffsetResizeObserver?.disconnect(),this._stateChanges?.unsubscribe(),this._valueChanges?.unsubscribe(),this._describedByChanges?.unsubscribe(),this._destroyed.next(),this._destroyed.complete();}getLabelId=mT(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always");}_initializeControl(e){let t=this._control,n="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(n+e.controlType),t.controlType&&this._elementRef.nativeElement.classList.add(n+t.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=t.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck();}),this._describedByChanges?.unsubscribe(),this._describedByChanges=t.stateChanges.pipe(Id([void 0,void 0]),re(()=>[t.errorState,t.userAriaDescribedBy]),tv(),kt$1(([[r,a],[s,C]])=>r!==s||a!==C)).subscribe(()=>this._syncDescribedByIds()),this._valueChanges?.unsubscribe(),t.ngControl&&t.ngControl.valueChanges&&(this._valueChanges=t.ngControl.valueChanges.pipe(wd(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()));}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(e=>!e._isText),this._hasTextPrefix=!!this._prefixChildren.find(e=>e._isText),this._hasIconSuffix=!!this._suffixChildren.find(e=>!e._isText),this._hasTextSuffix=!!this._suffixChildren.find(e=>e._isText);}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),Wy(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck();});}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck();}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck();}),this._validateHints(),this._syncDescribedByIds();}_assertFormFieldControl(){this._control;}_updateFocusState(){let e=this._control.focused;e&&!this._isFocused?(this._isFocused=true,this._lineRipple?.activate()):!e&&(this._isFocused||this._isFocused===null)&&(this._isFocused=false,this._lineRipple?.deactivate()),this._elementRef.nativeElement.classList.toggle("mat-focused",e),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",e);}_syncOutlineLabelOffset(){tV({earlyRead:()=>{if(this._appearanceSignal()!=="outline")return this._outlineLabelOffsetResizeObserver?.disconnect(),null;if(globalThis.ResizeObserver){this._outlineLabelOffsetResizeObserver||=new globalThis.ResizeObserver(()=>{this._writeOutlinedLabelStyles(this._getOutlinedLabelOffset());});for(let e of this._prefixSuffixContainers())this._outlineLabelOffsetResizeObserver.observe(e,{box:"border-box"});}return this._getOutlinedLabelOffset()},write:e=>this._writeOutlinedLabelStyles(e())});}_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return !this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel=mT(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():false}_shouldForward(e){let t=this._control?this._control.ngControl:null;return t&&t[e]}_getSubscriptMessageType(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth();}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth());}_processHints(){this._validateHints(),this._syncDescribedByIds();}_validateHints(){this._hintChildren;}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&e.push(...this._control.userAriaDescribedBy.split(" ")),this._getSubscriptMessageType()==="hint"){let r=this._hintChildren?this._hintChildren.find(s=>s.align==="start"):null,a=this._hintChildren?this._hintChildren.find(s=>s.align==="end"):null;r?e.push(r.id):this._hintLabel&&e.push(this._hintLabelId),a&&e.push(a.id);}else this._errorChildren&&e.push(...this._errorChildren.map(r=>r.id));let t=this._control.describedByIds,n;if(t){let r=this._describedByIds||e;n=e.concat(t.filter(a=>a&&!r.includes(a)));}else n=e;this._control.setDescribedByIds(n),this._describedByIds=e;}}_getOutlinedLabelOffset(){if(!this._hasOutline()||!this._floatingLabel)return null;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return ["",null];if(!this._isAttachedToDom())return null;let e=this._iconPrefixContainer?.nativeElement,t=this._textPrefixContainer?.nativeElement,n=this._iconSuffixContainer?.nativeElement,r=this._textSuffixContainer?.nativeElement,a=e?.getBoundingClientRect().width??0,s=t?.getBoundingClientRect().width??0,C=n?.getBoundingClientRect().width??0,M=r?.getBoundingClientRect().width??0,dt=this._currentDirection==="rtl"?"-1":"1",st=`${a+s}px`,ct=`calc(${dt} * (${st} + var(--mat-mdc-form-field-label-offset-x, 0px)))`,ft=`var(--mat-mdc-form-field-label-transform, ${Ht} translateX(${ct}))`,mt=a+s+C+M;return [ft,mt]}_writeOutlinedLabelStyles(e){if(e!==null){let[t,n]=e;this._floatingLabel&&(this._floatingLabel.element.style.transform=t),n!==null&&this._notchedOutline?._setMaxWidth(n);}}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let t=e.getRootNode();return t&&t!==e}return document.documentElement.contains(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=xw({type:i,selectors:[["mat-form-field"]],contentQueries:function(t,n,r){if(t&1&&(Lg(r,n._labelChild,ae,5),Fg(r,de,5)(r,et,5)(r,tt,5)(r,kt,5)(r,le,5)),t&2){wC();let a;EC(a=IC())&&(n._formFieldControl=a.first),EC(a=IC())&&(n._prefixChildren=a),EC(a=IC())&&(n._suffixChildren=a),EC(a=IC())&&(n._errorChildren=a),EC(a=IC())&&(n._hintChildren=a);}},viewQuery:function(t,n){if(t&1&&(jg(n._iconPrefixContainerSignal,Ue,5)(n._textPrefixContainerSignal,We,5)(n._iconSuffixContainerSignal,Ge,5)(n._textSuffixContainerSignal,$e,5),Pg(pt,5)(Ue,5)(We,5)(Ge,5)($e,5)(Ze,5)(Ye,5)(Xe,5)),t&2){wC(4);let r;EC(r=IC())&&(n._textField=r.first),EC(r=IC())&&(n._iconPrefixContainer=r.first),EC(r=IC())&&(n._textPrefixContainer=r.first),EC(r=IC())&&(n._iconSuffixContainer=r.first),EC(r=IC())&&(n._textSuffixContainer=r.first),EC(r=IC())&&(n._floatingLabel=r.first),EC(r=IC())&&(n._notchedOutline=r.first),EC(r=IC())&&(n._lineRipple=r.first);}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:38,hostBindings:function(t,n){t&2&&Ug("mat-mdc-form-field-label-always-float",n._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",n._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",n._hasIconSuffix)("mat-form-field-invalid",n._control.errorState)("mat-form-field-disabled",n._control.disabled)("mat-form-field-autofilled",n._control.autofilled)("mat-form-field-appearance-fill",n.appearance=="fill")("mat-form-field-appearance-outline",n.appearance=="outline")("mat-form-field-hide-placeholder",n._hasFloatingLabel()&&!n._shouldLabelFloat())("mat-primary",n.color!=="accent"&&n.color!=="warn")("mat-accent",n.color==="accent")("mat-warn",n.color==="warn")("ng-untouched",n._shouldForward("untouched"))("ng-touched",n._shouldForward("touched"))("ng-pristine",n._shouldForward("pristine"))("ng-dirty",n._shouldForward("dirty"))("ng-valid",n._shouldForward("valid"))("ng-invalid",n._shouldForward("invalid"))("ng-pending",n._shouldForward("pending"));},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[nT([{provide:se,useExisting:i},{provide:it,useExisting:i}])],ngContentSelectors:bt,decls:18,vars:21,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],["textSuffixContainer",""],["iconSuffixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],["aria-atomic","true","aria-live","polite",1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(t,n){if(t&1&&(yC(_t),Eg(0,xt,1,1,"ng-template",null,0,fT),ws(2,"div",6,1),Rg("click",function(a){return n._control.onContainerClick(a)}),Jw(4,yt,1,0,"div",7),ws(5,"div",8),Jw(6,wt,2,2,"div",9),Jw(7,Mt,3,0,"div",10),Jw(8,Et,3,0,"div",11),ws(9,"div",12),Jw(10,Tt,1,1,null,13),vC(11),pl(),Jw(12,Rt,3,0,"div",14),Jw(13,Dt,3,0,"div",15),pl(),Jw(14,Nt,1,0,"div",16),pl(),ws(15,"div",17),Jw(16,At,2,0,"div",18)(17,Lt,5,1,"div",19),pl()),t&2){let r;XE(2),Ug("mdc-text-field--filled",!n._hasOutline())("mdc-text-field--outlined",n._hasOutline())("mdc-text-field--no-label",!n._hasFloatingLabel())("mdc-text-field--disabled",n._control.disabled)("mdc-text-field--invalid",n._control.errorState),XE(2),eC(!n._hasOutline()&&!n._control.disabled?4:-1),XE(2),eC(n._hasOutline()?6:-1),XE(),eC(n._hasIconPrefix?7:-1),XE(),eC(n._hasTextPrefix?8:-1),XE(2),eC(!n._hasOutline()||n._forceDisplayInfixLabel()?10:-1),XE(2),eC(n._hasTextSuffix?12:-1),XE(),eC(n._hasIconSuffix?13:-1),XE(),eC(n._hasOutline()?-1:14),XE(),Ug("mat-mdc-form-field-subscript-dynamic-size",n.subscriptSizing==="dynamic");let a=n._getSubscriptMessageType();XE(),eC((r=a)==="error"?16:r==="hint"?17:-1);}},dependencies:[Ze,Ye,_b,Xe,le],styles:[`.mdc-text-field {
2
2
  display: inline-flex;
3
3
  align-items: baseline;
4
4
  padding: 0 16px;
@@ -1 +1 @@
1
- import {g,H as py,P,W as br,r as re,Y as x}from'./main-JJWS7R6M.js';var d=class i{http=g(py);projectState=g(P);promptsCache=new Map;getBaseUrl(){return `/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/prompts`}listPrompts(){return this.http.get(this.getBaseUrl())}getPromptsAutocomplete(t,e){let r=this.promptsCache.get(t);return r?br(this.filterPromptsForAutocomplete(r,e)):this.http.get(`/api/projects/${t}/prompts`).pipe(re(p=>(this.promptsCache.set(t,p),this.filterPromptsForAutocomplete(p,e))))}filterPromptsForAutocomplete(t,e){let r=e.toLowerCase();return t.filter(o=>o.name.toLowerCase().includes(r)||o.description.toLowerCase().includes(r)).map(o=>({name:o.name,description:o.description,parameterFormat:o.parameterFormat}))}clearCache(t){t?this.promptsCache.delete(t):this.promptsCache.clear();}getPrompt(t){return this.http.get(`${this.getBaseUrl()}/${t}`)}createPrompt(t){return this.http.post(this.getBaseUrl(),t).pipe(re(e=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),e)))}updatePrompt(t,e){return this.http.put(`${this.getBaseUrl()}/${t}`,e).pipe(re(r=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),r)))}deletePrompt(t){return this.http.delete(`${this.getBaseUrl()}/${t}`).pipe(re(e=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),e)))}enableWebhook(t){return this.http.post(`${this.getBaseUrl()}/${t}/webhook`,{})}disableWebhook(t){return this.http.delete(`${this.getBaseUrl()}/${t}/webhook`)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=x({token:i,factory:i.\u0275fac,providedIn:"root"})};export{d};
1
+ import {g,H as py,P,W as br,r as re,Y as x}from'./main-WPRRV3C7.js';var d=class i{http=g(py);projectState=g(P);promptsCache=new Map;getBaseUrl(){return `/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/prompts`}listPrompts(){return this.http.get(this.getBaseUrl())}getPromptsAutocomplete(t,e){let r=this.promptsCache.get(t);return r?br(this.filterPromptsForAutocomplete(r,e)):this.http.get(`/api/projects/${t}/prompts`).pipe(re(p=>(this.promptsCache.set(t,p),this.filterPromptsForAutocomplete(p,e))))}filterPromptsForAutocomplete(t,e){let r=e.toLowerCase();return t.filter(o=>o.name.toLowerCase().includes(r)||o.description.toLowerCase().includes(r)).map(o=>({name:o.name,description:o.description,parameterFormat:o.parameterFormat}))}clearCache(t){t?this.promptsCache.delete(t):this.promptsCache.clear();}getPrompt(t){return this.http.get(`${this.getBaseUrl()}/${t}`)}createPrompt(t){return this.http.post(this.getBaseUrl(),t).pipe(re(e=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),e)))}updatePrompt(t,e){return this.http.put(`${this.getBaseUrl()}/${t}`,e).pipe(re(r=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),r)))}deletePrompt(t){return this.http.delete(`${this.getBaseUrl()}/${t}`).pipe(re(e=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),e)))}enableWebhook(t){return this.http.post(`${this.getBaseUrl()}/${t}/webhook`,{})}disableWebhook(t){return this.http.delete(`${this.getBaseUrl()}/${t}/webhook`)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=x({token:i,factory:i.\u0275fac,providedIn:"root"})};export{d};
@@ -1 +1 @@
1
- import {R}from'./chunk-BObeuGli.js';import {c}from'./chunk-BcFanoxR.js';import {g,G,C as Ce,a as Gi,m as mT,b as U,e as xw,k as ws,q as Rg,o as pl,af as Eg,u as CC,v as bg,J as Jw,ac as gC,y as eC,a9 as lC,aa as If,ab as wf,ag as fT}from'./main-JJWS7R6M.js';import {$ as $n,S as Se}from'./chunk-p9YQAFQg.js';import'./chunk-DsQTsYuJ.js';import'./chunk-Bctflxyb.js';function M(i,e){if(i&1){let t=lC();ws(0,"agentos-scheduled-prompt-item",4),Rg("enableRequested",function(n){If(t);let r=gC(2);return wf(r.enablePrompt(n))})("disableRequested",function(n){If(t);let r=gC(2);return wf(r.disablePrompt(n))})("deleteRequested",function(n){If(t);let r=gC(2);return wf(r.deletePrompt(n))}),pl();}i&2&&bg("definition",e)("platformMode",true);}function L(i,e){if(i&1&&Jw(0,M,1,2,"agentos-scheduled-prompt-item",3),i&2){let t,o=e.$implicit,n=gC();eC((t=n.resolvePrompt(o.id))?0:-1,t);}}var D=class i{router=g(G);destroyRef=g(Ce);state=g(c);prompts=Gi([]);isLoading=Gi(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=xw({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&&(ws(0,"ds-entity-list",1),Rg("createRequested",function(){return o.openCreateForm()}),ws(1,"ds-icon-button",2),Rg("action",function(){return o.goBack()}),pl()(),Eg(2,L,1,1,"ng-template",null,0,fT)),t&2){let n=CC(3);bg("items",o.promptItems())("loading",o.isLoading())("showCreate",true)("itemTemplate",n);}},dependencies:[$n,R,Se],encapsulation:2})};export{D as PlatformScheduledPromptsComponent};
1
+ import {R}from'./chunk-bOymKVwq.js';import {c}from'./chunk-DQQOdU1U.js';import {g,G,C as Ce,a as Gi,m as mT,b as U,e as xw,k as ws,q as Rg,o as pl,af as Eg,u as CC,v as bg,J as Jw,ac as gC,y as eC,a9 as lC,aa as If,ab as wf,ag as fT}from'./main-WPRRV3C7.js';import {$ as $n,S as Se}from'./chunk-H98syF3F.js';import'./chunk-WkmNSaSs.js';import'./chunk-Df3PzhTd.js';function M(i,e){if(i&1){let t=lC();ws(0,"agentos-scheduled-prompt-item",4),Rg("enableRequested",function(n){If(t);let r=gC(2);return wf(r.enablePrompt(n))})("disableRequested",function(n){If(t);let r=gC(2);return wf(r.disablePrompt(n))})("deleteRequested",function(n){If(t);let r=gC(2);return wf(r.deletePrompt(n))}),pl();}i&2&&bg("definition",e)("platformMode",true);}function L(i,e){if(i&1&&Jw(0,M,1,2,"agentos-scheduled-prompt-item",3),i&2){let t,o=e.$implicit,n=gC();eC((t=n.resolvePrompt(o.id))?0:-1,t);}}var D=class i{router=g(G);destroyRef=g(Ce);state=g(c);prompts=Gi([]);isLoading=Gi(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=xw({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&&(ws(0,"ds-entity-list",1),Rg("createRequested",function(){return o.openCreateForm()}),ws(1,"ds-icon-button",2),Rg("action",function(){return o.goBack()}),pl()(),Eg(2,L,1,1,"ng-template",null,0,fT)),t&2){let n=CC(3);bg("items",o.promptItems())("loading",o.isLoading())("showCreate",true)("itemTemplate",n);}},dependencies:[$n,R,Se],encapsulation:2})};export{D as PlatformScheduledPromptsComponent};
@@ -1 +1 @@
1
- import {z}from'./chunk-DRE3ggxe.js';import {s}from'./chunk-koMyao3Z.js';import {g as g$1,G,P,R as Re,C as Ce,F,m as mT,x,w,ae as kt,b as U,e as xw,j as Gn,s as si,k as ws,q as Rg,S as Sg,o as pl,af as Eg,ag as fT,u as CC,X as XE,v as bg,a9 as lC,aa as If,ac as gC,ab as wf,n as GC,ah as rT}from'./main-JJWS7R6M.js';import'./chunk-BxU-GJRt.js';import {$ as $n,o as ot}from'./chunk-p9YQAFQg.js';import'./chunk-DsQTsYuJ.js';import {y as yt,w as wt}from'./chunk-Bctflxyb.js';var ee=()=>[];function te(u,t){if(u&1){let o=lC();ws(0,"div",5)(1,"ds-entity-card",6),Rg("selected",function(r){If(o);let i=gC();return wf(i.onItemSelected(r))}),pl(),ws(2,"button",7),Rg("click",function(r){let i=If(o).$implicit,f=gC();return r.stopPropagation(),wf(f.onDeleteRequested(i.id))}),ws(3,"mat-icon"),GC(4,"close"),pl()()();}if(u&2){let o=t.$implicit;XE(),bg("id",o.id)("name",o.name)("description",o.description)("badges",o.badges??rT(4,ee));}}var g="__",Y=class u{router=g$1(G);projectStateService=g$1(P);dialog=g$1(Re);destroyRef=g$1(Ce);notification=g$1(s);projects=F(this.projectStateService.projectList$);forcedProject=F(this.projectStateService.forcedProject$,{initialValue:null});isLoading=F(this.projectStateService.isLoading$,{initialValue:false});projectItems=mT(()=>{let t=this.projects();if(!t)return [];let o=t.filter(e=>!e.name.includes(g)),n=t.filter(e=>e.name.includes(g)),r=new Set(o.map(e=>e.name)),i=e=>e.split(g)[0]??null,f=new Set(n.map(e=>i(e.name)).filter(e=>e!==null&&r.has(e))),l=[],G=[...f].sort((e,a)=>e.localeCompare(a));for(let e of G){let a=o.find(s=>s.name===e);l.push(x(w({},this.toEntityListItem(a)),{groupKey:e,groupLabel:e}));let Z=n.filter(s=>i(s.name)===e).sort((s,C)=>s.name.localeCompare(C.name));for(let s of Z){let C=s.name.slice(e.length+g.length);l.push(x(w({},this.toEntityListItem(s)),{name:C,description:s.name,groupKey:e,groupLabel:e}));}}let H=[...o].filter(e=>!f.has(e.name)&&!e.volatile).sort((e,a)=>e.name.localeCompare(a.name));for(let e of H)l.push(x(w({},this.toEntityListItem(e)),{groupKey:"__standalone__",groupLabel:"Projects"}));let Q=[...o].filter(e=>!f.has(e.name)&&e.volatile).sort((e,a)=>e.name.localeCompare(a.name));for(let e of Q)l.push(x(w({},this.toEntityListItem(e)),{groupKey:"__volatile__",groupLabel:"Temporary"}));let X=n.filter(e=>{let a=i(e.name);return a!==null&&!r.has(a)}).sort((e,a)=>e.name.localeCompare(a.name));for(let e of X)l.push(x(w({},this.toEntityListItem(e)),{groupKey:"__orphaned__",groupLabel:"Orphaned worktrees"}));return l});showCreateButton=mT(()=>!this.forcedProject());constructor(){}onItemSelected(t){this.projectStateService.selectProject(t),this.router.navigate(["project",t]);}onCreateRequested(){this.router.navigate(["project","new"]);}onDeleteRequested(t){let o=t.includes(g);this.dialog.open(z,{width:"400px",panelClass:"confirm-dialog-panel",data:w({title:"Delete project",message:`This will remove the project "${t}" from Coday and archive its configuration. The project source code on disk is not affected.`,confirmLabel:"Delete",cancelLabel:"Cancel",isDestructive:true},o?{checkboxLabel:"Also remove git worktree from disk"}:{})}).afterClosed().pipe(kt(r=>r?.confirmed===true),U(this.destroyRef)).subscribe(r=>{this.notification.info("Deleting project\u2026"),this.projectStateService.deleteProject(t,r.checkboxChecked).pipe(U(this.destroyRef)).subscribe({next:()=>{this.notification.success(`Project "${t}" deleted`),this.router.url.includes(`/project/${encodeURIComponent(t)}`)&&this.router.navigate(["/"]);},error:i=>{console.error("[PROJECT-LIST] Failed to delete project:",i),this.notification.error(i?.error?.error??"Failed to delete project");}});});}toEntityListItem(t){return {id:t.name,name:t.name,badges:t.volatile?[{label:"temp",variant:"warning"}]:[]}}static \u0275fac=function(o){return new(o||u)};static \u0275cmp=xw({type:u,selectors:[["app-project-selection"]],decls:6,vars:5,consts:[["projectCard",""],[1,"project-page-layout"],["title","Projects","contentMaxWidth","1400px","searchPlaceholder","Filter projects\u2026","emptyMessage","No projects found.",3,"itemSelected","createRequested","items","loading","itemTemplate","showCreate","autoFocusSearch"],["toolbar-start","","routerLink","/","title","Back to tasks",1,"project-list__logo"],["src","CODAY-Logo.png","alt","Coday"],[1,"project-card-wrapper"],[3,"selected","id","name","description","badges"],["mat-icon-button","","title","Delete project",1,"project-card-wrapper__delete",3,"click"]],template:function(o,n){if(o&1&&(ws(0,"div",1)(1,"ds-entity-list",2),Rg("itemSelected",function(i){return n.onItemSelected(i)})("createRequested",function(){return n.onCreateRequested()}),ws(2,"a",3),Sg(3,"img",4),pl()()(),Eg(4,te,5,5,"ng-template",null,0,fT)),o&2){let r=CC(5);XE(),bg("items",n.projectItems())("loading",n.isLoading())("itemTemplate",r)("showCreate",n.showCreateButton())("autoFocusSearch",true);}},dependencies:[$n,ot,yt,wt,Gn,si],styles:["[_nghost-%COMP%]{display:block;width:100%;min-height:100vh;background:var(--color-bg);overflow-y:auto}.project-page-layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.project-list__logo[_ngcontent-%COMP%]{display:flex;align-items:center;flex-shrink:0;border-radius:4px;opacity:.85;transition:opacity .15s ease;cursor:pointer}.project-list__logo[_ngcontent-%COMP%]:hover{opacity:1}.project-list__logo[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:40px;height:40px;object-fit:contain;border-radius:4px}.project-card-wrapper[_ngcontent-%COMP%]{position:relative}.project-card-wrapper__delete[_ngcontent-%COMP%]{position:absolute;top:4px;right:4px;width:28px;height:28px;line-height:28px;padding:0;opacity:0;transition:opacity .15s ease;color:var(--color-text-secondary, #6e6e73)}.project-card-wrapper__delete[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.project-card-wrapper__delete[_ngcontent-%COMP%]:hover{color:var(--color-error, #ff3b30)}.project-card-wrapper[_ngcontent-%COMP%]:hover .project-card-wrapper__delete[_ngcontent-%COMP%]{opacity:1}"],changeDetection:1})};export{Y as ProjectListComponent};
1
+ import {z}from'./chunk-DXdSoNy4.js';import {s}from'./chunk-BG1uCwUL.js';import {g as g$1,G,P,R as Re,C as Ce,F,m as mT,x,w,ae as kt,b as U,e as xw,j as Gn,s as si,k as ws,q as Rg,S as Sg,o as pl,af as Eg,ag as fT,u as CC,X as XE,v as bg,a9 as lC,aa as If,ac as gC,ab as wf,n as GC,ah as rT}from'./main-WPRRV3C7.js';import'./chunk-DFrltwI3.js';import {$ as $n,o as ot}from'./chunk-H98syF3F.js';import'./chunk-WkmNSaSs.js';import {y as yt,w as wt}from'./chunk-Df3PzhTd.js';var ee=()=>[];function te(u,t){if(u&1){let o=lC();ws(0,"div",5)(1,"ds-entity-card",6),Rg("selected",function(r){If(o);let i=gC();return wf(i.onItemSelected(r))}),pl(),ws(2,"button",7),Rg("click",function(r){let i=If(o).$implicit,f=gC();return r.stopPropagation(),wf(f.onDeleteRequested(i.id))}),ws(3,"mat-icon"),GC(4,"close"),pl()()();}if(u&2){let o=t.$implicit;XE(),bg("id",o.id)("name",o.name)("description",o.description)("badges",o.badges??rT(4,ee));}}var g="__",Y=class u{router=g$1(G);projectStateService=g$1(P);dialog=g$1(Re);destroyRef=g$1(Ce);notification=g$1(s);projects=F(this.projectStateService.projectList$);forcedProject=F(this.projectStateService.forcedProject$,{initialValue:null});isLoading=F(this.projectStateService.isLoading$,{initialValue:false});projectItems=mT(()=>{let t=this.projects();if(!t)return [];let o=t.filter(e=>!e.name.includes(g)),n=t.filter(e=>e.name.includes(g)),r=new Set(o.map(e=>e.name)),i=e=>e.split(g)[0]??null,f=new Set(n.map(e=>i(e.name)).filter(e=>e!==null&&r.has(e))),l=[],G=[...f].sort((e,a)=>e.localeCompare(a));for(let e of G){let a=o.find(s=>s.name===e);l.push(x(w({},this.toEntityListItem(a)),{groupKey:e,groupLabel:e}));let Z=n.filter(s=>i(s.name)===e).sort((s,C)=>s.name.localeCompare(C.name));for(let s of Z){let C=s.name.slice(e.length+g.length);l.push(x(w({},this.toEntityListItem(s)),{name:C,description:s.name,groupKey:e,groupLabel:e}));}}let H=[...o].filter(e=>!f.has(e.name)&&!e.volatile).sort((e,a)=>e.name.localeCompare(a.name));for(let e of H)l.push(x(w({},this.toEntityListItem(e)),{groupKey:"__standalone__",groupLabel:"Projects"}));let Q=[...o].filter(e=>!f.has(e.name)&&e.volatile).sort((e,a)=>e.name.localeCompare(a.name));for(let e of Q)l.push(x(w({},this.toEntityListItem(e)),{groupKey:"__volatile__",groupLabel:"Temporary"}));let X=n.filter(e=>{let a=i(e.name);return a!==null&&!r.has(a)}).sort((e,a)=>e.name.localeCompare(a.name));for(let e of X)l.push(x(w({},this.toEntityListItem(e)),{groupKey:"__orphaned__",groupLabel:"Orphaned worktrees"}));return l});showCreateButton=mT(()=>!this.forcedProject());constructor(){}onItemSelected(t){this.projectStateService.selectProject(t),this.router.navigate(["project",t]);}onCreateRequested(){this.router.navigate(["project","new"]);}onDeleteRequested(t){let o=t.includes(g);this.dialog.open(z,{width:"400px",panelClass:"confirm-dialog-panel",data:w({title:"Delete project",message:`This will remove the project "${t}" from Coday and archive its configuration. The project source code on disk is not affected.`,confirmLabel:"Delete",cancelLabel:"Cancel",isDestructive:true},o?{checkboxLabel:"Also remove git worktree from disk"}:{})}).afterClosed().pipe(kt(r=>r?.confirmed===true),U(this.destroyRef)).subscribe(r=>{this.notification.info("Deleting project\u2026"),this.projectStateService.deleteProject(t,r.checkboxChecked).pipe(U(this.destroyRef)).subscribe({next:()=>{this.notification.success(`Project "${t}" deleted`),this.router.url.includes(`/project/${encodeURIComponent(t)}`)&&this.router.navigate(["/"]);},error:i=>{console.error("[PROJECT-LIST] Failed to delete project:",i),this.notification.error(i?.error?.error??"Failed to delete project");}});});}toEntityListItem(t){return {id:t.name,name:t.name,badges:t.volatile?[{label:"temp",variant:"warning"}]:[]}}static \u0275fac=function(o){return new(o||u)};static \u0275cmp=xw({type:u,selectors:[["app-project-selection"]],decls:6,vars:5,consts:[["projectCard",""],[1,"project-page-layout"],["title","Projects","contentMaxWidth","1400px","searchPlaceholder","Filter projects\u2026","emptyMessage","No projects found.",3,"itemSelected","createRequested","items","loading","itemTemplate","showCreate","autoFocusSearch"],["toolbar-start","","routerLink","/","title","Back to tasks",1,"project-list__logo"],["src","CODAY-Logo.png","alt","Coday"],[1,"project-card-wrapper"],[3,"selected","id","name","description","badges"],["mat-icon-button","","title","Delete project",1,"project-card-wrapper__delete",3,"click"]],template:function(o,n){if(o&1&&(ws(0,"div",1)(1,"ds-entity-list",2),Rg("itemSelected",function(i){return n.onItemSelected(i)})("createRequested",function(){return n.onCreateRequested()}),ws(2,"a",3),Sg(3,"img",4),pl()()(),Eg(4,te,5,5,"ng-template",null,0,fT)),o&2){let r=CC(5);XE(),bg("items",n.projectItems())("loading",n.isLoading())("itemTemplate",r)("showCreate",n.showCreateButton())("autoFocusSearch",true);}},dependencies:[$n,ot,yt,wt,Gn,si],styles:["[_nghost-%COMP%]{display:block;width:100%;min-height:100vh;background:var(--color-bg);overflow-y:auto}.project-page-layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.project-list__logo[_ngcontent-%COMP%]{display:flex;align-items:center;flex-shrink:0;border-radius:4px;opacity:.85;transition:opacity .15s ease;cursor:pointer}.project-list__logo[_ngcontent-%COMP%]:hover{opacity:1}.project-list__logo[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:40px;height:40px;object-fit:contain;border-radius:4px}.project-card-wrapper[_ngcontent-%COMP%]{position:relative}.project-card-wrapper__delete[_ngcontent-%COMP%]{position:absolute;top:4px;right:4px;width:28px;height:28px;line-height:28px;padding:0;opacity:0;transition:opacity .15s ease;color:var(--color-text-secondary, #6e6e73)}.project-card-wrapper__delete[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.project-card-wrapper__delete[_ngcontent-%COMP%]:hover{color:var(--color-error, #ff3b30)}.project-card-wrapper[_ngcontent-%COMP%]:hover .project-card-wrapper__delete[_ngcontent-%COMP%]{opacity:1}"],changeDetection:1})};export{Y as ProjectListComponent};