@whoz-oss/coday-client 0.0.0-workstream-forge.85 → 0.0.0-workstream-forge.86

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 (75) hide show
  1. package/browser/{chunk-CGWw5lBT.js → chunk-4LtAlNEG.js} +1 -1
  2. package/browser/{chunk-DJ3Vvjz1.js → chunk-5FvESCsE.js} +1 -1
  3. package/browser/{chunk-D-97XyJO.js → chunk-6mprZf3v.js} +1 -1
  4. package/browser/{chunk-CLTA0yP4.js → chunk-8pxP8BFo.js} +1 -1
  5. package/browser/{chunk-B4rhq7bi.js → chunk-A-JEaURj.js} +1 -1
  6. package/browser/{chunk-BsKyZz1S.js → chunk-B1-il2U0.js} +1 -1
  7. package/browser/{chunk-Ctx595g6.js → chunk-B5PXnaOl.js} +1 -1
  8. package/browser/{chunk-BUdJX9hY.js → chunk-B64idey6.js} +1 -1
  9. package/browser/{chunk-BsPV1PdF.js → chunk-BA1cOeHq.js} +1 -1
  10. package/browser/{chunk-DeooMs7E.js → chunk-BEJTxNxB.js} +1 -1
  11. package/browser/{chunk-DOvy24Mz.js → chunk-BGE9_wot.js} +1 -1
  12. package/browser/{chunk-BKXr22P2.js → chunk-BGz8Xt5T.js} +1 -1
  13. package/browser/{chunk-D7231OLC.js → chunk-BLqlE3v2.js} +1 -1
  14. package/browser/{chunk-CxcK5VhO.js → chunk-BMgjoMtb.js} +1 -1
  15. package/browser/{chunk-B4TTtVTM.js → chunk-BNAmaIpp.js} +6 -6
  16. package/browser/{chunk-CxS-yA8k.js → chunk-BP2F_k94.js} +1 -1
  17. package/browser/chunk-BReYxmMt.js +1 -0
  18. package/browser/{chunk-KN3VmbRk.js → chunk-BRlxtYvP.js} +1 -1
  19. package/browser/{chunk-BXySi22i.js → chunk-BVA6AtwF.js} +1 -1
  20. package/browser/{chunk-CfnQW0vA.js → chunk-BVHI74mw.js} +1 -1
  21. package/browser/{chunk-C0Zdso7r.js → chunk-BVOCXShg.js} +1 -1
  22. package/browser/{chunk-Ce5Rvt6i.js → chunk-BbFLEXqO.js} +1 -1
  23. package/browser/{chunk-BYDOmTQe.js → chunk-BeOz0txC.js} +1 -1
  24. package/browser/{chunk-C-Hr86np.js → chunk-Br4KoP_c.js} +1 -1
  25. package/browser/{chunk-D7KQtMAo.js → chunk-BrvaJ5Ka.js} +1 -1
  26. package/browser/{chunk-CV8NcEte.js → chunk-BsxqSvbO.js} +1 -1
  27. package/browser/{chunk-qP8cZKcf.js → chunk-BulEb8_G.js} +1 -1
  28. package/browser/{chunk-D-8acZ_5.js → chunk-C0WNLjbM.js} +1 -1
  29. package/browser/{chunk-cA4bIkG2.js → chunk-C4-wVzVC.js} +1 -1
  30. package/browser/{chunk-CBIKdwfA.js → chunk-C55OH9DT.js} +1 -1
  31. package/browser/{chunk-Jk7g0fPe.js → chunk-C8xYEjLw.js} +1 -1
  32. package/browser/{chunk-BbgxegPT.js → chunk-C9MYeBSS.js} +1 -1
  33. package/browser/{chunk-o4CghyWD.js → chunk-C9U_mXa6.js} +1 -1
  34. package/browser/{chunk-DCSvIjdr.js → chunk-CAf5e3X_.js} +1 -1
  35. package/browser/{chunk-0uuGJUFj.js → chunk-CEam1FlV.js} +1 -1
  36. package/browser/{chunk-CH4pl_-4.js → chunk-CJ1dubfa.js} +1 -1
  37. package/browser/{chunk-D8r5u_yM.js → chunk-CP5a7UK0.js} +1 -1
  38. package/browser/{chunk-DYDIpbat.js → chunk-CPYSFluI.js} +1 -1
  39. package/browser/{chunk-XbDie-5R.js → chunk-CTYpNxkK.js} +1 -1
  40. package/browser/{chunk-njPktt_6.js → chunk-CUdQzYQW.js} +1 -1
  41. package/browser/{chunk-DRCrokPV.js → chunk-CdOlbBn5.js} +1 -1
  42. package/browser/{chunk-BhT8LBNg.js → chunk-Ci4QZSsS.js} +1 -1
  43. package/browser/{chunk-Bbg_XtL3.js → chunk-Cl4yuLbG.js} +1 -1
  44. package/browser/{chunk-Dwke_s-Q.js → chunk-CmZ4V-N8.js} +1 -1
  45. package/browser/{chunk-ou-LSZw8.js → chunk-Cn1fHwmy.js} +1 -1
  46. package/browser/{chunk-Csfh2LFH.js → chunk-CvMfmMmM.js} +1 -1
  47. package/browser/{chunk-Crk2ISp0.js → chunk-D4rYX9O1.js} +1 -1
  48. package/browser/{chunk-DRJyk_K2.js → chunk-D6oyDXZJ.js} +1 -1
  49. package/browser/{chunk-DOEaoDAU.js → chunk-DAudT-3C.js} +1 -1
  50. package/browser/{chunk-DqtsMOGa.js → chunk-DB9rThW6.js} +1 -1
  51. package/browser/{chunk-DlGeZ2Fv.js → chunk-DBWRfEuI.js} +1 -1
  52. package/browser/{chunk-BCgigK6M.js → chunk-DHUJvMuZ.js} +1 -1
  53. package/browser/{chunk-CQzPiBAl.js → chunk-DKy8ULGc.js} +1 -1
  54. package/browser/{chunk-htTShCZB.js → chunk-DLQtAArX.js} +1 -1
  55. package/browser/{chunk-DCELc1L9.js → chunk-DMIFdTcn.js} +1 -1
  56. package/browser/{chunk-Dzh3BtRr.js → chunk-DXN3VHhU.js} +1 -1
  57. package/browser/{chunk-oTStGRTV.js → chunk-DXv9gWYT.js} +1 -1
  58. package/browser/{chunk-uUqcsMN3.js → chunk-Di5W20Td.js} +1 -1
  59. package/browser/{chunk-BZ-HbHiK.js → chunk-DievI0Yw.js} +1 -1
  60. package/browser/{chunk-gE_FLWxH.js → chunk-DpWI-TgL.js} +1 -1
  61. package/browser/{chunk-DD1yExa7.js → chunk-DrXxS2bi.js} +1 -1
  62. package/browser/{chunk-DKMH3aiq.js → chunk-DsJn0C9j.js} +1 -1
  63. package/browser/{chunk-DuOS42Vx.js → chunk-Dt9lKo_b.js} +1 -1
  64. package/browser/{chunk-Cf3SbmDw.js → chunk-F0YEJ6lL.js} +1 -1
  65. package/browser/{chunk-B_lCG1w5.js → chunk-Pl1gCM5_.js} +1 -1
  66. package/browser/{chunk-CBZ1dj9K.js → chunk-TrCoEXQc.js} +1 -1
  67. package/browser/{chunk-6erFss_x.js → chunk-Vbox4Gjz.js} +1 -1
  68. package/browser/{chunk-CLrKP-zf.js → chunk-XYlWSii8.js} +1 -1
  69. package/browser/{chunk-qLHWo9Sh.js → chunk-iG0axtQl.js} +1 -1
  70. package/browser/{chunk-nbSpeG1c.js → chunk-moUQro3f.js} +1 -1
  71. package/browser/{chunk-BjfXiBY5.js → chunk-sraAi-SR.js} +1 -1
  72. package/browser/index.html +1 -1
  73. package/browser/{main-ZCPOJMDG.js → main-JF54VQMT.js} +1 -1
  74. package/package.json +1 -1
  75. package/browser/chunk-8RXCnz6r.js +0 -1
