@whoz-oss/coday-client 0.205.0 → 0.207.2

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 (114) hide show
  1. package/browser/chunk-22RX22JY.js +1 -0
  2. package/browser/{chunk-IZMOVLXM.js → chunk-243E2GWV.js} +1 -1
  3. package/browser/chunk-26MGIRJF.js +1 -0
  4. package/browser/{chunk-E5MP3JT3.js → chunk-2O4IDVFE.js} +1 -1
  5. package/browser/chunk-2P74VZU4.js +1 -0
  6. package/browser/chunk-3AOPEZPX.js +1 -0
  7. package/browser/{chunk-T7LK5WIK.js → chunk-3IOIMTCZ.js} +1 -1
  8. package/browser/{chunk-IZ232KSX.js → chunk-3NE2UZIY.js} +1 -1
  9. package/browser/{chunk-BM7HTRD4.js → chunk-3NOI65IY.js} +1 -1
  10. package/browser/{chunk-ZFLT2KNY.js → chunk-43DMEMMQ.js} +1 -1
  11. package/browser/{chunk-TIPIHEBG.js → chunk-4F2LQOD7.js} +1 -1
  12. package/browser/{chunk-OCT6NWLB.js → chunk-4JBCVOGN.js} +1 -1
  13. package/browser/{chunk-DIAV5ZVT.js → chunk-4KEHW6KL.js} +1 -1
  14. package/browser/{chunk-MLSIHZ2T.js → chunk-4NGQR26Q.js} +1 -1
  15. package/browser/{chunk-W2DFJLOU.js → chunk-5CBZIB6D.js} +1 -1
  16. package/browser/chunk-5J7BTB5J.js +5 -0
  17. package/browser/{chunk-CREVHCXF.js → chunk-5K5EFCNT.js} +1 -1
  18. package/browser/chunk-5OPQ2IC6.js +1 -0
  19. package/browser/{chunk-2KD6MSFI.js → chunk-5VKJNF6W.js} +1 -1
  20. package/browser/{chunk-PN75DG7I.js → chunk-6RZUBD7A.js} +1 -1
  21. package/browser/chunk-6VCRRGXF.js +1 -0
  22. package/browser/{chunk-H7A4LOFH.js → chunk-7MQRVE7E.js} +1 -1
  23. package/browser/{chunk-H2NKOG3U.js → chunk-7V5RIRTC.js} +1 -1
  24. package/browser/{chunk-T6U3WDDW.js → chunk-A2R5GVPT.js} +1 -1
  25. package/browser/{chunk-AV7DTXWS.js → chunk-ATKHLJJ3.js} +1 -1
  26. package/browser/{chunk-GN7KRTUQ.js → chunk-BGEXT3EN.js} +1 -1
  27. package/browser/chunk-BMUZTI7K.js +1 -0
  28. package/browser/{chunk-WRTC44LF.js → chunk-BQHUHW7P.js} +1 -1
  29. package/browser/chunk-CCPU2LL3.js +1 -0
  30. package/browser/{chunk-TANV4K2Q.js → chunk-CRMVKTOY.js} +1 -1
  31. package/browser/chunk-CU4C25HM.js +1 -0
  32. package/browser/{chunk-YQAOEJN2.js → chunk-DVSVPID7.js} +1 -1
  33. package/browser/{chunk-TZKO65ML.js → chunk-E3XC4CVU.js} +1 -1
  34. package/browser/{chunk-Q7GPLEGX.js → chunk-EQXGFCI5.js} +1 -1
  35. package/browser/{chunk-BWBXJSAF.js → chunk-F42BGKID.js} +1 -1
  36. package/browser/{chunk-QJ3OBGZZ.js → chunk-FAM7HWYV.js} +1 -1
  37. package/browser/{chunk-ZH3XQHLJ.js → chunk-FEJVBWEX.js} +1 -1
  38. package/browser/{chunk-UFOTGZBF.js → chunk-FMAU2O5I.js} +1 -1
  39. package/browser/{chunk-X4OBCZKS.js → chunk-FOAW6HUH.js} +1 -1
  40. package/browser/{chunk-JEGJL4TT.js → chunk-FTVXDMJT.js} +1 -1
  41. package/browser/chunk-G2BRVRGR.js +1 -0
  42. package/browser/{chunk-24EMVCMJ.js → chunk-GUB4VYOT.js} +1 -1
  43. package/browser/{chunk-XIWUSJ3U.js → chunk-H27HCS4L.js} +1 -1
  44. package/browser/{chunk-EJH5VPZT.js → chunk-HE2ON544.js} +1 -1
  45. package/browser/{chunk-7UX5UET4.js → chunk-HO4VUFE6.js} +1 -1
  46. package/browser/{chunk-MQIE2KBB.js → chunk-HQZLHG3V.js} +1 -1
  47. package/browser/{chunk-7DUVQCGC.js → chunk-IOREZEED.js} +1 -1
  48. package/browser/{chunk-RI2JQRSB.js → chunk-IRZNRZ5Q.js} +1 -1
  49. package/browser/{chunk-4OZZANXO.js → chunk-JIHPEYRG.js} +1 -1
  50. package/browser/{chunk-SUCGKO3W.js → chunk-K4C36S6V.js} +1 -1
  51. package/browser/{chunk-2XIUD7DV.js → chunk-KZJRQ6RN.js} +1 -1
  52. package/browser/{chunk-7BYLIOKV.js → chunk-LBMJRBEQ.js} +1 -1
  53. package/browser/{chunk-ETLSYFBB.js → chunk-LH4ATU27.js} +1 -1
  54. package/browser/{chunk-EMS3MOSZ.js → chunk-LM2BKZRF.js} +1 -1
  55. package/browser/chunk-LMFI6Y77.js +1 -0
  56. package/browser/{chunk-ATOA52OV.js → chunk-LRKPIL3B.js} +1 -1
  57. package/browser/chunk-LX5DYIMF.js +1 -0
  58. package/browser/chunk-M6ORKUDA.js +1 -0
  59. package/browser/{chunk-JLGR5C43.js → chunk-M7LNEVHA.js} +1 -1
  60. package/browser/{chunk-O4JNY3IM.js → chunk-ND3PB3FA.js} +1 -1
  61. package/browser/{chunk-POQ6PK6P.js → chunk-NIWF7LLH.js} +1 -1
  62. package/browser/{chunk-RBAVAHXW.js → chunk-OBV4LQBZ.js} +1 -1
  63. package/browser/chunk-OSQQAYJZ.js +1 -0
  64. package/browser/{chunk-4URCDOMP.js → chunk-PKBNMAQJ.js} +1 -1
  65. package/browser/{chunk-JHMFWXB4.js → chunk-PNFA7PN2.js} +1 -1
  66. package/browser/{chunk-YTTJDHQV.js → chunk-PRFGHN7L.js} +1 -1
  67. package/browser/{chunk-4RQXBHNU.js → chunk-RJBF3TIH.js} +1 -1
  68. package/browser/chunk-RRBTVPFV.js +1 -0
  69. package/browser/{chunk-PZWORCU2.js → chunk-S7MAZ5PQ.js} +1 -1
  70. package/browser/chunk-SCK76QV6.js +1 -0
  71. package/browser/chunk-SF7PCURW.js +1 -0
  72. package/browser/{chunk-SR3JKZ3U.js → chunk-TG75SVZ4.js} +1 -1
  73. package/browser/{chunk-IWORAUIR.js → chunk-TS6GGNWA.js} +1 -1
  74. package/browser/{chunk-5RSIAFID.js → chunk-TZMTC2HL.js} +1 -1
  75. package/browser/chunk-UAHCUD67.js +1 -0
  76. package/browser/chunk-UDA26TV3.js +1 -0
  77. package/browser/chunk-URX4BP67.js +1 -0
  78. package/browser/chunk-VHC775VZ.js +1 -0
  79. package/browser/chunk-VIDPCJ3F.js +1 -0
  80. package/browser/{chunk-RFEQZZ65.js → chunk-VYU454KQ.js} +1 -1
  81. package/browser/{chunk-J6XN2QQO.js → chunk-W6TYWCQH.js} +1 -1
  82. package/browser/{chunk-XG3WOI3P.js → chunk-WLSXA23B.js} +1 -1
  83. package/browser/{chunk-34XXAW4B.js → chunk-WN6IHVRI.js} +1 -1
  84. package/browser/{chunk-5ZZOXT2B.js → chunk-WQ5AIKDC.js} +1 -1
  85. package/browser/{chunk-FPE2L5B6.js → chunk-XBPK63K2.js} +1 -1
  86. package/browser/chunk-Y6K6VJYJ.js +1 -0
  87. package/browser/{chunk-6J2HD2IJ.js → chunk-ZU7FZEK3.js} +1 -1
  88. package/browser/index.html +1 -1
  89. package/browser/{main-INQHHK2Q.js → main-VRT323QR.js} +1 -1
  90. package/package.json +1 -1
  91. package/browser/chunk-5YY3K2H4.js +0 -1
  92. package/browser/chunk-EU6MUKDF.js +0 -1
  93. package/browser/chunk-FUVTYKQF.js +0 -1
  94. package/browser/chunk-GTY23DMS.js +0 -1
  95. package/browser/chunk-HMFECYUP.js +0 -1
  96. package/browser/chunk-HNNYFORJ.js +0 -1
  97. package/browser/chunk-IGOUE2XE.js +0 -1
  98. package/browser/chunk-J3CZ3MOZ.js +0 -1
  99. package/browser/chunk-JTM5UHB2.js +0 -1
  100. package/browser/chunk-KO4MDPCD.js +0 -1
  101. package/browser/chunk-KP7JXEQ6.js +0 -1
  102. package/browser/chunk-LN6ED2HF.js +0 -1
  103. package/browser/chunk-LT6BGRWZ.js +0 -1
  104. package/browser/chunk-OQBPCHYW.js +0 -1
  105. package/browser/chunk-P6D3VN2I.js +0 -1
  106. package/browser/chunk-PCPMONQV.js +0 -1
  107. package/browser/chunk-QWADOF7R.js +0 -1
  108. package/browser/chunk-RYEX2DR7.js +0 -5
  109. package/browser/chunk-S4E4KZRV.js +0 -1
  110. package/browser/chunk-SK7JAK5K.js +0 -1
  111. package/browser/chunk-TJUGTTPT.js +0 -1
  112. package/browser/chunk-TPZGV5NA.js +0 -1
  113. package/browser/chunk-YJA5A4XF.js +0 -1
  114. package/browser/chunk-ZTCAFSDX.js +0 -1
