@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
@@ -1 +0,0 @@
1
- import{Qc as Z,Rc as u,Sc as V,Tc as j,Z as A,a as b,aa as Q,b as f,ba as x,ca as O,da as z,g as K,pa as Y}from"./chunk-RYEX2DR7.js";var v=new Q("basePath");var R=class{encodeKey(C){return encodeURIComponent(C)}encodeValue(C){return encodeURIComponent(C)}decodeKey(C){return decodeURIComponent(C)}decodeValue(C){return decodeURIComponent(C)}};var y=class{apiKeys;username;password;accessToken;basePath;withCredentials;encoder;encodeParam;credentials;constructor({accessToken:C,apiKeys:n,basePath:r,credentials:p,encodeParam:o,encoder:t,password:e,username:i,withCredentials:l}={}){n&&(this.apiKeys=n),i!==void 0&&(this.username=i),e!==void 0&&(this.password=e),C!==void 0&&(this.accessToken=C),r!==void 0&&(this.basePath=r),l!==void 0&&(this.withCredentials=l),t&&(this.encoder=t),this.encodeParam=o??(a=>this.defaultEncodeParam(a)),this.credentials=p??{}}selectHeaderContentType(C){if(C.length===0)return;let n=C.find(r=>this.isJsonMime(r));return n===void 0?C[0]:n}selectHeaderAccept(C){if(C.length===0)return;let n=C.find(r=>this.isJsonMime(r));return n===void 0?C[0]:n}isJsonMime(C){let n=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return C!==null&&(n.test(C)||C.toLowerCase()==="application/json-patch+json")}lookupCredential(C){let n=this.credentials[C];return typeof n=="function"?n():n}addCredentialToHeaders(C,n,r,p){let o=this.lookupCredential(C);return o?r.set(n,(p??"")+o):r}addCredentialToQuery(C,n,r){let p=this.lookupCredential(C);return p?r.set(n,p):r}defaultEncodeParam(C){let n=C.dataFormat==="date-time"&&C.value instanceof Date?C.value.toISOString():C.value;return encodeURIComponent(String(n))}};var P=class{basePath="http://localhost:8124";defaultHeaders=new Z;configuration;encoder;constructor(C,n){if(this.configuration=n||new y,typeof this.configuration.basePath!="string"){let r=Array.isArray(C)?C[0]:void 0;r!=null&&(C=r),typeof C!="string"&&(C=this.basePath),this.configuration.basePath=C}this.encoder=this.configuration.encoder||new R}canConsumeForm(C){return C.indexOf("multipart/form-data")!==-1}addToHttpParams(C,n,r,p=!1){return typeof n=="object"&&!(n instanceof Date)?this.addToHttpParamsRecursive(C,n,p?r:void 0,p):this.addToHttpParamsRecursive(C,n,r)}addToHttpParamsRecursive(C,n,r,p=!1){if(n==null)return C;if(typeof n=="object"){if(r!=null)return p?Object.keys(n).reduce((o,t)=>o.append(`${r}[${t}]`,n[t]),C):C.append(r,JSON.stringify(n));if(Array.isArray(n))n.forEach(o=>C=this.addToHttpParamsRecursive(C,o,r));else if(n instanceof Date)if(r!=null)C=C.append(r,n.toISOString());else throw Error("key may not be null if value is Date");else Object.keys(n).forEach(o=>{let t=r?`${r}.${o}`:o;C=this.addToHttpParamsRecursive(C,n[o],t)});return C}else if(r!=null)return C.append(r,n);throw Error("key may not be null if value is not object or array")}};var E=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}createAgentConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter agentConfig was null or undefined when calling createAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/agent-configs",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deleteAgentConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}disableAgentConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling disableAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/disable`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}enableAgentConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling enableAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/enable`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdAgentConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdsAgentConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/agent-configs/by-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getDefinitionAgentConfig(n,r,p,o="body",t=!1,e){if(n==null)throw new Error("Required parameter id was null or undefined when calling getDefinitionAgentConfig.");let i=new V({encoder:this.encoder});i=this.addToHttpParams(i,r,"withUserOverlay"),i=this.addToHttpParams(i,p,"namespaceId");let l=this.defaultHeaders,a=e?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);a!==void 0&&(l=l.set("Accept",a));let d=e?.context??new u,s=e?.transferCache??!0,c="json";a&&(a.startsWith("text")?c="text":this.configuration.isJsonMime(a)?c="json":c="blob");let g=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/definition`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("get",`${h}${g}`,f(b({context:d,params:i,responseType:c},m?{withCredentials:m}:{}),{headers:l,observe:o,transferCache:s,reportProgress:t}))}listByNamespaceAgentConfig(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByNamespaceAgentConfig.");let e=new V({encoder:this.encoder});e=this.addToHttpParams(e,r,"withDisabled");let i=this.defaultHeaders,l=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);l!==void 0&&(i=i.set("Accept",l));let a=t?.context??new u,d=t?.transferCache??!0,s="json";l&&(l.startsWith("text")?s="text":this.configuration.isJsonMime(l)?s="json":s="blob");let c=`/api/agent-configs/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("get",`${g}${c}`,f(b({context:a,params:e,responseType:s},h?{withCredentials:h}:{}),{headers:i,observe:p,transferCache:d,reportProgress:o}))}listPlatformAgentsAgentConfig(n,r="body",p=!1,o){let t=new V({encoder:this.encoder});t=this.addToHttpParams(t,n,"withDisabled");let e=this.defaultHeaders,i=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=o?.context??new u,a=o?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s="/api/agent-configs/platform",{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("get",`${c}${s}`,f(b({context:l,params:t,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:r,transferCache:a,reportProgress:p}))}searchAgentConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter agentConfigSearchRequest was null or undefined when calling searchAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/agent-configs/search",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}updateAgentConfig(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateAgentConfig.");if(r==null)throw new Error("Required parameter agentConfig was null or undefined when calling updateAgentConfig.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var q=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}createAiModel(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter aiModel was null or undefined when calling createAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/ai-models",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deleteAiModel(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/ai-models/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdAiModel(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/ai-models/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdsAiModel(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/ai-models/by-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByNamespaceIdAiModel(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling listByNamespaceIdAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/ai-models/by-namespaceId/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByParentAiModel(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/ai-models/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listPlatformLevelAiModel(n="body",r=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/ai-models/platform",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}updateAiModel(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateAiModel.");if(r==null)throw new Error("Required parameter aiModel was null or undefined when calling updateAiModel.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/ai-models/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var B=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}createAiProvider(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter aiProvider was null or undefined when calling createAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/ai-providers",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deleteAiProvider(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/ai-providers/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdAiProvider(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/ai-providers/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdsAiProvider(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/ai-providers/by-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listAiProvider(n,r,p="body",o=!1,t){let e=new V({encoder:this.encoder});e=this.addToHttpParams(e,n,"namespaceId"),e=this.addToHttpParams(e,r,"userId");let i=this.defaultHeaders,l=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);l!==void 0&&(i=i.set("Accept",l));let a=t?.context??new u,d=t?.transferCache??!0,s="json";l&&(l.startsWith("text")?s="text":this.configuration.isJsonMime(l)?s="json":s="blob");let c="/api/ai-providers",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("get",`${g}${c}`,f(b({context:a,params:e,responseType:s},h?{withCredentials:h}:{}),{headers:i,observe:p,transferCache:d,reportProgress:o}))}updateAiProvider(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateAiProvider.");if(r==null)throw new Error("Required parameter aiProvider was null or undefined when calling updateAiProvider.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/ai-providers/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var $=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}addMessageCase(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling addMessageCase.");if(r==null)throw new Error("Required parameter addMessageRequest was null or undefined when calling addMessageCase.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/messages`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("post",`${h}${g}`,f(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}createCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter _case was null or undefined when calling createCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/cases",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deleteCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdsCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/cases/by-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}interruptCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling interruptCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/interrupt`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}killCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling killCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/kill`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByParentCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByUserCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter userId was null or undefined when calling listByUserCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/by-user/${this.configuration.encodeParam({name:"userId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByUserExternalIdCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter externalId was null or undefined when calling listByUserExternalIdCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/by-user/external/${this.configuration.encodeParam({name:"externalId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByUserInNamespaceCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter listByUserInNamespaceRequest was null or undefined when calling listByUserInNamespaceCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/cases/by-user/in-namespace",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}updateCase(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateCase.");if(r==null)throw new Error("Required parameter _case was null or undefined when calling updateCase.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/cases/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var M=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}createIntegrationConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter integrationConfig was null or undefined when calling createIntegrationConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/integration-configs",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deleteIntegrationConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteIntegrationConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/integration-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdIntegrationConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdIntegrationConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/integration-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdsIntegrationConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsIntegrationConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/integration-configs/by-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listIntegrationConfig(n,r,p="body",o=!1,t){let e=new V({encoder:this.encoder});e=this.addToHttpParams(e,n,"namespaceId"),e=this.addToHttpParams(e,r,"userId");let i=this.defaultHeaders,l=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);l!==void 0&&(i=i.set("Accept",l));let a=t?.context??new u,d=t?.transferCache??!0,s="json";l&&(l.startsWith("text")?s="text":this.configuration.isJsonMime(l)?s="json":s="blob");let c="/api/integration-configs",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("get",`${g}${c}`,f(b({context:a,params:e,responseType:s},h?{withCredentials:h}:{}),{headers:i,observe:p,transferCache:d,reportProgress:o}))}updateIntegrationConfig(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateIntegrationConfig.");if(r==null)throw new Error("Required parameter integrationConfig was null or undefined when calling updateIntegrationConfig.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/integration-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var U=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}getTypeIntegrationType(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter type was null or undefined when calling getTypeIntegrationType.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/integration-types/${this.configuration.encodeParam({name:"type",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listTypesIntegrationType(n="body",r=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/integration-types",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var S=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}createNamespace(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter namespace was null or undefined when calling createNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/namespaces",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deleteNamespace(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/namespaces/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deployAgentsNamespace(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling deployAgentsNamespace.");if(r==null)throw new Error("Required parameter namespaceAgentDeployRequest was null or undefined when calling deployAgentsNamespace.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/deploy-agents`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("post",`${h}${g}`,f(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}getByIdNamespace(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/namespaces/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdsNamespace(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/namespaces/by-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listAllNamespace(n="body",r=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/namespaces",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}listByExternalIdsNamespace(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling listByExternalIdsNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/namespaces/by-external-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByParentNamespace(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/namespaces/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}undeployAgentsNamespace(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling undeployAgentsNamespace.");if(r==null)throw new Error("Required parameter namespaceAgentDeployRequest was null or undefined when calling undeployAgentsNamespace.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/undeploy-agents`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("post",`${h}${g}`,f(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}updateNamespace(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateNamespace.");if(r==null)throw new Error("Required parameter namespace was null or undefined when calling updateNamespace.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/namespaces/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var X=(o=>(o.OpenAI="OpenAI",o.Anthropic="Anthropic",o.Gemini="Gemini",o.vLLM="vLLM",o.Ollama="Ollama",o))(X||{});var N=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}listPlatformPrompt(){let{basePath:n,withCredentials:r}=this.configuration;return this.httpClient.get(`${n}/api/prompts`,f(b({headers:this.defaultHeaders,params:{scope:"PLATFORM"}},r?{withCredentials:r}:{}),{context:new u}))}listByNamespacePrompt(n){let{basePath:r,withCredentials:p}=this.configuration;return this.httpClient.get(`${r}/api/prompts`,f(b({headers:this.defaultHeaders,params:{scope:"NAMESPACE",namespaceId:n}},p?{withCredentials:p}:{}),{context:new u}))}getByIdPrompt(n){let{basePath:r,withCredentials:p}=this.configuration;return this.httpClient.get(`${r}/api/prompts/${encodeURIComponent(n)}`,f(b({headers:this.defaultHeaders},p?{withCredentials:p}:{}),{context:new u}))}createPrompt(n){let{basePath:r,withCredentials:p}=this.configuration;return this.httpClient.post(`${r}/api/prompts`,n,f(b({headers:this.defaultHeaders.set("Content-Type","application/json")},p?{withCredentials:p}:{}),{context:new u}))}updatePrompt(n,r){let{basePath:p,withCredentials:o}=this.configuration;return this.httpClient.put(`${p}/api/prompts/${encodeURIComponent(n)}`,r,f(b({headers:this.defaultHeaders.set("Content-Type","application/json")},o?{withCredentials:o}:{}),{context:new u}))}deletePrompt(n){let{basePath:r,withCredentials:p}=this.configuration;return this.httpClient.delete(`${r}/api/prompts/${encodeURIComponent(n)}`,f(b({headers:this.defaultHeaders},p?{withCredentials:p}:{}),{context:new u}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var G=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}getByIdCaseEventRest(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdCaseEventRest.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/case-events/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdsCaseEventRest(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsCaseEventRest.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/case-events/by-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByCaseCaseEventRest(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling listByCaseCaseEventRest.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/case-events/by-parentId/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var F=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}createFeedback(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter feedbackInput was null or undefined when calling createFeedback.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/feedbacks",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByCaseEventFeedback(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter caseEventId was null or undefined when calling listByCaseEventFeedback.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/feedbacks/by-case-event/${this.configuration.encodeParam({name:"caseEventId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByCaseFeedback(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling listByCaseFeedback.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/feedbacks/by-parentId/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var J=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}grantAdmin(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling grantAdmin.");if(r==null)throw new Error("Required parameter targetUserId was null or undefined when calling grantAdmin.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/admins/${this.configuration.encodeParam({name:"targetUserId",value:r,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("put",`${c}${s}`,f(b({context:l,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}grantMember(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling grantMember.");if(r==null)throw new Error("Required parameter targetUserId was null or undefined when calling grantMember.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/members/${this.configuration.encodeParam({name:"targetUserId",value:r,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("put",`${c}${s}`,f(b({context:l,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}listNamespaceUsers(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling listNamespaceUsers.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/users`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}revokeAdmin(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling revokeAdmin.");if(r==null)throw new Error("Required parameter targetUserId was null or undefined when calling revokeAdmin.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/admins/${this.configuration.encodeParam({name:"targetUserId",value:r,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("delete",`${c}${s}`,f(b({context:l,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}revokeMember(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling revokeMember.");if(r==null)throw new Error("Required parameter targetUserId was null or undefined when calling revokeMember.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/members/${this.configuration.encodeParam({name:"targetUserId",value:r,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("delete",`${c}${s}`,f(b({context:l,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}updateRolesByExternalId(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter syncUserRolesRequest was null or undefined when calling updateRolesByExternalId.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/namespaces/update-roles-by-external-id",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var W=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}debugAllPlugins(n="body",r=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/plugins/debug",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}debugPlugin(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling debugPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/debug`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getAllPlugins(n="body",r=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/plugins",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}getPlugin(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling getPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}reloadAllAgentsPlugin(n="body",r=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/plugins/reload-agents",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("post",`${d}${a}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}reloadPlugin(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling reloadPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/reload`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}startPlugin(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling startPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/start`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}stopPlugin(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling stopPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/stop`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}unloadPlugin(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling unloadPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}uploadPlugin(n="body",r=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/plugins/upload",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("post",`${d}${a}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var _=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}streamEventsCaseEventSse(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling streamEventsCaseEventSse.");let e=new V({encoder:this.encoder});e=this.addToHttpParams(e,r,"includePreviousEvents");let i=this.defaultHeaders,l=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["text/event-stream"]);l!==void 0&&(i=i.set("Accept",l));let a=t?.context??new u,d=t?.transferCache??!0,s="json";l&&(l.startsWith("text")?s="text":this.configuration.isJsonMime(l)?s="json":s="blob");let c=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/events`,{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("get",`${g}${c}`,f(b({context:a,params:e,responseType:s},h?{withCredentials:h}:{}),{headers:i,observe:p,transferCache:d,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var k=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}createUser(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter user was null or undefined when calling createUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/users",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deleteUser(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/users/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdUser(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/users/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdsUser(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/users/by-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getGroupsByExternalIdsUser(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter groupsByExternalIdsRequest was null or undefined when calling getGroupsByExternalIdsUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/users/groups-by-external-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getMeUser(n="body",r=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/users/me",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}listAllUser(n="body",r=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/users",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}listByExternalIdsUser(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling listByExternalIdsUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/users/by-external-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByParentUser(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/users/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}updateUser(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateUser.");if(r==null)throw new Error("Required parameter user was null or undefined when calling updateUser.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/users/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var D=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}createUserGroup(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter userGroupCreateRequest was null or undefined when calling createUserGroup.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/user-groups",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deleteUserGroup(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter userGroupId was null or undefined when calling deleteUserGroup.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/user-groups/${this.configuration.encodeParam({name:"userGroupId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdUserGroup(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter userGroupId was null or undefined when calling getByIdUserGroup.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/user-groups/${this.configuration.encodeParam({name:"userGroupId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}searchByNamespaceIdUserGroup(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling searchByNamespaceIdUserGroup.");let t=new V({encoder:this.encoder});t=this.addToHttpParams(t,n,"namespaceId");let e=this.defaultHeaders,i=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=o?.context??new u,a=o?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s="/api/user-groups",{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("get",`${c}${s}`,f(b({context:l,params:t,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:r,transferCache:a,reportProgress:p}))}updateUserGroup(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter userGroupId was null or undefined when calling updateUserGroup.");if(r==null)throw new Error("Required parameter userGroupUpdateRequest was null or undefined when calling updateUserGroup.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/user-groups/${this.configuration.encodeParam({name:"userGroupId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("post",`${h}${g}`,f(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};function ur(H){return z([typeof H=="string"?{provide:v,useValue:H}:{provide:y,useValue:new y(b({},H))}])}var L=class H{config=O(y);zone=O(Y);connect(C){let n=`${this.config.basePath}/api/cases/${C}/events`;return new K(r=>{let p=this.zone.runOutsideAngular(()=>new EventSource(n));return p.onmessage=o=>{try{let t=JSON.parse(o.data);this.zone.run(()=>r.next(t))}catch(t){this.zone.run(()=>r.error(new Error(`Failed to parse SSE event: ${t}`)))}},p.onerror=o=>{p.readyState===EventSource.CLOSED?this.zone.run(()=>r.complete()):this.zone.run(()=>r.error(new Error(`SSE connection error for case ${C}`))),p.close()},()=>p.close()})}static \u0275fac=function(n){return new(n||H)};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};export{y as a,E as b,q as c,B as d,$ as e,M as f,U as g,S as h,J as i,W as j,k,X as l,ur as m,N as n};
@@ -1 +0,0 @@
1
- import{n}from"./chunk-J3CZ3MOZ.js";import{Z as o,ca as p}from"./chunk-RYEX2DR7.js";var m=class t{promptController=p(n);getById(r){return this.promptController.getByIdPrompt(r)}listByNamespace(r){return this.promptController.listByNamespacePrompt(r)}create(r){return this.promptController.createPrompt(r)}update(r,e){return this.promptController.updatePrompt(r,e)}delete(r){return this.promptController.deletePrompt(r)}static \u0275fac=function(e){return new(e||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})};export{m as a};
@@ -1 +0,0 @@
1
- import{d as a}from"./chunk-JHMFWXB4.js";import"./chunk-J3CZ3MOZ.js";import"./chunk-H7A4LOFH.js";import"./chunk-GN7KRTUQ.js";import"./chunk-4URCDOMP.js";import"./chunk-RBAVAHXW.js";import"./chunk-RI2JQRSB.js";import"./chunk-QJ3OBGZZ.js";import"./chunk-XG3WOI3P.js";import"./chunk-TZKO65ML.js";import"./chunk-RYEX2DR7.js";export{a as NamespaceListComponent};
@@ -1 +0,0 @@
1
- import{a as ne}from"./chunk-ZTCAFSDX.js";import{a as ie}from"./chunk-ETLSYFBB.js";import"./chunk-YTTJDHQV.js";import"./chunk-TPZGV5NA.js";import{l as L}from"./chunk-J3CZ3MOZ.js";import{a as K,c as G}from"./chunk-H7A4LOFH.js";import{a as A,c as B}from"./chunk-RI2JQRSB.js";import{F as oe,c as z,e as _,g as $,h as q,i as S,l as p,n as j,p as H,r as J,s as Q,t as W,u as X,v as Y,w as Z,x as ee,y as re,z as te}from"./chunk-XG3WOI3P.js";import{Bb as k,Db as v,Fb as m,Ka as l,Tb as i,Ub as P,Vb as U,Wa as I,ca as f,ga as g,ha as h,kb as V,lb as M,ma as N,mb as O,nb as R,ob as D,pb as C,qb as x,rb as d,sb as o,ta as y,tb as t,ua as T,ub as u}from"./chunk-RYEX2DR7.js";function de(n,r){n&1&&(o(0,"p",5),i(1,"Loading\u2026"),t())}function pe(n,r){if(n&1&&(o(0,"label",30),u(1,"input",31),o(2,"span"),i(3),t()()),n&2){let e=r.$implicit,a=m(3);l(),d("formControl",a.scopeControl)("value",e.value)("disabled",e.value==="namespace"&&!a.isAdmin()),l(2),P(e.label)}}function me(n,r){if(n&1&&(o(0,"fieldset",8)(1,"legend",24),i(2,"Port\xE9e de la configuration"),t(),C(3,pe,4,4,"label",30,V().trackByScope,!0),t()),n&2){let e=m(2);d("disabled",e.isEditMode()),l(3),x(e.scopeOptions)}}function ce(n,r){if(n&1&&(o(0,"option",13),i(1),t()),n&2){let e=r.$implicit;d("value",e),l(),P(e)}}function ue(n,r){if(n&1){let e=k();o(0,"div",26),u(1,"input",32)(2,"input",33),o(3,"button",34),v("click",function(){let s=g(e).$index,c=m(2);return h(c.removeHeader(s))}),i(4," \xD7 "),t()()}if(n&2){let e=r.$index;d("formGroupName",e)}}function fe(n,r){if(n&1){let e=k();o(0,"form",7),v("ngSubmit",function(){g(e);let s=m();return h(s.submit())}),M(1,me,5,1,"fieldset",8),o(2,"div",9)(3,"label",10),i(4,"API type "),o(5,"span",11),i(6,"*"),t()(),o(7,"select",12),C(8,ce,2,2,"option",13,D),t()(),o(10,"div",9)(11,"label",14),i(12,"Name "),o(13,"span",11),i(14,"*"),t()(),u(15,"input",15),t(),o(16,"div",9)(17,"label",16),i(18,"Description"),t(),u(19,"input",17),t(),o(20,"div",9)(21,"label",18),i(22,"Base URL"),t(),u(23,"input",19),t(),o(24,"div",9)(25,"label",20),i(26,"API key"),t(),u(27,"input",21),t(),o(28,"div",22)(29,"div",23)(30,"span",24),i(31,"Custom headers"),t(),o(32,"button",25),v("click",function(){g(e);let s=m();return h(s.addHeader())}),i(33,"+ Add header"),t()(),C(34,ue,5,1,"div",26,R),t(),o(36,"div",27)(37,"button",28),i(38),t(),o(39,"button",29),v("click",function(){g(e);let s=m();return h(s.cancel())}),i(40,"Cancel"),t()()()}if(n&2){let e=m();d("formGroup",e.form),l(),O(e.isPlatformMode?-1:1),l(6),d("formControl",e.apiTypeControl),l(),x(e.apiTypeOptions),l(7),d("formControl",e.nameControl),l(4),d("formControl",e.descriptionControl),l(4),d("formControl",e.baseUrlControl),l(4),d("formControl",e.apiKeyControl),l(),d("formArrayName","headers"),l(6),x(e.headersArray.controls),l(3),d("disabled",e.form.invalid||e.isSubmitting()),l(),U(" ",e.isEditMode()?"Save changes":"Create"," ")}}var ve=new Set(["namespace","userOnNs","userGlobal"]),E=Object.freeze({namespace:"Configuration du namespace",userOnNs:"Pour moi sur ce namespace",userGlobal:"Pour moi globalement"}),ae=class n{route=f(K);router=f(G);destroyRef=f(N);state=f(ne);namespaceRole=f(ie);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=this.namespaceId===void 0;isAdmin=this.isPlatformMode?y(!0):B(this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:!1});apiTypeOptions=Object.values(L);scopeOptions=[{value:"namespace",label:E.namespace},{value:"userOnNs",label:E.userOnNs},{value:"userGlobal",label:E.userGlobal}];form=new S({name:new p("",{nonNullable:!0,validators:[_.required,_.minLength(1)]}),description:new p(null),apiType:new p("OpenAI",{nonNullable:!0,validators:[_.required]}),baseUrl:new p("",{nonNullable:!0}),apiKey:new p("",{nonNullable:!0}),scope:new p("namespace",{nonNullable:!0}),headers:new J([],{validators:[]})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get apiTypeControl(){return this.form.controls.apiType}get baseUrlControl(){return this.form.controls.baseUrl}get apiKeyControl(){return this.form.controls.apiKey}get scopeControl(){return this.form.controls.scope}get headersArray(){return this.form.controls.headers}addHeader(){this.headersArray.push(new S({key:new p("",{nonNullable:!0,validators:[_.required]}),value:new p("",{nonNullable:!0})}))}removeHeader(r){this.headersArray.removeAt(r)}isEditMode=y(!1);isSubmitting=y(!1);isLoading=y(!1);existingConfig=null;initialApiKey="";constructor(){this.isPlatformMode||T(()=>{this.isAdmin()||this.isEditMode()||this.scopeControl.value==="namespace"&&this.scopeControl.setValue("userOnNs")})}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let r=this.route.snapshot.paramMap,e=this.route.snapshot.queryParamMap,a=r.get("aiProviderId"),s=this.isPlatformMode?"namespace":this.parseScope(e.get("scope"));if(a){this.isEditMode.set(!0),this.scopeControl.disable(),this.apiTypeControl.disable(),this.loadConfig(a);return}this.scopeControl.setValue(s);let c=e.get("template");c&&this.hydrateFromTemplate(c)}parseScope(r){return r&&ve.has(r)?r:"namespace"}deriveScopeFromConfig(r){return!r.userId?"namespace":r.namespaceId?"userOnNs":"userGlobal"}loadConfig(r){this.isLoading.set(!0),this.state.getById(r).pipe(A(this.destroyRef)).subscribe({next:e=>{this.existingConfig=e,this.scopeControl.setValue(this.deriveScopeFromConfig(e)),this.applyConfigToForm(e),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1),console.warn(`[AiProviderForm] Could not load provider '${r}' \u2014 navigating back`),this.navigateBack()}})}hydrateFromTemplate(r){this.isLoading.set(!0),this.state.getById(r).pipe(A(this.destroyRef)).subscribe({next:e=>{this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.apiTypeControl.setValue(e.apiType),this.baseUrlControl.setValue(e.baseUrl??""),this.apiKeyControl.setValue(""),this.initialApiKey="",this.apiKeyControl.markAsTouched(),this.isLoading.set(!1),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:!0})},error:e=>{console.warn(`[AiProviderForm] Could not hydrate from template ${r}:`,e),this.isLoading.set(!1),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:!0})}})}applyConfigToForm(r){this.nameControl.setValue(r.name),this.descriptionControl.setValue(r.description??null),this.apiTypeControl.setValue(r.apiType),this.baseUrlControl.setValue(r.baseUrl??"");let e=r.apiKey??"";this.apiKeyControl.setValue(e),this.initialApiKey=e,this.headersArray.clear();for(let[a,s]of Object.entries(r.headers??{}))this.headersArray.push(new S({key:new p(a,{nonNullable:!0,validators:[_.required]}),value:new p(s,{nonNullable:!0})}))}submit(){if(this.form.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(!0);let r=this.descriptionControl.value?.trim(),e=this.baseUrlControl.value.trim(),a=this.apiKeyControl.value,s=this.isEditMode()&&a===this.initialApiKey?null:a,c=this.headersArray.controls.filter(b=>b.controls.key.value.trim()).map(b=>[b.controls.key.value.trim(),b.controls.value.value]),le=c.length>0?Object.fromEntries(c):null,w={name:this.nameControl.value.trim(),apiType:this.apiTypeControl.value,description:r||null,baseUrl:e||null,apiKey:s,headers:le},F=this.form.getRawValue().scope,se=this.isPlatformMode?null:this.namespaceId??null;(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,w,F,this.existingConfig):this.state.create(w,F,se)).pipe(A(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","ai-providers"]):this.router.navigate(["/agentos",this.namespaceId,"ai-providers"])}trackByScope(r,e){return e.value}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=I({type:n,selectors:[["agentos-ai-provider-form"]],decls:10,vars:2,consts:[[1,"ai-provider-form"],[1,"ai-provider-form__header"],["type","button","title","Back to AI providers",1,"ai-provider-form__back",3,"click"],[1,"ai-provider-form__back-icon"],[1,"ai-provider-form__title"],[1,"ai-provider-form__loading"],[1,"ai-provider-form__form",3,"formGroup"],[1,"ai-provider-form__form",3,"ngSubmit","formGroup"],[1,"ai-provider-form__scope",3,"disabled"],[1,"ai-provider-form__field"],["for","llm-api-type",1,"ai-provider-form__label"],["aria-hidden","true"],["id","llm-api-type",1,"ai-provider-form__select",3,"formControl"],[3,"value"],["for","llm-name",1,"ai-provider-form__label"],["id","llm-name","type","text","placeholder","e.g. OpenAI prod","autocomplete","off",1,"ai-provider-form__input",3,"formControl"],["for","llm-description",1,"ai-provider-form__label"],["id","llm-description","type","text","placeholder","Optional \u2014 short description of this provider","autocomplete","off",1,"ai-provider-form__input",3,"formControl"],["for","llm-base-url",1,"ai-provider-form__label"],["id","llm-base-url","type","url","placeholder","Optional \u2014 leave empty for default endpoint","autocomplete","off",1,"ai-provider-form__input",3,"formControl"],["for","llm-api-key",1,"ai-provider-form__label"],["id","llm-api-key","type","password","placeholder","sk-\u2026","autocomplete","new-password",1,"ai-provider-form__input","ai-provider-form__input--secret",3,"formControl"],[1,"ai-provider-form__headers",3,"formArrayName"],[1,"ai-provider-form__headers-title"],[1,"ai-provider-form__label"],["type","button",1,"ai-provider-form__headers-add",3,"click"],[1,"ai-provider-form__header-row",3,"formGroupName"],[1,"ai-provider-form__actions"],["type","submit",1,"ai-provider-form__btn","ai-provider-form__btn--primary",3,"disabled"],["type","button",1,"ai-provider-form__btn",3,"click"],[1,"ai-provider-form__scope-option"],["type","radio",3,"formControl","value","disabled"],["type","text","placeholder","Header name","formControlName","key","autocomplete","off",1,"ai-provider-form__input"],["type","text","placeholder","Value","formControlName","value","autocomplete","off",1,"ai-provider-form__input"],["type","button","title","Remove header","aria-label","Remove header",1,"ai-provider-form__header-remove",3,"click"]],template:function(e,a){e&1&&(o(0,"div",0)(1,"header",1)(2,"button",2),v("click",function(){return a.cancel()}),o(3,"span",3),i(4,"\u2190"),t(),i(5," AI Providers "),t(),o(6,"h1",4),i(7),t()(),M(8,de,2,0,"p",5)(9,fe,41,10,"form",6),t()),e&2&&(l(7),P(a.isEditMode()?"Edit AI provider":"New AI provider"),l(),O(a.isLoading()?8:9))},dependencies:[oe,j,re,te,z,ee,H,$,q,Q,Z,Y,W,X],styles:[".ai-provider-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:480px;margin:0 auto;padding:2rem 1rem}.ai-provider-form__scope[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.4rem;border:1px solid var(--color-border);border-radius:8px;padding:.75rem 1rem;margin:0}.ai-provider-form__scope[disabled][_ngcontent-%COMP%]{opacity:.6}.ai-provider-form__scope-option[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;font-size:.85rem;color:var(--color-text);cursor:pointer}.ai-provider-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.ai-provider-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.ai-provider-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.ai-provider-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.ai-provider-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.ai-provider-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.ai-provider-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.ai-provider-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.ai-provider-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text, #1d1d1f)}.ai-provider-form__input[_ngcontent-%COMP%], .ai-provider-form__select[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.ai-provider-form__input[_ngcontent-%COMP%]:focus, .ai-provider-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.ai-provider-form__input[_ngcontent-%COMP%]::placeholder, .ai-provider-form__select[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.ai-provider-form__input--secret[_ngcontent-%COMP%]{font-family:monospace;letter-spacing:.05em}.ai-provider-form__headers[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.ai-provider-form__headers-title[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.ai-provider-form__headers-add[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.8125rem;font-family:inherit;color:var(--color-primary, #007aff)}.ai-provider-form__headers-add[_ngcontent-%COMP%]:hover{text-decoration:underline}.ai-provider-form__header-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr auto;gap:.5rem;align-items:center}.ai-provider-form__header-remove[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;background:none;border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:6px;cursor:pointer;font-size:1rem;color:var(--color-text-secondary, #6e6e73);transition:background .15s ease;flex-shrink:0}.ai-provider-form__header-remove[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.ai-provider-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.ai-provider-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.ai-provider-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.ai-provider-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.ai-provider-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.ai-provider-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{ae as AiProviderFormComponent};
@@ -1 +0,0 @@
1
- import{c as P}from"./chunk-H7A4LOFH.js";import{o as w,u as M}from"./chunk-GN7KRTUQ.js";import{Bb as u,Db as c,Fb as m,Ka as a,Rb as y,Tb as d,Ub as f,Wa as x,ca as b,ga as l,ha as s,lb as _,mb as g,oa as C,rb as h,sb as o,ta as v,tb as n}from"./chunk-RYEX2DR7.js";function k(t,r){if(t&1&&(o(0,"span",3),d(1),n()),t&2){let e=m();a(),f(e.prompt.description)}}function O(t,r){if(t&1){let e=u();o(0,"span",6),d(1,"Delete?"),n(),o(2,"ds-icon-button",7),c("action",function(){l(e);let p=m();return s(p.onDeleteConfirmed())}),n(),o(3,"ds-icon-button",8),c("action",function(){l(e);let p=m();return s(p.onDeleteCancelled())}),n()}}function E(t,r){if(t&1){let e=u();o(0,"ds-kebab-menu",9),c("itemSelected",function(p){l(e);let D=m();return s(D.onMenuAction(p))}),n()}if(t&2){let e=m();h("items",e.menuItems)}}var I=class t{router=b(P);prompt;namespaceId;platformMode=!1;deleteRequested=new C;pendingDelete=v(!1);menuItems=[{key:"edit",label:"Edit prompt",icon:"edit"},{key:"delete",label:"Delete prompt",icon:"delete",variant:"danger"}];onMenuAction(r){switch(r){case"edit":this.platformMode?this.router.navigate(["/agentos","admin","prompts",this.prompt.id,"edit"]):this.router.navigate(["/agentos",this.namespaceId,"prompts",this.prompt.id,"edit"]);break;case"delete":this.pendingDelete.set(!0);break}}onDeleteConfirmed(){this.pendingDelete.set(!1),this.deleteRequested.emit(this.prompt)}onDeleteCancelled(){this.pendingDelete.set(!1)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=x({type:t,selectors:[["agentos-prompt-item"]],inputs:{prompt:"prompt",namespaceId:"namespaceId",platformMode:"platformMode"},outputs:{deleteRequested:"deleteRequested"},decls:8,vars:5,consts:[["role","listitem",1,"prompt-item"],[1,"prompt-item__body"],[1,"prompt-item__name"],[1,"prompt-item__description"],[1,"prompt-item__actions"],[3,"items"],[1,"prompt-item__confirm-label"],["icon","check","variant","danger","title","Confirm deletion",3,"action"],["icon","close","title","Cancel deletion",3,"action"],[3,"itemSelected","items"]],template:function(e,i){e&1&&(o(0,"div",0)(1,"div",1)(2,"span",2),d(3),n(),_(4,k,2,1,"span",3),n(),o(5,"div",4),_(6,O,4,0)(7,E,1,1,"ds-kebab-menu",5),n()()),e&2&&(y("prompt-item--pending-delete",i.pendingDelete()),a(3),f(i.prompt.name),a(),g(i.prompt.description?4:-1),a(2),g(i.pendingDelete()?6:7))},dependencies:[M,w],styles:[".prompt-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;border-radius:10px;border:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--glass-bg, rgba(255, 255, 255, .72));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px));transition:background .15s ease,border-color .15s ease}.prompt-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-color:var(--color-primary, #007aff)}.prompt-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.prompt-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.prompt-item__description[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.prompt-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.prompt-item[_ngcontent-%COMP%]:hover .prompt-item__actions[_ngcontent-%COMP%], .prompt-item[_ngcontent-%COMP%]:focus-within .prompt-item__actions[_ngcontent-%COMP%], .prompt-item--pending-delete[_ngcontent-%COMP%] .prompt-item__actions[_ngcontent-%COMP%]{opacity:1}.prompt-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error, #ff3b30);margin-right:.25rem;white-space:nowrap}"],changeDetection:0})};export{I as a};
@@ -1 +0,0 @@
1
- import{a as q}from"./chunk-LN6ED2HF.js";import{n as B}from"./chunk-J3CZ3MOZ.js";import{c as $}from"./chunk-H7A4LOFH.js";import{t as D}from"./chunk-GN7KRTUQ.js";import"./chunk-4URCDOMP.js";import"./chunk-RBAVAHXW.js";import{a as d}from"./chunk-RI2JQRSB.js";import"./chunk-QJ3OBGZZ.js";import"./chunk-XG3WOI3P.js";import"./chunk-TZKO65ML.js";import{Bb as v,Db as m,Fb as l,Hc as T,Pb as M,S as _,Tb as R,Wa as g,ab as C,ac as w,ca as p,dc as I,ec as k,ga as u,ha as y,hc as x,i as c,lb as h,ma as P,mb as b,rb as s,sb as i,t as f,tb as a}from"./chunk-RYEX2DR7.js";var F=()=>[];function A(o,e){if(o&1){let t=v();i(0,"agentos-prompt-item",4),m("deleteRequested",function(r){u(t);let S=l(2);return y(S.deletePrompt(r))}),a()}o&2&&s("prompt",e)("platformMode",!0)}function L(o,e){if(o&1&&h(0,A,1,2,"agentos-prompt-item",3),o&2){let t,n=e.$implicit,r=l();b((t=r.resolvePrompt(n.id))?0:-1,t)}}var E=class o{router=p($);destroyRef=p(P);promptController=p(B);refresh$=new c(void 0);prompts$=this.refresh$.pipe(_(()=>this.promptController.listPlatformPrompt()));promptItems$=this.prompts$.pipe(f(e=>e.map(t=>({id:t.id??"",name:t.name,description:t.description}))));promptsById=new Map;constructor(){this.prompts$.pipe(d(this.destroyRef)).subscribe(e=>{this.promptsById=new Map(e.map(t=>[t.id??"",t]))})}goBack(){this.router.navigate(["/agentos","admin"])}openCreateForm(){this.router.navigate(["/agentos","admin","prompts","new"])}deletePrompt(e){this.promptController.deletePrompt(e.id??"").pipe(d(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolvePrompt(e){return this.promptsById.get(e)??null}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=g({type:o,selectors:[["agentos-platform-prompts"]],decls:6,vars:6,consts:[["promptItemTpl",""],["title","Platform Prompts","emptyMessage","No platform prompts defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","type","button",1,"platform-prompts__back",3,"click"],[3,"prompt","platformMode"],[3,"deleteRequested","prompt","platformMode"]],template:function(t,n){if(t&1&&(i(0,"ds-entity-list",1),I(1,"async"),m("createRequested",function(){return n.openCreateForm()}),i(2,"button",2),m("click",function(){return n.goBack()}),R(3,"\u2190 Admin"),a()(),C(4,L,1,1,"ng-template",null,0,x)),t&2){let r=M(5);s("items",k(1,3,n.promptItems$)??w(5,F))("showCreate",!0)("itemTemplate",r)}},dependencies:[D,q,T],styles:[".platform-prompts__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-prompts__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};export{E as PlatformPromptsComponent};
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-JLGR5C43.js";import"./chunk-H7A4LOFH.js";import"./chunk-RYEX2DR7.js";export{a as OAUTH_CALLBACK_STORAGE_KEY,b as OAuthCallbackComponent};
@@ -1 +0,0 @@
1
- import{a as B}from"./chunk-FUVTYKQF.js";import{a as G}from"./chunk-AIC4U2MU.js";import{a as K}from"./chunk-ZTCAFSDX.js";import{a as V}from"./chunk-ETLSYFBB.js";import"./chunk-YTTJDHQV.js";import"./chunk-TPZGV5NA.js";import"./chunk-J3CZ3MOZ.js";import{a as N,c as D}from"./chunk-H7A4LOFH.js";import{o as $,t as L}from"./chunk-GN7KRTUQ.js";import"./chunk-4URCDOMP.js";import"./chunk-RBAVAHXW.js";import{a as d}from"./chunk-RI2JQRSB.js";import"./chunk-QJ3OBGZZ.js";import"./chunk-XG3WOI3P.js";import"./chunk-TZKO65ML.js";import{Bb as b,Db as u,Fb as s,Hc as q,Ka as h,Pb as S,S as g,Tb as x,Ub as E,Wa as I,ab as P,ac as w,ca as n,dc as O,ec as M,ga as c,ha as l,hc as T,lb as C,m as f,ma as y,mb as R,rb as v,sb as p,t as _,ta as A,tb as m}from"./chunk-RYEX2DR7.js";var z=()=>[];function W(r,e){if(r&1&&(p(0,"p",3),x(1),m()),r&2){let t=s().$implicit;h(),E(t.name)}}function U(r,e){if(r&1){let t=b();p(0,"agentos-ai-provider-item",5),u("editRequested",function(){let o=c(t),a=s(2);return l(a.onEdit(o))})("deleteRequested",function(){let o=c(t),a=s(2);return l(a.onDelete(o))})("duplicateRequested",function(){let o=c(t),a=s(2);return l(a.onDuplicate(o))}),m()}if(r&2){let t=e,i=s(2);v("config",t.config)("scope",t.scope)("readOnly",t.scope==="namespace"&&!i.isAdmin())}}function X(r,e){if(r&1&&C(0,W,2,1,"p",3)(1,U,1,3,"agentos-ai-provider-item",4),r&2){let t,i=e.$implicit,o=s();R(o.isEmptyPlaceholder(i.id)?0:(t=o.resolve(i.id))?1:-1,t)}}var k=Object.freeze({namespace:"AI Providers du namespace",userOnNs:"Mes overrides sur ce namespace",userGlobal:"Mes overrides globaux"}),F="__empty__",j=class r{route=n(N);router=n(D);destroyRef=n(y);state=n(K);namespaceRole=n(V);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=A(!1);listItems$=this.state.vm$.pipe(_(e=>this.toListItems(e)));resolved=new Map;ngOnInit(){this.route.paramMap.pipe(d(this.destroyRef)).subscribe(e=>{let t=e.get("namespaceId")??"";t&&t!==this.namespaceId&&(this.namespaceId=t),this.state.setNamespace(t)}),this.route.paramMap.pipe(_(e=>e.get("namespaceId")??""),g(e=>e?this.namespaceRole.isAdminOfNamespace$(e):f(!1)),d(this.destroyRef)).subscribe(e=>this.isAdmin.set(e)),this.state.vm$.pipe(d(this.destroyRef)).subscribe(e=>{let t=new Map;e.namespace.forEach(i=>{i.id&&t.set(this.itemKey("namespace",i.id),{config:i,scope:"namespace"})}),e.userOnNs.forEach(i=>{i.id&&t.set(this.itemKey("userOnNs",i.id),{config:i,scope:"userOnNs"})}),e.userGlobal.forEach(i=>{i.id&&t.set(this.itemKey("userGlobal",i.id),{config:i,scope:"userGlobal"})}),this.resolved=t})}isEmptyPlaceholder(e){return e.startsWith(F)}resolve(e){return this.resolved.get(e)??null}itemKey(e,t){return`${e}:${t}`}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"ai-providers","new"],{queryParams:{scope:G(this.isAdmin())}})}onEdit(e){let t=e.config.id;t&&this.router.navigate(["/agentos",this.namespaceId,"ai-providers",t,"edit"],{queryParams:{scope:e.scope}})}onDelete(e){let t=e.config.id;t&&this.state.delete(t,e.scope).pipe(d(this.destroyRef)).subscribe({error:i=>{console.error(`[AiProvidersAllScopes] Delete failed for ${e.scope}:${t}:`,i)}})}onDuplicate(e){if(!e.config.id)return;let t=e.scope==="namespace"&&!this.isAdmin()?"userOnNs":e.scope;this.router.navigate(["/agentos",this.namespaceId,"ai-providers","new"],{queryParams:{scope:t,template:e.config.id,templateScope:e.scope}})}toListItems(e){let t=[];return t.push(...this.sectionItems("namespace",e.namespace)),t.push(...this.sectionItems("userOnNs",e.userOnNs)),t.push(...this.sectionItems("userGlobal",e.userGlobal)),t}sectionItems(e,t){return t.length===0?[{id:`${F}${e}`,name:"Aucun AI Provider",groupKey:e,groupLabel:k[e]}]:t.filter(i=>!!i.id).map(i=>({id:this.itemKey(e,i.id),name:i.name,description:i.apiType,groupKey:e,groupLabel:k[e]}))}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=I({type:r,selectors:[["agentos-ai-providers-all-scopes"]],decls:5,vars:6,consts:[["aiProviderItemTpl",""],["title","AI Providers","emptyMessage","No AI providers available.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[1,"ai-providers-all-scopes__empty"],[3,"config","scope","readOnly"],[3,"editRequested","deleteRequested","duplicateRequested","config","scope","readOnly"]],template:function(t,i){if(t&1&&(p(0,"ds-entity-list",1),O(1,"async"),u("createRequested",function(){return i.openCreateForm()}),p(2,"ds-icon-button",2),u("action",function(){return i.goBack()}),m()(),P(3,X,2,1,"ng-template",null,0,T)),t&2){let o=S(4);v("items",M(1,3,i.listItems$)??w(5,z))("showCreate",!0)("itemTemplate",o)}},dependencies:[L,B,$,q],styles:[".ai-providers-all-scopes__empty[_ngcontent-%COMP%]{font-size:.85rem;color:var(--color-text-secondary);padding:.5rem .25rem;margin:0;font-style:italic}"],changeDetection:0})};export{j as AiProvidersAllScopesComponent};
@@ -1 +0,0 @@
1
- import{c as me}from"./chunk-J6XN2QQO.js";import{c as ze}from"./chunk-Q7GPLEGX.js";import{a as $e}from"./chunk-TPZGV5NA.js";import{a as se,e as le,h as Ae}from"./chunk-J3CZ3MOZ.js";import{a as qe,b as Ve,c as Le}from"./chunk-TIPIHEBG.js";import{a as j,c as re}from"./chunk-H7A4LOFH.js";import{o as de,t as Fe}from"./chunk-GN7KRTUQ.js";import{a as ce,c as X}from"./chunk-RI2JQRSB.js";import{Ab as fe,Bb as M,Db as g,Eb as q,Fb as c,Ga as Se,Gc as Ne,Jb as B,Jc as De,Ka as l,Kb as F,Lb as z,Ma as te,Pb as oe,Qb as ae,Rb as I,S as Y,Sb as ve,Tb as d,Tc as ie,Ub as b,Vb as $,Wa as E,Wc as Re,Z as Te,a as J,ab as ne,b as Z,bc as Ee,ca as y,cc as Oe,dc as Pe,ec as Ie,ga as f,ha as v,hc as xe,i as we,jb as be,kb as ke,kc as S,lb as u,ma as ee,mb as h,nc as C,oc as p,pa as Me,pb as R,qb as A,rb as T,sb as r,t as K,ta as w,tb as s,ua as U,ub as D,vb as k,wb as O,xb as W}from"./chunk-RYEX2DR7.js";var Q=class o{caseController=y(le);cases=w([]);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(a=>a.id===t?Z(J({},a),{title:e}):a))}static \u0275fac=function(e){return new(e||o)};static \u0275prov=Te({token:o,factory:o.\u0275fac,providedIn:"root"})};var Be=["composerInput"],je=["messagesContainer"],Qe=(o,t)=>t.phaseIndex;function Ge(o,t){o&1&&(r(0,"div",4)(1,"p"),d(2,"No messages yet."),s()())}function Ke(o,t){if(o&1&&(r(0,"div",18)(1,"span",21),d(2,"session context"),s(),r(3,"pre",22),d(4),Pe(5,"json"),s()()),o&2){let e=c(2).$implicit;l(4),b(Ie(5,1,e.event.sessionContext))}}function Ye(o,t){if(o&1&&(r(0,"div",17),u(1,Ke,6,3,"div",18),r(2,"span",19),d(3),s(),D(4,"div",20),s()),o&2){let e=c().$implicit,n=c(2);I("case-chat__message--user",e.event.actor.role==="USER")("case-chat__message--agent",e.event.actor.role==="AGENT"),l(),h(n.showTechnical()&&e.event.sessionContext?1:-1),l(2),b(e.event.actor.displayName),l(),T("innerHTML",e.html,Se)}}function Xe(o,t){if(o&1&&(r(0,"div",14)(1,"span",19),d(2),s(),r(3,"p",23),d(4),s()()),o&2){let e=c().$implicit,n=c(2);l(2),b(n.agentDisplayName()),l(2),b(e.text)}}function Je(o,t){if(o&1&&(r(0,"div",28),d(1),s()),o&2){let e=c(3).$implicit;l(),b(e.item.detail)}}function Ze(o,t){if(o&1){let e=M();r(0,"button",26),g("click",function(){f(e);let a=c(2).$implicit,i=c(2);return v(i.toggleTechnical(a.eventId))}),r(1,"span",25),d(2),s(),r(3,"span",27),d(4),s()(),u(5,Je,2,1,"div",28)}if(o&2){let e=c(2).$implicit,n=c(2);be("aria-expanded",n.isTechnicalExpanded(e.eventId)),l(2),b(e.item.label),l(2),b(n.isTechnicalExpanded(e.eventId)?"\u25BC":"\u25B6"),l(),h(n.isTechnicalExpanded(e.eventId)?5:-1)}}function et(o,t){if(o&1&&(r(0,"span",25),d(1),s()),o&2){let e=c(2).$implicit;l(),b(e.item.label)}}function tt(o,t){if(o&1&&(r(0,"div",24),u(1,Ze,6,4)(2,et,2,1,"span",25),s()),o&2){let e=c().$implicit;I("case-chat__technical--warn",e.item.type==="WarnEvent")("case-chat__technical--error",e.item.type==="ErrorEvent"),l(),h(e.item.detail?1:2)}}function nt(o,t){o&1&&d(0," \u23F3 ")}function ot(o,t){o&1&&d(0," \u2705 ")}function at(o,t){o&1&&d(0," \u274C ")}function it(o,t){if(o&1&&(r(0,"div",45)(1,"span",46),d(2,"Enrichment content"),s(),r(3,"pre"),d(4),s()()),o&2){let e=c().$implicit;l(4),b(e.enrichmentContent)}}function rt(o,t){if(o&1&&(r(0,"div",41)(1,"div",42)(2,"span",43),d(3),s(),r(4,"span",44),d(5),s()(),r(6,"div",45)(7,"span",46),d(8,"Prompt"),s(),r(9,"pre"),d(10),s()(),r(11,"div",45)(12,"span",46),d(13,"LLM output"),s(),r(14,"pre"),d(15),s()(),u(16,it,5,1,"div",45),s()),o&2){let e=t.$implicit;I("case-chat__enrichment-phase--failed",!e.success),l(3),$("Phase ",e.phaseIndex),l(2),b(e.success?"\u2705":"\u274C"),l(5),b(e.prompt),l(5),b(e.llmOutput),l(),h(e.enrichmentContent?16:-1)}}function st(o,t){if(o&1&&(r(0,"div",35)(1,"span",37),d(2,"Enrichment phases"),s(),R(3,rt,17,7,"div",40,Qe),s()),o&2){let e=c(3).$implicit;l(3),A(e.call.enrichmentPhases)}}function lt(o,t){if(o&1&&(r(0,"div",36)(1,"span",37),d(2,"Payload"),s(),r(3,"pre"),d(4),s()()),o&2){let e=c(3).$implicit;l(4),b(e.call.args)}}function ct(o,t){o&1&&(r(0,"pre"),d(1),s()),o&2&&(l(),b(t))}function dt(o,t){o&1&&(r(0,"span",38),d(1,"Running\u2026"),s())}function mt(o,t){o&1&&(r(0,"span",39),d(1,"No output"),s())}function pt(o,t){if(o&1&&(r(0,"div",34),u(1,st,5,0,"div",35),u(2,lt,5,1,"div",36),r(3,"div",36)(4,"span",37),d(5,"Output"),s(),u(6,ct,2,1,"pre")(7,dt,2,0,"span",38)(8,mt,2,0,"span",39),s()()),o&2){let e,n=c(2).$implicit,a=c(2);l(),h(a.showTechnical()&&(n.call.enrichmentPhases!=null&&n.call.enrichmentPhases.length)?1:-1),l(),h(n.call.args?2:-1),l(4),h((e=a.extractToolOutput(n.call))?6:n.call.response?8:7,e)}}function _t(o,t){if(o&1){let e=M();r(0,"div",29)(1,"button",30),g("click",function(){f(e);let a=c().$implicit,i=c(2);return v(i.toggleToolCall(a.call.requestId))}),r(2,"span",31),u(3,nt,1,0)(4,ot,1,0)(5,at,1,0),s(),r(6,"span",32),d(7),s(),r(8,"span",33),d(9),s()(),u(10,pt,9,3,"div",34),s()}if(o&2){let e=c().$implicit,n=c(2);I("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),l(),be("aria-expanded",n.isToolCallExpanded(e.call.requestId)),l(2),h(e.call.response?e.call.response.success?4:5:3),l(4),b(e.call.toolName),l(2),b(n.isToolCallExpanded(e.call.requestId)?"\u25BC":"\u25B6"),l(),h(n.isToolCallExpanded(e.call.requestId)?10:-1)}}function ut(o,t){if(o&1&&u(0,Ye,5,7,"div",13)(1,Xe,5,2,"div",14)(2,tt,3,5,"div",15)(3,_t,11,11,"div",16),o&2){let e=t.$implicit;h(e.kind==="message"?0:e.kind==="streaming"?1:e.kind==="technical"?2:3)}}function ht(o,t){if(o&1&&R(0,ut,4,1,null,null,ke().trackTimelineItem,!0),o&2){let e=c();A(e.timeline())}}function gt(o,t){o&1&&(r(0,"div",5),D(1,"span",47)(2,"span",47)(3,"span",47),s())}function Ct(o,t){if(o&1){let e=M();r(0,"div",6)(1,"ds-icon-button",48),g("action",function(){f(e);let a=c();return v(a.onScrollToBottomClick())}),s()()}}function bt(o,t){if(o&1){let e=M();r(0,"ds-icon-button",49),g("action",function(){f(e);let a=c();return v(a.interrupt())}),s()}}function ft(o,t){if(o&1){let e=M();r(0,"ds-icon-button",50),g("action",function(){f(e);let a=c();return v(a.submit())}),s()}if(o&2){let e=c();T("title",e.preferences.composerHint())("disabled",!e.canSend)}}var vt=64,pe=class o{route=y(j);http=y(ie);zone=y(Me);destroyRef=y(ee);domSanitizer=y(Re);config=y(se);preferences=y(me);caseState=y(Q);caseId=this.route.snapshot.queryParams.case;namespaceId=this.route.snapshot.queryParams.ns;markdownRenderer=this.buildMarkdownRenderer();agentDisplayName=S(()=>{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 a=n.agentName;if(a&&a.trim().length>0)return a}if(n.type==="MessageEvent"&&n.actor.role==="AGENT"&&n.actor.displayName)return n.actor.displayName}}return"Assistant"});eventSource=null;composerInput;messagesContainer;events=w([]);messageHtmlCache=new Map;inputValue=w("");isRunning=w(!1);isTerminal=w(!1);static SHOW_TECHNICAL_KEY="agentos.case-chat.showTechnical";showTechnical=w(localStorage.getItem(o.SHOW_TECHNICAL_KEY)==="true");showTechnicalOverride=p(!1);streamingText=w("");collapsedTools=w(new Set);expandedTechnicals=w(new Set);isAtBottom=w(!0);scrollListenerCleanup=null;constructor(){U(()=>{this.showTechnical.set(this.showTechnicalOverride())}),U(()=>{this.isRunning()||this.isTerminal()||queueMicrotask(()=>this.composerInput?.nativeElement.focus())}),U(()=>{this.timeline(),this.streamingText(),this.isAtBottom()&&queueMicrotask(()=>this.scrollToBottom())}),te(()=>{this.attachScrollListener()})}baseTimeline=S(()=>{let t=this.events(),e=this.showTechnical(),n=new Map;for(let x of t)if(x.type==="ToolRequestEvent"){let m=x,_=m.toolRequestId??x.id,N=n.get(_);n.set(_,{requestId:_,toolName:m.toolName??"unknown",args:m.args??null,response:N?.response,enrichmentPhases:m.enrichmentPhases??null})}else if(x.type==="ToolResponseEvent"){let m=x,_=m.toolRequestId??x.id,N=n.get(_);n.set(_,{requestId:_,toolName:N?.toolName??m.toolName??"unknown",args:N?.args??null,response:m,enrichmentPhases:N?.enrichmentPhases??null})}let a=[],i=new Set;for(let x of t)if(x.type==="MessageEvent"){let m=x;a.push({kind:"message",event:m,html:this.messageHtmlCache.get(x.id)??""})}else if(x.type==="ToolRequestEvent"||x.type==="ToolResponseEvent"){let m=x.toolRequestId??x.id;i.has(m)||(i.add(m),a.push({kind:"tool",call:n.get(m)}))}else if(e){let m=this.toTechnicalItem(x);m&&a.push({kind:"technical",item:m,eventId:x.id})}return a});timeline=S(()=>{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(ce(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<=vt)};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=a=>{let i=performance.now(),x=a.type,m=a.data;console.log("[AgentOS SSE] frame received",{sseEventName:x,dataLength:m?.length??0,dataPreview:m?.slice(0,120),receivedAtMs:i});try{let _=JSON.parse(m);this.zone.run(()=>{let N=this.events().length;if(_.type==="MessageEvent"){let P=_,V=this.extractText(P);this.messageHtmlCache.has(_.id)||this.messageHtmlCache.set(_.id,this.renderMarkdown(V))}this.events.update(P=>P.some(V=>V.id===_.id)?P:[...P,_]);let We=this.events().length;if(console.log("[AgentOS SSE] event processed",{sseEventName:x,eventType:_.type,eventId:_.id,beforeLen:N,afterLen:We,running:this.isRunning(),terminal:this.isTerminal()}),_.type==="TextChunkEvent"){let P=_.chunk;P&&this.streamingText.update(V=>V+P);return}if(_.type==="CaseUpdatedEvent"){let P=_;P.title&&this.caseState.updateCaseTitle(_.caseId,P.title);return}if(_.type==="CaseStatusEvent"){let P=_.status,V=P==="KILLED"||P==="ERROR";if(this.isTerminal.set(V),V)this.isRunning.set(!1),this.eventSource?.close(),this.eventSource=null;else{let ye=P==="RUNNING";this.isRunning.set(ye),ye||this.streamingText.set("")}return}if(_.type==="AgentFinishedEvent"){this.isRunning.set(!1),this.streamingText.set("");return}})}catch(_){console.warn("[AgentOS SSE] failed to parse event data",{sseEventName:x,error:_,dataPreview:m?.slice(0,500)})}},n=["MessageEvent","CaseStatusEvent","CaseUpdatedEvent","AgentSelectedEvent","AgentRunningEvent","AgentFinishedEvent","ThinkingEvent","TextChunkEvent","ToolRequestEvent","ToolResponseEvent","PendingConfirmationEvent","ConfirmationResolvedEvent","ErrorEvent","WarnEvent","IntentionGeneratedEvent"];for(let a of n)console.log("[AgentOS SSE] addEventListener",a),this.eventSource.addEventListener(a,e);this.eventSource.onopen=()=>{console.log("[AgentOS SSE] connection open",{readyState:this.eventSource?.readyState,at:new Date().toISOString()})},this.eventSource.onmessage=a=>{console.log("[AgentOS SSE] onmessage (unnamed event) received",{dataLength:a.data?.length??0,dataPreview:a.data?.slice(0,120)})},this.eventSource.onerror=a=>{console.warn("[AgentOS SSE] connection error",{err:a,readyState:this.eventSource?.readyState,at:new Date().toISOString()}),this.zone.run(()=>{this.isRunning.set(!1)})}}onInput(t){this.inputValue.set(t.target.value)}onKeydown(t){this.preferences.shouldSend(t)&&(t.preventDefault(),this.submit())}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.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=Ve.parse(t,{renderer:this.markdownRenderer,breaks:!0,gfm:!0,async:!1}),n=Le.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 qe,e=t.link.bind(t);return t.link=n=>{let a=e(n);return this.isExternalLink(n.href)&&(a=a.replace("<a ",'<a target="_blank" rel="noopener noreferrer" ').replace("</a>",'<span class="external-link-icon" aria-hidden="true">\u2197</span></a>')),a},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=E({type:o,selectors:[["agentos-case-chat"]],viewQuery:function(e,n){if(e&1&&B(Be,5)(je,5),e&2){let a;F(a=z())&&(n.composerInput=a.first),F(a=z())&&(n.messagesContainer=a.first)}},inputs:{showTechnicalOverride:[1,"showTechnicalOverride"]},decls:14,vars:7,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"],["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"],["icon","stop","variant","danger","title","Interrupt",3,"action"],["icon","send","variant","primary",3,"action","title","disabled"]],template:function(e,n){e&1&&(r(0,"div",2)(1,"div",3,0),u(3,Ge,3,0,"div",4)(4,ht,2,0),u(5,gt,4,0,"div",5),s(),u(6,Ct,2,0,"div",6),r(7,"div",7)(8,"textarea",8,1),g("input",function(i){return n.onInput(i)})("keydown",function(i){return n.onKeydown(i)}),s(),r(10,"div",9),u(11,bt,1,0,"ds-icon-button",10)(12,ft,1,2,"ds-icon-button",11),r(13,"ds-icon-button",12),g("action",function(){return n.kill()}),s()()()()),e&2&&(l(3),h(n.timeline().length===0?3:4),l(2),h(n.isRunning()?5:-1),l(),h(n.isAtBottom()?-1:6),l(2),T("value",n.inputValue())("disabled",n.isRunning()||n.isTerminal()),l(3),h(n.isRunning()?11:12),l(2),T("disabled",n.isTerminal()))},dependencies:[de,De],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__composer[_ngcontent-%COMP%]{flex-shrink:0;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)}}']})};var xt=["composerInput"],_e=class o{http=y(ie);router=y(re);route=y(j);config=y(se);caseState=y(Q);destroyRef=y(ee);preferences=y(me);composerInput;namespaceId=this.route.snapshot.queryParams.ns;inputValue=w("");isCreating=w(!1);constructor(){te(()=>{this.composerInput?.nativeElement.focus()})}get canSend(){return!!this.inputValue().trim()&&!this.isCreating()}onInput(t){this.inputValue.set(t.target.value)}onKeydown(t){this.preferences.shouldSend(t)&&(t.preventDefault(),this.submit())}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(Y(e=>(this.caseState.addCase(e),this.http.post(`${this.config.basePath}/api/cases/${e.id}/messages`,{content:t,userId:"default-user"}).pipe(K(()=>e)))),ce(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=E({type:o,selectors:[["agentos-case-home"]],viewQuery:function(e,n){if(e&1&&B(xt,5),e&2){let a;F(a=z())&&(n.composerInput=a.first)}},decls:11,vars:4,consts:[["composerInput",""],[1,"case-home"],[1,"case-home__hero"],[1,"case-home__headline"],[1,"case-home__composer"],["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"]],template:function(e,n){e&1&&(r(0,"div",1)(1,"div",2)(2,"h1",3),d(3,"What can I help you with?"),s(),r(4,"div",4)(5,"textarea",5,0),g("input",function(i){return n.onInput(i)})("keydown",function(i){return n.onKeydown(i)}),s(),r(7,"div",6)(8,"span",7),d(9),s(),r(10,"ds-icon-button",8),g("action",function(){return n.submit()}),s()()()()()),e&2&&(l(5),T("value",n.inputValue())("disabled",n.isCreating()),l(4),b(n.preferences.composerHint()),l(),T("disabled",!n.canSend))},dependencies:[de],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__composer[_ngcontent-%COMP%]{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));overflow:hidden;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}"]})};var yt=["caseItemTpl"],wt=o=>({node:o,depth:0}),Tt=(o,t)=>({node:o,depth:t}),Mt=(o,t)=>t.id;function St(o,t){o&1&&fe(0)}function kt(o,t){if(o&1&&ne(0,St,1,0,"ng-container",3),o&2){let e=t.$implicit;c();let n=oe(4);T("ngTemplateOutlet",n)("ngTemplateOutletContext",Ee(2,wt,e))}}function Et(o,t){if(o&1){let e=M();r(0,"button",9),g("click",function(a){f(e);let i=c().node,x=c();return v(x.toggleExpand(a,i.id))}),r(1,"span",10),d(2,"\u203A"),s()()}if(o&2){let e=c().node,n=c();T("title",n.isExpanded(e.id)?"Collapse":"Expand"),l(),I("case-tree-node__toggle-icon--open",n.isExpanded(e.id))}}function Ot(o,t){o&1&&fe(0)}function Pt(o,t){if(o&1&&ne(0,Ot,1,0,"ng-container",3),o&2){let e=t.$implicit,n=c(2).depth;c();let a=oe(4);T("ngTemplateOutlet",a)("ngTemplateOutletContext",Oe(2,Tt,e,n+1))}}function It(o,t){if(o&1&&R(0,Pt,1,5,"ng-container",null,Mt),o&2){let e=c().node;A(e.children)}}function Nt(o,t){if(o&1){let e=M();r(0,"div",4)(1,"button",5),g("click",function(){let a=f(e).node,i=c();return v(i.onItemSelected(a.id))}),r(2,"span",6),u(3,Et,3,3,"button",7),s(),r(4,"span",8),d(5),s()(),u(6,It,2,0),s()}if(o&2){let e=t.node,n=t.depth,a=c();ae("--depth",n),l(),I("case-tree-node__row--active",e.id===a.activeCaseId()),l(2),h(e.children.length?3:-1),l(2),b(e.name),l(),h(a.isExpanded(e.id)&&e.children.length?6:-1)}}var ue=class o{cases=p([]);activeCaseId=p(null);caseSelected=C();createRequested=C();caseItemTpl;rootItems=S(()=>Dt(this.cases()));autoExpandedIds=S(()=>{let t=this.activeCaseId();if(!t)return new Set;let e=new Set;return He(this.rootItems(),t,e),e});expandedIds=w(new Set);isExpanded(t){return this.expandedIds().has(t)||this.autoExpandedIds().has(t)}toggleExpand(t,e){t.stopPropagation(),this.expandedIds.update(n=>{let a=new Set(n);return a.has(e)?a.delete(e):a.add(e),a})}onItemSelected(t){this.caseSelected.emit(t)}onCreateRequested(){this.createRequested.emit()}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=E({type:o,selectors:[["agentos-case-drawer"]],viewQuery:function(e,n){if(e&1&&B(yt,7),e&2){let a;F(a=z())&&(n.caseItemTpl=a.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&&(r(0,"ds-entity-list",2),g("itemSelected",function(i){return n.onItemSelected(i)})("createRequested",function(){return n.onCreateRequested()}),s(),ne(1,kt,1,4,"ng-template",null,0,xe)(3,Nt,7,7,"ng-template",null,1,xe)),e&2){let a=oe(2);T("items",n.rootItems())("itemTemplate",a)("showCreate",!0)}},dependencies:[Fe,Ne],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 Dt(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:[]}),a=new Map;for(let m of o)a.set(m.id??"",n(m));let i=[];for(let m of o){let _=a.get(m.id??""),N=m.parentCaseId;N&&t.has(N)?a.get(N).children.push(_):i.push(_)}let x=m=>m.sort((_,N)=>(e.get(N.id)??"")>(e.get(_.id)??"")?1:-1).map(_=>Z(J({},_),{children:x(_.children)}));return x(i)}function He(o,t,e){for(let n of o){if(n.id===t)return!0;if(n.children.length&&He(n.children,t,e))return e.add(n.id),!0}return!1}function Rt(o,t){if(o&1){let e=M();k(0,"button",2),q("click",function(){f(e);let a=c(2);return v(a.onNavigate("/agentos/admin"))}),d(1,"\u2699\uFE0F Admin"),O()}}function At(o,t){o&1&&d(0," \u2600\uFE0F Light mode ")}function qt(o,t){o&1&&d(0," \u{1F319} Dark mode ")}function Vt(o,t){if(o&1){let e=M();k(0,"div",0),q("click",function(a){f(e);let i=c();return v(i.onClose(a))})("keyup.escape",function(a){f(e);let i=c();return v(i.onClose(a))}),O(),k(1,"div",1)(2,"button",2),q("click",function(){f(e);let a=c();return v(a.onNavigate("/agentos/user"))}),d(3,"\u{1F464} User"),O(),u(4,Rt,2,0,"button",3),W(5,"div",4),k(6,"button",2),q("click",function(){f(e);let a=c();return v(a.onNavigate("/agentos/namespaces"))}),d(7," \u{1F310} Namespaces "),O(),W(8,"div",4),k(9,"button",2),q("click",function(){f(e);let a=c();return v(a.onThemeToggle())}),u(10,At,1,0)(11,qt,1,0),O(),k(12,"button",2),q("click",function(){f(e);let a=c();return v(a.onLogsToggle())}),d(13," </> Technical logs "),O()()}if(o&2){let e=c();l(),I("shell-user-menu__overlay--mobile",e.variant()==="mobile"),l(3),h(e.isAdmin()?4:-1),l(6),h(e.isDark()?10:11),l(2),I("shell-user-menu__item--active",e.showTechnical())}}var G=class o{open=p.required();isAdmin=p.required();isDark=p.required();showTechnical=p.required();variant=p("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=E({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&&u(0,Vt,14,6),e&2&&h(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 Lt=(o,t)=>t.id;function Ft(o,t){if(o&1&&d(0),o&2){let e=c();$(" ",e.userInitials()," ")}}function zt(o,t){o&1&&d(0," \u2022\u2022\u2022 ")}function $t(o,t){o&1&&(r(0,"span"),d(1,"\u2713"),s())}function Ht(o,t){if(o&1){let e=M();r(0,"button",19),g("click",function(){let a=f(e).$implicit,i=c(3);return v(i.namespaceSelected.emit(a))}),D(1,"span",14),r(2,"span",20),d(3),s(),u(4,$t,2,0,"span"),s()}if(o&2){let e,n,a=t.$implicit,i=c(3);I("shell-sidebar__ns-item--active",a.id===((e=i.selectedNamespace())==null?null:e.id)),l(3),b(a.name),l(),h(a.id===((n=i.selectedNamespace())==null?null:n.id)?4:-1)}}function Ut(o,t){if(o&1&&(r(0,"div",17),R(1,Ht,5,4,"button",18,Lt),s()),o&2){let e=c(2);l(),A(e.namespaces())}}function Wt(o,t){if(o&1){let e=M();r(0,"div",9)(1,"button",13),g("click",function(){f(e);let a=c();return v(a.nsMenuToggled.emit())}),D(2,"span",14),r(3,"span",15),d(4),s(),r(5,"span",16),d(6,"\u25BE"),s()(),u(7,Ut,3,0,"div",17),s()}if(o&2){let e,n=c();l(4),b(((e=n.selectedNamespace())==null?null:e.name)??"Select namespace"),l(3),h(n.nsMenuOpen()?7:-1)}}function Bt(o,t){if(o&1&&(r(0,"span",10),d(1),s()),o&2){let e,n=c();l(),b((e=n.selectedNamespace())==null?null:e.name)}}var he=class o{sidebarWidth=p.required();selectedNamespace=p.required();namespaces=p.required();showNsPicker=p.required();nsMenuOpen=p.required();cases=p.required();activeCaseId=p.required();userInitials=p.required();menuOpen=p.required();isAdmin=p.required();isDark=p.required();showTechnical=p.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=E({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&&(r(0,"div",0)(1,"div",1)(2,"button",2),g("click",function(){return n.homeClicked.emit()}),D(3,"img",3),s(),r(4,"div",4)(5,"button",5),g("click",function(i){return n.menuToggled.emit(i)}),u(6,Ft,1,1)(7,zt,1,0),s(),r(8,"agentos-shell-user-menu",6),g("navigateTo",function(i){return n.navigateTo.emit(i)})("themeToggled",function(){return n.themeToggled.emit()})("logsToggled",function(){return n.logsToggled.emit()})("closed",function(i){return n.menuClosed.emit(i)}),s()()(),r(9,"div",7)(10,"div",8),d(11,"Namespace"),s(),u(12,Wt,8,2,"div",9)(13,Bt,2,1,"span",10),s(),r(14,"div",11)(15,"agentos-case-drawer",12),g("caseSelected",function(i){return n.caseSelected.emit(i)})("createRequested",function(){return n.createRequested.emit()}),s()()()),e&2&&(ae("width",n.sidebarWidth(),"px"),l(6),h(n.userInitials()?6:7),l(2),T("open",n.menuOpen())("isAdmin",n.isAdmin())("isDark",n.isDark())("showTechnical",n.showTechnical()),l(4),h(n.showNsPicker()?12:13),l(3),T("cases",n.cases())("activeCaseId",n.activeCaseId()))},dependencies:[ue,G],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 jt=(o,t)=>t.id;function Qt(o,t){o&1&&(r(0,"span"),d(1,"\u2713"),s())}function Gt(o,t){if(o&1){let e=M();r(0,"button",13),g("click",function(){let a=f(e).$implicit,i=c(2);return v(i.namespaceSelected.emit(a))}),D(1,"span",14),r(2,"span",15),d(3),s(),u(4,Qt,2,0,"span"),s()}if(o&2){let e,n,a=t.$implicit,i=c(2);I("shell-topbar-mobile__ns-item--active",a.id===((e=i.selectedNamespace())==null?null:e.id)),l(3),b(a.name),l(),h(a.id===((n=i.selectedNamespace())==null?null:n.id)?4:-1)}}function Kt(o,t){if(o&1){let e=M();r(0,"div",10),g("click",function(a){f(e);let i=c();return v(i.nsMenuClosed.emit(a))})("keyup.escape",function(a){f(e);let i=c();return v(i.nsMenuClosed.emit(a))}),s(),r(1,"div",11),R(2,Gt,5,4,"button",12,jt),s()}if(o&2){let e=c();l(2),A(e.namespaces())}}var ge=class o{selectedNamespace=p.required();namespaces=p.required();nsMenuOpen=p.required();userInitials=p.required();menuOpen=p.required();isAdmin=p.required();isDark=p.required();showTechnical=p.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=E({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&&(r(0,"div",0)(1,"button",1),g("click",function(){return n.homeClicked.emit()}),D(2,"img",2),s(),r(3,"span",3),d(4,"/"),s(),r(5,"div",4)(6,"button",5),g("click",function(i){return n.nsMenuToggled.emit(i)}),d(7),r(8,"span",6),d(9,"\u25BE"),s()(),u(10,Kt,4,0),s()(),r(11,"div",7)(12,"div",8),g("click",function(i){return n.menuToggled.emit(i)})("keyup.enter",function(){return n.menuToggled.emit(void 0)}),d(13),s(),r(14,"agentos-shell-user-menu",9),g("navigateTo",function(i){return n.navigateTo.emit(i)})("themeToggled",function(){return n.themeToggled.emit()})("logsToggled",function(){return n.logsToggled.emit()})("closed",function(i){return n.menuClosed.emit(i)}),s()()),e&2){let a;l(7),$(" ",((a=n.selectedNamespace())==null?null:a.name)??""," "),l(3),h(n.nsMenuOpen()?10:-1),l(3),$(" ",n.userInitials()||"\xB7\xB7\xB7"," "),l(),T("open",n.menuOpen())("isAdmin",n.isAdmin())("isDark",n.isDark())("showTechnical",n.showTechnical())}},dependencies:[G],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 Yt=(o,t)=>t.id;function Xt(o,t){if(o&1){let e=M();k(0,"div",9),q("click",function(){let a=f(e).$implicit,i=c(2);return v(i.caseSelected.emit(a.id??""))})("keyup.enter",function(){let a=f(e).$implicit,i=c(2);return v(i.caseSelected.emit(a.id??""))}),W(1,"span",1),k(2,"span",2),d(3),O(),k(4,"span",3),d(5),O()()}if(o&2){let e=t.$implicit,n=c(2);l(),ve("shell-case-switcher__dot--"+n.deriveMobileStatus(e.status)),l(2),b(e.title??e.id),l(2),b(e.status.toLowerCase())}}function Jt(o,t){if(o&1){let e=M();k(0,"div",5)(1,"div",6),q("click",function(){f(e);let a=c();return v(a.createRequested.emit())})("keyup.enter",function(){f(e);let a=c();return v(a.createRequested.emit())}),k(2,"span",7),d(3,"+"),O(),k(4,"span",2),d(5,"New case"),O()(),R(6,Xt,6,4,"div",8,Yt),O()}if(o&2){let e=c();l(6),A(e.otherCases())}}var Ce=class o{cases=p.required();activeCaseId=p.required();open=p.required();activeCase=S(()=>{let t=this.activeCaseId();return t?this.cases().find(e=>e.id===t)??null:null});activeCaseTitle=S(()=>this.activeCase()?.title??this.activeCaseId()??"New case");activeCaseStatus=S(()=>this.deriveMobileStatus(this.activeCase()?.status));activeCaseStatusLabel=S(()=>this.activeCase()?.status?.toLowerCase()??"");otherCases=S(()=>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=E({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&&(k(0,"div",0),q("click",function(){return n.toggled.emit()})("keyup.enter",function(){return n.toggled.emit()}),W(1,"span",1),k(2,"span",2),d(3),O(),k(4,"span",3),d(5),O(),k(6,"span",4),d(7,"\u2304"),O()(),u(8,Jt,8,0,"div",5)),e&2&&(l(),ve("shell-case-switcher__dot--"+n.activeCaseStatus()),l(2),b(n.activeCaseTitle()),l(2),b(n.activeCaseStatusLabel()),l(3),h(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 Zt(o,t){if(o&1&&D(0,"agentos-case-chat",6),o&2){let e=c();T("showTechnicalOverride",e.showTechnical())}}function en(o,t){o&1&&D(0,"agentos-case-home")}var Ue=class o{router=y(re);route=y(j);caseController=y(le);namespaceController=y(Ae);themePort=y(ze);userState=y($e);isAdmin=S(()=>this.userState.currentUser()?.isAdmin===!0);userInitials=S(()=>{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=S(()=>{let t=this.themePort.theme();return t==="dark"?!0:t==="light"?!1:typeof document<"u"&&document.documentElement.hasAttribute("data-theme")});sidebarWidth=w(300);menuOpen=w(!1);nsMenuOpen=w(!1);mobileSwitcherOpen=w(!1);showTechnical=w(!1);showNsPicker=S(()=>this.isAdmin()||this.namespaces().length>1);namespaceId$=this.route.queryParams.pipe(K(t=>t.ns??null));_namespaceIdRaw=X(this.namespaceId$);namespaceId=S(()=>this._namespaceIdRaw()??null);_activeCaseIdRaw=X(this.route.queryParams.pipe(K(t=>t.case??null)));activeCaseId=S(()=>this._activeCaseIdRaw()??null);refresh$=new we(void 0);cases$=this.namespaceId$.pipe(Y(t=>t?this.refresh$.pipe(Y(()=>this.caseController.listByParentCase(t))):[[]]));cases=X(this.cases$,{initialValue:[]});namespaces=X(this.namespaceController.listAllNamespace(),{initialValue:[]});selectedNamespace=w(null);constructor(){U(()=>{let t=this.namespaces(),e=this.namespaceId();if(t.length)if(e){let n=t.find(a=>a.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(),a=x=>{let m=x.clientX-e,_=Math.max(200,Math.min(500,n+m));this.sidebarWidth.set(_)},i=()=>{document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",i)};document.addEventListener("mousemove",a),document.addEventListener("mouseup",i)}refreshCases(){this.refresh$.next()}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=E({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&&(r(0,"div",0)(1,"agentos-shell-topbar-mobile",1),g("homeClicked",function(){return n.navigateHome()})("namespaceSelected",function(i){return n.onNamespaceSelected(i)})("nsMenuToggled",function(i){return n.toggleNsMenu(i)})("nsMenuClosed",function(i){return n.closeNsMenu(i)})("menuToggled",function(i){return n.toggleMenu(i)})("menuClosed",function(i){return n.closeMenu(i)})("navigateTo",function(i){return n.onMenuNavigate(i)})("themeToggled",function(){return n.onMenuToggleTheme()})("logsToggled",function(){return n.onMenuToggleLogs()}),s(),r(2,"agentos-shell-case-switcher-mobile",2),g("caseSelected",function(i){return n.onMobileCaseSelect(i)})("createRequested",function(){return n.onMobileCreateCase()})("toggled",function(){return n.toggleMobileSwitcher()}),s(),r(3,"agentos-shell-sidebar",3),g("homeClicked",function(){return n.navigateHome()})("namespaceSelected",function(i){return n.onNamespaceSelected(i)})("nsMenuToggled",function(){return n.toggleNsMenu()})("nsMenuClosed",function(i){return n.closeNsMenu(i)})("caseSelected",function(i){return n.onCaseSelected(i)})("createRequested",function(){return n.onCreateRequested()})("menuToggled",function(i){return n.toggleMenu(i)})("menuClosed",function(i){return n.closeMenu(i)})("navigateTo",function(i){return n.onMenuNavigate(i)})("themeToggled",function(){return n.onMenuToggleTheme()})("logsToggled",function(){return n.onMenuToggleLogs()}),s(),r(4,"div",4),g("mousedown",function(i){return n.onResizeStart(i)}),s(),r(5,"main",5),u(6,Zt,1,1,"agentos-case-chat",6)(7,en,1,0,"agentos-case-home"),s()()),e&2&&(l(),T("selectedNamespace",n.selectedNamespace())("namespaces",n.namespaces())("nsMenuOpen",n.nsMenuOpen())("userInitials",n.userInitials())("menuOpen",n.menuOpen())("isAdmin",n.isAdmin())("isDark",n.isDark())("showTechnical",n.showTechnical()),l(),T("cases",n.cases())("activeCaseId",n.activeCaseId())("open",n.mobileSwitcherOpen()),l(),T("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()),l(3),h(n.activeCaseId()?6:7))},dependencies:[pe,_e,he,ge,Ce],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{pe as a,_e as b,ue as c,Ue as d};
@@ -1 +0,0 @@
1
- import{a as q}from"./chunk-5YY3K2H4.js";import{b as B}from"./chunk-J3CZ3MOZ.js";import{a as M,c as $}from"./chunk-H7A4LOFH.js";import{t as D}from"./chunk-GN7KRTUQ.js";import"./chunk-4URCDOMP.js";import"./chunk-RBAVAHXW.js";import{a as m}from"./chunk-RI2JQRSB.js";import"./chunk-QJ3OBGZZ.js";import"./chunk-XG3WOI3P.js";import"./chunk-TZKO65ML.js";import{Bb as b,Db as r,Fb as c,Hc as T,Pb as I,S as d,Tb as x,Wa as y,ab as h,ac as N,ca as a,dc as R,ec as w,ga as C,ha as _,hc as k,i as f,lb as v,ma as u,mb as A,rb as p,sb as s,t as l,tb as g}from"./chunk-RYEX2DR7.js";var F=()=>[];function P(n,t){if(n&1){let e=b();s(0,"agentos-agent-config-item",4),r("deleteRequested",function(i){C(e);let S=c(2);return _(S.deleteConfig(i))}),g()}if(n&2){let e=c(2);p("config",t)("namespaceId",e.namespaceId)}}function L(n,t){if(n&1&&v(0,P,1,2,"agentos-agent-config-item",3),n&2){let e,o=t.$implicit,i=c();A((e=i.resolveConfig(o.id))?0:-1,e)}}var E=class n{route=a(M);router=a($);destroyRef=a(u);agentConfigController=a(B);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new f(void 0);configs$=this.refresh$.pipe(d(()=>this.agentConfigController.listByNamespaceAgentConfig(this.namespaceId)));configItems$=this.configs$.pipe(l(t=>t.map(e=>({id:e.id??"",name:e.name,description:e.description}))));configsById=new Map;constructor(){this.configs$.pipe(m(this.destroyRef)).subscribe(t=>{this.configsById=new Map(t.map(e=>[e.id??"",e]))})}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"agent-configs","new"])}deleteConfig(t){this.agentConfigController.deleteAgentConfig(t.id??"").pipe(m(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolveConfig(t){return this.configsById.get(t)??null}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=y({type:n,selectors:[["agentos-namespace-agent-configs"]],decls:6,vars:6,consts:[["agentConfigItemTpl",""],["title","Agent Configs","emptyMessage","No agent configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","type","button",1,"namespace-agent-configs__back",3,"click"],[3,"config","namespaceId"],[3,"deleteRequested","config","namespaceId"]],template:function(e,o){if(e&1&&(s(0,"ds-entity-list",1),R(1,"async"),r("createRequested",function(){return o.openCreateForm()}),s(2,"button",2),r("click",function(){return o.goBack()}),x(3," \u2190 Namespaces "),g()(),h(4,L,1,1,"ng-template",null,0,k)),e&2){let i=I(5);p("items",w(1,3,o.configItems$)??N(5,F))("showCreate",!0)("itemTemplate",i)}},dependencies:[D,q,T],styles:[".namespace-agent-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.namespace-agent-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};export{E as NamespaceAgentConfigsComponent};