@whoz-oss/coday-client 0.0.0-workstream-forge.100 → 0.0.0-workstream-forge.101

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/browser/{chunk-D8omHn7V.js → chunk--t7R2FQ4.js} +1 -1
  2. package/browser/{chunk-BMck3RrE.js → chunk-1I02Q6MC.js} +1 -1
  3. package/browser/{chunk-Cz3puK-P.js → chunk-8j0zbcE8.js} +1 -1
  4. package/browser/{chunk-C_5eQn8U.js → chunk-B0ec6QE2.js} +1 -1
  5. package/browser/{chunk-B5rnCx1b.js → chunk-B4NACXvL.js} +1 -1
  6. package/browser/{chunk-oODMxNh6.js → chunk-B6YuGUPU.js} +1 -1
  7. package/browser/{chunk-DLNa7187.js → chunk-BAJj5ySw.js} +1 -1
  8. package/browser/{chunk-DN2TqPUr.js → chunk-BCkdBoJT.js} +1 -1
  9. package/browser/{chunk-CBShRrKK.js → chunk-BD9QyJ_D.js} +1 -1
  10. package/browser/{chunk-C0ZbwTfx.js → chunk-BDClIjt_.js} +1 -1
  11. package/browser/{chunk-65tVAuhG.js → chunk-BLaIJYTj.js} +1 -1
  12. package/browser/{chunk-BtsE1R-P.js → chunk-BNS4nii-.js} +1 -1
  13. package/browser/{chunk-C0fiVu73.js → chunk-BNygw8cy.js} +1 -1
  14. package/browser/{chunk-CKI8BAs4.js → chunk-Bb97Kx1k.js} +1 -1
  15. package/browser/{chunk-DBuc5FLi.js → chunk-BhOBAGu0.js} +1 -1
  16. package/browser/{chunk-DfZZLMRA.js → chunk-Bk4wk-Q1.js} +1 -1
  17. package/browser/{chunk-x8X4JXC2.js → chunk-Bo7GcoVn.js} +1 -1
  18. package/browser/{chunk-DVHrTMkL.js → chunk-BuJ0a-jT.js} +1 -1
  19. package/browser/{chunk-BBUDU1bN.js → chunk-BvCaRkbC.js} +1 -1
  20. package/browser/{chunk-BHrmI0lw.js → chunk-BxKTxblc.js} +1 -1
  21. package/browser/{chunk-BrcfGPj_.js → chunk-BxlhPj4a.js} +1 -1
  22. package/browser/{chunk-J2uWrEAz.js → chunk-C-qaxhzV.js} +1 -1
  23. package/browser/{chunk-Jp1EkzoM.js → chunk-C2xbdglQ.js} +1 -1
  24. package/browser/{chunk-BFaLzff-.js → chunk-C6CIcqIe.js} +1 -1
  25. package/browser/{chunk-CXA9dtI0.js → chunk-CFyEUO4f.js} +1 -1
  26. package/browser/{chunk-DLde3g-3.js → chunk-CGFcBWlS.js} +1 -1
  27. package/browser/{chunk-BBgb869U.js → chunk-CIHz2nkf.js} +1 -1
  28. package/browser/{chunk-QpH9EEhD.js → chunk-CKhMv1Ug.js} +1 -1
  29. package/browser/{chunk-CDVwpBWc.js → chunk-CTEyKNKm.js} +1 -1
  30. package/browser/{chunk-DA_sbewE.js → chunk-CTRtr19h.js} +1 -1
  31. package/browser/chunk-CVM23KJ3.js +11 -0
  32. package/browser/{chunk-CdXOdNcd.js → chunk-CXyYyXX9.js} +1 -1
  33. package/browser/{chunk-C6aIC46X.js → chunk-C_etNNrs.js} +1 -1
  34. package/browser/{chunk-mQPGTeS6.js → chunk-CeL5OSae.js} +1 -1
  35. package/browser/{chunk-BKbzb9p8.js → chunk-ChNYRuIU.js} +1 -1
  36. package/browser/{chunk-BnAqiYqI.js → chunk-CkzIzWyC.js} +1 -1
  37. package/browser/{chunk-DoEwzfHE.js → chunk-ClEsObVj.js} +1 -1
  38. package/browser/{chunk-Bg9IOIBp.js → chunk-ClmFjies.js} +1 -1
  39. package/browser/{chunk-CjG8z5z5.js → chunk-CopZgdKm.js} +1 -1
  40. package/browser/{chunk-CgJRLZNp.js → chunk-Cpofe53u.js} +1 -1
  41. package/browser/{chunk-CvZWmgd7.js → chunk-CrU3BQQS.js} +1 -1
  42. package/browser/{chunk-DMAW_dUA.js → chunk-CvmyFGzy.js} +1 -1
  43. package/browser/{chunk-TPspvPcl.js → chunk-Cy8V5YYe.js} +1 -1
  44. package/browser/{chunk-C0L3lRLz.js → chunk-CyLUngtV.js} +1 -1
  45. package/browser/{chunk-bBy0vM9Y.js → chunk-D-FNlEoa.js} +1 -1
  46. package/browser/{chunk-DphUtWOw.js → chunk-D1duEHtM.js} +1 -1
  47. package/browser/{chunk-8li-9jxk.js → chunk-D8veTI-Z.js} +1 -1
  48. package/browser/{chunk-CSuL5t9_.js → chunk-DEcr5XTR.js} +1 -1
  49. package/browser/{chunk-2mrqEJI8.js → chunk-DI7OUCqm.js} +1 -1
  50. package/browser/{chunk-BHOfNKW0.js → chunk-DQuNupfJ.js} +1 -1
  51. package/browser/{chunk-6B3xFuOu.js → chunk-DUTgv2ie.js} +1 -1
  52. package/browser/{chunk-By9VfPER.js → chunk-DW5_PM92.js} +1 -1
  53. package/browser/{chunk-CxodB9Ss.js → chunk-DjIEzaIJ.js} +1 -1
  54. package/browser/{chunk-CccoF4zk.js → chunk-Dp3xB5xu.js} +1 -1
  55. package/browser/{chunk-rt0W0Bep.js → chunk-DsBVpg5c.js} +1 -1
  56. package/browser/{chunk-B7tH9_ts.js → chunk-DsvZ07ov.js} +1 -1
  57. package/browser/{chunk-DTHwi4pI.js → chunk-Du4XO3B9.js} +1 -1
  58. package/browser/{chunk-Dls1Urvo.js → chunk-DxHp0kqe.js} +1 -1
  59. package/browser/{chunk-BSWAm8Lc.js → chunk-DyVTJvil.js} +1 -1
  60. package/browser/chunk-Gb2w1W4p.js +1 -0
  61. package/browser/{chunk-OEx8WMIh.js → chunk-PT1nxNHL.js} +1 -1
  62. package/browser/{chunk-CuEHbWdb.js → chunk-PljuvLnA.js} +1 -1
  63. package/browser/{chunk-BvkBTPsn.js → chunk-T7g1MoTP.js} +1 -1
  64. package/browser/{chunk-DL_yUw7E.js → chunk-ZZzKEzSY.js} +1 -1
  65. package/browser/{chunk-D1K33IKA.js → chunk-aMjpfW4c.js} +1 -1
  66. package/browser/{chunk-Bm8CD55z.js → chunk-fU4sX2V7.js} +1 -1
  67. package/browser/{chunk-Ck9jrhg3.js → chunk-j9VL-NZi.js} +1 -1
  68. package/browser/{chunk-giFp1XTq.js → chunk-mLUorSK3.js} +1 -1
  69. package/browser/{chunk-DYh1IsU-.js → chunk-pBppBdvD.js} +1 -1
  70. package/browser/{chunk-CU55cDg_.js → chunk-spR5H-6W.js} +1 -1
  71. package/browser/{chunk-DyNaE9Xq.js → chunk-yRRB8B0R.js} +1 -1
  72. package/browser/index.html +1 -1
  73. package/browser/{main-HLQ22ACS.js → main-DB5EJGYC.js} +1 -1
  74. package/package.json +1 -1
  75. package/browser/chunk-BXgG4B5s.js +0 -1
  76. package/browser/chunk-B_yM2E8f.js +0 -11