@@ -0,0 +1 @@
1
+ import{c as be}from"./chunk-W6TYWCQH.js";import{a as Ce}from"./chunk-BMUZTI7K.js";import{c as Ye}from"./chunk-EQXGFCI5.js";import{a as Ge}from"./chunk-VIDPCJ3F.js";import{a as ue,e as he,h as Ue}from"./chunk-G2BRVRGR.js";import{a as We,b as Be,c as je}from"./chunk-4F2LQOD7.js";import{a as X,c as _e}from"./chunk-7MQRVE7E.js";import{o as ge,t as Qe}from"./chunk-BGEXT3EN.js";import{a as Q,c as te}from"./chunk-IRZNRZ5Q.js";import{Ab as Me,Bb as S,D as ae,Db as f,Eb as V,F as re,Fb as c,Ga as Ne,Hc as ze,Jb as W,Ka as r,Kb as L,Kc as $e,Lb as q,Ma as le,Pb as de,Qb as me,Rb as O,S as U,Sb as Te,Tb as d,Ub as v,Uc as pe,Vb as F,Wa as P,Xb as Ae,Xc as He,Z as Oe,a as ne,ab as ce,b as oe,ca as x,cc as Ve,dc as Le,ec as qe,fc as Fe,ga as h,h as ie,ha as g,i as Pe,ic as ke,jb as ee,kb as Re,lb as p,lc as E,m as Y,ma as se,mb as _,oc as C,pa as Ie,pb as D,pc as u,qb as N,rb as M,sb as s,t as H,ta as y,tb as l,ua as G,ub as A,va as De,vb as T,wb as k,xb as K}from"./chunk-5J7BTB5J.js";var J=class o{caseController=x(he);cases=y([]);loadSubscription=null;loadCases(t){this.loadSubscription?.unsubscribe(),this.loadSubscription=this.caseController.listByParentCase(t).subscribe(e=>{this.cases.set(e),this.loadSubscription=null})}addCase(t){this.cases.update(e=>[t,...e])}updateCaseTitle(t,e){this.cases.update(n=>n.map(i=>i.id===t?oe(ne({},i),{title:e}):i))}static \u0275fac=function(e){return new(e||o)};static \u0275prov=Oe({token:o,factory:o.\u0275fac,providedIn:"root"})};var et=["promptItem"],Ke=(o,t)=>t.name;function tt(o,t){if(o&1&&(T(0,"span",5),d(1),k()),o&2){let e=t.$implicit;r(),Ae("","{","","{","",e.name,"","}","","}")}}function nt(o,t){if(o&1&&(T(0,"span",6),d(1),k()),o&2){let e=c().$implicit;r(),v(e.description)}}function ot(o,t){if(o&1){let e=S();T(0,"li",3,0),V("click",function(){let i=h(e).$implicit,a=c();return g(a.onItemClick(i))})("keydown.enter",function(){let i=h(e).$implicit,a=c();return g(a.onItemClick(i))})("mouseenter",function(){let i=h(e).$index,a=c();return g(a.activeIndex.set(i))}),T(2,"span",4),d(3),D(4,tt,2,5,"span",5,Ke),k(),p(6,nt,2,1,"span",6),k()}if(o&2){let e=t.$implicit,n=t.$index,i=c();O("prompt-autocomplete__item--active",i.isActive(n)),ee("aria-selected",i.isActive(n)),r(3),F(" /",e.name," "),r(),N(e.parameters),r(2),_(e.description?6:-1)}}var B=class o{prompts=u.required();selected=C();dismissed=C();activeIndex=y(0);itemRefs;ngOnChanges(t){t.prompts&&this.activeIndex.set(0)}navigate(t){let e=this.prompts();switch(t){case"ArrowDown":this.activeIndex.set(Math.min(this.activeIndex()+1,e.length-1)),this.scrollActiveIntoView();break;case"ArrowUp":this.activeIndex.set(Math.max(this.activeIndex()-1,0)),this.scrollActiveIntoView();break;case"Enter":{let n=e[this.activeIndex()];n&&this.selected.emit(n);break}case"Escape":this.dismissed.emit();break}}onItemClick(t){this.selected.emit(t)}isActive(t){return this.activeIndex()===t}completionFor(t){return`/${t.name} `}scrollActiveIntoView(){this.itemRefs?.toArray()?.[this.activeIndex()]?.nativeElement.scrollIntoView({block:"nearest"})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=P({type:o,selectors:[["agentos-prompt-autocomplete"]],viewQuery:function(e,n){if(e&1&&W(et,5),e&2){let i;L(i=q())&&(n.itemRefs=i)}},inputs:{prompts:[1,"prompts"]},outputs:{selected:"selected",dismissed:"dismissed"},features:[De],decls:3,vars:0,consts:[["promptItem",""],["role","listbox","aria-label","Slash commands",1,"prompt-autocomplete"],["role","option","tabindex","-1",1,"prompt-autocomplete__item",3,"prompt-autocomplete__item--active"],["role","option","tabindex","-1",1,"prompt-autocomplete__item",3,"click","keydown.enter","mouseenter"],[1,"prompt-autocomplete__name"],[1,"prompt-autocomplete__param"],[1,"prompt-autocomplete__description"]],template:function(e,n){e&1&&(T(0,"ul",1),D(1,ot,7,5,"li",2,Ke),k()),e&2&&(r(),N(n.prompts()))},styles:[".prompt-autocomplete[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;max-height:400px;width:100%;overflow-y:auto}.prompt-autocomplete[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px}.prompt-autocomplete[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:transparent}.prompt-autocomplete[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--color-border, rgba(0, 0, 0, .15));border-radius:4px}.prompt-autocomplete[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:var(--color-text-secondary, #6e6e73)}.prompt-autocomplete[_ngcontent-%COMP%]{display:grid;grid-template-columns:max-content 1fr}.prompt-autocomplete__item[_ngcontent-%COMP%]{grid-column:1/-1;display:grid;grid-template-columns:subgrid;align-items:center;cursor:pointer;transition:background .2s;border-left:3px solid transparent;padding:.5rem 0}.prompt-autocomplete__item[_ngcontent-%COMP%]:hover, .prompt-autocomplete__item--active[_ngcontent-%COMP%]{background:var(--color-bg-hover, rgba(0, 113, 227, .08))}.prompt-autocomplete__item--active[_ngcontent-%COMP%]{border-left-color:var(--color-primary, #007aff)}.prompt-autocomplete__name[_ngcontent-%COMP%]{font-weight:600;font-size:.95rem;color:var(--color-text, #1d1d1f);font-family:SF Mono,Monaco,Menlo,Cascadia Code,Consolas,monospace;white-space:nowrap;padding:0 1.5rem 0 .75rem;display:flex;align-items:center;gap:.4rem}.prompt-autocomplete__param[_ngcontent-%COMP%]{font-size:.85rem;font-family:SF Mono,Monaco,Menlo,Cascadia Code,Consolas,monospace;color:var(--color-text-secondary, #6e6e73);font-weight:400}.prompt-autocomplete__description[_ngcontent-%COMP%]{font-size:.85rem;color:var(--color-text-secondary, #6e6e73);line-height:1.3;padding:0 1rem 0 0}"],changeDetection:0})};var it=["composerInput"],at=["messagesContainer"],rt=(o,t)=>t.phaseIndex;function st(o,t){o&1&&(s(0,"div",4)(1,"p"),d(2,"No messages yet."),l()())}function lt(o,t){if(o&1&&(s(0,"div",19)(1,"span",22),d(2,"session context"),l(),s(3,"pre",23),d(4),qe(5,"json"),l()()),o&2){let e=c(2).$implicit;r(4),v(Fe(5,1,e.event.sessionContext))}}function ct(o,t){if(o&1&&(s(0,"div",18),p(1,lt,6,3,"div",19),s(2,"span",20),d(3),l(),A(4,"div",21),l()),o&2){let e=c().$implicit,n=c(2);O("case-chat__message--user",e.event.actor.role==="USER")("case-chat__message--agent",e.event.actor.role==="AGENT"),r(),_(n.showTechnical()&&e.event.sessionContext?1:-1),r(2),v(e.event.actor.displayName),r(),M("innerHTML",e.html,Ne)}}function dt(o,t){if(o&1&&(s(0,"div",15)(1,"span",20),d(2),l(),s(3,"p",24),d(4),l()()),o&2){let e=c().$implicit,n=c(2);r(2),v(n.agentDisplayName()),r(2),v(e.text)}}function mt(o,t){if(o&1&&(s(0,"div",29),d(1),l()),o&2){let e=c(3).$implicit;r(),v(e.item.detail)}}function pt(o,t){if(o&1){let e=S();s(0,"button",27),f("click",function(){h(e);let i=c(2).$implicit,a=c(2);return g(a.toggleTechnical(i.eventId))}),s(1,"span",26),d(2),l(),s(3,"span",28),d(4),l()(),p(5,mt,2,1,"div",29)}if(o&2){let e=c(2).$implicit,n=c(2);ee("aria-expanded",n.isTechnicalExpanded(e.eventId)),r(2),v(e.item.label),r(2),v(n.isTechnicalExpanded(e.eventId)?"\u25BC":"\u25B6"),r(),_(n.isTechnicalExpanded(e.eventId)?5:-1)}}function _t(o,t){if(o&1&&(s(0,"span",26),d(1),l()),o&2){let e=c(2).$implicit;r(),v(e.item.label)}}function ut(o,t){if(o&1&&(s(0,"div",25),p(1,pt,6,4)(2,_t,2,1,"span",26),l()),o&2){let e=c().$implicit;O("case-chat__technical--warn",e.item.type==="WarnEvent")("case-chat__technical--error",e.item.type==="ErrorEvent"),r(),_(e.item.detail?1:2)}}function ht(o,t){o&1&&d(0," \u23F3 ")}function gt(o,t){o&1&&d(0," \u2705 ")}function Ct(o,t){o&1&&d(0," \u274C ")}function bt(o,t){if(o&1&&(s(0,"div",46)(1,"span",47),d(2,"Enrichment content"),l(),s(3,"pre"),d(4),l()()),o&2){let e=c().$implicit;r(4),v(e.enrichmentContent)}}function ft(o,t){if(o&1&&(s(0,"div",42)(1,"div",43)(2,"span",44),d(3),l(),s(4,"span",45),d(5),l()(),s(6,"div",46)(7,"span",47),d(8,"Prompt"),l(),s(9,"pre"),d(10),l()(),s(11,"div",46)(12,"span",47),d(13,"LLM output"),l(),s(14,"pre"),d(15),l()(),p(16,bt,5,1,"div",46),l()),o&2){let e=t.$implicit;O("case-chat__enrichment-phase--failed",!e.success),r(3),F("Phase ",e.phaseIndex),r(2),v(e.success?"\u2705":"\u274C"),r(5),v(e.prompt),r(5),v(e.llmOutput),r(),_(e.enrichmentContent?16:-1)}}function vt(o,t){if(o&1&&(s(0,"div",36)(1,"span",38),d(2,"Enrichment phases"),l(),D(3,ft,17,7,"div",41,rt),l()),o&2){let e=c(3).$implicit;r(3),N(e.call.enrichmentPhases)}}function xt(o,t){if(o&1&&(s(0,"div",37)(1,"span",38),d(2,"Payload"),l(),s(3,"pre"),d(4),l()()),o&2){let e=c(3).$implicit;r(4),v(e.call.args)}}function yt(o,t){o&1&&(s(0,"pre"),d(1),l()),o&2&&(r(),v(t))}function wt(o,t){o&1&&(s(0,"span",39),d(1,"Running\u2026"),l())}function St(o,t){o&1&&(s(0,"span",40),d(1,"No output"),l())}function Mt(o,t){if(o&1&&(s(0,"div",35),p(1,vt,5,0,"div",36),p(2,xt,5,1,"div",37),s(3,"div",37)(4,"span",38),d(5,"Output"),l(),p(6,yt,2,1,"pre")(7,wt,2,0,"span",39)(8,St,2,0,"span",40),l()()),o&2){let e,n=c(2).$implicit,i=c(2);r(),_(i.showTechnical()&&(n.call.enrichmentPhases!=null&&n.call.enrichmentPhases.length)?1:-1),r(),_(n.call.args?2:-1),r(4),_((e=i.extractToolOutput(n.call))?6:n.call.response?8:7,e)}}function Tt(o,t){if(o&1){let e=S();s(0,"div",30)(1,"button",31),f("click",function(){h(e);let i=c().$implicit,a=c(2);return g(a.toggleToolCall(i.call.requestId))}),s(2,"span",32),p(3,ht,1,0)(4,gt,1,0)(5,Ct,1,0),l(),s(6,"span",33),d(7),l(),s(8,"span",34),d(9),l()(),p(10,Mt,9,3,"div",35),l()}if(o&2){let e=c().$implicit,n=c(2);O("case-chat__tool-call--pending",!e.call.response)("case-chat__tool-call--success",(e.call.response==null?null:e.call.response.success)===!0)("case-chat__tool-call--error",(e.call.response==null?null:e.call.response.success)===!1),r(),ee("aria-expanded",n.isToolCallExpanded(e.call.requestId)),r(2),_(e.call.response?e.call.response.success?4:5:3),r(4),v(e.call.toolName),r(2),v(n.isToolCallExpanded(e.call.requestId)?"\u25BC":"\u25B6"),r(),_(n.isToolCallExpanded(e.call.requestId)?10:-1)}}function kt(o,t){if(o&1&&p(0,ct,5,7,"div",14)(1,dt,5,2,"div",15)(2,ut,3,5,"div",16)(3,Tt,11,11,"div",17),o&2){let e=t.$implicit;_(e.kind==="message"?0:e.kind==="streaming"?1:e.kind==="technical"?2:3)}}function Et(o,t){if(o&1&&D(0,kt,4,1,null,null,Re().trackTimelineItem,!0),o&2){let e=c();N(e.timeline())}}function Pt(o,t){o&1&&(s(0,"div",5),A(1,"span",48)(2,"span",48)(3,"span",48),l())}function Ot(o,t){if(o&1){let e=S();s(0,"div",6)(1,"ds-icon-button",49),f("action",function(){h(e);let i=c();return g(i.onScrollToBottomClick())}),l()()}}function It(o,t){if(o&1){let e=S();s(0,"div",8)(1,"agentos-prompt-autocomplete",50),f("selected",function(i){h(e);let a=c();return g(a.onPromptSelected(i))})("dismissed",function(){h(e);let i=c();return g(i.closeAutocomplete())}),l()()}if(o&2){let e=c();r(),M("prompts",e.slashSuggestions())}}function Dt(o,t){if(o&1){let e=S();s(0,"ds-icon-button",51),f("action",function(){h(e);let i=c();return g(i.interrupt())}),l()}}function Nt(o,t){if(o&1){let e=S();s(0,"ds-icon-button",52),f("action",function(){h(e);let i=c();return g(i.submit())}),l()}if(o&2){let e=c();M("title",e.preferences.composerHint())("disabled",!e.canSend)}}var Rt=64,fe=class o{route=x(X);http=x(pe);zone=x(Ie);destroyRef=x(se);domSanitizer=x(He);config=x(ue);preferences=x(be);caseState=x(J);promptState=x(Ce);caseId=this.route.snapshot.queryParams.case;namespaceId=this.route.snapshot.queryParams.ns;markdownRenderer=this.buildMarkdownRenderer();agentDisplayName=E(()=>{let t=this.events();for(let e=t.length-1;e>=0;e--){let n=t[e];if(n){if(n.type==="AgentRunningEvent"||n.type==="AgentSelectedEvent"||n.type==="AgentFinishedEvent"){let i=n.agentName;if(i&&i.trim().length>0)return i}if(n.type==="MessageEvent"&&n.actor.role==="AGENT"&&n.actor.displayName)return n.actor.displayName}}return"Assistant"});eventSource=null;composerInput;messagesContainer;autocompleteRef;events=y([]);messageHtmlCache=new Map;inputValue=y("");isRunning=y(!1);isTerminal=y(!1);effectivePrompts=[];promptsLoaded=!1;slashPrefix$=new ie;slashSuggestions=y([]);static SHOW_TECHNICAL_KEY="agentos.case-chat.showTechnical";showTechnical=y(localStorage.getItem(o.SHOW_TECHNICAL_KEY)==="true");showTechnicalOverride=u(!1);streamingText=y("");collapsedTools=y(new Set);expandedTechnicals=y(new Set);isAtBottom=y(!0);scrollListenerCleanup=null;constructor(){this.slashPrefix$.pipe(re(60),U(t=>(this.promptsLoaded?Y(this.effectivePrompts):this.promptState.listEffective(this.namespaceId).pipe(ae(()=>Y([])))).pipe(H(n=>({prefix:t,prompts:n})))),Q(this.destroyRef)).subscribe(({prefix:t,prompts:e})=>{this.effectivePrompts=e,this.promptsLoaded=!0,this.slashSuggestions.set(e.filter(n=>n.name.toLowerCase().startsWith(t.toLowerCase())))}),G(()=>{this.showTechnical.set(this.showTechnicalOverride())}),G(()=>{this.isRunning()||this.isTerminal()||queueMicrotask(()=>this.composerInput?.nativeElement.focus())}),G(()=>{this.timeline(),this.streamingText(),this.isAtBottom()&&queueMicrotask(()=>this.scrollToBottom())}),le(()=>{this.attachScrollListener()})}baseTimeline=E(()=>{let t=this.events(),e=this.showTechnical(),n=new Map;for(let w of t)if(w.type==="ToolRequestEvent"){let m=w,b=m.toolRequestId??w.id,R=n.get(b);n.set(b,{requestId:b,toolName:m.toolName??"unknown",args:m.args??null,response:R?.response,enrichmentPhases:m.enrichmentPhases??null})}else if(w.type==="ToolResponseEvent"){let m=w,b=m.toolRequestId??w.id,R=n.get(b);n.set(b,{requestId:b,toolName:R?.toolName??m.toolName??"unknown",args:R?.args??null,response:m,enrichmentPhases:R?.enrichmentPhases??null})}let i=[],a=new Set;for(let w of t)if(w.type==="MessageEvent"){let m=w;i.push({kind:"message",event:m,html:this.messageHtmlCache.get(w.id)??""})}else if(w.type==="ToolRequestEvent"||w.type==="ToolResponseEvent"){let m=w.toolRequestId??w.id;a.has(m)||(a.add(m),i.push({kind:"tool",call:n.get(m)}))}else if(e){let m=this.toTechnicalItem(w);m&&i.push({kind:"technical",item:m,eventId:w.id})}return i});timeline=E(()=>{let t=this.baseTimeline(),e=this.streamingText();return e.trim().length===0?t:[...t,{kind:"streaming",text:e}]});trackTimelineItem(t,e){switch(e.kind){case"message":return e.event.id;case"tool":return e.call.requestId;case"technical":return e.eventId;case"streaming":return"streaming"}}get canSend(){return!!this.inputValue().trim()&&!this.isRunning()&&!this.isTerminal()}ngOnInit(){this.connectSse(),this.route.queryParams.pipe(Q(this.destroyRef)).subscribe(t=>{let e=t.case;e&&e!==this.caseId&&(this.caseId=e,this.reinitialise())})}ngOnDestroy(){this.eventSource?.close(),this.scrollListenerCleanup?.()}attachScrollListener(){let t=this.messagesContainer?.nativeElement;if(!t)return;let e=()=>{let n=t.scrollHeight-t.scrollTop-t.clientHeight;this.isAtBottom.set(n<=Rt)};t.addEventListener("scroll",e,{passive:!0}),this.scrollListenerCleanup=()=>t.removeEventListener("scroll",e)}scrollToBottom(){let t=this.messagesContainer?.nativeElement;t&&(t.scrollTop=t.scrollHeight)}onScrollToBottomClick(){this.isAtBottom.set(!0),this.scrollToBottom()}connectSse(){let t=`${this.config.basePath}/api/cases/${this.caseId}/events`;console.log("[AgentOS SSE] connecting",{url:t,basePath:this.config.basePath,caseId:this.caseId,namespaceId:this.namespaceId,now:new Date().toISOString()}),this.eventSource=this.zone.runOutsideAngular(()=>new EventSource(t));let e=i=>{let a=performance.now(),w=i.type,m=i.data;console.log("[AgentOS SSE] frame received",{sseEventName:w,dataLength:m?.length??0,dataPreview:m?.slice(0,120),receivedAtMs:a});try{let b=JSON.parse(m);this.zone.run(()=>{let R=this.events().length;if(b.type==="MessageEvent"){let I=b,$=this.extractText(I);this.messageHtmlCache.has(b.id)||this.messageHtmlCache.set(b.id,this.renderMarkdown($))}this.events.update(I=>I.some($=>$.id===b.id)?I:[...I,b]);let Ze=this.events().length;if(console.log("[AgentOS SSE] event processed",{sseEventName:w,eventType:b.type,eventId:b.id,beforeLen:R,afterLen:Ze,running:this.isRunning(),terminal:this.isTerminal()}),b.type==="TextChunkEvent"){let I=b.chunk;I&&this.streamingText.update($=>$+I);return}if(b.type==="CaseUpdatedEvent"){let I=b;I.title&&this.caseState.updateCaseTitle(b.caseId,I.title);return}if(b.type==="CaseStatusEvent"){let I=b.status,$=I==="KILLED"||I==="ERROR";if(this.isTerminal.set($),$)this.isRunning.set(!1),this.eventSource?.close(),this.eventSource=null;else{let Ee=I==="RUNNING";this.isRunning.set(Ee),Ee||this.streamingText.set("")}return}if(b.type==="AgentFinishedEvent"){this.isRunning.set(!1),this.streamingText.set("");return}})}catch(b){console.warn("[AgentOS SSE] failed to parse event data",{sseEventName:w,error:b,dataPreview:m?.slice(0,500)})}},n=["MessageEvent","CaseStatusEvent","CaseUpdatedEvent","AgentSelectedEvent","AgentRunningEvent","AgentFinishedEvent","ThinkingEvent","TextChunkEvent","ToolRequestEvent","ToolResponseEvent","PendingConfirmationEvent","ConfirmationResolvedEvent","ErrorEvent","WarnEvent","IntentionGeneratedEvent"];for(let i of n)console.log("[AgentOS SSE] addEventListener",i),this.eventSource.addEventListener(i,e);this.eventSource.onopen=()=>{console.log("[AgentOS SSE] connection open",{readyState:this.eventSource?.readyState,at:new Date().toISOString()})},this.eventSource.onmessage=i=>{console.log("[AgentOS SSE] onmessage (unnamed event) received",{dataLength:i.data?.length??0,dataPreview:i.data?.slice(0,120)})},this.eventSource.onerror=i=>{console.warn("[AgentOS SSE] connection error",{err:i,readyState:this.eventSource?.readyState,at:new Date().toISOString()}),this.zone.run(()=>{this.isRunning.set(!1)})}}onInput(t){let e=t.target.value;this.inputValue.set(e),this.updateSlashAutocomplete(e)}onKeydown(t){if(this.slashSuggestions().length>0){if(t.key==="ArrowDown"||t.key==="ArrowUp"){t.preventDefault(),this.autocompleteRef?.navigate(t.key);return}if(t.key==="Escape"){t.preventDefault(),this.closeAutocomplete();return}if(t.key==="Tab"||t.key==="Enter"){t.preventDefault(),this.autocompleteRef?.navigate("Enter");return}}this.preferences.shouldSend(t)&&(t.preventDefault(),this.submit())}onPromptSelected(t){let e=this.autocompleteRef?.completionFor(t)??`/${t.name} `;this.inputValue.set(e),queueMicrotask(()=>{let n=this.composerInput?.nativeElement;n&&(n.value=e,n.setSelectionRange(e.length,e.length),n.focus())}),this.closeAutocomplete()}closeAutocomplete(){this.slashSuggestions.set([])}updateSlashAutocomplete(t){if(!t.startsWith("/")){this.slashSuggestions().length&&this.slashSuggestions.set([]);return}let e=t.slice(1);if(e.includes(" ")){this.slashSuggestions().length&&this.slashSuggestions.set([]);return}this.promptsLoaded&&this.slashSuggestions.set(this.effectivePrompts.filter(n=>n.name.toLowerCase().startsWith(e.toLowerCase()))),this.slashPrefix$.next(e)}reinitialise(){this.eventSource?.close(),this.eventSource=null,this.events.set([]),this.messageHtmlCache.clear(),this.inputValue.set(""),this.isRunning.set(!1),this.isTerminal.set(!1),this.streamingText.set(""),this.collapsedTools.set(new Set),this.isAtBottom.set(!0),this.slashSuggestions.set([]),this.effectivePrompts=[],this.promptsLoaded=!1,this.connectSse()}submit(){if(!this.canSend)return;let t=this.inputValue().trim();this.inputValue.set(""),this.sendMessage(t)}sendMessage(t){this.isRunning.set(!0),this.streamingText.set(""),this.http.post(`${this.config.basePath}/api/cases/${this.caseId}/messages`,{content:t,userId:"default-user"}).subscribe({error:e=>{console.error("[CaseChat] Failed to send message",e),this.isRunning.set(!1)}})}interrupt(){this.http.post(`${this.config.basePath}/api/cases/${this.caseId}/interrupt`,{}).subscribe({error:t=>console.error("[CaseChat] Failed to interrupt case",t)})}kill(){this.http.post(`${this.config.basePath}/api/cases/${this.caseId}/kill`,{}).subscribe({error:t=>console.error("[CaseChat] Failed to kill case",t)})}extractText(t){return t.content?.filter(e=>"content"in e).map(e=>e.content).join("")??""}extractToolOutput(t){if(!t.response)return null;let e=t.response.output;return e?e.content??null:null}toggleToolCall(t){this.collapsedTools.update(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})}isToolCallExpanded(t){return this.collapsedTools().has(t)}toggleShowTechnical(){this.showTechnical.update(t=>{let e=!t;return localStorage.setItem(o.SHOW_TECHNICAL_KEY,String(e)),e})}toggleTechnical(t){this.expandedTechnicals.update(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})}isTechnicalExpanded(t){return this.expandedTechnicals().has(t)}renderMarkdown(t){if(!t)return"";let e=Be.parse(t,{renderer:this.markdownRenderer,breaks:!0,gfm:!0,async:!1}),n=je.sanitize(e,{ADD_TAGS:["span"],ADD_ATTR:["aria-hidden","aria-label","target","rel"],ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))/i});return this.domSanitizer.bypassSecurityTrustHtml(n)}buildMarkdownRenderer(){let t=new We,e=t.link.bind(t);return t.link=n=>{let i=e(n);return this.isExternalLink(n.href)&&(i=i.replace("<a ",'<a target="_blank" rel="noopener noreferrer" ').replace("</a>",'<span class="external-link-icon" aria-hidden="true">\u2197</span></a>')),i},t}isExternalLink(t){if(!t||t.startsWith("/")||t.startsWith("#")||t.startsWith("?"))return!1;if(t.startsWith("//"))return!0;try{return new URL(t,window.location.href).hostname!==window.location.hostname}catch(e){return!1}}toTechnicalItem(t){switch(t.type){case"WarnEvent":return{type:"WarnEvent",label:"\u26A0\uFE0F Warn",detail:t.message};case"ErrorEvent":return{type:"ErrorEvent",label:"\u274C Error",detail:t.message};case"CaseStatusEvent":return{type:"CaseStatusEvent",label:`\u{1F7E1} Status: ${t.status}`};case"AgentRunningEvent":return{type:"AgentRunningEvent",label:`\u25B6\uFE0F Agent running: ${t.agentName}`};case"AgentFinishedEvent":return{type:"AgentFinishedEvent",label:`\u2705 Agent finished: ${t.agentName}`};case"AgentSelectedEvent":return{type:"AgentSelectedEvent",label:`\u{1F3AF} Agent selected: ${t.agentName}`};case"IntentionGeneratedEvent":{let e=t;return{type:"IntentionGeneratedEvent",label:`\u{1F9E0} Intention \u2192 ${e.toolName}`,detail:e.intention}}default:return null}}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=P({type:o,selectors:[["agentos-case-chat"]],viewQuery:function(e,n){if(e&1&&W(it,5)(at,5)(B,5),e&2){let i;L(i=q())&&(n.composerInput=i.first),L(i=q())&&(n.messagesContainer=i.first),L(i=q())&&(n.autocompleteRef=i.first)}},inputs:{showTechnicalOverride:[1,"showTechnicalOverride"]},decls:15,vars:8,consts:[["messagesContainer",""],["composerInput",""],[1,"case-chat"],[1,"case-chat__messages"],[1,"case-chat__empty"],[1,"case-chat__thinking"],[1,"case-chat__scroll-anchor"],[1,"case-chat__composer"],[1,"case-chat__autocomplete"],["placeholder","Reply\u2026","rows","3",1,"case-chat__input",3,"input","keydown","value","disabled"],[1,"case-chat__actions"],["icon","stop","variant","danger","title","Interrupt"],["icon","send","variant","primary",3,"title","disabled"],["icon","cancel","variant","danger","title","Kill",3,"action","disabled"],[1,"case-chat__message",3,"case-chat__message--user","case-chat__message--agent"],[1,"case-chat__message","case-chat__message--agent","case-chat__message--streaming"],[1,"case-chat__technical",3,"case-chat__technical--warn","case-chat__technical--error"],[1,"case-chat__tool-call",3,"case-chat__tool-call--pending","case-chat__tool-call--success","case-chat__tool-call--error"],[1,"case-chat__message"],[1,"case-chat__session-context"],[1,"case-chat__message-author"],[1,"case-chat__message-text","case-chat__message-text--markdown",3,"innerHTML"],[1,"case-chat__session-context-label"],[1,"case-chat__session-context-body"],[1,"case-chat__message-text"],[1,"case-chat__technical"],[1,"case-chat__technical-label"],["type","button",1,"case-chat__technical-header",3,"click"],[1,"case-chat__technical-chevron"],[1,"case-chat__technical-body"],[1,"case-chat__tool-call"],["type","button",1,"case-chat__tool-call-header",3,"click"],[1,"case-chat__tool-call-icon"],[1,"case-chat__tool-call-name"],[1,"case-chat__tool-call-chevron"],[1,"case-chat__tool-call-output"],[1,"case-chat__tool-call-section","case-chat__enrichment-section"],[1,"case-chat__tool-call-section"],[1,"case-chat__tool-call-label"],[1,"case-chat__tool-call-pending"],[1,"case-chat__tool-call-empty"],[1,"case-chat__enrichment-phase",3,"case-chat__enrichment-phase--failed"],[1,"case-chat__enrichment-phase"],[1,"case-chat__enrichment-phase-header"],[1,"case-chat__enrichment-phase-index"],[1,"case-chat__enrichment-phase-status"],[1,"case-chat__enrichment-phase-row"],[1,"case-chat__enrichment-phase-label"],[1,"thinking-dot"],["icon","keyboard_arrow_down","variant","default","title","Scroll to bottom",3,"action"],[3,"selected","dismissed","prompts"],["icon","stop","variant","danger","title","Interrupt",3,"action"],["icon","send","variant","primary",3,"action","title","disabled"]],template:function(e,n){e&1&&(s(0,"div",2)(1,"div",3,0),p(3,st,3,0,"div",4)(4,Et,2,0),p(5,Pt,4,0,"div",5),l(),p(6,Ot,2,0,"div",6),s(7,"div",7),p(8,It,2,1,"div",8),s(9,"textarea",9,1),f("input",function(a){return n.onInput(a)})("keydown",function(a){return n.onKeydown(a)}),l(),s(11,"div",10),p(12,Dt,1,0,"ds-icon-button",11)(13,Nt,1,2,"ds-icon-button",12),s(14,"ds-icon-button",13),f("action",function(){return n.kill()}),l()()()()),e&2&&(r(3),_(n.timeline().length===0?3:4),r(2),_(n.isRunning()?5:-1),r(),_(n.isAtBottom()?-1:6),r(2),_(n.slashSuggestions().length>0?8:-1),r(),M("value",n.inputValue())("disabled",n.isRunning()||n.isTerminal()),r(3),_(n.isRunning()?12:13),r(2),M("disabled",n.isTerminal()))},dependencies:[ge,B,$e],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}.case-chat[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;max-width:800px;width:100%;margin:0 auto;padding:1.5rem;gap:1rem;position:relative}.case-chat__messages[_ngcontent-%COMP%]{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:.75rem;padding-bottom:.5rem;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:var(--color-border, rgba(0, 0, 0, .15)) transparent}.case-chat__empty[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex:1}.case-chat__empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.case-chat__tool-calls[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.4rem;margin-top:.25rem}.case-chat__tool-call[_ngcontent-%COMP%]{flex-shrink:0;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--glass-bg, rgba(255, 255, 255, .72));font-size:.8rem;overflow:hidden;transition:border-color .2s ease}.case-chat__tool-call--pending[_ngcontent-%COMP%]{border-color:var(--color-warning, #f5a623);opacity:.8}.case-chat__tool-call--success[_ngcontent-%COMP%]{border-color:var(--color-success, #34c759)}.case-chat__tool-call--error[_ngcontent-%COMP%]{border-color:var(--color-error, #ff3b30)}.case-chat__tool-call-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.4rem;width:100%;padding:.4rem .6rem;background:transparent;border:none;cursor:pointer;text-align:left;color:var(--color-text, #1d1d1f);font-family:inherit;font-size:.8rem}.case-chat__tool-call-header[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04))}.case-chat__tool-call-icon[_ngcontent-%COMP%]{flex-shrink:0;font-size:.75rem}.case-chat__tool-call-name[_ngcontent-%COMP%]{font-weight:600;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);color:var(--color-primary, #0071e3);flex-shrink:0}.case-chat__tool-call-args[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.case-chat__tool-call-chevron[_ngcontent-%COMP%]{flex-shrink:0;font-size:.6rem;color:var(--color-text-secondary, #6e6e73);margin-left:auto}.case-chat__tool-call-output[_ngcontent-%COMP%]{border-top:1px solid var(--color-border, rgba(0, 0, 0, .08));display:flex;flex-direction:column}.case-chat__tool-call-section[_ngcontent-%COMP%]{padding:.4rem .6rem .5rem}.case-chat__tool-call-section[_ngcontent-%COMP%] + .case-chat__tool-call-section[_ngcontent-%COMP%]{border-top:1px solid var(--color-border, rgba(0, 0, 0, .06))}.case-chat__tool-call-section[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:.25rem 0 0;white-space:pre-wrap;word-break:break-all;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.75rem;color:var(--color-text, #1d1d1f);max-height:200px;overflow-y:auto}.case-chat__tool-call-label[_ngcontent-%COMP%]{display:block;font-size:.65rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--color-text-secondary, #6e6e73)}.case-chat__enrichment-section[_ngcontent-%COMP%]{background:var(--color-surface-secondary, rgba(0, 0, 0, .02))}.case-chat__enrichment-phase[_ngcontent-%COMP%]{margin-top:.35rem;border-radius:4px;border:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--glass-bg, rgba(255, 255, 255, .6));overflow:hidden}.case-chat__enrichment-phase--failed[_ngcontent-%COMP%]{border-color:var(--color-error, #ff3b30);background:#ff3b300a}.case-chat__enrichment-phase-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:.2rem .5rem;background:var(--color-surface-secondary, rgba(0, 0, 0, .03));border-bottom:1px solid var(--color-border, rgba(0, 0, 0, .06))}.case-chat__enrichment-phase-index[_ngcontent-%COMP%]{font-weight:600;font-size:.7rem;text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-secondary, #6e6e73)}.case-chat__enrichment-phase-status[_ngcontent-%COMP%]{font-size:.7rem}.case-chat__enrichment-phase-row[_ngcontent-%COMP%]{padding:.25rem .5rem}.case-chat__enrichment-phase-row[_ngcontent-%COMP%] + .case-chat__enrichment-phase-row[_ngcontent-%COMP%]{border-top:1px solid var(--color-border, rgba(0, 0, 0, .04))}.case-chat__enrichment-phase-row[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:.15rem 0 0;white-space:pre-wrap;word-break:break-all;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.7rem;color:var(--color-text, #1d1d1f);max-height:150px;overflow-y:auto}.case-chat__enrichment-phase-label[_ngcontent-%COMP%]{display:block;font-size:.6rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-secondary, #6e6e73)}.case-chat__tool-call-pending[_ngcontent-%COMP%], .case-chat__tool-call-empty[_ngcontent-%COMP%]{display:block;margin-top:.25rem;color:var(--color-text-secondary, #6e6e73);font-style:italic;font-size:.75rem}.case-chat__technical[_ngcontent-%COMP%]{flex-shrink:0;border-radius:6px;background:var(--color-surface-secondary, rgba(0, 0, 0, .03));border-left:3px solid var(--color-border, rgba(0, 0, 0, .12));font-size:.78rem;color:var(--color-text-secondary, #6e6e73);overflow:hidden}.case-chat__technical--warn[_ngcontent-%COMP%]{border-left-color:var(--color-warning, #f5a623);background:#f5a6230f;color:var(--color-text, #1d1d1f)}.case-chat__technical--error[_ngcontent-%COMP%]{border-left-color:var(--color-error, #ff3b30);background:#ff3b300f;color:var(--color-text, #1d1d1f)}.case-chat__technical-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:100%;padding:.2rem .75rem;background:transparent;border:none;cursor:pointer;text-align:left;color:inherit;font-family:inherit;font-size:inherit}.case-chat__technical-header[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04))}.case-chat__technical-label[_ngcontent-%COMP%]{font-weight:500;white-space:nowrap}.case-chat__technical-label[_ngcontent-%COMP%]:only-child{display:block;padding:.2rem .75rem}.case-chat__technical-chevron[_ngcontent-%COMP%]{flex-shrink:0;font-size:.6rem;color:var(--color-text-secondary, #6e6e73);margin-left:auto}.case-chat__technical-body[_ngcontent-%COMP%]{padding:.3rem .75rem .5rem;border-top:1px solid var(--color-border, rgba(0, 0, 0, .08));white-space:pre-wrap;word-break:break-word;font-size:.75rem;line-height:1.5;color:var(--color-text, #1d1d1f)}.case-chat__session-context[_ngcontent-%COMP%]{flex-shrink:0;border-radius:6px;background:var(--color-surface-secondary, rgba(0, 0, 0, .03));border-left:3px solid var(--color-primary, #0071e3);padding:.25rem .75rem .4rem;margin-bottom:.25rem;font-size:.75rem;color:var(--color-text-secondary, #6e6e73);overflow:hidden}.case-chat__session-context-label[_ngcontent-%COMP%]{display:block;font-size:.65rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--color-primary, #0071e3);margin-bottom:.2rem}.case-chat__session-context-body[_ngcontent-%COMP%]{margin:0;white-space:pre-wrap;word-break:break-all;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.75rem;color:var(--color-text, #1d1d1f);max-height:160px;overflow-y:auto}.case-chat__message[_ngcontent-%COMP%]{flex-shrink:0}.case-chat__thinking[_ngcontent-%COMP%]{flex-shrink:0;display:flex;gap:.3rem;padding:.75rem 1rem;align-self:flex-start}.case-chat__message-text--markdown[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 .5em}.case-chat__message-text--markdown[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:last-child{margin-bottom:0}.case-chat__message-text--markdown[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] ol[_ngcontent-%COMP%]{margin:.25em 0 .5em;padding-left:1.4em}.case-chat__message-text--markdown[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-bottom:.2em}.case-chat__message-text--markdown[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.85em;background:var(--color-code-bg, rgba(0, 0, 0, .06));border-radius:3px;padding:.1em .35em}.case-chat__message-text--markdown[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(0, 0, 0, .06));border-radius:6px;padding:.6em .8em;overflow-x:auto;margin:.4em 0}.case-chat__message-text--markdown[_ngcontent-%COMP%] pre[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:none;padding:0;font-size:.8rem}.case-chat__message-text--markdown[_ngcontent-%COMP%] blockquote[_ngcontent-%COMP%]{margin:.4em 0;padding-left:.8em;border-left:3px solid var(--color-border, rgba(0, 0, 0, .15));color:var(--color-text-secondary, #6e6e73)}.case-chat__message-text--markdown[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--color-primary, #0071e3);text-decoration:underline}.case-chat__message-text--markdown[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:.5em 0 .25em;font-size:1em;font-weight:600}.case-chat__message-text--markdown[_ngcontent-%COMP%] .external-link-icon[_ngcontent-%COMP%]{font-size:.75em;margin-left:.15em;vertical-align:super}.case-chat__message--streaming[_ngcontent-%COMP%]{opacity:.95}.case-chat__scroll-anchor[_ngcontent-%COMP%]{position:absolute;bottom:calc(2rem + 80px);left:50%;transform:translate(-50%);z-index:10;background:var(--glass-bg, rgba(255, 255, 255, .88));border:1px solid var(--glass-border, rgba(255, 255, 255, .3));backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-radius:50%;box-shadow:0 2px 12px var(--color-shadow, rgba(0, 0, 0, .12));animation:_ngcontent-%COMP%_scroll-anchor-in .15s ease}.case-chat__autocomplete[_ngcontent-%COMP%]{position:absolute;bottom:calc(100% + .5rem);left:0;right:0;background:var(--glass-bg, rgba(255, 255, 255, .96));border:1px solid var(--color-border, rgba(0, 0, 0, .1));backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);border-radius:12px;box-shadow:0 8px 32px #00000026;z-index:20;animation:_ngcontent-%COMP%_autocomplete-in .12s ease}.case-chat__composer[_ngcontent-%COMP%]{flex-shrink:0;position:relative;display:flex;align-items:flex-end;gap:.5rem;background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:16px;padding:.5rem .5rem .5rem 1rem}.case-chat__input[_ngcontent-%COMP%]{flex:1;resize:none;padding:.5rem 0;border:none;background:transparent;color:var(--color-text, #1d1d1f);font-size:.95rem;font-family:inherit;line-height:1.5;outline:none;min-height:40px}.case-chat__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.case-chat__input[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.case-chat__actions[_ngcontent-%COMP%]{display:flex;align-items:center;flex-shrink:0}.thinking-dot[_ngcontent-%COMP%]{width:8px;height:8px;border-radius:50%;background:var(--color-text-secondary, #6e6e73);animation:_ngcontent-%COMP%_thinking-bounce 1.2s ease-in-out infinite}.thinking-dot[_ngcontent-%COMP%]:nth-child(2){animation-delay:.2s}.thinking-dot[_ngcontent-%COMP%]:nth-child(3){animation-delay:.4s}@keyframes _ngcontent-%COMP%_thinking-bounce{0%,80%,to{transform:translateY(0);opacity:.4}40%{transform:translateY(-6px);opacity:1}}@keyframes _ngcontent-%COMP%_scroll-anchor-in{0%{opacity:0;transform:translate(-50%) translateY(8px)}to{opacity:1;transform:translate(-50%) translateY(0)}}@keyframes _ngcontent-%COMP%_autocomplete-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}']})};var At=["composerInput"];function Vt(o,t){if(o&1){let e=S();s(0,"div",5)(1,"agentos-prompt-autocomplete",10),f("selected",function(i){h(e);let a=c();return g(a.onPromptSelected(i))})("dismissed",function(){h(e);let i=c();return g(i.closeAutocomplete())}),l()()}if(o&2){let e=c();r(),M("prompts",e.slashSuggestions())}}var ve=class o{http=x(pe);router=x(_e);route=x(X);config=x(ue);caseState=x(J);destroyRef=x(se);preferences=x(be);promptState=x(Ce);composerInput;autocompleteRef;namespaceId=this.route.snapshot.queryParams.ns;inputValue=y("");isCreating=y(!1);effectivePrompts=[];promptsLoaded=!1;slashPrefix$=new ie;slashSuggestions=y([]);ngOnInit(){this.route.queryParams.pipe(Q(this.destroyRef)).subscribe(t=>{let e=t.ns;e&&e!==this.namespaceId&&(this.namespaceId=e,this.effectivePrompts=[],this.promptsLoaded=!1,this.slashSuggestions.set([]),this.inputValue.set(""))})}constructor(){le(()=>{this.composerInput?.nativeElement.focus()}),this.slashPrefix$.pipe(re(60),U(t=>(this.promptsLoaded?Y(this.effectivePrompts):this.promptState.listEffective(this.namespaceId).pipe(ae(()=>Y([])))).pipe(H(n=>({prefix:t,prompts:n})))),Q(this.destroyRef)).subscribe(({prefix:t,prompts:e})=>{this.effectivePrompts=e,this.promptsLoaded=!0,this.slashSuggestions.set(e.filter(n=>n.name.toLowerCase().startsWith(t.toLowerCase())))})}get canSend(){return!!this.inputValue().trim()&&!this.isCreating()}onInput(t){let e=t.target.value;this.inputValue.set(e),this.updateSlashAutocomplete(e)}onKeydown(t){if(this.slashSuggestions().length>0){if(t.key==="ArrowDown"||t.key==="ArrowUp"){t.preventDefault(),this.autocompleteRef?.navigate(t.key);return}if(t.key==="Escape"){t.preventDefault(),this.closeAutocomplete();return}if(t.key==="Tab"||t.key==="Enter"){t.preventDefault(),this.autocompleteRef?.navigate("Enter");return}}this.preferences.shouldSend(t)&&(t.preventDefault(),this.submit())}onPromptSelected(t){let e=this.autocompleteRef?.completionFor(t)??`/${t.name} `;this.inputValue.set(e),queueMicrotask(()=>{let n=this.composerInput?.nativeElement;n&&(n.value=e,n.setSelectionRange(e.length,e.length),n.focus())}),this.closeAutocomplete()}closeAutocomplete(){this.slashSuggestions.set([])}updateSlashAutocomplete(t){if(!t.startsWith("/")){this.slashSuggestions().length&&this.slashSuggestions.set([]);return}let e=t.slice(1);if(e.includes(" ")){this.slashSuggestions().length&&this.slashSuggestions.set([]);return}this.promptsLoaded&&this.slashSuggestions.set(this.effectivePrompts.filter(n=>n.name.toLowerCase().startsWith(e.toLowerCase()))),this.slashPrefix$.next(e)}submit(){if(!this.canSend)return;let t=this.inputValue().trim();this.inputValue.set(""),this.isCreating.set(!0),this.http.post(`${this.config.basePath}/api/cases`,{namespaceId:this.namespaceId,metadata:{}}).pipe(U(e=>(this.caseState.addCase(e),this.http.post(`${this.config.basePath}/api/cases/${e.id}/messages`,{content:t,userId:"default-user"}).pipe(H(()=>e)))),Q(this.destroyRef)).subscribe({next:e=>{this.router.navigate(["/agentos/home"],{queryParams:{ns:this.namespaceId,case:e.id??""}})},error:e=>{console.error("[CaseHome] Failed to create case or send first message",e),this.isCreating.set(!1),this.inputValue.set(t)}})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=P({type:o,selectors:[["agentos-case-home"]],viewQuery:function(e,n){if(e&1&&W(At,5)(B,5),e&2){let i;L(i=q())&&(n.composerInput=i.first),L(i=q())&&(n.autocompleteRef=i.first)}},decls:12,vars:5,consts:[["composerInput",""],[1,"case-home"],[1,"case-home__hero"],[1,"case-home__headline"],[1,"case-home__composer"],[1,"case-home__autocomplete"],["placeholder","Describe your task or ask a question\u2026","rows","4",1,"case-home__input",3,"input","keydown","value","disabled"],[1,"case-home__composer-footer"],[1,"case-home__hint"],["icon","send","variant","primary","title","Start case",3,"action","disabled"],[3,"selected","dismissed","prompts"]],template:function(e,n){e&1&&(s(0,"div",1)(1,"div",2)(2,"h1",3),d(3,"What can I help you with?"),l(),s(4,"div",4),p(5,Vt,2,1,"div",5),s(6,"textarea",6,0),f("input",function(a){return n.onInput(a)})("keydown",function(a){return n.onKeydown(a)}),l(),s(8,"div",7)(9,"span",8),d(10),l(),s(11,"ds-icon-button",9),f("action",function(){return n.submit()}),l()()()()()),e&2&&(r(5),_(n.slashSuggestions().length>0?5:-1),r(),M("value",n.inputValue())("disabled",n.isCreating()),r(4),v(n.preferences.composerHint()),r(),M("disabled",!n.canSend))},dependencies:[ge,B],styles:[".case-home[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;align-items:center;justify-content:center}.case-home__hero[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:2rem;padding:2rem 1.5rem 4rem;max-width:680px;width:100%}.case-home__headline[_ngcontent-%COMP%]{margin:0;font-size:clamp(1.5rem,4vw,2.25rem);font-weight:700;letter-spacing:-.03em;color:var(--color-text, #1d1d1f);text-align:center}.case-home__autocomplete[_ngcontent-%COMP%]{position:absolute;bottom:calc(100% + .5rem);left:0;right:0;background:var(--glass-bg, rgba(255, 255, 255, .96));border:1px solid var(--color-border, rgba(0, 0, 0, .1));backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);border-radius:12px;box-shadow:0 8px 32px #00000026;z-index:20;animation:_ngcontent-%COMP%_autocomplete-in .12s ease}.case-home__composer[_ngcontent-%COMP%]{position:relative;width:100%;display:flex;flex-direction:column;background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:16px;box-shadow:0 4px 24px var(--color-shadow, rgba(0, 0, 0, .07));transition:box-shadow .2s ease,border-color .2s ease}.case-home__composer[_ngcontent-%COMP%]:focus-within{box-shadow:0 4px 32px #007aff26;border-color:var(--color-primary, #007aff)}.case-home__input[_ngcontent-%COMP%]{width:100%;resize:none;padding:1rem 1.25rem .5rem;border:none;background:transparent;color:var(--color-text, #1d1d1f);font-size:1rem;font-family:inherit;line-height:1.6;outline:none;box-sizing:border-box}.case-home__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.case-home__input[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.case-home__composer-footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:.5rem .5rem .5rem 1.25rem}.case-home__hint[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);opacity:.7}@keyframes _ngcontent-%COMP%_autocomplete-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}"]})};var Lt=["caseItemTpl"],qt=o=>({node:o,depth:0}),Ft=(o,t)=>({node:o,depth:t}),zt=(o,t)=>t.id;function $t(o,t){o&1&&Me(0)}function Ht(o,t){if(o&1&&ce(0,$t,1,0,"ng-container",3),o&2){let e=t.$implicit;c();let n=de(4);M("ngTemplateOutlet",n)("ngTemplateOutletContext",Ve(2,qt,e))}}function Ut(o,t){if(o&1){let e=S();s(0,"button",9),f("click",function(i){h(e);let a=c().node,w=c();return g(w.toggleExpand(i,a.id))}),s(1,"span",10),d(2,"\u203A"),l()()}if(o&2){let e=c().node,n=c();M("title",n.isExpanded(e.id)?"Collapse":"Expand"),r(),O("case-tree-node__toggle-icon--open",n.isExpanded(e.id))}}function Wt(o,t){o&1&&Me(0)}function Bt(o,t){if(o&1&&ce(0,Wt,1,0,"ng-container",3),o&2){let e=t.$implicit,n=c(2).depth;c();let i=de(4);M("ngTemplateOutlet",i)("ngTemplateOutletContext",Le(2,Ft,e,n+1))}}function jt(o,t){if(o&1&&D(0,Bt,1,5,"ng-container",null,zt),o&2){let e=c().node;N(e.children)}}function Qt(o,t){if(o&1){let e=S();s(0,"div",4)(1,"button",5),f("click",function(){let i=h(e).node,a=c();return g(a.onItemSelected(i.id))}),s(2,"span",6),p(3,Ut,3,3,"button",7),l(),s(4,"span",8),d(5),l()(),p(6,jt,2,0),l()}if(o&2){let e=t.node,n=t.depth,i=c();me("--depth",n),r(),O("case-tree-node__row--active",e.id===i.activeCaseId()),r(2),_(e.children.length?3:-1),r(2),v(e.name),r(),_(i.isExpanded(e.id)&&e.children.length?6:-1)}}var xe=class o{cases=u([]);activeCaseId=u(null);caseSelected=C();createRequested=C();caseItemTpl;rootItems=E(()=>Yt(this.cases()));autoExpandedIds=E(()=>{let t=this.activeCaseId();if(!t)return new Set;let e=new Set;return Xe(this.rootItems(),t,e),e});expandedIds=y(new Set);isExpanded(t){return this.expandedIds().has(t)||this.autoExpandedIds().has(t)}toggleExpand(t,e){t.stopPropagation(),this.expandedIds.update(n=>{let i=new Set(n);return i.has(e)?i.delete(e):i.add(e),i})}onItemSelected(t){this.caseSelected.emit(t)}onCreateRequested(){this.createRequested.emit()}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=P({type:o,selectors:[["agentos-case-drawer"]],viewQuery:function(e,n){if(e&1&&W(Lt,7),e&2){let i;L(i=q())&&(n.caseItemTpl=i.first)}},inputs:{cases:[1,"cases"],activeCaseId:[1,"activeCaseId"]},outputs:{caseSelected:"caseSelected",createRequested:"createRequested"},decls:5,vars:3,consts:[["caseItemTpl",""],["caseRowTpl",""],["title","Cases","emptyMessage","No cases yet. Start one below.","searchPlaceholder","Filter cases\u2026","cardMinWidth","220px","contentMaxWidth","100%",3,"itemSelected","createRequested","items","itemTemplate","showCreate"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"case-tree-node"],["type","button",1,"case-tree-node__row",3,"click"],[1,"case-tree-node__expand-slot"],["type","button",1,"case-tree-node__toggle",3,"title"],[1,"case-tree-node__name"],["type","button",1,"case-tree-node__toggle",3,"click","title"],[1,"case-tree-node__toggle-icon"]],template:function(e,n){if(e&1&&(s(0,"ds-entity-list",2),f("itemSelected",function(a){return n.onItemSelected(a)})("createRequested",function(){return n.onCreateRequested()}),l(),ce(1,Ht,1,4,"ng-template",null,0,ke)(3,Qt,7,7,"ng-template",null,1,ke)),e&2){let i=de(2);M("items",n.rootItems())("itemTemplate",i)("showCreate",!0)}},dependencies:[Qe,ze],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}.case-tree-node[_ngcontent-%COMP%]{width:100%}.case-tree-node__row[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;padding:.375rem .5rem;padding-left:calc(.5rem + var(--depth, 0) * 1.25rem);border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;font-size:.875rem;color:var(--color-text, #1d1d1f);border-radius:6px;gap:.375rem;transition:background .12s ease;box-sizing:border-box}.case-tree-node__row[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .05))}.case-tree-node__row--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);color:var(--color-text-inverse, #fff)}.case-tree-node__row--active[_ngcontent-%COMP%]:hover{background:var(--color-primary-hover, #0051d5)}.case-tree-node__expand-slot[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:1rem;flex-shrink:0}.case-tree-node__toggle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:1rem;height:1rem;padding:0;border:none;background:transparent;cursor:pointer;color:inherit;border-radius:3px;transition:background .1s ease}.case-tree-node__toggle[_ngcontent-%COMP%]:hover{background:#00000014}.case-tree-node__toggle-icon[_ngcontent-%COMP%]{display:inline-block;font-size:1.1rem;line-height:1;transition:transform .15s ease;transform:rotate(0)}.case-tree-node__toggle-icon--open[_ngcontent-%COMP%]{transform:rotate(90deg)}.case-tree-node__name[_ngcontent-%COMP%]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.8rem}'],changeDetection:0})};function Yt(o){let t=new Set(o.map(m=>m.id??"")),e=new Map(o.map(m=>[m.id??"",m.created??""])),n=m=>({id:m.id??"",name:m.title??m.id??"\u2014",children:[]}),i=new Map;for(let m of o)i.set(m.id??"",n(m));let a=[];for(let m of o){let b=i.get(m.id??""),R=m.parentCaseId;R&&t.has(R)?i.get(R).children.push(b):a.push(b)}let w=m=>m.sort((b,R)=>(e.get(R.id)??"")>(e.get(b.id)??"")?1:-1).map(b=>oe(ne({},b),{children:w(b.children)}));return w(a)}function Xe(o,t,e){for(let n of o){if(n.id===t)return!0;if(n.children.length&&Xe(n.children,t,e))return e.add(n.id),!0}return!1}function Gt(o,t){if(o&1){let e=S();T(0,"button",2),V("click",function(){h(e);let i=c(2);return g(i.onNavigate("/agentos/admin"))}),d(1,"\u2699\uFE0F Admin"),k()}}function Kt(o,t){o&1&&d(0," \u2600\uFE0F Light mode ")}function Xt(o,t){o&1&&d(0," \u{1F319} Dark mode ")}function Jt(o,t){if(o&1){let e=S();T(0,"div",0),V("click",function(i){h(e);let a=c();return g(a.onClose(i))})("keyup.escape",function(i){h(e);let a=c();return g(a.onClose(i))}),k(),T(1,"div",1)(2,"button",2),V("click",function(){h(e);let i=c();return g(i.onNavigate("/agentos/user"))}),d(3,"\u{1F464} User"),k(),p(4,Gt,2,0,"button",3),K(5,"div",4),T(6,"button",2),V("click",function(){h(e);let i=c();return g(i.onNavigate("/agentos/namespaces"))}),d(7," \u{1F310} Namespaces "),k(),K(8,"div",4),T(9,"button",2),V("click",function(){h(e);let i=c();return g(i.onThemeToggle())}),p(10,Kt,1,0)(11,Xt,1,0),k(),T(12,"button",2),V("click",function(){h(e);let i=c();return g(i.onLogsToggle())}),d(13," </> Technical logs "),k()()}if(o&2){let e=c();r(),O("shell-user-menu__overlay--mobile",e.variant()==="mobile"),r(3),_(e.isAdmin()?4:-1),r(6),_(e.isDark()?10:11),r(2),O("shell-user-menu__item--active",e.showTechnical())}}var Z=class o{open=u.required();isAdmin=u.required();isDark=u.required();showTechnical=u.required();variant=u("desktop");navigateTo=C();themeToggled=C();logsToggled=C();closed=C();onNavigate(t){this.navigateTo.emit(t)}onThemeToggle(){this.themeToggled.emit()}onLogsToggle(){this.logsToggled.emit()}onClose(t){t.stopPropagation(),this.closed.emit(t)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=P({type:o,selectors:[["agentos-shell-user-menu"]],inputs:{open:[1,"open"],isAdmin:[1,"isAdmin"],isDark:[1,"isDark"],showTechnical:[1,"showTechnical"],variant:[1,"variant"]},outputs:{navigateTo:"navigateTo",themeToggled:"themeToggled",logsToggled:"logsToggled",closed:"closed"},decls:1,vars:1,consts:[["role","presentation","tabindex","-1",1,"shell-user-menu__backdrop",3,"click","keyup.escape"],[1,"shell-user-menu__overlay"],["type","button",1,"shell-user-menu__item",3,"click"],["type","button",1,"shell-user-menu__item"],[1,"shell-user-menu__separator"]],template:function(e,n){e&1&&p(0,Jt,14,6),e&2&&_(n.open()?0:-1)},styles:[".shell-user-menu__backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:199}.shell-user-menu__overlay[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 6px);right:0;min-width:180px;background:var(--color-bg, #f4f3ef);border:1px solid var(--color-border, rgba(0, 0, 0, .09));border-radius:14px;padding:6px;z-index:200;box-shadow:0 6px 20px #00000017,0 1px 4px #0000000d}.shell-user-menu__overlay--mobile[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 4px);right:16px;left:auto;z-index:300}.shell-user-menu__item[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;gap:8px;padding:9px 10px;border-radius:10px;border:none;background:transparent;cursor:pointer;color:var(--color-text, #1b1916);font:inherit;font-size:.8rem;text-align:left;transition:all .13s}.shell-user-menu__item[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .05))}.shell-user-menu__item--active[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-primary, #016b71) 12%,transparent);color:var(--color-primary, #016b71)}.shell-user-menu__separator[_ngcontent-%COMP%]{height:1px;background:var(--color-border, rgba(0, 0, 0, .09));margin:4px 6px}"],changeDetection:0})};var Zt=(o,t)=>t.id;function en(o,t){if(o&1&&d(0),o&2){let e=c();F(" ",e.userInitials()," ")}}function tn(o,t){o&1&&d(0," \u2022\u2022\u2022 ")}function nn(o,t){o&1&&(s(0,"span"),d(1,"\u2713"),l())}function on(o,t){if(o&1){let e=S();s(0,"button",19),f("click",function(){let i=h(e).$implicit,a=c(3);return g(a.namespaceSelected.emit(i))}),A(1,"span",14),s(2,"span",20),d(3),l(),p(4,nn,2,0,"span"),l()}if(o&2){let e,n,i=t.$implicit,a=c(3);O("shell-sidebar__ns-item--active",i.id===((e=a.selectedNamespace())==null?null:e.id)),r(3),v(i.name),r(),_(i.id===((n=a.selectedNamespace())==null?null:n.id)?4:-1)}}function an(o,t){if(o&1&&(s(0,"div",17),D(1,on,5,4,"button",18,Zt),l()),o&2){let e=c(2);r(),N(e.namespaces())}}function rn(o,t){if(o&1){let e=S();s(0,"div",9)(1,"button",13),f("click",function(){h(e);let i=c();return g(i.nsMenuToggled.emit())}),A(2,"span",14),s(3,"span",15),d(4),l(),s(5,"span",16),d(6,"\u25BE"),l()(),p(7,an,3,0,"div",17),l()}if(o&2){let e,n=c();r(4),v(((e=n.selectedNamespace())==null?null:e.name)??"Select namespace"),r(3),_(n.nsMenuOpen()?7:-1)}}function sn(o,t){if(o&1&&(s(0,"span",10),d(1),l()),o&2){let e,n=c();r(),v((e=n.selectedNamespace())==null?null:e.name)}}var ye=class o{sidebarWidth=u.required();selectedNamespace=u.required();namespaces=u.required();showNsPicker=u.required();nsMenuOpen=u.required();cases=u.required();activeCaseId=u.required();userInitials=u.required();menuOpen=u.required();isAdmin=u.required();isDark=u.required();showTechnical=u.required();homeClicked=C();namespaceSelected=C();nsMenuToggled=C();nsMenuClosed=C();caseSelected=C();createRequested=C();menuToggled=C();menuClosed=C();navigateTo=C();themeToggled=C();logsToggled=C();static \u0275fac=function(e){return new(e||o)};static \u0275cmp=P({type:o,selectors:[["agentos-shell-sidebar"]],inputs:{sidebarWidth:[1,"sidebarWidth"],selectedNamespace:[1,"selectedNamespace"],namespaces:[1,"namespaces"],showNsPicker:[1,"showNsPicker"],nsMenuOpen:[1,"nsMenuOpen"],cases:[1,"cases"],activeCaseId:[1,"activeCaseId"],userInitials:[1,"userInitials"],menuOpen:[1,"menuOpen"],isAdmin:[1,"isAdmin"],isDark:[1,"isDark"],showTechnical:[1,"showTechnical"]},outputs:{homeClicked:"homeClicked",namespaceSelected:"namespaceSelected",nsMenuToggled:"nsMenuToggled",nsMenuClosed:"nsMenuClosed",caseSelected:"caseSelected",createRequested:"createRequested",menuToggled:"menuToggled",menuClosed:"menuClosed",navigateTo:"navigateTo",themeToggled:"themeToggled",logsToggled:"logsToggled"},decls:16,vars:10,consts:[[1,"shell-sidebar"],[1,"shell-sidebar__top"],["type","button","title","Home",1,"shell-sidebar__brand",3,"click"],["src","CODAY-Logo.png","alt","Coday",1,"shell-sidebar__logo-img"],[1,"shell-sidebar__user-menu"],["type","button","title","Menu",1,"shell-sidebar__user-btn",3,"click"],["variant","desktop",3,"navigateTo","themeToggled","logsToggled","closed","open","isAdmin","isDark","showTechnical"],[1,"shell-sidebar__ns-wrap"],[1,"shell-sidebar__ns-label"],[1,"shell-sidebar__ns-picker"],[1,"shell-sidebar__ns-name-static"],[1,"shell-sidebar__cases-scroll"],[3,"caseSelected","createRequested","cases","activeCaseId"],[1,"shell-sidebar__ns-trigger",3,"click"],[1,"shell-sidebar__ns-dot"],[1,"shell-sidebar__ns-name"],[1,"shell-sidebar__ns-chevron"],[1,"shell-sidebar__ns-menu"],[1,"shell-sidebar__ns-item",3,"shell-sidebar__ns-item--active"],[1,"shell-sidebar__ns-item",3,"click"],[1,"shell-sidebar__ns-item-name"]],template:function(e,n){e&1&&(s(0,"div",0)(1,"div",1)(2,"button",2),f("click",function(){return n.homeClicked.emit()}),A(3,"img",3),l(),s(4,"div",4)(5,"button",5),f("click",function(a){return n.menuToggled.emit(a)}),p(6,en,1,1)(7,tn,1,0),l(),s(8,"agentos-shell-user-menu",6),f("navigateTo",function(a){return n.navigateTo.emit(a)})("themeToggled",function(){return n.themeToggled.emit()})("logsToggled",function(){return n.logsToggled.emit()})("closed",function(a){return n.menuClosed.emit(a)}),l()()(),s(9,"div",7)(10,"div",8),d(11,"Namespace"),l(),p(12,rn,8,2,"div",9)(13,sn,2,1,"span",10),l(),s(14,"div",11)(15,"agentos-case-drawer",12),f("caseSelected",function(a){return n.caseSelected.emit(a)})("createRequested",function(){return n.createRequested.emit()}),l()()()),e&2&&(me("width",n.sidebarWidth(),"px"),r(6),_(n.userInitials()?6:7),r(2),M("open",n.menuOpen())("isAdmin",n.isAdmin())("isDark",n.isDark())("showTechnical",n.showTechnical()),r(4),_(n.showNsPicker()?12:13),r(3),M("cases",n.cases())("activeCaseId",n.activeCaseId()))},dependencies:[xe,Z],styles:["[_nghost-%COMP%]{display:contents}@media(max-width:900px){[_nghost-%COMP%]{display:none!important}}.shell-sidebar[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden;border-right:1px solid var(--color-border, rgba(0, 0, 0, .09));background:var(--color-bg, #f4f3ef);flex-shrink:0}.shell-sidebar__top[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:14px 12px 6px;flex-shrink:0}.shell-sidebar__brand[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:4px 6px;border-radius:8px;border:none;background:transparent;cursor:pointer;transition:background .14s}.shell-sidebar__brand[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .05))}.shell-sidebar__logo-img[_ngcontent-%COMP%]{width:24px;height:24px;border-radius:6px;object-fit:contain}.shell-sidebar__user-menu[_ngcontent-%COMP%]{position:relative;flex-shrink:0}.shell-sidebar__user-btn[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:50%;border:1px solid var(--color-border, rgba(0, 0, 0, .09));background:color-mix(in srgb,var(--color-primary, #016b71) 15%,transparent);cursor:pointer;display:grid;place-items:center;font-size:.7rem;font-weight:700;letter-spacing:.02em;color:var(--color-primary, #016b71);transition:all .14s}.shell-sidebar__user-btn[_ngcontent-%COMP%]:hover{background:color-mix(in srgb,var(--color-primary, #016b71) 25%,transparent)}.shell-sidebar__ns-wrap[_ngcontent-%COMP%]{padding:12px 12px 6px;position:relative}.shell-sidebar__ns-label[_ngcontent-%COMP%]{padding:0 2px 7px;font-size:.7rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--color-text-tertiary, #5a5449)}.shell-sidebar__ns-picker[_ngcontent-%COMP%]{position:relative}.shell-sidebar__ns-trigger[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:12px;border:1px solid var(--color-border, rgba(0, 0, 0, .09));background:var(--color-bg-secondary, #faf9f7);cursor:pointer;color:var(--color-text, #1b1916);transition:all .15s;font:inherit;font-size:.82rem;font-weight:700}.shell-sidebar__ns-trigger[_ngcontent-%COMP%]:hover{border-color:var(--color-border-light, rgba(0, 0, 0, .15))}.shell-sidebar__ns-dot[_ngcontent-%COMP%]{width:10px;height:10px;border-radius:50%;background:var(--color-primary, #5aadb5);flex-shrink:0}.shell-sidebar__ns-name[_ngcontent-%COMP%]{flex:1;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.shell-sidebar__ns-chevron[_ngcontent-%COMP%]{color:var(--color-text-secondary, #968f85);font-size:.75rem}.shell-sidebar__ns-menu[_ngcontent-%COMP%]{position:absolute;left:0;right:0;top:calc(100% + 4px);background:var(--color-bg, #f4f3ef);border:1px solid var(--color-border, rgba(0, 0, 0, .09));border-radius:14px;padding:6px;z-index:100;box-shadow:0 6px 20px #00000017,0 1px 4px #0000000d}.shell-sidebar__ns-item[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;gap:10px;padding:10px;border-radius:10px;border:none;background:transparent;cursor:pointer;color:var(--color-text, #1b1916);font:inherit;font-size:.8rem;transition:all .13s}.shell-sidebar__ns-item[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .05))}.shell-sidebar__ns-item--active[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-primary, #016b71) 12%,transparent);color:var(--color-primary, #016b71)}.shell-sidebar__ns-item-name[_ngcontent-%COMP%]{flex:1;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.shell-sidebar__ns-name-static[_ngcontent-%COMP%]{display:block;padding:10px 12px;font-size:.82rem;font-weight:700;color:var(--color-text, #1b1916);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.shell-sidebar__cases-scroll[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding-bottom:16px}.shell-sidebar__cases-scroll[_ngcontent-%COMP%]::-webkit-scrollbar{width:4px}.shell-sidebar__cases-scroll[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--color-border-light, rgba(255, 255, 255, .12));border-radius:999px}"],changeDetection:0})};var ln=(o,t)=>t.id;function cn(o,t){o&1&&(s(0,"span"),d(1,"\u2713"),l())}function dn(o,t){if(o&1){let e=S();s(0,"button",13),f("click",function(){let i=h(e).$implicit,a=c(2);return g(a.namespaceSelected.emit(i))}),A(1,"span",14),s(2,"span",15),d(3),l(),p(4,cn,2,0,"span"),l()}if(o&2){let e,n,i=t.$implicit,a=c(2);O("shell-topbar-mobile__ns-item--active",i.id===((e=a.selectedNamespace())==null?null:e.id)),r(3),v(i.name),r(),_(i.id===((n=a.selectedNamespace())==null?null:n.id)?4:-1)}}function mn(o,t){if(o&1){let e=S();s(0,"div",10),f("click",function(i){h(e);let a=c();return g(a.nsMenuClosed.emit(i))})("keyup.escape",function(i){h(e);let a=c();return g(a.nsMenuClosed.emit(i))}),l(),s(1,"div",11),D(2,dn,5,4,"button",12,ln),l()}if(o&2){let e=c();r(2),N(e.namespaces())}}var we=class o{selectedNamespace=u.required();namespaces=u.required();nsMenuOpen=u.required();userInitials=u.required();menuOpen=u.required();isAdmin=u.required();isDark=u.required();showTechnical=u.required();homeClicked=C();namespaceSelected=C();nsMenuToggled=C();nsMenuClosed=C();menuToggled=C();menuClosed=C();navigateTo=C();themeToggled=C();logsToggled=C();static \u0275fac=function(e){return new(e||o)};static \u0275cmp=P({type:o,selectors:[["agentos-shell-topbar-mobile"]],inputs:{selectedNamespace:[1,"selectedNamespace"],namespaces:[1,"namespaces"],nsMenuOpen:[1,"nsMenuOpen"],userInitials:[1,"userInitials"],menuOpen:[1,"menuOpen"],isAdmin:[1,"isAdmin"],isDark:[1,"isDark"],showTechnical:[1,"showTechnical"]},outputs:{homeClicked:"homeClicked",namespaceSelected:"namespaceSelected",nsMenuToggled:"nsMenuToggled",nsMenuClosed:"nsMenuClosed",menuToggled:"menuToggled",menuClosed:"menuClosed",navigateTo:"navigateTo",themeToggled:"themeToggled",logsToggled:"logsToggled"},decls:15,vars:7,consts:[[1,"shell-topbar-mobile__brand"],["type","button","title","Home",1,"shell-topbar-mobile__logo-btn",3,"click"],["src","CODAY-Logo.png","alt","Coday",1,"shell-topbar-mobile__logo-img"],[1,"shell-topbar-mobile__sep"],[1,"shell-topbar-mobile__ns-wrap"],["type","button",1,"shell-topbar-mobile__ns-btn",3,"click"],[1,"shell-topbar-mobile__chevron"],[1,"shell-topbar-mobile__avatar-wrap"],["tabindex","0","role","button","aria-label","User menu",1,"shell-topbar-mobile__avatar",3,"click","keyup.enter"],["variant","mobile",3,"navigateTo","themeToggled","logsToggled","closed","open","isAdmin","isDark","showTechnical"],["role","presentation","tabindex","-1",1,"shell-topbar-mobile__ns-backdrop",3,"click","keyup.escape"],[1,"shell-topbar-mobile__ns-menu"],[1,"shell-topbar-mobile__ns-item",3,"shell-topbar-mobile__ns-item--active"],[1,"shell-topbar-mobile__ns-item",3,"click"],[1,"shell-topbar-mobile__ns-dot"],[1,"shell-topbar-mobile__ns-item-name"]],template:function(e,n){if(e&1&&(s(0,"div",0)(1,"button",1),f("click",function(){return n.homeClicked.emit()}),A(2,"img",2),l(),s(3,"span",3),d(4,"/"),l(),s(5,"div",4)(6,"button",5),f("click",function(a){return n.nsMenuToggled.emit(a)}),d(7),s(8,"span",6),d(9,"\u25BE"),l()(),p(10,mn,4,0),l()(),s(11,"div",7)(12,"div",8),f("click",function(a){return n.menuToggled.emit(a)})("keyup.enter",function(){return n.menuToggled.emit(void 0)}),d(13),l(),s(14,"agentos-shell-user-menu",9),f("navigateTo",function(a){return n.navigateTo.emit(a)})("themeToggled",function(){return n.themeToggled.emit()})("logsToggled",function(){return n.logsToggled.emit()})("closed",function(a){return n.menuClosed.emit(a)}),l()()),e&2){let i;r(7),F(" ",((i=n.selectedNamespace())==null?null:i.name)??""," "),r(3),_(n.nsMenuOpen()?10:-1),r(3),F(" ",n.userInitials()||"\xB7\xB7\xB7"," "),r(),M("open",n.menuOpen())("isAdmin",n.isAdmin())("isDark",n.isDark())("showTechnical",n.showTechnical())}},dependencies:[Z],styles:["[_nghost-%COMP%]{display:none}.shell-topbar-mobile__brand[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;min-width:0;flex:1;overflow:hidden}.shell-topbar-mobile__logo-btn[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;flex:none;padding:0;border:none;background:transparent;cursor:pointer}.shell-topbar-mobile__logo-img[_ngcontent-%COMP%]{width:20px;height:20px;border-radius:6px;object-fit:contain}.shell-topbar-mobile__sep[_ngcontent-%COMP%]{color:#00000040;font:400 12px Inter,sans-serif;flex:none}.shell-topbar-mobile__ns-wrap[_ngcontent-%COMP%]{position:static;min-width:0}.shell-topbar-mobile__ns-btn[_ngcontent-%COMP%]{font:600 12.5px Inter,sans-serif;color:var(--color-text, #161616);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;gap:3px;cursor:pointer;background:none;border:none;padding:0}.shell-topbar-mobile__chevron[_ngcontent-%COMP%]{color:#00000059;font-size:9px;flex:none}.shell-topbar-mobile__ns-backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:299}.shell-topbar-mobile__ns-menu[_ngcontent-%COMP%]{position:fixed;top:44px;left:16px;min-width:180px;background:var(--color-bg, #f4f3ef);border:1px solid var(--color-border, rgba(0, 0, 0, .09));border-radius:14px;padding:6px;z-index:300;box-shadow:0 6px 20px #00000017,0 1px 4px #0000000d}.shell-topbar-mobile__ns-item[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;gap:10px;padding:10px;border-radius:10px;border:none;background:transparent;cursor:pointer;color:var(--color-text, #1b1916);font:inherit;font-size:.8rem;transition:all .13s}.shell-topbar-mobile__ns-item[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .05))}.shell-topbar-mobile__ns-item--active[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-primary, #016b71) 12%,transparent);color:var(--color-primary, #016b71)}.shell-topbar-mobile__ns-dot[_ngcontent-%COMP%]{width:10px;height:10px;background:var(--color-primary, #5aadb5);flex-shrink:0;border-radius:50%}.shell-topbar-mobile__ns-item-name[_ngcontent-%COMP%]{flex:1;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.shell-topbar-mobile__avatar-wrap[_ngcontent-%COMP%]{position:relative;flex-shrink:0}.shell-topbar-mobile__avatar[_ngcontent-%COMP%]{width:44px;height:44px;border-radius:50%;background:#dfedff;background:oklch(94% .03 255deg);border:1px solid oklch(82% .06 255deg);color:#2a5fc9;display:flex;align-items:center;justify-content:center;font:600 10px Inter,sans-serif;cursor:pointer;-webkit-user-select:none;user-select:none}@media(max-width:900px){[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 16px;min-height:44px;border-bottom:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--color-bg, #fff);flex-shrink:0;position:relative}}"],changeDetection:0})};var pn=(o,t)=>t.id;function _n(o,t){if(o&1){let e=S();T(0,"div",9),V("click",function(){let i=h(e).$implicit,a=c(2);return g(a.caseSelected.emit(i.id??""))})("keyup.enter",function(){let i=h(e).$implicit,a=c(2);return g(a.caseSelected.emit(i.id??""))}),K(1,"span",1),T(2,"span",2),d(3),k(),T(4,"span",3),d(5),k()()}if(o&2){let e=t.$implicit,n=c(2);r(),Te("shell-case-switcher__dot--"+n.deriveMobileStatus(e.status)),r(2),v(e.title??e.id),r(2),v(e.status.toLowerCase())}}function un(o,t){if(o&1){let e=S();T(0,"div",5)(1,"div",6),V("click",function(){h(e);let i=c();return g(i.createRequested.emit())})("keyup.enter",function(){h(e);let i=c();return g(i.createRequested.emit())}),T(2,"span",7),d(3,"+"),k(),T(4,"span",2),d(5,"New case"),k()(),D(6,_n,6,4,"div",8,pn),k()}if(o&2){let e=c();r(6),N(e.otherCases())}}var Se=class o{cases=u.required();activeCaseId=u.required();open=u.required();activeCase=E(()=>{let t=this.activeCaseId();return t?this.cases().find(e=>e.id===t)??null:null});activeCaseTitle=E(()=>this.activeCase()?.title??this.activeCaseId()??"New case");activeCaseStatus=E(()=>this.deriveMobileStatus(this.activeCase()?.status));activeCaseStatusLabel=E(()=>this.activeCase()?.status?.toLowerCase()??"");otherCases=E(()=>this.cases().filter(t=>t.id!==this.activeCaseId()));caseSelected=C();createRequested=C();toggled=C();deriveMobileStatus(t){switch(t){case"RUNNING":return"run";case"KILLED":return"killed";case"ERROR":return"error";default:return"idle"}}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=P({type:o,selectors:[["agentos-shell-case-switcher-mobile"]],inputs:{cases:[1,"cases"],activeCaseId:[1,"activeCaseId"],open:[1,"open"]},outputs:{caseSelected:"caseSelected",createRequested:"createRequested",toggled:"toggled"},decls:9,vars:5,consts:[["tabindex","0","role","button",1,"shell-case-switcher__trigger",3,"click","keyup.enter"],[1,"shell-case-switcher__dot"],[1,"shell-case-switcher__title"],[1,"shell-case-switcher__status"],[1,"shell-case-switcher__chevron"],[1,"shell-case-switcher__list"],["tabindex","0","role","button",1,"shell-case-switcher__item","shell-case-switcher__item--new",3,"click","keyup.enter"],[1,"shell-case-switcher__new-icon"],["tabindex","0","role","button",1,"shell-case-switcher__item"],["tabindex","0","role","button",1,"shell-case-switcher__item",3,"click","keyup.enter"]],template:function(e,n){e&1&&(T(0,"div",0),V("click",function(){return n.toggled.emit()})("keyup.enter",function(){return n.toggled.emit()}),K(1,"span",1),T(2,"span",2),d(3),k(),T(4,"span",3),d(5),k(),T(6,"span",4),d(7,"\u2304"),k()(),p(8,un,8,0,"div",5)),e&2&&(r(),Te("shell-case-switcher__dot--"+n.activeCaseStatus()),r(2),v(n.activeCaseTitle()),r(2),v(n.activeCaseStatusLabel()),r(3),_(n.open()?8:-1))},styles:["[_nghost-%COMP%]{display:none}.shell-case-switcher__trigger[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px;padding:10px 16px;min-height:44px;cursor:pointer;-webkit-user-select:none;user-select:none}.shell-case-switcher__trigger[_ngcontent-%COMP%]:hover{background:#00000005}.shell-case-switcher__title[_ngcontent-%COMP%]{font:600 12.5px Inter,sans-serif;color:var(--color-text, #161616);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.shell-case-switcher__status[_ngcontent-%COMP%]{font:400 11px Inter,sans-serif;color:#0006;flex:none}.shell-case-switcher__chevron[_ngcontent-%COMP%]{color:#00000059;font-size:9px;flex:none}.shell-case-switcher__list[_ngcontent-%COMP%]{display:flex;flex-direction:column;border-top:1px solid rgba(0,0,0,.06);max-height:60vh;overflow-y:auto}.shell-case-switcher__item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px;padding:0 16px;height:44px;flex-shrink:0;cursor:pointer}.shell-case-switcher__item[_ngcontent-%COMP%] .shell-case-switcher__title[_ngcontent-%COMP%]{font-weight:500;color:#000000b3}.shell-case-switcher__item[_ngcontent-%COMP%]:hover{background:#00000008}.shell-case-switcher__item--new[_ngcontent-%COMP%]{border-bottom:1px solid var(--color-border, rgba(0, 0, 0, .08))}.shell-case-switcher__item--new[_ngcontent-%COMP%] .shell-case-switcher__title[_ngcontent-%COMP%]{font-weight:600;color:var(--color-primary, #016b71)}.shell-case-switcher__new-icon[_ngcontent-%COMP%]{width:6px;height:6px;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:300;color:var(--color-primary, #016b71);flex:none}.shell-case-switcher__dot[_ngcontent-%COMP%]{width:6px;height:6px;border-radius:50%;flex:none}.shell-case-switcher__dot--run[_ngcontent-%COMP%]{background:#2a9d4a}.shell-case-switcher__dot--idle[_ngcontent-%COMP%]{background:#0003}.shell-case-switcher__dot--killed[_ngcontent-%COMP%], .shell-case-switcher__dot--error[_ngcontent-%COMP%]{background:#dc2614}@media(max-width:900px){[_nghost-%COMP%]{display:flex;flex-direction:column;border-bottom:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--color-bg, #fff);flex-shrink:0}}"],changeDetection:0})};function hn(o,t){if(o&1&&A(0,"agentos-case-chat",6),o&2){let e=c();M("showTechnicalOverride",e.showTechnical())}}function gn(o,t){o&1&&A(0,"agentos-case-home")}var Je=class o{router=x(_e);route=x(X);caseController=x(he);namespaceController=x(Ue);themePort=x(Ye);userState=x(Ge);isAdmin=E(()=>this.userState.currentUser()?.isAdmin===!0);userInitials=E(()=>{let t=this.userState.currentUser();if(!t)return"";let e=t.firstname?.[0]??"",n=t.lastname?.[0]??"";return(e+n).toUpperCase()||t.email?.[0]?.toUpperCase()||""});isDark=E(()=>{let t=this.themePort.theme();return t==="dark"?!0:t==="light"?!1:typeof document<"u"&&document.documentElement.hasAttribute("data-theme")});sidebarWidth=y(300);menuOpen=y(!1);nsMenuOpen=y(!1);mobileSwitcherOpen=y(!1);showTechnical=y(!1);showNsPicker=E(()=>this.isAdmin()||this.namespaces().length>1);namespaceId$=this.route.queryParams.pipe(H(t=>t.ns??null));_namespaceIdRaw=te(this.namespaceId$);namespaceId=E(()=>this._namespaceIdRaw()??null);_activeCaseIdRaw=te(this.route.queryParams.pipe(H(t=>t.case??null)));activeCaseId=E(()=>this._activeCaseIdRaw()??null);refresh$=new Pe(void 0);cases$=this.namespaceId$.pipe(U(t=>t?this.refresh$.pipe(U(()=>this.caseController.listByParentCase(t))):[[]]));cases=te(this.cases$,{initialValue:[]});namespaces=te(this.namespaceController.listAllNamespace(),{initialValue:[]});selectedNamespace=y(null);constructor(){G(()=>{let t=this.namespaces(),e=this.namespaceId();if(t.length)if(e){let n=t.find(i=>i.id===e);this.selectedNamespace.set(n??t[0]??null)}else{let n=t[0];n?.id&&this.router.navigate(["/agentos/home"],{queryParams:{ns:n.id},replaceUrl:!0})}})}onNamespaceSelected(t){this.selectedNamespace.set(t),this.nsMenuOpen.set(!1),this.router.navigate(["/agentos/home"],{queryParams:{ns:t.id}})}toggleNsMenu(t){t?.stopPropagation(),t?.preventDefault(),this.nsMenuOpen.update(e=>!e)}closeNsMenu(t){t.stopPropagation(),this.nsMenuOpen.set(!1)}onCaseSelected(t){this.router.navigate(["/agentos/home"],{queryParams:{ns:this.namespaceId(),case:t}})}onCreateRequested(){this.router.navigate(["/agentos/home"],{queryParams:{ns:this.namespaceId()}})}navigateHome(){this.router.navigate(["/agentos/home"])}onMenuNavigate(t){this.menuOpen.set(!1),this.router.navigate([t])}toggleMenu(t){t?.stopPropagation(),t?.preventDefault(),this.menuOpen.update(e=>!e)}closeMenu(t){t.stopPropagation(),this.menuOpen.set(!1)}onMenuToggleTheme(){this.menuOpen.set(!1);let t=this.isDark()?"light":"dark";this.themePort.setTheme(t)}onMenuToggleLogs(){this.menuOpen.set(!1),this.showTechnical.update(t=>!t)}toggleMobileSwitcher(){this.mobileSwitcherOpen.update(t=>!t)}onMobileCaseSelect(t){this.mobileSwitcherOpen.set(!1),this.onCaseSelected(t)}onMobileCreateCase(){this.mobileSwitcherOpen.set(!1),this.onCreateRequested()}onResizeStart(t){t.preventDefault();let e=t.clientX,n=this.sidebarWidth(),i=w=>{let m=w.clientX-e,b=Math.max(200,Math.min(500,n+m));this.sidebarWidth.set(b)},a=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",a)}refreshCases(){this.refresh$.next()}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=P({type:o,selectors:[["agentos-case-shell"]],decls:8,vars:24,consts:[[1,"case-shell"],[3,"homeClicked","namespaceSelected","nsMenuToggled","nsMenuClosed","menuToggled","menuClosed","navigateTo","themeToggled","logsToggled","selectedNamespace","namespaces","nsMenuOpen","userInitials","menuOpen","isAdmin","isDark","showTechnical"],[3,"caseSelected","createRequested","toggled","cases","activeCaseId","open"],[3,"homeClicked","namespaceSelected","nsMenuToggled","nsMenuClosed","caseSelected","createRequested","menuToggled","menuClosed","navigateTo","themeToggled","logsToggled","sidebarWidth","selectedNamespace","namespaces","showNsPicker","nsMenuOpen","cases","activeCaseId","userInitials","menuOpen","isAdmin","isDark","showTechnical"],["role","separator","tabindex","-1","aria-label","Resize sidebar",1,"case-shell__resize-handle",3,"mousedown"],[1,"case-shell__main"],[3,"showTechnicalOverride"]],template:function(e,n){e&1&&(s(0,"div",0)(1,"agentos-shell-topbar-mobile",1),f("homeClicked",function(){return n.navigateHome()})("namespaceSelected",function(a){return n.onNamespaceSelected(a)})("nsMenuToggled",function(a){return n.toggleNsMenu(a)})("nsMenuClosed",function(a){return n.closeNsMenu(a)})("menuToggled",function(a){return n.toggleMenu(a)})("menuClosed",function(a){return n.closeMenu(a)})("navigateTo",function(a){return n.onMenuNavigate(a)})("themeToggled",function(){return n.onMenuToggleTheme()})("logsToggled",function(){return n.onMenuToggleLogs()}),l(),s(2,"agentos-shell-case-switcher-mobile",2),f("caseSelected",function(a){return n.onMobileCaseSelect(a)})("createRequested",function(){return n.onMobileCreateCase()})("toggled",function(){return n.toggleMobileSwitcher()}),l(),s(3,"agentos-shell-sidebar",3),f("homeClicked",function(){return n.navigateHome()})("namespaceSelected",function(a){return n.onNamespaceSelected(a)})("nsMenuToggled",function(){return n.toggleNsMenu()})("nsMenuClosed",function(a){return n.closeNsMenu(a)})("caseSelected",function(a){return n.onCaseSelected(a)})("createRequested",function(){return n.onCreateRequested()})("menuToggled",function(a){return n.toggleMenu(a)})("menuClosed",function(a){return n.closeMenu(a)})("navigateTo",function(a){return n.onMenuNavigate(a)})("themeToggled",function(){return n.onMenuToggleTheme()})("logsToggled",function(){return n.onMenuToggleLogs()}),l(),s(4,"div",4),f("mousedown",function(a){return n.onResizeStart(a)}),l(),s(5,"main",5),p(6,hn,1,1,"agentos-case-chat",6)(7,gn,1,0,"agentos-case-home"),l()()),e&2&&(r(),M("selectedNamespace",n.selectedNamespace())("namespaces",n.namespaces())("nsMenuOpen",n.nsMenuOpen())("userInitials",n.userInitials())("menuOpen",n.menuOpen())("isAdmin",n.isAdmin())("isDark",n.isDark())("showTechnical",n.showTechnical()),r(),M("cases",n.cases())("activeCaseId",n.activeCaseId())("open",n.mobileSwitcherOpen()),r(),M("sidebarWidth",n.sidebarWidth())("selectedNamespace",n.selectedNamespace())("namespaces",n.namespaces())("showNsPicker",n.showNsPicker())("nsMenuOpen",n.nsMenuOpen())("cases",n.cases())("activeCaseId",n.activeCaseId())("userInitials",n.userInitials())("menuOpen",n.menuOpen())("isAdmin",n.isAdmin())("isDark",n.isDark())("showTechnical",n.showTechnical()),r(3),_(n.activeCaseId()?6:7))},dependencies:[fe,ve,ye,we,Se],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100dvh}.case-shell[_ngcontent-%COMP%]{display:flex;height:100%;overflow:hidden}.case-shell__resize-handle[_ngcontent-%COMP%]{width:4px;flex-shrink:0;cursor:col-resize;background:var(--color-border, rgba(0, 0, 0, .09));transition:background .15s;position:relative;z-index:10}.case-shell__resize-handle[_ngcontent-%COMP%]:hover, .case-shell__resize-handle[_ngcontent-%COMP%]:active{background:var(--color-primary, #016b71)}.case-shell__main[_ngcontent-%COMP%]{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}.case-shell__main[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1;min-height:0}@media(max-width:900px){.case-shell[_ngcontent-%COMP%]{flex-direction:column;overflow:hidden}.case-shell__resize-handle[_ngcontent-%COMP%]{display:none!important}.case-shell__main[_ngcontent-%COMP%]{flex:1;min-height:0;overflow:hidden}}"],changeDetection:0})};export{fe as a,ve as b,xe as c,Je as d};
@@ -1,2 +1,2 @@
1
- import{e as K}from"./chunk-4URCDOMP.js";import{a as Y,d as J}from"./chunk-XG3WOI3P.js";import{E as H,K as Q,M as Z,N as $,h as N,i as B,t as U}from"./chunk-TZKO65ML.js";import{$b as F,Cb as T,Db as _,Gb as E,Hb as M,Jb as L,Ka as m,Kb as A,Lb as O,Pb as P,Rb as v,Sb as q,Tc as G,V as u,Wa as x,Xa as R,Y as w,Z as f,_ as y,aa as k,ca as c,ia as I,jb as g,lb as D,mb as S,mc as V,oa as p,rb as h,sb as s,tb as l,tc as j,ub as n,uc as r,va as C,vc as X,ya as z}from"./chunk-RYEX2DR7.js";var ae=["switch"],ie=["*"];function ce(a,d){a&1&&(s(0,"span",11),I(),s(1,"svg",13),n(2,"path",14),l(),s(3,"svg",15),n(4,"path",16),l()())}var se=new k("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1,hideIcon:!1,disabledInteractive:!1})}),b=class{source;checked;constructor(d,e){this.source=d,this.checked=e}},de=(()=>{class a{_elementRef=c(z);_focusMonitor=c(N);_changeDetectorRef=c(j);defaults=c(se);_onChange=e=>{};_onTouched=()=>{};_validatorOnChange=()=>{};_uniqueId;_checked=!1;_createChangeEvent(e){return new b(this,e)}_labelId;get buttonId(){return`${this.id||this._uniqueId}-button`}_switchElement;focus(){this._switchElement.nativeElement.focus()}_noopAnimations=Q();_focused=!1;name=null;id;labelPosition="after";ariaLabel=null;ariaLabelledby=null;ariaDescribedby;required=!1;color;disabled=!1;disableRipple=!1;tabIndex=0;get checked(){return this._checked}set checked(e){this._checked=e,this._changeDetectorRef.markForCheck()}hideIcon;disabledInteractive;change=new p;toggleChange=new p;get inputId(){return`${this.id||this._uniqueId}-input`}constructor(){c(B).load($);let e=c(new V("tabindex"),{optional:!0}),i=this.defaults;this.tabIndex=e==null?0:parseInt(e)||0,this.color=i.color||"accent",this.id=this._uniqueId=c(U).getId("mat-mdc-slide-toggle-"),this.hideIcon=i.hideIcon??!1,this.disabledInteractive=i.disabledInteractive??!1,this._labelId=this._uniqueId+"-label"}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{e==="keyboard"||e==="program"?(this._focused=!0,this._changeDetectorRef.markForCheck()):e||Promise.resolve().then(()=>{this._focused=!1,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!==!0?{required:!0}: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=x({type:a,selectors:[["mat-slide-toggle"]],viewQuery:function(i,t){if(i&1&&L(ae,5),i&2){let o;A(o=O())&&(t._switchElement=o.first)}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:13,hostBindings:function(i,t){i&2&&(T("id",t.id),g("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),q(t.color?"mat-"+t.color:""),v("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",r],color:"color",disabled:[2,"disabled","disabled",r],disableRipple:[2,"disableRipple","disableRipple",r],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:X(e)],checked:[2,"checked","checked",r],hideIcon:[2,"hideIcon","hideIcon",r],disabledInteractive:[2,"disabledInteractive","disabledInteractive",r]},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],features:[F([{provide:Y,useExisting:w(()=>a),multi:!0},{provide:J,useExisting:a,multi:!0}]),C],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&&(E(),s(0,"div",1)(1,"button",2,0),_("click",function(){return t._handleClick()}),n(3,"div",3)(4,"span",4),s(5,"span",5)(6,"span",6)(7,"span",7),n(8,"span",8),l(),s(9,"span",9),n(10,"span",10),l(),D(11,ce,5,0,"span",11),l()()(),s(12,"label",12),_("click",function(ee){return ee.stopPropagation()}),M(13),l()()),i&2){let o=P(2);h("labelPosition",t.labelPosition),m(),v("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),h("tabIndex",t.disabled&&!t.disabledInteractive?-1:t.tabIndex)("disabled",t.disabled&&!t.disabledInteractive),g("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),m(9),h("matRippleTrigger",o)("matRippleDisabled",t.disableRipple||t.disabled)("matRippleCentered",!0),m(),S(t.hideIcon?-1:11),m(),h("for",t.buttonId),g("id",t._labelId)}},dependencies:[Z,K],styles:[`.mdc-switch{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;flex-shrink:0;margin:0;outline:none;overflow:visible;padding:0;position:relative;width:var(--mat-slide-toggle-track-width, 52px)}.mdc-switch.mdc-switch--disabled{cursor:default;pointer-events:none}.mdc-switch.mat-mdc-slide-toggle-disabled-interactive{pointer-events:auto}.mdc-switch__track{overflow:hidden;position:relative;width:100%;height:var(--mat-slide-toggle-track-height, 32px);border-radius:var(--mat-slide-toggle-track-shape, var(--mat-sys-corner-full))}.mdc-switch--disabled.mdc-switch .mdc-switch__track{opacity:var(--mat-slide-toggle-disabled-track-opacity, 0.12)}.mdc-switch__track::before,.mdc-switch__track::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;position:absolute;width:100%;border-width:var(--mat-slide-toggle-track-outline-width, 2px);border-color:var(--mat-slide-toggle-track-outline-color, var(--mat-sys-outline))}.mdc-switch--selected .mdc-switch__track::before,.mdc-switch--selected .mdc-switch__track::after{border-width:var(--mat-slide-toggle-selected-track-outline-width, 2px);border-color:var(--mat-slide-toggle-selected-track-outline-color, transparent)}.mdc-switch--disabled .mdc-switch__track::before,.mdc-switch--disabled .mdc-switch__track::after{border-width:var(--mat-slide-toggle-disabled-unselected-track-outline-width, 2px);border-color:var(--mat-slide-toggle-disabled-unselected-track-outline-color, var(--mat-sys-on-surface))}@media(forced-colors: active){.mdc-switch__track{border-color:currentColor}}.mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0);background:var(--mat-slide-toggle-unselected-track-color, var(--mat-sys-surface-variant))}.mdc-switch--selected .mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch--selected .mdc-switch__track::before{transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::before{opacity:var(--mat-slide-toggle-hidden-track-opacity, 0);transition:var(--mat-slide-toggle-hidden-track-transition, opacity 75ms)}.mdc-switch--unselected .mdc-switch__track::before{opacity:var(--mat-slide-toggle-visible-track-opacity, 1);transition:var(--mat-slide-toggle-visible-track-transition, opacity 75ms)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:var(--mat-slide-toggle-unselected-hover-track-color, var(--mat-sys-surface-variant))}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:var(--mat-slide-toggle-unselected-focus-track-color, var(--mat-sys-surface-variant))}.mdc-switch:enabled:active .mdc-switch__track::before{background:var(--mat-slide-toggle-unselected-pressed-track-color, var(--mat-sys-surface-variant))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__track::before,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__track::before,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__track::before,.mdc-switch.mdc-switch--disabled .mdc-switch__track::before{background:var(--mat-slide-toggle-disabled-unselected-track-color, var(--mat-sys-surface-variant))}.mdc-switch__track::after{transform:translateX(-100%);background:var(--mat-slide-toggle-selected-track-color, var(--mat-sys-primary))}[dir=rtl] .mdc-switch__track::after{transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::after{transform:translateX(0)}.mdc-switch--selected .mdc-switch__track::after{opacity:var(--mat-slide-toggle-visible-track-opacity, 1);transition:var(--mat-slide-toggle-visible-track-transition, opacity 75ms)}.mdc-switch--unselected .mdc-switch__track::after{opacity:var(--mat-slide-toggle-hidden-track-opacity, 0);transition:var(--mat-slide-toggle-hidden-track-transition, opacity 75ms)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:var(--mat-slide-toggle-selected-hover-track-color, var(--mat-sys-primary))}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:var(--mat-slide-toggle-selected-focus-track-color, var(--mat-sys-primary))}.mdc-switch:enabled:active .mdc-switch__track::after{background:var(--mat-slide-toggle-selected-pressed-track-color, var(--mat-sys-primary))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__track::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__track::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__track::after,.mdc-switch.mdc-switch--disabled .mdc-switch__track::after{background:var(--mat-slide-toggle-disabled-selected-track-color, var(--mat-sys-on-surface))}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);left:0;right:auto;transform:translateX(0);width:calc(100% - var(--mat-slide-toggle-handle-width))}[dir=rtl] .mdc-switch__handle-track{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track{transform:translateX(-100%)}.mdc-switch__handle{display:flex;pointer-events:auto;position:absolute;top:50%;transform:translateY(-50%);left:0;right:auto;transition:width 75ms cubic-bezier(0.4, 0, 0.2, 1),height 75ms cubic-bezier(0.4, 0, 0.2, 1),margin 75ms cubic-bezier(0.4, 0, 0.2, 1);width:var(--mat-slide-toggle-handle-width);height:var(--mat-slide-toggle-handle-height);border-radius:var(--mat-slide-toggle-handle-shape, var(--mat-sys-corner-full))}[dir=rtl] .mdc-switch__handle{left:auto;right:0}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle{width:var(--mat-slide-toggle-unselected-handle-size, 16px);height:var(--mat-slide-toggle-unselected-handle-size, 16px);margin:var(--mat-slide-toggle-unselected-handle-horizontal-margin, 0 8px)}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-slide-toggle-unselected-with-icon-handle-horizontal-margin, 0 4px)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle{width:var(--mat-slide-toggle-selected-handle-size, 24px);height:var(--mat-slide-toggle-selected-handle-size, 24px);margin:var(--mat-slide-toggle-selected-handle-horizontal-margin, 0 24px)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-slide-toggle-selected-with-icon-handle-horizontal-margin, 0 24px)}.mat-mdc-slide-toggle .mdc-switch__handle:has(.mdc-switch__icons){width:var(--mat-slide-toggle-with-icon-handle-size, 24px);height:var(--mat-slide-toggle-with-icon-handle-size, 24px)}.mat-mdc-slide-toggle .mdc-switch:active:not(.mdc-switch--disabled) .mdc-switch__handle{width:var(--mat-slide-toggle-pressed-handle-size, 28px);height:var(--mat-slide-toggle-pressed-handle-size, 28px)}.mat-mdc-slide-toggle .mdc-switch--selected:active:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-slide-toggle-selected-pressed-handle-horizontal-margin, 0 22px)}.mat-mdc-slide-toggle .mdc-switch--unselected:active:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-slide-toggle-unselected-pressed-handle-horizontal-margin, 0 2px)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__handle::after{opacity:var(--mat-slide-toggle-disabled-selected-handle-opacity, 1)}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__handle::after{opacity:var(--mat-slide-toggle-disabled-unselected-handle-opacity, 0.38)}.mdc-switch__handle::before,.mdc-switch__handle::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";width:100%;height:100%;left:0;position:absolute;top:0;transition:background-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1),border-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);z-index:-1}@media(forced-colors: active){.mdc-switch__handle::before,.mdc-switch__handle::after{border-color:currentColor}}.mdc-switch--selected:enabled .mdc-switch__handle::after{background:var(--mat-slide-toggle-selected-handle-color, var(--mat-sys-on-primary))}.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mat-slide-toggle-selected-hover-handle-color, var(--mat-sys-primary-container))}.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mat-slide-toggle-selected-focus-handle-color, var(--mat-sys-primary-container))}.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:var(--mat-slide-toggle-selected-pressed-handle-color, var(--mat-sys-primary-container))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:hover:not(:focus):not(:active) .mdc-switch__handle::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:focus:not(:active) .mdc-switch__handle::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:active .mdc-switch__handle::after,.mdc-switch--selected.mdc-switch--disabled .mdc-switch__handle::after{background:var(--mat-slide-toggle-disabled-selected-handle-color, var(--mat-sys-surface))}.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:var(--mat-slide-toggle-unselected-handle-color, var(--mat-sys-outline))}.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mat-slide-toggle-unselected-hover-handle-color, var(--mat-sys-on-surface-variant))}.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mat-slide-toggle-unselected-focus-handle-color, var(--mat-sys-on-surface-variant))}.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:var(--mat-slide-toggle-unselected-pressed-handle-color, var(--mat-sys-on-surface-variant))}.mdc-switch--unselected.mdc-switch--disabled .mdc-switch__handle::after{background:var(--mat-slide-toggle-disabled-unselected-handle-color, var(--mat-sys-on-surface))}.mdc-switch__handle::before{background:var(--mat-slide-toggle-handle-surface-color)}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mat-slide-toggle-handle-elevation-shadow)}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__shadow,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__shadow,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__shadow,.mdc-switch.mdc-switch--disabled .mdc-switch__shadow{box-shadow:var(--mat-slide-toggle-disabled-handle-elevation-shadow)}.mdc-switch__ripple{left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);z-index:-1;width:var(--mat-slide-toggle-state-layer-size, 40px);height:var(--mat-slide-toggle-state-layer-size, 40px)}.mdc-switch__ripple::after{content:"";opacity:0}.mdc-switch--disabled .mdc-switch__ripple::after{display:none}.mat-mdc-slide-toggle-disabled-interactive .mdc-switch__ripple::after{display:block}.mdc-switch:hover .mdc-switch__ripple::after{transition:75ms opacity cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:focus .mdc-switch__ripple::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:active .mdc-switch__ripple::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:hover:not(:focus) .mdc-switch__ripple::after,.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mat-slide-toggle-unselected-hover-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mat-slide-toggle-unselected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::after{background:var(--mat-slide-toggle-unselected-focus-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mat-slide-toggle-unselected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mdc-switch--unselected:enabled:active .mdc-switch__ripple::after{background:var(--mat-slide-toggle-unselected-pressed-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mat-slide-toggle-unselected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));transition:opacity 75ms linear}.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mat-slide-toggle-selected-hover-state-layer-color, var(--mat-sys-primary));opacity:var(--mat-slide-toggle-selected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mdc-switch--selected:enabled:focus .mdc-switch__ripple::after{background:var(--mat-slide-toggle-selected-focus-state-layer-color, var(--mat-sys-primary));opacity:var(--mat-slide-toggle-selected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mdc-switch--selected:enabled:active .mdc-switch__ripple::after{background:var(--mat-slide-toggle-selected-pressed-state-layer-color, var(--mat-sys-primary));opacity:var(--mat-slide-toggle-selected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));transition:opacity 75ms linear}.mdc-switch__icons{position:relative;height:100%;width:100%;z-index:1;transform:translateZ(0)}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__icons{opacity:var(--mat-slide-toggle-disabled-unselected-icon-opacity, 0.38)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__icons{opacity:var(--mat-slide-toggle-disabled-selected-icon-opacity, 0.38)}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;transition:opacity 30ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-switch--unselected .mdc-switch__icon{width:var(--mat-slide-toggle-unselected-icon-size, 16px);height:var(--mat-slide-toggle-unselected-icon-size, 16px);fill:var(--mat-slide-toggle-unselected-icon-color, var(--mat-sys-surface-variant))}.mdc-switch--unselected.mdc-switch--disabled .mdc-switch__icon{fill:var(--mat-slide-toggle-disabled-unselected-icon-color, var(--mat-sys-surface-variant))}.mdc-switch--selected .mdc-switch__icon{width:var(--mat-slide-toggle-selected-icon-size, 16px);height:var(--mat-slide-toggle-selected-icon-size, 16px);fill:var(--mat-slide-toggle-selected-icon-color, var(--mat-sys-on-primary-container))}.mdc-switch--selected.mdc-switch--disabled .mdc-switch__icon{fill:var(--mat-slide-toggle-disabled-selected-icon-color, var(--mat-sys-on-surface))}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;transition:opacity 45ms 30ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle{-webkit-user-select:none;user-select:none;display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,.mat-mdc-slide-toggle .mdc-switch__ripple::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple:not(:empty),.mat-mdc-slide-toggle .mdc-switch__ripple::after:not(:empty){transform:translateZ(0)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mat-focus-indicator::before{content:""}.mat-mdc-slide-toggle .mat-internal-form-field{color:var(--mat-slide-toggle-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-slide-toggle-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-slide-toggle-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-slide-toggle-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-slide-toggle-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-slide-toggle-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-slide-toggle .mat-ripple-element{opacity:.12}.mat-mdc-slide-toggle .mat-focus-indicator::before{border-radius:50%}.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle-track,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__icon,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::after,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::after{transition:none}.mat-mdc-slide-toggle .mdc-switch:enabled+.mdc-label{cursor:pointer}.mat-mdc-slide-toggle .mdc-switch--disabled+label{color:var(--mat-slide-toggle-disabled-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-slide-toggle label:empty{display:none}.mat-mdc-slide-toggle-touch-target{position:absolute;top:50%;left:50%;height:var(--mat-slide-toggle-touch-target-size, 48px);width:100%;transform:translate(-50%, -50%);display:var(--mat-slide-toggle-touch-target-display, block)}[dir=rtl] .mat-mdc-slide-toggle-touch-target{left:auto;right:50%;transform:translate(50%, -50%)}
1
+ import{e as K}from"./chunk-PKBNMAQJ.js";import{a as Y,d as J}from"./chunk-WLSXA23B.js";import{E as H,K as Q,M as Z,N as $,h as N,i as B,t as U}from"./chunk-E3XC4CVU.js";import{Cb as T,Db as _,Gb as E,Hb as M,Jb as L,Ka as m,Kb as A,Lb as O,Pb as P,Rb as v,Sb as q,Uc as G,V as u,Wa as x,Xa as R,Y as w,Z as f,_ as y,aa as k,ac as F,ca as c,ia as I,jb as g,lb as D,mb as S,nc as V,oa as p,rb as h,sb as s,tb as l,ub as n,uc as j,va as C,vc as r,wc as X,ya as z}from"./chunk-5J7BTB5J.js";var ae=["switch"],ie=["*"];function ce(a,d){a&1&&(s(0,"span",11),I(),s(1,"svg",13),n(2,"path",14),l(),s(3,"svg",15),n(4,"path",16),l()())}var se=new k("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1,hideIcon:!1,disabledInteractive:!1})}),b=class{source;checked;constructor(d,e){this.source=d,this.checked=e}},de=(()=>{class a{_elementRef=c(z);_focusMonitor=c(N);_changeDetectorRef=c(j);defaults=c(se);_onChange=e=>{};_onTouched=()=>{};_validatorOnChange=()=>{};_uniqueId;_checked=!1;_createChangeEvent(e){return new b(this,e)}_labelId;get buttonId(){return`${this.id||this._uniqueId}-button`}_switchElement;focus(){this._switchElement.nativeElement.focus()}_noopAnimations=Q();_focused=!1;name=null;id;labelPosition="after";ariaLabel=null;ariaLabelledby=null;ariaDescribedby;required=!1;color;disabled=!1;disableRipple=!1;tabIndex=0;get checked(){return this._checked}set checked(e){this._checked=e,this._changeDetectorRef.markForCheck()}hideIcon;disabledInteractive;change=new p;toggleChange=new p;get inputId(){return`${this.id||this._uniqueId}-input`}constructor(){c(B).load($);let e=c(new V("tabindex"),{optional:!0}),i=this.defaults;this.tabIndex=e==null?0:parseInt(e)||0,this.color=i.color||"accent",this.id=this._uniqueId=c(U).getId("mat-mdc-slide-toggle-"),this.hideIcon=i.hideIcon??!1,this.disabledInteractive=i.disabledInteractive??!1,this._labelId=this._uniqueId+"-label"}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{e==="keyboard"||e==="program"?(this._focused=!0,this._changeDetectorRef.markForCheck()):e||Promise.resolve().then(()=>{this._focused=!1,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!==!0?{required:!0}: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=x({type:a,selectors:[["mat-slide-toggle"]],viewQuery:function(i,t){if(i&1&&L(ae,5),i&2){let o;A(o=O())&&(t._switchElement=o.first)}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:13,hostBindings:function(i,t){i&2&&(T("id",t.id),g("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),q(t.color?"mat-"+t.color:""),v("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",r],color:"color",disabled:[2,"disabled","disabled",r],disableRipple:[2,"disableRipple","disableRipple",r],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:X(e)],checked:[2,"checked","checked",r],hideIcon:[2,"hideIcon","hideIcon",r],disabledInteractive:[2,"disabledInteractive","disabledInteractive",r]},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],features:[F([{provide:Y,useExisting:w(()=>a),multi:!0},{provide:J,useExisting:a,multi:!0}]),C],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&&(E(),s(0,"div",1)(1,"button",2,0),_("click",function(){return t._handleClick()}),n(3,"div",3)(4,"span",4),s(5,"span",5)(6,"span",6)(7,"span",7),n(8,"span",8),l(),s(9,"span",9),n(10,"span",10),l(),D(11,ce,5,0,"span",11),l()()(),s(12,"label",12),_("click",function(ee){return ee.stopPropagation()}),M(13),l()()),i&2){let o=P(2);h("labelPosition",t.labelPosition),m(),v("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),h("tabIndex",t.disabled&&!t.disabledInteractive?-1:t.tabIndex)("disabled",t.disabled&&!t.disabledInteractive),g("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),m(9),h("matRippleTrigger",o)("matRippleDisabled",t.disableRipple||t.disabled)("matRippleCentered",!0),m(),S(t.hideIcon?-1:11),m(),h("for",t.buttonId),g("id",t._labelId)}},dependencies:[Z,K],styles:[`.mdc-switch{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;flex-shrink:0;margin:0;outline:none;overflow:visible;padding:0;position:relative;width:var(--mat-slide-toggle-track-width, 52px)}.mdc-switch.mdc-switch--disabled{cursor:default;pointer-events:none}.mdc-switch.mat-mdc-slide-toggle-disabled-interactive{pointer-events:auto}.mdc-switch__track{overflow:hidden;position:relative;width:100%;height:var(--mat-slide-toggle-track-height, 32px);border-radius:var(--mat-slide-toggle-track-shape, var(--mat-sys-corner-full))}.mdc-switch--disabled.mdc-switch .mdc-switch__track{opacity:var(--mat-slide-toggle-disabled-track-opacity, 0.12)}.mdc-switch__track::before,.mdc-switch__track::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;position:absolute;width:100%;border-width:var(--mat-slide-toggle-track-outline-width, 2px);border-color:var(--mat-slide-toggle-track-outline-color, var(--mat-sys-outline))}.mdc-switch--selected .mdc-switch__track::before,.mdc-switch--selected .mdc-switch__track::after{border-width:var(--mat-slide-toggle-selected-track-outline-width, 2px);border-color:var(--mat-slide-toggle-selected-track-outline-color, transparent)}.mdc-switch--disabled .mdc-switch__track::before,.mdc-switch--disabled .mdc-switch__track::after{border-width:var(--mat-slide-toggle-disabled-unselected-track-outline-width, 2px);border-color:var(--mat-slide-toggle-disabled-unselected-track-outline-color, var(--mat-sys-on-surface))}@media(forced-colors: active){.mdc-switch__track{border-color:currentColor}}.mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0);background:var(--mat-slide-toggle-unselected-track-color, var(--mat-sys-surface-variant))}.mdc-switch--selected .mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch--selected .mdc-switch__track::before{transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::before{opacity:var(--mat-slide-toggle-hidden-track-opacity, 0);transition:var(--mat-slide-toggle-hidden-track-transition, opacity 75ms)}.mdc-switch--unselected .mdc-switch__track::before{opacity:var(--mat-slide-toggle-visible-track-opacity, 1);transition:var(--mat-slide-toggle-visible-track-transition, opacity 75ms)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:var(--mat-slide-toggle-unselected-hover-track-color, var(--mat-sys-surface-variant))}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:var(--mat-slide-toggle-unselected-focus-track-color, var(--mat-sys-surface-variant))}.mdc-switch:enabled:active .mdc-switch__track::before{background:var(--mat-slide-toggle-unselected-pressed-track-color, var(--mat-sys-surface-variant))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__track::before,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__track::before,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__track::before,.mdc-switch.mdc-switch--disabled .mdc-switch__track::before{background:var(--mat-slide-toggle-disabled-unselected-track-color, var(--mat-sys-surface-variant))}.mdc-switch__track::after{transform:translateX(-100%);background:var(--mat-slide-toggle-selected-track-color, var(--mat-sys-primary))}[dir=rtl] .mdc-switch__track::after{transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::after{transform:translateX(0)}.mdc-switch--selected .mdc-switch__track::after{opacity:var(--mat-slide-toggle-visible-track-opacity, 1);transition:var(--mat-slide-toggle-visible-track-transition, opacity 75ms)}.mdc-switch--unselected .mdc-switch__track::after{opacity:var(--mat-slide-toggle-hidden-track-opacity, 0);transition:var(--mat-slide-toggle-hidden-track-transition, opacity 75ms)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:var(--mat-slide-toggle-selected-hover-track-color, var(--mat-sys-primary))}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:var(--mat-slide-toggle-selected-focus-track-color, var(--mat-sys-primary))}.mdc-switch:enabled:active .mdc-switch__track::after{background:var(--mat-slide-toggle-selected-pressed-track-color, var(--mat-sys-primary))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__track::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__track::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__track::after,.mdc-switch.mdc-switch--disabled .mdc-switch__track::after{background:var(--mat-slide-toggle-disabled-selected-track-color, var(--mat-sys-on-surface))}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);left:0;right:auto;transform:translateX(0);width:calc(100% - var(--mat-slide-toggle-handle-width))}[dir=rtl] .mdc-switch__handle-track{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track{transform:translateX(-100%)}.mdc-switch__handle{display:flex;pointer-events:auto;position:absolute;top:50%;transform:translateY(-50%);left:0;right:auto;transition:width 75ms cubic-bezier(0.4, 0, 0.2, 1),height 75ms cubic-bezier(0.4, 0, 0.2, 1),margin 75ms cubic-bezier(0.4, 0, 0.2, 1);width:var(--mat-slide-toggle-handle-width);height:var(--mat-slide-toggle-handle-height);border-radius:var(--mat-slide-toggle-handle-shape, var(--mat-sys-corner-full))}[dir=rtl] .mdc-switch__handle{left:auto;right:0}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle{width:var(--mat-slide-toggle-unselected-handle-size, 16px);height:var(--mat-slide-toggle-unselected-handle-size, 16px);margin:var(--mat-slide-toggle-unselected-handle-horizontal-margin, 0 8px)}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-slide-toggle-unselected-with-icon-handle-horizontal-margin, 0 4px)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle{width:var(--mat-slide-toggle-selected-handle-size, 24px);height:var(--mat-slide-toggle-selected-handle-size, 24px);margin:var(--mat-slide-toggle-selected-handle-horizontal-margin, 0 24px)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-slide-toggle-selected-with-icon-handle-horizontal-margin, 0 24px)}.mat-mdc-slide-toggle .mdc-switch__handle:has(.mdc-switch__icons){width:var(--mat-slide-toggle-with-icon-handle-size, 24px);height:var(--mat-slide-toggle-with-icon-handle-size, 24px)}.mat-mdc-slide-toggle .mdc-switch:active:not(.mdc-switch--disabled) .mdc-switch__handle{width:var(--mat-slide-toggle-pressed-handle-size, 28px);height:var(--mat-slide-toggle-pressed-handle-size, 28px)}.mat-mdc-slide-toggle .mdc-switch--selected:active:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-slide-toggle-selected-pressed-handle-horizontal-margin, 0 22px)}.mat-mdc-slide-toggle .mdc-switch--unselected:active:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-slide-toggle-unselected-pressed-handle-horizontal-margin, 0 2px)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__handle::after{opacity:var(--mat-slide-toggle-disabled-selected-handle-opacity, 1)}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__handle::after{opacity:var(--mat-slide-toggle-disabled-unselected-handle-opacity, 0.38)}.mdc-switch__handle::before,.mdc-switch__handle::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";width:100%;height:100%;left:0;position:absolute;top:0;transition:background-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1),border-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);z-index:-1}@media(forced-colors: active){.mdc-switch__handle::before,.mdc-switch__handle::after{border-color:currentColor}}.mdc-switch--selected:enabled .mdc-switch__handle::after{background:var(--mat-slide-toggle-selected-handle-color, var(--mat-sys-on-primary))}.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mat-slide-toggle-selected-hover-handle-color, var(--mat-sys-primary-container))}.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mat-slide-toggle-selected-focus-handle-color, var(--mat-sys-primary-container))}.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:var(--mat-slide-toggle-selected-pressed-handle-color, var(--mat-sys-primary-container))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:hover:not(:focus):not(:active) .mdc-switch__handle::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:focus:not(:active) .mdc-switch__handle::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:active .mdc-switch__handle::after,.mdc-switch--selected.mdc-switch--disabled .mdc-switch__handle::after{background:var(--mat-slide-toggle-disabled-selected-handle-color, var(--mat-sys-surface))}.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:var(--mat-slide-toggle-unselected-handle-color, var(--mat-sys-outline))}.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mat-slide-toggle-unselected-hover-handle-color, var(--mat-sys-on-surface-variant))}.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mat-slide-toggle-unselected-focus-handle-color, var(--mat-sys-on-surface-variant))}.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:var(--mat-slide-toggle-unselected-pressed-handle-color, var(--mat-sys-on-surface-variant))}.mdc-switch--unselected.mdc-switch--disabled .mdc-switch__handle::after{background:var(--mat-slide-toggle-disabled-unselected-handle-color, var(--mat-sys-on-surface))}.mdc-switch__handle::before{background:var(--mat-slide-toggle-handle-surface-color)}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mat-slide-toggle-handle-elevation-shadow)}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__shadow,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__shadow,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__shadow,.mdc-switch.mdc-switch--disabled .mdc-switch__shadow{box-shadow:var(--mat-slide-toggle-disabled-handle-elevation-shadow)}.mdc-switch__ripple{left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);z-index:-1;width:var(--mat-slide-toggle-state-layer-size, 40px);height:var(--mat-slide-toggle-state-layer-size, 40px)}.mdc-switch__ripple::after{content:"";opacity:0}.mdc-switch--disabled .mdc-switch__ripple::after{display:none}.mat-mdc-slide-toggle-disabled-interactive .mdc-switch__ripple::after{display:block}.mdc-switch:hover .mdc-switch__ripple::after{transition:75ms opacity cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:focus .mdc-switch__ripple::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:active .mdc-switch__ripple::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:hover:not(:focus) .mdc-switch__ripple::after,.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mat-slide-toggle-unselected-hover-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mat-slide-toggle-unselected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::after{background:var(--mat-slide-toggle-unselected-focus-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mat-slide-toggle-unselected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mdc-switch--unselected:enabled:active .mdc-switch__ripple::after{background:var(--mat-slide-toggle-unselected-pressed-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mat-slide-toggle-unselected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));transition:opacity 75ms linear}.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mat-slide-toggle-selected-hover-state-layer-color, var(--mat-sys-primary));opacity:var(--mat-slide-toggle-selected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mdc-switch--selected:enabled:focus .mdc-switch__ripple::after{background:var(--mat-slide-toggle-selected-focus-state-layer-color, var(--mat-sys-primary));opacity:var(--mat-slide-toggle-selected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mdc-switch--selected:enabled:active .mdc-switch__ripple::after{background:var(--mat-slide-toggle-selected-pressed-state-layer-color, var(--mat-sys-primary));opacity:var(--mat-slide-toggle-selected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));transition:opacity 75ms linear}.mdc-switch__icons{position:relative;height:100%;width:100%;z-index:1;transform:translateZ(0)}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__icons{opacity:var(--mat-slide-toggle-disabled-unselected-icon-opacity, 0.38)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__icons{opacity:var(--mat-slide-toggle-disabled-selected-icon-opacity, 0.38)}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;transition:opacity 30ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-switch--unselected .mdc-switch__icon{width:var(--mat-slide-toggle-unselected-icon-size, 16px);height:var(--mat-slide-toggle-unselected-icon-size, 16px);fill:var(--mat-slide-toggle-unselected-icon-color, var(--mat-sys-surface-variant))}.mdc-switch--unselected.mdc-switch--disabled .mdc-switch__icon{fill:var(--mat-slide-toggle-disabled-unselected-icon-color, var(--mat-sys-surface-variant))}.mdc-switch--selected .mdc-switch__icon{width:var(--mat-slide-toggle-selected-icon-size, 16px);height:var(--mat-slide-toggle-selected-icon-size, 16px);fill:var(--mat-slide-toggle-selected-icon-color, var(--mat-sys-on-primary-container))}.mdc-switch--selected.mdc-switch--disabled .mdc-switch__icon{fill:var(--mat-slide-toggle-disabled-selected-icon-color, var(--mat-sys-on-surface))}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;transition:opacity 45ms 30ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle{-webkit-user-select:none;user-select:none;display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,.mat-mdc-slide-toggle .mdc-switch__ripple::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple:not(:empty),.mat-mdc-slide-toggle .mdc-switch__ripple::after:not(:empty){transform:translateZ(0)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mat-focus-indicator::before{content:""}.mat-mdc-slide-toggle .mat-internal-form-field{color:var(--mat-slide-toggle-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-slide-toggle-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-slide-toggle-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-slide-toggle-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-slide-toggle-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-slide-toggle-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-slide-toggle .mat-ripple-element{opacity:.12}.mat-mdc-slide-toggle .mat-focus-indicator::before{border-radius:50%}.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle-track,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__icon,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::after,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::after{transition:none}.mat-mdc-slide-toggle .mdc-switch:enabled+.mdc-label{cursor:pointer}.mat-mdc-slide-toggle .mdc-switch--disabled+label{color:var(--mat-slide-toggle-disabled-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-slide-toggle label:empty{display:none}.mat-mdc-slide-toggle-touch-target{position:absolute;top:50%;left:50%;height:var(--mat-slide-toggle-touch-target-size, 48px);width:100%;transform:translate(-50%, -50%);display:var(--mat-slide-toggle-touch-target-display, block)}[dir=rtl] .mat-mdc-slide-toggle-touch-target{left:auto;right:50%;transform:translate(50%, -50%)}
2
2
  `],encapsulation:2,changeDetection:0})}return a})(),Ie=(()=>{class a{static \u0275fac=function(i){return new(i||a)};static \u0275mod=R({type:a});static \u0275inj=y({imports:[de,H]})}return a})();var W=class a{http=c(G);getUserConfig(){return this.http.get("/api/config/user").pipe(u(d=>console.log("[CONFIG-API] User config retrieved:",d)))}updateUserConfig(d){return this.http.put("/api/config/user",d).pipe(u(e=>console.log("[CONFIG-API] User config updated:",e)))}static \u0275fac=function(e){return new(e||a)};static \u0275prov=f({token:a,factory:a.\u0275fac,providedIn:"root"})};export{de as a,Ie as b,W as c};
@@ -0,0 +1 @@
1
+ import{a as L}from"./chunk-22RX22JY.js";import{a as D}from"./chunk-BMUZTI7K.js";import"./chunk-G2BRVRGR.js";import{a as E,c as $}from"./chunk-7MQRVE7E.js";import{t as O}from"./chunk-BGEXT3EN.js";import"./chunk-PKBNMAQJ.js";import"./chunk-OBV4LQBZ.js";import{a as l}from"./chunk-IRZNRZ5Q.js";import"./chunk-FAM7HWYV.js";import"./chunk-WLSXA23B.js";import"./chunk-E3XC4CVU.js";import{Bb as x,D as y,Db as m,Fb as a,Ic as T,Pb as N,S as P,Tb as w,Wa as b,ab as v,bc as M,ca as p,ec as B,fc as S,ga as g,ha as h,i as d,ic as k,lb as I,m as u,ma as C,mb as R,rb as s,sb as i,t as f,tb as c,z as _}from"./chunk-5J7BTB5J.js";var F=()=>[];function U(r,t){if(r&1){let o=x();i(0,"agentos-prompt-item",4),m("deleteRequested",function(n){g(o);let A=a(2);return h(A.deletePrompt(n))}),c()}if(r&2){let o=a().$implicit,e=a();s("prompt",t)("namespaceId",e.namespaceId)("readOnly",e.isPlatformPrompt(o.id))}}function V(r,t){if(r&1&&I(0,U,1,3,"agentos-prompt-item",3),r&2){let o,e=t.$implicit,n=a();R((o=n.resolvePrompt(e.id))?0:-1,o)}}var j="platform",G="namespace",q=class r{route=p(E);router=p($);destroyRef=p(C);promptState=p(D);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new d(void 0);allPrompts$=this.refresh$.pipe(P(()=>_({platform:this.promptState.listPlatform().pipe(y(()=>u([]))),namespace:this.promptState.listByNamespace(this.namespaceId)})));promptItems$=this.allPrompts$.pipe(f(({platform:t,namespace:o})=>[...t.map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:j,groupLabel:"Platform (read-only)"})),...o.map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:G,groupLabel:"Namespace"}))]));namespacePromptsById=new Map;platformPromptsById=new Map;constructor(){this.allPrompts$.pipe(l(this.destroyRef)).subscribe(({platform:t,namespace:o})=>{this.platformPromptsById=new Map(t.map(e=>[e.id??"",e])),this.namespacePromptsById=new Map(o.map(e=>[e.id??"",e]))})}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"prompts","new"])}deletePrompt(t){this.promptState.delete(t.id??"").pipe(l(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolvePrompt(t){return this.platformPromptsById.get(t)??this.namespacePromptsById.get(t)??null}isPlatformPrompt(t){return this.platformPromptsById.has(t)}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=b({type:r,selectors:[["agentos-namespace-prompts"]],decls:6,vars:6,consts:[["promptItemTpl",""],["title","Prompts","emptyMessage","No prompts defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","type","button",1,"namespace-prompts__back",3,"click"],[3,"prompt","namespaceId","readOnly"],[3,"deleteRequested","prompt","namespaceId","readOnly"]],template:function(o,e){if(o&1&&(i(0,"ds-entity-list",1),B(1,"async"),m("createRequested",function(){return e.openCreateForm()}),i(2,"button",2),m("click",function(){return e.goBack()}),w(3,"\u2190 Namespaces"),c()(),v(4,V,1,1,"ng-template",null,0,k)),o&2){let n=N(5);s("items",S(1,3,e.promptItems$)??M(5,F))("showCreate",!0)("itemTemplate",n)}},dependencies:[O,L,T],styles:[".namespace-prompts__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.namespace-prompts__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};export{q as NamespacePromptsComponent};
@@ -1 +1 @@
1
- import{Tc as g,V as c,Z as p,ca as l,m as s,t as a}from"./chunk-RYEX2DR7.js";var m=class n{http=l(g);agentsCache=new Map;getAgents(e){let t=this.agentsCache.get(e);return t?s(t):this.http.get(`/api/projects/${e}/agents`).pipe(c(r=>{this.agentsCache.set(e,r)}))}getAgentsAutocomplete(e,t){return this.getAgents(e).pipe(a(r=>{if(!t)return r;let o=t.toLowerCase();return r.filter(i=>{let h=i.name.toLowerCase(),u=i.description?.toLowerCase()||"";return h.includes(o)||u.includes(o)})}))}clearCache(e){this.agentsCache.delete(e)}clearAllCache(){this.agentsCache.clear()}static \u0275fac=function(t){return new(t||n)};static \u0275prov=p({token:n,factory:n.\u0275fac,providedIn:"root"})};export{m as a};
1
+ import{Uc as g,V as c,Z as p,ca as l,m as s,t as a}from"./chunk-5J7BTB5J.js";var m=class n{http=l(g);agentsCache=new Map;getAgents(e){let t=this.agentsCache.get(e);return t?s(t):this.http.get(`/api/projects/${e}/agents`).pipe(c(r=>{this.agentsCache.set(e,r)}))}getAgentsAutocomplete(e,t){return this.getAgents(e).pipe(a(r=>{if(!t)return r;let o=t.toLowerCase();return r.filter(i=>{let h=i.name.toLowerCase(),u=i.description?.toLowerCase()||"";return h.includes(o)||u.includes(o)})}))}clearCache(e){this.agentsCache.delete(e)}clearAllCache(){this.agentsCache.clear()}static \u0275fac=function(t){return new(t||n)};static \u0275prov=p({token:n,factory:n.\u0275fac,providedIn:"root"})};export{m as a};
@@ -1,4 +1,4 @@
1
- import{$a as V,Aa as ot,B as ae,Ba as de,Ca as me,Da as le,F as tt,Fa as ue,G as oe,Gb as W,Hb as T,J as ne,Ma as be,Mc as _e,Oa as nt,Pa as pe,Q as et,R as ie,Rb as O,Sb as he,T as at,V as re,Wa as y,Wc as ye,Xa as I,Ya as k,Z as c,_ as E,a as u,aa as m,ca as r,db as It,e as Qt,ea as se,g as Xt,h as _,i as qt,ib as fe,jb as wt,ka as A,la as h,m as Jt,oa as xt,pa as b,t as H,ta as K,u as te,ua as ce,uc as N,vb as At,vc as ve,wb as Tt,x as ee,xb as C,xc as ge,ya as D,za as Et}from"./chunk-RYEX2DR7.js";var Mt;try{Mt=typeof Intl<"u"&&Intl.v8BreakIterator}catch(e){Mt=!1}var p=(()=>{class e{_platformId=r(de);isBrowser=this._platformId?_e(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||Mt)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function it(e){return Array.isArray(e)?e:[e]}var xe=new Set,S,rt=(()=>{class e{_platform=r(p);_nonce=r(le,{optional:!0});_matchMedia;constructor(){this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):ca}matchMedia(t){return(this._platform.WEBKIT||this._platform.BLINK)&&sa(t,this._nonce),this._matchMedia(t)}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function sa(e,o){if(!xe.has(e))try{S||(S=document.createElement("style"),o&&S.setAttribute("nonce",o),S.setAttribute("type","text/css"),document.head.appendChild(S)),S.sheet&&(S.sheet.insertRule(`@media ${e} {body{ }}`,0),xe.add(e))}catch(t){console.error(t)}}function ca(e){return{matches:e==="all"||e==="",media:e,addListener:()=>{},removeListener:()=>{}}}var Dt=(()=>{class e{_mediaMatcher=r(rt);_zone=r(b);_queries=new Map;_destroySubject=new _;constructor(){}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(t){return Ee(it(t)).some(n=>this._registerQuery(n).mql.matches)}observe(t){let n=Ee(it(t)).map(s=>this._registerQuery(s).observable),i=te(n);return i=ee(i.pipe(oe(1)),i.pipe(et(1),tt(0))),i.pipe(H(s=>{let d={matches:!1,breakpoints:{}};return s.forEach(({matches:g,query:w})=>{d.matches=d.matches||g,d.breakpoints[w]=g}),d}))}_registerQuery(t){if(this._queries.has(t))return this._queries.get(t);let a=this._mediaMatcher.matchMedia(t),i={observable:new Xt(s=>{let d=g=>this._zone.run(()=>s.next(g));return a.addListener(d),()=>{a.removeListener(d)}}).pipe(ie(a),H(({matches:s})=>({query:t,matches:s})),at(this._destroySubject)),mql:a};return this._queries.set(t,i),i}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Ee(e){return e.map(o=>o.split(",")).reduce((o,t)=>o.concat(t)).map(o=>o.trim())}var so={XSmall:"(max-width: 599.98px)",Small:"(min-width: 600px) and (max-width: 959.98px)",Medium:"(min-width: 960px) and (max-width: 1279.98px)",Large:"(min-width: 1280px) and (max-width: 1919.98px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599.98px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959.98px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"};function G(e){return e.buttons===0||e.detail===0}function Z(e){let o=e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0];return!!o&&o.identifier===-1&&(o.radiusX==null||o.radiusX===1)&&(o.radiusY==null||o.radiusY===1)}var kt;function Ie(){if(kt==null){let e=typeof document<"u"?document.head:null;kt=!!(e&&(e.createShadowRoot||e.attachShadow))}return kt}function Ct(e){if(Ie()){let o=e.getRootNode?e.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&o instanceof ShadowRoot)return o}return null}function da(){let e=typeof document<"u"&&document?document.activeElement:null;for(;e&&e.shadowRoot;){let o=e.shadowRoot.activeElement;if(o===e)break;e=o}return e}function x(e){return e.composedPath?e.composedPath()[0]:e.target}var $;function we(){if($==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>$=!0}))}finally{$=$||!1}return $}function B(e){return we()?e:!!e.capture}function ma(e,o=0){return Ae(e)?Number(e):arguments.length===2?o:0}function Ae(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}function R(e){return e instanceof D?e.nativeElement:e}var Te=new m("cdk-input-modality-detector-options"),Me={ignoreKeys:[18,17,224,91,16]},De=650,Ot={passive:!0,capture:!0},ke=(()=>{class e{_platform=r(p);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new qt(null);_options;_lastTouchMs=0;_onKeydown=t=>{this._options?.ignoreKeys?.some(a=>a===t.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=x(t))};_onMousedown=t=>{Date.now()-this._lastTouchMs<De||(this._modality.next(G(t)?"keyboard":"mouse"),this._mostRecentTarget=x(t))};_onTouchstart=t=>{if(Z(t)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=x(t)};constructor(){let t=r(b),a=r(h),n=r(Te,{optional:!0});if(this._options=u(u({},Me),n),this.modalityDetected=this._modality.pipe(et(1)),this.modalityChanged=this.modalityDetected.pipe(ne()),this._platform.isBrowser){let i=r(nt).createRenderer(null,null);this._listenerCleanups=t.runOutsideAngular(()=>[i.listen(a,"keydown",this._onKeydown,Ot),i.listen(a,"mousedown",this._onMousedown,Ot),i.listen(a,"touchstart",this._onTouchstart,Ot)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(t=>t())}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Y=(function(e){return e[e.IMMEDIATE=0]="IMMEDIATE",e[e.EVENTUAL=1]="EVENTUAL",e})(Y||{}),Ce=new m("cdk-focus-monitor-default-options"),st=B({passive:!0,capture:!0}),Nt=(()=>{class e{_ngZone=r(b);_platform=r(p);_inputModalityDetector=r(ke);_origin=null;_lastFocusOrigin=null;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=r(h);_stopInputModalityDetector=new _;constructor(){let t=r(Ce,{optional:!0});this._detectionMode=t?.detectionMode||Y.IMMEDIATE}_rootNodeFocusAndBlurListener=t=>{let a=x(t);for(let n=a;n;n=n.parentElement)t.type==="focus"?this._onFocus(t,n):this._onBlur(t,n)};monitor(t,a=!1){let n=R(t);if(!this._platform.isBrowser||n.nodeType!==1)return Jt();let i=Ct(n)||this._document,s=this._elementInfo.get(n);if(s)return a&&(s.checkChildren=!0),s.subject;let d={checkChildren:a,subject:new _,rootNode:i};return this._elementInfo.set(n,d),this._registerGlobalListeners(d),d.subject}stopMonitoring(t){let a=R(t),n=this._elementInfo.get(a);n&&(n.subject.complete(),this._setClasses(a),this._elementInfo.delete(a),this._removeGlobalListeners(n))}focusVia(t,a,n){let i=R(t),s=this._document.activeElement;i===s?this._getClosestElementsInfo(i).forEach(([d,g])=>this._originChanged(d,a,g)):(this._setOrigin(a),typeof i.focus=="function"&&i.focus(n))}ngOnDestroy(){this._elementInfo.forEach((t,a)=>this.stopMonitoring(a))}_getWindow(){return this._document.defaultView||window}_getFocusOrigin(t){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(t)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:t&&this._isLastInteractionFromInputLabel(t)?"mouse":"program"}_shouldBeAttributedToTouch(t){return this._detectionMode===Y.EVENTUAL||!!t?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(t,a){t.classList.toggle("cdk-focused",!!a),t.classList.toggle("cdk-touch-focused",a==="touch"),t.classList.toggle("cdk-keyboard-focused",a==="keyboard"),t.classList.toggle("cdk-mouse-focused",a==="mouse"),t.classList.toggle("cdk-program-focused",a==="program")}_setOrigin(t,a=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=t,this._originFromTouchInteraction=t==="touch"&&a,this._detectionMode===Y.IMMEDIATE){clearTimeout(this._originTimeoutId);let n=this._originFromTouchInteraction?De:1;this._originTimeoutId=setTimeout(()=>this._origin=null,n)}})}_onFocus(t,a){let n=this._elementInfo.get(a),i=x(t);!n||!n.checkChildren&&a!==i||this._originChanged(a,this._getFocusOrigin(i),n)}_onBlur(t,a){let n=this._elementInfo.get(a);!n||n.checkChildren&&t.relatedTarget instanceof Node&&a.contains(t.relatedTarget)||(this._setClasses(a),this._emitOrigin(n,null))}_emitOrigin(t,a){t.subject.observers.length&&this._ngZone.run(()=>t.subject.next(a))}_registerGlobalListeners(t){if(!this._platform.isBrowser)return;let a=t.rootNode,n=this._rootNodeFocusListenerCount.get(a)||0;n||this._ngZone.runOutsideAngular(()=>{a.addEventListener("focus",this._rootNodeFocusAndBlurListener,st),a.addEventListener("blur",this._rootNodeFocusAndBlurListener,st)}),this._rootNodeFocusListenerCount.set(a,n+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(at(this._stopInputModalityDetector)).subscribe(i=>{this._setOrigin(i,!0)}))}_removeGlobalListeners(t){let a=t.rootNode;if(this._rootNodeFocusListenerCount.has(a)){let n=this._rootNodeFocusListenerCount.get(a);n>1?this._rootNodeFocusListenerCount.set(a,n-1):(a.removeEventListener("focus",this._rootNodeFocusAndBlurListener,st),a.removeEventListener("blur",this._rootNodeFocusAndBlurListener,st),this._rootNodeFocusListenerCount.delete(a))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(t,a,n){this._setClasses(t,a),this._emitOrigin(n,a),this._lastFocusOrigin=a}_getClosestElementsInfo(t){let a=[];return this._elementInfo.forEach((n,i)=>{(i===t||n.checkChildren&&i.contains(t))&&a.push([i,n])}),a}_isLastInteractionFromInputLabel(t){let{_mostRecentTarget:a,mostRecentModality:n}=this._inputModalityDetector;if(n!=="mouse"||!a||a===t||t.nodeName!=="INPUT"&&t.nodeName!=="TEXTAREA"||t.disabled)return!1;let i=t.labels;if(i){for(let s=0;s<i.length;s++)if(i[s].contains(a))return!0}return!1}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var ct=new WeakMap,M=(()=>{class e{_appRef;_injector=r(A);_environmentInjector=r(se);load(t){let a=this._appRef=this._appRef||this._injector.get(fe),n=ct.get(a);n||(n={loaders:new Set,refs:[]},ct.set(a,n),a.onDestroy(()=>{ct.get(a)?.refs.forEach(i=>i.destroy()),ct.delete(a)})),n.loaders.has(t)||(n.loaders.add(t),n.refs.push(ge(t,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var mt=(()=>{class e{static \u0275fac=function(a){return new(a||e)};static \u0275cmp=y({type:e,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(a,n){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}
1
+ import{$a as V,Aa as ot,B as ae,Ba as de,Ca as me,Da as le,F as tt,Fa as ue,G as oe,Gb as W,Hb as T,J as ne,Ma as be,Nc as _e,Oa as nt,Pa as pe,Q as et,R as ie,Rb as O,Sb as he,T as at,V as re,Wa as y,Xa as I,Xc as ye,Ya as k,Z as c,_ as E,a as u,aa as m,ca as r,db as It,e as Qt,ea as se,g as Xt,h as _,i as qt,ib as fe,jb as wt,ka as A,la as h,m as Jt,oa as xt,pa as b,t as H,ta as K,u as te,ua as ce,vb as At,vc as N,wb as Tt,wc as ve,x as ee,xb as C,ya as D,yc as ge,za as Et}from"./chunk-5J7BTB5J.js";var Mt;try{Mt=typeof Intl<"u"&&Intl.v8BreakIterator}catch(e){Mt=!1}var p=(()=>{class e{_platformId=r(de);isBrowser=this._platformId?_e(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||Mt)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function it(e){return Array.isArray(e)?e:[e]}var xe=new Set,S,rt=(()=>{class e{_platform=r(p);_nonce=r(le,{optional:!0});_matchMedia;constructor(){this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):ca}matchMedia(t){return(this._platform.WEBKIT||this._platform.BLINK)&&sa(t,this._nonce),this._matchMedia(t)}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function sa(e,o){if(!xe.has(e))try{S||(S=document.createElement("style"),o&&S.setAttribute("nonce",o),S.setAttribute("type","text/css"),document.head.appendChild(S)),S.sheet&&(S.sheet.insertRule(`@media ${e} {body{ }}`,0),xe.add(e))}catch(t){console.error(t)}}function ca(e){return{matches:e==="all"||e==="",media:e,addListener:()=>{},removeListener:()=>{}}}var Dt=(()=>{class e{_mediaMatcher=r(rt);_zone=r(b);_queries=new Map;_destroySubject=new _;constructor(){}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(t){return Ee(it(t)).some(n=>this._registerQuery(n).mql.matches)}observe(t){let n=Ee(it(t)).map(s=>this._registerQuery(s).observable),i=te(n);return i=ee(i.pipe(oe(1)),i.pipe(et(1),tt(0))),i.pipe(H(s=>{let d={matches:!1,breakpoints:{}};return s.forEach(({matches:g,query:w})=>{d.matches=d.matches||g,d.breakpoints[w]=g}),d}))}_registerQuery(t){if(this._queries.has(t))return this._queries.get(t);let a=this._mediaMatcher.matchMedia(t),i={observable:new Xt(s=>{let d=g=>this._zone.run(()=>s.next(g));return a.addListener(d),()=>{a.removeListener(d)}}).pipe(ie(a),H(({matches:s})=>({query:t,matches:s})),at(this._destroySubject)),mql:a};return this._queries.set(t,i),i}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Ee(e){return e.map(o=>o.split(",")).reduce((o,t)=>o.concat(t)).map(o=>o.trim())}var so={XSmall:"(max-width: 599.98px)",Small:"(min-width: 600px) and (max-width: 959.98px)",Medium:"(min-width: 960px) and (max-width: 1279.98px)",Large:"(min-width: 1280px) and (max-width: 1919.98px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599.98px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959.98px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"};function G(e){return e.buttons===0||e.detail===0}function Z(e){let o=e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0];return!!o&&o.identifier===-1&&(o.radiusX==null||o.radiusX===1)&&(o.radiusY==null||o.radiusY===1)}var kt;function Ie(){if(kt==null){let e=typeof document<"u"?document.head:null;kt=!!(e&&(e.createShadowRoot||e.attachShadow))}return kt}function Ct(e){if(Ie()){let o=e.getRootNode?e.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&o instanceof ShadowRoot)return o}return null}function da(){let e=typeof document<"u"&&document?document.activeElement:null;for(;e&&e.shadowRoot;){let o=e.shadowRoot.activeElement;if(o===e)break;e=o}return e}function x(e){return e.composedPath?e.composedPath()[0]:e.target}var $;function we(){if($==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>$=!0}))}finally{$=$||!1}return $}function B(e){return we()?e:!!e.capture}function ma(e,o=0){return Ae(e)?Number(e):arguments.length===2?o:0}function Ae(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}function R(e){return e instanceof D?e.nativeElement:e}var Te=new m("cdk-input-modality-detector-options"),Me={ignoreKeys:[18,17,224,91,16]},De=650,Ot={passive:!0,capture:!0},ke=(()=>{class e{_platform=r(p);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new qt(null);_options;_lastTouchMs=0;_onKeydown=t=>{this._options?.ignoreKeys?.some(a=>a===t.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=x(t))};_onMousedown=t=>{Date.now()-this._lastTouchMs<De||(this._modality.next(G(t)?"keyboard":"mouse"),this._mostRecentTarget=x(t))};_onTouchstart=t=>{if(Z(t)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=x(t)};constructor(){let t=r(b),a=r(h),n=r(Te,{optional:!0});if(this._options=u(u({},Me),n),this.modalityDetected=this._modality.pipe(et(1)),this.modalityChanged=this.modalityDetected.pipe(ne()),this._platform.isBrowser){let i=r(nt).createRenderer(null,null);this._listenerCleanups=t.runOutsideAngular(()=>[i.listen(a,"keydown",this._onKeydown,Ot),i.listen(a,"mousedown",this._onMousedown,Ot),i.listen(a,"touchstart",this._onTouchstart,Ot)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(t=>t())}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Y=(function(e){return e[e.IMMEDIATE=0]="IMMEDIATE",e[e.EVENTUAL=1]="EVENTUAL",e})(Y||{}),Ce=new m("cdk-focus-monitor-default-options"),st=B({passive:!0,capture:!0}),Nt=(()=>{class e{_ngZone=r(b);_platform=r(p);_inputModalityDetector=r(ke);_origin=null;_lastFocusOrigin=null;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=r(h);_stopInputModalityDetector=new _;constructor(){let t=r(Ce,{optional:!0});this._detectionMode=t?.detectionMode||Y.IMMEDIATE}_rootNodeFocusAndBlurListener=t=>{let a=x(t);for(let n=a;n;n=n.parentElement)t.type==="focus"?this._onFocus(t,n):this._onBlur(t,n)};monitor(t,a=!1){let n=R(t);if(!this._platform.isBrowser||n.nodeType!==1)return Jt();let i=Ct(n)||this._document,s=this._elementInfo.get(n);if(s)return a&&(s.checkChildren=!0),s.subject;let d={checkChildren:a,subject:new _,rootNode:i};return this._elementInfo.set(n,d),this._registerGlobalListeners(d),d.subject}stopMonitoring(t){let a=R(t),n=this._elementInfo.get(a);n&&(n.subject.complete(),this._setClasses(a),this._elementInfo.delete(a),this._removeGlobalListeners(n))}focusVia(t,a,n){let i=R(t),s=this._document.activeElement;i===s?this._getClosestElementsInfo(i).forEach(([d,g])=>this._originChanged(d,a,g)):(this._setOrigin(a),typeof i.focus=="function"&&i.focus(n))}ngOnDestroy(){this._elementInfo.forEach((t,a)=>this.stopMonitoring(a))}_getWindow(){return this._document.defaultView||window}_getFocusOrigin(t){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(t)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:t&&this._isLastInteractionFromInputLabel(t)?"mouse":"program"}_shouldBeAttributedToTouch(t){return this._detectionMode===Y.EVENTUAL||!!t?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(t,a){t.classList.toggle("cdk-focused",!!a),t.classList.toggle("cdk-touch-focused",a==="touch"),t.classList.toggle("cdk-keyboard-focused",a==="keyboard"),t.classList.toggle("cdk-mouse-focused",a==="mouse"),t.classList.toggle("cdk-program-focused",a==="program")}_setOrigin(t,a=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=t,this._originFromTouchInteraction=t==="touch"&&a,this._detectionMode===Y.IMMEDIATE){clearTimeout(this._originTimeoutId);let n=this._originFromTouchInteraction?De:1;this._originTimeoutId=setTimeout(()=>this._origin=null,n)}})}_onFocus(t,a){let n=this._elementInfo.get(a),i=x(t);!n||!n.checkChildren&&a!==i||this._originChanged(a,this._getFocusOrigin(i),n)}_onBlur(t,a){let n=this._elementInfo.get(a);!n||n.checkChildren&&t.relatedTarget instanceof Node&&a.contains(t.relatedTarget)||(this._setClasses(a),this._emitOrigin(n,null))}_emitOrigin(t,a){t.subject.observers.length&&this._ngZone.run(()=>t.subject.next(a))}_registerGlobalListeners(t){if(!this._platform.isBrowser)return;let a=t.rootNode,n=this._rootNodeFocusListenerCount.get(a)||0;n||this._ngZone.runOutsideAngular(()=>{a.addEventListener("focus",this._rootNodeFocusAndBlurListener,st),a.addEventListener("blur",this._rootNodeFocusAndBlurListener,st)}),this._rootNodeFocusListenerCount.set(a,n+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(at(this._stopInputModalityDetector)).subscribe(i=>{this._setOrigin(i,!0)}))}_removeGlobalListeners(t){let a=t.rootNode;if(this._rootNodeFocusListenerCount.has(a)){let n=this._rootNodeFocusListenerCount.get(a);n>1?this._rootNodeFocusListenerCount.set(a,n-1):(a.removeEventListener("focus",this._rootNodeFocusAndBlurListener,st),a.removeEventListener("blur",this._rootNodeFocusAndBlurListener,st),this._rootNodeFocusListenerCount.delete(a))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(t,a,n){this._setClasses(t,a),this._emitOrigin(n,a),this._lastFocusOrigin=a}_getClosestElementsInfo(t){let a=[];return this._elementInfo.forEach((n,i)=>{(i===t||n.checkChildren&&i.contains(t))&&a.push([i,n])}),a}_isLastInteractionFromInputLabel(t){let{_mostRecentTarget:a,mostRecentModality:n}=this._inputModalityDetector;if(n!=="mouse"||!a||a===t||t.nodeName!=="INPUT"&&t.nodeName!=="TEXTAREA"||t.disabled)return!1;let i=t.labels;if(i){for(let s=0;s<i.length;s++)if(i[s].contains(a))return!0}return!1}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var ct=new WeakMap,M=(()=>{class e{_appRef;_injector=r(A);_environmentInjector=r(se);load(t){let a=this._appRef=this._appRef||this._injector.get(fe),n=ct.get(a);n||(n={loaders:new Set,refs:[]},ct.set(a,n),a.onDestroy(()=>{ct.get(a)?.refs.forEach(i=>i.destroy()),ct.delete(a)})),n.loaders.has(t)||(n.loaders.add(t),n.refs.push(ge(t,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var mt=(()=>{class e{static \u0275fac=function(a){return new(a||e)};static \u0275cmp=y({type:e,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(a,n){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}
2
2
  `],encapsulation:2,changeDetection:0})}return e})(),dt;function la(){if(dt===void 0&&(dt=null,typeof window<"u")){let e=window;e.trustedTypes!==void 0&&(dt=e.trustedTypes.createPolicy("angular#components",{createHTML:o=>o}))}return dt}function ua(e){return la()?.createHTML(e)||e}function Oe(e,o,t){let a=t.sanitize(ue.HTML,o);e.innerHTML=ua(a||"")}var ba=(()=>{class e{create(t){return typeof MutationObserver>"u"?null:new MutationObserver(t)}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var Ne=(()=>{class e{static \u0275fac=function(a){return new(a||e)};static \u0275mod=I({type:e});static \u0275inj=E({providers:[ba]})}return e})();var Se=(()=>{class e{_platform=r(p);constructor(){}isDisabled(t){return t.hasAttribute("disabled")}isVisible(t){return fa(t)&&getComputedStyle(t).visibility==="visible"}isTabbable(t){if(!this._platform.isBrowser)return!1;let a=pa(Ia(t));if(a&&(Re(a)===-1||!this.isVisible(a)))return!1;let n=t.nodeName.toLowerCase(),i=Re(t);return t.hasAttribute("contenteditable")?i!==-1:n==="iframe"||n==="object"||this._platform.WEBKIT&&this._platform.IOS&&!xa(t)?!1:n==="audio"?t.hasAttribute("controls")?i!==-1:!1:n==="video"?i===-1?!1:i!==null?!0:this._platform.FIREFOX||t.hasAttribute("controls"):t.tabIndex>=0}isFocusable(t,a){return Ea(t)&&!this.isDisabled(t)&&(a?.ignoreVisibility||this.isVisible(t))}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function pa(e){try{return e.frameElement}catch(o){return null}}function fa(e){return!!(e.offsetWidth||e.offsetHeight||typeof e.getClientRects=="function"&&e.getClientRects().length)}function ha(e){let o=e.nodeName.toLowerCase();return o==="input"||o==="select"||o==="button"||o==="textarea"}function va(e){return _a(e)&&e.type=="hidden"}function ga(e){return ya(e)&&e.hasAttribute("href")}function _a(e){return e.nodeName.toLowerCase()=="input"}function ya(e){return e.nodeName.toLowerCase()=="a"}function Pe(e){if(!e.hasAttribute("tabindex")||e.tabIndex===void 0)return!1;let o=e.getAttribute("tabindex");return!!(o&&!isNaN(parseInt(o,10)))}function Re(e){if(!Pe(e))return null;let o=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(o)?-1:o}function xa(e){let o=e.nodeName.toLowerCase(),t=o==="input"&&e.type;return t==="text"||t==="password"||o==="select"||o==="textarea"}function Ea(e){return va(e)?!1:ha(e)||ga(e)||e.hasAttribute("contenteditable")||Pe(e)}function Ia(e){return e.ownerDocument&&e.ownerDocument.defaultView||window}var lt=class{_element;_checker;_ngZone;_document;_injector;_startAnchor=null;_endAnchor=null;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(o){this._enabled=o,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(o,this._startAnchor),this._toggleAnchorTabIndex(o,this._endAnchor))}_enabled=!0;constructor(o,t,a,n,i=!1,s){this._element=o,this._checker=t,this._ngZone=a,this._document=n,this._injector=s,i||this.attachAnchors()}destroy(){let o=this._startAnchor,t=this._endAnchor;o&&(o.removeEventListener("focus",this.startAnchorListener),o.remove()),t&&(t.removeEventListener("focus",this.endAnchorListener),t.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(o){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement(o)))})}focusFirstTabbableElementWhenReady(o){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement(o)))})}focusLastTabbableElementWhenReady(o){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement(o)))})}_getRegionBoundary(o){let t=this._element.querySelectorAll(`[cdk-focus-region-${o}], [cdkFocusRegion${o}], [cdk-focus-${o}]`);return o=="start"?t.length?t[0]:this._getFirstTabbableElement(this._element):t.length?t[t.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(o){let t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(t){if(!this._checker.isFocusable(t)){let a=this._getFirstTabbableElement(t);return a?.focus(o),!!a}return t.focus(o),!0}return this.focusFirstTabbableElement(o)}focusFirstTabbableElement(o){let t=this._getRegionBoundary("start");return t&&t.focus(o),!!t}focusLastTabbableElement(o){let t=this._getRegionBoundary("end");return t&&t.focus(o),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(o){if(this._checker.isFocusable(o)&&this._checker.isTabbable(o))return o;let t=o.children;for(let a=0;a<t.length;a++){let n=t[a].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(t[a]):null;if(n)return n}return null}_getLastTabbableElement(o){if(this._checker.isFocusable(o)&&this._checker.isTabbable(o))return o;let t=o.children;for(let a=t.length-1;a>=0;a--){let n=t[a].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[a]):null;if(n)return n}return null}_createAnchor(){let o=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,o),o.classList.add("cdk-visually-hidden"),o.classList.add("cdk-focus-trap-anchor"),o.setAttribute("aria-hidden","true"),o}_toggleAnchorTabIndex(o,t){o?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}toggleAnchors(o){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(o,this._startAnchor),this._toggleAnchorTabIndex(o,this._endAnchor))}_executeOnStable(o){this._injector?be(o,{injector:this._injector}):setTimeout(o)}},wa=(()=>{class e{_checker=r(Se);_ngZone=r(b);_document=r(h);_injector=r(A);constructor(){r(M).load(mt)}create(t,a=!1){return new lt(t,this._checker,this._ngZone,this._document,a,this._injector)}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var Be=new m("liveAnnouncerElement",{providedIn:"root",factory:()=>null}),je=new m("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),Aa=0,Ta=(()=>{class e{_ngZone=r(b);_defaultOptions=r(je,{optional:!0});_liveElement;_document=r(h);_sanitizer=r(ye);_previousTimeout;_currentPromise;_currentResolve;constructor(){let t=r(Be,{optional:!0});this._liveElement=t||this._createLiveElement()}announce(t,...a){let n=this._defaultOptions,i,s;return a.length===1&&typeof a[0]=="number"?s=a[0]:[i,s]=a,this.clear(),clearTimeout(this._previousTimeout),i||(i=n&&n.politeness?n.politeness:"polite"),s==null&&n&&(s=n.duration),this._liveElement.setAttribute("aria-live",i),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(d=>this._currentResolve=d)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{!t||typeof t=="string"?this._liveElement.textContent=t:Oe(this._liveElement,t,this._sanitizer),typeof s=="number"&&(this._previousTimeout=setTimeout(()=>this.clear(),s)),this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){let t="cdk-live-announcer-element",a=this._document.getElementsByClassName(t),n=this._document.createElement("div");for(let i=0;i<a.length;i++)a[i].remove();return n.classList.add(t),n.classList.add("cdk-visually-hidden"),n.setAttribute("aria-atomic","true"),n.setAttribute("aria-live","polite"),n.id=`cdk-live-announcer-${Aa++}`,this._document.body.appendChild(n),n}_exposeAnnouncerToModals(t){let a=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let n=0;n<a.length;n++){let i=a[n],s=i.getAttribute("aria-owns");s?s.indexOf(t)===-1&&i.setAttribute("aria-owns",s+" "+t):i.setAttribute("aria-owns",t)}}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var F=(function(e){return e[e.NONE=0]="NONE",e[e.BLACK_ON_WHITE=1]="BLACK_ON_WHITE",e[e.WHITE_ON_BLACK=2]="WHITE_ON_BLACK",e})(F||{}),Fe="cdk-high-contrast-black-on-white",Le="cdk-high-contrast-white-on-black",Rt="cdk-high-contrast-active",Ue=(()=>{class e{_platform=r(p);_hasCheckedHighContrastMode=!1;_document=r(h);_breakpointSubscription;constructor(){this._breakpointSubscription=r(Dt).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return F.NONE;let t=this._document.createElement("div");t.style.backgroundColor="rgb(1,2,3)",t.style.position="absolute",this._document.body.appendChild(t);let a=this._document.defaultView||window,n=a&&a.getComputedStyle?a.getComputedStyle(t):null,i=(n&&n.backgroundColor||"").replace(/ /g,"");switch(t.remove(),i){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return F.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return F.BLACK_ON_WHITE}return F.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let t=this._document.body.classList;t.remove(Rt,Fe,Le),this._hasCheckedHighContrastMode=!0;let a=this.getHighContrastMode();a===F.BLACK_ON_WHITE?t.add(Rt,Fe):a===F.WHITE_ON_BLACK&&t.add(Rt,Le)}}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Ma=(()=>{class e{constructor(){r(Ue)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(a){return new(a||e)};static \u0275mod=I({type:e});static \u0275inj=E({imports:[Ne]})}return e})();var Ft={},Lt=class e{_appId=r(ot);static _infix=`a${Math.floor(Math.random()*1e5).toString()}`;getId(o,t=!1){return this._appId!=="ng"&&(o+=this._appId),Ft.hasOwnProperty(o)||(Ft[o]=0),`${o}${t?e._infix+"-":""}${Ft[o]++}`}static \u0275fac=function(t){return new(t||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})};var Da=200,ut=class{_letterKeyStream=new _;_items=[];_selectedItemIndex=-1;_pressedLetters=[];_skipPredicateFn;_selectedItem=new _;selectedItem=this._selectedItem;constructor(o,t){let a=typeof t?.debounceInterval=="number"?t.debounceInterval:Da;t?.skipPredicate&&(this._skipPredicateFn=t.skipPredicate),this.setItems(o),this._setupKeyHandler(a)}destroy(){this._pressedLetters=[],this._letterKeyStream.complete(),this._selectedItem.complete()}setCurrentSelectedItemIndex(o){this._selectedItemIndex=o}setItems(o){this._items=o}handleKey(o){let t=o.keyCode;o.key&&o.key.length===1?this._letterKeyStream.next(o.key.toLocaleUpperCase()):(t>=65&&t<=90||t>=48&&t<=57)&&this._letterKeyStream.next(String.fromCharCode(t))}isTyping(){return this._pressedLetters.length>0}reset(){this._pressedLetters=[]}_setupKeyHandler(o){this._letterKeyStream.pipe(re(t=>this._pressedLetters.push(t)),tt(o),ae(()=>this._pressedLetters.length>0),H(()=>this._pressedLetters.join("").toLocaleUpperCase())).subscribe(t=>{for(let a=1;a<this._items.length+1;a++){let n=(this._selectedItemIndex+a)%this._items.length,i=this._items[n];if(!this._skipPredicateFn?.(i)&&i.getLabel?.().toLocaleUpperCase().trim().indexOf(t)===0){this._selectedItem.next(i);break}}this._pressedLetters=[]})}};function ze(e,...o){return o.length?o.some(t=>e[t]):e.altKey||e.shiftKey||e.ctrlKey||e.metaKey}var j=class{_items;_activeItemIndex=K(-1);_activeItem=K(null);_wrap=!1;_typeaheadSubscription=Qt.EMPTY;_itemChangesSubscription;_vertical=!0;_horizontal=null;_allowedModifierKeys=[];_homeAndEnd=!1;_pageUpAndDown={enabled:!1,delta:10};_effectRef;_typeahead;_skipPredicateFn=o=>o.disabled;constructor(o,t){this._items=o,o instanceof Et?this._itemChangesSubscription=o.changes.subscribe(a=>this._itemsChanged(a.toArray())):It(o)&&(this._effectRef=ce(()=>this._itemsChanged(o()),{injector:t}))}tabOut=new _;change=new _;skipPredicate(o){return this._skipPredicateFn=o,this}withWrap(o=!0){return this._wrap=o,this}withVerticalOrientation(o=!0){return this._vertical=o,this}withHorizontalOrientation(o){return this._horizontal=o,this}withAllowedModifierKeys(o){return this._allowedModifierKeys=o,this}withTypeAhead(o=200){this._typeaheadSubscription.unsubscribe();let t=this._getItemsArray();return this._typeahead=new ut(t,{debounceInterval:typeof o=="number"?o:void 0,skipPredicate:a=>this._skipPredicateFn(a)}),this._typeaheadSubscription=this._typeahead.selectedItem.subscribe(a=>{this.setActiveItem(a)}),this}cancelTypeahead(){return this._typeahead?.reset(),this}withHomeAndEnd(o=!0){return this._homeAndEnd=o,this}withPageUpDown(o=!0,t=10){return this._pageUpAndDown={enabled:o,delta:t},this}setActiveItem(o){let t=this._activeItem();this.updateActiveItem(o),this._activeItem()!==t&&this.change.next(this._activeItemIndex())}onKeydown(o){let t=o.keyCode,n=["altKey","ctrlKey","metaKey","shiftKey"].every(i=>!o[i]||this._allowedModifierKeys.indexOf(i)>-1);switch(t){case 9:this.tabOut.next();return;case 40:if(this._vertical&&n){this.setNextItemActive();break}else return;case 38:if(this._vertical&&n){this.setPreviousItemActive();break}else return;case 39:if(this._horizontal&&n){this._horizontal==="rtl"?this.setPreviousItemActive():this.setNextItemActive();break}else return;case 37:if(this._horizontal&&n){this._horizontal==="rtl"?this.setNextItemActive():this.setPreviousItemActive();break}else return;case 36:if(this._homeAndEnd&&n){this.setFirstItemActive();break}else return;case 35:if(this._homeAndEnd&&n){this.setLastItemActive();break}else return;case 33:if(this._pageUpAndDown.enabled&&n){let i=this._activeItemIndex()-this._pageUpAndDown.delta;this._setActiveItemByIndex(i>0?i:0,1);break}else return;case 34:if(this._pageUpAndDown.enabled&&n){let i=this._activeItemIndex()+this._pageUpAndDown.delta,s=this._getItemsArray().length;this._setActiveItemByIndex(i<s?i:s-1,-1);break}else return;default:(n||ze(o,"shiftKey"))&&this._typeahead?.handleKey(o);return}this._typeahead?.reset(),o.preventDefault()}get activeItemIndex(){return this._activeItemIndex()}get activeItem(){return this._activeItem()}isTyping(){return!!this._typeahead&&this._typeahead.isTyping()}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._getItemsArray().length-1,-1)}setNextItemActive(){this._activeItemIndex()<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex()<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(o){let t=this._getItemsArray(),a=typeof o=="number"?o:t.indexOf(o),n=t[a];this._activeItem.set(n??null),this._activeItemIndex.set(a),this._typeahead?.setCurrentSelectedItemIndex(a)}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._effectRef?.destroy(),this._typeahead?.destroy(),this.tabOut.complete(),this.change.complete()}_setActiveItemByDelta(o){this._wrap?this._setActiveInWrapMode(o):this._setActiveInDefaultMode(o)}_setActiveInWrapMode(o){let t=this._getItemsArray();for(let a=1;a<=t.length;a++){let n=(this._activeItemIndex()+o*a+t.length)%t.length,i=t[n];if(!this._skipPredicateFn(i)){this.setActiveItem(n);return}}}_setActiveInDefaultMode(o){this._setActiveItemByIndex(this._activeItemIndex()+o,o)}_setActiveItemByIndex(o,t){let a=this._getItemsArray();if(a[o]){for(;this._skipPredicateFn(a[o]);)if(o+=t,!a[o])return;this.setActiveItem(o)}}_getItemsArray(){return It(this._items)?this._items():this._items instanceof Et?this._items.toArray():this._items}_itemsChanged(o){this._typeahead?.setItems(o);let t=this._activeItem();if(t){let a=o.indexOf(t);a>-1&&a!==this._activeItemIndex()&&(this._activeItemIndex.set(a),this._typeahead?.setCurrentSelectedItemIndex(a))}}};var St=class extends j{setActiveItem(o){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(o),this.activeItem&&this.activeItem.setActiveStyles()}};var Pt=class extends j{_origin="program";setFocusOrigin(o){return this._origin=o,this}setActiveItem(o){super.setActiveItem(o),this.activeItem&&this.activeItem.focus(this._origin)}};var Ke=" ";function ka(e,o,t){let a=pt(e,o);t=t.trim(),!a.some(n=>n.trim()===t)&&(a.push(t),e.setAttribute(o,a.join(Ke)))}function Ca(e,o,t){let a=pt(e,o);t=t.trim();let n=a.filter(i=>i!==t);n.length?e.setAttribute(o,n.join(Ke)):e.removeAttribute(o)}function pt(e,o){return e.getAttribute(o)?.match(/\S+/g)??[]}var Ve="cdk-describedby-message",bt="cdk-describedby-host",jt=0,Vn=(()=>{class e{_platform=r(p);_document=r(h);_messageRegistry=new Map;_messagesContainer=null;_id=`${jt++}`;constructor(){r(M).load(mt),this._id=r(ot)+"-"+jt++}describe(t,a,n){if(!this._canBeDescribed(t,a))return;let i=Bt(a,n);typeof a!="string"?(He(a,this._id),this._messageRegistry.set(i,{messageElement:a,referenceCount:0})):this._messageRegistry.has(i)||this._createMessageElement(a,n),this._isElementDescribedByMessage(t,i)||this._addMessageReference(t,i)}removeDescription(t,a,n){if(!a||!this._isElementNode(t))return;let i=Bt(a,n);if(this._isElementDescribedByMessage(t,i)&&this._removeMessageReference(t,i),typeof a=="string"){let s=this._messageRegistry.get(i);s&&s.referenceCount===0&&this._deleteMessageElement(i)}this._messagesContainer?.childNodes.length===0&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){let t=this._document.querySelectorAll(`[${bt}="${this._id}"]`);for(let a=0;a<t.length;a++)this._removeCdkDescribedByReferenceIds(t[a]),t[a].removeAttribute(bt);this._messagesContainer?.remove(),this._messagesContainer=null,this._messageRegistry.clear()}_createMessageElement(t,a){let n=this._document.createElement("div");He(n,this._id),n.textContent=t,a&&n.setAttribute("role",a),this._createMessagesContainer(),this._messagesContainer.appendChild(n),this._messageRegistry.set(Bt(t,a),{messageElement:n,referenceCount:0})}_deleteMessageElement(t){this._messageRegistry.get(t)?.messageElement?.remove(),this._messageRegistry.delete(t)}_createMessagesContainer(){if(this._messagesContainer)return;let t="cdk-describedby-message-container",a=this._document.querySelectorAll(`.${t}[platform="server"]`);for(let i=0;i<a.length;i++)a[i].remove();let n=this._document.createElement("div");n.style.visibility="hidden",n.classList.add(t),n.classList.add("cdk-visually-hidden"),this._platform.isBrowser||n.setAttribute("platform","server"),this._document.body.appendChild(n),this._messagesContainer=n}_removeCdkDescribedByReferenceIds(t){let a=pt(t,"aria-describedby").filter(n=>n.indexOf(Ve)!=0);t.setAttribute("aria-describedby",a.join(" "))}_addMessageReference(t,a){let n=this._messageRegistry.get(a);ka(t,"aria-describedby",n.messageElement.id),t.setAttribute(bt,this._id),n.referenceCount++}_removeMessageReference(t,a){let n=this._messageRegistry.get(a);n.referenceCount--,Ca(t,"aria-describedby",n.messageElement.id),t.removeAttribute(bt)}_isElementDescribedByMessage(t,a){let n=pt(t,"aria-describedby"),i=this._messageRegistry.get(a),s=i&&i.messageElement.id;return!!s&&n.indexOf(s)!=-1}_canBeDescribed(t,a){if(!this._isElementNode(t))return!1;if(a&&typeof a=="object")return!0;let n=a==null?"":`${a}`.trim(),i=t.getAttribute("aria-label");return n?!i||i.trim()!==n:!1}_isElementNode(t){return t.nodeType===this._document.ELEMENT_NODE}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Bt(e,o){return typeof e=="string"?`${o||""}/${e}`:e}function He(e,o){e.id||(e.id=`${Ve}-${o}-${jt++}`)}var Q=(function(e){return e[e.NORMAL=0]="NORMAL",e[e.NEGATED=1]="NEGATED",e[e.INVERTED=2]="INVERTED",e})(Q||{}),ft,P;function qn(){if(P==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return P=!1,P;if(document.documentElement?.style&&"scrollBehavior"in document.documentElement.style)P=!0;else{let e=Element.prototype.scrollTo;e?P=!/\{\s*\[native code\]\s*\}/.test(e.toString()):P=!1}}return P}function Jn(){if(typeof document!="object"||!document)return Q.NORMAL;if(ft==null){let e=document.createElement("div"),o=e.style;e.dir="rtl",o.width="1px",o.overflow="auto",o.visibility="hidden",o.pointerEvents="none",o.position="absolute";let t=document.createElement("div"),a=t.style;a.width="2px",a.height="1px",e.appendChild(t),document.body.appendChild(e),ft=Q.NORMAL,e.scrollLeft===0&&(e.scrollLeft=1,ft=e.scrollLeft===0?Q.NEGATED:Q.INVERTED),e.remove()}return ft}function ei(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}var U,We=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function oi(){if(U)return U;if(typeof document!="object"||!document)return U=new Set(We),U;let e=document.createElement("input");return U=new Set(We.filter(o=>(e.setAttribute("type",o),e.type===o))),U}var Oa=new m("MATERIAL_ANIMATIONS"),Ge=null;function Na(){return r(Oa,{optional:!0})?.animationsDisabled||r(me,{optional:!0})==="NoopAnimations"?"di-disabled":(Ge??=r(rt).matchMedia("(prefers-reduced-motion)").matches,Ge?"reduced-motion":"enabled")}function z(){return Na()!=="enabled"}function li(e){return e==null?"":typeof e=="string"?e:`${e}px`}function bi(e){return e!=null&&`${e}`!="false"}var v=(function(e){return e[e.FADING_IN=0]="FADING_IN",e[e.VISIBLE=1]="VISIBLE",e[e.FADING_OUT=2]="FADING_OUT",e[e.HIDDEN=3]="HIDDEN",e})(v||{}),Ut=class{_renderer;element;config;_animationForciblyDisabledThroughCss;state=v.HIDDEN;constructor(o,t,a,n=!1){this._renderer=o,this.element=t,this.config=a,this._animationForciblyDisabledThroughCss=n}fadeOut(){this._renderer.fadeOutRipple(this)}},Ze=B({passive:!0,capture:!0}),zt=class{_events=new Map;addHandler(o,t,a,n){let i=this._events.get(t);if(i){let s=i.get(a);s?s.add(n):i.set(a,new Set([n]))}else this._events.set(t,new Map([[a,new Set([n])]])),o.runOutsideAngular(()=>{document.addEventListener(t,this._delegateEventHandler,Ze)})}removeHandler(o,t,a){let n=this._events.get(o);if(!n)return;let i=n.get(t);i&&(i.delete(a),i.size===0&&n.delete(t),n.size===0&&(this._events.delete(o),document.removeEventListener(o,this._delegateEventHandler,Ze)))}_delegateEventHandler=o=>{let t=x(o);t&&this._events.get(o.type)?.forEach((a,n)=>{(n===t||n.contains(t))&&a.forEach(i=>i.handleEvent(o))})}},X={enterDuration:225,exitDuration:150},Ra=800,$e=B({passive:!0,capture:!0}),Ye=["mousedown","touchstart"],Qe=["mouseup","mouseleave","touchend","touchcancel"],Fa=(()=>{class e{static \u0275fac=function(a){return new(a||e)};static \u0275cmp=y({type:e,selectors:[["ng-component"]],hostAttrs:["mat-ripple-style-loader",""],decls:0,vars:0,template:function(a,n){},styles:[`.mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale3d(0, 0, 0);background-color:var(--mat-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface) 10%, transparent))}@media(forced-colors: active){.mat-ripple-element{display:none}}.cdk-drag-preview .mat-ripple-element,.cdk-drag-placeholder .mat-ripple-element{display:none}
3
3
  `],encapsulation:2,changeDetection:0})}return e})(),q=class e{_target;_ngZone;_platform;_containerElement;_triggerElement=null;_isPointerDown=!1;_activeRipples=new Map;_mostRecentTransientRipple=null;_lastTouchStartEvent;_pointerUpEventsRegistered=!1;_containerRect=null;static _eventManager=new zt;constructor(o,t,a,n,i){this._target=o,this._ngZone=t,this._platform=n,n.isBrowser&&(this._containerElement=R(a)),i&&i.get(M).load(Fa)}fadeInRipple(o,t,a={}){let n=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),i=u(u({},X),a.animation);a.centered&&(o=n.left+n.width/2,t=n.top+n.height/2);let s=a.radius||La(o,t,n),d=o-n.left,g=t-n.top,w=i.enterDuration,f=document.createElement("div");f.classList.add("mat-ripple-element"),f.style.left=`${d-s}px`,f.style.top=`${g-s}px`,f.style.height=`${s*2}px`,f.style.width=`${s*2}px`,a.color!=null&&(f.style.backgroundColor=a.color),f.style.transitionDuration=`${w}ms`,this._containerElement.appendChild(f);let Gt=window.getComputedStyle(f),ra=Gt.transitionProperty,Zt=Gt.transitionDuration,_t=ra==="none"||Zt==="0s"||Zt==="0s, 0s"||n.width===0&&n.height===0,L=new Ut(this,f,a,_t);f.style.transform="scale3d(1, 1, 1)",L.state=v.FADING_IN,a.persistent||(this._mostRecentTransientRipple=L);let J=null;return!_t&&(w||i.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let $t=()=>{J&&(J.fallbackTimer=null),clearTimeout(Yt),this._finishRippleTransition(L)},yt=()=>this._destroyRipple(L),Yt=setTimeout(yt,w+100);f.addEventListener("transitionend",$t),f.addEventListener("transitioncancel",yt),J={onTransitionEnd:$t,onTransitionCancel:yt,fallbackTimer:Yt}}),this._activeRipples.set(L,J),(_t||!w)&&this._finishRippleTransition(L),L}fadeOutRipple(o){if(o.state===v.FADING_OUT||o.state===v.HIDDEN)return;let t=o.element,a=u(u({},X),o.config.animation);t.style.transitionDuration=`${a.exitDuration}ms`,t.style.opacity="0",o.state=v.FADING_OUT,(o._animationForciblyDisabledThroughCss||!a.exitDuration)&&this._finishRippleTransition(o)}fadeOutAll(){this._getActiveRipples().forEach(o=>o.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(o=>{o.config.persistent||o.fadeOut()})}setupTriggerEvents(o){let t=R(o);!this._platform.isBrowser||!t||t===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=t,Ye.forEach(a=>{e._eventManager.addHandler(this._ngZone,a,t,this)}))}handleEvent(o){o.type==="mousedown"?this._onMousedown(o):o.type==="touchstart"?this._onTouchStart(o):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{Qe.forEach(t=>{this._triggerElement.addEventListener(t,this,$e)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(o){o.state===v.FADING_IN?this._startFadeOutTransition(o):o.state===v.FADING_OUT&&this._destroyRipple(o)}_startFadeOutTransition(o){let t=o===this._mostRecentTransientRipple,{persistent:a}=o.config;o.state=v.VISIBLE,!a&&(!t||!this._isPointerDown)&&o.fadeOut()}_destroyRipple(o){let t=this._activeRipples.get(o)??null;this._activeRipples.delete(o),this._activeRipples.size||(this._containerRect=null),o===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),o.state=v.HIDDEN,t!==null&&(o.element.removeEventListener("transitionend",t.onTransitionEnd),o.element.removeEventListener("transitioncancel",t.onTransitionCancel),t.fallbackTimer!==null&&clearTimeout(t.fallbackTimer)),o.element.remove()}_onMousedown(o){let t=G(o),a=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+Ra;!this._target.rippleDisabled&&!t&&!a&&(this._isPointerDown=!0,this.fadeInRipple(o.clientX,o.clientY,this._target.rippleConfig))}_onTouchStart(o){if(!this._target.rippleDisabled&&!Z(o)){this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0;let t=o.changedTouches;if(t)for(let a=0;a<t.length;a++)this.fadeInRipple(t[a].clientX,t[a].clientY,this._target.rippleConfig)}}_onPointerUp(){this._isPointerDown&&(this._isPointerDown=!1,this._getActiveRipples().forEach(o=>{let t=o.state===v.VISIBLE||o.config.terminateOnPointerUp&&o.state===v.FADING_IN;!o.config.persistent&&t&&o.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let o=this._triggerElement;o&&(Ye.forEach(t=>e._eventManager.removeHandler(t,o,this)),this._pointerUpEventsRegistered&&(Qe.forEach(t=>o.removeEventListener(t,this,$e)),this._pointerUpEventsRegistered=!1))}};function La(e,o,t){let a=Math.max(Math.abs(e-t.left),Math.abs(e-t.right)),n=Math.max(Math.abs(o-t.top),Math.abs(o-t.bottom));return Math.sqrt(a*a+n*n)}var Ht=new m("mat-ripple-global-options"),Di=(()=>{class e{_elementRef=r(D);_animationsDisabled=z();color;unbounded=!1;centered=!1;radius=0;animation;get disabled(){return this._disabled}set disabled(t){t&&this.fadeOutAllNonPersistent(),this._disabled=t,this._setupTriggerEventsIfEnabled()}_disabled=!1;get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(t){this._trigger=t,this._setupTriggerEventsIfEnabled()}_trigger;_rippleRenderer;_globalOptions;_isInitialized=!1;constructor(){let t=r(b),a=r(p),n=r(Ht,{optional:!0}),i=r(A);this._globalOptions=n||{},this._rippleRenderer=new q(this,t,this._elementRef,a,i)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:u(u(u({},this._globalOptions.animation),this._animationsDisabled?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(t,a=0,n){return typeof t=="number"?this._rippleRenderer.fadeInRipple(t,a,u(u({},this.rippleConfig),n)):this._rippleRenderer.fadeInRipple(0,0,u(u({},this.rippleConfig),t))}static \u0275fac=function(a){return new(a||e)};static \u0275dir=k({type:e,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(a,n){a&2&&O("mat-ripple-unbounded",n.unbounded)},inputs:{color:[0,"matRippleColor","color"],unbounded:[0,"matRippleUnbounded","unbounded"],centered:[0,"matRippleCentered","centered"],radius:[0,"matRippleRadius","radius"],animation:[0,"matRippleAnimation","animation"],disabled:[0,"matRippleDisabled","disabled"],trigger:[0,"matRippleTrigger","trigger"]},exportAs:["matRipple"]})}return e})();var Sa={capture:!0},Pa=["focus","mousedown","mouseenter","touchstart"],Kt="mat-ripple-loader-uninitialized",Vt="mat-ripple-loader-class-name",Xe="mat-ripple-loader-centered",ht="mat-ripple-loader-disabled",qe=(()=>{class e{_document=r(h);_animationsDisabled=z();_globalRippleOptions=r(Ht,{optional:!0});_platform=r(p);_ngZone=r(b);_injector=r(A);_eventCleanups;_hosts=new Map;constructor(){let t=r(nt).createRenderer(null,null);this._eventCleanups=this._ngZone.runOutsideAngular(()=>Pa.map(a=>t.listen(this._document,a,this._onInteraction,Sa)))}ngOnDestroy(){let t=this._hosts.keys();for(let a of t)this.destroyRipple(a);this._eventCleanups.forEach(a=>a())}configureRipple(t,a){t.setAttribute(Kt,this._globalRippleOptions?.namespace??""),(a.className||!t.hasAttribute(Vt))&&t.setAttribute(Vt,a.className||""),a.centered&&t.setAttribute(Xe,""),a.disabled&&t.setAttribute(ht,"")}setDisabled(t,a){let n=this._hosts.get(t);n?(n.target.rippleDisabled=a,!a&&!n.hasSetUpEvents&&(n.hasSetUpEvents=!0,n.renderer.setupTriggerEvents(t))):a?t.setAttribute(ht,""):t.removeAttribute(ht)}_onInteraction=t=>{let a=x(t);if(a instanceof HTMLElement){let n=a.closest(`[${Kt}="${this._globalRippleOptions?.namespace??""}"]`);n&&this._createRipple(n)}};_createRipple(t){if(!this._document||this._hosts.has(t))return;t.querySelector(".mat-ripple")?.remove();let a=this._document.createElement("span");a.classList.add("mat-ripple",t.getAttribute(Vt)),t.append(a);let n=this._globalRippleOptions,i=this._animationsDisabled?0:n?.animation?.enterDuration??X.enterDuration,s=this._animationsDisabled?0:n?.animation?.exitDuration??X.exitDuration,d={rippleDisabled:this._animationsDisabled||n?.disabled||t.hasAttribute(ht),rippleConfig:{centered:t.hasAttribute(Xe),terminateOnPointerUp:n?.terminateOnPointerUp,animation:{enterDuration:i,exitDuration:s}}},g=new q(d,this._ngZone,a,this._platform,this._injector),w=!d.rippleDisabled;w&&g.setupTriggerEvents(t),this._hosts.set(t,{target:d,renderer:g,hasSetUpEvents:w}),t.removeAttribute(Kt)}destroyRipple(t){let a=this._hosts.get(t);a&&(a.renderer._removeTriggerEvents(),this._hosts.delete(t))}static \u0275fac=function(a){return new(a||e)};static \u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var Je=(()=>{class e{static \u0275fac=function(a){return new(a||e)};static \u0275cmp=y({type:e,selectors:[["structural-styles"]],decls:0,vars:0,template:function(a,n){},styles:[`.mat-focus-indicator{position:relative}.mat-focus-indicator::before{top:0;left:0;right:0;bottom:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border-width:var(--mat-focus-indicator-border-width, 3px);border-style:var(--mat-focus-indicator-border-style, solid);border-color:var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus-visible::before{content:""}@media(forced-colors: active){html{--mat-focus-indicator-display: block}}
4
4
  `],encapsulation:2,changeDetection:0})}return e})();var Ba=["mat-icon-button",""],ja=["*"],Ua=new m("MAT_BUTTON_CONFIG");function ta(e){return e==null?void 0:ve(e)}var vt=(()=>{class e{_elementRef=r(D);_ngZone=r(b);_animationsDisabled=z();_config=r(Ua,{optional:!0});_focusMonitor=r(Nt);_cleanupClick;_renderer=r(pe);_rippleLoader=r(qe);_isAnchor;_isFab=!1;color;get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=t,this._updateRippleDisabled()}_disableRipple=!1;get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._updateRippleDisabled()}_disabled=!1;ariaDisabled;disabledInteractive;tabIndex;set _tabindex(t){this.tabIndex=t}constructor(){r(M).load(Je);let t=this._elementRef.nativeElement;this._isAnchor=t.tagName==="A",this.disabledInteractive=this._config?.disabledInteractive??!1,this.color=this._config?.color??null,this._rippleLoader?.configureRipple(t,{className:"mat-mdc-button-ripple"})}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0),this._isAnchor&&this._setupAsAnchor()}ngOnDestroy(){this._cleanupClick?.(),this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement)}focus(t="program",a){t?this._focusMonitor.focusVia(this._elementRef.nativeElement,t,a):this._elementRef.nativeElement.focus(a)}_getAriaDisabled(){return this.ariaDisabled!=null?this.ariaDisabled:this._isAnchor?this.disabled||null:this.disabled&&this.disabledInteractive?!0:null}_getDisabledAttribute(){return this.disabledInteractive||!this.disabled?null:!0}_updateRippleDisabled(){this._rippleLoader?.setDisabled(this._elementRef.nativeElement,this.disableRipple||this.disabled)}_getTabIndex(){return this._isAnchor?this.disabled&&!this.disabledInteractive?-1:this.tabIndex:this.tabIndex}_setupAsAnchor(){this._cleanupClick=this._ngZone.runOutsideAngular(()=>this._renderer.listen(this._elementRef.nativeElement,"click",t=>{this.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}))}static \u0275fac=function(a){return new(a||e)};static \u0275dir=k({type:e,hostAttrs:[1,"mat-mdc-button-base"],hostVars:13,hostBindings:function(a,n){a&2&&(wt("disabled",n._getDisabledAttribute())("aria-disabled",n._getAriaDisabled())("tabindex",n._getTabIndex()),he(n.color?"mat-"+n.color:""),O("mat-mdc-button-disabled",n.disabled)("mat-mdc-button-disabled-interactive",n.disabledInteractive)("mat-unthemed",!n.color)("_mat-animation-noopable",n._animationsDisabled))},inputs:{color:"color",disableRipple:[2,"disableRipple","disableRipple",N],disabled:[2,"disabled","disabled",N],ariaDisabled:[2,"aria-disabled","ariaDisabled",N],disabledInteractive:[2,"disabledInteractive","disabledInteractive",N],tabIndex:[2,"tabIndex","tabIndex",ta],_tabindex:[2,"tabindex","_tabindex",ta]}})}return e})(),za=(()=>{class e extends vt{constructor(){super(),this._rippleLoader.configureRipple(this._elementRef.nativeElement,{centered:!0})}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=y({type:e,selectors:[["button","mat-icon-button",""],["a","mat-icon-button",""],["button","matIconButton",""],["a","matIconButton",""]],hostAttrs:[1,"mdc-icon-button","mat-mdc-icon-button"],exportAs:["matButton","matAnchor"],features:[V],attrs:Ba,ngContentSelectors:ja,decls:4,vars:0,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(a,n){a&1&&(W(),C(0,"span",0),T(1),C(2,"span",1)(3,"span",2))},styles:[`.mat-mdc-icon-button{-webkit-user-select:none;user-select:none;display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;text-decoration:none;cursor:pointer;z-index:0;overflow:visible;border-radius:var(--mat-icon-button-container-shape, var(--mat-sys-corner-full, 50%));flex-shrink:0;text-align:center;width:var(--mat-icon-button-state-layer-size, 40px);height:var(--mat-icon-button-state-layer-size, 40px);padding:calc(calc(var(--mat-icon-button-state-layer-size, 40px) - var(--mat-icon-button-icon-size, 24px)) / 2);font-size:var(--mat-icon-button-icon-size, 24px);color:var(--mat-icon-button-icon-color, var(--mat-sys-on-surface-variant));-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-icon-button .mdc-button__label,.mat-mdc-icon-button .mat-icon{z-index:1;position:relative}.mat-mdc-icon-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit}.mat-mdc-icon-button:focus-visible>.mat-focus-indicator::before{content:"";border-radius:inherit}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-icon-button-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface-variant) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-icon-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-icon-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-icon-button-touch-target-size, 48px);display:var(--mat-icon-button-touch-target-display, block);left:50%;width:var(--mat-icon-button-touch-target-size, 48px);transform:translate(-50%, -50%)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button[disabled],.mat-mdc-icon-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-icon-button-disabled-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-icon-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-icon-button img,.mat-mdc-icon-button svg{width:var(--mat-icon-button-icon-size, 24px);height:var(--mat-icon-button-icon-size, 24px);vertical-align:baseline}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:var(--mat-icon-button-container-shape, var(--mat-sys-corner-full, 50%))}.mat-mdc-icon-button[hidden]{display:none}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}
@@ -1 +1 @@
1
- import{Z as r,aa as a,ca as m,ta as s}from"./chunk-RYEX2DR7.js";var d=["light","dark","system"],i="agentos.theme",n=class o{_theme=s(this.readStoredTheme());theme=this._theme.asReadonly();media=typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null;onSystemChange=()=>{this._theme()==="system"&&this.applyTheme("system")};constructor(){this.applyTheme(this._theme()),this.media?.addEventListener("change",this.onSystemChange)}ngOnDestroy(){this.media?.removeEventListener("change",this.onSystemChange)}setTheme(e){this._theme.set(e);try{localStorage.setItem(i,e)}catch(t){}this.applyTheme(e)}applyTheme(e){let t=e==="system"?this.resolveSystem():e;typeof document>"u"||!document.documentElement||(t==="dark"?document.documentElement.setAttribute("data-theme","dark"):document.documentElement.removeAttribute("data-theme"))}resolveSystem(){return this.media?.matches?"dark":"light"}readStoredTheme(){try{let e=localStorage.getItem(i);if(e&&d.includes(e))return e}catch(e){}return"system"}static \u0275fac=function(t){return new(t||o)};static \u0275prov=r({token:o,factory:o.\u0275fac,providedIn:"root"})},T=new a("agentos.theme-port",{providedIn:"root",factory:()=>m(n)});export{d as a,n as b,T as c};
1
+ import{Z as r,aa as a,ca as m,ta as s}from"./chunk-5J7BTB5J.js";var d=["light","dark","system"],i="agentos.theme",n=class o{_theme=s(this.readStoredTheme());theme=this._theme.asReadonly();media=typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null;onSystemChange=()=>{this._theme()==="system"&&this.applyTheme("system")};constructor(){this.applyTheme(this._theme()),this.media?.addEventListener("change",this.onSystemChange)}ngOnDestroy(){this.media?.removeEventListener("change",this.onSystemChange)}setTheme(e){this._theme.set(e);try{localStorage.setItem(i,e)}catch(t){}this.applyTheme(e)}applyTheme(e){let t=e==="system"?this.resolveSystem():e;typeof document>"u"||!document.documentElement||(t==="dark"?document.documentElement.setAttribute("data-theme","dark"):document.documentElement.removeAttribute("data-theme"))}resolveSystem(){return this.media?.matches?"dark":"light"}readStoredTheme(){try{let e=localStorage.getItem(i);if(e&&d.includes(e))return e}catch(e){}return"system"}static \u0275fac=function(t){return new(t||o)};static \u0275prov=r({token:o,factory:o.\u0275fac,providedIn:"root"})},T=new a("agentos.theme-port",{providedIn:"root",factory:()=>m(n)});export{d as a,n as b,T as c};
@@ -1 +1 @@
1
- import{a as A}from"./chunk-TPZGV5NA.js";import{j as H}from"./chunk-J3CZ3MOZ.js";import{b as E,c as T}from"./chunk-H7A4LOFH.js";import{a as I}from"./chunk-RI2JQRSB.js";import{Bb as M,Db as _,Fb as h,Ka as a,Rb as S,Tb as u,Ub as w,Wa as c,ca as l,ga as y,ha as C,kc as D,lb as m,ma as v,mb as p,rb as k,sb as r,ta as x,tb as i,ub as d,vb as P,wb as O,xb as g}from"./chunk-RYEX2DR7.js";function j(e,n){e&1&&g(0,"span",1)}function z(e,n){e&1&&g(0,"span",2)}function F(e,n){e&1&&g(0,"span",3)}var f=class e{pluginService=l(H);online=x(null);ngOnInit(){this.pluginService.getAllPlugins().subscribe({next:()=>this.online.set(!0),error:()=>this.online.set(!1)})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=c({type:e,selectors:[["agentos-backend-status"]],decls:4,vars:1,consts:[[1,"backend-status"],["title","AgentOS online",1,"dot","dot--online"],["title","AgentOS offline",1,"dot","dot--offline"],["title","Checking\u2026",1,"dot","dot--checking"]],template:function(t,o){if(t&1&&(P(0,"div",0),m(1,j,1,0,"span",1)(2,z,1,0,"span",2)(3,F,1,0,"span",3),O()),t&2){let s;a(),p((s=o.online())===!0?1:s===!1?2:3)}},styles:[".backend-status[_ngcontent-%COMP%]{display:flex;align-items:center}.dot[_ngcontent-%COMP%]{width:8px;height:8px;border-radius:50%;flex-shrink:0}.dot--online[_ngcontent-%COMP%]{background:var(--color-success, #34c759)}.dot--offline[_ngcontent-%COMP%]{background:var(--color-error, #ff3b30)}.dot--checking[_ngcontent-%COMP%]{background:var(--color-text-secondary, #6e6e73);opacity:.5;animation:_ngcontent-%COMP%_pulse 1.2s ease-in-out infinite}@keyframes _ngcontent-%COMP%_pulse{0%,to{opacity:.5}50%{opacity:1}}"]})};function R(e,n){if(e&1){let t=M();r(0,"button",9),_("click",function(){y(t);let s=h();return C(s.navigateToAdmin())}),r(1,"span",10),u(2,"\u2699\uFE0F"),i()()}}function L(e,n){if(e&1&&(r(0,"span",7),u(1),i()),e&2){let t=h();a(),w(t.userInitials)}}function V(e,n){e&1&&(r(0,"span",8),u(1,"\u25EF"),i())}var b=class e{router=l(T);userState=l(A);destroyRef=l(v);currentUser=this.userState.currentUser;navigateHome(){this.router.navigate(["/agentos/home"])}isAdmin=D(()=>this.userState.currentUser()?.isAdmin===!0);navigateToAdmin(){this.router.navigate(["/agentos/admin"])}ngOnInit(){this.currentUser()||this.userState.loadMe().pipe(I(this.destroyRef)).subscribe()}get userInitials(){let n=this.currentUser();if(!n)return"";let t=n.firstname?.[0]??"",o=n.lastname?.[0]??"";return(t+o).toUpperCase()||n.email?.[0]?.toUpperCase()||"?"}get isOnProfilePage(){return this.router.url.startsWith("/agentos/me")}toggleProfile(){this.isOnProfilePage?window.history.length>1?window.history.back():this.router.navigate(["/agentos"]):this.router.navigate(["/agentos/me"])}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=c({type:e,selectors:[["agentos-header"]],decls:11,vars:5,consts:[[1,"header"],["type","button","title","Home",1,"header__brand",3,"click"],["src","CODAY-Logo.png","alt","Coday",1,"header__logo-img"],[1,"header__logo-text"],[1,"header__nav"],["type","button","title","Admin",1,"header__admin-btn"],["type","button",1,"header__user-btn",3,"click","title"],[1,"header__user-initials"],[1,"header__user-icon"],["type","button","title","Admin",1,"header__admin-btn",3,"click"],[1,"header__admin-icon"]],template:function(t,o){t&1&&(r(0,"header",0)(1,"button",1),_("click",function(){return o.navigateHome()}),d(2,"img",2),r(3,"span",3),u(4,"Coday"),i()(),r(5,"nav",4),d(6,"agentos-backend-status"),m(7,R,3,0,"button",5),r(8,"button",6),_("click",function(){return o.toggleProfile()}),m(9,L,2,1,"span",7)(10,V,2,0,"span",8),i()()()),t&2&&(a(7),p(o.isAdmin()?7:-1),a(),S("header__user-btn--active",o.isOnProfilePage),k("title",o.isOnProfilePage?"Back":"My profile"),a(),p(o.userInitials?9:10))},dependencies:[f],styles:[".header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:0 1.5rem;height:56px;background:var(--glass-bg, rgba(255, 255, 255, .72));border-bottom:1px solid var(--glass-border, rgba(255, 255, 255, .18));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));position:sticky;top:0;z-index:100}.header__brand[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;background:none;border:none;padding:0;cursor:pointer;border-radius:6px;transition:opacity .15s ease}.header__brand[_ngcontent-%COMP%]:hover{opacity:.7}.header__logo-img[_ngcontent-%COMP%]{width:24px;height:24px;object-fit:contain}.header__logo-text[_ngcontent-%COMP%]{font-size:1rem;font-weight:600;letter-spacing:-.02em;color:var(--color-text, #1d1d1f)}.header__nav[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.header__admin-btn[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;border:1.5px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--color-bg-secondary, rgba(0, 0, 0, .04));cursor:pointer;transition:background .15s ease,border-color .15s ease;padding:0;font-family:inherit;font-size:1rem;line-height:1}.header__admin-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .08));border-color:var(--color-primary, #007aff)}.header__admin-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.header__user-btn[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;border:1.5px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--color-bg-secondary, rgba(0, 0, 0, .04));cursor:pointer;transition:background .15s ease,border-color .15s ease;padding:0;font-family:inherit}.header__user-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .08));border-color:var(--color-primary, #007aff)}.header__user-btn--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff)}.header__user-btn--active[_ngcontent-%COMP%] .header__user-initials[_ngcontent-%COMP%], .header__user-btn--active[_ngcontent-%COMP%] .header__user-icon[_ngcontent-%COMP%]{color:#fff}.header__user-initials[_ngcontent-%COMP%]{font-size:.75rem;font-weight:600;color:var(--color-text, #1d1d1f);line-height:1;letter-spacing:.02em}.header__user-icon[_ngcontent-%COMP%]{font-size:1rem;color:var(--color-text-secondary, #6e6e73);line-height:1}"]})};var N=class e{static \u0275fac=function(t){return new(t||e)};static \u0275cmp=c({type:e,selectors:[["agentos-layout"]],decls:4,vars:0,consts:[[1,"layout"],[1,"layout__content"]],template:function(t,o){t&1&&(r(0,"div",0),d(1,"agentos-header"),r(2,"main",1),d(3,"router-outlet"),i()())},dependencies:[E,b],styles:[".layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-height:100vh}.layout__content[_ngcontent-%COMP%]{flex:1;overflow-y:auto}"]})};export{f as a,b,N as c};
1
+ import{a as A}from"./chunk-VIDPCJ3F.js";import{j as H}from"./chunk-G2BRVRGR.js";import{b as E,c as T}from"./chunk-7MQRVE7E.js";import{a as I}from"./chunk-IRZNRZ5Q.js";import{Bb as M,Db as _,Fb as h,Ka as a,Rb as S,Tb as u,Ub as w,Wa as c,ca as l,ga as y,ha as C,lb as m,lc as D,ma as v,mb as p,rb as k,sb as r,ta as x,tb as i,ub as d,vb as P,wb as O,xb as g}from"./chunk-5J7BTB5J.js";function j(e,n){e&1&&g(0,"span",1)}function z(e,n){e&1&&g(0,"span",2)}function F(e,n){e&1&&g(0,"span",3)}var f=class e{pluginService=l(H);online=x(null);ngOnInit(){this.pluginService.getAllPlugins().subscribe({next:()=>this.online.set(!0),error:()=>this.online.set(!1)})}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=c({type:e,selectors:[["agentos-backend-status"]],decls:4,vars:1,consts:[[1,"backend-status"],["title","AgentOS online",1,"dot","dot--online"],["title","AgentOS offline",1,"dot","dot--offline"],["title","Checking\u2026",1,"dot","dot--checking"]],template:function(t,o){if(t&1&&(P(0,"div",0),m(1,j,1,0,"span",1)(2,z,1,0,"span",2)(3,F,1,0,"span",3),O()),t&2){let s;a(),p((s=o.online())===!0?1:s===!1?2:3)}},styles:[".backend-status[_ngcontent-%COMP%]{display:flex;align-items:center}.dot[_ngcontent-%COMP%]{width:8px;height:8px;border-radius:50%;flex-shrink:0}.dot--online[_ngcontent-%COMP%]{background:var(--color-success, #34c759)}.dot--offline[_ngcontent-%COMP%]{background:var(--color-error, #ff3b30)}.dot--checking[_ngcontent-%COMP%]{background:var(--color-text-secondary, #6e6e73);opacity:.5;animation:_ngcontent-%COMP%_pulse 1.2s ease-in-out infinite}@keyframes _ngcontent-%COMP%_pulse{0%,to{opacity:.5}50%{opacity:1}}"]})};function R(e,n){if(e&1){let t=M();r(0,"button",9),_("click",function(){y(t);let s=h();return C(s.navigateToAdmin())}),r(1,"span",10),u(2,"\u2699\uFE0F"),i()()}}function L(e,n){if(e&1&&(r(0,"span",7),u(1),i()),e&2){let t=h();a(),w(t.userInitials)}}function V(e,n){e&1&&(r(0,"span",8),u(1,"\u25EF"),i())}var b=class e{router=l(T);userState=l(A);destroyRef=l(v);currentUser=this.userState.currentUser;navigateHome(){this.router.navigate(["/agentos/home"])}isAdmin=D(()=>this.userState.currentUser()?.isAdmin===!0);navigateToAdmin(){this.router.navigate(["/agentos/admin"])}ngOnInit(){this.currentUser()||this.userState.loadMe().pipe(I(this.destroyRef)).subscribe()}get userInitials(){let n=this.currentUser();if(!n)return"";let t=n.firstname?.[0]??"",o=n.lastname?.[0]??"";return(t+o).toUpperCase()||n.email?.[0]?.toUpperCase()||"?"}get isOnProfilePage(){return this.router.url.startsWith("/agentos/me")}toggleProfile(){this.isOnProfilePage?window.history.length>1?window.history.back():this.router.navigate(["/agentos"]):this.router.navigate(["/agentos/me"])}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=c({type:e,selectors:[["agentos-header"]],decls:11,vars:5,consts:[[1,"header"],["type","button","title","Home",1,"header__brand",3,"click"],["src","CODAY-Logo.png","alt","Coday",1,"header__logo-img"],[1,"header__logo-text"],[1,"header__nav"],["type","button","title","Admin",1,"header__admin-btn"],["type","button",1,"header__user-btn",3,"click","title"],[1,"header__user-initials"],[1,"header__user-icon"],["type","button","title","Admin",1,"header__admin-btn",3,"click"],[1,"header__admin-icon"]],template:function(t,o){t&1&&(r(0,"header",0)(1,"button",1),_("click",function(){return o.navigateHome()}),d(2,"img",2),r(3,"span",3),u(4,"Coday"),i()(),r(5,"nav",4),d(6,"agentos-backend-status"),m(7,R,3,0,"button",5),r(8,"button",6),_("click",function(){return o.toggleProfile()}),m(9,L,2,1,"span",7)(10,V,2,0,"span",8),i()()()),t&2&&(a(7),p(o.isAdmin()?7:-1),a(),S("header__user-btn--active",o.isOnProfilePage),k("title",o.isOnProfilePage?"Back":"My profile"),a(),p(o.userInitials?9:10))},dependencies:[f],styles:[".header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:0 1.5rem;height:56px;background:var(--glass-bg, rgba(255, 255, 255, .72));border-bottom:1px solid var(--glass-border, rgba(255, 255, 255, .18));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));position:sticky;top:0;z-index:100}.header__brand[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;background:none;border:none;padding:0;cursor:pointer;border-radius:6px;transition:opacity .15s ease}.header__brand[_ngcontent-%COMP%]:hover{opacity:.7}.header__logo-img[_ngcontent-%COMP%]{width:24px;height:24px;object-fit:contain}.header__logo-text[_ngcontent-%COMP%]{font-size:1rem;font-weight:600;letter-spacing:-.02em;color:var(--color-text, #1d1d1f)}.header__nav[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.header__admin-btn[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;border:1.5px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--color-bg-secondary, rgba(0, 0, 0, .04));cursor:pointer;transition:background .15s ease,border-color .15s ease;padding:0;font-family:inherit;font-size:1rem;line-height:1}.header__admin-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .08));border-color:var(--color-primary, #007aff)}.header__admin-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.header__user-btn[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;border:1.5px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--color-bg-secondary, rgba(0, 0, 0, .04));cursor:pointer;transition:background .15s ease,border-color .15s ease;padding:0;font-family:inherit}.header__user-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .08));border-color:var(--color-primary, #007aff)}.header__user-btn--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff)}.header__user-btn--active[_ngcontent-%COMP%] .header__user-initials[_ngcontent-%COMP%], .header__user-btn--active[_ngcontent-%COMP%] .header__user-icon[_ngcontent-%COMP%]{color:#fff}.header__user-initials[_ngcontent-%COMP%]{font-size:.75rem;font-weight:600;color:var(--color-text, #1d1d1f);line-height:1;letter-spacing:.02em}.header__user-icon[_ngcontent-%COMP%]{font-size:1rem;color:var(--color-text-secondary, #6e6e73);line-height:1}"]})};var N=class e{static \u0275fac=function(t){return new(t||e)};static \u0275cmp=c({type:e,selectors:[["agentos-layout"]],decls:4,vars:0,consts:[[1,"layout"],[1,"layout__content"]],template:function(t,o){t&1&&(r(0,"div",0),d(1,"agentos-header"),r(2,"main",1),d(3,"router-outlet"),i()())},dependencies:[E,b],styles:[".layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-height:100vh}.layout__content[_ngcontent-%COMP%]{flex:1;overflow-y:auto}"]})};export{f as a,b,N as c};