@@ -1,2 +1,2 @@
1
- import {R}from'./chunk-BbgxegPT.js';import {g,ao as W,F,dw as _,C as Ce,G as Gi,m as mT,dx as Re,M as By,b as U,a7 as ya,Q as br,e as xw,k as ws,q as Rg,n as GC,o as pl,J as Jw,X as XE,v as eC,a9 as lC,a3 as VI,s as rC,ac as gC,u as bg,a6 as UI,y as oC,a5 as vl,a8 as Yg,z as Ug,b0 as Qg,aa as If,ab as wf}from'./main-ZCPOJMDG.js';import'./chunk-B4TTtVTM.js';import {t as ti,Q as Qn,e as ei,Y as Ye,a as wt,A as At,Z as Zn,c as cn}from'./chunk-CLTA0yP4.js';import'./chunk-8RXCnz6r.js';import'./chunk-CQzPiBAl.js';import'./chunk-Ce5Rvt6i.js';import'./chunk-uUqcsMN3.js';var $=(o,t)=>t.id;function J(o,t){o&1&&(ws(0,"p",5),GC(1,"Loading\u2026"),pl());}function Q(o,t){if(o&1&&(ws(0,"p",8),GC(1),pl()),o&2){let e=gC(2);XE(),Yg(e.errorMessage());}}function X(o,t){if(o&1){let e=lC();ws(0,"button",29),Rg("click",function(){If(e);let s=gC(2);return wf(s.retryLoad())}),GC(1,"Retry loading"),pl();}}function Z(o,t){if(o&1&&(ws(0,"span",31),GC(1),pl()),o&2){let e=gC(3);XE(),Yg(e.association()?.checkoutFailureReason);}}function ee(o,t){if(o&1&&(ws(0,"p",30),GC(1),Jw(2,Z,2,1,"span",31),pl()),o&2){let e=gC(2);Ug("namespace-git__status--failed",e.checkoutStatus()===e.CheckoutStatus.FAILED)("namespace-git__status--ready",e.checkoutStatus()===e.CheckoutStatus.READY),XE(),vl(" Repository: ",e.checkoutStatus()," "),XE(),eC(e.association()?.checkoutFailureReason?2:-1);}}function te(o,t){if(o&1&&(ws(0,"option",20),GC(1),pl()),o&2){let e=t.$implicit,l=gC(2);bg("value",e.id),XE(),Qg("",e.name," (",l.authTypeLabel(e.authType),")");}}function ne(o,t){o&1&&(ws(0,"span",21),GC(1," No usable auth setting in this namespace. Create a BEARER_TOKEN one first. "),pl());}function ie(o,t){if(o&1){let e=lC();ws(0,"button",32),Rg("click",function(){If(e);let s=gC(2);return wf(s.remove())}),GC(1," Remove association "),pl();}if(o&2){let e=gC(2);bg("disabled",!e.associationLoaded()||e.isSaving());}}function ae(o,t){if(o&1){let e=lC();ws(0,"div",6)(1,"p",7),GC(2," Associating a repository enables Git workspaces for this namespace. When worktree creation is enabled, every new top-level case gets a repo/ directory shared by its sub-cases. Namespace files remain shared documents outside Git. Agents create branches and pull requests in their workflows. "),pl(),Jw(3,Q,2,1,"p",8),Jw(4,X,2,0,"button",9),Jw(5,ee,3,6,"p",10),ws(6,"fieldset",11)(7,"legend",12),GC(8,"Repository"),pl(),ws(9,"label",13)(10,"span",14),GC(11,"Repository URL"),pl(),ws(12,"input",15),Rg("ngModelChange",function(s){If(e);let u=gC();return wf(u.repositoryUrl.set(s))}),pl(),VI(),ws(13,"span",16),GC(14,"HTTPS only, without credentials in the URL."),pl()(),ws(15,"label",13)(16,"span",14),GC(17,"Main branch"),pl(),ws(18,"input",17),Rg("ngModelChange",function(s){If(e);let u=gC();return wf(u.mainBranch.set(s))}),pl(),VI(),ws(19,"span",16),GC(20,"New worktrees start at this branch\u2019s commit, without creating a branch."),pl()(),ws(21,"label",13)(22,"span",14),GC(23,"Service account"),pl(),ws(24,"select",18),Rg("ngModelChange",function(s){If(e);let u=gC();return wf(u.serviceAuthSettingId.set(s))}),ws(25,"option",19),GC(26,"Select an auth setting\u2026"),pl(),rC(27,te,2,3,"option",20,$),pl(),VI(),ws(29,"span",16),GC(30," Shared by the namespace. Every Git operation uses this identity, never the identity of whoever opened the case. "),pl(),Jw(31,ne,2,0,"span",21),pl()(),ws(32,"fieldset",11)(33,"legend",12),GC(34,"Automation"),pl(),ws(35,"label",22)(36,"input",23),Rg("ngModelChange",function(s){If(e);let u=gC();return wf(u.autoWorktree.set(s))}),pl(),VI(),ws(37,"span"),GC(38,"Create a worktree for every new top-level case"),pl()(),ws(39,"span",16),GC(40," Applies to cases created from now on. Turning this on later never equips existing cases, and turning it off never removes a worktree already created. "),pl(),ws(41,"label",13)(42,"span",14),GC(43,"Setup command (optional)"),pl(),ws(44,"input",24),Rg("ngModelChange",function(s){If(e);let u=gC();return wf(u.setupCommand.set(s))}),pl(),VI(),ws(45,"span",21),GC(46," Runs on the server, as the service user, in each new worktree. It executes code from the branch \u2014 prefer a command that disables lifecycle scripts. "),pl()()(),ws(47,"div",25)(48,"button",26),Rg("click",function(){If(e);let s=gC();return wf(s.save())}),GC(49),pl(),Jw(50,ie,2,1,"button",27),ws(51,"button",28),Rg("click",function(){If(e);let s=gC();return wf(s.cancel())}),GC(52,"Cancel"),pl()()();}if(o&2){let e=gC();XE(3),eC(e.errorMessage()?3:-1),XE(),eC(e.associationLoaded()?-1:4),XE(),eC(e.isAssociated()&&e.checkoutStatus()?5:-1),XE(),bg("disabled",!e.associationLoaded()||e.isSaving()),XE(6),bg("ngModel",e.repositoryUrl()),UI(),XE(6),bg("ngModel",e.mainBranch()),UI(),XE(6),bg("ngModel",e.serviceAuthSettingId()),UI(),XE(3),oC(e.eligibleAuthSettings()),XE(4),eC(e.eligibleAuthSettings().length===0?31:-1),XE(),bg("disabled",!e.associationLoaded()||e.isSaving()),XE(4),bg("ngModel",e.autoWorktree()),UI(),XE(8),bg("ngModel",e.setupCommand()),UI(),XE(4),bg("disabled",!e.canSave()),XE(),vl(" ",e.isSaving()?"Saving\u2026":e.isAssociated()?"Update":"Associate"," "),XE(),eC(e.isAssociated()?50:-1);}}var oe=["BearerTokenAuthSetting","BasicAuthAuthSetting","ApiKeyAuthSetting"],re={BearerTokenAuthSetting:"token",BasicAuthAuthSetting:"basic auth",ApiKeyAuthSetting:"API key"},q=class o{route=g(W);router=g(F);gitApi=g(_);authSettingState=g(R);destroyRef=g(Ce);isLoading=Gi(true);isSaving=Gi(false);associationLoaded=Gi(false);errorMessage=Gi(null);association=Gi(null);authSettings=Gi([]);repositoryUrl=Gi("");mainBranch=Gi("main");serviceAuthSettingId=Gi("");autoWorktree=Gi(false);setupCommand=Gi("");namespaceId="";isAssociated=mT(()=>this.association()?.associated===true);eligibleAuthSettings=mT(()=>this.authSettings().filter(t=>oe.includes(t.authType)));authTypeLabel(t){return re[t??""]??t??"unknown"}canSave=mT(()=>this.associationLoaded()&&!this.isLoading()&&!this.isSaving()&&this.repositoryUrl().trim().length>0&&this.serviceAuthSettingId().length>0);checkoutStatus=mT(()=>this.association()?.checkoutStatus??null);CheckoutStatus=Re;ngOnInit(){this.namespaceId=this.route.snapshot.paramMap.get("namespaceId")??"",this.load();}retryLoad(){this.isLoading()||this.isSaving()||this.load();}load(){this.isLoading.set(true),this.associationLoaded.set(false),this.errorMessage.set(null),By({association:this.gitApi.getAssociationNamespaceGit(this.namespaceId),authSettings:this.authSettingState.loadNamespaceSettings(this.namespaceId)}).pipe(U(this.destroyRef)).subscribe({next:({association:t,authSettings:e})=>{this.authSettings.set(e??[]),this.acceptAssociation(t),this.isLoading.set(false);},error:t=>{console.error("Failed to load the Git repository settings",t),this.errorMessage.set(this.messageOf(t)),this.isLoading.set(false);}});}acceptAssociation(t){this.association.set(t);let e=t?.associated===false||t?.associated===true&&typeof t.repositoryUrl=="string"&&typeof t.mainBranch=="string"&&typeof t.serviceAuthSettingId=="string"&&typeof t.autoWorktreeForRootCases=="boolean"&&(t.setupCommand==null||typeof t.setupCommand=="string");this.associationLoaded.set(e),e?this.applyToForm(t):this.errorMessage.set("The repository settings could not be loaded completely. Retry before making changes.");}applyToForm(t){this.repositoryUrl.set(t.repositoryUrl??""),this.mainBranch.set(t.mainBranch??"main"),this.serviceAuthSettingId.set(t.serviceAuthSettingId??""),this.autoWorktree.set(t.autoWorktreeForRootCases??false),this.setupCommand.set(t.setupCommand??"");}save(){this.canSave()&&(this.isSaving.set(true),this.errorMessage.set(null),this.gitApi.setAssociationNamespaceGit(this.namespaceId,{repositoryUrl:this.repositoryUrl().trim(),mainBranch:this.mainBranch().trim()||void 0,serviceAuthSettingId:this.serviceAuthSettingId(),autoWorktreeForRootCases:this.autoWorktree(),setupCommand:this.setupCommand().trim()||void 0}).pipe(U(this.destroyRef),ya(t=>(console.error("Failed to save the Git association",t),this.errorMessage.set(this.messageOf(t)),this.isSaving.set(false),br(null)))).subscribe(t=>{t&&this.acceptAssociation(t),this.isSaving.set(false);}));}remove(){!this.associationLoaded()||this.isLoading()||this.isSaving()||!this.isAssociated()||confirm("Remove the repository association? Existing workspaces keep their worktree.")&&(this.isSaving.set(true),this.gitApi.removeAssociationNamespaceGit(this.namespaceId).pipe(U(this.destroyRef),ya(t=>(console.error("Failed to remove the Git association",t),this.errorMessage.set(this.messageOf(t)),this.isSaving.set(false),br(null)))).subscribe(t=>{t&&this.acceptAssociation(t),this.isSaving.set(false);}));}cancel(){this.router.navigate(["/agentos/namespaces"]);}messageOf(t){return t.error?.message??t.message??"Unexpected error"}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=xw({type:o,selectors:[["agentos-namespace-git"]],decls:10,vars:1,consts:[[1,"namespace-git"],[1,"namespace-git__header"],["type","button","title","Back to namespaces",1,"namespace-git__back",3,"click"],[1,"namespace-git__back-icon"],[1,"namespace-git__title"],[1,"namespace-git__loading"],[1,"namespace-git__body"],[1,"namespace-git__hint"],["role","alert",1,"namespace-git__error"],["type","button",1,"namespace-git__retry"],[1,"namespace-git__status",3,"namespace-git__status--failed","namespace-git__status--ready"],[1,"namespace-git__section",3,"disabled"],[1,"namespace-git__label"],[1,"namespace-git__field"],[1,"namespace-git__field-label"],["type","url","placeholder","https://forge.example/org/project.git","name","repositoryUrl",1,"namespace-git__input",3,"ngModelChange","ngModel"],[1,"namespace-git__field-hint"],["type","text","placeholder","main","name","mainBranch",1,"namespace-git__input",3,"ngModelChange","ngModel"],["name","serviceAuthSettingId",1,"namespace-git__input",3,"ngModelChange","ngModel"],["value",""],[3,"value"],[1,"namespace-git__field-hint","namespace-git__field-hint--warn"],[1,"namespace-git__checkbox"],["type","checkbox","name","autoWorktree",3,"ngModelChange","ngModel"],["type","text","placeholder","pnpm install --ignore-scripts","name","setupCommand",1,"namespace-git__input",3,"ngModelChange","ngModel"],[1,"namespace-git__actions"],["type","button",1,"namespace-git__save",3,"click","disabled"],["type","button",1,"namespace-git__remove",3,"disabled"],["type","button",1,"namespace-git__cancel",3,"click"],["type","button",1,"namespace-git__retry",3,"click"],[1,"namespace-git__status"],[1,"namespace-git__status-reason"],["type","button",1,"namespace-git__remove",3,"click","disabled"]],template:function(e,l){e&1&&(ws(0,"div",0)(1,"header",1)(2,"button",2),Rg("click",function(){return l.cancel()}),ws(3,"span",3),GC(4,"\u2190"),pl(),GC(5," Namespaces "),pl(),ws(6,"h1",4),GC(7,"Git repository"),pl()(),Jw(8,J,2,0,"p",5)(9,ae,53,14,"div",6),pl()),e&2&&(XE(8),eC(l.isLoading()?8:9));},dependencies:[ti,Qn,ei,Ye,wt,At,Zn,cn],styles:[".namespace-git[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.namespace-git__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.namespace-git__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-primary, #007aff);font-family:inherit}.namespace-git__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.namespace-git__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem}.namespace-git__body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.namespace-git__hint[_ngcontent-%COMP%]{margin:0;font-size:.875rem;color:var(--color-text-secondary, #6b7280)}.namespace-git__error[_ngcontent-%COMP%]{margin:0;padding:.75rem;border-radius:.375rem;background:var(--red-bg, #fef2f2);color:var(--color-error, #b91c1c);font-size:.875rem}.namespace-git__status[_ngcontent-%COMP%]{margin:0;padding:.5rem .75rem;border-radius:.375rem;background:var(--color-surface-secondary, #f3f4f6);font-size:.875rem;display:flex;flex-direction:column;gap:.25rem}.namespace-git__status--ready[_ngcontent-%COMP%]{background:var(--color-success-bg, #ecfdf5);color:var(--color-success, #047857)}.namespace-git__status--failed[_ngcontent-%COMP%]{background:var(--red-bg, #fef2f2);color:var(--color-error, #b91c1c)}.namespace-git__status-reason[_ngcontent-%COMP%]{font-size:.8125rem;opacity:.9}.namespace-git__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;border:1px solid var(--color-border, #e5e7eb);border-radius:.5rem;padding:1rem;margin:0}.namespace-git__label[_ngcontent-%COMP%]{font-weight:600;font-size:.9375rem;padding:0 .25rem}.namespace-git__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.namespace-git__field-label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500}.namespace-git__field-hint[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-text-secondary, #6b7280)}.namespace-git__field-hint--warn[_ngcontent-%COMP%]{color:var(--color-warning, #b45309)}.namespace-git__input[_ngcontent-%COMP%]{font-family:inherit;font-size:.875rem;padding:.5rem .625rem;border:1px solid var(--color-border, #e5e7eb);border-radius:.375rem;background:var(--color-surface, #fff);color:inherit}.namespace-git__checkbox[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;font-size:.875rem;cursor:pointer}.namespace-git__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;align-items:center}.namespace-git__save[_ngcontent-%COMP%], .namespace-git__retry[_ngcontent-%COMP%], .namespace-git__remove[_ngcontent-%COMP%], .namespace-git__cancel[_ngcontent-%COMP%]{font-family:inherit;font-size:.875rem;padding:.5rem 1rem;border-radius:.375rem;cursor:pointer;border:1px solid transparent}.namespace-git__save[_ngcontent-%COMP%]:disabled, .namespace-git__retry[_ngcontent-%COMP%]:disabled, .namespace-git__remove[_ngcontent-%COMP%]:disabled, .namespace-git__cancel[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.namespace-git__save[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);color:var(--color-text-on-accent, #fff)}.namespace-git__remove[_ngcontent-%COMP%]{background:none;border-color:var(--color-error, #b91c1c);color:var(--color-error, #b91c1c)}.namespace-git__cancel[_ngcontent-%COMP%], .namespace-git__retry[_ngcontent-%COMP%]{background:none;border-color:var(--color-border, #e5e7eb);color:inherit}"]})};
1
+ import {R}from'./chunk-C9MYeBSS.js';import {g,ao as W,F,dw as _,C as Ce,G as Gi,m as mT,dx as Re,M as By,b as U,a7 as ya,Q as br,e as xw,k as ws,q as Rg,n as GC,o as pl,J as Jw,X as XE,v as eC,a9 as lC,a3 as VI,s as rC,ac as gC,u as bg,a6 as UI,y as oC,a5 as vl,a8 as Yg,z as Ug,b0 as Qg,aa as If,ab as wf}from'./main-JF54VQMT.js';import'./chunk-BNAmaIpp.js';import {t as ti,Q as Qn,e as ei,Y as Ye,a as wt,A as At,Z as Zn,c as cn}from'./chunk-8pxP8BFo.js';import'./chunk-BReYxmMt.js';import'./chunk-DKy8ULGc.js';import'./chunk-BbFLEXqO.js';import'./chunk-Di5W20Td.js';var $=(o,t)=>t.id;function J(o,t){o&1&&(ws(0,"p",5),GC(1,"Loading\u2026"),pl());}function Q(o,t){if(o&1&&(ws(0,"p",8),GC(1),pl()),o&2){let e=gC(2);XE(),Yg(e.errorMessage());}}function X(o,t){if(o&1){let e=lC();ws(0,"button",29),Rg("click",function(){If(e);let s=gC(2);return wf(s.retryLoad())}),GC(1,"Retry loading"),pl();}}function Z(o,t){if(o&1&&(ws(0,"span",31),GC(1),pl()),o&2){let e=gC(3);XE(),Yg(e.association()?.checkoutFailureReason);}}function ee(o,t){if(o&1&&(ws(0,"p",30),GC(1),Jw(2,Z,2,1,"span",31),pl()),o&2){let e=gC(2);Ug("namespace-git__status--failed",e.checkoutStatus()===e.CheckoutStatus.FAILED)("namespace-git__status--ready",e.checkoutStatus()===e.CheckoutStatus.READY),XE(),vl(" Repository: ",e.checkoutStatus()," "),XE(),eC(e.association()?.checkoutFailureReason?2:-1);}}function te(o,t){if(o&1&&(ws(0,"option",20),GC(1),pl()),o&2){let e=t.$implicit,l=gC(2);bg("value",e.id),XE(),Qg("",e.name," (",l.authTypeLabel(e.authType),")");}}function ne(o,t){o&1&&(ws(0,"span",21),GC(1," No usable auth setting in this namespace. Create a BEARER_TOKEN one first. "),pl());}function ie(o,t){if(o&1){let e=lC();ws(0,"button",32),Rg("click",function(){If(e);let s=gC(2);return wf(s.remove())}),GC(1," Remove association "),pl();}if(o&2){let e=gC(2);bg("disabled",!e.associationLoaded()||e.isSaving());}}function ae(o,t){if(o&1){let e=lC();ws(0,"div",6)(1,"p",7),GC(2," Associating a repository enables Git workspaces for this namespace. When worktree creation is enabled, every new top-level case gets a repo/ directory shared by its sub-cases. Namespace files remain shared documents outside Git. Agents create branches and pull requests in their workflows. "),pl(),Jw(3,Q,2,1,"p",8),Jw(4,X,2,0,"button",9),Jw(5,ee,3,6,"p",10),ws(6,"fieldset",11)(7,"legend",12),GC(8,"Repository"),pl(),ws(9,"label",13)(10,"span",14),GC(11,"Repository URL"),pl(),ws(12,"input",15),Rg("ngModelChange",function(s){If(e);let u=gC();return wf(u.repositoryUrl.set(s))}),pl(),VI(),ws(13,"span",16),GC(14,"HTTPS only, without credentials in the URL."),pl()(),ws(15,"label",13)(16,"span",14),GC(17,"Main branch"),pl(),ws(18,"input",17),Rg("ngModelChange",function(s){If(e);let u=gC();return wf(u.mainBranch.set(s))}),pl(),VI(),ws(19,"span",16),GC(20,"New worktrees start at this branch\u2019s commit, without creating a branch."),pl()(),ws(21,"label",13)(22,"span",14),GC(23,"Service account"),pl(),ws(24,"select",18),Rg("ngModelChange",function(s){If(e);let u=gC();return wf(u.serviceAuthSettingId.set(s))}),ws(25,"option",19),GC(26,"Select an auth setting\u2026"),pl(),rC(27,te,2,3,"option",20,$),pl(),VI(),ws(29,"span",16),GC(30," Shared by the namespace. Every Git operation uses this identity, never the identity of whoever opened the case. "),pl(),Jw(31,ne,2,0,"span",21),pl()(),ws(32,"fieldset",11)(33,"legend",12),GC(34,"Automation"),pl(),ws(35,"label",22)(36,"input",23),Rg("ngModelChange",function(s){If(e);let u=gC();return wf(u.autoWorktree.set(s))}),pl(),VI(),ws(37,"span"),GC(38,"Create a worktree for every new top-level case"),pl()(),ws(39,"span",16),GC(40," Applies to cases created from now on. Turning this on later never equips existing cases, and turning it off never removes a worktree already created. "),pl(),ws(41,"label",13)(42,"span",14),GC(43,"Setup command (optional)"),pl(),ws(44,"input",24),Rg("ngModelChange",function(s){If(e);let u=gC();return wf(u.setupCommand.set(s))}),pl(),VI(),ws(45,"span",21),GC(46," Runs on the server, as the service user, in each new worktree. It executes code from the branch \u2014 prefer a command that disables lifecycle scripts. "),pl()()(),ws(47,"div",25)(48,"button",26),Rg("click",function(){If(e);let s=gC();return wf(s.save())}),GC(49),pl(),Jw(50,ie,2,1,"button",27),ws(51,"button",28),Rg("click",function(){If(e);let s=gC();return wf(s.cancel())}),GC(52,"Cancel"),pl()()();}if(o&2){let e=gC();XE(3),eC(e.errorMessage()?3:-1),XE(),eC(e.associationLoaded()?-1:4),XE(),eC(e.isAssociated()&&e.checkoutStatus()?5:-1),XE(),bg("disabled",!e.associationLoaded()||e.isSaving()),XE(6),bg("ngModel",e.repositoryUrl()),UI(),XE(6),bg("ngModel",e.mainBranch()),UI(),XE(6),bg("ngModel",e.serviceAuthSettingId()),UI(),XE(3),oC(e.eligibleAuthSettings()),XE(4),eC(e.eligibleAuthSettings().length===0?31:-1),XE(),bg("disabled",!e.associationLoaded()||e.isSaving()),XE(4),bg("ngModel",e.autoWorktree()),UI(),XE(8),bg("ngModel",e.setupCommand()),UI(),XE(4),bg("disabled",!e.canSave()),XE(),vl(" ",e.isSaving()?"Saving\u2026":e.isAssociated()?"Update":"Associate"," "),XE(),eC(e.isAssociated()?50:-1);}}var oe=["BearerTokenAuthSetting","BasicAuthAuthSetting","ApiKeyAuthSetting"],re={BearerTokenAuthSetting:"token",BasicAuthAuthSetting:"basic auth",ApiKeyAuthSetting:"API key"},q=class o{route=g(W);router=g(F);gitApi=g(_);authSettingState=g(R);destroyRef=g(Ce);isLoading=Gi(true);isSaving=Gi(false);associationLoaded=Gi(false);errorMessage=Gi(null);association=Gi(null);authSettings=Gi([]);repositoryUrl=Gi("");mainBranch=Gi("main");serviceAuthSettingId=Gi("");autoWorktree=Gi(false);setupCommand=Gi("");namespaceId="";isAssociated=mT(()=>this.association()?.associated===true);eligibleAuthSettings=mT(()=>this.authSettings().filter(t=>oe.includes(t.authType)));authTypeLabel(t){return re[t??""]??t??"unknown"}canSave=mT(()=>this.associationLoaded()&&!this.isLoading()&&!this.isSaving()&&this.repositoryUrl().trim().length>0&&this.serviceAuthSettingId().length>0);checkoutStatus=mT(()=>this.association()?.checkoutStatus??null);CheckoutStatus=Re;ngOnInit(){this.namespaceId=this.route.snapshot.paramMap.get("namespaceId")??"",this.load();}retryLoad(){this.isLoading()||this.isSaving()||this.load();}load(){this.isLoading.set(true),this.associationLoaded.set(false),this.errorMessage.set(null),By({association:this.gitApi.getAssociationNamespaceGit(this.namespaceId),authSettings:this.authSettingState.loadNamespaceSettings(this.namespaceId)}).pipe(U(this.destroyRef)).subscribe({next:({association:t,authSettings:e})=>{this.authSettings.set(e??[]),this.acceptAssociation(t),this.isLoading.set(false);},error:t=>{console.error("Failed to load the Git repository settings",t),this.errorMessage.set(this.messageOf(t)),this.isLoading.set(false);}});}acceptAssociation(t){this.association.set(t);let e=t?.associated===false||t?.associated===true&&typeof t.repositoryUrl=="string"&&typeof t.mainBranch=="string"&&typeof t.serviceAuthSettingId=="string"&&typeof t.autoWorktreeForRootCases=="boolean"&&(t.setupCommand==null||typeof t.setupCommand=="string");this.associationLoaded.set(e),e?this.applyToForm(t):this.errorMessage.set("The repository settings could not be loaded completely. Retry before making changes.");}applyToForm(t){this.repositoryUrl.set(t.repositoryUrl??""),this.mainBranch.set(t.mainBranch??"main"),this.serviceAuthSettingId.set(t.serviceAuthSettingId??""),this.autoWorktree.set(t.autoWorktreeForRootCases??false),this.setupCommand.set(t.setupCommand??"");}save(){this.canSave()&&(this.isSaving.set(true),this.errorMessage.set(null),this.gitApi.setAssociationNamespaceGit(this.namespaceId,{repositoryUrl:this.repositoryUrl().trim(),mainBranch:this.mainBranch().trim()||void 0,serviceAuthSettingId:this.serviceAuthSettingId(),autoWorktreeForRootCases:this.autoWorktree(),setupCommand:this.setupCommand().trim()||void 0}).pipe(U(this.destroyRef),ya(t=>(console.error("Failed to save the Git association",t),this.errorMessage.set(this.messageOf(t)),this.isSaving.set(false),br(null)))).subscribe(t=>{t&&this.acceptAssociation(t),this.isSaving.set(false);}));}remove(){!this.associationLoaded()||this.isLoading()||this.isSaving()||!this.isAssociated()||confirm("Remove the repository association? Existing workspaces keep their worktree.")&&(this.isSaving.set(true),this.gitApi.removeAssociationNamespaceGit(this.namespaceId).pipe(U(this.destroyRef),ya(t=>(console.error("Failed to remove the Git association",t),this.errorMessage.set(this.messageOf(t)),this.isSaving.set(false),br(null)))).subscribe(t=>{t&&this.acceptAssociation(t),this.isSaving.set(false);}));}cancel(){this.router.navigate(["/agentos/namespaces"]);}messageOf(t){return t.error?.message??t.message??"Unexpected error"}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=xw({type:o,selectors:[["agentos-namespace-git"]],decls:10,vars:1,consts:[[1,"namespace-git"],[1,"namespace-git__header"],["type","button","title","Back to namespaces",1,"namespace-git__back",3,"click"],[1,"namespace-git__back-icon"],[1,"namespace-git__title"],[1,"namespace-git__loading"],[1,"namespace-git__body"],[1,"namespace-git__hint"],["role","alert",1,"namespace-git__error"],["type","button",1,"namespace-git__retry"],[1,"namespace-git__status",3,"namespace-git__status--failed","namespace-git__status--ready"],[1,"namespace-git__section",3,"disabled"],[1,"namespace-git__label"],[1,"namespace-git__field"],[1,"namespace-git__field-label"],["type","url","placeholder","https://forge.example/org/project.git","name","repositoryUrl",1,"namespace-git__input",3,"ngModelChange","ngModel"],[1,"namespace-git__field-hint"],["type","text","placeholder","main","name","mainBranch",1,"namespace-git__input",3,"ngModelChange","ngModel"],["name","serviceAuthSettingId",1,"namespace-git__input",3,"ngModelChange","ngModel"],["value",""],[3,"value"],[1,"namespace-git__field-hint","namespace-git__field-hint--warn"],[1,"namespace-git__checkbox"],["type","checkbox","name","autoWorktree",3,"ngModelChange","ngModel"],["type","text","placeholder","pnpm install --ignore-scripts","name","setupCommand",1,"namespace-git__input",3,"ngModelChange","ngModel"],[1,"namespace-git__actions"],["type","button",1,"namespace-git__save",3,"click","disabled"],["type","button",1,"namespace-git__remove",3,"disabled"],["type","button",1,"namespace-git__cancel",3,"click"],["type","button",1,"namespace-git__retry",3,"click"],[1,"namespace-git__status"],[1,"namespace-git__status-reason"],["type","button",1,"namespace-git__remove",3,"click","disabled"]],template:function(e,l){e&1&&(ws(0,"div",0)(1,"header",1)(2,"button",2),Rg("click",function(){return l.cancel()}),ws(3,"span",3),GC(4,"\u2190"),pl(),GC(5," Namespaces "),pl(),ws(6,"h1",4),GC(7,"Git repository"),pl()(),Jw(8,J,2,0,"p",5)(9,ae,53,14,"div",6),pl()),e&2&&(XE(8),eC(l.isLoading()?8:9));},dependencies:[ti,Qn,ei,Ye,wt,At,Zn,cn],styles:[".namespace-git[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.namespace-git__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.namespace-git__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-primary, #007aff);font-family:inherit}.namespace-git__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.namespace-git__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem}.namespace-git__body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.namespace-git__hint[_ngcontent-%COMP%]{margin:0;font-size:.875rem;color:var(--color-text-secondary, #6b7280)}.namespace-git__error[_ngcontent-%COMP%]{margin:0;padding:.75rem;border-radius:.375rem;background:var(--red-bg, #fef2f2);color:var(--color-error, #b91c1c);font-size:.875rem}.namespace-git__status[_ngcontent-%COMP%]{margin:0;padding:.5rem .75rem;border-radius:.375rem;background:var(--color-surface-secondary, #f3f4f6);font-size:.875rem;display:flex;flex-direction:column;gap:.25rem}.namespace-git__status--ready[_ngcontent-%COMP%]{background:var(--color-success-bg, #ecfdf5);color:var(--color-success, #047857)}.namespace-git__status--failed[_ngcontent-%COMP%]{background:var(--red-bg, #fef2f2);color:var(--color-error, #b91c1c)}.namespace-git__status-reason[_ngcontent-%COMP%]{font-size:.8125rem;opacity:.9}.namespace-git__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;border:1px solid var(--color-border, #e5e7eb);border-radius:.5rem;padding:1rem;margin:0}.namespace-git__label[_ngcontent-%COMP%]{font-weight:600;font-size:.9375rem;padding:0 .25rem}.namespace-git__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.namespace-git__field-label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500}.namespace-git__field-hint[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-text-secondary, #6b7280)}.namespace-git__field-hint--warn[_ngcontent-%COMP%]{color:var(--color-warning, #b45309)}.namespace-git__input[_ngcontent-%COMP%]{font-family:inherit;font-size:.875rem;padding:.5rem .625rem;border:1px solid var(--color-border, #e5e7eb);border-radius:.375rem;background:var(--color-surface, #fff);color:inherit}.namespace-git__checkbox[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;font-size:.875rem;cursor:pointer}.namespace-git__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;align-items:center}.namespace-git__save[_ngcontent-%COMP%], .namespace-git__retry[_ngcontent-%COMP%], .namespace-git__remove[_ngcontent-%COMP%], .namespace-git__cancel[_ngcontent-%COMP%]{font-family:inherit;font-size:.875rem;padding:.5rem 1rem;border-radius:.375rem;cursor:pointer;border:1px solid transparent}.namespace-git__save[_ngcontent-%COMP%]:disabled, .namespace-git__retry[_ngcontent-%COMP%]:disabled, .namespace-git__remove[_ngcontent-%COMP%]:disabled, .namespace-git__cancel[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.namespace-git__save[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);color:var(--color-text-on-accent, #fff)}.namespace-git__remove[_ngcontent-%COMP%]{background:none;border-color:var(--color-error, #b91c1c);color:var(--color-error, #b91c1c)}.namespace-git__cancel[_ngcontent-%COMP%], .namespace-git__retry[_ngcontent-%COMP%]{background:none;border-color:var(--color-border, #e5e7eb);color:inherit}"]})};
2
2
  export{q as NamespaceGitComponent};