@@ -1 +1 @@
1
- import {S as St}from'./chunk-BnAqiYqI.js';import {an as ue,g,L,ao as W,F,N as N$1,ap as Cd,e as xw,aq as a,ar as S,as as F$1,at as c,k as ws,q as Rg,J as Jw,o as pl,u as bg,X as XE,v as eC,B as Pg,E as EC,I as IC,au as tv,ae as kt,av as B,W as x,aw as hl,n as GC,ax as gl,a8 as Yg,a9 as lC,aa as If,ac as gC,ab as wf,S as Sg}from'./main-HLQ22ACS.js';import {a as at,s as st,r as rt,_ as _i}from'./chunk-BBUDU1bN.js';import'./chunk-Cz3puK-P.js';import {G as Ge}from'./chunk-C_5eQn8U.js';import'./chunk-QpH9EEhD.js';import'./chunk-CvZWmgd7.js';import'./chunk-B5rnCx1b.js';import'./chunk-CuEHbWdb.js';import'./chunk-DLde3g-3.js';import'./chunk-D1K33IKA.js';import'./chunk-bBy0vM9Y.js';import'./chunk-65tVAuhG.js';var T=class o{welcomeMessages=["Welcome to Coday","Bienvenue sur Coday","Bienvenido a Coday","Willkommen bei Coday","Benvenuto su Coday","Bem-vindo ao Coday","Welkom bij Coday","\u0414\u043E\u0431\u0440\u043E \u043F\u043E\u0436\u0430\u043B\u043E\u0432\u0430\u0442\u044C \u0432 Coday","Coday \u3078\u3088\u3046\u3053\u305D","\u6B22\u8FCE\u6765\u5230 Coday","Coday \uC5D0 \uC624\uC2E0 \uAC83\uC744 \uD658\uC601\uD569\uB2C8\uB2E4","\u0645\u0631\u062D\u0628\u064B\u0627 \u0628\u0643 \u0641\u064A Coday"];currentWelcomeIndex=0;currentWelcomeMessage=this.welcomeMessages[0];welcomeRotationInterval;ngOnInit(){this.startWelcomeRotation();}ngOnDestroy(){this.stopWelcomeRotation();}startWelcomeRotation(){this.welcomeRotationInterval=window.setInterval(()=>{this.currentWelcomeIndex=(this.currentWelcomeIndex+1)%this.welcomeMessages.length,this.currentWelcomeMessage=this.welcomeMessages[this.currentWelcomeIndex];},3e3);}stopWelcomeRotation(){this.welcomeRotationInterval&&(clearInterval(this.welcomeRotationInterval),this.welcomeRotationInterval=void 0);}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=xw({type:o,selectors:[["app-welcome-message"]],decls:2,vars:1,consts:[[1,"welcome-title"]],template:function(t,i){t&1&&(hl(0,"h1",0),GC(1),gl()),t&2&&(XE(),Yg(i.currentWelcomeMessage));},styles:[".welcome-title[_ngcontent-%COMP%]{font-size:clamp(1.5rem,4vw,4rem);font-weight:700;background:linear-gradient(90deg,var(--color-primary, #3b82f6) 0%,var(--color-accent, #8b5cf6) 50%,var(--color-primary, #3b82f6) 100%);background-size:200% auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation:_ngcontent-%COMP%_gradientShift 3s ease-in-out infinite;margin:0;padding:0;line-height:1.2;transition:opacity .5s ease-in-out;display:block;min-height:1.2em;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@keyframes _ngcontent-%COMP%_gradientShift{0%{background-position:0% center}50%{background-position:100% center}to{background-position:0% center}}"],changeDetection:1})};var N=class o{destroy$=new ue;isSetup=false;codayService=g(Ge);preferencesService=g(L);setup(){if(this.isSetup){console.warn("[AGENT-NOTIFICATION] Service already set up");return}console.log("[AGENT-NOTIFICATION] Setting up agent notification service"),this.codayService.isThinking$.pipe(Cd(this.destroy$),tv(),kt(([e,t])=>e===true&&t===false)).subscribe(()=>{console.log("[AGENT-NOTIFICATION] Agent stopped thinking, notifying task finished"),this.notifyTaskFinishedIfEnabled();}),this.preferencesService.browserNotificationEnabled$.pipe(Cd(this.destroy$),tv(),kt(([e,t])=>e===false&&t===true)).subscribe(()=>{console.log("[AGENT-NOTIFICATION] Browser notifications enabled, checking permission"),this.handleBrowserNotificationEnabled();}),this.isSetup=true;}notifyTaskFinishedIfEnabled(){this.preferencesService.getAgentNotificationEnabled()&&(this.preferencesService.getNotificationSoundEnabled()&&this.playCompletionSound(),this.preferencesService.getBrowserNotificationEnabled()&&this.sendBrowserNotification());}playCompletionSound(){try{let e=new(window.AudioContext||window.webkitAudioContext),t=e.createOscillator(),i=e.createGain();t.connect(i),i.connect(e.destination),t.frequency.setValueAtTime(700,e.currentTime),i.gain.setValueAtTime(.1,e.currentTime),i.gain.exponentialRampToValueAtTime(.01,e.currentTime+.08),t.start(e.currentTime),t.stop(e.currentTime+.08);let n=e.createOscillator(),r=e.createGain();n.connect(r),r.connect(e.destination);let l=e.currentTime+.11;n.frequency.setValueAtTime(950,l),r.gain.setValueAtTime(.1,l),r.gain.exponentialRampToValueAtTime(.01,l+.09),n.start(l),n.stop(l+.09),console.log("[AGENT-NOTIFICATION] Completion sound played");}catch(e){console.error("[AGENT-NOTIFICATION] Failed to play completion sound:",e);}}handleBrowserNotificationEnabled(){return B(this,null,function*(){if(!("Notification"in window)){console.warn("[AGENT-NOTIFICATION] Browser does not support notifications"),this.preferencesService.setBrowserNotificationEnabled(false);return}if(Notification.permission==="denied"){console.warn("[AGENT-NOTIFICATION] Permission denied, disabling browser notifications"),this.preferencesService.setBrowserNotificationEnabled(false);return}if(Notification.permission==="granted"){console.log("[AGENT-NOTIFICATION] Permission already granted, showing confirmation"),this.createConfirmationNotification();return}try{(yield Notification.requestPermission())==="granted"?(console.log("[AGENT-NOTIFICATION] Permission granted, showing confirmation"),this.createConfirmationNotification()):(console.log("[AGENT-NOTIFICATION] Permission denied or dismissed"),this.preferencesService.setBrowserNotificationEnabled(!1));}catch(e){console.error("[AGENT-NOTIFICATION] Error requesting permission:",e),this.preferencesService.setBrowserNotificationEnabled(false);}})}sendBrowserNotification(){if(!("Notification"in window)){console.warn("[AGENT-NOTIFICATION] Browser does not support notifications");return}if(document.hasFocus()){console.warn("[AGENT-NOTIFICATION] Document is focused, skipping browser notification");return}Notification.permission==="granted"?this.createTaskCompleteNotification():console.warn("[AGENT-NOTIFICATION] Permission not granted, cannot send notification");}createConfirmationNotification(){let e=new Notification("Coday - Notifications Enabled",{body:"You will be notified when the agent completes tasks",icon:"/favicon.ico",tag:"coday-notifications-enabled",requireInteraction:false});setTimeout(()=>e.close(),4e3),e.onclick=()=>{window.focus(),e.close();},console.log("[AGENT-NOTIFICATION] Confirmation notification sent");}createTaskCompleteNotification(){let e=new Notification("Coday - Task Complete",{body:"The agent has finished and is waiting for your input",icon:"/favicon.ico",tag:"coday-task-complete",requireInteraction:false});setTimeout(()=>e.close(),5e3),e.onclick=()=>{window.focus(),e.close();},console.log("[AGENT-NOTIFICATION] Task complete notification sent");}ngOnDestroy(){console.log("[AGENT-NOTIFICATION] Service destroyed"),this.destroy$.next(),this.destroy$.complete();}static \u0275fac=function(t){return new(t||o)};static \u0275prov=x({token:o,factory:o.\u0275fac,providedIn:"root"})};var Z=["inputSection"];function ee(o,e){if(o&1){let t=lC();ws(0,"app-thread",4),Rg("chatFocused",function(){If(t);let n=gC();return wf(n.onChatFocusedOnMobile())})("drawerStateChange",function(n){If(t);let r=gC();return wf(r.onDrawerStateChange(n))}),pl();}if(o&2){let t=gC();bg("projectName",t.projectName)("threadId",t.threadId);}}function te(o,e){if(o&1){let t=lC();ws(0,"div",5),Sg(1,"app-welcome-message"),pl(),ws(2,"div",6,0)(4,"div",7)(5,"div",8)(6,"app-chat-textarea",9),Rg("messageSubmitted",function(n){If(t);let r=gC();return wf(r.onMessageSubmitted(n))})("voiceMessageReady",function(n){If(t);let r=gC();return wf(r.onVoiceMessageReady(n))})("voiceRecordingToggled",function(n){If(t);let r=gC();return wf(r.onVoiceToggled(n))})("heightChanged",function(n){If(t);let r=gC();return wf(r.onInputHeightChanged(n))})("textareaFocused",function(){If(t);let n=gC();return wf(n.onChatFocusedOnMobile())}),pl()()()();}if(o&2){let t=gC();XE(6),bg("isDisabled",t.isSessionInitializing)("isSessionInitializing",t.isSessionInitializing)("showWelcome",true)("isThinking",false)("isStarting",t.isStartingFirstMessage);}}var K=class o{destroy$=new ue;inputSection;sidenav;projectName="";threadId=null;isSessionInitializing=false;isStartingFirstMessage=false;inputSectionHeight=80;codayService=g(Ge);titleService=g(at);preferencesService=g(L);route=g(W);router=g(F);threadApiService=g(N$1);agentNotificationService=g(N);firstMessageState=g(st);constructor(){console.log("[MAIN-APP] Using new thread-based architecture (no clientId needed)");}ngOnInit(){this.agentNotificationService.setup(),this.setupPrintHandlers(),this.route.params.pipe(Cd(this.destroy$)).subscribe(e=>{let t=e.projectName,i=e.threadId||null;console.log("[MAIN-APP] Route params updated:",{project:t,thread:i,previousProject:this.projectName,previousThread:this.threadId}),this.projectName=t,this.threadId=i,this.threadId?console.log("[MAIN-APP] Thread selected - ThreadComponent will display"):(console.log("[MAIN-APP] No thread selected - showing welcome view"),this.initializeWelcomeView());});}initializeWelcomeView(){this.codayService.setTabTitleService(this.titleService);}ngAfterViewInit(){setTimeout(()=>this.updateInputSectionHeight(),100);}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),window.removeEventListener("beforeprint",this.handleBeforePrint),window.removeEventListener("afterprint",this.handleAfterPrint);}onMessageSubmitted(e){console.log("[MAIN-APP] First message submitted from welcome view:",e),this.isSessionInitializing=true,this.isStartingFirstMessage=true,this.threadApiService.createThread().subscribe({next:t=>{console.log("[MAIN-APP] Thread created:",t.thread.id),this.firstMessageState.setPendingFirstMessage(e),this.router.navigate(["project",this.projectName,"thread",t.thread.id]);},error:t=>{console.error("[MAIN-APP] Failed to create thread:",t),this.isSessionInitializing=false,this.isStartingFirstMessage=false,alert("Failed to create conversation: "+(t.message||"Unknown error"));}});}onVoiceToggled(e){console.log("[VOICE] Recording in welcome view:",e);}onVoiceMessageReady(e){console.log("[MAIN-APP] Voice message ready from welcome view"),this.isSessionInitializing=true,this.isStartingFirstMessage=true,this.threadApiService.createThread().subscribe({next:t=>{console.log("[MAIN-APP] Thread created for voice message:",t.thread.id),this.firstMessageState.setPendingVoiceMessage(e),this.router.navigate(["project",this.projectName,"thread",t.thread.id]);},error:t=>{console.error("[MAIN-APP] Failed to create thread for voice message:",t),this.isSessionInitializing=false,this.isStartingFirstMessage=false,alert("Failed to create conversation: "+(t.message||"Unknown error"));}});}isDrawerOpen=false;onDrawerStateChange(e){this.isDrawerOpen=e;}onChatFocusedOnMobile(){window.innerWidth<1024&&this.sidenav?.close();}onInputHeightChanged(e){console.log("[MAIN-APP] Input height changed:",e),this.inputSectionHeight=e;}updateInputSectionHeight(){if(this.inputSection?.nativeElement){let e=this.inputSection.nativeElement.offsetHeight;e!==this.inputSectionHeight&&(console.log("[MAIN-APP] Input section height updated:",e),this.inputSectionHeight=e);}}setupPrintHandlers(){window.addEventListener("beforeprint",this.handleBeforePrint),window.addEventListener("afterprint",this.handleAfterPrint);}handleBeforePrint=()=>{console.log("[PRINT] Before print event triggered");let e=this.preferencesService.getPrintTechnicalMessages();console.log("[PRINT] Print technical messages:",e),e?document.body.classList.add("print-include-technical"):document.body.classList.remove("print-include-technical");};handleAfterPrint=()=>{console.log("[PRINT] After print event triggered"),document.body.classList.remove("print-include-technical");};static \u0275fac=function(t){return new(t||o)};static \u0275cmp=xw({type:o,selectors:[["app-main"]],viewQuery:function(t,i){if(t&1&&Pg(Z,5)(St,5),t&2){let n;EC(n=IC())&&(i.inputSection=n.first),EC(n=IC())&&(i.sidenav=n.first);}},decls:4,vars:2,consts:[["inputSection",""],[3,"drawerOpen"],[1,"app",3,"mousedown","touchstart"],[3,"projectName","threadId"],[3,"chatFocused","drawerStateChange","projectName","threadId"],[1,"welcome-section"],[1,"input-section"],[1,"input-center"],[1,"input-glass"],[3,"messageSubmitted","voiceMessageReady","voiceRecordingToggled","heightChanged","textareaFocused","isDisabled","isSessionInitializing","showWelcome","isThinking","isStarting"]],template:function(t,i){t&1&&(ws(0,"app-sidenav",1)(1,"div",2),Rg("mousedown",function(){return i.onChatFocusedOnMobile()})("touchstart",function(){return i.onChatFocusedOnMobile()}),Jw(2,ee,1,2,"app-thread",3)(3,te,7,5),pl()()),t&2&&(bg("drawerOpen",i.isDrawerOpen),XE(2),eC(i.threadId?2:3));},dependencies:[rt,_i,T,St],styles:["[_nghost-%COMP%]{display:flex;height:100vh;width:100%;overflow:hidden;justify-content:center}.app[_ngcontent-%COMP%]{width:100%;max-width:100%;min-width:0;height:100%;display:flex;flex-direction:column;background:var(--color-bg);color:var(--color-text);transition:all .3s ease;position:relative;justify-content:center;overflow:hidden}.chat-wrapper[_ngcontent-%COMP%]{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;background:transparent;width:100%;padding:2.5rem 0 1.5rem;display:flex;justify-content:center}.chat-wrapper[_ngcontent-%COMP%] .chat-center[_ngcontent-%COMP%]{max-width:760px;width:100%;margin:0;padding:0 2rem}@media(max-width:768px){.chat-wrapper[_ngcontent-%COMP%] .chat-center[_ngcontent-%COMP%]{padding:0 1rem}}.welcome-section[_ngcontent-%COMP%]{flex-shrink:0;text-align:center;padding:2rem 1rem;animation:_ngcontent-%COMP%_fadeInUp .8s ease-out;display:flex;justify-content:center;align-items:center;width:100%;min-width:0;overflow:hidden}@keyframes _ngcontent-%COMP%_fadeInUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.input-section[_ngcontent-%COMP%]{flex-shrink:0;position:relative;border-top:none;background:transparent;box-shadow:none;padding:2.5rem 0 2rem;overflow-y:visible;max-height:none;width:100%;z-index:10;pointer-events:none;display:flex;justify-content:center}.input-center[_ngcontent-%COMP%]{max-width:760px;width:100%;margin:0;padding:0 2rem;display:flex;justify-content:center;align-items:end;position:relative;pointer-events:auto}@media(max-width:768px){.input-center[_ngcontent-%COMP%]{padding:0 1rem}}.input-glass[_ngcontent-%COMP%]{background:none;box-shadow:none;width:100%;min-height:64px;display:flex;align-items:stretch;gap:0;pointer-events:auto;position:relative;overflow:visible}.input-glass[_ngcontent-%COMP%] app-chat-textarea[_ngcontent-%COMP%]{width:100%;min-width:0;flex:1 1 auto;align-self:stretch;display:flex}body.dark[_nghost-%COMP%], body.dark [_nghost-%COMP%], [_ngcontent-%COMP%]:root[data-theme=dark] .input-glass[_ngcontent-%COMP%]{background:#24283073;border-color:#b4c8ff17;box-shadow:0 8px 32px #0000002b,0 1.5px 8px #00000012}.choice-overlay[_ngcontent-%COMP%]{z-index:10;width:100%;display:flex;justify-content:center;align-items:center}.upload-status[_ngcontent-%COMP%]{position:fixed;bottom:100px;left:50%;transform:translate(-50%);z-index:1000;display:flex;align-items:center;padding:12px 20px;background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);border-radius:16px;font-size:.9em;color:var(--color-text);box-shadow:var(--glass-shadow);max-width:300px;text-align:center}.upload-status.error[_ngcontent-%COMP%]{background:#ff3b3026;color:var(--color-error);border-color:#ff3b304d}@media(max-width:768px){.welcome-section[_ngcontent-%COMP%]{padding:1.5rem 1rem}.input-section[_ngcontent-%COMP%]{padding:1.5rem .75rem 1rem}.input-center[_ngcontent-%COMP%]{padding:0 .5rem}}@media print{[_nghost-%COMP%]{display:block!important;height:auto!important;overflow:visible!important}.app[_ngcontent-%COMP%]{height:auto!important;overflow:visible!important;display:block!important}.input-section[_ngcontent-%COMP%], .welcome-section[_ngcontent-%COMP%]{display:none!important}}"],data:{animation:[a("slideIn",[S(":enter",[F$1({transform:"translateY(100%)",opacity:0}),c("300ms ease-out",F$1({transform:"translateY(0)",opacity:1}))]),S(":leave",[c("200ms ease-in",F$1({transform:"translateY(100%)",opacity:0}))])])]},changeDetection:1})};export{K as MainAppComponent};
1
+ import {S as St}from'./chunk-CkzIzWyC.js';import {an as ue,g,L,ao as W,F,N as N$1,ap as Cd,e as xw,aq as a,ar as S,as as F$1,at as c,k as ws,q as Rg,J as Jw,o as pl,u as bg,X as XE,v as eC,B as Pg,E as EC,I as IC,au as tv,ae as kt,av as B,W as x,aw as hl,n as GC,ax as gl,a8 as Yg,a9 as lC,aa as If,ac as gC,ab as wf,S as Sg}from'./main-DB5EJGYC.js';import {a as at,s as st,r as rt,_ as _i}from'./chunk-BvCaRkbC.js';import'./chunk-8j0zbcE8.js';import {G as Ge}from'./chunk-B0ec6QE2.js';import'./chunk-CKhMv1Ug.js';import'./chunk-CrU3BQQS.js';import'./chunk-B4NACXvL.js';import'./chunk-PljuvLnA.js';import'./chunk-CGFcBWlS.js';import'./chunk-aMjpfW4c.js';import'./chunk-D-FNlEoa.js';import'./chunk-BLaIJYTj.js';var T=class o{welcomeMessages=["Welcome to Coday","Bienvenue sur Coday","Bienvenido a Coday","Willkommen bei Coday","Benvenuto su Coday","Bem-vindo ao Coday","Welkom bij Coday","\u0414\u043E\u0431\u0440\u043E \u043F\u043E\u0436\u0430\u043B\u043E\u0432\u0430\u0442\u044C \u0432 Coday","Coday \u3078\u3088\u3046\u3053\u305D","\u6B22\u8FCE\u6765\u5230 Coday","Coday \uC5D0 \uC624\uC2E0 \uAC83\uC744 \uD658\uC601\uD569\uB2C8\uB2E4","\u0645\u0631\u062D\u0628\u064B\u0627 \u0628\u0643 \u0641\u064A Coday"];currentWelcomeIndex=0;currentWelcomeMessage=this.welcomeMessages[0];welcomeRotationInterval;ngOnInit(){this.startWelcomeRotation();}ngOnDestroy(){this.stopWelcomeRotation();}startWelcomeRotation(){this.welcomeRotationInterval=window.setInterval(()=>{this.currentWelcomeIndex=(this.currentWelcomeIndex+1)%this.welcomeMessages.length,this.currentWelcomeMessage=this.welcomeMessages[this.currentWelcomeIndex];},3e3);}stopWelcomeRotation(){this.welcomeRotationInterval&&(clearInterval(this.welcomeRotationInterval),this.welcomeRotationInterval=void 0);}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=xw({type:o,selectors:[["app-welcome-message"]],decls:2,vars:1,consts:[[1,"welcome-title"]],template:function(t,i){t&1&&(hl(0,"h1",0),GC(1),gl()),t&2&&(XE(),Yg(i.currentWelcomeMessage));},styles:[".welcome-title[_ngcontent-%COMP%]{font-size:clamp(1.5rem,4vw,4rem);font-weight:700;background:linear-gradient(90deg,var(--color-primary, #3b82f6) 0%,var(--color-accent, #8b5cf6) 50%,var(--color-primary, #3b82f6) 100%);background-size:200% auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation:_ngcontent-%COMP%_gradientShift 3s ease-in-out infinite;margin:0;padding:0;line-height:1.2;transition:opacity .5s ease-in-out;display:block;min-height:1.2em;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@keyframes _ngcontent-%COMP%_gradientShift{0%{background-position:0% center}50%{background-position:100% center}to{background-position:0% center}}"],changeDetection:1})};var N=class o{destroy$=new ue;isSetup=false;codayService=g(Ge);preferencesService=g(L);setup(){if(this.isSetup){console.warn("[AGENT-NOTIFICATION] Service already set up");return}console.log("[AGENT-NOTIFICATION] Setting up agent notification service"),this.codayService.isThinking$.pipe(Cd(this.destroy$),tv(),kt(([e,t])=>e===true&&t===false)).subscribe(()=>{console.log("[AGENT-NOTIFICATION] Agent stopped thinking, notifying task finished"),this.notifyTaskFinishedIfEnabled();}),this.preferencesService.browserNotificationEnabled$.pipe(Cd(this.destroy$),tv(),kt(([e,t])=>e===false&&t===true)).subscribe(()=>{console.log("[AGENT-NOTIFICATION] Browser notifications enabled, checking permission"),this.handleBrowserNotificationEnabled();}),this.isSetup=true;}notifyTaskFinishedIfEnabled(){this.preferencesService.getAgentNotificationEnabled()&&(this.preferencesService.getNotificationSoundEnabled()&&this.playCompletionSound(),this.preferencesService.getBrowserNotificationEnabled()&&this.sendBrowserNotification());}playCompletionSound(){try{let e=new(window.AudioContext||window.webkitAudioContext),t=e.createOscillator(),i=e.createGain();t.connect(i),i.connect(e.destination),t.frequency.setValueAtTime(700,e.currentTime),i.gain.setValueAtTime(.1,e.currentTime),i.gain.exponentialRampToValueAtTime(.01,e.currentTime+.08),t.start(e.currentTime),t.stop(e.currentTime+.08);let n=e.createOscillator(),r=e.createGain();n.connect(r),r.connect(e.destination);let l=e.currentTime+.11;n.frequency.setValueAtTime(950,l),r.gain.setValueAtTime(.1,l),r.gain.exponentialRampToValueAtTime(.01,l+.09),n.start(l),n.stop(l+.09),console.log("[AGENT-NOTIFICATION] Completion sound played");}catch(e){console.error("[AGENT-NOTIFICATION] Failed to play completion sound:",e);}}handleBrowserNotificationEnabled(){return B(this,null,function*(){if(!("Notification"in window)){console.warn("[AGENT-NOTIFICATION] Browser does not support notifications"),this.preferencesService.setBrowserNotificationEnabled(false);return}if(Notification.permission==="denied"){console.warn("[AGENT-NOTIFICATION] Permission denied, disabling browser notifications"),this.preferencesService.setBrowserNotificationEnabled(false);return}if(Notification.permission==="granted"){console.log("[AGENT-NOTIFICATION] Permission already granted, showing confirmation"),this.createConfirmationNotification();return}try{(yield Notification.requestPermission())==="granted"?(console.log("[AGENT-NOTIFICATION] Permission granted, showing confirmation"),this.createConfirmationNotification()):(console.log("[AGENT-NOTIFICATION] Permission denied or dismissed"),this.preferencesService.setBrowserNotificationEnabled(!1));}catch(e){console.error("[AGENT-NOTIFICATION] Error requesting permission:",e),this.preferencesService.setBrowserNotificationEnabled(false);}})}sendBrowserNotification(){if(!("Notification"in window)){console.warn("[AGENT-NOTIFICATION] Browser does not support notifications");return}if(document.hasFocus()){console.warn("[AGENT-NOTIFICATION] Document is focused, skipping browser notification");return}Notification.permission==="granted"?this.createTaskCompleteNotification():console.warn("[AGENT-NOTIFICATION] Permission not granted, cannot send notification");}createConfirmationNotification(){let e=new Notification("Coday - Notifications Enabled",{body:"You will be notified when the agent completes tasks",icon:"/favicon.ico",tag:"coday-notifications-enabled",requireInteraction:false});setTimeout(()=>e.close(),4e3),e.onclick=()=>{window.focus(),e.close();},console.log("[AGENT-NOTIFICATION] Confirmation notification sent");}createTaskCompleteNotification(){let e=new Notification("Coday - Task Complete",{body:"The agent has finished and is waiting for your input",icon:"/favicon.ico",tag:"coday-task-complete",requireInteraction:false});setTimeout(()=>e.close(),5e3),e.onclick=()=>{window.focus(),e.close();},console.log("[AGENT-NOTIFICATION] Task complete notification sent");}ngOnDestroy(){console.log("[AGENT-NOTIFICATION] Service destroyed"),this.destroy$.next(),this.destroy$.complete();}static \u0275fac=function(t){return new(t||o)};static \u0275prov=x({token:o,factory:o.\u0275fac,providedIn:"root"})};var Z=["inputSection"];function ee(o,e){if(o&1){let t=lC();ws(0,"app-thread",4),Rg("chatFocused",function(){If(t);let n=gC();return wf(n.onChatFocusedOnMobile())})("drawerStateChange",function(n){If(t);let r=gC();return wf(r.onDrawerStateChange(n))}),pl();}if(o&2){let t=gC();bg("projectName",t.projectName)("threadId",t.threadId);}}function te(o,e){if(o&1){let t=lC();ws(0,"div",5),Sg(1,"app-welcome-message"),pl(),ws(2,"div",6,0)(4,"div",7)(5,"div",8)(6,"app-chat-textarea",9),Rg("messageSubmitted",function(n){If(t);let r=gC();return wf(r.onMessageSubmitted(n))})("voiceMessageReady",function(n){If(t);let r=gC();return wf(r.onVoiceMessageReady(n))})("voiceRecordingToggled",function(n){If(t);let r=gC();return wf(r.onVoiceToggled(n))})("heightChanged",function(n){If(t);let r=gC();return wf(r.onInputHeightChanged(n))})("textareaFocused",function(){If(t);let n=gC();return wf(n.onChatFocusedOnMobile())}),pl()()()();}if(o&2){let t=gC();XE(6),bg("isDisabled",t.isSessionInitializing)("isSessionInitializing",t.isSessionInitializing)("showWelcome",true)("isThinking",false)("isStarting",t.isStartingFirstMessage);}}var K=class o{destroy$=new ue;inputSection;sidenav;projectName="";threadId=null;isSessionInitializing=false;isStartingFirstMessage=false;inputSectionHeight=80;codayService=g(Ge);titleService=g(at);preferencesService=g(L);route=g(W);router=g(F);threadApiService=g(N$1);agentNotificationService=g(N);firstMessageState=g(st);constructor(){console.log("[MAIN-APP] Using new thread-based architecture (no clientId needed)");}ngOnInit(){this.agentNotificationService.setup(),this.setupPrintHandlers(),this.route.params.pipe(Cd(this.destroy$)).subscribe(e=>{let t=e.projectName,i=e.threadId||null;console.log("[MAIN-APP] Route params updated:",{project:t,thread:i,previousProject:this.projectName,previousThread:this.threadId}),this.projectName=t,this.threadId=i,this.threadId?console.log("[MAIN-APP] Thread selected - ThreadComponent will display"):(console.log("[MAIN-APP] No thread selected - showing welcome view"),this.initializeWelcomeView());});}initializeWelcomeView(){this.codayService.setTabTitleService(this.titleService);}ngAfterViewInit(){setTimeout(()=>this.updateInputSectionHeight(),100);}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),window.removeEventListener("beforeprint",this.handleBeforePrint),window.removeEventListener("afterprint",this.handleAfterPrint);}onMessageSubmitted(e){console.log("[MAIN-APP] First message submitted from welcome view:",e),this.isSessionInitializing=true,this.isStartingFirstMessage=true,this.threadApiService.createThread().subscribe({next:t=>{console.log("[MAIN-APP] Thread created:",t.thread.id),this.firstMessageState.setPendingFirstMessage(e),this.router.navigate(["project",this.projectName,"thread",t.thread.id]);},error:t=>{console.error("[MAIN-APP] Failed to create thread:",t),this.isSessionInitializing=false,this.isStartingFirstMessage=false,alert("Failed to create conversation: "+(t.message||"Unknown error"));}});}onVoiceToggled(e){console.log("[VOICE] Recording in welcome view:",e);}onVoiceMessageReady(e){console.log("[MAIN-APP] Voice message ready from welcome view"),this.isSessionInitializing=true,this.isStartingFirstMessage=true,this.threadApiService.createThread().subscribe({next:t=>{console.log("[MAIN-APP] Thread created for voice message:",t.thread.id),this.firstMessageState.setPendingVoiceMessage(e),this.router.navigate(["project",this.projectName,"thread",t.thread.id]);},error:t=>{console.error("[MAIN-APP] Failed to create thread for voice message:",t),this.isSessionInitializing=false,this.isStartingFirstMessage=false,alert("Failed to create conversation: "+(t.message||"Unknown error"));}});}isDrawerOpen=false;onDrawerStateChange(e){this.isDrawerOpen=e;}onChatFocusedOnMobile(){window.innerWidth<1024&&this.sidenav?.close();}onInputHeightChanged(e){console.log("[MAIN-APP] Input height changed:",e),this.inputSectionHeight=e;}updateInputSectionHeight(){if(this.inputSection?.nativeElement){let e=this.inputSection.nativeElement.offsetHeight;e!==this.inputSectionHeight&&(console.log("[MAIN-APP] Input section height updated:",e),this.inputSectionHeight=e);}}setupPrintHandlers(){window.addEventListener("beforeprint",this.handleBeforePrint),window.addEventListener("afterprint",this.handleAfterPrint);}handleBeforePrint=()=>{console.log("[PRINT] Before print event triggered");let e=this.preferencesService.getPrintTechnicalMessages();console.log("[PRINT] Print technical messages:",e),e?document.body.classList.add("print-include-technical"):document.body.classList.remove("print-include-technical");};handleAfterPrint=()=>{console.log("[PRINT] After print event triggered"),document.body.classList.remove("print-include-technical");};static \u0275fac=function(t){return new(t||o)};static \u0275cmp=xw({type:o,selectors:[["app-main"]],viewQuery:function(t,i){if(t&1&&Pg(Z,5)(St,5),t&2){let n;EC(n=IC())&&(i.inputSection=n.first),EC(n=IC())&&(i.sidenav=n.first);}},decls:4,vars:2,consts:[["inputSection",""],[3,"drawerOpen"],[1,"app",3,"mousedown","touchstart"],[3,"projectName","threadId"],[3,"chatFocused","drawerStateChange","projectName","threadId"],[1,"welcome-section"],[1,"input-section"],[1,"input-center"],[1,"input-glass"],[3,"messageSubmitted","voiceMessageReady","voiceRecordingToggled","heightChanged","textareaFocused","isDisabled","isSessionInitializing","showWelcome","isThinking","isStarting"]],template:function(t,i){t&1&&(ws(0,"app-sidenav",1)(1,"div",2),Rg("mousedown",function(){return i.onChatFocusedOnMobile()})("touchstart",function(){return i.onChatFocusedOnMobile()}),Jw(2,ee,1,2,"app-thread",3)(3,te,7,5),pl()()),t&2&&(bg("drawerOpen",i.isDrawerOpen),XE(2),eC(i.threadId?2:3));},dependencies:[rt,_i,T,St],styles:["[_nghost-%COMP%]{display:flex;height:100vh;width:100%;overflow:hidden;justify-content:center}.app[_ngcontent-%COMP%]{width:100%;max-width:100%;min-width:0;height:100%;display:flex;flex-direction:column;background:var(--color-bg);color:var(--color-text);transition:all .3s ease;position:relative;justify-content:center;overflow:hidden}.chat-wrapper[_ngcontent-%COMP%]{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;background:transparent;width:100%;padding:2.5rem 0 1.5rem;display:flex;justify-content:center}.chat-wrapper[_ngcontent-%COMP%] .chat-center[_ngcontent-%COMP%]{max-width:760px;width:100%;margin:0;padding:0 2rem}@media(max-width:768px){.chat-wrapper[_ngcontent-%COMP%] .chat-center[_ngcontent-%COMP%]{padding:0 1rem}}.welcome-section[_ngcontent-%COMP%]{flex-shrink:0;text-align:center;padding:2rem 1rem;animation:_ngcontent-%COMP%_fadeInUp .8s ease-out;display:flex;justify-content:center;align-items:center;width:100%;min-width:0;overflow:hidden}@keyframes _ngcontent-%COMP%_fadeInUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.input-section[_ngcontent-%COMP%]{flex-shrink:0;position:relative;border-top:none;background:transparent;box-shadow:none;padding:2.5rem 0 2rem;overflow-y:visible;max-height:none;width:100%;z-index:10;pointer-events:none;display:flex;justify-content:center}.input-center[_ngcontent-%COMP%]{max-width:760px;width:100%;margin:0;padding:0 2rem;display:flex;justify-content:center;align-items:end;position:relative;pointer-events:auto}@media(max-width:768px){.input-center[_ngcontent-%COMP%]{padding:0 1rem}}.input-glass[_ngcontent-%COMP%]{background:none;box-shadow:none;width:100%;min-height:64px;display:flex;align-items:stretch;gap:0;pointer-events:auto;position:relative;overflow:visible}.input-glass[_ngcontent-%COMP%] app-chat-textarea[_ngcontent-%COMP%]{width:100%;min-width:0;flex:1 1 auto;align-self:stretch;display:flex}body.dark[_nghost-%COMP%], body.dark [_nghost-%COMP%], [_ngcontent-%COMP%]:root[data-theme=dark] .input-glass[_ngcontent-%COMP%]{background:#24283073;border-color:#b4c8ff17;box-shadow:0 8px 32px #0000002b,0 1.5px 8px #00000012}.choice-overlay[_ngcontent-%COMP%]{z-index:10;width:100%;display:flex;justify-content:center;align-items:center}.upload-status[_ngcontent-%COMP%]{position:fixed;bottom:100px;left:50%;transform:translate(-50%);z-index:1000;display:flex;align-items:center;padding:12px 20px;background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);border-radius:16px;font-size:.9em;color:var(--color-text);box-shadow:var(--glass-shadow);max-width:300px;text-align:center}.upload-status.error[_ngcontent-%COMP%]{background:#ff3b3026;color:var(--color-error);border-color:#ff3b304d}@media(max-width:768px){.welcome-section[_ngcontent-%COMP%]{padding:1.5rem 1rem}.input-section[_ngcontent-%COMP%]{padding:1.5rem .75rem 1rem}.input-center[_ngcontent-%COMP%]{padding:0 .5rem}}@media print{[_nghost-%COMP%]{display:block!important;height:auto!important;overflow:visible!important}.app[_ngcontent-%COMP%]{height:auto!important;overflow:visible!important;display:block!important}.input-section[_ngcontent-%COMP%], .welcome-section[_ngcontent-%COMP%]{display:none!important}}"],data:{animation:[a("slideIn",[S(":enter",[F$1({transform:"translateY(100%)",opacity:0}),c("300ms ease-out",F$1({transform:"translateY(0)",opacity:1}))]),S(":leave",[c("200ms ease-in",F$1({transform:"translateY(100%)",opacity:0}))])])]},changeDetection:1})};export{K as MainAppComponent};
@@ -1 +1 @@
1
- import {g,F,C as Ce,da as $,aJ as Tr,G as Gi,bS as Ea,r as re,b as U$1,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,v as eC,ac as gC,z as Ug,a9 as lC,aa as If,ab as wf,ag as fT}from'./main-HLQ22ACS.js';import {$ as $n,S as Se,G as Gn,c as ni}from'./chunk-D1K33IKA.js';import'./chunk-bBy0vM9Y.js';import'./chunk-65tVAuhG.js';function H(t,n){if(t&1&&(ws(0,"span",9),GC(1),pl()),t&2){let e=n;Ug("agent-config-item__mode-badge--advanced",e.mode==="ADVANCED")("agent-config-item__mode-badge--loop",e.mode==="LOOP"),XE(),Yg(e.label);}}function J(t,n){if(t&1&&(ws(0,"span",5),GC(1),pl()),t&2){let e=gC();XE(),Yg(e.config().modelName);}}function Q(t,n){if(t&1&&(ws(0,"span",6),GC(1),pl()),t&2){let e=gC();XE(),Yg(e.config().description);}}function X(t,n){if(t&1){let e=lC();ws(0,"span",10),GC(1,"Delete?"),pl(),ws(2,"ds-icon-button",11),Rg("action",function(){If(e);let i=gC();return wf(i.onDeleteConfirmed())}),pl(),ws(3,"ds-icon-button",12),Rg("action",function(){If(e);let i=gC();return wf(i.onDeleteCancelled())}),pl();}}function Y(t,n){if(t&1){let e=lC();ws(0,"ds-kebab-menu",13),Rg("itemSelected",function(i){If(e);let A=gC();return wf(A.onMenuAction(i))}),pl();}if(t&2){let e=gC();bg("items",e.readOnly()?e.readOnlyMenuItems:e.menuItems);}}var w=class t{router=g(F);config=ZB.required();namespaceId=ZB(void 0);platformMode=ZB(false);readOnly=ZB(false);deleteRequested=qB();pendingDelete=Gi(false);executionModeBadge=mT(()=>{let n=this.config(),e=n.executionMode??(n.advancedExecution?"ADVANCED":"SIMPLE");return e==="ADVANCED"?{mode:e,label:"ADVANCED"}:e==="LOOP"?{mode:e,label:"LOOP"}:null});canLaunch=mT(()=>!this.platformMode()&&this.config().executionMode==="LOOP");get menuItems(){let n=[{key:"edit",label:"Edit agent config",icon:"edit"},{key:"inspect",label:"Inspect definition",icon:"search"}];return this.canLaunch()&&n.push({key:"launch",label:"Launch loop",icon:"play_arrow"}),n.push({key:"delete",label:"Delete agent config",icon:"delete",variant:"danger"}),n}readOnlyMenuItems=[{key:"inspect",label:"Inspect definition",icon:"search"}];onMenuAction(n){switch(n){case "edit":this.platformMode()?this.router.navigate(["/agentos","admin","agent-configs",this.config().id,"edit"]):this.router.navigate(["/agentos",this.namespaceId(),"agent-configs",this.config().id,"edit"]);break;case "inspect":this.platformMode()?this.router.navigate(["/agentos","admin","agent-configs",this.config().id,"inspect"]):this.router.navigate(["/agentos",this.namespaceId(),"agent-configs",this.config().id,"inspect"]);break;case "launch":this.router.navigate(["/agentos",this.namespaceId(),"agent-configs",this.config().id,"launch"]);break;case "delete":this.pendingDelete.set(true);break}}onDeleteConfirmed(){this.pendingDelete.set(false),this.deleteRequested.emit(this.config());}onDeleteCancelled(){this.pendingDelete.set(false);}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=xw({type:t,selectors:[["agentos-agent-config-item"]],inputs:{config:[1,"config"],namespaceId:[1,"namespaceId"],platformMode:[1,"platformMode"],readOnly:[1,"readOnly"]},outputs:{deleteRequested:"deleteRequested"},decls:11,vars:5,consts:[["role","listitem","dsBlueprint","",1,"agent-config-item"],[1,"agent-config-item__body"],[1,"agent-config-item__name-row"],[1,"agent-config-item__name"],[1,"agent-config-item__mode-badge",3,"agent-config-item__mode-badge--advanced","agent-config-item__mode-badge--loop"],[1,"agent-config-item__model"],[1,"agent-config-item__description"],[1,"agent-config-item__actions"],[3,"items"],[1,"agent-config-item__mode-badge"],[1,"agent-config-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,o){if(e&1&&(ws(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),GC(4),pl(),Jw(5,H,2,5,"span",4),pl(),Jw(6,J,2,1,"span",5),Jw(7,Q,2,1,"span",6),pl(),ws(8,"div",7),Jw(9,X,4,0)(10,Y,1,1,"ds-kebab-menu",8),pl()()),e&2){let i;XE(4),Yg(o.config().name),XE(),eC((i=o.executionModeBadge())?5:-1,i),XE(),eC(o.config().modelName?6:-1),XE(),eC(o.config().description?7:-1),XE(2),eC(o.pendingDelete()?9:10);}},dependencies:[Gn,ni,Se],styles:[".agent-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}.agent-config-item[_ngcontent-%COMP%]:hover{border-color:var(--color-accent)}.agent-config-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.agent-config-item__name-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.agent-config-item__name[_ngcontent-%COMP%]{font-size:15px;font-weight:600;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.agent-config-item__mode-badge[_ngcontent-%COMP%]{flex-shrink:0;display:inline-block;font-family:var(--font-heading);font-size:9px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;padding:.15em .5em;border-radius:0;line-height:1.6;border:1px solid currentColor}.agent-config-item__mode-badge--advanced[_ngcontent-%COMP%]{color:var(--color-accent, #2563eb);background:var(--color-accent-100, rgba(37, 99, 235, .08));border-color:var(--color-accent-300, rgba(37, 99, 235, .3))}.agent-config-item__mode-badge--loop[_ngcontent-%COMP%]{color:var(--color-warning, #f59e0b);background:color-mix(in srgb,var(--color-warning, #f59e0b) 10%,transparent);border-color:color-mix(in srgb,var(--color-warning, #f59e0b) 35%,transparent)}.agent-config-item__model[_ngcontent-%COMP%], .agent-config-item__description[_ngcontent-%COMP%]{font-size:13px;color:var(--color-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.agent-config-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.agent-config-item[_ngcontent-%COMP%]:hover .agent-config-item__actions[_ngcontent-%COMP%], .agent-config-item[_ngcontent-%COMP%]:focus-within .agent-config-item__actions[_ngcontent-%COMP%]{opacity:1}.agent-config-item[_ngcontent-%COMP%]:has(.agent-config-item__confirm-label) .agent-config-item__actions[_ngcontent-%COMP%]{opacity:1}.agent-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(t,n){if(t&1){let e=lC();ws(0,"agentos-agent-config-item",4),Rg("deleteRequested",function(i){If(e);let A=gC(2);return wf(A.deleteConfig(i))}),pl();}t&2&&bg("config",n)("platformMode",true);}function ne(t,n){if(t&1&&Jw(0,ee,1,2,"agentos-agent-config-item",3),t&2){let e,o=n.$implicit,i=gC();eC((e=i.resolveConfig(o.id))?0:-1,e);}}var U=class t{router=g(F);destroyRef=g(Ce);agentConfigController=g($);refresh$=new Tr(void 0);isLoading=Gi(true);configs$=this.refresh$.pipe(Ea(()=>(this.isLoading.set(true),this.agentConfigController.listPlatformAgentsAgentConfig(true))));configItems$=this.configs$.pipe(re(n=>n.map(e=>({id:e.id??"",name:e.name,description:e.description}))));configsById=new Map;constructor(){this.configs$.pipe(U$1(this.destroyRef)).subscribe({next:n=>{this.configsById=new Map(n.map(e=>[e.id??"",e])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","agent-configs","new"]);}deleteConfig(n){this.agentConfigController.deleteAgentConfig(n.id??"").pipe(U$1(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolveConfig(n){return this.configsById.get(n)??null}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=xw({type:t,selectors:[["agentos-platform-agent-configs"]],decls:5,vars:7,consts:[["agentConfigItemTpl",""],["title","Platform Agent Configs","emptyMessage","No platform agent configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"config","platformMode"],[3,"deleteRequested","config","platformMode"]],template:function(e,o){if(e&1&&(ws(0,"ds-entity-list",1),aT(1,"async"),Rg("createRequested",function(){return o.openCreateForm()}),ws(2,"ds-icon-button",2),Rg("action",function(){return o.goBack()}),pl()(),Eg(3,ne,1,1,"ng-template",null,0,fT)),e&2){let i=CC(4);bg("items",uT(1,4,o.configItems$)??rT(6,Z))("loading",o.isLoading())("showCreate",true)("itemTemplate",i);}},dependencies:[$n,w,Se,xb],styles:[".platform-agent-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-agent-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})};export{U as PlatformAgentConfigsComponent};
1
+ import {g,F,C as Ce,da as $,aJ as Tr,G as Gi,bS as Ea,r as re,b as U$1,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,v as eC,ac as gC,z as Ug,a9 as lC,aa as If,ab as wf,ag as fT}from'./main-DB5EJGYC.js';import {$ as $n,S as Se,G as Gn,c as ni}from'./chunk-aMjpfW4c.js';import'./chunk-D-FNlEoa.js';import'./chunk-BLaIJYTj.js';function H(t,n){if(t&1&&(ws(0,"span",9),GC(1),pl()),t&2){let e=n;Ug("agent-config-item__mode-badge--advanced",e.mode==="ADVANCED")("agent-config-item__mode-badge--loop",e.mode==="LOOP"),XE(),Yg(e.label);}}function J(t,n){if(t&1&&(ws(0,"span",5),GC(1),pl()),t&2){let e=gC();XE(),Yg(e.config().modelName);}}function Q(t,n){if(t&1&&(ws(0,"span",6),GC(1),pl()),t&2){let e=gC();XE(),Yg(e.config().description);}}function X(t,n){if(t&1){let e=lC();ws(0,"span",10),GC(1,"Delete?"),pl(),ws(2,"ds-icon-button",11),Rg("action",function(){If(e);let i=gC();return wf(i.onDeleteConfirmed())}),pl(),ws(3,"ds-icon-button",12),Rg("action",function(){If(e);let i=gC();return wf(i.onDeleteCancelled())}),pl();}}function Y(t,n){if(t&1){let e=lC();ws(0,"ds-kebab-menu",13),Rg("itemSelected",function(i){If(e);let A=gC();return wf(A.onMenuAction(i))}),pl();}if(t&2){let e=gC();bg("items",e.readOnly()?e.readOnlyMenuItems:e.menuItems);}}var w=class t{router=g(F);config=ZB.required();namespaceId=ZB(void 0);platformMode=ZB(false);readOnly=ZB(false);deleteRequested=qB();pendingDelete=Gi(false);executionModeBadge=mT(()=>{let n=this.config(),e=n.executionMode??(n.advancedExecution?"ADVANCED":"SIMPLE");return e==="ADVANCED"?{mode:e,label:"ADVANCED"}:e==="LOOP"?{mode:e,label:"LOOP"}:null});canLaunch=mT(()=>!this.platformMode()&&this.config().executionMode==="LOOP");get menuItems(){let n=[{key:"edit",label:"Edit agent config",icon:"edit"},{key:"inspect",label:"Inspect definition",icon:"search"}];return this.canLaunch()&&n.push({key:"launch",label:"Launch loop",icon:"play_arrow"}),n.push({key:"delete",label:"Delete agent config",icon:"delete",variant:"danger"}),n}readOnlyMenuItems=[{key:"inspect",label:"Inspect definition",icon:"search"}];onMenuAction(n){switch(n){case "edit":this.platformMode()?this.router.navigate(["/agentos","admin","agent-configs",this.config().id,"edit"]):this.router.navigate(["/agentos",this.namespaceId(),"agent-configs",this.config().id,"edit"]);break;case "inspect":this.platformMode()?this.router.navigate(["/agentos","admin","agent-configs",this.config().id,"inspect"]):this.router.navigate(["/agentos",this.namespaceId(),"agent-configs",this.config().id,"inspect"]);break;case "launch":this.router.navigate(["/agentos",this.namespaceId(),"agent-configs",this.config().id,"launch"]);break;case "delete":this.pendingDelete.set(true);break}}onDeleteConfirmed(){this.pendingDelete.set(false),this.deleteRequested.emit(this.config());}onDeleteCancelled(){this.pendingDelete.set(false);}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=xw({type:t,selectors:[["agentos-agent-config-item"]],inputs:{config:[1,"config"],namespaceId:[1,"namespaceId"],platformMode:[1,"platformMode"],readOnly:[1,"readOnly"]},outputs:{deleteRequested:"deleteRequested"},decls:11,vars:5,consts:[["role","listitem","dsBlueprint","",1,"agent-config-item"],[1,"agent-config-item__body"],[1,"agent-config-item__name-row"],[1,"agent-config-item__name"],[1,"agent-config-item__mode-badge",3,"agent-config-item__mode-badge--advanced","agent-config-item__mode-badge--loop"],[1,"agent-config-item__model"],[1,"agent-config-item__description"],[1,"agent-config-item__actions"],[3,"items"],[1,"agent-config-item__mode-badge"],[1,"agent-config-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,o){if(e&1&&(ws(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),GC(4),pl(),Jw(5,H,2,5,"span",4),pl(),Jw(6,J,2,1,"span",5),Jw(7,Q,2,1,"span",6),pl(),ws(8,"div",7),Jw(9,X,4,0)(10,Y,1,1,"ds-kebab-menu",8),pl()()),e&2){let i;XE(4),Yg(o.config().name),XE(),eC((i=o.executionModeBadge())?5:-1,i),XE(),eC(o.config().modelName?6:-1),XE(),eC(o.config().description?7:-1),XE(2),eC(o.pendingDelete()?9:10);}},dependencies:[Gn,ni,Se],styles:[".agent-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}.agent-config-item[_ngcontent-%COMP%]:hover{border-color:var(--color-accent)}.agent-config-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.agent-config-item__name-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.agent-config-item__name[_ngcontent-%COMP%]{font-size:15px;font-weight:600;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.agent-config-item__mode-badge[_ngcontent-%COMP%]{flex-shrink:0;display:inline-block;font-family:var(--font-heading);font-size:9px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;padding:.15em .5em;border-radius:0;line-height:1.6;border:1px solid currentColor}.agent-config-item__mode-badge--advanced[_ngcontent-%COMP%]{color:var(--color-accent, #2563eb);background:var(--color-accent-100, rgba(37, 99, 235, .08));border-color:var(--color-accent-300, rgba(37, 99, 235, .3))}.agent-config-item__mode-badge--loop[_ngcontent-%COMP%]{color:var(--color-warning, #f59e0b);background:color-mix(in srgb,var(--color-warning, #f59e0b) 10%,transparent);border-color:color-mix(in srgb,var(--color-warning, #f59e0b) 35%,transparent)}.agent-config-item__model[_ngcontent-%COMP%], .agent-config-item__description[_ngcontent-%COMP%]{font-size:13px;color:var(--color-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.agent-config-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.agent-config-item[_ngcontent-%COMP%]:hover .agent-config-item__actions[_ngcontent-%COMP%], .agent-config-item[_ngcontent-%COMP%]:focus-within .agent-config-item__actions[_ngcontent-%COMP%]{opacity:1}.agent-config-item[_ngcontent-%COMP%]:has(.agent-config-item__confirm-label) .agent-config-item__actions[_ngcontent-%COMP%]{opacity:1}.agent-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(t,n){if(t&1){let e=lC();ws(0,"agentos-agent-config-item",4),Rg("deleteRequested",function(i){If(e);let A=gC(2);return wf(A.deleteConfig(i))}),pl();}t&2&&bg("config",n)("platformMode",true);}function ne(t,n){if(t&1&&Jw(0,ee,1,2,"agentos-agent-config-item",3),t&2){let e,o=n.$implicit,i=gC();eC((e=i.resolveConfig(o.id))?0:-1,e);}}var U=class t{router=g(F);destroyRef=g(Ce);agentConfigController=g($);refresh$=new Tr(void 0);isLoading=Gi(true);configs$=this.refresh$.pipe(Ea(()=>(this.isLoading.set(true),this.agentConfigController.listPlatformAgentsAgentConfig(true))));configItems$=this.configs$.pipe(re(n=>n.map(e=>({id:e.id??"",name:e.name,description:e.description}))));configsById=new Map;constructor(){this.configs$.pipe(U$1(this.destroyRef)).subscribe({next:n=>{this.configsById=new Map(n.map(e=>[e.id??"",e])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","agent-configs","new"]);}deleteConfig(n){this.agentConfigController.deleteAgentConfig(n.id??"").pipe(U$1(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolveConfig(n){return this.configsById.get(n)??null}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=xw({type:t,selectors:[["agentos-platform-agent-configs"]],decls:5,vars:7,consts:[["agentConfigItemTpl",""],["title","Platform Agent Configs","emptyMessage","No platform agent configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"config","platformMode"],[3,"deleteRequested","config","platformMode"]],template:function(e,o){if(e&1&&(ws(0,"ds-entity-list",1),aT(1,"async"),Rg("createRequested",function(){return o.openCreateForm()}),ws(2,"ds-icon-button",2),Rg("action",function(){return o.goBack()}),pl()(),Eg(3,ne,1,1,"ng-template",null,0,fT)),e&2){let i=CC(4);bg("items",uT(1,4,o.configItems$)??rT(6,Z))("loading",o.isLoading())("showCreate",true)("itemTemplate",i);}},dependencies:[$n,w,Se,xb],styles:[".platform-agent-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-agent-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})};export{U as PlatformAgentConfigsComponent};
@@ -1 +1 @@
1
- import {l}from'./chunk-B_yM2E8f.js';import {g,dh as ae,di as T,Q as br,bS as Ea,r as re,a7 as ya,cE as Dd,W as x}from'./main-HLQ22ACS.js';var v=class i{userState=g(l);membership=g(ae);currentUser$=T(this.userState.currentUser);cache=new Map;isAdminOfNamespace$(e){if(!e)return br(false);let t=this.cache.get(e);if(t)return t;let s=this.currentUser$.pipe(Ea(a=>a?a.isAdmin?br(true):this.membership.getMembersNamespaceMembership(e).pipe(re(d=>d.some(n=>n.id===a.id&&n.role==="ADMIN")),ya(()=>br(false))):br(false)),Dd({bufferSize:1,refCount:false}));return this.cache.set(e,s),s}static \u0275fac=function(t){return new(t||i)};static \u0275prov=x({token:i,factory:i.\u0275fac,providedIn:"root"})};export{v};
1
+ import {l}from'./chunk-CVM23KJ3.js';import {g,dh as ae,di as T,Q as br,bS as Ea,r as re,a7 as ya,cE as Dd,W as x}from'./main-DB5EJGYC.js';var v=class i{userState=g(l);membership=g(ae);currentUser$=T(this.userState.currentUser);cache=new Map;isAdminOfNamespace$(e){if(!e)return br(false);let t=this.cache.get(e);if(t)return t;let s=this.currentUser$.pipe(Ea(a=>a?a.isAdmin?br(true):this.membership.getMembersNamespaceMembership(e).pipe(re(d=>d.some(n=>n.id===a.id&&n.role==="ADMIN")),ya(()=>br(false))):br(false)),Dd({bufferSize:1,refCount:false}));return this.cache.set(e,s),s}static \u0275fac=function(t){return new(t||i)};static \u0275prov=x({token:i,factory:i.\u0275fac,providedIn:"root"})};export{v};
@@ -1 +1 @@
1
- import {F as F$1,E}from'./chunk-B_yM2E8f.js';import {g,ao as W$1,F,C as Ce,dm as N,dg as k,aJ as Tr,G as Gi,bS as Ea,M as By,a7 as ya,Q as br,b as U$1,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,s as rC,ac as gC,u as bg,y as oC,a8 as Yg,aa as If,ab as wf}from'./main-HLQ22ACS.js';import {d as Kn,J as Jn,Y as Yn}from'./chunk-D1K33IKA.js';import'./chunk-bBy0vM9Y.js';import'./chunk-65tVAuhG.js';import'./chunk-QpH9EEhD.js';var z=(i,e)=>e.key;function H(i,e){i&1&&(ws(0,"p",2),GC(1,"Loading AI models\u2026"),pl());}function J(i,e){i&1&&(ws(0,"p",3),GC(1,"No AI models configured."),pl());}function U(i,e){i&1&&(ws(0,"ds-tag",12),GC(1,"Read-only"),pl());}function G(i,e){if(i&1){let t=lC();ws(0,"button",15),Rg("click",function(){If(t);let d=gC().$implicit,s=gC(2);return wf(s.edit(d))}),GC(1,"Edit"),pl(),ws(2,"button",16),Rg("click",function(){If(t);let d=gC().$implicit,s=gC(2);return wf(s.delete(d))}),GC(3,"Delete"),pl();}}function K(i,e){i&1&&(ws(0,"button",14),GC(1,"Inherited"),pl());}function Q(i,e){if(i&1&&(ws(0,"tr")(1,"td",8),GC(2),pl(),ws(3,"td"),GC(4),pl(),ws(5,"td",9),GC(6),pl(),ws(7,"td")(8,"div",10)(9,"ds-tag",11),GC(10),pl(),Jw(11,U,2,0,"ds-tag",12),pl()(),ws(12,"td",13),Jw(13,G,4,0)(14,K,2,0,"button",14),pl()()),i&2){let t=e.$implicit;XE(2),Yg(t.model.alias??t.model.apiModelName),XE(2),Yg(t.providerName),XE(2),Yg(t.model.apiModelName),XE(3),bg("variant",t.scope==="platform"?"neutral":"accent"),XE(),Yg(t.scope==="platform"?"Platform":"Namespace"),XE(),eC(t.scope==="platform"?11:-1),XE(2),eC(t.scope==="namespace"?13:14);}}function W(i,e){if(i&1){let t=lC();ws(0,"agentos-table-filter",4),Rg("queryChange",function(d){If(t);let s=gC();return wf(s.rowFilter.query.set(d))}),pl(),ws(1,"div",5)(2,"table",6)(3,"thead")(4,"tr")(5,"th"),GC(6,"Name"),pl(),ws(7,"th"),GC(8,"Provider"),pl(),ws(9,"th"),GC(10,"API model name"),pl(),ws(11,"th"),GC(12,"Scope"),pl(),ws(13,"th")(14,"span",7),GC(15,"Actions"),pl()()()(),ws(16,"tbody"),rC(17,Q,15,7,"tr",null,z),pl()()();}if(i&2){let t=gC();bg("query",t.rowFilter.query()),XE(17),oC(t.rowFilter.filteredRows());}}var B=class i{route=g(W$1);router=g(F);destroyRef=g(Ce);aiModelController=g(N);aiProviderController=g(k);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new Tr(void 0);isLoading=Gi(true);rows=Gi([]);rowFilter=F$1(this.rows,e=>[e.model.alias,e.model.apiModelName,e.providerName,e.scope].filter(Boolean).join(" "));data$=this.refresh$.pipe(Ea(()=>(this.isLoading.set(true),By({namespace:this.aiModelController.listByNamespaceIdAiModel(this.namespaceId),platform:this.aiModelController.listPlatformLevelAiModel().pipe(ya(()=>br([]))),providers:this.aiProviderController.listAiProvider(this.namespaceId)}).pipe(Ea(({namespace:e,platform:t,providers:l})=>{let d=[...new Set([...t,...e].map(s=>s.aiProviderId))];return By({namespace:br(e),platform:br(t),providers:br(l),referencedProviders:this.aiProviderController.getByIdsAiProvider({ids:d,withRemoved:false}).pipe(ya(()=>br([])))})})))));constructor(){this.data$.pipe(U$1(this.destroyRef)).subscribe({next:({namespace:e,platform:t,providers:l,referencedProviders:d})=>{let s=new Map([...d,...l].map(r=>[r.id??"",r.name]));this.rows.set([...t.map((r,x)=>({key:`platform:${r.id??x}`,model:r,providerName:s.get(r.aiProviderId)??r.aiProviderId,scope:"platform"})),...e.map((r,x)=>({key:`namespace:${r.id??x}`,model:r,providerName:s.get(r.aiProviderId)??r.aiProviderId,scope:"namespace"}))]),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"ai-models","new"]);}edit(e){e.scope==="platform"||!e.model.id||this.router.navigate(["/agentos",this.namespaceId,"ai-models",e.model.id,"edit"]);}delete(e){e.scope==="platform"||!e.model.id||!confirm(`Delete AI model \u201C${e.model.alias??e.model.apiModelName}\u201D?`)||this.aiModelController.deleteAiModel(e.model.id).pipe(U$1(this.destroyRef)).subscribe(()=>this.refresh$.next());}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=xw({type:i,selectors:[["agentos-namespace-ai-models"]],decls:6,vars:1,consts:[["title","AI models","description","AI models configured for this namespace, including models inherited from the platform."],["type","button",1,"ai-models__new",3,"click"],["role","status",1,"ai-models__status"],[1,"ai-models__status"],["label","Filter AI models","placeholder","Filter AI models\u2026",3,"queryChange","query"],[1,"ai-models__table-wrap"],["dsTable",""],[1,"sr-only"],[1,"ai-models__name"],[1,"ai-models__secondary"],[1,"ai-models__tags"],[3,"variant"],["variant","outline"],[1,"ai-models__actions"],["type","button","disabled",""],["type","button",3,"click"],["type","button",1,"ai-models__delete",3,"click"]],template:function(t,l){t&1&&(ws(0,"ds-section-header",0)(1,"button",1),Rg("click",function(){return l.openCreateForm()}),GC(2,"New AI model"),pl()(),Jw(3,H,2,0,"p",2)(4,J,2,0,"p",3)(5,W,19,1)),t&2&&(XE(3),eC(l.isLoading()?3:l.rows().length===0?4:5));},dependencies:[Kn,Jn,Yn,E],styles:[".ai-models__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-models__status[_ngcontent-%COMP%]{margin:20px 8px;color:var(--color-text-secondary)}.ai-models__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-models__name[_ngcontent-%COMP%]{font-weight:500}.ai-models__secondary[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.ai-models__tags[_ngcontent-%COMP%]{display:flex;gap:4px;flex-wrap:wrap}.ai-models__actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:4px;white-space:nowrap}.ai-models__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;border:1px solid transparent;background:transparent;color:var(--color-accent);cursor:pointer;font:inherit}.ai-models__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-100)}.ai-models__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{color:var(--color-neutral-600);cursor:default}.ai-models__actions[_ngcontent-%COMP%] .ai-models__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{B as NamespaceAiModelsComponent};
1
+ import {F as F$1,E}from'./chunk-CVM23KJ3.js';import {g,ao as W$1,F,C as Ce,dm as N,dg as k,aJ as Tr,G as Gi,bS as Ea,M as By,a7 as ya,Q as br,b as U$1,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,s as rC,ac as gC,u as bg,y as oC,a8 as Yg,aa as If,ab as wf}from'./main-DB5EJGYC.js';import {d as Kn,J as Jn,Y as Yn}from'./chunk-aMjpfW4c.js';import'./chunk-D-FNlEoa.js';import'./chunk-BLaIJYTj.js';import'./chunk-CKhMv1Ug.js';var z=(i,e)=>e.key;function H(i,e){i&1&&(ws(0,"p",2),GC(1,"Loading AI models\u2026"),pl());}function J(i,e){i&1&&(ws(0,"p",3),GC(1,"No AI models configured."),pl());}function U(i,e){i&1&&(ws(0,"ds-tag",12),GC(1,"Read-only"),pl());}function G(i,e){if(i&1){let t=lC();ws(0,"button",15),Rg("click",function(){If(t);let d=gC().$implicit,s=gC(2);return wf(s.edit(d))}),GC(1,"Edit"),pl(),ws(2,"button",16),Rg("click",function(){If(t);let d=gC().$implicit,s=gC(2);return wf(s.delete(d))}),GC(3,"Delete"),pl();}}function K(i,e){i&1&&(ws(0,"button",14),GC(1,"Inherited"),pl());}function Q(i,e){if(i&1&&(ws(0,"tr")(1,"td",8),GC(2),pl(),ws(3,"td"),GC(4),pl(),ws(5,"td",9),GC(6),pl(),ws(7,"td")(8,"div",10)(9,"ds-tag",11),GC(10),pl(),Jw(11,U,2,0,"ds-tag",12),pl()(),ws(12,"td",13),Jw(13,G,4,0)(14,K,2,0,"button",14),pl()()),i&2){let t=e.$implicit;XE(2),Yg(t.model.alias??t.model.apiModelName),XE(2),Yg(t.providerName),XE(2),Yg(t.model.apiModelName),XE(3),bg("variant",t.scope==="platform"?"neutral":"accent"),XE(),Yg(t.scope==="platform"?"Platform":"Namespace"),XE(),eC(t.scope==="platform"?11:-1),XE(2),eC(t.scope==="namespace"?13:14);}}function W(i,e){if(i&1){let t=lC();ws(0,"agentos-table-filter",4),Rg("queryChange",function(d){If(t);let s=gC();return wf(s.rowFilter.query.set(d))}),pl(),ws(1,"div",5)(2,"table",6)(3,"thead")(4,"tr")(5,"th"),GC(6,"Name"),pl(),ws(7,"th"),GC(8,"Provider"),pl(),ws(9,"th"),GC(10,"API model name"),pl(),ws(11,"th"),GC(12,"Scope"),pl(),ws(13,"th")(14,"span",7),GC(15,"Actions"),pl()()()(),ws(16,"tbody"),rC(17,Q,15,7,"tr",null,z),pl()()();}if(i&2){let t=gC();bg("query",t.rowFilter.query()),XE(17),oC(t.rowFilter.filteredRows());}}var B=class i{route=g(W$1);router=g(F);destroyRef=g(Ce);aiModelController=g(N);aiProviderController=g(k);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new Tr(void 0);isLoading=Gi(true);rows=Gi([]);rowFilter=F$1(this.rows,e=>[e.model.alias,e.model.apiModelName,e.providerName,e.scope].filter(Boolean).join(" "));data$=this.refresh$.pipe(Ea(()=>(this.isLoading.set(true),By({namespace:this.aiModelController.listByNamespaceIdAiModel(this.namespaceId),platform:this.aiModelController.listPlatformLevelAiModel().pipe(ya(()=>br([]))),providers:this.aiProviderController.listAiProvider(this.namespaceId)}).pipe(Ea(({namespace:e,platform:t,providers:l})=>{let d=[...new Set([...t,...e].map(s=>s.aiProviderId))];return By({namespace:br(e),platform:br(t),providers:br(l),referencedProviders:this.aiProviderController.getByIdsAiProvider({ids:d,withRemoved:false}).pipe(ya(()=>br([])))})})))));constructor(){this.data$.pipe(U$1(this.destroyRef)).subscribe({next:({namespace:e,platform:t,providers:l,referencedProviders:d})=>{let s=new Map([...d,...l].map(r=>[r.id??"",r.name]));this.rows.set([...t.map((r,x)=>({key:`platform:${r.id??x}`,model:r,providerName:s.get(r.aiProviderId)??r.aiProviderId,scope:"platform"})),...e.map((r,x)=>({key:`namespace:${r.id??x}`,model:r,providerName:s.get(r.aiProviderId)??r.aiProviderId,scope:"namespace"}))]),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"ai-models","new"]);}edit(e){e.scope==="platform"||!e.model.id||this.router.navigate(["/agentos",this.namespaceId,"ai-models",e.model.id,"edit"]);}delete(e){e.scope==="platform"||!e.model.id||!confirm(`Delete AI model \u201C${e.model.alias??e.model.apiModelName}\u201D?`)||this.aiModelController.deleteAiModel(e.model.id).pipe(U$1(this.destroyRef)).subscribe(()=>this.refresh$.next());}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=xw({type:i,selectors:[["agentos-namespace-ai-models"]],decls:6,vars:1,consts:[["title","AI models","description","AI models configured for this namespace, including models inherited from the platform."],["type","button",1,"ai-models__new",3,"click"],["role","status",1,"ai-models__status"],[1,"ai-models__status"],["label","Filter AI models","placeholder","Filter AI models\u2026",3,"queryChange","query"],[1,"ai-models__table-wrap"],["dsTable",""],[1,"sr-only"],[1,"ai-models__name"],[1,"ai-models__secondary"],[1,"ai-models__tags"],[3,"variant"],["variant","outline"],[1,"ai-models__actions"],["type","button","disabled",""],["type","button",3,"click"],["type","button",1,"ai-models__delete",3,"click"]],template:function(t,l){t&1&&(ws(0,"ds-section-header",0)(1,"button",1),Rg("click",function(){return l.openCreateForm()}),GC(2,"New AI model"),pl()(),Jw(3,H,2,0,"p",2)(4,J,2,0,"p",3)(5,W,19,1)),t&2&&(XE(3),eC(l.isLoading()?3:l.rows().length===0?4:5));},dependencies:[Kn,Jn,Yn,E],styles:[".ai-models__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-models__status[_ngcontent-%COMP%]{margin:20px 8px;color:var(--color-text-secondary)}.ai-models__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-models__name[_ngcontent-%COMP%]{font-weight:500}.ai-models__secondary[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.ai-models__tags[_ngcontent-%COMP%]{display:flex;gap:4px;flex-wrap:wrap}.ai-models__actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:4px;white-space:nowrap}.ai-models__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;border:1px solid transparent;background:transparent;color:var(--color-accent);cursor:pointer;font:inherit}.ai-models__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-100)}.ai-models__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{color:var(--color-neutral-600);cursor:default}.ai-models__actions[_ngcontent-%COMP%] .ai-models__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{B as NamespaceAiModelsComponent};
@@ -0,0 +1 @@
1
+ import {bS as Ea,a7 as ya,Q as br,cE as Dd}from'./main-DB5EJGYC.js';function i(t,o,p){return t.pipe(Ea(()=>o().pipe(ya(()=>br(p)))),Dd({bufferSize:1,refCount:true}))}export{i};
@@ -1 +1 @@
1
- import {n}from'./chunk-CfgXrte_.js';import {F as F$1,E}from'./chunk-B_yM2E8f.js';import {v}from'./chunk-Dls1Urvo.js';import {N}from'./chunk-x8X4JXC2.js';import {g,ao as W$1,F,C as Ce,d5 as G$1,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,u as bg,X as XE,v as eC,a9 as lC,s as rC,ac as gC,y as oC,a8 as Yg,a5 as vl,aa as If,ab as wf}from'./main-HLQ22ACS.js';import {d as Kn,J as Jn,Y as Yn}from'./chunk-D1K33IKA.js';import'./chunk-bBy0vM9Y.js';import'./chunk-65tVAuhG.js';import'./chunk-QpH9EEhD.js';import'./chunk-BXgG4B5s.js';var G=(n,e)=>e.key;function B(n,e){n&1&&(ws(0,"p",2),GC(1,"Loading integrations\u2026"),pl());}function H(n,e){n&1&&(ws(0,"p",3),GC(1,"No integrations available."),pl());}function U(n,e){n&1&&(ws(0,"ds-tag",14),GC(1,"YAML"),pl(),ws(2,"ds-tag",15),GC(3,"Read-only"),pl());}function K(n,e){if(n&1){let t=lC();ws(0,"button",16),Rg("click",function(){If(t);let l=gC().$implicit,s=gC(2);return wf(s.view(l))}),GC(1,"View"),pl();}}function Q(n,e){if(n&1){let t=lC();ws(0,"button",16),Rg("click",function(){If(t);let l=gC(2).$implicit,s=gC(2);return wf(s.edit(l))}),GC(1,"Edit"),pl();}}function W(n,e){if(n&1){let t=lC();ws(0,"button",19),Rg("click",function(){If(t);let l=gC(2).$implicit,s=gC(2);return wf(s.delete(l))}),GC(1,"Delete"),pl();}}function X(n,e){n&1&&(ws(0,"button",18),GC(1,"Inherited"),pl());}function Z(n,e){if(n&1){let t=lC();ws(0,"button",16),Rg("click",function(){If(t);let l=gC().$implicit,s=gC(2);return wf(s.duplicate(l))}),GC(1,"Duplicate"),pl(),Jw(2,Q,2,0,"button",13),Jw(3,W,2,0,"button",17),Jw(4,X,2,0,"button",18);}if(n&2){let t=gC().$implicit;XE(2),eC(t.canEdit?2:-1),XE(),eC(t.canDelete?3:-1),XE(),eC(!t.canEdit&&!t.canDelete?4:-1);}}function ee(n,e){if(n&1&&(ws(0,"tr")(1,"td",8),GC(2),pl(),ws(3,"td",9),GC(4),pl(),ws(5,"td")(6,"div",10)(7,"ds-tag",11),GC(8),pl(),Jw(9,U,4,0),pl()(),ws(10,"td",12),Jw(11,K,2,0,"button",13)(12,Z,5,3),pl()()),n&2){let t=e.$implicit;XE(2),Yg(t.config.name),XE(2),Yg(t.config.integrationType),XE(3),bg("variant",t.scopeLabel==="Platform"?"neutral":t.scopeLabel==="Personal"?"outline":"accent"),XE(),vl(" ",t.scopeLabel," "),XE(),eC(t.source==="FILESYSTEM"?9:-1),XE(2),eC(t.source==="FILESYSTEM"?11:12);}}function te(n,e){if(n&1){let t=lC();ws(0,"agentos-table-filter",4),Rg("queryChange",function(l){If(t);let s=gC();return wf(s.rowFilter.query.set(l))}),pl(),ws(1,"div",5)(2,"table",6)(3,"thead")(4,"tr")(5,"th"),GC(6,"Name"),pl(),ws(7,"th"),GC(8,"Type"),pl(),ws(9,"th"),GC(10,"Scope"),pl(),ws(11,"th")(12,"span",7),GC(13,"Actions"),pl()()()(),ws(14,"tbody"),rC(15,ee,13,6,"tr",null,G),pl()()();}if(n&2){let t=gC();bg("query",t.rowFilter.query()),XE(15),oC(t.rowFilter.filteredRows());}}var z=class n$1{route=g(W$1);router=g(F);destroyRef=g(Ce);state=g(N);namespaceRole=g(v);namespaceApi=g(G$1);namespaceId=this.route.snapshot.params.namespaceId;namespaceName=Gi("this namespace");isAdmin=Gi(false);isLoading=Gi(true);rows=Gi([]);rowFilter=F$1(this.rows,e=>[e.config.name,e.config.integrationType,e.scopeLabel,e.source].join(" "));ngOnInit(){this.state.setNamespace(this.namespaceId),this.namespaceId&&this.namespaceApi.getByIdNamespace(this.namespaceId).pipe(U$1(this.destroyRef)).subscribe({next:e=>this.namespaceName.set(e.name)}),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,"integrations","new"],{queryParams:{scope:n(this.isAdmin())}});}view(e){e.config.id&&this.router.navigate(["/agentos",this.namespaceId,"integrations",e.config.id,"view"]);}edit(e){!e.canEdit||!e.config.id||this.router.navigate(["/agentos",this.namespaceId,"integrations",e.config.id,"edit"],{queryParams:{scope:e.scope}});}duplicate(e){if(e.source==="FILESYSTEM"||!e.config.id)return;let r=(e.scope==="platform"||e.scope==="namespace")&&!this.isAdmin()?"userOnNs":e.scope;this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:r,template:e.config.id,templateScope:e.scope}});}delete(e){!e.canDelete||!e.config.id||!confirm(`Delete integration \u201C${e.config.name}\u201D?`)||this.state.delete(e.config.id,e.scope).pipe(U$1(this.destroyRef)).subscribe();}toRows(e){return [...this.mapScope(e.platform,"platform","Platform",true),...this.mapScope(e.namespace,"namespace","Namespace",!this.isAdmin()),...this.mapScope(e.userOnNs,"userOnNs","Personal",false),...this.mapScope(e.userGlobal,"userGlobal","Personal",false)]}mapScope(e,t,r,l){return e.map((s,J)=>{let h=this.sourceOf(s),S=h==="NEO4J"&&!l;return {key:`${t}:${s.id??J}`,config:s,scope:t,scopeLabel:r,source:h,canEdit:S,canDelete:S}})}sourceOf(e){return e.source??"NEO4J"}static \u0275fac=function(t){return new(t||n$1)};static \u0275cmp=xw({type:n$1,selectors:[["agentos-integrations-all-scopes"]],decls:6,vars:2,consts:[["title","Integrations",3,"description"],["type","button",1,"integrations__new",3,"click"],["role","status",1,"integrations__status"],[1,"integrations__status"],["label","Filter integrations","placeholder","Filter integrations\u2026",3,"queryChange","query"],[1,"integrations__table-wrap"],["dsTable",""],[1,"sr-only"],[1,"integrations__name"],[1,"integrations__type"],[1,"integrations__tags"],[3,"variant"],[1,"integrations__actions"],["type","button"],["variant","neutral"],["variant","outline"],["type","button",3,"click"],["type","button",1,"integrations__delete"],["type","button","disabled",""],["type","button",1,"integrations__delete",3,"click"]],template:function(t,r){t&1&&(ws(0,"ds-section-header",0)(1,"button",1),Rg("click",function(){return r.openCreateForm()}),GC(2,"New integration"),pl()(),Jw(3,B,2,0,"p",2)(4,H,2,0,"p",3)(5,te,17,1)),t&2&&(bg("description","Integrations for "+r.namespaceName()+", including entries inherited from the platform."),XE(3),eC(r.isLoading()?3:r.rows().length===0?4:5));},dependencies:[Kn,Jn,Yn,E],styles:[".integrations__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}.integrations__status[_ngcontent-%COMP%]{margin:20px 8px;color:var(--color-text-secondary)}.integrations__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)}.integrations__name[_ngcontent-%COMP%]{font-weight:500}.integrations__type[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.integrations__tags[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.integrations__actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:4px;white-space:nowrap}.integrations__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;border:1px solid transparent;background:transparent;color:var(--color-accent);cursor:pointer;font:inherit}.integrations__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-100)}.integrations__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{color:var(--color-neutral-600);cursor:default}.integrations__actions[_ngcontent-%COMP%] .integrations__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{z as IntegrationsAllScopesComponent};
1
+ import {n}from'./chunk-CfgXrte_.js';import {F as F$1,E}from'./chunk-CVM23KJ3.js';import {v}from'./chunk-DxHp0kqe.js';import {N}from'./chunk-Bo7GcoVn.js';import {g,ao as W$1,F,C as Ce,d5 as G$1,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,u as bg,X as XE,v as eC,a9 as lC,s as rC,ac as gC,y as oC,a8 as Yg,a5 as vl,aa as If,ab as wf}from'./main-DB5EJGYC.js';import {d as Kn,J as Jn,Y as Yn}from'./chunk-aMjpfW4c.js';import'./chunk-D-FNlEoa.js';import'./chunk-BLaIJYTj.js';import'./chunk-CKhMv1Ug.js';import'./chunk-Gb2w1W4p.js';var G=(n,e)=>e.key;function B(n,e){n&1&&(ws(0,"p",2),GC(1,"Loading integrations\u2026"),pl());}function H(n,e){n&1&&(ws(0,"p",3),GC(1,"No integrations available."),pl());}function U(n,e){n&1&&(ws(0,"ds-tag",14),GC(1,"YAML"),pl(),ws(2,"ds-tag",15),GC(3,"Read-only"),pl());}function K(n,e){if(n&1){let t=lC();ws(0,"button",16),Rg("click",function(){If(t);let l=gC().$implicit,s=gC(2);return wf(s.view(l))}),GC(1,"View"),pl();}}function Q(n,e){if(n&1){let t=lC();ws(0,"button",16),Rg("click",function(){If(t);let l=gC(2).$implicit,s=gC(2);return wf(s.edit(l))}),GC(1,"Edit"),pl();}}function W(n,e){if(n&1){let t=lC();ws(0,"button",19),Rg("click",function(){If(t);let l=gC(2).$implicit,s=gC(2);return wf(s.delete(l))}),GC(1,"Delete"),pl();}}function X(n,e){n&1&&(ws(0,"button",18),GC(1,"Inherited"),pl());}function Z(n,e){if(n&1){let t=lC();ws(0,"button",16),Rg("click",function(){If(t);let l=gC().$implicit,s=gC(2);return wf(s.duplicate(l))}),GC(1,"Duplicate"),pl(),Jw(2,Q,2,0,"button",13),Jw(3,W,2,0,"button",17),Jw(4,X,2,0,"button",18);}if(n&2){let t=gC().$implicit;XE(2),eC(t.canEdit?2:-1),XE(),eC(t.canDelete?3:-1),XE(),eC(!t.canEdit&&!t.canDelete?4:-1);}}function ee(n,e){if(n&1&&(ws(0,"tr")(1,"td",8),GC(2),pl(),ws(3,"td",9),GC(4),pl(),ws(5,"td")(6,"div",10)(7,"ds-tag",11),GC(8),pl(),Jw(9,U,4,0),pl()(),ws(10,"td",12),Jw(11,K,2,0,"button",13)(12,Z,5,3),pl()()),n&2){let t=e.$implicit;XE(2),Yg(t.config.name),XE(2),Yg(t.config.integrationType),XE(3),bg("variant",t.scopeLabel==="Platform"?"neutral":t.scopeLabel==="Personal"?"outline":"accent"),XE(),vl(" ",t.scopeLabel," "),XE(),eC(t.source==="FILESYSTEM"?9:-1),XE(2),eC(t.source==="FILESYSTEM"?11:12);}}function te(n,e){if(n&1){let t=lC();ws(0,"agentos-table-filter",4),Rg("queryChange",function(l){If(t);let s=gC();return wf(s.rowFilter.query.set(l))}),pl(),ws(1,"div",5)(2,"table",6)(3,"thead")(4,"tr")(5,"th"),GC(6,"Name"),pl(),ws(7,"th"),GC(8,"Type"),pl(),ws(9,"th"),GC(10,"Scope"),pl(),ws(11,"th")(12,"span",7),GC(13,"Actions"),pl()()()(),ws(14,"tbody"),rC(15,ee,13,6,"tr",null,G),pl()()();}if(n&2){let t=gC();bg("query",t.rowFilter.query()),XE(15),oC(t.rowFilter.filteredRows());}}var z=class n$1{route=g(W$1);router=g(F);destroyRef=g(Ce);state=g(N);namespaceRole=g(v);namespaceApi=g(G$1);namespaceId=this.route.snapshot.params.namespaceId;namespaceName=Gi("this namespace");isAdmin=Gi(false);isLoading=Gi(true);rows=Gi([]);rowFilter=F$1(this.rows,e=>[e.config.name,e.config.integrationType,e.scopeLabel,e.source].join(" "));ngOnInit(){this.state.setNamespace(this.namespaceId),this.namespaceId&&this.namespaceApi.getByIdNamespace(this.namespaceId).pipe(U$1(this.destroyRef)).subscribe({next:e=>this.namespaceName.set(e.name)}),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,"integrations","new"],{queryParams:{scope:n(this.isAdmin())}});}view(e){e.config.id&&this.router.navigate(["/agentos",this.namespaceId,"integrations",e.config.id,"view"]);}edit(e){!e.canEdit||!e.config.id||this.router.navigate(["/agentos",this.namespaceId,"integrations",e.config.id,"edit"],{queryParams:{scope:e.scope}});}duplicate(e){if(e.source==="FILESYSTEM"||!e.config.id)return;let r=(e.scope==="platform"||e.scope==="namespace")&&!this.isAdmin()?"userOnNs":e.scope;this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:r,template:e.config.id,templateScope:e.scope}});}delete(e){!e.canDelete||!e.config.id||!confirm(`Delete integration \u201C${e.config.name}\u201D?`)||this.state.delete(e.config.id,e.scope).pipe(U$1(this.destroyRef)).subscribe();}toRows(e){return [...this.mapScope(e.platform,"platform","Platform",true),...this.mapScope(e.namespace,"namespace","Namespace",!this.isAdmin()),...this.mapScope(e.userOnNs,"userOnNs","Personal",false),...this.mapScope(e.userGlobal,"userGlobal","Personal",false)]}mapScope(e,t,r,l){return e.map((s,J)=>{let h=this.sourceOf(s),S=h==="NEO4J"&&!l;return {key:`${t}:${s.id??J}`,config:s,scope:t,scopeLabel:r,source:h,canEdit:S,canDelete:S}})}sourceOf(e){return e.source??"NEO4J"}static \u0275fac=function(t){return new(t||n$1)};static \u0275cmp=xw({type:n$1,selectors:[["agentos-integrations-all-scopes"]],decls:6,vars:2,consts:[["title","Integrations",3,"description"],["type","button",1,"integrations__new",3,"click"],["role","status",1,"integrations__status"],[1,"integrations__status"],["label","Filter integrations","placeholder","Filter integrations\u2026",3,"queryChange","query"],[1,"integrations__table-wrap"],["dsTable",""],[1,"sr-only"],[1,"integrations__name"],[1,"integrations__type"],[1,"integrations__tags"],[3,"variant"],[1,"integrations__actions"],["type","button"],["variant","neutral"],["variant","outline"],["type","button",3,"click"],["type","button",1,"integrations__delete"],["type","button","disabled",""],["type","button",1,"integrations__delete",3,"click"]],template:function(t,r){t&1&&(ws(0,"ds-section-header",0)(1,"button",1),Rg("click",function(){return r.openCreateForm()}),GC(2,"New integration"),pl()(),Jw(3,B,2,0,"p",2)(4,H,2,0,"p",3)(5,te,17,1)),t&2&&(bg("description","Integrations for "+r.namespaceName()+", including entries inherited from the platform."),XE(3),eC(r.isLoading()?3:r.rows().length===0?4:5));},dependencies:[Kn,Jn,Yn,E],styles:[".integrations__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}.integrations__status[_ngcontent-%COMP%]{margin:20px 8px;color:var(--color-text-secondary)}.integrations__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)}.integrations__name[_ngcontent-%COMP%]{font-weight:500}.integrations__type[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.integrations__tags[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.integrations__actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:4px;white-space:nowrap}.integrations__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;border:1px solid transparent;background:transparent;color:var(--color-accent);cursor:pointer;font:inherit}.integrations__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-100)}.integrations__actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{color:var(--color-neutral-600);cursor:default}.integrations__actions[_ngcontent-%COMP%] .integrations__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{z as IntegrationsAllScopesComponent};
@@ -1,4 +1,4 @@
1
- import {b as Qe}from'./chunk-bBy0vM9Y.js';import {D as D$1,i as y}from'./chunk-65tVAuhG.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-HLQ22ACS.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-D-FNlEoa.js';import {D as D$1,i as y}from'./chunk-BLaIJYTj.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-DB5EJGYC.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 {N}from'./chunk-x8X4JXC2.js';import {g,ao as W,C as Ce,G as Gi,b as U,e as xw,k as ws,n as GC,o as pl,J as Jw,X as XE,v as eC,ac as gC,a8 as Yg}from'./main-HLQ22ACS.js';import'./chunk-B_yM2E8f.js';import {Y as Yn}from'./chunk-D1K33IKA.js';import'./chunk-bBy0vM9Y.js';import'./chunk-65tVAuhG.js';import'./chunk-BXgG4B5s.js';import'./chunk-QpH9EEhD.js';function E(a,e){a&1&&(ws(0,"p",2),GC(1,"Loading integration\u2026"),pl());}function S(a,e){a&1&&(ws(0,"p",3),GC(1,"Failed to load this integration configuration."),pl());}function I(a,e){a&1&&(ws(0,"ds-tag",8),GC(1,"YAML"),pl(),ws(2,"ds-tag",9),GC(3,"Read-only"),pl());}function O(a,e){if(a&1&&(ws(0,"section",4)(1,"div",5)(2,"h2"),GC(3,"General"),pl(),Jw(4,I,4,0),pl(),ws(5,"dl")(6,"dt"),GC(7,"Name"),pl(),ws(8,"dd"),GC(9),pl(),ws(10,"dt"),GC(11,"Type"),pl(),ws(12,"dd",6),GC(13),pl(),ws(14,"dt"),GC(15,"Description"),pl(),ws(16,"dd"),GC(17),pl(),ws(18,"dt"),GC(19,"Scope"),pl(),ws(20,"dd"),GC(21),pl(),ws(22,"dt"),GC(23,"Source"),pl(),ws(24,"dd"),GC(25),pl(),ws(26,"dt"),GC(27,"Auto grant"),pl(),ws(28,"dd"),GC(29),pl(),ws(30,"dt"),GC(31,"Auth setting"),pl(),ws(32,"dd"),GC(33),pl()()(),ws(34,"section",4)(35,"h2"),GC(36,"Parameters"),pl(),ws(37,"p",7),GC(38,"Sensitive values are always redacted."),pl(),ws(39,"pre"),GC(40),pl()()),a&2){let o=e,r=gC();XE(4),eC(r.source()==="FILESYSTEM"?4:-1),XE(5),Yg(o.name),XE(4),Yg(o.integrationType),XE(4),Yg(o.description||"\u2014"),XE(4),Yg(r.scopeOf(o)),XE(4),Yg(r.source()),XE(4),Yg(o.autoGrant?"Enabled":"Disabled"),XE(4),Yg(o.authSettingName||"None"),XE(7),Yg(r.parameters());}}var y="\u2022\u2022\u2022\u2022\u2022\u2022",b=/(?:api[-_]?key|token|secret|password|passphrase|credential|private[-_]?key|client[-_]?secret|authorization|cookie)/i,h=class a{route=g(W);destroyRef=g(Ce);state=g(N);integrationId=this.route.snapshot.params.integrationId;isLoading=Gi(true);hasError=Gi(false);config=Gi(null);source=Gi("NEO4J");parameters=Gi("{}");ngOnInit(){this.state.getById(this.integrationId).pipe(U(this.destroyRef)).subscribe({next:e=>{this.config.set(e),this.source.set(this.sourceOf(e)),this.parameters.set(JSON.stringify(this.redact(e.parameters),null,2)),this.isLoading.set(false);},error:()=>{this.hasError.set(true),this.isLoading.set(false);}});}scopeOf(e){let o=e.userId?e.namespaceId?"userOnNs":"userGlobal":e.namespaceId?"namespace":"platform";return {platform:"Platform",namespace:"Namespace",userOnNs:"Personal on namespace",userGlobal:"Personal global"}[o]}sourceOf(e){return e.source??"NEO4J"}redact(e,o=""){return b.test(o)?y:e===null||typeof e=="boolean"||typeof e=="number"?e:typeof e=="string"?this.containsCredential(e)?y:e:Array.isArray(e)?e.map(r=>this.redact(r,o)):typeof e=="object"?Object.fromEntries(Object.entries(e).map(([r,g])=>[r,this.redact(g,r)])):String(e??"")}containsCredential(e){return /^(?:bearer\s+|basic\s+|sk[-_]|gh[opusr]_|xox[baprs]-|-----begin (?:rsa |ec |openssh )?private key-----)/i.test(e.trim())}static \u0275fac=function(o){return new(o||a)};static \u0275cmp=xw({type:a,selectors:[["agentos-integration-config-view"]],decls:7,vars:1,consts:[[1,"integration-view"],[1,"integration-view__header"],["role","status",1,"integration-view__status"],[1,"integration-view__error"],[1,"integration-view__section"],[1,"integration-view__section-title"],[1,"integration-view__mono"],[1,"integration-view__hint"],["variant","neutral"],["variant","outline"]],template:function(o,r){if(o&1&&(ws(0,"div",0)(1,"header",1)(2,"h1"),GC(3,"Integration configuration"),pl()(),Jw(4,E,2,0,"p",2)(5,S,2,0,"p",3)(6,O,41,9),pl()),o&2){let g;XE(4),eC(r.isLoading()?4:r.hasError()?5:(g=r.config())?6:-1,g);}},dependencies:[Yn],styles:[".integration-view[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px;max-width:760px;margin:0 auto;padding:24px 8px}.integration-view__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.integration-view__header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:0;color:var(--color-text);font-family:var(--font-heading);font-size:24px}.integration-view__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;padding:20px;border:1px solid var(--color-divider)}.integration-view__section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.integration-view__section[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;color:var(--color-text);font-family:var(--font-heading);font-size:16px}.integration-view[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:8px 20px;margin:0}.integration-view[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:13px;font-weight:600}.integration-view[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0;color:var(--color-text);overflow-wrap:anywhere}.integration-view__mono[_ngcontent-%COMP%], .integration-view[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{font-family:monospace}.integration-view__hint[_ngcontent-%COMP%], .integration-view__status[_ngcontent-%COMP%]{margin:0;color:var(--color-text-secondary)}.integration-view__error[_ngcontent-%COMP%]{margin:0;color:var(--color-error)}.integration-view[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{max-height:440px;margin:0;padding:14px;overflow:auto;background:var(--color-bg-hover);color:var(--color-text);font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}@media(max-width:600px){.integration-view[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{grid-template-columns:1fr;gap:4px}.integration-view[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin-bottom:8px}}"]})};export{h as IntegrationConfigViewComponent};
1
+ import {N}from'./chunk-Bo7GcoVn.js';import {g,ao as W,C as Ce,G as Gi,b as U,e as xw,k as ws,n as GC,o as pl,J as Jw,X as XE,v as eC,ac as gC,a8 as Yg}from'./main-DB5EJGYC.js';import'./chunk-CVM23KJ3.js';import {Y as Yn}from'./chunk-aMjpfW4c.js';import'./chunk-D-FNlEoa.js';import'./chunk-BLaIJYTj.js';import'./chunk-Gb2w1W4p.js';import'./chunk-CKhMv1Ug.js';function E(a,e){a&1&&(ws(0,"p",2),GC(1,"Loading integration\u2026"),pl());}function S(a,e){a&1&&(ws(0,"p",3),GC(1,"Failed to load this integration configuration."),pl());}function I(a,e){a&1&&(ws(0,"ds-tag",8),GC(1,"YAML"),pl(),ws(2,"ds-tag",9),GC(3,"Read-only"),pl());}function O(a,e){if(a&1&&(ws(0,"section",4)(1,"div",5)(2,"h2"),GC(3,"General"),pl(),Jw(4,I,4,0),pl(),ws(5,"dl")(6,"dt"),GC(7,"Name"),pl(),ws(8,"dd"),GC(9),pl(),ws(10,"dt"),GC(11,"Type"),pl(),ws(12,"dd",6),GC(13),pl(),ws(14,"dt"),GC(15,"Description"),pl(),ws(16,"dd"),GC(17),pl(),ws(18,"dt"),GC(19,"Scope"),pl(),ws(20,"dd"),GC(21),pl(),ws(22,"dt"),GC(23,"Source"),pl(),ws(24,"dd"),GC(25),pl(),ws(26,"dt"),GC(27,"Auto grant"),pl(),ws(28,"dd"),GC(29),pl(),ws(30,"dt"),GC(31,"Auth setting"),pl(),ws(32,"dd"),GC(33),pl()()(),ws(34,"section",4)(35,"h2"),GC(36,"Parameters"),pl(),ws(37,"p",7),GC(38,"Sensitive values are always redacted."),pl(),ws(39,"pre"),GC(40),pl()()),a&2){let o=e,r=gC();XE(4),eC(r.source()==="FILESYSTEM"?4:-1),XE(5),Yg(o.name),XE(4),Yg(o.integrationType),XE(4),Yg(o.description||"\u2014"),XE(4),Yg(r.scopeOf(o)),XE(4),Yg(r.source()),XE(4),Yg(o.autoGrant?"Enabled":"Disabled"),XE(4),Yg(o.authSettingName||"None"),XE(7),Yg(r.parameters());}}var y="\u2022\u2022\u2022\u2022\u2022\u2022",b=/(?:api[-_]?key|token|secret|password|passphrase|credential|private[-_]?key|client[-_]?secret|authorization|cookie)/i,h=class a{route=g(W);destroyRef=g(Ce);state=g(N);integrationId=this.route.snapshot.params.integrationId;isLoading=Gi(true);hasError=Gi(false);config=Gi(null);source=Gi("NEO4J");parameters=Gi("{}");ngOnInit(){this.state.getById(this.integrationId).pipe(U(this.destroyRef)).subscribe({next:e=>{this.config.set(e),this.source.set(this.sourceOf(e)),this.parameters.set(JSON.stringify(this.redact(e.parameters),null,2)),this.isLoading.set(false);},error:()=>{this.hasError.set(true),this.isLoading.set(false);}});}scopeOf(e){let o=e.userId?e.namespaceId?"userOnNs":"userGlobal":e.namespaceId?"namespace":"platform";return {platform:"Platform",namespace:"Namespace",userOnNs:"Personal on namespace",userGlobal:"Personal global"}[o]}sourceOf(e){return e.source??"NEO4J"}redact(e,o=""){return b.test(o)?y:e===null||typeof e=="boolean"||typeof e=="number"?e:typeof e=="string"?this.containsCredential(e)?y:e:Array.isArray(e)?e.map(r=>this.redact(r,o)):typeof e=="object"?Object.fromEntries(Object.entries(e).map(([r,g])=>[r,this.redact(g,r)])):String(e??"")}containsCredential(e){return /^(?:bearer\s+|basic\s+|sk[-_]|gh[opusr]_|xox[baprs]-|-----begin (?:rsa |ec |openssh )?private key-----)/i.test(e.trim())}static \u0275fac=function(o){return new(o||a)};static \u0275cmp=xw({type:a,selectors:[["agentos-integration-config-view"]],decls:7,vars:1,consts:[[1,"integration-view"],[1,"integration-view__header"],["role","status",1,"integration-view__status"],[1,"integration-view__error"],[1,"integration-view__section"],[1,"integration-view__section-title"],[1,"integration-view__mono"],[1,"integration-view__hint"],["variant","neutral"],["variant","outline"]],template:function(o,r){if(o&1&&(ws(0,"div",0)(1,"header",1)(2,"h1"),GC(3,"Integration configuration"),pl()(),Jw(4,E,2,0,"p",2)(5,S,2,0,"p",3)(6,O,41,9),pl()),o&2){let g;XE(4),eC(r.isLoading()?4:r.hasError()?5:(g=r.config())?6:-1,g);}},dependencies:[Yn],styles:[".integration-view[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px;max-width:760px;margin:0 auto;padding:24px 8px}.integration-view__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.integration-view__header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:0;color:var(--color-text);font-family:var(--font-heading);font-size:24px}.integration-view__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;padding:20px;border:1px solid var(--color-divider)}.integration-view__section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.integration-view__section[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;color:var(--color-text);font-family:var(--font-heading);font-size:16px}.integration-view[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:8px 20px;margin:0}.integration-view[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:13px;font-weight:600}.integration-view[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0;color:var(--color-text);overflow-wrap:anywhere}.integration-view__mono[_ngcontent-%COMP%], .integration-view[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{font-family:monospace}.integration-view__hint[_ngcontent-%COMP%], .integration-view__status[_ngcontent-%COMP%]{margin:0;color:var(--color-text-secondary)}.integration-view__error[_ngcontent-%COMP%]{margin:0;color:var(--color-error)}.integration-view[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{max-height:440px;margin:0;padding:14px;overflow:auto;background:var(--color-bg-hover);color:var(--color-text);font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}@media(max-width:600px){.integration-view[_ngcontent-%COMP%] dl[_ngcontent-%COMP%]{grid-template-columns:1fr;gap:4px}.integration-view[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin-bottom:8px}}"]})};export{h as IntegrationConfigViewComponent};
@@ -1,4 +1,4 @@
1
- import {s as se}from'./chunk-DLde3g-3.js';import {b as Fr,Q as Qi,F as Fn,K as Ki,h as ht,w as wr,k as kr}from'./chunk-D1K33IKA.js';import {g,D as py,P,W as x,aL as wo,aM as Zn,bD as ge,bE as vt,aO as wt,bs as Tl,az as Xt,aW as C,aS as K,bF as J,al as vt$1,aT as Ut,bG as p,bH as Pt,e as xw,a_ as QT,bA as yC,bI as Ig,b5 as nT,B as Pg,bJ as dr,E as EC,I as IC,bv as Fg,bK as fe,bL as pe,bM as mr,aP as G,bt as Qn,bN as F,aR as Fs,an as ue,O as Ot,bO as mt,bP as Wy,ae as kt$1,Q as br,r as re,bQ as Gy,bR as wd,bS as Ea,aF as R$1,bu as Ve$1,bT as pn,bU as Td,bV as Zy,aA as an,bW as Y,bX as Pt$1,bY as po,bZ as X,b_ as xt,aZ as js,aC as Tu,q as Rg,T as Tg,aw as hl,bB as vC,ax as gl,ac as gC,b$ as kC,z as Ug,c0 as xg,c1 as E,c2 as ME,c3 as kt$2,bC as Si}from'./main-HLQ22ACS.js';import {D}from'./chunk-65tVAuhG.js';var xe=class a{http=g(py);projectState=g(P);getBaseUrl(){return `/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/schedulers`}listSchedulers(){return this.http.get(this.getBaseUrl())}getScheduler(o){return this.http.get(`${this.getBaseUrl()}/${o}`)}createScheduler(o){return this.http.post(this.getBaseUrl(),o)}listSchedulersForProject(o){return this.http.get(`/api/projects/${o}/schedulers`)}enableSchedulerForProject(o,e){return this.http.post(`/api/projects/${o}/schedulers/${e}/enable`,{})}disableSchedulerForProject(o,e){return this.http.post(`/api/projects/${o}/schedulers/${e}/disable`,{})}runSchedulerNowForProject(o,e){return this.http.post(`/api/projects/${o}/schedulers/${e}/run-now`,{})}deleteSchedulerForProject(o,e){return this.http.delete(`/api/projects/${o}/schedulers/${e}`)}updateSchedulerForProject(o,e,t){return this.http.put(`/api/projects/${o}/schedulers/${e}`,t)}createSchedulerForProject(o,e){return this.http.post(`/api/projects/${o}/schedulers`,e)}updateScheduler(o,e){return this.http.put(`${this.getBaseUrl()}/${o}`,e)}deleteScheduler(o){return this.http.delete(`${this.getBaseUrl()}/${o}`)}enableScheduler(o){return this.http.post(`${this.getBaseUrl()}/${o}/enable`,{})}disableScheduler(o){return this.http.post(`${this.getBaseUrl()}/${o}/disable`,{})}runSchedulerNow(o){return this.http.post(`${this.getBaseUrl()}/${o}/run-now`,{})}static \u0275fac=function(e){return new(e||a)};static \u0275prov=x({token:a,factory:a.\u0275fac,providedIn:"root"})};var Ke=["panel"],Ue=["*"];function qe(a,o){if(a&1&&(hl(0,"div",1,0),vC(2),gl()),a&2){let e=o.id,t=gC();kC(t._classList),Ug("mat-mdc-autocomplete-visible",t.showPanel)("mat-mdc-autocomplete-hidden",!t.showPanel)("mat-autocomplete-panel-animations-enabled",!t._animationsDisabled)("mat-primary",t._color==="primary")("mat-accent",t._color==="accent")("mat-warn",t._color==="warn"),xg("id",t.id),Tg("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby(e));}}var R=class{source;option;constructor(o,e){this.source=o,this.option=e;}},Ve=new C("mat-autocomplete-default-options",{providedIn:"root",factory:()=>({autoActiveFirstOption:false,autoSelectActiveOption:false,hideSingleSelectionIndicator:false,requireSelection:false,hasBackdrop:false})}),Ct=(()=>{class a{_changeDetectorRef=g(Tl);_elementRef=g(Xt);_defaults=g(Ve);_animationsDisabled=K();_activeOptionChanges=J.EMPTY;_keyManager;showPanel=false;get isOpen(){return this._isOpen&&this.showPanel}_isOpen=false;_latestOpeningTrigger;_setColor(e){this._color=e,this._changeDetectorRef.markForCheck();}_color;template;panel;options;optionGroups;ariaLabel;ariaLabelledby;displayWith=null;autoActiveFirstOption;autoSelectActiveOption;requireSelection;panelWidth;disableRipple=false;optionSelected=new vt$1;opened=new vt$1;closed=new vt$1;optionActivated=new vt$1;set classList(e){this._classList=e,this._elementRef.nativeElement.className="";}_classList;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties();}_hideSingleSelectionIndicator;_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck();}id=g(Ut).getId("mat-autocomplete-");inertGroups;constructor(){let e=g(p);this.inertGroups=e?.SAFARI||false,this.autoActiveFirstOption=!!this._defaults.autoActiveFirstOption,this.autoSelectActiveOption=!!this._defaults.autoSelectActiveOption,this.requireSelection=!!this._defaults.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??false;}ngAfterContentInit(){this._keyManager=new Pt(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null});}),this._setVisibility();}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe();}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e);}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options?.length,this._changeDetectorRef.markForCheck();}_emitSelectEvent(e){let t=new R(this,e);this.optionSelected.emit(t);}_getPanelAriaLabelledby(e){if(this.ariaLabel)return null;let t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_skipPredicate(){return false}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=xw({type:a,selectors:[["mat-autocomplete"]],contentQueries:function(t,i,n){if(t&1&&Fg(n,Fn,5)(n,Ki,5),t&2){let s;EC(s=IC())&&(i.options=s),EC(s=IC())&&(i.optionGroups=s);}},viewQuery:function(t,i){if(t&1&&Pg(dr,7)(Ke,5),t&2){let n;EC(n=IC())&&(i.template=n.first),EC(n=IC())&&(i.panel=n.first);}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",QT],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",QT],requireSelection:[2,"requireSelection","requireSelection",QT],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",QT],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",QT]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],features:[nT([{provide:Qi,useExisting:a}])],ngContentSelectors:Ue,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(t,i){t&1&&(yC(),Ig(0,qe,3,17,"ng-template"));},styles:[`div.mat-mdc-autocomplete-panel {
1
+ import {s as se}from'./chunk-CGFcBWlS.js';import {b as Fr,Q as Qi,F as Fn,K as Ki,h as ht,w as wr,k as kr}from'./chunk-aMjpfW4c.js';import {g,D as py,P,W as x,aL as wo,aM as Zn,bD as ge,bE as vt,aO as wt,bs as Tl,az as Xt,aW as C,aS as K,bF as J,al as vt$1,aT as Ut,bG as p,bH as Pt,e as xw,a_ as QT,bA as yC,bI as Ig,b5 as nT,B as Pg,bJ as dr,E as EC,I as IC,bv as Fg,bK as fe,bL as pe,bM as mr,aP as G,bt as Qn,bN as F,aR as Fs,an as ue,O as Ot,bO as mt,bP as Wy,ae as kt$1,Q as br,r as re,bQ as Gy,bR as wd,bS as Ea,aF as R$1,bu as Ve$1,bT as pn,bU as Td,bV as Zy,aA as an,bW as Y,bX as Pt$1,bY as po,bZ as X,b_ as xt,aZ as js,aC as Tu,q as Rg,T as Tg,aw as hl,bB as vC,ax as gl,ac as gC,b$ as kC,z as Ug,c0 as xg,c1 as E,c2 as ME,c3 as kt$2,bC as Si}from'./main-DB5EJGYC.js';import {D}from'./chunk-BLaIJYTj.js';var xe=class a{http=g(py);projectState=g(P);getBaseUrl(){return `/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/schedulers`}listSchedulers(){return this.http.get(this.getBaseUrl())}getScheduler(o){return this.http.get(`${this.getBaseUrl()}/${o}`)}createScheduler(o){return this.http.post(this.getBaseUrl(),o)}listSchedulersForProject(o){return this.http.get(`/api/projects/${o}/schedulers`)}enableSchedulerForProject(o,e){return this.http.post(`/api/projects/${o}/schedulers/${e}/enable`,{})}disableSchedulerForProject(o,e){return this.http.post(`/api/projects/${o}/schedulers/${e}/disable`,{})}runSchedulerNowForProject(o,e){return this.http.post(`/api/projects/${o}/schedulers/${e}/run-now`,{})}deleteSchedulerForProject(o,e){return this.http.delete(`/api/projects/${o}/schedulers/${e}`)}updateSchedulerForProject(o,e,t){return this.http.put(`/api/projects/${o}/schedulers/${e}`,t)}createSchedulerForProject(o,e){return this.http.post(`/api/projects/${o}/schedulers`,e)}updateScheduler(o,e){return this.http.put(`${this.getBaseUrl()}/${o}`,e)}deleteScheduler(o){return this.http.delete(`${this.getBaseUrl()}/${o}`)}enableScheduler(o){return this.http.post(`${this.getBaseUrl()}/${o}/enable`,{})}disableScheduler(o){return this.http.post(`${this.getBaseUrl()}/${o}/disable`,{})}runSchedulerNow(o){return this.http.post(`${this.getBaseUrl()}/${o}/run-now`,{})}static \u0275fac=function(e){return new(e||a)};static \u0275prov=x({token:a,factory:a.\u0275fac,providedIn:"root"})};var Ke=["panel"],Ue=["*"];function qe(a,o){if(a&1&&(hl(0,"div",1,0),vC(2),gl()),a&2){let e=o.id,t=gC();kC(t._classList),Ug("mat-mdc-autocomplete-visible",t.showPanel)("mat-mdc-autocomplete-hidden",!t.showPanel)("mat-autocomplete-panel-animations-enabled",!t._animationsDisabled)("mat-primary",t._color==="primary")("mat-accent",t._color==="accent")("mat-warn",t._color==="warn"),xg("id",t.id),Tg("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby(e));}}var R=class{source;option;constructor(o,e){this.source=o,this.option=e;}},Ve=new C("mat-autocomplete-default-options",{providedIn:"root",factory:()=>({autoActiveFirstOption:false,autoSelectActiveOption:false,hideSingleSelectionIndicator:false,requireSelection:false,hasBackdrop:false})}),Ct=(()=>{class a{_changeDetectorRef=g(Tl);_elementRef=g(Xt);_defaults=g(Ve);_animationsDisabled=K();_activeOptionChanges=J.EMPTY;_keyManager;showPanel=false;get isOpen(){return this._isOpen&&this.showPanel}_isOpen=false;_latestOpeningTrigger;_setColor(e){this._color=e,this._changeDetectorRef.markForCheck();}_color;template;panel;options;optionGroups;ariaLabel;ariaLabelledby;displayWith=null;autoActiveFirstOption;autoSelectActiveOption;requireSelection;panelWidth;disableRipple=false;optionSelected=new vt$1;opened=new vt$1;closed=new vt$1;optionActivated=new vt$1;set classList(e){this._classList=e,this._elementRef.nativeElement.className="";}_classList;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties();}_hideSingleSelectionIndicator;_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck();}id=g(Ut).getId("mat-autocomplete-");inertGroups;constructor(){let e=g(p);this.inertGroups=e?.SAFARI||false,this.autoActiveFirstOption=!!this._defaults.autoActiveFirstOption,this.autoSelectActiveOption=!!this._defaults.autoSelectActiveOption,this.requireSelection=!!this._defaults.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??false;}ngAfterContentInit(){this._keyManager=new Pt(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null});}),this._setVisibility();}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe();}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e);}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options?.length,this._changeDetectorRef.markForCheck();}_emitSelectEvent(e){let t=new R(this,e);this.optionSelected.emit(t);}_getPanelAriaLabelledby(e){if(this.ariaLabel)return null;let t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_skipPredicate(){return false}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=xw({type:a,selectors:[["mat-autocomplete"]],contentQueries:function(t,i,n){if(t&1&&Fg(n,Fn,5)(n,Ki,5),t&2){let s;EC(s=IC())&&(i.options=s),EC(s=IC())&&(i.optionGroups=s);}},viewQuery:function(t,i){if(t&1&&Pg(dr,7)(Ke,5),t&2){let n;EC(n=IC())&&(i.template=n.first),EC(n=IC())&&(i.panel=n.first);}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",QT],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",QT],requireSelection:[2,"requireSelection","requireSelection",QT],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",QT],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",QT]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],features:[nT([{provide:Qi,useExisting:a}])],ngContentSelectors:Ue,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(t,i){t&1&&(yC(),Ig(0,qe,3,17,"ng-template"));},styles:[`div.mat-mdc-autocomplete-panel {
2
2
  width: 100%;
3
3
  max-height: 256px;
4
4
  visibility: hidden;
@@ -1,4 +1,4 @@
1
- import {N as Ne,u as ui$1,a as me,f as fi,Y as Yt,V as Ve$1,n as ne}from'./chunk-bBy0vM9Y.js';import {g,az as Xt,aR as Fs,aZ as js,al as vt,e as xw,S as Sg,k as ws,s as rC,o as pl,t as CC,u as bg,X as XE,y as oC,B as Pg,E as EC,I as IC,j as Gn$1,q as Rg,n as GC,b$ as kC,T as Tg,a8 as Yg,O as Ot,C as Ce,cK as YB,cb as ZB,G as Gi$1,m as mT,b as U,bA as yC,bB as vC,ad as Hg,z as Ug,cc as qB,cr as QB,cd as Hf,J as Jw,v as eC,cv as jg,cw as wC,aw as hl,b6 as _g,ax as gl,ce as _b,af as Eg,an as ue,cL as vd,cM as Nd,bS as Ea,Q as br,cJ as Og,c0 as xg,cN as kn,aL as wo$1,aM as Zn$1,br as sn,bD as ge,aO as wt$1,bE as vt$1,bs as Tl,bL as pe,aS as K,cO as us,w,aT as Ut,cP as Bt,bR as wd,bP as Wy,bu as Ve,c2 as ME,x,a_ as QT,bI as Ig,b5 as nT,aW as C,bv as Fg,aV as U$1,bw as St,aX as D,bx as on,bz as Oi$1,bF as J,cQ as q,cR as X,a9 as lC,aa as If,ac as gC,ab as wf,a5 as vl,cS as Yt$1,cT as Gp,bM as mr,aP as G,ae as kt,aA as an,bW as Y,cU as pi$1,cV as vg,aC as Tu,by as um,cB as on$1,c8 as KT,ah as rT,a4 as nC,c9 as kf,bt as Qn$2,ap as Cd,bX as Pt,bZ as X$1,b_ as xt,cW as ZI,cD as Te,a3 as VI,a6 as UI,bo as tC,c3 as kt$1,bJ as dr,a$ as XC,b4 as oT,b0 as Qg,ch as Ng,cX as yr,cY as tt$1,aY as ft$1,cz as to$1,ag as fT}from'./main-HLQ22ACS.js';import {w as wt,j as Yn$1,k as _t$1,n as ni$1,l as Xn$1,E as En,z as ze$1,Q as Qn$1,e as ei$1,Y as Ye,f as fn,a as wt$2,A as At,Z as Zn$2,C as Cn}from'./chunk-65tVAuhG.js';var ri=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],si=["mat-icon, [matMenuItemIcon]","*"];function li(n,i){n&1&&(kf(),ws(0,"svg",2),Sg(1,"polygon",3),pl());}var ci=["*"];function di(n,i){if(n&1){let e=lC();hl(0,"div",0),Og("click",function(){If(e);let o=gC();return wf(o.closed.emit("click"))})("animationstart",function(o){If(e);let a=gC();return wf(a._onAnimationStart(o.animationName))})("animationend",function(o){If(e);let a=gC();return wf(a._onAnimationDone(o.animationName))})("animationcancel",function(o){If(e);let a=gC();return wf(a._onAnimationDone(o.animationName))}),hl(1,"div",1),vC(2),gl()();}if(n&2){let e=gC();kC(e._classList),Ug("mat-menu-panel-animations-disabled",e._animationsDisabled)("mat-menu-panel-exit-animation",e._panelAnimationState==="void")("mat-menu-panel-animating",e._isAnimating()),xg("id",e.panelId),Tg("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null);}}var pt=new C("MAT_MENU_PANEL"),ze=(()=>{class n{_elementRef=g(Xt);_document=g(U$1);_focusMonitor=g(St);_parentMenu=g(pt,{optional:true});_changeDetectorRef=g(Tl);role="menuitem";disabled=false;disableRipple=false;_hovered=new ue;_focused=new ue;_highlighted=false;_triggersSubmenu=false;constructor(){g(D).load(on),this._parentMenu?.addItem?.(this);}focus(e,t){this._focusMonitor&&e?this._focusMonitor.focusVia(this._getHostElement(),e,t):this._getHostElement().focus(t),this._focused.next(this);}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,false);}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete();}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(e){this.disabled&&(e.preventDefault(),e.stopPropagation());}_handleMouseEnter(){this._hovered.next(this);}getLabel(){let e=this._elementRef.nativeElement.cloneNode(true),t=e.querySelectorAll("mat-icon, .material-icons");for(let o=0;o<t.length;o++)t[o].remove();return e.textContent?.trim()||""}_setHighlighted(e){this._highlighted=e,this._changeDetectorRef.markForCheck();}_setTriggersSubmenu(e){this._triggersSubmenu=e,this._changeDetectorRef.markForCheck();}_hasFocus(){return this._document&&this._document.activeElement===this._getHostElement()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=xw({type:n,selectors:[["","mat-menu-item",""]],hostAttrs:[1,"mat-mdc-menu-item","mat-focus-indicator"],hostVars:8,hostBindings:function(t,o){t&1&&Rg("click",function(m){return o._checkDisabled(m)})("mouseenter",function(){return o._handleMouseEnter()}),t&2&&(Tg("role",o.role)("tabindex",o._getTabIndex())("aria-disabled",o.disabled)("disabled",o.disabled||null),Ug("mat-mdc-menu-item-highlighted",o._highlighted)("mat-mdc-menu-item-submenu-trigger",o._triggersSubmenu));},inputs:{role:"role",disabled:[2,"disabled","disabled",QT],disableRipple:[2,"disableRipple","disableRipple",QT]},exportAs:["matMenuItem"],ngContentSelectors:si,decls:5,vars:3,consts:[[1,"mat-mdc-menu-item-text"],["matRipple","",1,"mat-mdc-menu-ripple",3,"matRippleDisabled","matRippleTrigger"],["viewBox","0 0 5 10","focusable","false","aria-hidden","true",1,"mat-mdc-menu-submenu-icon"],["points","0,0 5,5 0,10"]],template:function(t,o){t&1&&(yC(ri),vC(0),ws(1,"span",0),vC(2,1),pl(),Sg(3,"div",1),Jw(4,li,2,0,":svg:svg",2)),t&2&&(XE(3),bg("matRippleDisabled",o.disableRipple||o.disabled)("matRippleTrigger",o._getHostElement()),XE(),eC(o._triggersSubmenu?4:-1));},dependencies:[Oi$1],encapsulation:2})}return n})();var Sn=new C("MatMenuContent"),Sa=(()=>{class n{_template=g(dr);_appRef=g(yr);_injector=g(pe);_viewContainerRef=g(mr);_document=g(U$1);_changeDetectorRef=g(Tl);_portal;_outlet;_attached=new ue;attach(e={}){this._portal||(this._portal=new Y(this._template,this._viewContainerRef)),this.detach(),this._outlet||(this._outlet=new tt$1(this._document.createElement("div"),this._appRef,this._injector));let t=this._template.elementRef.nativeElement;t.parentNode.insertBefore(this._outlet.outletElement,t),this._changeDetectorRef.markForCheck(),this._portal.attach(this._outlet,e),this._attached.next();}detach(){this._portal?.isAttached&&this._portal.detach();}ngOnDestroy(){this.detach(),this._outlet?.dispose();}static \u0275fac=function(t){return new(t||n)};static \u0275dir=js({type:n,selectors:[["ng-template","matMenuContent",""]],features:[nT([{provide:Sn,useExisting:n}])]})}return n})(),mi=new C("mat-menu-default-options",{providedIn:"root",factory:()=>({overlapTrigger:false,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"})}),mt="_mat-menu-enter",et="_mat-menu-exit",Ee=(()=>{class n{_elementRef=g(Xt);_changeDetectorRef=g(Tl);_injector=g(pe);_keyManager;_xPosition;_yPosition;_firstItemFocusRef;_exitFallbackTimeout;_animationsDisabled=K();_allItems;_directDescendantItems=new us;_classList={};_panelAnimationState="void";_animationDone=new ue;_isAnimating=Gi$1(false);parentMenu;direction;overlayPanelClass;backdropClass;ariaLabel;ariaLabelledby;ariaDescribedby;get xPosition(){return this._xPosition}set xPosition(e){this._xPosition=e,this.setPositionClasses();}get yPosition(){return this._yPosition}set yPosition(e){this._yPosition=e,this.setPositionClasses();}templateRef;items;lazyContent;overlapTrigger=false;hasBackdrop;get panelClass(){return this._previousPanelClass}set panelClass(e){let t=this._previousPanelClass,o=w({},this._classList);t&&t.length&&t.split(" ").forEach(a=>{o[a]=false;}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(a=>{o[a]=true;}),this._elementRef.nativeElement.className=""),this._classList=o;}_previousPanelClass="";get classList(){return this.panelClass}set classList(e){this.panelClass=e;}closed=new vt;close=this.closed;panelId=g(Ut).getId("mat-menu-panel-");constructor(){let e=g(mi);this.overlayPanelClass=e.overlayPanelClass||"",this._xPosition=e.xPosition,this._yPosition=e.yPosition,this.backdropClass=e.backdropClass,this.overlapTrigger=e.overlapTrigger,this.hasBackdrop=e.hasBackdrop;}ngOnInit(){this.setPositionClasses();}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new Bt(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(wd(this._directDescendantItems),Ea(e=>Wy(...e.map(t=>t._focused)))).subscribe(e=>this._keyManager.updateActiveItem(e)),this._directDescendantItems.changes.subscribe(e=>{let t=this._keyManager;if(this._panelAnimationState==="enter"&&t.activeItem?._hasFocus()){let o=e.toArray(),a=Math.max(0,Math.min(o.length-1,t.activeItemIndex||0));o[a]&&!o[a].disabled?t.setActiveItem(a):t.setNextItemActive();}});}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy(),clearTimeout(this._exitFallbackTimeout);}_hovered(){return this._directDescendantItems.changes.pipe(wd(this._directDescendantItems),Ea(t=>Wy(...t.map(o=>o._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){let t=e.keyCode,o=this._keyManager;switch(t){case 27:Ve(e)||(e.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&this.direction==="ltr"&&this.closed.emit("keydown");break;case 39:this.parentMenu&&this.direction==="rtl"&&this.closed.emit("keydown");break;default:(t===38||t===40)&&o.setFocusOrigin("keyboard"),o.onKeydown(e);return}}focusFirstItem(e="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=ME(()=>{let t=this._resolvePanel();if(!t||!t.contains(document.activeElement)){let o=this._keyManager;o.setFocusOrigin(e).setFirstItemActive(),!o.activeItem&&t&&t.focus();}},{injector:this._injector});}resetActiveItem(){this._keyManager.setActiveItem(-1);}setElevation(e){}setPositionClasses(e=this.xPosition,t=this.yPosition){this._classList=x(w({},this._classList),{"mat-menu-before":e==="before","mat-menu-after":e==="after","mat-menu-above":t==="above","mat-menu-below":t==="below"}),this._changeDetectorRef.markForCheck();}_onAnimationDone(e){let t=e===et;(t||e===mt)&&(t&&(clearTimeout(this._exitFallbackTimeout),this._exitFallbackTimeout=void 0),this._animationDone.next(t?"void":"enter"),this._isAnimating.set(false));}_onAnimationStart(e){(e===mt||e===et)&&this._isAnimating.set(true);}_setIsOpen(e){if(this._panelAnimationState=e?"enter":"void",e){if(this._keyManager.activeItemIndex===0){let t=this._resolvePanel();t&&(t.scrollTop=0);}}else this._animationsDisabled||(this._exitFallbackTimeout=setTimeout(()=>this._onAnimationDone(et),200));this._animationsDisabled&&setTimeout(()=>{this._onAnimationDone(e?mt:et);}),this._changeDetectorRef.markForCheck();}_updateDirectDescendants(){this._allItems.changes.pipe(wd(this._allItems)).subscribe(e=>{this._directDescendantItems.reset(e.filter(t=>t._parentMenu===this)),this._directDescendantItems.notifyOnChanges();});}_resolvePanel(){let e=null;return this._directDescendantItems.length&&(e=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),e}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=xw({type:n,selectors:[["mat-menu"]],contentQueries:function(t,o,a){if(t&1&&Fg(a,Sn,5)(a,ze,5)(a,ze,4),t&2){let m;EC(m=IC())&&(o.lazyContent=m.first),EC(m=IC())&&(o._allItems=m),EC(m=IC())&&(o.items=m);}},viewQuery:function(t,o){if(t&1&&Pg(dr,5),t&2){let a;EC(a=IC())&&(o.templateRef=a.first);}},hostVars:3,hostBindings:function(t,o){t&2&&Tg("aria-label",null)("aria-labelledby",null)("aria-describedby",null);},inputs:{backdropClass:"backdropClass",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[2,"overlapTrigger","overlapTrigger",QT],hasBackdrop:[2,"hasBackdrop","hasBackdrop",e=>e==null?null:QT(e)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],features:[nT([{provide:pt,useExisting:n}])],ngContentSelectors:ci,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel",3,"click","animationstart","animationend","animationcancel","id"],[1,"mat-mdc-menu-content"]],template:function(t,o){t&1&&(yC(),Ig(0,di,3,12,"ng-template"));},styles:[`mat-menu {
1
+ import {N as Ne,u as ui$1,a as me,f as fi,Y as Yt,V as Ve$1,n as ne}from'./chunk-D-FNlEoa.js';import {g,az as Xt,aR as Fs,aZ as js,al as vt,e as xw,S as Sg,k as ws,s as rC,o as pl,t as CC,u as bg,X as XE,y as oC,B as Pg,E as EC,I as IC,j as Gn$1,q as Rg,n as GC,b$ as kC,T as Tg,a8 as Yg,O as Ot,C as Ce,cK as YB,cb as ZB,G as Gi$1,m as mT,b as U,bA as yC,bB as vC,ad as Hg,z as Ug,cc as qB,cr as QB,cd as Hf,J as Jw,v as eC,cv as jg,cw as wC,aw as hl,b6 as _g,ax as gl,ce as _b,af as Eg,an as ue,cL as vd,cM as Nd,bS as Ea,Q as br,cJ as Og,c0 as xg,cN as kn,aL as wo$1,aM as Zn$1,br as sn,bD as ge,aO as wt$1,bE as vt$1,bs as Tl,bL as pe,aS as K,cO as us,w,aT as Ut,cP as Bt,bR as wd,bP as Wy,bu as Ve,c2 as ME,x,a_ as QT,bI as Ig,b5 as nT,aW as C,bv as Fg,aV as U$1,bw as St,aX as D,bx as on,bz as Oi$1,bF as J,cQ as q,cR as X,a9 as lC,aa as If,ac as gC,ab as wf,a5 as vl,cS as Yt$1,cT as Gp,bM as mr,aP as G,ae as kt,aA as an,bW as Y,cU as pi$1,cV as vg,aC as Tu,by as um,cB as on$1,c8 as KT,ah as rT,a4 as nC,c9 as kf,bt as Qn$2,ap as Cd,bX as Pt,bZ as X$1,b_ as xt,cW as ZI,cD as Te,a3 as VI,a6 as UI,bo as tC,c3 as kt$1,bJ as dr,a$ as XC,b4 as oT,b0 as Qg,ch as Ng,cX as yr,cY as tt$1,aY as ft$1,cz as to$1,ag as fT}from'./main-DB5EJGYC.js';import {w as wt,j as Yn$1,k as _t$1,n as ni$1,l as Xn$1,E as En,z as ze$1,Q as Qn$1,e as ei$1,Y as Ye,f as fn,a as wt$2,A as At,Z as Zn$2,C as Cn}from'./chunk-BLaIJYTj.js';var ri=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],si=["mat-icon, [matMenuItemIcon]","*"];function li(n,i){n&1&&(kf(),ws(0,"svg",2),Sg(1,"polygon",3),pl());}var ci=["*"];function di(n,i){if(n&1){let e=lC();hl(0,"div",0),Og("click",function(){If(e);let o=gC();return wf(o.closed.emit("click"))})("animationstart",function(o){If(e);let a=gC();return wf(a._onAnimationStart(o.animationName))})("animationend",function(o){If(e);let a=gC();return wf(a._onAnimationDone(o.animationName))})("animationcancel",function(o){If(e);let a=gC();return wf(a._onAnimationDone(o.animationName))}),hl(1,"div",1),vC(2),gl()();}if(n&2){let e=gC();kC(e._classList),Ug("mat-menu-panel-animations-disabled",e._animationsDisabled)("mat-menu-panel-exit-animation",e._panelAnimationState==="void")("mat-menu-panel-animating",e._isAnimating()),xg("id",e.panelId),Tg("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null);}}var pt=new C("MAT_MENU_PANEL"),ze=(()=>{class n{_elementRef=g(Xt);_document=g(U$1);_focusMonitor=g(St);_parentMenu=g(pt,{optional:true});_changeDetectorRef=g(Tl);role="menuitem";disabled=false;disableRipple=false;_hovered=new ue;_focused=new ue;_highlighted=false;_triggersSubmenu=false;constructor(){g(D).load(on),this._parentMenu?.addItem?.(this);}focus(e,t){this._focusMonitor&&e?this._focusMonitor.focusVia(this._getHostElement(),e,t):this._getHostElement().focus(t),this._focused.next(this);}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,false);}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete();}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(e){this.disabled&&(e.preventDefault(),e.stopPropagation());}_handleMouseEnter(){this._hovered.next(this);}getLabel(){let e=this._elementRef.nativeElement.cloneNode(true),t=e.querySelectorAll("mat-icon, .material-icons");for(let o=0;o<t.length;o++)t[o].remove();return e.textContent?.trim()||""}_setHighlighted(e){this._highlighted=e,this._changeDetectorRef.markForCheck();}_setTriggersSubmenu(e){this._triggersSubmenu=e,this._changeDetectorRef.markForCheck();}_hasFocus(){return this._document&&this._document.activeElement===this._getHostElement()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=xw({type:n,selectors:[["","mat-menu-item",""]],hostAttrs:[1,"mat-mdc-menu-item","mat-focus-indicator"],hostVars:8,hostBindings:function(t,o){t&1&&Rg("click",function(m){return o._checkDisabled(m)})("mouseenter",function(){return o._handleMouseEnter()}),t&2&&(Tg("role",o.role)("tabindex",o._getTabIndex())("aria-disabled",o.disabled)("disabled",o.disabled||null),Ug("mat-mdc-menu-item-highlighted",o._highlighted)("mat-mdc-menu-item-submenu-trigger",o._triggersSubmenu));},inputs:{role:"role",disabled:[2,"disabled","disabled",QT],disableRipple:[2,"disableRipple","disableRipple",QT]},exportAs:["matMenuItem"],ngContentSelectors:si,decls:5,vars:3,consts:[[1,"mat-mdc-menu-item-text"],["matRipple","",1,"mat-mdc-menu-ripple",3,"matRippleDisabled","matRippleTrigger"],["viewBox","0 0 5 10","focusable","false","aria-hidden","true",1,"mat-mdc-menu-submenu-icon"],["points","0,0 5,5 0,10"]],template:function(t,o){t&1&&(yC(ri),vC(0),ws(1,"span",0),vC(2,1),pl(),Sg(3,"div",1),Jw(4,li,2,0,":svg:svg",2)),t&2&&(XE(3),bg("matRippleDisabled",o.disableRipple||o.disabled)("matRippleTrigger",o._getHostElement()),XE(),eC(o._triggersSubmenu?4:-1));},dependencies:[Oi$1],encapsulation:2})}return n})();var Sn=new C("MatMenuContent"),Sa=(()=>{class n{_template=g(dr);_appRef=g(yr);_injector=g(pe);_viewContainerRef=g(mr);_document=g(U$1);_changeDetectorRef=g(Tl);_portal;_outlet;_attached=new ue;attach(e={}){this._portal||(this._portal=new Y(this._template,this._viewContainerRef)),this.detach(),this._outlet||(this._outlet=new tt$1(this._document.createElement("div"),this._appRef,this._injector));let t=this._template.elementRef.nativeElement;t.parentNode.insertBefore(this._outlet.outletElement,t),this._changeDetectorRef.markForCheck(),this._portal.attach(this._outlet,e),this._attached.next();}detach(){this._portal?.isAttached&&this._portal.detach();}ngOnDestroy(){this.detach(),this._outlet?.dispose();}static \u0275fac=function(t){return new(t||n)};static \u0275dir=js({type:n,selectors:[["ng-template","matMenuContent",""]],features:[nT([{provide:Sn,useExisting:n}])]})}return n})(),mi=new C("mat-menu-default-options",{providedIn:"root",factory:()=>({overlapTrigger:false,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"})}),mt="_mat-menu-enter",et="_mat-menu-exit",Ee=(()=>{class n{_elementRef=g(Xt);_changeDetectorRef=g(Tl);_injector=g(pe);_keyManager;_xPosition;_yPosition;_firstItemFocusRef;_exitFallbackTimeout;_animationsDisabled=K();_allItems;_directDescendantItems=new us;_classList={};_panelAnimationState="void";_animationDone=new ue;_isAnimating=Gi$1(false);parentMenu;direction;overlayPanelClass;backdropClass;ariaLabel;ariaLabelledby;ariaDescribedby;get xPosition(){return this._xPosition}set xPosition(e){this._xPosition=e,this.setPositionClasses();}get yPosition(){return this._yPosition}set yPosition(e){this._yPosition=e,this.setPositionClasses();}templateRef;items;lazyContent;overlapTrigger=false;hasBackdrop;get panelClass(){return this._previousPanelClass}set panelClass(e){let t=this._previousPanelClass,o=w({},this._classList);t&&t.length&&t.split(" ").forEach(a=>{o[a]=false;}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(a=>{o[a]=true;}),this._elementRef.nativeElement.className=""),this._classList=o;}_previousPanelClass="";get classList(){return this.panelClass}set classList(e){this.panelClass=e;}closed=new vt;close=this.closed;panelId=g(Ut).getId("mat-menu-panel-");constructor(){let e=g(mi);this.overlayPanelClass=e.overlayPanelClass||"",this._xPosition=e.xPosition,this._yPosition=e.yPosition,this.backdropClass=e.backdropClass,this.overlapTrigger=e.overlapTrigger,this.hasBackdrop=e.hasBackdrop;}ngOnInit(){this.setPositionClasses();}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new Bt(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(wd(this._directDescendantItems),Ea(e=>Wy(...e.map(t=>t._focused)))).subscribe(e=>this._keyManager.updateActiveItem(e)),this._directDescendantItems.changes.subscribe(e=>{let t=this._keyManager;if(this._panelAnimationState==="enter"&&t.activeItem?._hasFocus()){let o=e.toArray(),a=Math.max(0,Math.min(o.length-1,t.activeItemIndex||0));o[a]&&!o[a].disabled?t.setActiveItem(a):t.setNextItemActive();}});}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy(),clearTimeout(this._exitFallbackTimeout);}_hovered(){return this._directDescendantItems.changes.pipe(wd(this._directDescendantItems),Ea(t=>Wy(...t.map(o=>o._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){let t=e.keyCode,o=this._keyManager;switch(t){case 27:Ve(e)||(e.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&this.direction==="ltr"&&this.closed.emit("keydown");break;case 39:this.parentMenu&&this.direction==="rtl"&&this.closed.emit("keydown");break;default:(t===38||t===40)&&o.setFocusOrigin("keyboard"),o.onKeydown(e);return}}focusFirstItem(e="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=ME(()=>{let t=this._resolvePanel();if(!t||!t.contains(document.activeElement)){let o=this._keyManager;o.setFocusOrigin(e).setFirstItemActive(),!o.activeItem&&t&&t.focus();}},{injector:this._injector});}resetActiveItem(){this._keyManager.setActiveItem(-1);}setElevation(e){}setPositionClasses(e=this.xPosition,t=this.yPosition){this._classList=x(w({},this._classList),{"mat-menu-before":e==="before","mat-menu-after":e==="after","mat-menu-above":t==="above","mat-menu-below":t==="below"}),this._changeDetectorRef.markForCheck();}_onAnimationDone(e){let t=e===et;(t||e===mt)&&(t&&(clearTimeout(this._exitFallbackTimeout),this._exitFallbackTimeout=void 0),this._animationDone.next(t?"void":"enter"),this._isAnimating.set(false));}_onAnimationStart(e){(e===mt||e===et)&&this._isAnimating.set(true);}_setIsOpen(e){if(this._panelAnimationState=e?"enter":"void",e){if(this._keyManager.activeItemIndex===0){let t=this._resolvePanel();t&&(t.scrollTop=0);}}else this._animationsDisabled||(this._exitFallbackTimeout=setTimeout(()=>this._onAnimationDone(et),200));this._animationsDisabled&&setTimeout(()=>{this._onAnimationDone(e?mt:et);}),this._changeDetectorRef.markForCheck();}_updateDirectDescendants(){this._allItems.changes.pipe(wd(this._allItems)).subscribe(e=>{this._directDescendantItems.reset(e.filter(t=>t._parentMenu===this)),this._directDescendantItems.notifyOnChanges();});}_resolvePanel(){let e=null;return this._directDescendantItems.length&&(e=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),e}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=xw({type:n,selectors:[["mat-menu"]],contentQueries:function(t,o,a){if(t&1&&Fg(a,Sn,5)(a,ze,5)(a,ze,4),t&2){let m;EC(m=IC())&&(o.lazyContent=m.first),EC(m=IC())&&(o._allItems=m),EC(m=IC())&&(o.items=m);}},viewQuery:function(t,o){if(t&1&&Pg(dr,5),t&2){let a;EC(a=IC())&&(o.templateRef=a.first);}},hostVars:3,hostBindings:function(t,o){t&2&&Tg("aria-label",null)("aria-labelledby",null)("aria-describedby",null);},inputs:{backdropClass:"backdropClass",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[2,"overlapTrigger","overlapTrigger",QT],hasBackdrop:[2,"hasBackdrop","hasBackdrop",e=>e==null?null:QT(e)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],features:[nT([{provide:pt,useExisting:n}])],ngContentSelectors:ci,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel",3,"click","animationstart","animationend","animationcancel","id"],[1,"mat-mdc-menu-content"]],template:function(t,o){t&1&&(yC(),Ig(0,di,3,12,"ng-template"));},styles:[`mat-menu {
2
2
  display: none;
3
3
  }
4
4