@@ -1 +1 @@
1
- import {g,dl as de,W as x}from'./main-ZCPOJMDG.js';var c=class r{api=g(de);getById(e){return this.api.getByIdScheduledPrompt(e)}listPlatform(){return this.api.searchScheduledPrompt({namespaceId:null,userId:null})}listByNamespace(e){return this.api.searchScheduledPrompt({namespaceId:e,userId:null})}search(e){return this.api.searchScheduledPrompt(e)}listEffective(e){return this.api.resolveEffectiveScheduledPrompt(e)}create(e){return this.api.createScheduledPrompt(e)}update(e,t){return this.api.updateScheduledPrompt(e,t)}enable(e){return this.api.enableScheduledPrompt(e)}disable(e){return this.api.disableScheduledPrompt(e)}delete(e){return this.api.deleteScheduledPrompt(e)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=x({token:r,factory:r.\u0275fac,providedIn:"root"})};export{c};
1
+ import {g,dl as de,W as x}from'./main-JF54VQMT.js';var c=class r{api=g(de);getById(e){return this.api.getByIdScheduledPrompt(e)}listPlatform(){return this.api.searchScheduledPrompt({namespaceId:null,userId:null})}listByNamespace(e){return this.api.searchScheduledPrompt({namespaceId:e,userId:null})}search(e){return this.api.searchScheduledPrompt(e)}listEffective(e){return this.api.resolveEffectiveScheduledPrompt(e)}create(e){return this.api.createScheduledPrompt(e)}update(e,t){return this.api.updateScheduledPrompt(e,t)}enable(e){return this.api.enableScheduledPrompt(e)}disable(e){return this.api.disableScheduledPrompt(e)}delete(e){return this.api.deleteScheduledPrompt(e)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=x({token:r,factory:r.\u0275fac,providedIn:"root"})};export{c};
@@ -1,4 +1,4 @@
1
- import {ct as vi,e as xw,T as Tg,z as Ug,aL as wo,aM as Zn,bE as vt,aO as wt,cZ as fn,cT as Gp,c_ as he$1,cV as vg,bA as yC,k as ws,bB as vC,o as pl,b5 as nT,ad as Hg,J as Jw,v as eC,X as XE,aW as C,bv as Fg,E as EC,I as IC,g,az as Xt$1,c$ as kn,bw as St,bG as p,aP as G,aR as Fs,aU as Ue,aV as U,G as Gi,an as ue,al as vt$1,ae as kt,r as re$1,d0 as wa,bL as pe,bs as Tl,ap as Cd,bu as Ve$1,c2 as ME,aA as an,B as Pg,bt as Qn,aS as K,cO as us,bN as F,bR as wd,cL as vd,bP as Wy,a9 as lC,q as Rg,ac as gC,bV as Zy,aN as Nn,bD as ge,aQ as $a,bM as mr,d1 as lt,d2 as wt$1,d3 as I,b_ as xt,bX as Pt,w,aZ as js,aw as hl,cJ as Og,n as GC,ax as gl,b$ as kC,a8 as Yg,c3 as kt$1,cD as Te,cz as to,aa as If,ab as wf}from'./main-ZCPOJMDG.js';var Xt=["tooltip"],Ut=20;var qt=new C("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let n=g(pe);return ()=>kt$1(n,{scrollThrottle:Ut})}}),$t=new C("mat-tooltip-default-options",{providedIn:"root",factory:()=>({showDelay:0,hideDelay:0,touchendHideDelay:1500})});var Ht="tooltip-panel",Kt={passive:true},Jt=8,te=8,ee=24,ie=200,ne=(()=>{class n{_elementRef=g(Xt$1);_ngZone=g(G);_platform=g(p);_ariaDescriber=g($a);_focusMonitor=g(St);_dir=g(Qn);_injector=g(pe);_viewContainerRef=g(mr);_mediaMatcher=g(lt);_document=g(U);_renderer=g(Fs);_animationsDisabled=K();_defaultOptions=g($t,{optional:true});_overlayRef=null;_tooltipInstance=null;_overlayPanelClass;_portal;_position="below";_positionAtOrigin=false;_disabled=false;_tooltipClass;_viewInitialized=false;_pointerExitEventsInitialized=false;_tooltipComponent=Gt;_viewportMargin=8;_currentPosition;_cssClassPrefix="mat-mdc";_ariaDescriptionPending=false;_dirSubscribed=false;get position(){return this._position}set position(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()));}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(t){this._positionAtOrigin=vi(t),this._detach(),this._overlayRef=null;}get disabled(){return this._disabled}set disabled(t){let e=vi(t);this._disabled!==e&&(this._disabled=e,e?this.hide(0):this._setupPointerEnterEventsIfNeeded(),this._syncAriaDescription(this.message));}get showDelay(){return this._showDelay}set showDelay(t){this._showDelay=fn(t);}_showDelay;get hideDelay(){return this._hideDelay}set hideDelay(t){this._hideDelay=fn(t),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay);}_hideDelay;touchGestures="auto";get message(){return this._message}set message(t){let e=this._message;this._message=t!=null?String(t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage()),this._syncAriaDescription(e);}_message="";get tooltipClass(){return this._tooltipClass}set tooltipClass(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass);}_eventCleanups=[];_touchstartTimeout=null;_destroyed=new ue;_isDestroyed=false;constructor(){let t=this._defaultOptions;t&&(this._showDelay=t.showDelay,this._hideDelay=t.hideDelay,t.position&&(this.position=t.position),t.positionAtOrigin&&(this.positionAtOrigin=t.positionAtOrigin),t.touchGestures&&(this.touchGestures=t.touchGestures),t.tooltipClass&&(this.tooltipClass=t.tooltipClass)),this._viewportMargin=Jt;}ngAfterViewInit(){this._viewInitialized=true,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Cd(this._destroyed)).subscribe(t=>{t?t==="keyboard"&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0));});}ngOnDestroy(){let t=this._elementRef.nativeElement;this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._eventCleanups.forEach(e=>e()),this._eventCleanups.length=0,this._destroyed.next(),this._destroyed.complete(),this._isDestroyed=true,this._ariaDescriber.removeDescription(t,this.message,"tooltip"),this._focusMonitor.stopMonitoring(t);}show(t=this.showDelay,e){if(this.disabled||!this.message||this._isTooltipVisible()){this._tooltipInstance?._cancelPendingAnimations();return}let i=this._createOverlay(e);this._detach(),this._portal=this._portal||new wt$1(this._tooltipComponent,this._viewContainerRef);let r=this._tooltipInstance=i.attach(this._portal).instance;r._triggerElement=this._elementRef.nativeElement,r._mouseLeaveHideDelay=this._hideDelay,r.afterHidden().pipe(Cd(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),r.show(t);}hide(t=this.hideDelay){let e=this._tooltipInstance;e&&(e.isVisible()?e.hide(t):(e._cancelPendingAnimations(),this._detach()));}toggle(t){this._isTooltipVisible()?this.hide():this.show(void 0,t);}_isTooltipVisible(){return !!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(t){if(this._overlayRef){let a=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!t)&&a._origin instanceof Xt$1)return this._overlayRef;this._detach();}let e=this._injector.get(I).getAncestorScrollContainers(this._elementRef),i=`${this._cssClassPrefix}-${Ht}`,r=xt(this._injector,this.positionAtOrigin?t||this._elementRef:this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(false).withViewportMargin(this._viewportMargin).withScrollableContainers(e).withPopoverLocation("global");return r.positionChanges.pipe(Cd(this._destroyed)).subscribe(a=>{this._updateCurrentPositionClass(a.connectionPair),this._tooltipInstance&&a.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0));}),this._overlayRef=Pt(this._injector,{direction:this._dir,positionStrategy:r,panelClass:this._overlayPanelClass?[...this._overlayPanelClass,i]:i,scrollStrategy:this._injector.get(qt)(),disableAnimations:this._animationsDisabled,eventPredicate:this._overlayEventPredicate}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Cd(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Cd(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Cd(this._destroyed)).subscribe(a=>{a.preventDefault(),a.stopPropagation(),this._ngZone.run(()=>this.hide(0));}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._dirSubscribed||(this._dirSubscribed=true,this._dir.change.pipe(Cd(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef);})),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null;}_updatePosition(t){let e=t.getConfig().positionStrategy,i=this._getOrigin(),r=this._getOverlayPosition();e.withPositions([this._addOffset(w(w({},i.main),r.main)),this._addOffset(w(w({},i.fallback),r.fallback))]);}_addOffset(t){let e=te,i=!this._dir||this._dir.value=="ltr";return t.originY==="top"?t.offsetY=-e:t.originY==="bottom"?t.offsetY=e:t.originX==="start"?t.offsetX=i?-e:e:t.originX==="end"&&(t.offsetX=i?e:-e),t}_getOrigin(){let t=!this._dir||this._dir.value=="ltr",e=this.position,i;e=="above"||e=="below"?i={originX:"center",originY:e=="above"?"top":"bottom"}:e=="before"||e=="left"&&t||e=="right"&&!t?i={originX:"start",originY:"center"}:(e=="after"||e=="right"&&t||e=="left"&&!t)&&(i={originX:"end",originY:"center"});let{x:r,y:a}=this._invertPosition(i.originX,i.originY);return {main:i,fallback:{originX:r,originY:a}}}_getOverlayPosition(){let t=!this._dir||this._dir.value=="ltr",e=this.position,i;e=="above"?i={overlayX:"center",overlayY:"bottom"}:e=="below"?i={overlayX:"center",overlayY:"top"}:e=="before"||e=="left"&&t||e=="right"&&!t?i={overlayX:"end",overlayY:"center"}:(e=="after"||e=="right"&&t||e=="left"&&!t)&&(i={overlayX:"start",overlayY:"center"});let{x:r,y:a}=this._invertPosition(i.overlayX,i.overlayY);return {main:i,fallback:{overlayX:r,overlayY:a}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),ME(()=>{this._tooltipInstance&&this._overlayRef.updatePosition();},{injector:this._injector}));}_setTooltipClass(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t instanceof Set?Array.from(t):t,this._tooltipInstance._markForCheck());}_invertPosition(t,e){return this.position==="above"||this.position==="below"?e==="top"?e="bottom":e==="bottom"&&(e="top"):t==="end"?t="start":t==="start"&&(t="end"),{x:t,y:e}}_updateCurrentPositionClass(t){let{overlayY:e,originX:i,originY:r}=t,a;if(e==="center"?this._dir&&this._dir.value==="rtl"?a=i==="end"?"left":"right":a=i==="start"?"left":"right":a=e==="bottom"&&r==="top"?"above":"below",a!==this._currentPosition){let A=this._overlayRef;if(A){let ut=`${this._cssClassPrefix}-${Ht}-`;A.removePanelClass(ut+this._currentPosition),A.addPanelClass(ut+a);}this._currentPosition=a;}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._eventCleanups.length||(this._isTouchPlatform()?this.touchGestures!=="off"&&(this._disableNativeGesturesIfNecessary(),this._addListener("touchstart",t=>{let e=t.targetTouches?.[0],i=e?{x:e.clientX,y:e.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),this._touchstartTimeout&&clearTimeout(this._touchstartTimeout);let r=500;this._touchstartTimeout=setTimeout(()=>{this._touchstartTimeout=null,this.show(void 0,i);},this._defaultOptions?.touchLongPressShowDelay??r);})):this._addListener("mouseenter",t=>{this._setupPointerExitEventsIfNeeded();let e;t.x!==void 0&&t.y!==void 0&&(e=t),this.show(void 0,e);}));}_setupPointerExitEventsIfNeeded(){if(!this._pointerExitEventsInitialized){if(this._pointerExitEventsInitialized=true,!this._isTouchPlatform())this._addListener("mouseleave",t=>{let e=t.relatedTarget;(!e||!this._overlayRef?.overlayElement.contains(e))&&this.hide();}),this._addListener("wheel",t=>{if(this._isTooltipVisible()){let e=this._document.elementFromPoint(t.clientX,t.clientY),i=this._elementRef.nativeElement;e!==i&&!i.contains(e)&&this.hide();}});else if(this.touchGestures!=="off"){this._disableNativeGesturesIfNecessary();let t=()=>{this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions?.touchendHideDelay);};this._addListener("touchend",t),this._addListener("touchcancel",t);}}}_addListener(t,e){this._eventCleanups.push(this._renderer.listen(this._elementRef.nativeElement,t,e,Kt));}_isTouchPlatform(){let t=this._defaultOptions?.detectHoverCapability;return typeof t=="function"?!t():this._platform.IOS||this._platform.ANDROID?true:this._platform.isBrowser?!!t&&this._mediaMatcher.matchMedia("(any-hover: none)").matches:false}_disableNativeGesturesIfNecessary(){let t=this.touchGestures;if(t!=="off"){let e=this._elementRef.nativeElement,i=e.style;(t==="on"||e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA")&&(i.userSelect=i.msUserSelect=i.webkitUserSelect=i.MozUserSelect="none"),(t==="on"||!e.draggable)&&(i.webkitUserDrag="none"),i.touchAction="none",i.webkitTapHighlightColor="transparent";}}_syncAriaDescription(t){this._ariaDescriptionPending||(this._ariaDescriptionPending=true,this._ariaDescriber.removeDescription(this._elementRef.nativeElement,t,"tooltip"),this._isDestroyed||ME({write:()=>{this._ariaDescriptionPending=false,this.message&&!this.disabled&&this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip");}},{injector:this._injector}));}_overlayEventPredicate=t=>t.type==="keydown"?this._isTooltipVisible()&&t.keyCode===27&&!Ve$1(t):true;static \u0275fac=function(e){return new(e||n)};static \u0275dir=js({type:n,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(e,i){e&2&&Ug("mat-mdc-tooltip-disabled",i.disabled);},inputs:{position:[0,"matTooltipPosition","position"],positionAtOrigin:[0,"matTooltipPositionAtOrigin","positionAtOrigin"],disabled:[0,"matTooltipDisabled","disabled"],showDelay:[0,"matTooltipShowDelay","showDelay"],hideDelay:[0,"matTooltipHideDelay","hideDelay"],touchGestures:[0,"matTooltipTouchGestures","touchGestures"],message:[0,"matTooltip","message"],tooltipClass:[0,"matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]})}return n})(),Gt=(()=>{class n{_changeDetectorRef=g(Tl);_elementRef=g(Xt$1);_isMultiline=false;message;tooltipClass;_showTimeoutId;_hideTimeoutId;_triggerElement;_mouseLeaveHideDelay;_animationsDisabled=K();_tooltip;_closeOnInteraction=false;_isVisible=false;_onHide=new ue;_showAnimation="mat-mdc-tooltip-show";_hideAnimation="mat-mdc-tooltip-hide";show(t){this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(true),this._showTimeoutId=void 0;},t);}hide(t){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(false),this._hideTimeoutId=void 0;},t);}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null;}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0);}_markForCheck(){this._changeDetectorRef.markForCheck();}_handleMouseLeave({relatedTarget:t}){(!t||!this._triggerElement.contains(t))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(false));}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck();}_isTooltipMultiline(){let t=this._elementRef.nativeElement.getBoundingClientRect();return t.height>ee&&t.width>=ie}_handleAnimationEnd({animationName:t}){(t===this._showAnimation||t===this._hideAnimation)&&this._finalizeAnimation(t===this._showAnimation);}_cancelPendingAnimations(){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0;}_finalizeAnimation(t){t?this._closeOnInteraction=true:this.isVisible()||this._onHide.next();}_toggleVisibility(t){let e=this._tooltip.nativeElement,i=this._showAnimation,r=this._hideAnimation;if(e.classList.remove(t?r:i),e.classList.add(t?i:r),this._isVisible!==t&&(this._isVisible=t,this._changeDetectorRef.markForCheck()),t&&!this._animationsDisabled&&typeof getComputedStyle=="function"){let a=getComputedStyle(e);(a.getPropertyValue("animation-duration")==="0s"||a.getPropertyValue("animation-name")==="none")&&(this._animationsDisabled=true);}t&&this._onShow(),this._animationsDisabled&&(e.classList.add("_mat-animation-noopable"),this._finalizeAnimation(t));}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=xw({type:n,selectors:[["mat-tooltip-component"]],viewQuery:function(e,i){if(e&1&&Pg(Xt,7),e&2){let r;EC(r=IC())&&(i._tooltip=r.first);}},hostAttrs:["aria-hidden","true"],hostBindings:function(e,i){e&1&&Rg("mouseleave",function(a){return i._handleMouseLeave(a)});},decls:4,vars:5,consts:[["tooltip",""],[1,"mdc-tooltip","mat-mdc-tooltip",3,"animationend"],[1,"mat-mdc-tooltip-surface","mdc-tooltip__surface"]],template:function(e,i){e&1&&(hl(0,"div",1,0),Og("animationend",function(a){return i._handleAnimationEnd(a)}),hl(2,"div",2),GC(3),gl()()),e&2&&(kC(i.tooltipClass),Ug("mdc-tooltip--multiline",i._isMultiline),XE(3),Yg(i.message));},styles:[`.mat-mdc-tooltip {
1
+ import {ct as vi,e as xw,T as Tg,z as Ug,aL as wo,aM as Zn,bE as vt,aO as wt,cZ as fn,cT as Gp,c_ as he$1,cV as vg,bA as yC,k as ws,bB as vC,o as pl,b5 as nT,ad as Hg,J as Jw,v as eC,X as XE,aW as C,bv as Fg,E as EC,I as IC,g,az as Xt$1,c$ as kn,bw as St,bG as p,aP as G,aR as Fs,aU as Ue,aV as U,G as Gi,an as ue,al as vt$1,ae as kt,r as re$1,d0 as wa,bL as pe,bs as Tl,ap as Cd,bu as Ve$1,c2 as ME,aA as an,B as Pg,bt as Qn,aS as K,cO as us,bN as F,bR as wd,cL as vd,bP as Wy,a9 as lC,q as Rg,ac as gC,bV as Zy,aN as Nn,bD as ge,aQ as $a,bM as mr,d1 as lt,d2 as wt$1,d3 as I,b_ as xt,bX as Pt,w,aZ as js,aw as hl,cJ as Og,n as GC,ax as gl,b$ as kC,a8 as Yg,c3 as kt$1,cD as Te,cz as to,aa as If,ab as wf}from'./main-JF54VQMT.js';var Xt=["tooltip"],Ut=20;var qt=new C("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let n=g(pe);return ()=>kt$1(n,{scrollThrottle:Ut})}}),$t=new C("mat-tooltip-default-options",{providedIn:"root",factory:()=>({showDelay:0,hideDelay:0,touchendHideDelay:1500})});var Ht="tooltip-panel",Kt={passive:true},Jt=8,te=8,ee=24,ie=200,ne=(()=>{class n{_elementRef=g(Xt$1);_ngZone=g(G);_platform=g(p);_ariaDescriber=g($a);_focusMonitor=g(St);_dir=g(Qn);_injector=g(pe);_viewContainerRef=g(mr);_mediaMatcher=g(lt);_document=g(U);_renderer=g(Fs);_animationsDisabled=K();_defaultOptions=g($t,{optional:true});_overlayRef=null;_tooltipInstance=null;_overlayPanelClass;_portal;_position="below";_positionAtOrigin=false;_disabled=false;_tooltipClass;_viewInitialized=false;_pointerExitEventsInitialized=false;_tooltipComponent=Gt;_viewportMargin=8;_currentPosition;_cssClassPrefix="mat-mdc";_ariaDescriptionPending=false;_dirSubscribed=false;get position(){return this._position}set position(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()));}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(t){this._positionAtOrigin=vi(t),this._detach(),this._overlayRef=null;}get disabled(){return this._disabled}set disabled(t){let e=vi(t);this._disabled!==e&&(this._disabled=e,e?this.hide(0):this._setupPointerEnterEventsIfNeeded(),this._syncAriaDescription(this.message));}get showDelay(){return this._showDelay}set showDelay(t){this._showDelay=fn(t);}_showDelay;get hideDelay(){return this._hideDelay}set hideDelay(t){this._hideDelay=fn(t),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay);}_hideDelay;touchGestures="auto";get message(){return this._message}set message(t){let e=this._message;this._message=t!=null?String(t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage()),this._syncAriaDescription(e);}_message="";get tooltipClass(){return this._tooltipClass}set tooltipClass(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass);}_eventCleanups=[];_touchstartTimeout=null;_destroyed=new ue;_isDestroyed=false;constructor(){let t=this._defaultOptions;t&&(this._showDelay=t.showDelay,this._hideDelay=t.hideDelay,t.position&&(this.position=t.position),t.positionAtOrigin&&(this.positionAtOrigin=t.positionAtOrigin),t.touchGestures&&(this.touchGestures=t.touchGestures),t.tooltipClass&&(this.tooltipClass=t.tooltipClass)),this._viewportMargin=Jt;}ngAfterViewInit(){this._viewInitialized=true,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Cd(this._destroyed)).subscribe(t=>{t?t==="keyboard"&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0));});}ngOnDestroy(){let t=this._elementRef.nativeElement;this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._eventCleanups.forEach(e=>e()),this._eventCleanups.length=0,this._destroyed.next(),this._destroyed.complete(),this._isDestroyed=true,this._ariaDescriber.removeDescription(t,this.message,"tooltip"),this._focusMonitor.stopMonitoring(t);}show(t=this.showDelay,e){if(this.disabled||!this.message||this._isTooltipVisible()){this._tooltipInstance?._cancelPendingAnimations();return}let i=this._createOverlay(e);this._detach(),this._portal=this._portal||new wt$1(this._tooltipComponent,this._viewContainerRef);let r=this._tooltipInstance=i.attach(this._portal).instance;r._triggerElement=this._elementRef.nativeElement,r._mouseLeaveHideDelay=this._hideDelay,r.afterHidden().pipe(Cd(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),r.show(t);}hide(t=this.hideDelay){let e=this._tooltipInstance;e&&(e.isVisible()?e.hide(t):(e._cancelPendingAnimations(),this._detach()));}toggle(t){this._isTooltipVisible()?this.hide():this.show(void 0,t);}_isTooltipVisible(){return !!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(t){if(this._overlayRef){let a=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!t)&&a._origin instanceof Xt$1)return this._overlayRef;this._detach();}let e=this._injector.get(I).getAncestorScrollContainers(this._elementRef),i=`${this._cssClassPrefix}-${Ht}`,r=xt(this._injector,this.positionAtOrigin?t||this._elementRef:this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(false).withViewportMargin(this._viewportMargin).withScrollableContainers(e).withPopoverLocation("global");return r.positionChanges.pipe(Cd(this._destroyed)).subscribe(a=>{this._updateCurrentPositionClass(a.connectionPair),this._tooltipInstance&&a.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0));}),this._overlayRef=Pt(this._injector,{direction:this._dir,positionStrategy:r,panelClass:this._overlayPanelClass?[...this._overlayPanelClass,i]:i,scrollStrategy:this._injector.get(qt)(),disableAnimations:this._animationsDisabled,eventPredicate:this._overlayEventPredicate}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Cd(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Cd(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Cd(this._destroyed)).subscribe(a=>{a.preventDefault(),a.stopPropagation(),this._ngZone.run(()=>this.hide(0));}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._dirSubscribed||(this._dirSubscribed=true,this._dir.change.pipe(Cd(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef);})),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null;}_updatePosition(t){let e=t.getConfig().positionStrategy,i=this._getOrigin(),r=this._getOverlayPosition();e.withPositions([this._addOffset(w(w({},i.main),r.main)),this._addOffset(w(w({},i.fallback),r.fallback))]);}_addOffset(t){let e=te,i=!this._dir||this._dir.value=="ltr";return t.originY==="top"?t.offsetY=-e:t.originY==="bottom"?t.offsetY=e:t.originX==="start"?t.offsetX=i?-e:e:t.originX==="end"&&(t.offsetX=i?e:-e),t}_getOrigin(){let t=!this._dir||this._dir.value=="ltr",e=this.position,i;e=="above"||e=="below"?i={originX:"center",originY:e=="above"?"top":"bottom"}:e=="before"||e=="left"&&t||e=="right"&&!t?i={originX:"start",originY:"center"}:(e=="after"||e=="right"&&t||e=="left"&&!t)&&(i={originX:"end",originY:"center"});let{x:r,y:a}=this._invertPosition(i.originX,i.originY);return {main:i,fallback:{originX:r,originY:a}}}_getOverlayPosition(){let t=!this._dir||this._dir.value=="ltr",e=this.position,i;e=="above"?i={overlayX:"center",overlayY:"bottom"}:e=="below"?i={overlayX:"center",overlayY:"top"}:e=="before"||e=="left"&&t||e=="right"&&!t?i={overlayX:"end",overlayY:"center"}:(e=="after"||e=="right"&&t||e=="left"&&!t)&&(i={overlayX:"start",overlayY:"center"});let{x:r,y:a}=this._invertPosition(i.overlayX,i.overlayY);return {main:i,fallback:{overlayX:r,overlayY:a}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),ME(()=>{this._tooltipInstance&&this._overlayRef.updatePosition();},{injector:this._injector}));}_setTooltipClass(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t instanceof Set?Array.from(t):t,this._tooltipInstance._markForCheck());}_invertPosition(t,e){return this.position==="above"||this.position==="below"?e==="top"?e="bottom":e==="bottom"&&(e="top"):t==="end"?t="start":t==="start"&&(t="end"),{x:t,y:e}}_updateCurrentPositionClass(t){let{overlayY:e,originX:i,originY:r}=t,a;if(e==="center"?this._dir&&this._dir.value==="rtl"?a=i==="end"?"left":"right":a=i==="start"?"left":"right":a=e==="bottom"&&r==="top"?"above":"below",a!==this._currentPosition){let A=this._overlayRef;if(A){let ut=`${this._cssClassPrefix}-${Ht}-`;A.removePanelClass(ut+this._currentPosition),A.addPanelClass(ut+a);}this._currentPosition=a;}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._eventCleanups.length||(this._isTouchPlatform()?this.touchGestures!=="off"&&(this._disableNativeGesturesIfNecessary(),this._addListener("touchstart",t=>{let e=t.targetTouches?.[0],i=e?{x:e.clientX,y:e.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),this._touchstartTimeout&&clearTimeout(this._touchstartTimeout);let r=500;this._touchstartTimeout=setTimeout(()=>{this._touchstartTimeout=null,this.show(void 0,i);},this._defaultOptions?.touchLongPressShowDelay??r);})):this._addListener("mouseenter",t=>{this._setupPointerExitEventsIfNeeded();let e;t.x!==void 0&&t.y!==void 0&&(e=t),this.show(void 0,e);}));}_setupPointerExitEventsIfNeeded(){if(!this._pointerExitEventsInitialized){if(this._pointerExitEventsInitialized=true,!this._isTouchPlatform())this._addListener("mouseleave",t=>{let e=t.relatedTarget;(!e||!this._overlayRef?.overlayElement.contains(e))&&this.hide();}),this._addListener("wheel",t=>{if(this._isTooltipVisible()){let e=this._document.elementFromPoint(t.clientX,t.clientY),i=this._elementRef.nativeElement;e!==i&&!i.contains(e)&&this.hide();}});else if(this.touchGestures!=="off"){this._disableNativeGesturesIfNecessary();let t=()=>{this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions?.touchendHideDelay);};this._addListener("touchend",t),this._addListener("touchcancel",t);}}}_addListener(t,e){this._eventCleanups.push(this._renderer.listen(this._elementRef.nativeElement,t,e,Kt));}_isTouchPlatform(){let t=this._defaultOptions?.detectHoverCapability;return typeof t=="function"?!t():this._platform.IOS||this._platform.ANDROID?true:this._platform.isBrowser?!!t&&this._mediaMatcher.matchMedia("(any-hover: none)").matches:false}_disableNativeGesturesIfNecessary(){let t=this.touchGestures;if(t!=="off"){let e=this._elementRef.nativeElement,i=e.style;(t==="on"||e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA")&&(i.userSelect=i.msUserSelect=i.webkitUserSelect=i.MozUserSelect="none"),(t==="on"||!e.draggable)&&(i.webkitUserDrag="none"),i.touchAction="none",i.webkitTapHighlightColor="transparent";}}_syncAriaDescription(t){this._ariaDescriptionPending||(this._ariaDescriptionPending=true,this._ariaDescriber.removeDescription(this._elementRef.nativeElement,t,"tooltip"),this._isDestroyed||ME({write:()=>{this._ariaDescriptionPending=false,this.message&&!this.disabled&&this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip");}},{injector:this._injector}));}_overlayEventPredicate=t=>t.type==="keydown"?this._isTooltipVisible()&&t.keyCode===27&&!Ve$1(t):true;static \u0275fac=function(e){return new(e||n)};static \u0275dir=js({type:n,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(e,i){e&2&&Ug("mat-mdc-tooltip-disabled",i.disabled);},inputs:{position:[0,"matTooltipPosition","position"],positionAtOrigin:[0,"matTooltipPositionAtOrigin","positionAtOrigin"],disabled:[0,"matTooltipDisabled","disabled"],showDelay:[0,"matTooltipShowDelay","showDelay"],hideDelay:[0,"matTooltipHideDelay","hideDelay"],touchGestures:[0,"matTooltipTouchGestures","touchGestures"],message:[0,"matTooltip","message"],tooltipClass:[0,"matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]})}return n})(),Gt=(()=>{class n{_changeDetectorRef=g(Tl);_elementRef=g(Xt$1);_isMultiline=false;message;tooltipClass;_showTimeoutId;_hideTimeoutId;_triggerElement;_mouseLeaveHideDelay;_animationsDisabled=K();_tooltip;_closeOnInteraction=false;_isVisible=false;_onHide=new ue;_showAnimation="mat-mdc-tooltip-show";_hideAnimation="mat-mdc-tooltip-hide";show(t){this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(true),this._showTimeoutId=void 0;},t);}hide(t){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(false),this._hideTimeoutId=void 0;},t);}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null;}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0);}_markForCheck(){this._changeDetectorRef.markForCheck();}_handleMouseLeave({relatedTarget:t}){(!t||!this._triggerElement.contains(t))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(false));}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck();}_isTooltipMultiline(){let t=this._elementRef.nativeElement.getBoundingClientRect();return t.height>ee&&t.width>=ie}_handleAnimationEnd({animationName:t}){(t===this._showAnimation||t===this._hideAnimation)&&this._finalizeAnimation(t===this._showAnimation);}_cancelPendingAnimations(){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0;}_finalizeAnimation(t){t?this._closeOnInteraction=true:this.isVisible()||this._onHide.next();}_toggleVisibility(t){let e=this._tooltip.nativeElement,i=this._showAnimation,r=this._hideAnimation;if(e.classList.remove(t?r:i),e.classList.add(t?i:r),this._isVisible!==t&&(this._isVisible=t,this._changeDetectorRef.markForCheck()),t&&!this._animationsDisabled&&typeof getComputedStyle=="function"){let a=getComputedStyle(e);(a.getPropertyValue("animation-duration")==="0s"||a.getPropertyValue("animation-name")==="none")&&(this._animationsDisabled=true);}t&&this._onShow(),this._animationsDisabled&&(e.classList.add("_mat-animation-noopable"),this._finalizeAnimation(t));}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=xw({type:n,selectors:[["mat-tooltip-component"]],viewQuery:function(e,i){if(e&1&&Pg(Xt,7),e&2){let r;EC(r=IC())&&(i._tooltip=r.first);}},hostAttrs:["aria-hidden","true"],hostBindings:function(e,i){e&1&&Rg("mouseleave",function(a){return i._handleMouseLeave(a)});},decls:4,vars:5,consts:[["tooltip",""],[1,"mdc-tooltip","mat-mdc-tooltip",3,"animationend"],[1,"mat-mdc-tooltip-surface","mdc-tooltip__surface"]],template:function(e,i){e&1&&(hl(0,"div",1,0),Og("animationend",function(a){return i._handleAnimationEnd(a)}),hl(2,"div",2),GC(3),gl()()),e&2&&(kC(i.tooltipClass),Ug("mdc-tooltip--multiline",i._isMultiline),XE(3),Yg(i.message));},styles:[`.mat-mdc-tooltip {
2
2
  position: relative;
3
3
  transform: scale(0);
4
4
  display: inline-flex;
@@ -1 +1 @@
1
- import {N}from'./chunk-BsPV1PdF.js';import {g,F,C as Ce,d9 as D,aJ as Tr,G as Gi,bS as Ea,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,t as CC,u as bg,bg as uT,ah as rT,cb as ZB,cc as qB,m as mT,n as GC,J as Jw,X as XE,a8 as Yg,T as Tg,a5 as vl,v as eC,ac as gC,a9 as lC,aa as If,ab as wf,ag as fT}from'./main-ZCPOJMDG.js';import'./chunk-B4TTtVTM.js';import {$ as $n,S as Se,G as Gn}from'./chunk-Ce5Rvt6i.js';import'./chunk-uUqcsMN3.js';import'./chunk-CLTA0yP4.js';import'./chunk-8RXCnz6r.js';import'./chunk-CQzPiBAl.js';function K(o,t){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 i=gC();return wf(i.onDeleteConfirmed())}),pl(),ws(3,"ds-icon-button",9),Rg("action",function(){If(e);let i=gC();return wf(i.onDeleteCancelled())}),pl();}}function Q(o,t){if(o&1){let e=lC();ws(0,"ds-icon-button",11),Rg("action",function(){If(e);let i=gC(2);return wf(i.onEdit())}),pl(),ws(1,"ds-icon-button",12),Rg("action",function(){If(e);let i=gC(2);return wf(i.onDeleteArmed())}),pl();}}function X(o,t){if(o&1){let e=lC();ws(0,"ds-icon-button",10),Rg("action",function(){If(e);let i=gC();return wf(i.onDuplicate())}),pl(),Jw(1,Q,2,0);}if(o&2){let e=gC();XE(),eC(e.readOnly()?-1:1);}}var Y=Object.freeze({platform:{label:"PLATFORM",ariaLabel:"Configuration partag\xE9e plateforme",variant:"neutral"},namespace:{label:"NS",ariaLabel:"Configuration partag\xE9e du namespace",variant:"neutral"},userOnNs:{label:"USER \xD7 NS",ariaLabel:"Configuration utilisateur sur ce namespace",variant:"info"},userGlobal:{label:"USER GLOBAL",ariaLabel:"Configuration utilisateur globale",variant:"warning"}}),h=class o{config=ZB.required();scope=ZB.required();readOnly=ZB(false);editRequested=qB();deleteRequested=qB();duplicateRequested=qB();pendingDelete=Gi(false);badge=mT(()=>Y[this.scope()]);onEdit(){this.editRequested.emit(this.config());}onDuplicate(){this.duplicateRequested.emit(this.config());}onDeleteArmed(){this.pendingDelete.set(true);}onDeleteConfirmed(){this.pendingDelete.set(false),this.deleteRequested.emit(this.config());}onDeleteCancelled(){this.pendingDelete.set(false);}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=xw({type:o,selectors:[["agentos-integration-config-item"]],inputs:{config:[1,"config"],scope:[1,"scope"],readOnly:[1,"readOnly"]},outputs:{editRequested:"editRequested",deleteRequested:"deleteRequested",duplicateRequested:"duplicateRequested"},decls:12,vars:6,consts:[["role","listitem","dsBlueprint","",1,"integration-config-item"],[1,"integration-config-item__body"],[1,"integration-config-item__heading"],[1,"integration-config-item__name"],[1,"integration-config-item__badge"],[1,"integration-config-item__type"],[1,"integration-config-item__actions"],[1,"integration-config-item__confirm-label"],["icon","check","variant","danger","title","Confirm deletion",3,"action"],["icon","close","title","Cancel deletion",3,"action"],["icon","content_copy","title","Duplicate this configuration",3,"action"],["icon","edit","title","Edit integration",3,"action"],["icon","delete","variant","danger","title","Delete integration",3,"action"]],template:function(e,n){e&1&&(ws(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),GC(4),pl(),ws(5,"span",4),GC(6),pl()(),ws(7,"span",5),GC(8),pl()(),ws(9,"div",6),Jw(10,K,4,0)(11,X,2,1),pl()()),e&2&&(XE(4),Yg(n.config().name),XE(),Tg("data-variant",n.badge().variant)("aria-label",n.badge().ariaLabel),XE(),vl(" ",n.badge().label," "),XE(2),Yg(n.config().integrationType),XE(2),eC(n.pendingDelete()?10:11));},dependencies:[Gn,Se],styles:[".integration-config-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:14px 16px;position:relative;border-radius:0;border:1px solid var(--color-divider);background:var(--color-bg);box-shadow:var(--shadow-sm);overflow:visible;transition:border-color .15s ease}.integration-config-item[_ngcontent-%COMP%]:hover{border-color:var(--color-accent)}.integration-config-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.integration-config-item__heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.integration-config-item__name[_ngcontent-%COMP%]{font-size:15px;font-weight:600;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.integration-config-item__badge[_ngcontent-%COMP%]{flex-shrink:0;font-family:var(--font-heading);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;border-radius:0;padding:.15rem .5rem;white-space:nowrap}.integration-config-item__badge[data-variant=neutral][_ngcontent-%COMP%]{border:1px solid var(--color-divider);color:var(--color-neutral-600);background:transparent}.integration-config-item__badge[data-variant=info][_ngcontent-%COMP%]{border:1px solid color-mix(in srgb,var(--color-info) 40%,transparent);color:var(--color-info);background:color-mix(in srgb,var(--color-info) 10%,transparent)}.integration-config-item__badge[data-variant=warning][_ngcontent-%COMP%]{border:1px solid color-mix(in srgb,var(--color-warning) 40%,transparent);color:var(--color-warning);background:color-mix(in srgb,var(--color-warning) 10%,transparent)}.integration-config-item__type[_ngcontent-%COMP%]{font-size:13px;color:var(--color-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.integration-config-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.integration-config-item[_ngcontent-%COMP%]:hover .integration-config-item__actions[_ngcontent-%COMP%], .integration-config-item[_ngcontent-%COMP%]:focus-within .integration-config-item__actions[_ngcontent-%COMP%]{opacity:1}.integration-config-item__confirm-label[_ngcontent-%COMP%]{font-family:var(--font-heading);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--red-deep);margin-right:.25rem;white-space:nowrap}"]})};var Z=()=>[];function ee(o,t){if(o&1){let e=lC();ws(0,"agentos-integration-config-item",4),Rg("editRequested",function(i){If(e);let x=gC(2);return wf(x.onEdit(i))})("deleteRequested",function(i){If(e);let x=gC(2);return wf(x.deleteConfig(i))}),pl();}o&2&&bg("config",t);}function te(o,t){if(o&1&&Jw(0,ee,1,1,"agentos-integration-config-item",3),o&2){let e,n=t.$implicit,i=gC();eC((e=i.resolveConfig(n.id))?0:-1,e);}}var W=class o{router=g(F);destroyRef=g(Ce);state=g(N);integrationConfigController=g(D);refresh$=new Tr(void 0);isLoading=Gi(true);configs$=this.refresh$.pipe(Ea(()=>(this.isLoading.set(true),this.state.loadPlatformConfigs())));configItems$=this.configs$.pipe(re(t=>t.map(e=>({id:e.id??"",name:e.name,description:e.integrationType}))));configsById=new Map;constructor(){this.configs$.pipe(U(this.destroyRef)).subscribe({next:t=>{this.configsById=new Map(t.map(e=>[e.id??"",e])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","integration-configs","new"]);}deleteConfig(t){this.integrationConfigController.deleteIntegrationConfig(t.id??"").pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}onEdit(t){this.router.navigate(["/agentos","admin","integration-configs",t.id??"","edit"]);}resolveConfig(t){return this.configsById.get(t)??null}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=xw({type:o,selectors:[["agentos-platform-integration-configs"]],decls:5,vars:7,consts:[["integrationConfigItemTpl",""],["title","Platform Integration Configs","emptyMessage","No platform integration configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],["scope","platform",3,"config"],["scope","platform",3,"editRequested","deleteRequested","config"]],template:function(e,n){if(e&1&&(ws(0,"ds-entity-list",1),aT(1,"async"),Rg("createRequested",function(){return n.openCreateForm()}),ws(2,"ds-icon-button",2),Rg("action",function(){return n.goBack()}),pl()(),Eg(3,te,1,1,"ng-template",null,0,fT)),e&2){let i=CC(4);bg("items",uT(1,4,n.configItems$)??rT(6,Z))("loading",n.isLoading())("showCreate",true)("itemTemplate",i);}},dependencies:[$n,h,Se,xb],styles:[".platform-integration-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-integration-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})};export{W as PlatformIntegrationConfigsComponent};
1
+ import {N}from'./chunk-BA1cOeHq.js';import {g,F,C as Ce,d9 as D,aJ as Tr,G as Gi,bS as Ea,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,t as CC,u as bg,bg as uT,ah as rT,cb as ZB,cc as qB,m as mT,n as GC,J as Jw,X as XE,a8 as Yg,T as Tg,a5 as vl,v as eC,ac as gC,a9 as lC,aa as If,ab as wf,ag as fT}from'./main-JF54VQMT.js';import'./chunk-BNAmaIpp.js';import {$ as $n,S as Se,G as Gn}from'./chunk-BbFLEXqO.js';import'./chunk-Di5W20Td.js';import'./chunk-8pxP8BFo.js';import'./chunk-BReYxmMt.js';import'./chunk-DKy8ULGc.js';function K(o,t){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 i=gC();return wf(i.onDeleteConfirmed())}),pl(),ws(3,"ds-icon-button",9),Rg("action",function(){If(e);let i=gC();return wf(i.onDeleteCancelled())}),pl();}}function Q(o,t){if(o&1){let e=lC();ws(0,"ds-icon-button",11),Rg("action",function(){If(e);let i=gC(2);return wf(i.onEdit())}),pl(),ws(1,"ds-icon-button",12),Rg("action",function(){If(e);let i=gC(2);return wf(i.onDeleteArmed())}),pl();}}function X(o,t){if(o&1){let e=lC();ws(0,"ds-icon-button",10),Rg("action",function(){If(e);let i=gC();return wf(i.onDuplicate())}),pl(),Jw(1,Q,2,0);}if(o&2){let e=gC();XE(),eC(e.readOnly()?-1:1);}}var Y=Object.freeze({platform:{label:"PLATFORM",ariaLabel:"Configuration partag\xE9e plateforme",variant:"neutral"},namespace:{label:"NS",ariaLabel:"Configuration partag\xE9e du namespace",variant:"neutral"},userOnNs:{label:"USER \xD7 NS",ariaLabel:"Configuration utilisateur sur ce namespace",variant:"info"},userGlobal:{label:"USER GLOBAL",ariaLabel:"Configuration utilisateur globale",variant:"warning"}}),h=class o{config=ZB.required();scope=ZB.required();readOnly=ZB(false);editRequested=qB();deleteRequested=qB();duplicateRequested=qB();pendingDelete=Gi(false);badge=mT(()=>Y[this.scope()]);onEdit(){this.editRequested.emit(this.config());}onDuplicate(){this.duplicateRequested.emit(this.config());}onDeleteArmed(){this.pendingDelete.set(true);}onDeleteConfirmed(){this.pendingDelete.set(false),this.deleteRequested.emit(this.config());}onDeleteCancelled(){this.pendingDelete.set(false);}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=xw({type:o,selectors:[["agentos-integration-config-item"]],inputs:{config:[1,"config"],scope:[1,"scope"],readOnly:[1,"readOnly"]},outputs:{editRequested:"editRequested",deleteRequested:"deleteRequested",duplicateRequested:"duplicateRequested"},decls:12,vars:6,consts:[["role","listitem","dsBlueprint","",1,"integration-config-item"],[1,"integration-config-item__body"],[1,"integration-config-item__heading"],[1,"integration-config-item__name"],[1,"integration-config-item__badge"],[1,"integration-config-item__type"],[1,"integration-config-item__actions"],[1,"integration-config-item__confirm-label"],["icon","check","variant","danger","title","Confirm deletion",3,"action"],["icon","close","title","Cancel deletion",3,"action"],["icon","content_copy","title","Duplicate this configuration",3,"action"],["icon","edit","title","Edit integration",3,"action"],["icon","delete","variant","danger","title","Delete integration",3,"action"]],template:function(e,n){e&1&&(ws(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),GC(4),pl(),ws(5,"span",4),GC(6),pl()(),ws(7,"span",5),GC(8),pl()(),ws(9,"div",6),Jw(10,K,4,0)(11,X,2,1),pl()()),e&2&&(XE(4),Yg(n.config().name),XE(),Tg("data-variant",n.badge().variant)("aria-label",n.badge().ariaLabel),XE(),vl(" ",n.badge().label," "),XE(2),Yg(n.config().integrationType),XE(2),eC(n.pendingDelete()?10:11));},dependencies:[Gn,Se],styles:[".integration-config-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:14px 16px;position:relative;border-radius:0;border:1px solid var(--color-divider);background:var(--color-bg);box-shadow:var(--shadow-sm);overflow:visible;transition:border-color .15s ease}.integration-config-item[_ngcontent-%COMP%]:hover{border-color:var(--color-accent)}.integration-config-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.integration-config-item__heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.integration-config-item__name[_ngcontent-%COMP%]{font-size:15px;font-weight:600;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.integration-config-item__badge[_ngcontent-%COMP%]{flex-shrink:0;font-family:var(--font-heading);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;border-radius:0;padding:.15rem .5rem;white-space:nowrap}.integration-config-item__badge[data-variant=neutral][_ngcontent-%COMP%]{border:1px solid var(--color-divider);color:var(--color-neutral-600);background:transparent}.integration-config-item__badge[data-variant=info][_ngcontent-%COMP%]{border:1px solid color-mix(in srgb,var(--color-info) 40%,transparent);color:var(--color-info);background:color-mix(in srgb,var(--color-info) 10%,transparent)}.integration-config-item__badge[data-variant=warning][_ngcontent-%COMP%]{border:1px solid color-mix(in srgb,var(--color-warning) 40%,transparent);color:var(--color-warning);background:color-mix(in srgb,var(--color-warning) 10%,transparent)}.integration-config-item__type[_ngcontent-%COMP%]{font-size:13px;color:var(--color-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.integration-config-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.integration-config-item[_ngcontent-%COMP%]:hover .integration-config-item__actions[_ngcontent-%COMP%], .integration-config-item[_ngcontent-%COMP%]:focus-within .integration-config-item__actions[_ngcontent-%COMP%]{opacity:1}.integration-config-item__confirm-label[_ngcontent-%COMP%]{font-family:var(--font-heading);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--red-deep);margin-right:.25rem;white-space:nowrap}"]})};var Z=()=>[];function ee(o,t){if(o&1){let e=lC();ws(0,"agentos-integration-config-item",4),Rg("editRequested",function(i){If(e);let x=gC(2);return wf(x.onEdit(i))})("deleteRequested",function(i){If(e);let x=gC(2);return wf(x.deleteConfig(i))}),pl();}o&2&&bg("config",t);}function te(o,t){if(o&1&&Jw(0,ee,1,1,"agentos-integration-config-item",3),o&2){let e,n=t.$implicit,i=gC();eC((e=i.resolveConfig(n.id))?0:-1,e);}}var W=class o{router=g(F);destroyRef=g(Ce);state=g(N);integrationConfigController=g(D);refresh$=new Tr(void 0);isLoading=Gi(true);configs$=this.refresh$.pipe(Ea(()=>(this.isLoading.set(true),this.state.loadPlatformConfigs())));configItems$=this.configs$.pipe(re(t=>t.map(e=>({id:e.id??"",name:e.name,description:e.integrationType}))));configsById=new Map;constructor(){this.configs$.pipe(U(this.destroyRef)).subscribe({next:t=>{this.configsById=new Map(t.map(e=>[e.id??"",e])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","integration-configs","new"]);}deleteConfig(t){this.integrationConfigController.deleteIntegrationConfig(t.id??"").pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}onEdit(t){this.router.navigate(["/agentos","admin","integration-configs",t.id??"","edit"]);}resolveConfig(t){return this.configsById.get(t)??null}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=xw({type:o,selectors:[["agentos-platform-integration-configs"]],decls:5,vars:7,consts:[["integrationConfigItemTpl",""],["title","Platform Integration Configs","emptyMessage","No platform integration configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],["scope","platform",3,"config"],["scope","platform",3,"editRequested","deleteRequested","config"]],template:function(e,n){if(e&1&&(ws(0,"ds-entity-list",1),aT(1,"async"),Rg("createRequested",function(){return n.openCreateForm()}),ws(2,"ds-icon-button",2),Rg("action",function(){return n.goBack()}),pl()(),Eg(3,te,1,1,"ng-template",null,0,fT)),e&2){let i=CC(4);bg("items",uT(1,4,n.configItems$)??rT(6,Z))("loading",n.isLoading())("showCreate",true)("itemTemplate",i);}},dependencies:[$n,h,Se,xb],styles:[".platform-integration-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-integration-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})};export{W as PlatformIntegrationConfigsComponent};
@@ -1,4 +1,4 @@
1
- import {b as Qe}from'./chunk-uUqcsMN3.js';import {D as D$1,i as y}from'./chunk-CLTA0yP4.js';import {g,D as py,bU as Td,W as x,aL as wo,aM as Zn,aO as wt,az as Xt,bw as St,bs as Tl,aW as C,aS as K,al as vt,aX as D,bx as on,by as um,aT as Ut,e as xw,bz as Oi,aC as Tu,a_ as QT,bA as yC,k as ws,q as Rg,S as Sg,o as pl,J as Jw,bB as vC,t as CC,u as bg,X as XE,z as Ug,T as Tg,v as eC,b5 as nT,bC as Si,c8 as KT,c0 as xg,b$ as kC,B as Pg,E as EC,I as IC,c9 as kf}from'./main-ZCPOJMDG.js';var ae=["switch"],ie=["*"];function ne(a,s){a&1&&(ws(0,"span",11),kf(),ws(1,"svg",13),Sg(2,"path",14),pl(),ws(3,"svg",15),Sg(4,"path",16),pl()());}var ce=new C("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:false,hideIcon:false,disabledInteractive:false})}),b=class{source;checked;constructor(s,e){this.source=s,this.checked=e;}},se=(()=>{class a{_elementRef=g(Xt);_focusMonitor=g(St);_changeDetectorRef=g(Tl);defaults=g(ce);_onChange=e=>{};_onTouched=()=>{};_validatorOnChange=()=>{};_uniqueId;_checked=false;_createChangeEvent(e){return new b(this,e)}_labelId;get buttonId(){return `${this.id||this._uniqueId}-button`}_switchElement;focus(){this._switchElement.nativeElement.focus();}_noopAnimations=K();_focused=false;name=null;id;labelPosition="after";ariaLabel=null;ariaLabelledby=null;ariaDescribedby;required=false;color;disabled=false;disableRipple=false;tabIndex=0;get checked(){return this._checked}set checked(e){this._checked=e,this._changeDetectorRef.markForCheck();}hideIcon;disabledInteractive;change=new vt;toggleChange=new vt;get inputId(){return `${this.id||this._uniqueId}-input`}constructor(){g(D).load(on);let e=g(new um("tabindex"),{optional:true}),i=this.defaults;this.tabIndex=e==null?0:parseInt(e)||0,this.color=i.color||"accent",this.id=this._uniqueId=g(Ut).getId("mat-mdc-slide-toggle-"),this.hideIcon=i.hideIcon??false,this.disabledInteractive=i.disabledInteractive??false,this._labelId=this._uniqueId+"-label";}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,true).subscribe(e=>{e==="keyboard"||e==="program"?(this._focused=true,this._changeDetectorRef.markForCheck()):e||Promise.resolve().then(()=>{this._focused=false,this._onTouched(),this._changeDetectorRef.markForCheck();});});}ngOnChanges(e){e.required&&this._validatorOnChange();}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef);}writeValue(e){this.checked=!!e;}registerOnChange(e){this._onChange=e;}registerOnTouched(e){this._onTouched=e;}validate(e){return this.required&&e.value!==true?{required:true}:null}registerOnValidatorChange(e){this._validatorOnChange=e;}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck();}toggle(){this.checked=!this.checked,this._onChange(this.checked);}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked));}_handleClick(){this.disabled||(this.toggleChange.emit(),this.defaults.disableToggleValue||(this.checked=!this.checked,this._onChange(this.checked),this.change.emit(new b(this,this.checked))));}_getAriaLabelledBy(){return this.ariaLabelledby?this.ariaLabelledby:this.ariaLabel?null:this._labelId}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=xw({type:a,selectors:[["mat-slide-toggle"]],viewQuery:function(i,t){if(i&1&&Pg(ae,5),i&2){let r;EC(r=IC())&&(t._switchElement=r.first);}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:13,hostBindings:function(i,t){i&2&&(xg("id",t.id),Tg("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),kC(t.color?"mat-"+t.color:""),Ug("mat-mdc-slide-toggle-focused",t._focused)("mat-mdc-slide-toggle-checked",t.checked)("_mat-animation-noopable",t._noopAnimations));},inputs:{name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],required:[2,"required","required",QT],color:"color",disabled:[2,"disabled","disabled",QT],disableRipple:[2,"disableRipple","disableRipple",QT],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:KT(e)],checked:[2,"checked","checked",QT],hideIcon:[2,"hideIcon","hideIcon",QT],disabledInteractive:[2,"disabledInteractive","disabledInteractive",QT]},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],features:[nT([{provide:D$1,useExisting:Si(()=>a),multi:true},{provide:y,useExisting:a,multi:true}]),Tu],ngContentSelectors:ie,decls:14,vars:27,consts:[["switch",""],["mat-internal-form-field","",3,"labelPosition"],["role","switch","type","button",1,"mdc-switch",3,"click","tabIndex","disabled"],[1,"mat-mdc-slide-toggle-touch-target"],[1,"mdc-switch__track"],[1,"mdc-switch__handle-track"],[1,"mdc-switch__handle"],[1,"mdc-switch__shadow"],[1,"mdc-elevation-overlay"],[1,"mdc-switch__ripple"],["mat-ripple","",1,"mat-mdc-slide-toggle-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-switch__icons"],[1,"mdc-label",3,"click","for"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--on"],["d","M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--off"],["d","M20 13H4v-2h16v2z"]],template:function(i,t){if(i&1&&(yC(),ws(0,"div",1)(1,"button",2,0),Rg("click",function(){return t._handleClick()}),Sg(3,"div",3)(4,"span",4),ws(5,"span",5)(6,"span",6)(7,"span",7),Sg(8,"span",8),pl(),ws(9,"span",9),Sg(10,"span",10),pl(),Jw(11,ne,5,0,"span",11),pl()()(),ws(12,"label",12),Rg("click",function(ee){return ee.stopPropagation()}),vC(13),pl()()),i&2){let r=CC(2);bg("labelPosition",t.labelPosition),XE(),Ug("mdc-switch--selected",t.checked)("mdc-switch--unselected",!t.checked)("mdc-switch--checked",t.checked)("mdc-switch--disabled",t.disabled)("mat-mdc-slide-toggle-disabled-interactive",t.disabledInteractive),bg("tabIndex",t.disabled&&!t.disabledInteractive?-1:t.tabIndex)("disabled",t.disabled&&!t.disabledInteractive),Tg("id",t.buttonId)("name",t.name)("aria-label",t.ariaLabel)("aria-labelledby",t._getAriaLabelledBy())("aria-describedby",t.ariaDescribedby)("aria-required",t.required||null)("aria-checked",t.checked)("aria-disabled",t.disabled&&t.disabledInteractive?"true":null),XE(9),bg("matRippleTrigger",r)("matRippleDisabled",t.disableRipple||t.disabled)("matRippleCentered",true),XE(),eC(t.hideIcon?-1:11),XE(),bg("for",t.buttonId),Tg("id",t._labelId);}},dependencies:[Oi,Qe],styles:[`.mdc-switch {
1
+ import {b as Qe}from'./chunk-Di5W20Td.js';import {D as D$1,i as y}from'./chunk-8pxP8BFo.js';import {g,D as py,bU as Td,W as x,aL as wo,aM as Zn,aO as wt,az as Xt,bw as St,bs as Tl,aW as C,aS as K,al as vt,aX as D,bx as on,by as um,aT as Ut,e as xw,bz as Oi,aC as Tu,a_ as QT,bA as yC,k as ws,q as Rg,S as Sg,o as pl,J as Jw,bB as vC,t as CC,u as bg,X as XE,z as Ug,T as Tg,v as eC,b5 as nT,bC as Si,c8 as KT,c0 as xg,b$ as kC,B as Pg,E as EC,I as IC,c9 as kf}from'./main-JF54VQMT.js';var ae=["switch"],ie=["*"];function ne(a,s){a&1&&(ws(0,"span",11),kf(),ws(1,"svg",13),Sg(2,"path",14),pl(),ws(3,"svg",15),Sg(4,"path",16),pl()());}var ce=new C("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:false,hideIcon:false,disabledInteractive:false})}),b=class{source;checked;constructor(s,e){this.source=s,this.checked=e;}},se=(()=>{class a{_elementRef=g(Xt);_focusMonitor=g(St);_changeDetectorRef=g(Tl);defaults=g(ce);_onChange=e=>{};_onTouched=()=>{};_validatorOnChange=()=>{};_uniqueId;_checked=false;_createChangeEvent(e){return new b(this,e)}_labelId;get buttonId(){return `${this.id||this._uniqueId}-button`}_switchElement;focus(){this._switchElement.nativeElement.focus();}_noopAnimations=K();_focused=false;name=null;id;labelPosition="after";ariaLabel=null;ariaLabelledby=null;ariaDescribedby;required=false;color;disabled=false;disableRipple=false;tabIndex=0;get checked(){return this._checked}set checked(e){this._checked=e,this._changeDetectorRef.markForCheck();}hideIcon;disabledInteractive;change=new vt;toggleChange=new vt;get inputId(){return `${this.id||this._uniqueId}-input`}constructor(){g(D).load(on);let e=g(new um("tabindex"),{optional:true}),i=this.defaults;this.tabIndex=e==null?0:parseInt(e)||0,this.color=i.color||"accent",this.id=this._uniqueId=g(Ut).getId("mat-mdc-slide-toggle-"),this.hideIcon=i.hideIcon??false,this.disabledInteractive=i.disabledInteractive??false,this._labelId=this._uniqueId+"-label";}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,true).subscribe(e=>{e==="keyboard"||e==="program"?(this._focused=true,this._changeDetectorRef.markForCheck()):e||Promise.resolve().then(()=>{this._focused=false,this._onTouched(),this._changeDetectorRef.markForCheck();});});}ngOnChanges(e){e.required&&this._validatorOnChange();}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef);}writeValue(e){this.checked=!!e;}registerOnChange(e){this._onChange=e;}registerOnTouched(e){this._onTouched=e;}validate(e){return this.required&&e.value!==true?{required:true}:null}registerOnValidatorChange(e){this._validatorOnChange=e;}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck();}toggle(){this.checked=!this.checked,this._onChange(this.checked);}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked));}_handleClick(){this.disabled||(this.toggleChange.emit(),this.defaults.disableToggleValue||(this.checked=!this.checked,this._onChange(this.checked),this.change.emit(new b(this,this.checked))));}_getAriaLabelledBy(){return this.ariaLabelledby?this.ariaLabelledby:this.ariaLabel?null:this._labelId}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=xw({type:a,selectors:[["mat-slide-toggle"]],viewQuery:function(i,t){if(i&1&&Pg(ae,5),i&2){let r;EC(r=IC())&&(t._switchElement=r.first);}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:13,hostBindings:function(i,t){i&2&&(xg("id",t.id),Tg("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),kC(t.color?"mat-"+t.color:""),Ug("mat-mdc-slide-toggle-focused",t._focused)("mat-mdc-slide-toggle-checked",t.checked)("_mat-animation-noopable",t._noopAnimations));},inputs:{name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],required:[2,"required","required",QT],color:"color",disabled:[2,"disabled","disabled",QT],disableRipple:[2,"disableRipple","disableRipple",QT],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:KT(e)],checked:[2,"checked","checked",QT],hideIcon:[2,"hideIcon","hideIcon",QT],disabledInteractive:[2,"disabledInteractive","disabledInteractive",QT]},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],features:[nT([{provide:D$1,useExisting:Si(()=>a),multi:true},{provide:y,useExisting:a,multi:true}]),Tu],ngContentSelectors:ie,decls:14,vars:27,consts:[["switch",""],["mat-internal-form-field","",3,"labelPosition"],["role","switch","type","button",1,"mdc-switch",3,"click","tabIndex","disabled"],[1,"mat-mdc-slide-toggle-touch-target"],[1,"mdc-switch__track"],[1,"mdc-switch__handle-track"],[1,"mdc-switch__handle"],[1,"mdc-switch__shadow"],[1,"mdc-elevation-overlay"],[1,"mdc-switch__ripple"],["mat-ripple","",1,"mat-mdc-slide-toggle-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-switch__icons"],[1,"mdc-label",3,"click","for"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--on"],["d","M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--off"],["d","M20 13H4v-2h16v2z"]],template:function(i,t){if(i&1&&(yC(),ws(0,"div",1)(1,"button",2,0),Rg("click",function(){return t._handleClick()}),Sg(3,"div",3)(4,"span",4),ws(5,"span",5)(6,"span",6)(7,"span",7),Sg(8,"span",8),pl(),ws(9,"span",9),Sg(10,"span",10),pl(),Jw(11,ne,5,0,"span",11),pl()()(),ws(12,"label",12),Rg("click",function(ee){return ee.stopPropagation()}),vC(13),pl()()),i&2){let r=CC(2);bg("labelPosition",t.labelPosition),XE(),Ug("mdc-switch--selected",t.checked)("mdc-switch--unselected",!t.checked)("mdc-switch--checked",t.checked)("mdc-switch--disabled",t.disabled)("mat-mdc-slide-toggle-disabled-interactive",t.disabledInteractive),bg("tabIndex",t.disabled&&!t.disabledInteractive?-1:t.tabIndex)("disabled",t.disabled&&!t.disabledInteractive),Tg("id",t.buttonId)("name",t.name)("aria-label",t.ariaLabel)("aria-labelledby",t._getAriaLabelledBy())("aria-describedby",t.ariaDescribedby)("aria-required",t.required||null)("aria-checked",t.checked)("aria-disabled",t.disabled&&t.disabledInteractive?"true":null),XE(9),bg("matRippleTrigger",r)("matRippleDisabled",t.disableRipple||t.disabled)("matRippleCentered",true),XE(),eC(t.hideIcon?-1:11),XE(),bg("for",t.buttonId),Tg("id",t._labelId);}},dependencies:[Oi,Qe],styles:[`.mdc-switch {
2
2
  align-items: center;
3
3
  background: none;
4
4
  border: none;
@@ -1 +1 @@
1
- import {v}from'./chunk-cA4bIkG2.js';import {R}from'./chunk-BbgxegPT.js';import {N}from'./chunk-BsPV1PdF.js';import {g,ao as W,F,C as Ce,d8 as W$1,a as F$1,Q as br,G as Gi,m as mT,cd as Hf,b as U,e as xw,k as ws,n as GC,o as pl,J as Jw,X as XE,a8 as Yg,v as eC,a9 as lC,q as Rg,s as rC,cH as Kw,a3 as VI,S as Sg,a4 as nC,ac as gC,u as bg,y as oC,a6 as UI,a5 as vl,aa as If,ab as wf}from'./main-ZCPOJMDG.js';import'./chunk-B4TTtVTM.js';import {n as nt}from'./chunk-Ce5Rvt6i.js';import'./chunk-uUqcsMN3.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-CLTA0yP4.js';import'./chunk-8RXCnz6r.js';import'./chunk-CQzPiBAl.js';function le(i,t){i&1&&(ws(0,"p",3),GC(1,"Loading\u2026"),pl());}function se(i,t){if(i&1&&(ws(0,"label",8),Sg(1,"input",27),VI(),ws(2,"span"),GC(3),pl()()),i&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(i,t){if(i&1&&(ws(0,"option",14),GC(1),pl()),i&2){let e=t.$implicit;bg("value",e.type),XE(),Yg(e.displayName);}}function me(i,t){if(i&1&&(ws(0,"option",14),GC(1),pl()),i&2){let e=t.$implicit;bg("value",e),XE(),Yg(e);}}function pe(i,t){if(i&1&&(ws(0,"div",9)(1,"label",28),Sg(2,"input",29),VI(),ws(3,"span",7),GC(4,"Grant automatically"),pl()(),ws(5,"p",30),GC(6),pl()()),i&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(i,t){if(i&1){let e=lC();ws(0,"div",22)(1,"ds-json-schema-form",31),Rg("valueChange",function(s){If(e);let m=gC(2);return wf(m.onParamsChange(s))}),pl()();}if(i&2){let e=gC(2);XE(),bg("schema",t)("value",e.initialParams());}}function ge(i,t){if(i&1){let e=lC();ws(0,"button",32),Rg("click",function(){If(e);let s=gC(2);return wf(s.exportYaml())}),GC(1),pl();}if(i&2){let e=gC(2);bg("disabled",e.isExporting()),XE(),vl(" ",e.isExporting()?"Exporting\u2026":"Export as YAML"," ");}}function ue(i,t){if(i&1){let e=lC();ws(0,"form",5),Rg("ngSubmit",function(){If(e);let s=gC();return wf(s.submit())}),ws(1,"fieldset",6)(2,"legend",7),GC(3,"Scope"),pl(),rC(4,se,4,4,"label",8,Kw().trackByScope,true),pl(),ws(6,"div",9)(7,"label",10),GC(8,"Type "),ws(9,"span",11),GC(10,"*"),pl()(),ws(11,"select",12)(12,"option",13),GC(13,"Select type"),pl(),rC(14,ce,2,2,"option",14,Kw().trackByType,true),pl(),VI(),pl(),ws(16,"div",9)(17,"label",15),GC(18,"Name "),ws(19,"span",11),GC(20,"*"),pl()(),Sg(21,"input",16),VI(),pl(),ws(22,"div",9)(23,"label",17),GC(24,"Description"),pl(),Sg(25,"textarea",18),VI(),pl(),ws(26,"div",9)(27,"label",19),GC(28,"Auth Setting"),pl(),ws(29,"select",20)(30,"option",21),GC(31,"None"),pl(),rC(32,me,2,2,"option",14,nC),pl(),VI(),pl(),Jw(34,pe,7,2,"div",9),Jw(35,de,2,2,"div",22),ws(36,"div",23)(37,"button",24),GC(38),pl(),Jw(39,ge,2,2,"button",25),ws(40,"button",26),Rg("click",function(){If(e);let s=gC();return wf(s.cancel())}),GC(41,"Cancel"),pl()()();}if(i&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 i{route=g(W);router=g(F);destroyRef=g(Ce);state=g(N);integrationTypeController=g(W$1);authSettingState=g(R);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;isAdmin=F$1(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$1(this.integrationTypeController.listTypesIntegrationType(),{initialValue:[]});selectedType=F$1(this.form.controls.type.valueChanges,{initialValue:this.form.controls.type.value});scopeValue=F$1(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||i)};static \u0275cmp=xw({type:i,selectors:[["agentos-integration-form"]],decls:6,vars:2,consts:[[1,"integration-form"],[1,"integration-form__header"],[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,"h1",2),GC(3),pl()(),Jw(4,le,2,0,"p",3)(5,ue,42,12,"form",4),pl()),e&2&&(XE(3),Yg(n.isEditMode()?"Edit integration":"New integration"),XE(),eC(n.isLoading()?4:5));},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__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-C4-wVzVC.js';import {R}from'./chunk-C9MYeBSS.js';import {N}from'./chunk-BA1cOeHq.js';import {g,ao as W,F,C as Ce,d8 as W$1,a as F$1,Q as br,G as Gi,m as mT,cd as Hf,b as U,e as xw,k as ws,n as GC,o as pl,J as Jw,X as XE,a8 as Yg,v as eC,a9 as lC,q as Rg,s as rC,cH as Kw,a3 as VI,S as Sg,a4 as nC,ac as gC,u as bg,y as oC,a6 as UI,a5 as vl,aa as If,ab as wf}from'./main-JF54VQMT.js';import'./chunk-BNAmaIpp.js';import {n as nt}from'./chunk-BbFLEXqO.js';import'./chunk-Di5W20Td.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-8pxP8BFo.js';import'./chunk-BReYxmMt.js';import'./chunk-DKy8ULGc.js';function le(i,t){i&1&&(ws(0,"p",3),GC(1,"Loading\u2026"),pl());}function se(i,t){if(i&1&&(ws(0,"label",8),Sg(1,"input",27),VI(),ws(2,"span"),GC(3),pl()()),i&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(i,t){if(i&1&&(ws(0,"option",14),GC(1),pl()),i&2){let e=t.$implicit;bg("value",e.type),XE(),Yg(e.displayName);}}function me(i,t){if(i&1&&(ws(0,"option",14),GC(1),pl()),i&2){let e=t.$implicit;bg("value",e),XE(),Yg(e);}}function pe(i,t){if(i&1&&(ws(0,"div",9)(1,"label",28),Sg(2,"input",29),VI(),ws(3,"span",7),GC(4,"Grant automatically"),pl()(),ws(5,"p",30),GC(6),pl()()),i&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(i,t){if(i&1){let e=lC();ws(0,"div",22)(1,"ds-json-schema-form",31),Rg("valueChange",function(s){If(e);let m=gC(2);return wf(m.onParamsChange(s))}),pl()();}if(i&2){let e=gC(2);XE(),bg("schema",t)("value",e.initialParams());}}function ge(i,t){if(i&1){let e=lC();ws(0,"button",32),Rg("click",function(){If(e);let s=gC(2);return wf(s.exportYaml())}),GC(1),pl();}if(i&2){let e=gC(2);bg("disabled",e.isExporting()),XE(),vl(" ",e.isExporting()?"Exporting\u2026":"Export as YAML"," ");}}function ue(i,t){if(i&1){let e=lC();ws(0,"form",5),Rg("ngSubmit",function(){If(e);let s=gC();return wf(s.submit())}),ws(1,"fieldset",6)(2,"legend",7),GC(3,"Scope"),pl(),rC(4,se,4,4,"label",8,Kw().trackByScope,true),pl(),ws(6,"div",9)(7,"label",10),GC(8,"Type "),ws(9,"span",11),GC(10,"*"),pl()(),ws(11,"select",12)(12,"option",13),GC(13,"Select type"),pl(),rC(14,ce,2,2,"option",14,Kw().trackByType,true),pl(),VI(),pl(),ws(16,"div",9)(17,"label",15),GC(18,"Name "),ws(19,"span",11),GC(20,"*"),pl()(),Sg(21,"input",16),VI(),pl(),ws(22,"div",9)(23,"label",17),GC(24,"Description"),pl(),Sg(25,"textarea",18),VI(),pl(),ws(26,"div",9)(27,"label",19),GC(28,"Auth Setting"),pl(),ws(29,"select",20)(30,"option",21),GC(31,"None"),pl(),rC(32,me,2,2,"option",14,nC),pl(),VI(),pl(),Jw(34,pe,7,2,"div",9),Jw(35,de,2,2,"div",22),ws(36,"div",23)(37,"button",24),GC(38),pl(),Jw(39,ge,2,2,"button",25),ws(40,"button",26),Rg("click",function(){If(e);let s=gC();return wf(s.cancel())}),GC(41,"Cancel"),pl()()();}if(i&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 i{route=g(W);router=g(F);destroyRef=g(Ce);state=g(N);integrationTypeController=g(W$1);authSettingState=g(R);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;isAdmin=F$1(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$1(this.integrationTypeController.listTypesIntegrationType(),{initialValue:[]});selectedType=F$1(this.form.controls.type.valueChanges,{initialValue:this.form.controls.type.value});scopeValue=F$1(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||i)};static \u0275cmp=xw({type:i,selectors:[["agentos-integration-form"]],decls:6,vars:2,consts:[[1,"integration-form"],[1,"integration-form__header"],[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,"h1",2),GC(3),pl()(),Jw(4,le,2,0,"p",3)(5,ue,42,12,"form",4),pl()),e&2&&(XE(3),Yg(n.isEditMode()?"Edit integration":"New integration"),XE(),eC(n.isLoading()?4:5));},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__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 {n}from'./chunk-CfgXrte_.js';import {O}from'./chunk-DeooMs7E.js';import {v}from'./chunk-cA4bIkG2.js';import {g,ao as W,F as F$1,C as Ce,G as Gi,b as U$1,r as re,bS as Ea,Q as br,e as xw,k as ws,q as Rg,n as GC,o as pl,J as Jw,X as XE,v as eC,s as rC,ac as gC,y as oC,a9 as lC,a8 as Yg,u as bg,aa as If,ab as wf}from'./main-ZCPOJMDG.js';import'./chunk-B4TTtVTM.js';import {d as Kn,J as Jn,Y as Yn}from'./chunk-Ce5Rvt6i.js';import'./chunk-uUqcsMN3.js';import'./chunk-CLTA0yP4.js';import'./chunk-8RXCnz6r.js';import'./chunk-CQzPiBAl.js';var $=(i,e)=>e.key;function q(i,e){i&1&&(ws(0,"p",2),GC(1,"Loading AI providers\u2026"),pl());}function z(i,e){i&1&&(ws(0,"p",3),GC(1,"No AI providers available."),pl());}function j(i,e){i&1&&(ws(0,"ds-tag",11),GC(1,"Read-only"),pl());}function G(i,e){if(i&1){let t=lC();ws(0,"button",13),Rg("click",function(){If(t);let c=gC().$implicit,l=gC(2);return wf(l.edit(c))}),GC(1,"Edit"),pl(),ws(2,"button",15),Rg("click",function(){If(t);let c=gC().$implicit,l=gC(2);return wf(l.delete(c))}),GC(3,"Delete"),pl();}}function H(i,e){i&1&&(ws(0,"button",14),GC(1,"Inherited"),pl());}function U(i,e){if(i&1){let t=lC();ws(0,"tr")(1,"td",7),GC(2),pl(),ws(3,"td",8),GC(4),pl(),ws(5,"td")(6,"div",9)(7,"ds-tag",10),GC(8),pl(),Jw(9,j,2,0,"ds-tag",11),pl()(),ws(10,"td",12)(11,"button",13),Rg("click",function(){let c=If(t).$implicit,l=gC(2);return wf(l.duplicate(c))}),GC(12,"Duplicate"),pl(),Jw(13,G,4,0)(14,H,2,0,"button",14),pl()();}if(i&2){let t=e.$implicit;XE(2),Yg(t.config.name),XE(2),Yg(t.config.apiType),XE(3),bg("variant",t.scopeLabel==="Platform"?"neutral":t.scopeLabel==="Personal"?"outline":"accent"),XE(),Yg(t.scopeLabel),XE(),eC(t.canMutate?-1:9),XE(4),eC(t.canMutate?13:14);}}function B(i,e){if(i&1&&(ws(0,"div",4)(1,"table",5)(2,"thead")(3,"tr")(4,"th"),GC(5,"Name"),pl(),ws(6,"th"),GC(7,"API type"),pl(),ws(8,"th"),GC(9,"Scope"),pl(),ws(10,"th")(11,"span",6),GC(12,"Actions"),pl()()()(),ws(13,"tbody"),rC(14,U,15,6,"tr",null,$),pl()()()),i&2){let t=gC();XE(14),oC(t.rows());}}var F=class i{route=g(W);router=g(F$1);destroyRef=g(Ce);state=g(O);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=Gi(false);isLoading=Gi(true);rows=Gi([]);ngOnInit(){this.route.paramMap.pipe(U$1(this.destroyRef)).subscribe(e=>{let t=e.get("namespaceId")??"";t&&t!==this.namespaceId&&(this.namespaceId=t),this.state.setNamespace(t);}),this.route.paramMap.pipe(re(e=>e.get("namespaceId")??""),Ea(e=>e?this.namespaceRole.isAdminOfNamespace$(e):br(false)),U$1(this.destroyRef)).subscribe(e=>this.isAdmin.set(e)),this.state.vm$.pipe(U$1(this.destroyRef)).subscribe({next:e=>{this.rows.set(this.toRows(e)),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"ai-providers","new"],{queryParams:{scope:n(this.isAdmin())}});}edit(e){!e.canMutate||!e.config.id||this.router.navigate(["/agentos",this.namespaceId,"ai-providers",e.config.id,"edit"],{queryParams:{scope:e.scope}});}delete(e){!e.canMutate||!e.config.id||!confirm(`Delete AI provider \u201C${e.config.name}\u201D?`)||this.state.delete(e.config.id,e.scope).pipe(U$1(this.destroyRef)).subscribe();}duplicate(e){if(!e.config.id)return;let t=e.scope==="platform"||e.scope==="namespace"&&!this.isAdmin()?"userOnNs":e.scope;this.router.navigate(["/agentos",this.namespaceId,"ai-providers","new"],{queryParams:{scope:t,template:e.config.id,templateScope:e.scope}});}toRows(e){return [...this.mapScope(e.platform,"platform","Platform",false),...this.mapScope(e.namespace,"namespace","Namespace",this.isAdmin()),...this.mapScope(e.userOnNs,"userOnNs","Personal",true),...this.mapScope(e.userGlobal,"userGlobal","Personal",true)]}mapScope(e,t,s,c){return e.map((l,V)=>({key:`${t}:${l.id??V}`,config:l,scope:t,scopeLabel:s,canMutate:c}))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=xw({type:i,selectors:[["agentos-ai-providers-all-scopes"]],decls:6,vars:1,consts:[["title","AI providers","description","AI providers available in this namespace, including inherited platform and personal entries."],["type","button",1,"ai-providers__new",3,"click"],["role","status",1,"ai-providers__status"],[1,"ai-providers__status"],[1,"ai-providers__table-wrap"],["dsTable",""],[1,"sr-only"],[1,"ai-providers__name"],[1,"ai-providers__type"],[1,"ai-providers__tags"],[3,"variant"],["variant","outline"],[1,"ai-providers__actions"],["type","button",3,"click"],["type","button","disabled",""],["type","button",1,"ai-providers__delete",3,"click"]],template:function(t,s){t&1&&(ws(0,"ds-section-header",0)(1,"button",1),Rg("click",function(){return s.openCreateForm()}),GC(2," New AI provider "),pl()(),Jw(3,q,2,0,"p",2)(4,z,2,0,"p",3)(5,B,16,0,"div",4)),t&2&&(XE(3),eC(s.isLoading()?3:s.rows().length===0?4:5));},dependencies:[Kn,Jn,Yn],styles:[".ai-providers__new[_ngcontent-%COMP%]{padding:7px 12px;border:1px solid var(--color-accent);border-radius:0;background:var(--color-accent);color:var(--color-bg);cursor:pointer;font-family:var(--font-heading);font-size:14px;font-weight:600}.ai-providers__status[_ngcontent-%COMP%]{margin:20px 8px;color:var(--color-text-secondary)}.ai-providers__table-wrap[_ngcontent-%COMP%]{overflow-x:auto}table.ds-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:14px}table.ds-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid var(--color-divider);color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-align:left;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid color-mix(in srgb,var(--color-text) 8%,transparent)}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.ai-providers__name[_ngcontent-%COMP%]{font-weight:500}.ai-providers__type[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.ai-providers__tags[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.ai-providers__actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:4px;white-space:nowrap}.ai-providers__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;border:1px solid transparent;background:transparent;color:var(--color-accent);cursor:pointer;font:inherit}.ai-providers__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-100)}.ai-providers__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{color:var(--color-neutral-600);cursor:default}.ai-providers__actions[_ngcontent-%COMP%] .ai-providers__delete[_ngcontent-%COMP%]{color:var(--color-error)}.sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}"]})};export{F as AiProvidersAllScopesComponent};
1
+ import {n}from'./chunk-CfgXrte_.js';import {O}from'./chunk-BEJTxNxB.js';import {v}from'./chunk-C4-wVzVC.js';import {g,ao as W,F as F$1,C as Ce,G as Gi,b as U$1,r as re,bS as Ea,Q as br,e as xw,k as ws,q as Rg,n as GC,o as pl,J as Jw,X as XE,v as eC,s as rC,ac as gC,y as oC,a9 as lC,a8 as Yg,u as bg,aa as If,ab as wf}from'./main-JF54VQMT.js';import'./chunk-BNAmaIpp.js';import {d as Kn,J as Jn,Y as Yn}from'./chunk-BbFLEXqO.js';import'./chunk-Di5W20Td.js';import'./chunk-8pxP8BFo.js';import'./chunk-BReYxmMt.js';import'./chunk-DKy8ULGc.js';var $=(i,e)=>e.key;function q(i,e){i&1&&(ws(0,"p",2),GC(1,"Loading AI providers\u2026"),pl());}function z(i,e){i&1&&(ws(0,"p",3),GC(1,"No AI providers available."),pl());}function j(i,e){i&1&&(ws(0,"ds-tag",11),GC(1,"Read-only"),pl());}function G(i,e){if(i&1){let t=lC();ws(0,"button",13),Rg("click",function(){If(t);let c=gC().$implicit,l=gC(2);return wf(l.edit(c))}),GC(1,"Edit"),pl(),ws(2,"button",15),Rg("click",function(){If(t);let c=gC().$implicit,l=gC(2);return wf(l.delete(c))}),GC(3,"Delete"),pl();}}function H(i,e){i&1&&(ws(0,"button",14),GC(1,"Inherited"),pl());}function U(i,e){if(i&1){let t=lC();ws(0,"tr")(1,"td",7),GC(2),pl(),ws(3,"td",8),GC(4),pl(),ws(5,"td")(6,"div",9)(7,"ds-tag",10),GC(8),pl(),Jw(9,j,2,0,"ds-tag",11),pl()(),ws(10,"td",12)(11,"button",13),Rg("click",function(){let c=If(t).$implicit,l=gC(2);return wf(l.duplicate(c))}),GC(12,"Duplicate"),pl(),Jw(13,G,4,0)(14,H,2,0,"button",14),pl()();}if(i&2){let t=e.$implicit;XE(2),Yg(t.config.name),XE(2),Yg(t.config.apiType),XE(3),bg("variant",t.scopeLabel==="Platform"?"neutral":t.scopeLabel==="Personal"?"outline":"accent"),XE(),Yg(t.scopeLabel),XE(),eC(t.canMutate?-1:9),XE(4),eC(t.canMutate?13:14);}}function B(i,e){if(i&1&&(ws(0,"div",4)(1,"table",5)(2,"thead")(3,"tr")(4,"th"),GC(5,"Name"),pl(),ws(6,"th"),GC(7,"API type"),pl(),ws(8,"th"),GC(9,"Scope"),pl(),ws(10,"th")(11,"span",6),GC(12,"Actions"),pl()()()(),ws(13,"tbody"),rC(14,U,15,6,"tr",null,$),pl()()()),i&2){let t=gC();XE(14),oC(t.rows());}}var F=class i{route=g(W);router=g(F$1);destroyRef=g(Ce);state=g(O);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=Gi(false);isLoading=Gi(true);rows=Gi([]);ngOnInit(){this.route.paramMap.pipe(U$1(this.destroyRef)).subscribe(e=>{let t=e.get("namespaceId")??"";t&&t!==this.namespaceId&&(this.namespaceId=t),this.state.setNamespace(t);}),this.route.paramMap.pipe(re(e=>e.get("namespaceId")??""),Ea(e=>e?this.namespaceRole.isAdminOfNamespace$(e):br(false)),U$1(this.destroyRef)).subscribe(e=>this.isAdmin.set(e)),this.state.vm$.pipe(U$1(this.destroyRef)).subscribe({next:e=>{this.rows.set(this.toRows(e)),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"ai-providers","new"],{queryParams:{scope:n(this.isAdmin())}});}edit(e){!e.canMutate||!e.config.id||this.router.navigate(["/agentos",this.namespaceId,"ai-providers",e.config.id,"edit"],{queryParams:{scope:e.scope}});}delete(e){!e.canMutate||!e.config.id||!confirm(`Delete AI provider \u201C${e.config.name}\u201D?`)||this.state.delete(e.config.id,e.scope).pipe(U$1(this.destroyRef)).subscribe();}duplicate(e){if(!e.config.id)return;let t=e.scope==="platform"||e.scope==="namespace"&&!this.isAdmin()?"userOnNs":e.scope;this.router.navigate(["/agentos",this.namespaceId,"ai-providers","new"],{queryParams:{scope:t,template:e.config.id,templateScope:e.scope}});}toRows(e){return [...this.mapScope(e.platform,"platform","Platform",false),...this.mapScope(e.namespace,"namespace","Namespace",this.isAdmin()),...this.mapScope(e.userOnNs,"userOnNs","Personal",true),...this.mapScope(e.userGlobal,"userGlobal","Personal",true)]}mapScope(e,t,s,c){return e.map((l,V)=>({key:`${t}:${l.id??V}`,config:l,scope:t,scopeLabel:s,canMutate:c}))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=xw({type:i,selectors:[["agentos-ai-providers-all-scopes"]],decls:6,vars:1,consts:[["title","AI providers","description","AI providers available in this namespace, including inherited platform and personal entries."],["type","button",1,"ai-providers__new",3,"click"],["role","status",1,"ai-providers__status"],[1,"ai-providers__status"],[1,"ai-providers__table-wrap"],["dsTable",""],[1,"sr-only"],[1,"ai-providers__name"],[1,"ai-providers__type"],[1,"ai-providers__tags"],[3,"variant"],["variant","outline"],[1,"ai-providers__actions"],["type","button",3,"click"],["type","button","disabled",""],["type","button",1,"ai-providers__delete",3,"click"]],template:function(t,s){t&1&&(ws(0,"ds-section-header",0)(1,"button",1),Rg("click",function(){return s.openCreateForm()}),GC(2," New AI provider "),pl()(),Jw(3,q,2,0,"p",2)(4,z,2,0,"p",3)(5,B,16,0,"div",4)),t&2&&(XE(3),eC(s.isLoading()?3:s.rows().length===0?4:5));},dependencies:[Kn,Jn,Yn],styles:[".ai-providers__new[_ngcontent-%COMP%]{padding:7px 12px;border:1px solid var(--color-accent);border-radius:0;background:var(--color-accent);color:var(--color-bg);cursor:pointer;font-family:var(--font-heading);font-size:14px;font-weight:600}.ai-providers__status[_ngcontent-%COMP%]{margin:20px 8px;color:var(--color-text-secondary)}.ai-providers__table-wrap[_ngcontent-%COMP%]{overflow-x:auto}table.ds-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:14px}table.ds-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid var(--color-divider);color:var(--color-neutral-600);font-size:11px;letter-spacing:.08em;text-align:left;text-transform:uppercase}table.ds-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid color-mix(in srgb,var(--color-text) 8%,transparent)}table.ds-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.ai-providers__name[_ngcontent-%COMP%]{font-weight:500}.ai-providers__type[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.ai-providers__tags[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.ai-providers__actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:4px;white-space:nowrap}.ai-providers__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;border:1px solid transparent;background:transparent;color:var(--color-accent);cursor:pointer;font:inherit}.ai-providers__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-100)}.ai-providers__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{color:var(--color-neutral-600);cursor:default}.ai-providers__actions[_ngcontent-%COMP%] .ai-providers__delete[_ngcontent-%COMP%]{color:var(--color-error)}.sr-only[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}"]})};export{F as AiProvidersAllScopesComponent};
@@ -1 +1 @@
1
- import {g,ao as W,F,d5 as G,C as Ce,G as Gi,b as U$1,x,w,e as xw,k as ws,q as Rg,n as GC,o as pl,J as Jw,X as XE,a8 as Yg,v as eC,a9 as lC,S as Sg,a3 as VI,ac as gC,u as bg,a6 as UI,a5 as vl,aa as If,ab as wf}from'./main-ZCPOJMDG.js';import {o as z,k as _t,b as _e,n as ni,J as Jn,Y as Ye,f as fn,Z as Zn,l as Xn,$ as $t,C as Cn,E as En}from'./chunk-CLTA0yP4.js';function U(l,r){l&1&&(ws(0,"p",5),GC(1,"Loading\u2026"),pl());}function H(l,r){if(l&1){let e=lC();ws(0,"form",7),Rg("ngSubmit",function(){If(e);let u=gC();return wf(u.submit())}),ws(1,"div",8)(2,"label",9),GC(3,"Name "),ws(4,"span",10),GC(5,"*"),pl()(),Sg(6,"input",11),VI(),pl(),ws(7,"div",8)(8,"label",12),GC(9,"Description"),pl(),Sg(10,"textarea",13),VI(),pl(),ws(11,"div",8)(12,"label",14),GC(13,"External ID"),pl(),Sg(14,"input",15),VI(),pl(),ws(15,"div",8)(16,"label",16),GC(17,"Default agent"),pl(),Sg(18,"input",17),VI(),pl(),ws(19,"div",8)(20,"label",18),GC(21,"Config path"),pl(),Sg(22,"input",19),VI(),pl(),ws(23,"div",8)(24,"label",20),GC(25,"Run cost threshold"),pl(),Sg(26,"input",21),VI(),ws(27,"span",22),GC(28,"Leave empty to inherit the platform default."),pl()(),ws(29,"div",23)(30,"button",24),GC(31),pl(),ws(32,"button",25),Rg("click",function(){If(e);let u=gC();return wf(u.cancel())}),GC(33,"Cancel"),pl()()();}if(l&2){let e=gC();bg("formGroup",e.form),XE(6),bg("formControl",e.nameControl),UI(),XE(4),bg("formControl",e.descriptionControl),UI(),XE(4),bg("formControl",e.externalIdControl),UI(),XE(4),bg("formControl",e.defaultAgentNameControl),UI(),XE(4),bg("formControl",e.configPathControl),UI(),XE(4),bg("formControl",e.runCostThresholdControl),UI(),XE(4),bg("disabled",e.nameControl.invalid||e.isSubmitting()),XE(),vl(" ",e.isEditMode()?"Save changes":"Create"," ");}}var q=class l{route=g(W);router=g(F);namespaceController=g(G);destroyRef=g(Ce);form=new z({name:new _t("",{nonNullable:true,validators:[_e.required,_e.minLength(1)]}),description:new _t("",{nonNullable:true}),configPath:new _t("",{nonNullable:true}),externalId:new _t("",{nonNullable:true}),defaultAgentName:new _t("",{nonNullable:true}),runCostThreshold:new _t(null)});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get configPathControl(){return this.form.controls.configPath}get externalIdControl(){return this.form.controls.externalId}get defaultAgentNameControl(){return this.form.controls.defaultAgentName}get runCostThresholdControl(){return this.form.controls.runCostThreshold}isEditMode=Gi(false);isSubmitting=Gi(false);isLoading=Gi(false);existingNamespace=null;ngOnInit(){let r=this.route.snapshot.paramMap.get("namespaceId");r&&(this.isEditMode.set(true),this.loadNamespace(r));}loadNamespace(r){this.isLoading.set(true),this.namespaceController.getByIdNamespace(r).pipe(U$1(this.destroyRef)).subscribe({next:e=>{this.existingNamespace=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??""),this.configPathControl.setValue(e.configPath??""),this.externalIdControl.setValue(e.externalId??""),this.defaultAgentNameControl.setValue(e.defaultAgentName??""),this.runCostThresholdControl.setValue(e.runCostThreshold??null),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}});}submit(){if(this.nameControl.invalid||this.isSubmitting())return;this.isSubmitting.set(true);let r=x(w({},this.existingNamespace),{name:this.nameControl.value.trim(),description:this.descriptionControl.value.trim()||void 0,configPath:this.configPathControl.value.trim()||void 0,externalId:this.externalIdControl.value.trim()||void 0,defaultAgentName:this.defaultAgentNameControl.value.trim()||void 0,runCostThreshold:this.runCostThresholdControl.value??void 0});(this.isEditMode()?this.namespaceController.updateNamespace(this.existingNamespace.id??"",r):this.namespaceController.createNamespace(r)).pipe(U$1(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}cancel(){this.navigateBack();}navigateBack(){this.router.navigate(["/agentos/namespaces"]);}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=xw({type:l,selectors:[["agentos-namespace-form"]],decls:10,vars:2,consts:[[1,"namespace-form"],[1,"namespace-form__header"],["type","button","title","Back to namespaces",1,"namespace-form__back",3,"click"],[1,"namespace-form__back-icon"],[1,"namespace-form__title"],[1,"namespace-form__loading"],[1,"namespace-form__form",3,"formGroup"],[1,"namespace-form__form",3,"ngSubmit","formGroup"],[1,"namespace-form__field"],["for","ns-name",1,"namespace-form__label"],["aria-hidden","true"],["id","ns-name","type","text","placeholder","Namespace name","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-description",1,"namespace-form__label"],["id","ns-description","rows","4","placeholder","Optional description",1,"namespace-form__textarea",3,"formControl"],["for","ns-external-id",1,"namespace-form__label"],["id","ns-external-id","type","text","placeholder","Optional federation ID from an external system","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-default-agent",1,"namespace-form__label"],["id","ns-default-agent","type","text","placeholder","Logical name of the default agent (e.g. coday)","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-config-path",1,"namespace-form__label"],["id","ns-config-path","type","text","placeholder","Optional path to base configuration directory","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-run-cost-threshold",1,"namespace-form__label"],["id","ns-run-cost-threshold","type","number","min","0","step","0.01","placeholder","Optional maximum cost per run (e.g. 0.50)",1,"namespace-form__input",3,"formControl"],[1,"namespace-form__hint"],[1,"namespace-form__actions"],["type","submit",1,"namespace-form__btn","namespace-form__btn--primary",3,"disabled"],["type","button",1,"namespace-form__btn",3,"click"]],template:function(e,p){e&1&&(ws(0,"div",0)(1,"header",1)(2,"button",2),Rg("click",function(){return p.cancel()}),ws(3,"span",3),GC(4,"\u2190"),pl(),GC(5," Namespaces "),pl(),ws(6,"h1",4),GC(7),pl()(),Jw(8,U,2,0,"p",5)(9,H,34,9,"form",6),pl()),e&2&&(XE(7),Yg(p.isEditMode()?"Edit namespace":"New namespace"),XE(),eC(p.isLoading()?8:9));},dependencies:[ni,Jn,Ye,fn,Zn,Xn,$t,Cn,En],styles:[".namespace-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:480px;margin:0 auto;padding:2rem 1rem}.namespace-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.namespace-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)}.namespace-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.namespace-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.namespace-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.namespace-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.namespace-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.namespace-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.namespace-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.namespace-form__input[_ngcontent-%COMP%], .namespace-form__textarea[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:0;border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.namespace-form__input[_ngcontent-%COMP%]:focus, .namespace-form__textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.namespace-form__input[_ngcontent-%COMP%]::placeholder, .namespace-form__textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.namespace-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:96px;line-height:1.5}.namespace-form__hint[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary)}.namespace-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.namespace-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}.namespace-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.namespace-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.namespace-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.namespace-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}"]})};export{q as NamespaceFormComponent};
1
+ import {g,ao as W,F,d5 as G,C as Ce,G as Gi,b as U$1,x,w,e as xw,k as ws,q as Rg,n as GC,o as pl,J as Jw,X as XE,a8 as Yg,v as eC,a9 as lC,S as Sg,a3 as VI,ac as gC,u as bg,a6 as UI,a5 as vl,aa as If,ab as wf}from'./main-JF54VQMT.js';import {o as z,k as _t,b as _e,n as ni,J as Jn,Y as Ye,f as fn,Z as Zn,l as Xn,$ as $t,C as Cn,E as En}from'./chunk-8pxP8BFo.js';function U(l,r){l&1&&(ws(0,"p",5),GC(1,"Loading\u2026"),pl());}function H(l,r){if(l&1){let e=lC();ws(0,"form",7),Rg("ngSubmit",function(){If(e);let u=gC();return wf(u.submit())}),ws(1,"div",8)(2,"label",9),GC(3,"Name "),ws(4,"span",10),GC(5,"*"),pl()(),Sg(6,"input",11),VI(),pl(),ws(7,"div",8)(8,"label",12),GC(9,"Description"),pl(),Sg(10,"textarea",13),VI(),pl(),ws(11,"div",8)(12,"label",14),GC(13,"External ID"),pl(),Sg(14,"input",15),VI(),pl(),ws(15,"div",8)(16,"label",16),GC(17,"Default agent"),pl(),Sg(18,"input",17),VI(),pl(),ws(19,"div",8)(20,"label",18),GC(21,"Config path"),pl(),Sg(22,"input",19),VI(),pl(),ws(23,"div",8)(24,"label",20),GC(25,"Run cost threshold"),pl(),Sg(26,"input",21),VI(),ws(27,"span",22),GC(28,"Leave empty to inherit the platform default."),pl()(),ws(29,"div",23)(30,"button",24),GC(31),pl(),ws(32,"button",25),Rg("click",function(){If(e);let u=gC();return wf(u.cancel())}),GC(33,"Cancel"),pl()()();}if(l&2){let e=gC();bg("formGroup",e.form),XE(6),bg("formControl",e.nameControl),UI(),XE(4),bg("formControl",e.descriptionControl),UI(),XE(4),bg("formControl",e.externalIdControl),UI(),XE(4),bg("formControl",e.defaultAgentNameControl),UI(),XE(4),bg("formControl",e.configPathControl),UI(),XE(4),bg("formControl",e.runCostThresholdControl),UI(),XE(4),bg("disabled",e.nameControl.invalid||e.isSubmitting()),XE(),vl(" ",e.isEditMode()?"Save changes":"Create"," ");}}var q=class l{route=g(W);router=g(F);namespaceController=g(G);destroyRef=g(Ce);form=new z({name:new _t("",{nonNullable:true,validators:[_e.required,_e.minLength(1)]}),description:new _t("",{nonNullable:true}),configPath:new _t("",{nonNullable:true}),externalId:new _t("",{nonNullable:true}),defaultAgentName:new _t("",{nonNullable:true}),runCostThreshold:new _t(null)});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get configPathControl(){return this.form.controls.configPath}get externalIdControl(){return this.form.controls.externalId}get defaultAgentNameControl(){return this.form.controls.defaultAgentName}get runCostThresholdControl(){return this.form.controls.runCostThreshold}isEditMode=Gi(false);isSubmitting=Gi(false);isLoading=Gi(false);existingNamespace=null;ngOnInit(){let r=this.route.snapshot.paramMap.get("namespaceId");r&&(this.isEditMode.set(true),this.loadNamespace(r));}loadNamespace(r){this.isLoading.set(true),this.namespaceController.getByIdNamespace(r).pipe(U$1(this.destroyRef)).subscribe({next:e=>{this.existingNamespace=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??""),this.configPathControl.setValue(e.configPath??""),this.externalIdControl.setValue(e.externalId??""),this.defaultAgentNameControl.setValue(e.defaultAgentName??""),this.runCostThresholdControl.setValue(e.runCostThreshold??null),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}});}submit(){if(this.nameControl.invalid||this.isSubmitting())return;this.isSubmitting.set(true);let r=x(w({},this.existingNamespace),{name:this.nameControl.value.trim(),description:this.descriptionControl.value.trim()||void 0,configPath:this.configPathControl.value.trim()||void 0,externalId:this.externalIdControl.value.trim()||void 0,defaultAgentName:this.defaultAgentNameControl.value.trim()||void 0,runCostThreshold:this.runCostThresholdControl.value??void 0});(this.isEditMode()?this.namespaceController.updateNamespace(this.existingNamespace.id??"",r):this.namespaceController.createNamespace(r)).pipe(U$1(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}cancel(){this.navigateBack();}navigateBack(){this.router.navigate(["/agentos/namespaces"]);}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=xw({type:l,selectors:[["agentos-namespace-form"]],decls:10,vars:2,consts:[[1,"namespace-form"],[1,"namespace-form__header"],["type","button","title","Back to namespaces",1,"namespace-form__back",3,"click"],[1,"namespace-form__back-icon"],[1,"namespace-form__title"],[1,"namespace-form__loading"],[1,"namespace-form__form",3,"formGroup"],[1,"namespace-form__form",3,"ngSubmit","formGroup"],[1,"namespace-form__field"],["for","ns-name",1,"namespace-form__label"],["aria-hidden","true"],["id","ns-name","type","text","placeholder","Namespace name","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-description",1,"namespace-form__label"],["id","ns-description","rows","4","placeholder","Optional description",1,"namespace-form__textarea",3,"formControl"],["for","ns-external-id",1,"namespace-form__label"],["id","ns-external-id","type","text","placeholder","Optional federation ID from an external system","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-default-agent",1,"namespace-form__label"],["id","ns-default-agent","type","text","placeholder","Logical name of the default agent (e.g. coday)","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-config-path",1,"namespace-form__label"],["id","ns-config-path","type","text","placeholder","Optional path to base configuration directory","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-run-cost-threshold",1,"namespace-form__label"],["id","ns-run-cost-threshold","type","number","min","0","step","0.01","placeholder","Optional maximum cost per run (e.g. 0.50)",1,"namespace-form__input",3,"formControl"],[1,"namespace-form__hint"],[1,"namespace-form__actions"],["type","submit",1,"namespace-form__btn","namespace-form__btn--primary",3,"disabled"],["type","button",1,"namespace-form__btn",3,"click"]],template:function(e,p){e&1&&(ws(0,"div",0)(1,"header",1)(2,"button",2),Rg("click",function(){return p.cancel()}),ws(3,"span",3),GC(4,"\u2190"),pl(),GC(5," Namespaces "),pl(),ws(6,"h1",4),GC(7),pl()(),Jw(8,U,2,0,"p",5)(9,H,34,9,"form",6),pl()),e&2&&(XE(7),Yg(p.isEditMode()?"Edit namespace":"New namespace"),XE(),eC(p.isLoading()?8:9));},dependencies:[ni,Jn,Ye,fn,Zn,Xn,$t,Cn,En],styles:[".namespace-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:480px;margin:0 auto;padding:2rem 1rem}.namespace-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.namespace-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)}.namespace-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.namespace-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.namespace-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.namespace-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.namespace-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.namespace-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.namespace-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.namespace-form__input[_ngcontent-%COMP%], .namespace-form__textarea[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:0;border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.namespace-form__input[_ngcontent-%COMP%]:focus, .namespace-form__textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.namespace-form__input[_ngcontent-%COMP%]::placeholder, .namespace-form__textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.namespace-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:96px;line-height:1.5}.namespace-form__hint[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary)}.namespace-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.namespace-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}.namespace-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.namespace-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.namespace-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.namespace-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}"]})};export{q as NamespaceFormComponent};
@@ -1,2 +1,2 @@
1
- import {n as ne}from'./chunk-C0Zdso7r.js';import {g,Y as z$1,Z as Ue,e as xw,_ as zt,a0 as jt,a1 as Vt,a2 as Nt,h as hr,i as pr,k as ws,n as GC,o as pl,J as Jw,q as Rg,X as XE,z as Ug,a5 as vl,a8 as Yg,v as eC,u as bg,a9 as lC,ai as tm,aa as If,ac as gC,aj as KC,ab as wf,a3 as VI,ak as em,a6 as UI}from'./main-ZCPOJMDG.js';import {y as yt,w as wt,t as ti,Z as Zn,c as cn}from'./chunk-CLTA0yP4.js';function G(c,p){if(c&1){let t=lC();ws(0,"mat-checkbox",5),tm("ngModelChange",function(l){If(t);let f=gC();return KC(f.checkboxChecked,l)||(f.checkboxChecked=l),wf(l)}),GC(1),pl(),VI();}if(c&2){let t=gC();em("ngModel",t.checkboxChecked),UI(),XE(),Yg(t.data.checkboxLabel);}}var z=class c{dialogRef=g(z$1);data=g(Ue);checkboxChecked=false;confirm(){this.dialogRef.close({confirmed:true,checkboxChecked:this.checkboxChecked});}cancel(){this.dialogRef.close({confirmed:false});}static \u0275fac=function(t){return new(t||c)};static \u0275cmp=xw({type:c,selectors:[["app-confirm-dialog"]],decls:13,vars:8,consts:[["mat-dialog-title",""],[3,"ngModel"],["align","end"],["mat-button","",3,"click"],["mat-flat-button","",3,"click","color"],[3,"ngModelChange","ngModel"]],template:function(t,e){t&1&&(ws(0,"h2",0)(1,"mat-icon"),GC(2,"warning"),pl(),GC(3),pl(),ws(4,"mat-dialog-content")(5,"p"),GC(6),pl(),Jw(7,G,2,2,"mat-checkbox",1),pl(),ws(8,"mat-dialog-actions",2)(9,"button",3),Rg("click",function(){return e.cancel()}),GC(10),pl(),ws(11,"button",4),Rg("click",function(){return e.confirm()}),GC(12),pl()()),t&2&&(XE(),Ug("destructive",!!e.data.isDestructive),XE(2),vl(" ",e.data.title,`
1
+ import {n as ne}from'./chunk-BVOCXShg.js';import {g,Y as z$1,Z as Ue,e as xw,_ as zt,a0 as jt,a1 as Vt,a2 as Nt,h as hr,i as pr,k as ws,n as GC,o as pl,J as Jw,q as Rg,X as XE,z as Ug,a5 as vl,a8 as Yg,v as eC,u as bg,a9 as lC,ai as tm,aa as If,ac as gC,aj as KC,ab as wf,a3 as VI,ak as em,a6 as UI}from'./main-JF54VQMT.js';import {y as yt,w as wt,t as ti,Z as Zn,c as cn}from'./chunk-8pxP8BFo.js';function G(c,p){if(c&1){let t=lC();ws(0,"mat-checkbox",5),tm("ngModelChange",function(l){If(t);let f=gC();return KC(f.checkboxChecked,l)||(f.checkboxChecked=l),wf(l)}),GC(1),pl(),VI();}if(c&2){let t=gC();em("ngModel",t.checkboxChecked),UI(),XE(),Yg(t.data.checkboxLabel);}}var z=class c{dialogRef=g(z$1);data=g(Ue);checkboxChecked=false;confirm(){this.dialogRef.close({confirmed:true,checkboxChecked:this.checkboxChecked});}cancel(){this.dialogRef.close({confirmed:false});}static \u0275fac=function(t){return new(t||c)};static \u0275cmp=xw({type:c,selectors:[["app-confirm-dialog"]],decls:13,vars:8,consts:[["mat-dialog-title",""],[3,"ngModel"],["align","end"],["mat-button","",3,"click"],["mat-flat-button","",3,"click","color"],[3,"ngModelChange","ngModel"]],template:function(t,e){t&1&&(ws(0,"h2",0)(1,"mat-icon"),GC(2,"warning"),pl(),GC(3),pl(),ws(4,"mat-dialog-content")(5,"p"),GC(6),pl(),Jw(7,G,2,2,"mat-checkbox",1),pl(),ws(8,"mat-dialog-actions",2)(9,"button",3),Rg("click",function(){return e.cancel()}),GC(10),pl(),ws(11,"button",4),Rg("click",function(){return e.confirm()}),GC(12),pl()()),t&2&&(XE(),Ug("destructive",!!e.data.isDestructive),XE(2),vl(" ",e.data.title,`
2
2
  `),XE(3),Yg(e.data.message),XE(),eC(e.data.checkboxLabel?7:-1),XE(3),Yg(e.data.cancelLabel??"Cancel"),XE(),bg("color",e.data.isDestructive?"warn":"primary"),XE(),vl(" ",e.data.confirmLabel??"Confirm"," "));},dependencies:[zt,jt,Vt,Nt,hr,pr,yt,wt,ne,ti,Zn,cn],styles:["h2[mat-dialog-title][_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}h2[mat-dialog-title][_ngcontent-%COMP%] mat-icon.destructive[_ngcontent-%COMP%]{color:var(--color-error, #f44336)}mat-dialog-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--color-text-secondary);line-height:1.5}mat-dialog-content[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{display:block;margin-top:8px;font-size:.875rem}"]})};export{z};
@@ -1 +1 @@
1
- import {g,F,cb as ZB,cc as qB,G as Gi,m as mT,e as xw,k as ws,n as GC,o as pl,J as Jw,z as Ug,X as XE,a8 as Yg,v as eC,ac as gC,b0 as Qg,a9 as lC,q as Rg,u as bg,aa as If,ab as wf}from'./main-ZCPOJMDG.js';import {c as ni,S as Se}from'./chunk-Ce5Rvt6i.js';function A(t,n){t&1&&(ws(0,"span",4),GC(1,"SKILL.md"),pl());}function E(t,n){if(t&1&&(ws(0,"span",5),GC(1),pl()),t&2){let e=gC();XE(),Yg(e.skill().description);}}function T(t,n){if(t&1&&(ws(0,"span",6),GC(1),pl()),t&2){let e=gC();XE(),Qg(" ",e.resourceCount()," ",e.resourceCount()===1?"resource":"resources"," ");}}function B(t,n){if(t&1&&(ws(0,"span",6),GC(1),pl()),t&2){let e=gC();XE(),Qg(" named by ",e.namedByAgents()," ",e.namedByAgents()===1?"agent":"agents"," ");}}function N(t,n){if(t&1&&GC(0),t&2){let e=gC(2);Qg(" Delete? ",e.namedByAgents()," ",e.namedByAgents()===1?"agent":"agents"," would be left naming it. ");}}function V(t,n){t&1&&GC(0," Delete? ");}function K(t,n){if(t&1){let e=lC();ws(0,"span",9),Jw(1,N,1,2)(2,V,1,0),pl(),ws(3,"ds-icon-button",10),Rg("action",function(){If(e);let p=gC();return wf(p.onDeleteConfirmed())}),pl(),ws(4,"ds-icon-button",11),Rg("action",function(){If(e);let p=gC();return wf(p.onDeleteCancelled())}),pl();}if(t&2){let e=gC();XE(),eC(e.namedByAgents()>0?1:2);}}function q(t,n){if(t&1){let e=lC();ws(0,"ds-kebab-menu",12),Rg("itemSelected",function(p){If(e);let P=gC();return wf(P.onMenuAction(p))}),pl();}if(t&2){let e=gC();bg("items",e.isImmutable()?e.readOnlyMenuItems:e.menuItems);}}var D=class t{router=g(F);skill=ZB.required();namespaceId=ZB(void 0);platformMode=ZB(false);readOnly=ZB(false);namedByAgents=ZB(0);deleteRequested=qB();pendingDelete=Gi(false);isImmutable=mT(()=>this.readOnly()||this.skill().readOnly===true);resourceCount=mT(()=>Object.keys(this.skill().resources??{}).length);menuItems=[{key:"inspect",label:"View skill",icon:"search"},{key:"edit",label:"Edit skill",icon:"edit"},{key:"delete",label:"Delete skill",icon:"delete",variant:"danger"}];readOnlyMenuItems=[{key:"inspect",label:"View skill",icon:"search"}];onMenuAction(n){switch(n){case "inspect":this.router.navigate(this.route("inspect"));break;case "edit":this.router.navigate(this.route("edit"));break;case "delete":this.pendingDelete.set(true);break}}onDeleteConfirmed(){this.pendingDelete.set(false),this.deleteRequested.emit(this.skill());}onDeleteCancelled(){this.pendingDelete.set(false);}route(n){let e=this.skill().id??"";return this.platformMode()?["/agentos","admin","skills",e,n]:["/agentos",this.namespaceId()??"","skills",e,n]}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=xw({type:t,selectors:[["agentos-skill-item"]],inputs:{skill:[1,"skill"],namespaceId:[1,"namespaceId"],platformMode:[1,"platformMode"],readOnly:[1,"readOnly"],namedByAgents:[1,"namedByAgents"]},outputs:{deleteRequested:"deleteRequested"},decls:12,vars:8,consts:[["role","listitem",1,"skill-item"],[1,"skill-item__body"],[1,"skill-item__name-row"],[1,"skill-item__name"],["data-variant","neutral","aria-label","Skill defined by a SKILL.md file, read-only through the API",1,"skill-item__badge"],[1,"skill-item__description"],[1,"skill-item__meta"],[1,"skill-item__actions"],[3,"items"],[1,"skill-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,a){e&1&&(ws(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),GC(4),pl(),Jw(5,A,2,0,"span",4),pl(),Jw(6,E,2,1,"span",5),Jw(7,T,2,2,"span",6),Jw(8,B,2,2,"span",6),pl(),ws(9,"div",7),Jw(10,K,5,1)(11,q,1,1,"ds-kebab-menu",8),pl()()),e&2&&(Ug("skill-item--pending-delete",a.pendingDelete()),XE(4),Yg(a.skill().name),XE(),eC(a.skill().readOnly?5:-1),XE(),eC(a.skill().description?6:-1),XE(),eC(a.resourceCount()>0?7:-1),XE(),eC(a.namedByAgents()>0?8:-1),XE(2),eC(a.pendingDelete()?10:11));},dependencies:[ni,Se],styles:[".skill-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;border-radius:10px;border:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--glass-bg, rgba(255, 255, 255, .72));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px));transition:background .15s ease,border-color .15s ease}.skill-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-color:var(--color-primary, #007aff)}.skill-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.skill-item__name-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.skill-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.skill-item__badge[_ngcontent-%COMP%]{flex-shrink:0;font-family:var(--font-heading);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:none;border-radius:0;padding:.15rem .5rem;white-space:nowrap}.skill-item__badge[data-variant=neutral][_ngcontent-%COMP%]{border:1px solid var(--color-divider, rgba(0, 0, 0, .12));color:var(--color-neutral-600, #6e6e73);background:transparent}.skill-item__description[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.skill-item__meta[_ngcontent-%COMP%]{font-size:.7rem;color:var(--color-text-tertiary, #8e8e93)}.skill-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.skill-item[_ngcontent-%COMP%]:hover .skill-item__actions[_ngcontent-%COMP%], .skill-item[_ngcontent-%COMP%]:focus-within .skill-item__actions[_ngcontent-%COMP%], .skill-item--pending-delete[_ngcontent-%COMP%] .skill-item__actions[_ngcontent-%COMP%]{opacity:1}.skill-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error, #ff3b30);margin-right:.25rem;white-space:nowrap}"]})};export{D};
1
+ import {g,F,cb as ZB,cc as qB,G as Gi,m as mT,e as xw,k as ws,n as GC,o as pl,J as Jw,z as Ug,X as XE,a8 as Yg,v as eC,ac as gC,b0 as Qg,a9 as lC,q as Rg,u as bg,aa as If,ab as wf}from'./main-JF54VQMT.js';import {c as ni,S as Se}from'./chunk-BbFLEXqO.js';function A(t,n){t&1&&(ws(0,"span",4),GC(1,"SKILL.md"),pl());}function E(t,n){if(t&1&&(ws(0,"span",5),GC(1),pl()),t&2){let e=gC();XE(),Yg(e.skill().description);}}function T(t,n){if(t&1&&(ws(0,"span",6),GC(1),pl()),t&2){let e=gC();XE(),Qg(" ",e.resourceCount()," ",e.resourceCount()===1?"resource":"resources"," ");}}function B(t,n){if(t&1&&(ws(0,"span",6),GC(1),pl()),t&2){let e=gC();XE(),Qg(" named by ",e.namedByAgents()," ",e.namedByAgents()===1?"agent":"agents"," ");}}function N(t,n){if(t&1&&GC(0),t&2){let e=gC(2);Qg(" Delete? ",e.namedByAgents()," ",e.namedByAgents()===1?"agent":"agents"," would be left naming it. ");}}function V(t,n){t&1&&GC(0," Delete? ");}function K(t,n){if(t&1){let e=lC();ws(0,"span",9),Jw(1,N,1,2)(2,V,1,0),pl(),ws(3,"ds-icon-button",10),Rg("action",function(){If(e);let p=gC();return wf(p.onDeleteConfirmed())}),pl(),ws(4,"ds-icon-button",11),Rg("action",function(){If(e);let p=gC();return wf(p.onDeleteCancelled())}),pl();}if(t&2){let e=gC();XE(),eC(e.namedByAgents()>0?1:2);}}function q(t,n){if(t&1){let e=lC();ws(0,"ds-kebab-menu",12),Rg("itemSelected",function(p){If(e);let P=gC();return wf(P.onMenuAction(p))}),pl();}if(t&2){let e=gC();bg("items",e.isImmutable()?e.readOnlyMenuItems:e.menuItems);}}var D=class t{router=g(F);skill=ZB.required();namespaceId=ZB(void 0);platformMode=ZB(false);readOnly=ZB(false);namedByAgents=ZB(0);deleteRequested=qB();pendingDelete=Gi(false);isImmutable=mT(()=>this.readOnly()||this.skill().readOnly===true);resourceCount=mT(()=>Object.keys(this.skill().resources??{}).length);menuItems=[{key:"inspect",label:"View skill",icon:"search"},{key:"edit",label:"Edit skill",icon:"edit"},{key:"delete",label:"Delete skill",icon:"delete",variant:"danger"}];readOnlyMenuItems=[{key:"inspect",label:"View skill",icon:"search"}];onMenuAction(n){switch(n){case "inspect":this.router.navigate(this.route("inspect"));break;case "edit":this.router.navigate(this.route("edit"));break;case "delete":this.pendingDelete.set(true);break}}onDeleteConfirmed(){this.pendingDelete.set(false),this.deleteRequested.emit(this.skill());}onDeleteCancelled(){this.pendingDelete.set(false);}route(n){let e=this.skill().id??"";return this.platformMode()?["/agentos","admin","skills",e,n]:["/agentos",this.namespaceId()??"","skills",e,n]}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=xw({type:t,selectors:[["agentos-skill-item"]],inputs:{skill:[1,"skill"],namespaceId:[1,"namespaceId"],platformMode:[1,"platformMode"],readOnly:[1,"readOnly"],namedByAgents:[1,"namedByAgents"]},outputs:{deleteRequested:"deleteRequested"},decls:12,vars:8,consts:[["role","listitem",1,"skill-item"],[1,"skill-item__body"],[1,"skill-item__name-row"],[1,"skill-item__name"],["data-variant","neutral","aria-label","Skill defined by a SKILL.md file, read-only through the API",1,"skill-item__badge"],[1,"skill-item__description"],[1,"skill-item__meta"],[1,"skill-item__actions"],[3,"items"],[1,"skill-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,a){e&1&&(ws(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),GC(4),pl(),Jw(5,A,2,0,"span",4),pl(),Jw(6,E,2,1,"span",5),Jw(7,T,2,2,"span",6),Jw(8,B,2,2,"span",6),pl(),ws(9,"div",7),Jw(10,K,5,1)(11,q,1,1,"ds-kebab-menu",8),pl()()),e&2&&(Ug("skill-item--pending-delete",a.pendingDelete()),XE(4),Yg(a.skill().name),XE(),eC(a.skill().readOnly?5:-1),XE(),eC(a.skill().description?6:-1),XE(),eC(a.resourceCount()>0?7:-1),XE(),eC(a.namedByAgents()>0?8:-1),XE(2),eC(a.pendingDelete()?10:11));},dependencies:[ni,Se],styles:[".skill-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;border-radius:10px;border:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--glass-bg, rgba(255, 255, 255, .72));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px));transition:background .15s ease,border-color .15s ease}.skill-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-color:var(--color-primary, #007aff)}.skill-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.skill-item__name-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.skill-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.skill-item__badge[_ngcontent-%COMP%]{flex-shrink:0;font-family:var(--font-heading);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:none;border-radius:0;padding:.15rem .5rem;white-space:nowrap}.skill-item__badge[data-variant=neutral][_ngcontent-%COMP%]{border:1px solid var(--color-divider, rgba(0, 0, 0, .12));color:var(--color-neutral-600, #6e6e73);background:transparent}.skill-item__description[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.skill-item__meta[_ngcontent-%COMP%]{font-size:.7rem;color:var(--color-text-tertiary, #8e8e93)}.skill-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.skill-item[_ngcontent-%COMP%]:hover .skill-item__actions[_ngcontent-%COMP%], .skill-item[_ngcontent-%COMP%]:focus-within .skill-item__actions[_ngcontent-%COMP%], .skill-item--pending-delete[_ngcontent-%COMP%] .skill-item__actions[_ngcontent-%COMP%]{opacity:1}.skill-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error, #ff3b30);margin-right:.25rem;white-space:nowrap}"]})};export{D};
@@ -1 +1 @@
1
- import {g,bl as Mt,W as x}from'./main-ZCPOJMDG.js';var s=class n{snackBar=g(Mt);success(t,o=2e3){this.snackBar.open(t,"",{duration:o,horizontalPosition:"center",verticalPosition:"bottom",panelClass:["snackbar-success"]});}error(t,o=3e3){this.snackBar.open(t,"",{duration:o,horizontalPosition:"center",verticalPosition:"bottom",panelClass:["snackbar-error"]});}info(t,o=2e3){this.snackBar.open(t,"",{duration:o,horizontalPosition:"center",verticalPosition:"bottom",panelClass:["snackbar-info"]});}static \u0275fac=function(o){return new(o||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};export{s};
1
+ import {g,bl as Mt,W as x}from'./main-JF54VQMT.js';var s=class n{snackBar=g(Mt);success(t,o=2e3){this.snackBar.open(t,"",{duration:o,horizontalPosition:"center",verticalPosition:"bottom",panelClass:["snackbar-success"]});}error(t,o=3e3){this.snackBar.open(t,"",{duration:o,horizontalPosition:"center",verticalPosition:"bottom",panelClass:["snackbar-error"]});}info(t,o=2e3){this.snackBar.open(t,"",{duration:o,horizontalPosition:"center",verticalPosition:"bottom",panelClass:["snackbar-info"]});}static \u0275fac=function(o){return new(o||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};export{s};