@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.
- package/browser/chunk-22RX22JY.js +1 -0
- package/browser/{chunk-IZMOVLXM.js → chunk-243E2GWV.js} +1 -1
- package/browser/chunk-26MGIRJF.js +1 -0
- package/browser/{chunk-E5MP3JT3.js → chunk-2O4IDVFE.js} +1 -1
- package/browser/chunk-2P74VZU4.js +1 -0
- package/browser/chunk-3AOPEZPX.js +1 -0
- package/browser/{chunk-T7LK5WIK.js → chunk-3IOIMTCZ.js} +1 -1
- package/browser/{chunk-IZ232KSX.js → chunk-3NE2UZIY.js} +1 -1
- package/browser/{chunk-BM7HTRD4.js → chunk-3NOI65IY.js} +1 -1
- package/browser/{chunk-ZFLT2KNY.js → chunk-43DMEMMQ.js} +1 -1
- package/browser/{chunk-TIPIHEBG.js → chunk-4F2LQOD7.js} +1 -1
- package/browser/{chunk-OCT6NWLB.js → chunk-4JBCVOGN.js} +1 -1
- package/browser/{chunk-DIAV5ZVT.js → chunk-4KEHW6KL.js} +1 -1
- package/browser/{chunk-MLSIHZ2T.js → chunk-4NGQR26Q.js} +1 -1
- package/browser/{chunk-W2DFJLOU.js → chunk-5CBZIB6D.js} +1 -1
- package/browser/chunk-5J7BTB5J.js +5 -0
- package/browser/{chunk-CREVHCXF.js → chunk-5K5EFCNT.js} +1 -1
- package/browser/chunk-5OPQ2IC6.js +1 -0
- package/browser/{chunk-2KD6MSFI.js → chunk-5VKJNF6W.js} +1 -1
- package/browser/{chunk-PN75DG7I.js → chunk-6RZUBD7A.js} +1 -1
- package/browser/chunk-6VCRRGXF.js +1 -0
- package/browser/{chunk-H7A4LOFH.js → chunk-7MQRVE7E.js} +1 -1
- package/browser/{chunk-H2NKOG3U.js → chunk-7V5RIRTC.js} +1 -1
- package/browser/{chunk-T6U3WDDW.js → chunk-A2R5GVPT.js} +1 -1
- package/browser/{chunk-AV7DTXWS.js → chunk-ATKHLJJ3.js} +1 -1
- package/browser/{chunk-GN7KRTUQ.js → chunk-BGEXT3EN.js} +1 -1
- package/browser/chunk-BMUZTI7K.js +1 -0
- package/browser/{chunk-WRTC44LF.js → chunk-BQHUHW7P.js} +1 -1
- package/browser/chunk-CCPU2LL3.js +1 -0
- package/browser/{chunk-TANV4K2Q.js → chunk-CRMVKTOY.js} +1 -1
- package/browser/chunk-CU4C25HM.js +1 -0
- package/browser/{chunk-YQAOEJN2.js → chunk-DVSVPID7.js} +1 -1
- package/browser/{chunk-TZKO65ML.js → chunk-E3XC4CVU.js} +1 -1
- package/browser/{chunk-Q7GPLEGX.js → chunk-EQXGFCI5.js} +1 -1
- package/browser/{chunk-BWBXJSAF.js → chunk-F42BGKID.js} +1 -1
- package/browser/{chunk-QJ3OBGZZ.js → chunk-FAM7HWYV.js} +1 -1
- package/browser/{chunk-ZH3XQHLJ.js → chunk-FEJVBWEX.js} +1 -1
- package/browser/{chunk-UFOTGZBF.js → chunk-FMAU2O5I.js} +1 -1
- package/browser/{chunk-X4OBCZKS.js → chunk-FOAW6HUH.js} +1 -1
- package/browser/{chunk-JEGJL4TT.js → chunk-FTVXDMJT.js} +1 -1
- package/browser/chunk-G2BRVRGR.js +1 -0
- package/browser/{chunk-24EMVCMJ.js → chunk-GUB4VYOT.js} +1 -1
- package/browser/{chunk-XIWUSJ3U.js → chunk-H27HCS4L.js} +1 -1
- package/browser/{chunk-EJH5VPZT.js → chunk-HE2ON544.js} +1 -1
- package/browser/{chunk-7UX5UET4.js → chunk-HO4VUFE6.js} +1 -1
- package/browser/{chunk-MQIE2KBB.js → chunk-HQZLHG3V.js} +1 -1
- package/browser/{chunk-7DUVQCGC.js → chunk-IOREZEED.js} +1 -1
- package/browser/{chunk-RI2JQRSB.js → chunk-IRZNRZ5Q.js} +1 -1
- package/browser/{chunk-4OZZANXO.js → chunk-JIHPEYRG.js} +1 -1
- package/browser/{chunk-SUCGKO3W.js → chunk-K4C36S6V.js} +1 -1
- package/browser/{chunk-2XIUD7DV.js → chunk-KZJRQ6RN.js} +1 -1
- package/browser/{chunk-7BYLIOKV.js → chunk-LBMJRBEQ.js} +1 -1
- package/browser/{chunk-ETLSYFBB.js → chunk-LH4ATU27.js} +1 -1
- package/browser/{chunk-EMS3MOSZ.js → chunk-LM2BKZRF.js} +1 -1
- package/browser/chunk-LMFI6Y77.js +1 -0
- package/browser/{chunk-ATOA52OV.js → chunk-LRKPIL3B.js} +1 -1
- package/browser/chunk-LX5DYIMF.js +1 -0
- package/browser/chunk-M6ORKUDA.js +1 -0
- package/browser/{chunk-JLGR5C43.js → chunk-M7LNEVHA.js} +1 -1
- package/browser/{chunk-O4JNY3IM.js → chunk-ND3PB3FA.js} +1 -1
- package/browser/{chunk-POQ6PK6P.js → chunk-NIWF7LLH.js} +1 -1
- package/browser/{chunk-RBAVAHXW.js → chunk-OBV4LQBZ.js} +1 -1
- package/browser/chunk-OSQQAYJZ.js +1 -0
- package/browser/{chunk-4URCDOMP.js → chunk-PKBNMAQJ.js} +1 -1
- package/browser/{chunk-JHMFWXB4.js → chunk-PNFA7PN2.js} +1 -1
- package/browser/{chunk-YTTJDHQV.js → chunk-PRFGHN7L.js} +1 -1
- package/browser/{chunk-4RQXBHNU.js → chunk-RJBF3TIH.js} +1 -1
- package/browser/chunk-RRBTVPFV.js +1 -0
- package/browser/{chunk-PZWORCU2.js → chunk-S7MAZ5PQ.js} +1 -1
- package/browser/chunk-SCK76QV6.js +1 -0
- package/browser/chunk-SF7PCURW.js +1 -0
- package/browser/{chunk-SR3JKZ3U.js → chunk-TG75SVZ4.js} +1 -1
- package/browser/{chunk-IWORAUIR.js → chunk-TS6GGNWA.js} +1 -1
- package/browser/{chunk-5RSIAFID.js → chunk-TZMTC2HL.js} +1 -1
- package/browser/chunk-UAHCUD67.js +1 -0
- package/browser/chunk-UDA26TV3.js +1 -0
- package/browser/chunk-URX4BP67.js +1 -0
- package/browser/chunk-VHC775VZ.js +1 -0
- package/browser/chunk-VIDPCJ3F.js +1 -0
- package/browser/{chunk-RFEQZZ65.js → chunk-VYU454KQ.js} +1 -1
- package/browser/{chunk-J6XN2QQO.js → chunk-W6TYWCQH.js} +1 -1
- package/browser/{chunk-XG3WOI3P.js → chunk-WLSXA23B.js} +1 -1
- package/browser/{chunk-34XXAW4B.js → chunk-WN6IHVRI.js} +1 -1
- package/browser/{chunk-5ZZOXT2B.js → chunk-WQ5AIKDC.js} +1 -1
- package/browser/{chunk-FPE2L5B6.js → chunk-XBPK63K2.js} +1 -1
- package/browser/chunk-Y6K6VJYJ.js +1 -0
- package/browser/{chunk-6J2HD2IJ.js → chunk-ZU7FZEK3.js} +1 -1
- package/browser/index.html +1 -1
- package/browser/{main-INQHHK2Q.js → main-VRT323QR.js} +1 -1
- package/package.json +1 -1
- package/browser/chunk-5YY3K2H4.js +0 -1
- package/browser/chunk-EU6MUKDF.js +0 -1
- package/browser/chunk-FUVTYKQF.js +0 -1
- package/browser/chunk-GTY23DMS.js +0 -1
- package/browser/chunk-HMFECYUP.js +0 -1
- package/browser/chunk-HNNYFORJ.js +0 -1
- package/browser/chunk-IGOUE2XE.js +0 -1
- package/browser/chunk-J3CZ3MOZ.js +0 -1
- package/browser/chunk-JTM5UHB2.js +0 -1
- package/browser/chunk-KO4MDPCD.js +0 -1
- package/browser/chunk-KP7JXEQ6.js +0 -1
- package/browser/chunk-LN6ED2HF.js +0 -1
- package/browser/chunk-LT6BGRWZ.js +0 -1
- package/browser/chunk-OQBPCHYW.js +0 -1
- package/browser/chunk-P6D3VN2I.js +0 -1
- package/browser/chunk-PCPMONQV.js +0 -1
- package/browser/chunk-QWADOF7R.js +0 -1
- package/browser/chunk-RYEX2DR7.js +0 -5
- package/browser/chunk-S4E4KZRV.js +0 -1
- package/browser/chunk-SK7JAK5K.js +0 -1
- package/browser/chunk-TJUGTTPT.js +0 -1
- package/browser/chunk-TPZGV5NA.js +0 -1
- package/browser/chunk-YJA5A4XF.js +0 -1
- package/browser/chunk-ZTCAFSDX.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Rc as ne,Sc as h,Tc as w,Uc as j,Z as A,a as f,aa as X,b as u,ba as x,ca as B,da as ee,g as Z,pa as te}from"./chunk-5J7BTB5J.js";var v=new X("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 m=class{apiKeys;username;password;accessToken;basePath;withCredentials;encoder;encodeParam;credentials;constructor({accessToken:C,apiKeys:n,basePath:r,credentials:l,encodeParam:o,encoder:t,password:e,username:i,withCredentials:p}={}){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),p!==void 0&&(this.withCredentials=p),t&&(this.encoder=t),this.encodeParam=o??(a=>this.defaultEncodeParam(a)),this.credentials=l??{}}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,l){let o=this.lookupCredential(C);return o?r.set(n,(l??"")+o):r}addCredentialToQuery(C,n,r){let l=this.lookupCredential(C);return l?r.set(n,l):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 ne;configuration;encoder;constructor(C,n){if(this.configuration=n||new m,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,l=!1){return typeof n=="object"&&!(n instanceof Date)?this.addToHttpParamsRecursive(C,n,l?r:void 0,l):this.addToHttpParamsRecursive(C,n,r)}addToHttpParamsRecursive(C,n,r,l=!1){if(n==null)return C;if(typeof n=="object"){if(r!=null)return l?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 $=class H extends P{constructor(n,r,l){super(r,l);this.httpClient=n}createAgentConfig(n,r="body",l=!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 h,p=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:b}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(f({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}deleteAgentConfig(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}disableAgentConfig(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}enableAgentConfig(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}getByIdAgentConfig(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}getByIdsAgentConfig(n,r="body",l=!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 h,p=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:b}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(f({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}getDefinitionAgentConfig(n,r,l,o="body",t=!1,e){if(n==null)throw new Error("Required parameter id was null or undefined when calling getDefinitionAgentConfig.");let i=new w({encoder:this.encoder});i=this.addToHttpParams(i,r,"withUserOverlay"),i=this.addToHttpParams(i,l,"namespaceId");let p=this.defaultHeaders,a=e?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);a!==void 0&&(p=p.set("Accept",a));let d=e?.context??new h,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:b,withCredentials:y}=this.configuration;return this.httpClient.request("get",`${b}${g}`,u(f({context:d,params:i,responseType:c},y?{withCredentials:y}:{}),{headers:p,observe:o,transferCache:s,reportProgress:t}))}listByParentAgentConfig(n,r,l="body",o=!1,t){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentAgentConfig.");let e=new w({encoder:this.encoder});e=this.addToHttpParams(e,r,"withDisabled");let i=this.defaultHeaders,p=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);p!==void 0&&(i=i.set("Accept",p));let a=t?.context??new h,d=t?.transferCache??!0,s="json";p&&(p.startsWith("text")?s="text":this.configuration.isJsonMime(p)?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:b}=this.configuration;return this.httpClient.request("get",`${g}${c}`,u(f({context:a,params:e,responseType:s},b?{withCredentials:b}:{}),{headers:i,observe:l,transferCache:d,reportProgress:o}))}listPlatformAgentsAgentConfig(n,r="body",l=!1,o){let t=new w({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 p=o?.context??new h,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}`,u(f({context:p,params:t,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:r,transferCache:a,reportProgress:l}))}searchAgentConfig(n,r="body",l=!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 h,p=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:b}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(f({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}updateAgentConfig(n,r,l="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 p=t?.context??new h,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:b,withCredentials:y}=this.configuration;return this.httpClient.request("put",`${b}${g}`,u(f({context:p,body:r,responseType:c},y?{withCredentials:y}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(m,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var M=class H extends P{constructor(n,r,l){super(r,l);this.httpClient=n}createAiModel(n,r="body",l=!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 h,p=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:b}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(f({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}deleteAiModel(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}getByIdAiModel(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}getByIdsAiModel(n,r="body",l=!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 h,p=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:b}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(f({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}listByNamespaceIdAiModel(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}listByParentAiModel(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}listPlatformLevelAiModel(n="body",r=!1,l){let o=this.defaultHeaders,t=l?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=l?.context??new h,i=l?.transferCache??!0,p="json";t&&(t.startsWith("text")?p="text":this.configuration.isJsonMime(t)?p="json":p="blob");let a="/api/ai-models/platform",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,u(f({context:e,responseType:p},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}updateAiModel(n,r,l="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 p=t?.context??new h,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:b,withCredentials:y}=this.configuration;return this.httpClient.request("put",`${b}${g}`,u(f({context:p,body:r,responseType:c},y?{withCredentials:y}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(m,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var S=class H extends P{constructor(n,r,l){super(r,l);this.httpClient=n}createAiProvider(n,r="body",l=!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 h,p=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:b}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(f({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}deleteAiProvider(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}getByIdAiProvider(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}getByIdsAiProvider(n,r="body",l=!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 h,p=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:b}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(f({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}listAiProvider(n,r,l="body",o=!1,t){let e=new w({encoder:this.encoder});e=this.addToHttpParams(e,n,"namespaceId"),e=this.addToHttpParams(e,r,"userId");let i=this.defaultHeaders,p=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);p!==void 0&&(i=i.set("Accept",p));let a=t?.context??new h,d=t?.transferCache??!0,s="json";p&&(p.startsWith("text")?s="text":this.configuration.isJsonMime(p)?s="json":s="blob");let c="/api/ai-providers",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("get",`${g}${c}`,u(f({context:a,params:e,responseType:s},b?{withCredentials:b}:{}),{headers:i,observe:l,transferCache:d,reportProgress:o}))}updateAiProvider(n,r,l="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 p=t?.context??new h,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:b,withCredentials:y}=this.configuration;return this.httpClient.request("put",`${b}${g}`,u(f({context:p,body:r,responseType:c},y?{withCredentials:y}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(m,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var U=class H extends P{constructor(n,r,l){super(r,l);this.httpClient=n}addMessageCase(n,r,l="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 p=t?.context??new h,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:b,withCredentials:y}=this.configuration;return this.httpClient.request("post",`${b}${g}`,u(f({context:p,body:r,responseType:c},y?{withCredentials:y}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}createCase(n,r="body",l=!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 h,p=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:b}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(f({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}deleteCase(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}getByIdCase(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}getByIdsCase(n,r="body",l=!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 h,p=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:b}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(f({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}interruptCase(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}killCase(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}listByParentCase(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}listByUserCase(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}listByUserExternalIdCase(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}listByUserInNamespaceCase(n,r="body",l=!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 h,p=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:b}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(f({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}updateCase(n,r,l="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 p=t?.context??new h,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:b,withCredentials:y}=this.configuration;return this.httpClient.request("put",`${b}${g}`,u(f({context:p,body:r,responseType:c},y?{withCredentials:y}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(m,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var F=class H extends P{constructor(n,r,l){super(r,l);this.httpClient=n}createIntegrationConfig(n,r="body",l=!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 h,p=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:b}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(f({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}deleteIntegrationConfig(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}getByIdIntegrationConfig(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}getByIdsIntegrationConfig(n,r="body",l=!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 h,p=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:b}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(f({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}listIntegrationConfig(n,r,l="body",o=!1,t){let e=new w({encoder:this.encoder});e=this.addToHttpParams(e,n,"namespaceId"),e=this.addToHttpParams(e,r,"userId");let i=this.defaultHeaders,p=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);p!==void 0&&(i=i.set("Accept",p));let a=t?.context??new h,d=t?.transferCache??!0,s="json";p&&(p.startsWith("text")?s="text":this.configuration.isJsonMime(p)?s="json":s="blob");let c="/api/integration-configs",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("get",`${g}${c}`,u(f({context:a,params:e,responseType:s},b?{withCredentials:b}:{}),{headers:i,observe:l,transferCache:d,reportProgress:o}))}updateIntegrationConfig(n,r,l="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 p=t?.context??new h,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:b,withCredentials:y}=this.configuration;return this.httpClient.request("put",`${b}${g}`,u(f({context:p,body:r,responseType:c},y?{withCredentials:y}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(m,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var N=class H extends P{constructor(n,r,l){super(r,l);this.httpClient=n}getTypeIntegrationType(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}listTypesIntegrationType(n="body",r=!1,l){let o=this.defaultHeaders,t=l?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=l?.context??new h,i=l?.transferCache??!0,p="json";t&&(t.startsWith("text")?p="text":this.configuration.isJsonMime(t)?p="json":p="blob");let a="/api/integration-types",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,u(f({context:e,responseType:p},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(m,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var G=class H extends P{constructor(n,r,l){super(r,l);this.httpClient=n}createNamespace(n,r="body",l=!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 h,p=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:b}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(f({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}deleteNamespace(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}deployAgentsNamespace(n,r,l="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 p=t?.context??new h,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:b,withCredentials:y}=this.configuration;return this.httpClient.request("post",`${b}${g}`,u(f({context:p,body:r,responseType:c},y?{withCredentials:y}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}getByIdNamespace(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}getByIdsNamespace(n,r="body",l=!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 h,p=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:b}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(f({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}listAllNamespace(n="body",r=!1,l){let o=this.defaultHeaders,t=l?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=l?.context??new h,i=l?.transferCache??!0,p="json";t&&(t.startsWith("text")?p="text":this.configuration.isJsonMime(t)?p="json":p="blob");let a="/api/namespaces",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,u(f({context:e,responseType:p},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}listByExternalIdsNamespace(n,r="body",l=!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 h,p=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:b}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(f({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}undeployAgentsNamespace(n,r,l="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 p=t?.context??new h,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:b,withCredentials:y}=this.configuration;return this.httpClient.request("post",`${b}${g}`,u(f({context:p,body:r,responseType:c},y?{withCredentials:y}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}updateNamespace(n,r,l="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 p=t?.context??new h,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:b,withCredentials:y}=this.configuration;return this.httpClient.request("put",`${b}${g}`,u(f({context:p,body:r,responseType:c},y?{withCredentials:y}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(m,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var oe=(o=>(o.OpenAI="OpenAI",o.Anthropic="Anthropic",o.Gemini="Gemini",o.vLLM="vLLM",o.Ollama="Ollama",o))(oe||{});var J=class H extends P{constructor(n,r,l){super(r,l);this.httpClient=n}getByIdCaseEventRest(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}getByIdsCaseEventRest(n,r="body",l=!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 h,p=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:b}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(f({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}listByCaseCaseEventRest(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(m,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var W=class H extends P{constructor(n,r,l){super(r,l);this.httpClient=n}deleteCaseFileExchange(n,r,l="body",o=!1,t){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling deleteCaseFileExchange.");if(r==null)throw new Error("Required parameter path was null or undefined when calling deleteCaseFileExchange.");let e=new w({encoder:this.encoder});e=this.addToHttpParams(e,r,"path");let i=this.defaultHeaders,p=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);p!==void 0&&(i=i.set("Accept",p));let a=t?.context??new h,d=t?.transferCache??!0,s="json";p&&(p.startsWith("text")?s="text":this.configuration.isJsonMime(p)?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"})}/files`,{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("delete",`${g}${c}`,u(f({context:a,params:e,responseType:s},b?{withCredentials:b}:{}),{headers:i,observe:l,transferCache:d,reportProgress:o}))}deleteNamespaceFileExchange(n,r,l="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling deleteNamespaceFileExchange.");if(r==null)throw new Error("Required parameter path was null or undefined when calling deleteNamespaceFileExchange.");let e=new w({encoder:this.encoder});e=this.addToHttpParams(e,r,"path");let i=this.defaultHeaders,p=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);p!==void 0&&(i=i.set("Accept",p));let a=t?.context??new h,d=t?.transferCache??!0,s="json";p&&(p.startsWith("text")?s="text":this.configuration.isJsonMime(p)?s="json":s="blob");let c=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/files`,{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("delete",`${g}${c}`,u(f({context:a,params:e,responseType:s},b?{withCredentials:b}:{}),{headers:i,observe:l,transferCache:d,reportProgress:o}))}downloadCaseFileExchange(n,r,l="body",o=!1,t){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling downloadCaseFileExchange.");if(r==null)throw new Error("Required parameter path was null or undefined when calling downloadCaseFileExchange.");let e=new w({encoder:this.encoder});e=this.addToHttpParams(e,r,"path");let i=this.defaultHeaders,p=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/octet-stream"]);p!==void 0&&(i=i.set("Accept",p));let a=t?.context??new h,d=t?.transferCache??!0,s="json";p&&(p.startsWith("text")?s="text":this.configuration.isJsonMime(p)?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"})}/files/download`,{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("get",`${g}${c}`,u(f({context:a,params:e,responseType:s},b?{withCredentials:b}:{}),{headers:i,observe:l,transferCache:d,reportProgress:o}))}downloadNamespaceFileExchange(n,r,l="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling downloadNamespaceFileExchange.");if(r==null)throw new Error("Required parameter path was null or undefined when calling downloadNamespaceFileExchange.");let e=new w({encoder:this.encoder});e=this.addToHttpParams(e,r,"path");let i=this.defaultHeaders,p=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/octet-stream"]);p!==void 0&&(i=i.set("Accept",p));let a=t?.context??new h,d=t?.transferCache??!0,s="json";p&&(p.startsWith("text")?s="text":this.configuration.isJsonMime(p)?s="json":s="blob");let c=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/files/download`,{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("get",`${g}${c}`,u(f({context:a,params:e,responseType:s},b?{withCredentials:b}:{}),{headers:i,observe:l,transferCache:d,reportProgress:o}))}getCaseFileContentExchange(n,r,l="body",o=!1,t){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling getCaseFileContentExchange.");if(r==null)throw new Error("Required parameter path was null or undefined when calling getCaseFileContentExchange.");let e=new w({encoder:this.encoder});e=this.addToHttpParams(e,r,"path");let i=this.defaultHeaders,p=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);p!==void 0&&(i=i.set("Accept",p));let a=t?.context??new h,d=t?.transferCache??!0,s="json";p&&(p.startsWith("text")?s="text":this.configuration.isJsonMime(p)?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"})}/files/content`,{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("get",`${g}${c}`,u(f({context:a,params:e,responseType:s},b?{withCredentials:b}:{}),{headers:i,observe:l,transferCache:d,reportProgress:o}))}getCaseFilesManifestExchange(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling getCaseFilesManifestExchange.");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 h,p=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"})}/files/manifest`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}getNamespaceFileContentExchange(n,r,l="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling getNamespaceFileContentExchange.");if(r==null)throw new Error("Required parameter path was null or undefined when calling getNamespaceFileContentExchange.");let e=new w({encoder:this.encoder});e=this.addToHttpParams(e,r,"path");let i=this.defaultHeaders,p=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);p!==void 0&&(i=i.set("Accept",p));let a=t?.context??new h,d=t?.transferCache??!0,s="json";p&&(p.startsWith("text")?s="text":this.configuration.isJsonMime(p)?s="json":s="blob");let c=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/files/content`,{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("get",`${g}${c}`,u(f({context:a,params:e,responseType:s},b?{withCredentials:b}:{}),{headers:i,observe:l,transferCache:d,reportProgress:o}))}getNamespaceFilesManifestExchange(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling getNamespaceFilesManifestExchange.");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 h,p=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"})}/files/manifest`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}uploadCaseFileExchange(n,r,l="body",o=!1,t){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling uploadCaseFileExchange.");if(r==null)throw new Error("Required parameter file was null or undefined when calling uploadCaseFileExchange.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let p=t?.context??new h,a=t?.transferCache??!0,d=["multipart/form-data"],s=this.canConsumeForm(d),c,g=!1,b=!1;g=s,g?c=new FormData:c=new w({encoder:this.encoder}),r!==void 0&&(c=c.append("file",r)||c);let y="json";i&&(i.startsWith("text")?y="text":this.configuration.isJsonMime(i)?y="json":y="blob");let O=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/files`,{basePath:q,withCredentials:E}=this.configuration;return this.httpClient.request("post",`${q}${O}`,u(f({context:p,body:b?c.toString():c,responseType:y},E?{withCredentials:E}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}uploadNamespaceFileExchange(n,r,l="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling uploadNamespaceFileExchange.");if(r==null)throw new Error("Required parameter file was null or undefined when calling uploadNamespaceFileExchange.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let p=t?.context??new h,a=t?.transferCache??!0,d=["multipart/form-data"],s=this.canConsumeForm(d),c,g=!1,b=!1;g=s,g?c=new FormData:c=new w({encoder:this.encoder}),r!==void 0&&(c=c.append("file",r)||c);let y="json";i&&(i.startsWith("text")?y="text":this.configuration.isJsonMime(i)?y="json":y="blob");let O=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/files`,{basePath:q,withCredentials:E}=this.configuration;return this.httpClient.request("post",`${q}${O}`,u(f({context:p,body:b?c.toString():c,responseType:y},E?{withCredentials:E}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(m,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var _=class H extends P{constructor(n,r,l){super(r,l);this.httpClient=n}createFeedback(n,r="body",l=!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 h,p=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:b}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(f({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}listByCaseEventFeedback(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}listByCaseFeedback(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(m,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var D=class H extends P{constructor(n,r,l){super(r,l);this.httpClient=n}grantAdmin(n,r,l="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 p=t?.context??new h,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}`,u(f({context:p,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}grantMember(n,r,l="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 p=t?.context??new h,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}`,u(f({context:p,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}listNamespaceUsers(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}revokeAdmin(n,r,l="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 p=t?.context??new h,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}`,u(f({context:p,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}revokeMember(n,r,l="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 p=t?.context??new h,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}`,u(f({context:p,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}updateRolesByExternalId(n,r="body",l=!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 h,p=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:b}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(f({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(m,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var k=class H extends P{constructor(n,r,l){super(r,l);this.httpClient=n}debugAllPlugins(n="body",r=!1,l){let o=this.defaultHeaders,t=l?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=l?.context??new h,i=l?.transferCache??!0,p="json";t&&(t.startsWith("text")?p="text":this.configuration.isJsonMime(t)?p="json":p="blob");let a="/api/plugins/debug",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,u(f({context:e,responseType:p},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}debugPlugin(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}getAllPlugins(n="body",r=!1,l){let o=this.defaultHeaders,t=l?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=l?.context??new h,i=l?.transferCache??!0,p="json";t&&(t.startsWith("text")?p="text":this.configuration.isJsonMime(t)?p="json":p="blob");let a="/api/plugins",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,u(f({context:e,responseType:p},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}getPlugin(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}reloadAllAgentsPlugin(n="body",r=!1,l){let o=this.defaultHeaders,t=l?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=l?.context??new h,i=l?.transferCache??!0,p="json";t&&(t.startsWith("text")?p="text":this.configuration.isJsonMime(t)?p="json":p="blob");let a="/api/plugins/reload-agents",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("post",`${d}${a}`,u(f({context:e,responseType:p},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}reloadPlugin(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}startPlugin(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}stopPlugin(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}unloadPlugin(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}uploadPlugin(n="body",r=!1,l){let o=this.defaultHeaders,t=l?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=l?.context??new h,i=l?.transferCache??!0,p="json";t&&(t.startsWith("text")?p="text":this.configuration.isJsonMime(t)?p="json":p="blob");let a="/api/plugins/upload",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("post",`${d}${a}`,u(f({context:e,responseType:p},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(m,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var L=class H extends P{constructor(n,r,l){super(r,l);this.httpClient=n}createPrompt(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter prompt was null or undefined when calling createPrompt.");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 h,p=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/prompts",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(f({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}deletePrompt(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deletePrompt.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,p=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/prompts/${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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}findEffectiveByNamespaceIdPrompt(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling findEffectiveByNamespaceIdPrompt.");let t=new w({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 p=o?.context??new h,a=o?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s="/api/prompts/effective",{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("get",`${c}${s}`,u(f({context:p,params:t,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:r,transferCache:a,reportProgress:l}))}getByIdPrompt(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdPrompt.");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 h,p=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/prompts/${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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}getByIdsPrompt(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsPrompt.");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 h,p=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/prompts/by-ids",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(f({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}listByParentPrompt(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentPrompt.");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 h,p=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/prompts/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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}listPrompt(n,r,l="body",o=!1,t){if(n==null)throw new Error("Required parameter scope was null or undefined when calling listPrompt.");let e=new w({encoder:this.encoder});e=this.addToHttpParams(e,n,"scope"),e=this.addToHttpParams(e,r,"namespaceId");let i=this.defaultHeaders,p=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);p!==void 0&&(i=i.set("Accept",p));let a=t?.context??new h,d=t?.transferCache??!0,s="json";p&&(p.startsWith("text")?s="text":this.configuration.isJsonMime(p)?s="json":s="blob");let c="/api/prompts",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("get",`${g}${c}`,u(f({context:a,params:e,responseType:s},b?{withCredentials:b}:{}),{headers:i,observe:l,transferCache:d,reportProgress:o}))}updatePrompt(n,r,l="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updatePrompt.");if(r==null)throw new Error("Required parameter prompt was null or undefined when calling updatePrompt.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let p=t?.context??new h,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/prompts/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:b,withCredentials:y}=this.configuration;return this.httpClient.request("put",`${b}${g}`,u(f({context:p,body:r,responseType:c},y?{withCredentials:y}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(m,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var Q=class H extends P{constructor(n,r,l){super(r,l);this.httpClient=n}streamEventsCaseEventSse(n,r,l="body",o=!1,t){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling streamEventsCaseEventSse.");let e=new w({encoder:this.encoder});e=this.addToHttpParams(e,r,"includePreviousEvents");let i=this.defaultHeaders,p=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["text/event-stream"]);p!==void 0&&(i=i.set("Accept",p));let a=t?.context??new h,d=t?.transferCache??!0,s="json";p&&(p.startsWith("text")?s="text":this.configuration.isJsonMime(p)?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:b}=this.configuration;return this.httpClient.request("get",`${g}${c}`,u(f({context:a,params:e,responseType:s},b?{withCredentials:b}:{}),{headers:i,observe:l,transferCache:d,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(m,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var K=class H extends P{constructor(n,r,l){super(r,l);this.httpClient=n}createUser(n,r="body",l=!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 h,p=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:b}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(f({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}deleteUser(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}getByIdUser(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}getByIdsUser(n,r="body",l=!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 h,p=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:b}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(f({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}getGroupsByExternalIdsUser(n,r="body",l=!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 h,p=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:b}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(f({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}getMeUser(n="body",r=!1,l){let o=this.defaultHeaders,t=l?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=l?.context??new h,i=l?.transferCache??!0,p="json";t&&(t.startsWith("text")?p="text":this.configuration.isJsonMime(t)?p="json":p="blob");let a="/api/users/me",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,u(f({context:e,responseType:p},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}listAllUser(n="body",r=!1,l){let o=this.defaultHeaders,t=l?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=l?.context??new h,i=l?.transferCache??!0,p="json";t&&(t.startsWith("text")?p="text":this.configuration.isJsonMime(t)?p="json":p="blob");let a="/api/users",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,u(f({context:e,responseType:p},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}listByExternalIdsUser(n,r="body",l=!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 h,p=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:b}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(f({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}updateUser(n,r,l="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 p=t?.context??new h,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:b,withCredentials:y}=this.configuration;return this.httpClient.request("put",`${b}${g}`,u(f({context:p,body:r,responseType:c},y?{withCredentials:y}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(m,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var z=class H extends P{constructor(n,r,l){super(r,l);this.httpClient=n}createUserGroup(n,r="body",l=!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 h,p=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:b}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(f({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}deleteUserGroup(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}findByNamespaceIdUserGroup(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling findByNamespaceIdUserGroup.");let t=new w({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 p=o?.context??new h,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}`,u(f({context:p,params:t,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:r,transferCache:a,reportProgress:l}))}getByIdUserGroup(n,r="body",l=!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 h,p=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}`,u(f({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:p,reportProgress:l}))}updateUserGroup(n,r,l="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 p=t?.context??new h,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:b,withCredentials:y}=this.configuration;return this.httpClient.request("post",`${b}${g}`,u(f({context:p,body:r,responseType:c},y?{withCredentials:y}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(m,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};function Nr(H){return ee([typeof H=="string"?{provide:v,useValue:H}:{provide:m,useValue:new m(f({},H))}])}var Y=class H{config=B(m);zone=B(te);connect(C){let n=`${this.config.basePath}/api/cases/${C}/events`;return new Z(r=>{let l=this.zone.runOutsideAngular(()=>new EventSource(n));return l.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}`)))}},l.onerror=o=>{l.readyState===EventSource.CLOSED?this.zone.run(()=>r.complete()):this.zone.run(()=>r.error(new Error(`SSE connection error for case ${C}`))),l.close()},()=>l.close()})}static \u0275fac=function(n){return new(n||H)};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};export{m as a,$ as b,M as c,S as d,U as e,F as f,N as g,G as h,D as i,k as j,L as k,K as l,oe as m,Nr as n};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Y}from"./chunk-W2DFJLOU.js";import{a as Z}from"./chunk-ETLSYFBB.js";import"./chunk-YTTJDHQV.js";import"./chunk-TPZGV5NA.js";import{g as B}from"./chunk-J3CZ3MOZ.js";import{a as R,c as L}from"./chunk-H7A4LOFH.js";import{p as X}from"./chunk-GN7KRTUQ.js";import"./chunk-4URCDOMP.js";import"./chunk-RBAVAHXW.js";import{a as v,c as y}from"./chunk-RI2JQRSB.js";import"./chunk-QJ3OBGZZ.js";import{F as W,c as z,e as x,g as A,h as G,i as q,l as u,n as j,p as $,s as J,w as U,x as H,y as K,z as Q}from"./chunk-XG3WOI3P.js";import"./chunk-TZKO65ML.js";import{Bb as T,Db as g,Fb as p,Ka as a,Tb as l,Ub as b,Vb as N,Wa as w,ca as m,ga as _,ha as h,kb as I,kc as D,lb as M,m as E,ma as F,mb as P,pb as O,qb as k,rb as s,sb as i,ta as d,tb as o,ua as V,ub as C}from"./chunk-RYEX2DR7.js";function te(r,e){r&1&&(i(0,"p",5),l(1,"Loading\u2026"),o())}function ne(r,e){if(r&1&&(i(0,"label",10),C(1,"input",25),i(2,"span"),l(3),o()()),r&2){let t=e.$implicit,n=p(2);a(),s("value",t.value)("formControl",n.scopeControl)("disabled",t.value==="namespace"&&!n.isAdmin()),a(2),b(t.label)}}function oe(r,e){if(r&1&&(i(0,"option",16),l(1),o()),r&2){let t=e.$implicit;s("value",t.type),a(),b(t.displayName)}}function ie(r,e){if(r&1){let t=T();i(0,"div",21)(1,"ds-json-schema-form",26),g("valueChange",function(c){_(t);let f=p(2);return h(f.onParamsChange(c))}),o()()}if(r&2){let t=p(2);a(),s("schema",e)("value",t.initialParams())}}function re(r,e){if(r&1){let t=T();i(0,"form",7),g("ngSubmit",function(){_(t);let c=p();return h(c.submit())}),i(1,"fieldset",8)(2,"legend",9),l(3,"Scope"),o(),O(4,ne,4,4,"label",10,I().trackByScope,!0),o(),i(6,"div",11)(7,"label",12),l(8,"Type "),i(9,"span",13),l(10,"*"),o()(),i(11,"select",14)(12,"option",15),l(13,"Select type"),o(),O(14,oe,2,2,"option",16,I().trackByType,!0),o()(),i(16,"div",11)(17,"label",17),l(18,"Name "),i(19,"span",13),l(20,"*"),o()(),C(21,"input",18),o(),i(22,"div",11)(23,"label",19),l(24,"Description"),o(),C(25,"textarea",20),o(),M(26,ie,2,2,"div",21),i(27,"div",22)(28,"button",23),l(29),o(),i(30,"button",24),g("click",function(){_(t);let c=p();return h(c.cancel())}),l(31,"Cancel"),o()()()}if(r&2){let t,n=p();s("formGroup",n.form),a(),s("disabled",n.isEditMode()),a(3),k(n.scopeOptions),a(7),s("formControl",n.typeControl),a(3),k(n.integrationTypes()),a(7),s("formControl",n.nameControl),a(4),s("formControl",n.descriptionControl),a(),P((t=n.schema())?26:-1,t),a(2),s("disabled",n.nameControl.invalid||n.typeControl.invalid||n.isSubmitting()),a(),N(" ",n.isEditMode()?"Save changes":"Create"," ")}}var ae=new Set(["platform","namespace","userOnNs","userGlobal"]),S=Object.freeze({platform:"Configuration plateforme",namespace:"Configuration du namespace",userOnNs:"Pour moi sur ce namespace",userGlobal:"Pour moi globalement"}),ee=class r{route=m(R);router=m(L);destroyRef=m(F);state=m(Y);integrationTypeController=m(B);namespaceRole=m(Z);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;isAdmin=y(this.isPlatformMode?E(!0):this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:this.isPlatformMode});form=new q({name:new u("",{nonNullable:!0,validators:[x.required,x.minLength(1)]}),description:new u(null),type:new u("",{nonNullable:!0,validators:[x.required]}),scope:new u("namespace",{nonNullable:!0})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get typeControl(){return this.form.controls.type}get scopeControl(){return this.form.controls.scope}isEditMode=d(!1);isSubmitting=d(!1);isLoading=d(!1);scopeOptions=[{value:"platform",label:S.platform},{value:"namespace",label:S.namespace},{value:"userOnNs",label:S.userOnNs},{value:"userGlobal",label:S.userGlobal}];paramsValue=d(null);initialParams=d(null);integrationTypes=y(this.integrationTypeController.listTypesIntegrationType(),{initialValue:[]});selectedType=y(this.form.controls.type.valueChanges,{initialValue:this.form.controls.type.value});schema=D(()=>{let e=this.selectedType();return e?this.integrationTypes().find(n=>n.type===e)?.configSchema??null:null});existingConfig=null;constructor(){V(()=>{if(this.isAdmin()||this.isEditMode())return;["platform","namespace"].includes(this.scopeControl.value)&&this.scopeControl.setValue("userOnNs")})}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let e=this.route.snapshot.paramMap,t=this.route.snapshot.queryParamMap,n=e.get("integrationId");if(n){this.isEditMode.set(!0),this.scopeControl.disable(),this.loadConfig(n);return}if(this.isPlatformMode){this.scopeControl.setValue("platform"),this.scopeControl.disable();return}let c=this.parseScope(t.get("scope"));this.scopeControl.setValue(c);let f=t.get("template");f&&this.hydrateFromTemplate(f)}parseScope(e){return e&&ae.has(e)?e:"namespace"}deriveScopeFromConfig(e){return!e.userId&&!e.namespaceId?"platform":e.userId?e.namespaceId?"userOnNs":"userGlobal":"namespace"}loadConfig(e){this.isLoading.set(!0),this.state.getById(e).pipe(v(this.destroyRef)).subscribe({next:t=>{this.existingConfig=t,this.scopeControl.setValue(this.deriveScopeFromConfig(t)),this.applyConfigToForm(t),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1),console.warn(`[IntegrationForm] Could not load config '${e}' \u2014 navigating back`),this.navigateBack()}})}hydrateFromTemplate(e){this.isLoading.set(!0),this.state.getById(e).pipe(v(this.destroyRef)).subscribe({next:t=>{this.applyConfigToForm(t),this.isLoading.set(!1),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:!0})},error:t=>{console.warn(`[IntegrationForm] Could not hydrate from template ${e}:`,t),this.isLoading.set(!1),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:!0})}})}applyConfigToForm(e){this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.typeControl.setValue(e.integrationType),this.initialParams.set(e.parameters),this.paramsValue.set(e.parameters)}onParamsChange(e){this.paramsValue.set(e)}submit(){if(this.nameControl.invalid||this.typeControl.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(!0);let e=this.descriptionControl.value?.trim(),t={name:this.nameControl.value.trim(),description:e||null,integrationType:this.typeControl.value,parameters:this.paramsValue()},n=this.form.getRawValue().scope;(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,t,n,this.existingConfig):this.state.create(t,n,this.namespaceId??null)).pipe(v(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","integration-configs"]):this.router.navigate(["/agentos",this.namespaceId,"integrations"])}trackByType(e,t){return t.type}trackByScope(e,t){return t.value}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=w({type:r,selectors:[["agentos-integration-form"]],decls:10,vars:2,consts:[[1,"integration-form"],[1,"integration-form__header"],["type","button","title","Back to integrations",1,"integration-form__back",3,"click"],[1,"integration-form__back-icon"],[1,"integration-form__title"],[1,"integration-form__loading"],[1,"integration-form__form",3,"formGroup"],[1,"integration-form__form",3,"ngSubmit","formGroup"],[1,"integration-form__field","integration-form__scope",3,"disabled"],[1,"integration-form__label"],[1,"integration-form__scope-option"],[1,"integration-form__field"],["for","integration-type",1,"integration-form__label"],["aria-hidden","true"],["id","integration-type",1,"integration-form__select",3,"formControl"],["value","","disabled",""],[3,"value"],["for","integration-name",1,"integration-form__label"],["id","integration-name","type","text","placeholder","Integration name","autocomplete","off",1,"integration-form__input",3,"formControl"],["for","integration-description",1,"integration-form__label"],["id","integration-description","placeholder","Optional description","rows","3",1,"integration-form__textarea",3,"formControl"],[1,"integration-form__schema-form"],[1,"integration-form__actions"],["type","submit",1,"integration-form__btn","integration-form__btn--primary",3,"disabled"],["type","button",1,"integration-form__btn",3,"click"],["type","radio",3,"value","formControl","disabled"],[3,"valueChange","schema","value"]],template:function(t,n){t&1&&(i(0,"div",0)(1,"header",1)(2,"button",2),g("click",function(){return n.cancel()}),i(3,"span",3),l(4,"\u2190"),o(),l(5," Integrations "),o(),i(6,"h1",4),l(7),o()(),M(8,te,2,0,"p",5)(9,re,32,8,"form",6),o()),t&2&&(a(7),b(n.isEditMode()?"Edit integration":"New integration"),a(),P(n.isLoading()?8:9))},dependencies:[W,j,K,Q,z,H,$,A,G,J,U,X],styles:[".integration-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.integration-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.integration-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.integration-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.integration-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.integration-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.integration-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.integration-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.integration-form__scope[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.4rem;border:1px solid var(--color-border-light, rgba(0, 0, 0, .06));border-radius:10px;padding:.75rem 1rem;background:transparent;margin:0}.integration-form__scope[disabled][_ngcontent-%COMP%]{opacity:.6}.integration-form__scope-option[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;font-size:.875rem;color:var(--color-text, #1d1d1f);cursor:pointer}.integration-form__scope-option[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin:0}.integration-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.integration-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text, #1d1d1f)}.integration-form__input[_ngcontent-%COMP%], .integration-form__textarea[_ngcontent-%COMP%], .integration-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}.integration-form__input[_ngcontent-%COMP%]:focus, .integration-form__textarea[_ngcontent-%COMP%]:focus, .integration-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.integration-form__input[_ngcontent-%COMP%]::placeholder, .integration-form__textarea[_ngcontent-%COMP%]::placeholder, .integration-form__select[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.integration-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:4.5rem;line-height:1.5}.integration-form__select[_ngcontent-%COMP%]{cursor:pointer}.integration-form__select[_ngcontent-%COMP%] option[disabled][_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73)}.integration-form__schema-form[_ngcontent-%COMP%]{padding:1rem;border-radius:10px;border:1px solid var(--color-border-light, rgba(0, 0, 0, .06));background:var(--glass-bg, rgba(255, 255, 255, .5));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px))}.integration-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.integration-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}.integration-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.integration-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.integration-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.integration-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{ee as IntegrationFormComponent};
|
|
1
|
+
import{a as Y}from"./chunk-5CBZIB6D.js";import{a as Z}from"./chunk-LH4ATU27.js";import"./chunk-PRFGHN7L.js";import"./chunk-VIDPCJ3F.js";import{g as B}from"./chunk-G2BRVRGR.js";import{a as R,c as L}from"./chunk-7MQRVE7E.js";import{p as X}from"./chunk-BGEXT3EN.js";import"./chunk-PKBNMAQJ.js";import"./chunk-OBV4LQBZ.js";import{a as v,c as y}from"./chunk-IRZNRZ5Q.js";import"./chunk-FAM7HWYV.js";import{F as W,c as z,e as x,g as A,h as G,i as q,l as u,n as j,p as $,s as J,w as U,x as H,y as K,z as Q}from"./chunk-WLSXA23B.js";import"./chunk-E3XC4CVU.js";import{Bb as T,Db as g,Fb as p,Ka as a,Tb as l,Ub as b,Vb as N,Wa as w,ca as m,ga as _,ha as h,kb as I,lb as M,lc as D,m as E,ma as F,mb as P,pb as O,qb as k,rb as s,sb as i,ta as d,tb as o,ua as V,ub as C}from"./chunk-5J7BTB5J.js";function te(r,e){r&1&&(i(0,"p",5),l(1,"Loading\u2026"),o())}function ne(r,e){if(r&1&&(i(0,"label",10),C(1,"input",25),i(2,"span"),l(3),o()()),r&2){let t=e.$implicit,n=p(2);a(),s("value",t.value)("formControl",n.scopeControl)("disabled",t.value==="namespace"&&!n.isAdmin()),a(2),b(t.label)}}function oe(r,e){if(r&1&&(i(0,"option",16),l(1),o()),r&2){let t=e.$implicit;s("value",t.type),a(),b(t.displayName)}}function ie(r,e){if(r&1){let t=T();i(0,"div",21)(1,"ds-json-schema-form",26),g("valueChange",function(c){_(t);let f=p(2);return h(f.onParamsChange(c))}),o()()}if(r&2){let t=p(2);a(),s("schema",e)("value",t.initialParams())}}function re(r,e){if(r&1){let t=T();i(0,"form",7),g("ngSubmit",function(){_(t);let c=p();return h(c.submit())}),i(1,"fieldset",8)(2,"legend",9),l(3,"Scope"),o(),O(4,ne,4,4,"label",10,I().trackByScope,!0),o(),i(6,"div",11)(7,"label",12),l(8,"Type "),i(9,"span",13),l(10,"*"),o()(),i(11,"select",14)(12,"option",15),l(13,"Select type"),o(),O(14,oe,2,2,"option",16,I().trackByType,!0),o()(),i(16,"div",11)(17,"label",17),l(18,"Name "),i(19,"span",13),l(20,"*"),o()(),C(21,"input",18),o(),i(22,"div",11)(23,"label",19),l(24,"Description"),o(),C(25,"textarea",20),o(),M(26,ie,2,2,"div",21),i(27,"div",22)(28,"button",23),l(29),o(),i(30,"button",24),g("click",function(){_(t);let c=p();return h(c.cancel())}),l(31,"Cancel"),o()()()}if(r&2){let t,n=p();s("formGroup",n.form),a(),s("disabled",n.isEditMode()),a(3),k(n.scopeOptions),a(7),s("formControl",n.typeControl),a(3),k(n.integrationTypes()),a(7),s("formControl",n.nameControl),a(4),s("formControl",n.descriptionControl),a(),P((t=n.schema())?26:-1,t),a(2),s("disabled",n.nameControl.invalid||n.typeControl.invalid||n.isSubmitting()),a(),N(" ",n.isEditMode()?"Save changes":"Create"," ")}}var ae=new Set(["platform","namespace","userOnNs","userGlobal"]),S=Object.freeze({platform:"Configuration plateforme",namespace:"Configuration du namespace",userOnNs:"Pour moi sur ce namespace",userGlobal:"Pour moi globalement"}),ee=class r{route=m(R);router=m(L);destroyRef=m(F);state=m(Y);integrationTypeController=m(B);namespaceRole=m(Z);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;isAdmin=y(this.isPlatformMode?E(!0):this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:this.isPlatformMode});form=new q({name:new u("",{nonNullable:!0,validators:[x.required,x.minLength(1)]}),description:new u(null),type:new u("",{nonNullable:!0,validators:[x.required]}),scope:new u("namespace",{nonNullable:!0})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get typeControl(){return this.form.controls.type}get scopeControl(){return this.form.controls.scope}isEditMode=d(!1);isSubmitting=d(!1);isLoading=d(!1);scopeOptions=[{value:"platform",label:S.platform},{value:"namespace",label:S.namespace},{value:"userOnNs",label:S.userOnNs},{value:"userGlobal",label:S.userGlobal}];paramsValue=d(null);initialParams=d(null);integrationTypes=y(this.integrationTypeController.listTypesIntegrationType(),{initialValue:[]});selectedType=y(this.form.controls.type.valueChanges,{initialValue:this.form.controls.type.value});schema=D(()=>{let e=this.selectedType();return e?this.integrationTypes().find(n=>n.type===e)?.configSchema??null:null});existingConfig=null;constructor(){V(()=>{if(this.isAdmin()||this.isEditMode())return;["platform","namespace"].includes(this.scopeControl.value)&&this.scopeControl.setValue("userOnNs")})}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let e=this.route.snapshot.paramMap,t=this.route.snapshot.queryParamMap,n=e.get("integrationId");if(n){this.isEditMode.set(!0),this.scopeControl.disable(),this.loadConfig(n);return}if(this.isPlatformMode){this.scopeControl.setValue("platform"),this.scopeControl.disable();return}let c=this.parseScope(t.get("scope"));this.scopeControl.setValue(c);let f=t.get("template");f&&this.hydrateFromTemplate(f)}parseScope(e){return e&&ae.has(e)?e:"namespace"}deriveScopeFromConfig(e){return!e.userId&&!e.namespaceId?"platform":e.userId?e.namespaceId?"userOnNs":"userGlobal":"namespace"}loadConfig(e){this.isLoading.set(!0),this.state.getById(e).pipe(v(this.destroyRef)).subscribe({next:t=>{this.existingConfig=t,this.scopeControl.setValue(this.deriveScopeFromConfig(t)),this.applyConfigToForm(t),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1),console.warn(`[IntegrationForm] Could not load config '${e}' \u2014 navigating back`),this.navigateBack()}})}hydrateFromTemplate(e){this.isLoading.set(!0),this.state.getById(e).pipe(v(this.destroyRef)).subscribe({next:t=>{this.applyConfigToForm(t),this.isLoading.set(!1),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:!0})},error:t=>{console.warn(`[IntegrationForm] Could not hydrate from template ${e}:`,t),this.isLoading.set(!1),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:!0})}})}applyConfigToForm(e){this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.typeControl.setValue(e.integrationType),this.initialParams.set(e.parameters),this.paramsValue.set(e.parameters)}onParamsChange(e){this.paramsValue.set(e)}submit(){if(this.nameControl.invalid||this.typeControl.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(!0);let e=this.descriptionControl.value?.trim(),t={name:this.nameControl.value.trim(),description:e||null,integrationType:this.typeControl.value,parameters:this.paramsValue()},n=this.form.getRawValue().scope;(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,t,n,this.existingConfig):this.state.create(t,n,this.namespaceId??null)).pipe(v(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","integration-configs"]):this.router.navigate(["/agentos",this.namespaceId,"integrations"])}trackByType(e,t){return t.type}trackByScope(e,t){return t.value}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=w({type:r,selectors:[["agentos-integration-form"]],decls:10,vars:2,consts:[[1,"integration-form"],[1,"integration-form__header"],["type","button","title","Back to integrations",1,"integration-form__back",3,"click"],[1,"integration-form__back-icon"],[1,"integration-form__title"],[1,"integration-form__loading"],[1,"integration-form__form",3,"formGroup"],[1,"integration-form__form",3,"ngSubmit","formGroup"],[1,"integration-form__field","integration-form__scope",3,"disabled"],[1,"integration-form__label"],[1,"integration-form__scope-option"],[1,"integration-form__field"],["for","integration-type",1,"integration-form__label"],["aria-hidden","true"],["id","integration-type",1,"integration-form__select",3,"formControl"],["value","","disabled",""],[3,"value"],["for","integration-name",1,"integration-form__label"],["id","integration-name","type","text","placeholder","Integration name","autocomplete","off",1,"integration-form__input",3,"formControl"],["for","integration-description",1,"integration-form__label"],["id","integration-description","placeholder","Optional description","rows","3",1,"integration-form__textarea",3,"formControl"],[1,"integration-form__schema-form"],[1,"integration-form__actions"],["type","submit",1,"integration-form__btn","integration-form__btn--primary",3,"disabled"],["type","button",1,"integration-form__btn",3,"click"],["type","radio",3,"value","formControl","disabled"],[3,"valueChange","schema","value"]],template:function(t,n){t&1&&(i(0,"div",0)(1,"header",1)(2,"button",2),g("click",function(){return n.cancel()}),i(3,"span",3),l(4,"\u2190"),o(),l(5," Integrations "),o(),i(6,"h1",4),l(7),o()(),M(8,te,2,0,"p",5)(9,re,32,8,"form",6),o()),t&2&&(a(7),b(n.isEditMode()?"Edit integration":"New integration"),a(),P(n.isLoading()?8:9))},dependencies:[W,j,K,Q,z,H,$,A,G,J,U,X],styles:[".integration-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.integration-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.integration-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.integration-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.integration-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.integration-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.integration-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.integration-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.integration-form__scope[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.4rem;border:1px solid var(--color-border-light, rgba(0, 0, 0, .06));border-radius:10px;padding:.75rem 1rem;background:transparent;margin:0}.integration-form__scope[disabled][_ngcontent-%COMP%]{opacity:.6}.integration-form__scope-option[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;font-size:.875rem;color:var(--color-text, #1d1d1f);cursor:pointer}.integration-form__scope-option[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin:0}.integration-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.integration-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text, #1d1d1f)}.integration-form__input[_ngcontent-%COMP%], .integration-form__textarea[_ngcontent-%COMP%], .integration-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}.integration-form__input[_ngcontent-%COMP%]:focus, .integration-form__textarea[_ngcontent-%COMP%]:focus, .integration-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.integration-form__input[_ngcontent-%COMP%]::placeholder, .integration-form__textarea[_ngcontent-%COMP%]::placeholder, .integration-form__select[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.integration-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:4.5rem;line-height:1.5}.integration-form__select[_ngcontent-%COMP%]{cursor:pointer}.integration-form__select[_ngcontent-%COMP%] option[disabled][_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73)}.integration-form__schema-form[_ngcontent-%COMP%]{padding:1rem;border-radius:10px;border:1px solid var(--color-border-light, rgba(0, 0, 0, .06));background:var(--glass-bg, rgba(255, 255, 255, .5));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px))}.integration-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.integration-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}.integration-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.integration-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.integration-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.integration-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{ee as IntegrationFormComponent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as j}from"./chunk-O4JNY3IM.js";import{a as rt,b as lt}from"./chunk-SUCGKO3W.js";import{a as st,b as dt}from"./chunk-IZ232KSX.js";import{a as q}from"./chunk-AV7DTXWS.js";import{a as ct,b as mt,c as ht}from"./chunk-TANV4K2Q.js";import{a as qe,b as Qe,g as $e,h as Ke,i as tt,j as nt}from"./chunk-EJH5VPZT.js";import{a as Ge,b as ze,c as Ue,d as He,e as je,f as at,j as ot,n as it,r as ut,s as gt,t as pt}from"./chunk-GN7KRTUQ.js";import"./chunk-4URCDOMP.js";import{a as Oe,b as Pe,d as Fe,e as De,f as Be,g as Ve,h as Ae}from"./chunk-7BYLIOKV.js";import"./chunk-RBAVAHXW.js";import"./chunk-RI2JQRSB.js";import{a as N,b as G}from"./chunk-QJ3OBGZZ.js";import{B as Je,C as et,E as H,a as Xe,c as Ye,g as z,m as U,o as Ze}from"./chunk-XG3WOI3P.js";import"./chunk-H2NKOG3U.js";import{A as we,E as Ie,K as Ee,M as Re,N as Le,O as L,P as We,Q as Ne,S as W,h as xe,i as ke,t as ne,u as Te}from"./chunk-TZKO65ML.js";import{$b as be,Bb as x,Db as g,Dc as Ce,Fb as c,Gb as ue,Hb as ge,Ib as pe,Jb as he,Ka as d,Kb as Z,Lb as J,Lc as Se,Pb as P,Rb as ee,Tb as s,Ub as E,Vb as w,Wa as I,Xa as le,Xb as _,Y as oe,Ya as se,Yb as f,Zb as v,_ as ie,aa as K,ab as X,ac as _e,bc as fe,ca as m,ga as p,ha as h,hc as ve,jb as V,kc as ye,lb as M,mb as C,mc as Me,nb as de,oa as B,pb as A,qb as R,rb as b,sb as i,ta as k,tb as r,tc as te,ub as Y,uc as S,ya as re,yb as ce,zb as me}from"./chunk-RYEX2DR7.js";var It=["button"],Et=["*"];function Ot(l,a){if(l&1&&(i(0,"div",2),Y(1,"mat-pseudo-checkbox",6),r()),l&2){let e=c();d(),b("disabled",e.disabled)}}var _t=new K("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS",{providedIn:"root",factory:()=>({hideSingleSelectionIndicator:!1,hideMultipleSelectionIndicator:!1,disabledInteractive:!1})}),ft=new K("MatButtonToggleGroup"),Pt={provide:Xe,useExisting:oe(()=>ae),multi:!0},Q=class{source;value;constructor(a,e){this.source=a,this.value=e}},ae=(()=>{class l{_changeDetector=m(te);_dir=m(we,{optional:!0});_multiple=!1;_disabled=!1;_disabledInteractive=!1;_selectionModel;_rawValue;_controlValueAccessorChangeFn=()=>{};_onTouched=()=>{};_buttonToggles;appearance;get name(){return this._name}set name(e){this._name=e,this._markButtonsForCheck()}_name=m(ne).getId("mat-button-toggle-group-");vertical=!1;get value(){let e=this._selectionModel?this._selectionModel.selected:[];return this.multiple?e.map(t=>t.value):e[0]?e[0].value:void 0}set value(e){this._setSelectionByValue(e),this.valueChange.emit(this.value)}valueChange=new B;get selected(){let e=this._selectionModel?this._selectionModel.selected:[];return this.multiple?e:e[0]||null}get multiple(){return this._multiple}set multiple(e){this._multiple=e,this._markButtonsForCheck()}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._markButtonsForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e,this._markButtonsForCheck()}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}change=new B;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._markButtonsForCheck()}_hideSingleSelectionIndicator;get hideMultipleSelectionIndicator(){return this._hideMultipleSelectionIndicator}set hideMultipleSelectionIndicator(e){this._hideMultipleSelectionIndicator=e,this._markButtonsForCheck()}_hideMultipleSelectionIndicator;constructor(){let e=m(_t,{optional:!0});this.appearance=e&&e.appearance?e.appearance:"standard",this._hideSingleSelectionIndicator=e?.hideSingleSelectionIndicator??!1,this._hideMultipleSelectionIndicator=e?.hideMultipleSelectionIndicator??!1}ngOnInit(){this._selectionModel=new it(this.multiple,void 0,!1)}ngAfterContentInit(){this._selectionModel.select(...this._buttonToggles.filter(e=>e.checked)),this.multiple||this._initializeTabIndex()}writeValue(e){this.value=e,this._changeDetector.markForCheck()}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_keydown(e){if(this.multiple||this.disabled||Te(e))return;let n=e.target.id,o=this._buttonToggles.toArray().findIndex(T=>T.buttonId===n),u=null;switch(e.keyCode){case 32:case 13:u=this._buttonToggles.get(o)||null;break;case 38:u=this._getNextButton(o,-1);break;case 37:u=this._getNextButton(o,this.dir==="ltr"?-1:1);break;case 40:u=this._getNextButton(o,1);break;case 39:u=this._getNextButton(o,this.dir==="ltr"?1:-1);break;default:return}u&&(e.preventDefault(),u._onButtonClick(),u.focus())}_emitChangeEvent(e){let t=new Q(e,this.value);this._rawValue=t.value,this._controlValueAccessorChangeFn(t.value),this.change.emit(t)}_syncButtonToggle(e,t,n=!1,o=!1){!this.multiple&&this.selected&&!e.checked&&(this.selected.checked=!1),this._selectionModel?t?this._selectionModel.select(e):this._selectionModel.deselect(e):o=!0,o?Promise.resolve().then(()=>this._updateModelValue(e,n)):this._updateModelValue(e,n)}_isSelected(e){return this._selectionModel&&this._selectionModel.isSelected(e)}_isPrechecked(e){return typeof this._rawValue>"u"?!1:this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(t=>e.value!=null&&t===e.value):e.value===this._rawValue}_initializeTabIndex(){if(this._buttonToggles.forEach(e=>{e.tabIndex=-1}),this.selected)this.selected.tabIndex=0;else for(let e=0;e<this._buttonToggles.length;e++){let t=this._buttonToggles.get(e);if(!t.disabled){t.tabIndex=0;break}}}_getNextButton(e,t){let n=this._buttonToggles;for(let o=1;o<=n.length;o++){let u=(e+t*o+n.length)%n.length,T=n.get(u);if(T&&!T.disabled)return T}return null}_setSelectionByValue(e){if(this._rawValue=e,!this._buttonToggles)return;let t=this._buttonToggles.toArray();if(this.multiple&&e?(Array.isArray(e),this._clearSelection(),e.forEach(n=>this._selectValue(n,t))):(this._clearSelection(),this._selectValue(e,t)),!this.multiple&&t.every(n=>n.tabIndex===-1)){for(let n of t)if(!n.disabled){n.tabIndex=0;break}}}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(e=>{e.checked=!1,this.multiple||(e.tabIndex=-1)})}_selectValue(e,t){for(let n of t)if(n.value===e){n.checked=!0,this._selectionModel.select(n),this.multiple||(n.tabIndex=0);break}}_updateModelValue(e,t){t&&this._emitChangeEvent(e),this.valueChange.emit(this.value)}_markButtonsForCheck(){this._buttonToggles?.forEach(e=>e._markForCheck())}static \u0275fac=function(t){return new(t||l)};static \u0275dir=se({type:l,selectors:[["mat-button-toggle-group"]],contentQueries:function(t,n,o){if(t&1&&pe(o,$,5),t&2){let u;Z(u=J())&&(n._buttonToggles=u)}},hostAttrs:[1,"mat-button-toggle-group"],hostVars:6,hostBindings:function(t,n){t&1&&g("keydown",function(u){return n._keydown(u)}),t&2&&(V("role",n.multiple?"group":"radiogroup")("aria-disabled",n.disabled),ee("mat-button-toggle-vertical",n.vertical)("mat-button-toggle-group-appearance-standard",n.appearance==="standard"))},inputs:{appearance:"appearance",name:"name",vertical:[2,"vertical","vertical",S],value:"value",multiple:[2,"multiple","multiple",S],disabled:[2,"disabled","disabled",S],disabledInteractive:[2,"disabledInteractive","disabledInteractive",S],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",S],hideMultipleSelectionIndicator:[2,"hideMultipleSelectionIndicator","hideMultipleSelectionIndicator",S]},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[be([Pt,{provide:ft,useExisting:l}])]})}return l})(),$=(()=>{class l{_changeDetectorRef=m(te);_elementRef=m(re);_focusMonitor=m(xe);_idGenerator=m(ne);_animationDisabled=Ee();_checked=!1;ariaLabel;ariaLabelledby=null;_buttonElement;buttonToggleGroup;get buttonId(){return`${this.id}-button`}id;name;value;get tabIndex(){return this._tabIndex()}set tabIndex(e){this._tabIndex.set(e)}_tabIndex;disableRipple=!1;get appearance(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance}set appearance(e){this._appearance=e}_appearance;get checked(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked}set checked(e){e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled}set disabled(e){this._disabled=e}_disabled=!1;get disabledInteractive(){return this._disabledInteractive||this.buttonToggleGroup!==null&&this.buttonToggleGroup.disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e}_disabledInteractive;change=new B;constructor(){m(ke).load(Le);let e=m(ft,{optional:!0}),t=m(new Me("tabindex"),{optional:!0})||"",n=m(_t,{optional:!0});this._tabIndex=k(parseInt(t)||0),this.buttonToggleGroup=e,this._appearance=n&&n.appearance?n.appearance:"standard",this._disabledInteractive=n?.disabledInteractive??!1}ngOnInit(){let e=this.buttonToggleGroup;this.id=this.id||this._idGenerator.getId("mat-button-toggle-"),e&&(e._isPrechecked(this)?this.checked=!0:e._isSelected(this)!==this._checked&&e._syncButtonToggle(this,this._checked))}ngAfterViewInit(){this._animationDisabled||this._elementRef.nativeElement.classList.add("mat-button-toggle-animations-enabled"),this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){let e=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),e&&e._isSelected(this)&&e._syncButtonToggle(this,!1,!1,!0)}focus(e){this._buttonElement.nativeElement.focus(e)}_onButtonClick(){if(this.disabled)return;let e=this.isSingleSelector()?!0:!this._checked;if(e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.isSingleSelector()){let t=this.buttonToggleGroup._buttonToggles.find(n=>n.tabIndex===0);t&&(t.tabIndex=-1),this.tabIndex=0}this.change.emit(new Q(this,this.value))}_markForCheck(){this._changeDetectorRef.markForCheck()}_getButtonName(){return this.isSingleSelector()?this.buttonToggleGroup.name:this.name||null}isSingleSelector(){return this.buttonToggleGroup&&!this.buttonToggleGroup.multiple}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=I({type:l,selectors:[["mat-button-toggle"]],viewQuery:function(t,n){if(t&1&&he(It,5),t&2){let o;Z(o=J())&&(n._buttonElement=o.first)}},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:14,hostBindings:function(t,n){t&1&&g("focus",function(){return n.focus()}),t&2&&(V("aria-label",null)("aria-labelledby",null)("id",n.id)("name",null),ee("mat-button-toggle-standalone",!n.buttonToggleGroup)("mat-button-toggle-checked",n.checked)("mat-button-toggle-disabled",n.disabled)("mat-button-toggle-disabled-interactive",n.disabledInteractive)("mat-button-toggle-appearance-standard",n.appearance==="standard"))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],id:"id",name:"name",value:"value",tabIndex:"tabIndex",disableRipple:[2,"disableRipple","disableRipple",S],appearance:"appearance",checked:[2,"checked","checked",S],disabled:[2,"disabled","disabled",S],disabledInteractive:[2,"disabledInteractive","disabledInteractive",S]},outputs:{change:"change"},exportAs:["matButtonToggle"],ngContentSelectors:Et,decls:7,vars:13,consts:[["button",""],["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"click","id","disabled"],[1,"mat-button-toggle-checkbox-wrapper"],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"],["state","checked","aria-hidden","true","appearance","minimal",3,"disabled"]],template:function(t,n){if(t&1&&(ue(),i(0,"button",1,0),g("click",function(){return n._onButtonClick()}),M(2,Ot,2,1,"div",2),i(3,"span",3),ge(4),r()(),Y(5,"span",4)(6,"span",5)),t&2){let o=P(1);b("id",n.buttonId)("disabled",n.disabled&&!n.disabledInteractive||null),V("role",n.isSingleSelector()?"radio":"button")("tabindex",n.disabled&&!n.disabledInteractive?-1:n.tabIndex)("aria-pressed",n.isSingleSelector()?null:n.checked)("aria-checked",n.isSingleSelector()?n.checked:null)("name",n._getButtonName())("aria-label",n.ariaLabel)("aria-labelledby",n.ariaLabelledby)("aria-disabled",n.disabled&&n.disabledInteractive?"true":null),d(2),C(n.buttonToggleGroup&&(!n.buttonToggleGroup.multiple&&!n.buttonToggleGroup.hideSingleSelectionIndicator||n.buttonToggleGroup.multiple&&!n.buttonToggleGroup.hideMultipleSelectionIndicator)?2:-1),d(4),b("matRippleTrigger",o)("matRippleDisabled",n.disableRipple||n.disabled)}},dependencies:[Re,at],styles:[`.mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);border-radius:var(--mat-button-toggle-legacy-shape);transform:translateZ(0)}.mat-button-toggle-standalone:not([class*=mat-elevation-z]),.mat-button-toggle-group:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}@media(forced-colors: active){.mat-button-toggle-standalone,.mat-button-toggle-group{outline:solid 1px}}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard .mat-pseudo-checkbox,.mat-button-toggle-group-appearance-standard .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard:not([class*=mat-elevation-z]),.mat-button-toggle-group-appearance-standard:not([class*=mat-elevation-z]){box-shadow:none}@media(forced-colors: active){.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{outline:0}}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative;color:var(--mat-button-toggle-legacy-text-color);font-family:var(--mat-button-toggle-legacy-label-text-font);font-size:var(--mat-button-toggle-legacy-label-text-size);line-height:var(--mat-button-toggle-legacy-label-text-line-height);font-weight:var(--mat-button-toggle-legacy-label-text-weight);letter-spacing:var(--mat-button-toggle-legacy-label-text-tracking);--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-legacy-selected-state-text-color)}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-legacy-focus-state-layer-opacity)}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle-checkbox-wrapper{display:inline-block;justify-content:flex-start;align-items:center;width:0;height:18px;line-height:18px;overflow:hidden;box-sizing:border-box;position:absolute;top:50%;left:16px;transform:translate3d(0, -50%, 0)}[dir=rtl] .mat-button-toggle-checkbox-wrapper{left:auto;right:16px}.mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:12px}[dir=rtl] .mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:auto;right:12px}.mat-button-toggle-checked .mat-button-toggle-checkbox-wrapper{width:18px}.mat-button-toggle-animations-enabled .mat-button-toggle-checkbox-wrapper{transition:width 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-checkbox-wrapper{transition:none}.mat-button-toggle-checked{color:var(--mat-button-toggle-legacy-selected-state-text-color);background-color:var(--mat-button-toggle-legacy-selected-state-background-color)}.mat-button-toggle-disabled{pointer-events:none;color:var(--mat-button-toggle-legacy-disabled-state-text-color);background-color:var(--mat-button-toggle-legacy-disabled-state-background-color);--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-legacy-disabled-state-text-color)}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:var(--mat-button-toggle-legacy-disabled-selected-state-background-color)}.mat-button-toggle-disabled-interactive{pointer-events:auto}.mat-button-toggle-appearance-standard{color:var(--mat-button-toggle-text-color, var(--mat-sys-on-surface));background-color:var(--mat-button-toggle-background-color, transparent);font-family:var(--mat-button-toggle-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-toggle-label-text-size, var(--mat-sys-label-large-size));line-height:var(--mat-button-toggle-label-text-line-height, var(--mat-sys-label-large-line-height));font-weight:var(--mat-button-toggle-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mat-button-toggle-label-text-tracking, var(--mat-sys-label-large-tracking))}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}[dir=rtl] .mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:none;border-top:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-appearance-standard.mat-button-toggle-checked{color:var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-button-toggle-selected-state-background-color, var(--mat-sys-secondary-container))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{color:var(--mat-button-toggle-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-state-background-color, transparent)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled.mat-button-toggle-checked{color:var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-selected-state-background-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{background-color:var(--mat-button-toggle-state-layer-color, var(--mat-sys-on-surface))}.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-button-toggle-appearance-standard.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}@media(hover: none){.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;padding:0 16px;line-height:var(--mat-button-toggle-legacy-height);position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px;line-height:var(--mat-button-toggle-height, 40px)}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0;background-color:var(--mat-button-toggle-legacy-state-layer-color)}@media(forced-colors: active){.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 500px;opacity:.5;height:0}.mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-animations-enabled .mat-button-toggle-button{transition:padding 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-button{transition:none}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}.mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:30px}[dir=rtl] .mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:0;padding-right:30px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard{--mat-focus-indicator-border-radius: var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}
|
|
1
|
+
import{d as j}from"./chunk-ND3PB3FA.js";import{a as rt,b as lt}from"./chunk-K4C36S6V.js";import{a as st,b as dt}from"./chunk-3NE2UZIY.js";import{a as q}from"./chunk-ATKHLJJ3.js";import{a as ct,b as mt,c as ht}from"./chunk-CRMVKTOY.js";import{a as qe,b as Qe,g as $e,h as Ke,i as tt,j as nt}from"./chunk-HE2ON544.js";import{a as Ge,b as ze,c as Ue,d as He,e as je,f as at,j as ot,n as it,r as ut,s as gt,t as pt}from"./chunk-BGEXT3EN.js";import"./chunk-PKBNMAQJ.js";import{a as Oe,b as Pe,d as Fe,e as De,f as Be,g as Ve,h as Ae}from"./chunk-LBMJRBEQ.js";import"./chunk-OBV4LQBZ.js";import"./chunk-IRZNRZ5Q.js";import{a as N,b as G}from"./chunk-FAM7HWYV.js";import{B as Je,C as et,E as H,a as Xe,c as Ye,g as z,m as U,o as Ze}from"./chunk-WLSXA23B.js";import"./chunk-7V5RIRTC.js";import{A as we,E as Ie,K as Ee,M as Re,N as Le,O as L,P as We,Q as Ne,S as W,h as xe,i as ke,t as ne,u as Te}from"./chunk-E3XC4CVU.js";import{Bb as x,Db as g,Ec as Ce,Fb as c,Gb as ue,Hb as ge,Ib as pe,Jb as he,Ka as d,Kb as Z,Lb as J,Mc as Se,Pb as P,Rb as ee,Tb as s,Ub as E,Vb as w,Wa as I,Xa as le,Y as oe,Ya as se,Yb as _,Zb as f,_ as ie,_b as v,aa as K,ab as X,ac as be,bc as _e,ca as m,cc as fe,ga as p,ha as h,ic as ve,jb as V,lb as M,lc as ye,mb as C,nb as de,nc as Me,oa as B,pb as A,qb as R,rb as b,sb as i,ta as k,tb as r,ub as Y,uc as te,vc as S,ya as re,yb as ce,zb as me}from"./chunk-5J7BTB5J.js";var It=["button"],Et=["*"];function Ot(l,a){if(l&1&&(i(0,"div",2),Y(1,"mat-pseudo-checkbox",6),r()),l&2){let e=c();d(),b("disabled",e.disabled)}}var _t=new K("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS",{providedIn:"root",factory:()=>({hideSingleSelectionIndicator:!1,hideMultipleSelectionIndicator:!1,disabledInteractive:!1})}),ft=new K("MatButtonToggleGroup"),Pt={provide:Xe,useExisting:oe(()=>ae),multi:!0},Q=class{source;value;constructor(a,e){this.source=a,this.value=e}},ae=(()=>{class l{_changeDetector=m(te);_dir=m(we,{optional:!0});_multiple=!1;_disabled=!1;_disabledInteractive=!1;_selectionModel;_rawValue;_controlValueAccessorChangeFn=()=>{};_onTouched=()=>{};_buttonToggles;appearance;get name(){return this._name}set name(e){this._name=e,this._markButtonsForCheck()}_name=m(ne).getId("mat-button-toggle-group-");vertical=!1;get value(){let e=this._selectionModel?this._selectionModel.selected:[];return this.multiple?e.map(t=>t.value):e[0]?e[0].value:void 0}set value(e){this._setSelectionByValue(e),this.valueChange.emit(this.value)}valueChange=new B;get selected(){let e=this._selectionModel?this._selectionModel.selected:[];return this.multiple?e:e[0]||null}get multiple(){return this._multiple}set multiple(e){this._multiple=e,this._markButtonsForCheck()}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._markButtonsForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e,this._markButtonsForCheck()}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}change=new B;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._markButtonsForCheck()}_hideSingleSelectionIndicator;get hideMultipleSelectionIndicator(){return this._hideMultipleSelectionIndicator}set hideMultipleSelectionIndicator(e){this._hideMultipleSelectionIndicator=e,this._markButtonsForCheck()}_hideMultipleSelectionIndicator;constructor(){let e=m(_t,{optional:!0});this.appearance=e&&e.appearance?e.appearance:"standard",this._hideSingleSelectionIndicator=e?.hideSingleSelectionIndicator??!1,this._hideMultipleSelectionIndicator=e?.hideMultipleSelectionIndicator??!1}ngOnInit(){this._selectionModel=new it(this.multiple,void 0,!1)}ngAfterContentInit(){this._selectionModel.select(...this._buttonToggles.filter(e=>e.checked)),this.multiple||this._initializeTabIndex()}writeValue(e){this.value=e,this._changeDetector.markForCheck()}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_keydown(e){if(this.multiple||this.disabled||Te(e))return;let n=e.target.id,o=this._buttonToggles.toArray().findIndex(T=>T.buttonId===n),u=null;switch(e.keyCode){case 32:case 13:u=this._buttonToggles.get(o)||null;break;case 38:u=this._getNextButton(o,-1);break;case 37:u=this._getNextButton(o,this.dir==="ltr"?-1:1);break;case 40:u=this._getNextButton(o,1);break;case 39:u=this._getNextButton(o,this.dir==="ltr"?1:-1);break;default:return}u&&(e.preventDefault(),u._onButtonClick(),u.focus())}_emitChangeEvent(e){let t=new Q(e,this.value);this._rawValue=t.value,this._controlValueAccessorChangeFn(t.value),this.change.emit(t)}_syncButtonToggle(e,t,n=!1,o=!1){!this.multiple&&this.selected&&!e.checked&&(this.selected.checked=!1),this._selectionModel?t?this._selectionModel.select(e):this._selectionModel.deselect(e):o=!0,o?Promise.resolve().then(()=>this._updateModelValue(e,n)):this._updateModelValue(e,n)}_isSelected(e){return this._selectionModel&&this._selectionModel.isSelected(e)}_isPrechecked(e){return typeof this._rawValue>"u"?!1:this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(t=>e.value!=null&&t===e.value):e.value===this._rawValue}_initializeTabIndex(){if(this._buttonToggles.forEach(e=>{e.tabIndex=-1}),this.selected)this.selected.tabIndex=0;else for(let e=0;e<this._buttonToggles.length;e++){let t=this._buttonToggles.get(e);if(!t.disabled){t.tabIndex=0;break}}}_getNextButton(e,t){let n=this._buttonToggles;for(let o=1;o<=n.length;o++){let u=(e+t*o+n.length)%n.length,T=n.get(u);if(T&&!T.disabled)return T}return null}_setSelectionByValue(e){if(this._rawValue=e,!this._buttonToggles)return;let t=this._buttonToggles.toArray();if(this.multiple&&e?(Array.isArray(e),this._clearSelection(),e.forEach(n=>this._selectValue(n,t))):(this._clearSelection(),this._selectValue(e,t)),!this.multiple&&t.every(n=>n.tabIndex===-1)){for(let n of t)if(!n.disabled){n.tabIndex=0;break}}}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(e=>{e.checked=!1,this.multiple||(e.tabIndex=-1)})}_selectValue(e,t){for(let n of t)if(n.value===e){n.checked=!0,this._selectionModel.select(n),this.multiple||(n.tabIndex=0);break}}_updateModelValue(e,t){t&&this._emitChangeEvent(e),this.valueChange.emit(this.value)}_markButtonsForCheck(){this._buttonToggles?.forEach(e=>e._markForCheck())}static \u0275fac=function(t){return new(t||l)};static \u0275dir=se({type:l,selectors:[["mat-button-toggle-group"]],contentQueries:function(t,n,o){if(t&1&&pe(o,$,5),t&2){let u;Z(u=J())&&(n._buttonToggles=u)}},hostAttrs:[1,"mat-button-toggle-group"],hostVars:6,hostBindings:function(t,n){t&1&&g("keydown",function(u){return n._keydown(u)}),t&2&&(V("role",n.multiple?"group":"radiogroup")("aria-disabled",n.disabled),ee("mat-button-toggle-vertical",n.vertical)("mat-button-toggle-group-appearance-standard",n.appearance==="standard"))},inputs:{appearance:"appearance",name:"name",vertical:[2,"vertical","vertical",S],value:"value",multiple:[2,"multiple","multiple",S],disabled:[2,"disabled","disabled",S],disabledInteractive:[2,"disabledInteractive","disabledInteractive",S],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",S],hideMultipleSelectionIndicator:[2,"hideMultipleSelectionIndicator","hideMultipleSelectionIndicator",S]},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[be([Pt,{provide:ft,useExisting:l}])]})}return l})(),$=(()=>{class l{_changeDetectorRef=m(te);_elementRef=m(re);_focusMonitor=m(xe);_idGenerator=m(ne);_animationDisabled=Ee();_checked=!1;ariaLabel;ariaLabelledby=null;_buttonElement;buttonToggleGroup;get buttonId(){return`${this.id}-button`}id;name;value;get tabIndex(){return this._tabIndex()}set tabIndex(e){this._tabIndex.set(e)}_tabIndex;disableRipple=!1;get appearance(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance}set appearance(e){this._appearance=e}_appearance;get checked(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked}set checked(e){e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled}set disabled(e){this._disabled=e}_disabled=!1;get disabledInteractive(){return this._disabledInteractive||this.buttonToggleGroup!==null&&this.buttonToggleGroup.disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e}_disabledInteractive;change=new B;constructor(){m(ke).load(Le);let e=m(ft,{optional:!0}),t=m(new Me("tabindex"),{optional:!0})||"",n=m(_t,{optional:!0});this._tabIndex=k(parseInt(t)||0),this.buttonToggleGroup=e,this._appearance=n&&n.appearance?n.appearance:"standard",this._disabledInteractive=n?.disabledInteractive??!1}ngOnInit(){let e=this.buttonToggleGroup;this.id=this.id||this._idGenerator.getId("mat-button-toggle-"),e&&(e._isPrechecked(this)?this.checked=!0:e._isSelected(this)!==this._checked&&e._syncButtonToggle(this,this._checked))}ngAfterViewInit(){this._animationDisabled||this._elementRef.nativeElement.classList.add("mat-button-toggle-animations-enabled"),this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){let e=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),e&&e._isSelected(this)&&e._syncButtonToggle(this,!1,!1,!0)}focus(e){this._buttonElement.nativeElement.focus(e)}_onButtonClick(){if(this.disabled)return;let e=this.isSingleSelector()?!0:!this._checked;if(e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.isSingleSelector()){let t=this.buttonToggleGroup._buttonToggles.find(n=>n.tabIndex===0);t&&(t.tabIndex=-1),this.tabIndex=0}this.change.emit(new Q(this,this.value))}_markForCheck(){this._changeDetectorRef.markForCheck()}_getButtonName(){return this.isSingleSelector()?this.buttonToggleGroup.name:this.name||null}isSingleSelector(){return this.buttonToggleGroup&&!this.buttonToggleGroup.multiple}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=I({type:l,selectors:[["mat-button-toggle"]],viewQuery:function(t,n){if(t&1&&he(It,5),t&2){let o;Z(o=J())&&(n._buttonElement=o.first)}},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:14,hostBindings:function(t,n){t&1&&g("focus",function(){return n.focus()}),t&2&&(V("aria-label",null)("aria-labelledby",null)("id",n.id)("name",null),ee("mat-button-toggle-standalone",!n.buttonToggleGroup)("mat-button-toggle-checked",n.checked)("mat-button-toggle-disabled",n.disabled)("mat-button-toggle-disabled-interactive",n.disabledInteractive)("mat-button-toggle-appearance-standard",n.appearance==="standard"))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],id:"id",name:"name",value:"value",tabIndex:"tabIndex",disableRipple:[2,"disableRipple","disableRipple",S],appearance:"appearance",checked:[2,"checked","checked",S],disabled:[2,"disabled","disabled",S],disabledInteractive:[2,"disabledInteractive","disabledInteractive",S]},outputs:{change:"change"},exportAs:["matButtonToggle"],ngContentSelectors:Et,decls:7,vars:13,consts:[["button",""],["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"click","id","disabled"],[1,"mat-button-toggle-checkbox-wrapper"],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"],["state","checked","aria-hidden","true","appearance","minimal",3,"disabled"]],template:function(t,n){if(t&1&&(ue(),i(0,"button",1,0),g("click",function(){return n._onButtonClick()}),M(2,Ot,2,1,"div",2),i(3,"span",3),ge(4),r()(),Y(5,"span",4)(6,"span",5)),t&2){let o=P(1);b("id",n.buttonId)("disabled",n.disabled&&!n.disabledInteractive||null),V("role",n.isSingleSelector()?"radio":"button")("tabindex",n.disabled&&!n.disabledInteractive?-1:n.tabIndex)("aria-pressed",n.isSingleSelector()?null:n.checked)("aria-checked",n.isSingleSelector()?n.checked:null)("name",n._getButtonName())("aria-label",n.ariaLabel)("aria-labelledby",n.ariaLabelledby)("aria-disabled",n.disabled&&n.disabledInteractive?"true":null),d(2),C(n.buttonToggleGroup&&(!n.buttonToggleGroup.multiple&&!n.buttonToggleGroup.hideSingleSelectionIndicator||n.buttonToggleGroup.multiple&&!n.buttonToggleGroup.hideMultipleSelectionIndicator)?2:-1),d(4),b("matRippleTrigger",o)("matRippleDisabled",n.disableRipple||n.disabled)}},dependencies:[Re,at],styles:[`.mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);border-radius:var(--mat-button-toggle-legacy-shape);transform:translateZ(0)}.mat-button-toggle-standalone:not([class*=mat-elevation-z]),.mat-button-toggle-group:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}@media(forced-colors: active){.mat-button-toggle-standalone,.mat-button-toggle-group{outline:solid 1px}}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard .mat-pseudo-checkbox,.mat-button-toggle-group-appearance-standard .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard:not([class*=mat-elevation-z]),.mat-button-toggle-group-appearance-standard:not([class*=mat-elevation-z]){box-shadow:none}@media(forced-colors: active){.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{outline:0}}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative;color:var(--mat-button-toggle-legacy-text-color);font-family:var(--mat-button-toggle-legacy-label-text-font);font-size:var(--mat-button-toggle-legacy-label-text-size);line-height:var(--mat-button-toggle-legacy-label-text-line-height);font-weight:var(--mat-button-toggle-legacy-label-text-weight);letter-spacing:var(--mat-button-toggle-legacy-label-text-tracking);--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-legacy-selected-state-text-color)}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-legacy-focus-state-layer-opacity)}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle-checkbox-wrapper{display:inline-block;justify-content:flex-start;align-items:center;width:0;height:18px;line-height:18px;overflow:hidden;box-sizing:border-box;position:absolute;top:50%;left:16px;transform:translate3d(0, -50%, 0)}[dir=rtl] .mat-button-toggle-checkbox-wrapper{left:auto;right:16px}.mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:12px}[dir=rtl] .mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:auto;right:12px}.mat-button-toggle-checked .mat-button-toggle-checkbox-wrapper{width:18px}.mat-button-toggle-animations-enabled .mat-button-toggle-checkbox-wrapper{transition:width 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-checkbox-wrapper{transition:none}.mat-button-toggle-checked{color:var(--mat-button-toggle-legacy-selected-state-text-color);background-color:var(--mat-button-toggle-legacy-selected-state-background-color)}.mat-button-toggle-disabled{pointer-events:none;color:var(--mat-button-toggle-legacy-disabled-state-text-color);background-color:var(--mat-button-toggle-legacy-disabled-state-background-color);--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-legacy-disabled-state-text-color)}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:var(--mat-button-toggle-legacy-disabled-selected-state-background-color)}.mat-button-toggle-disabled-interactive{pointer-events:auto}.mat-button-toggle-appearance-standard{color:var(--mat-button-toggle-text-color, var(--mat-sys-on-surface));background-color:var(--mat-button-toggle-background-color, transparent);font-family:var(--mat-button-toggle-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-toggle-label-text-size, var(--mat-sys-label-large-size));line-height:var(--mat-button-toggle-label-text-line-height, var(--mat-sys-label-large-line-height));font-weight:var(--mat-button-toggle-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mat-button-toggle-label-text-tracking, var(--mat-sys-label-large-tracking))}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}[dir=rtl] .mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:none;border-top:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-appearance-standard.mat-button-toggle-checked{color:var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-button-toggle-selected-state-background-color, var(--mat-sys-secondary-container))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{color:var(--mat-button-toggle-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-state-background-color, transparent)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled.mat-button-toggle-checked{color:var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-selected-state-background-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{background-color:var(--mat-button-toggle-state-layer-color, var(--mat-sys-on-surface))}.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-button-toggle-appearance-standard.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}@media(hover: none){.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;padding:0 16px;line-height:var(--mat-button-toggle-legacy-height);position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px;line-height:var(--mat-button-toggle-height, 40px)}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0;background-color:var(--mat-button-toggle-legacy-state-layer-color)}@media(forced-colors: active){.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 500px;opacity:.5;height:0}.mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-animations-enabled .mat-button-toggle-button{transition:padding 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-button{transition:none}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}.mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:30px}[dir=rtl] .mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:0;padding-right:30px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard{--mat-focus-indicator-border-radius: var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}
|
|
2
2
|
`],encapsulation:2,changeDetection:0})}return l})(),vt=(()=>{class l{static \u0275fac=function(t){return new(t||l)};static \u0275mod=le({type:l});static \u0275inj=ie({imports:[We,$,Ie]})}return l})();var Rt=(l,a)=>a.id,Lt=(l,a)=>a.value;function Wt(l,a){if(l&1&&(i(0,"mat-option",5),s(1),r()),l&2){let e=a.$implicit;b("value",e.id),d(),w(" ",e.name," ")}}function Nt(l,a){if(l&1){let e=x();i(0,"mat-checkbox",35),g("change",function(){let n=p(e).$implicit,o=c();return h(o.toggleDayOfWeek(n.value))}),s(1),r()}if(l&2){let e=a.$implicit,t=c();b("checked",t.isDaySelected(e.value)),d(),w(" ",e.label," ")}}function Gt(l,a){if(l&1){let e=x();i(0,"mat-form-field",2)(1,"mat-label"),s(2,"Number of Occurrences"),r(),i(3,"input",10),v("ngModelChange",function(n){p(e);let o=c();return f(o.endOccurrences,n)||(o.endOccurrences=n),h(n)}),r()()}if(l&2){let e=c();d(3),_("ngModel",e.endOccurrences)}}function zt(l,a){if(l&1){let e=x();i(0,"mat-form-field",2)(1,"mat-label"),s(2,"End Date"),r(),i(3,"input",36),v("ngModelChange",function(n){p(e);let o=c();return f(o.endTimestamp,n)||(o.endTimestamp=n),h(n)}),r()()}if(l&2){let e=c();d(3),_("ngModel",e.endTimestamp)}}function Ut(l,a){if(l&1){let e=x();i(0,"div")(1,"mat-form-field",2)(2,"mat-label"),s(3,"Parameter Value"),r(),i(4,"input",37),v("ngModelChange",function(n){p(e);let o=c();return f(o.simpleParameter,n)||(o.simpleParameter=n),h(n)}),r(),i(5,"mat-hint"),s(6),r()()()}if(l&2){let e=c();d(4),_("ngModel",e.simpleParameter),d(2),w("Simple value for ","{{PARAMETERS}}"," placeholder or appended to first command")}}function Ht(l,a){if(l&1){let e=x();i(0,"div",40)(1,"mat-form-field",41)(2,"mat-label"),s(3,"Key"),r(),i(4,"input",42),v("ngModelChange",function(n){let o=p(e).$implicit;return f(o.key,n)||(o.key=n),h(n)}),r()(),i(5,"mat-form-field",43)(6,"mat-label"),s(7,"Value"),r(),i(8,"input",44),v("ngModelChange",function(n){let o=p(e).$implicit;return f(o.value,n)||(o.value=n),h(n)}),r()(),i(9,"button",45),g("click",function(){let n=p(e).$index,o=c(3);return h(o.removeParameter(n))}),i(10,"mat-icon"),s(11,"delete"),r()()()}if(l&2){let e=a.$implicit;d(4),_("ngModel",e.key),d(4),_("ngModel",e.value)}}function jt(l,a){if(l&1&&(i(0,"div",39),A(1,Ht,12,2,"div",40,de),r()),l&2){let e=c(2);d(),R(e.parameters)}}function qt(l,a){if(l&1){let e=x();i(0,"div")(1,"div",26)(2,"button",38),g("click",function(){p(e);let n=c();return h(n.addParameter())}),i(3,"mat-icon"),s(4,"add"),r()()(),M(5,jt,3,0,"div",39),i(6,"p",19),s(7),r()()}if(l&2){let e=c();d(5),C(e.parameters.length>0?5:-1),d(2),w("Key-value pairs for ","{{key}}"," placeholders in prompt commands")}}function Qt(l,a){if(l&1&&(i(0,"div",31)(1,"mat-icon"),s(2,"error"),r(),i(3,"span"),s(4),r()()),l&2){let e=c();d(4),E(e.errorMessage)}}var F=class l{schedulerApi=m(j);promptApi=m(q);dialogRef=m(Oe);availablePrompts=[];isLoadingPrompts=!1;name="";promptId="";enabled=!0;startTimestamp="";intervalValue=1;intervalUnit="h";daysOfWeek=[];endConditionType="none";endOccurrences=10;endTimestamp="";parameterMode="simple";simpleParameter="";parameters=[];isSaving=!1;errorMessage="";isEditMode=!1;schedulerId="";data=m(Pe);daysOfWeekOptions=[{value:0,label:"Sunday"},{value:1,label:"Monday"},{value:2,label:"Tuesday"},{value:3,label:"Wednesday"},{value:4,label:"Thursday"},{value:5,label:"Friday"},{value:6,label:"Saturday"}];constructor(){this.isEditMode=this.data.mode==="edit"}ngOnInit(){if(this.loadPrompts(),this.isEditMode||(this.startTimestamp=this.formatDateForInput(new Date)),this.isEditMode&&this.data.scheduler){if(this.schedulerId=this.data.scheduler.id,this.name=this.data.scheduler.name,this.promptId=this.data.scheduler.promptId??"",this.enabled=this.data.scheduler.enabled,this.data.scheduler.schedule.startTimestamp){let e=new Date(this.data.scheduler.schedule.startTimestamp);this.startTimestamp=this.formatDateForInput(e)}let a=this.data.scheduler.schedule.interval.match(/^(\d+)(min|h|d|M)$/);a&&a[1]&&a[2]&&(this.intervalValue=parseInt(a[1],10),this.intervalUnit=a[2]),this.daysOfWeek=this.data.scheduler.schedule.daysOfWeek||[],this.data.scheduler.schedule.endCondition&&(this.endConditionType=this.data.scheduler.schedule.endCondition.type,this.endConditionType==="occurrences"?this.endOccurrences=this.data.scheduler.schedule.endCondition.value:this.endConditionType==="endTimestamp"&&(this.endTimestamp=this.data.scheduler.schedule.endCondition.value)),this.data.scheduler.parameters&&(typeof this.data.scheduler.parameters=="object"&&Object.keys(this.data.scheduler.parameters).length===1&&"PARAMETERS"in this.data.scheduler.parameters?(this.parameterMode="simple",this.simpleParameter=String(this.data.scheduler.parameters.PARAMETERS)):(this.parameterMode="structured",this.parameters=Object.entries(this.data.scheduler.parameters).map(([e,t])=>({key:e,value:String(t)}))))}}loadPrompts(){this.isLoadingPrompts=!0,this.promptApi.listPrompts().subscribe({next:a=>{this.availablePrompts=a,this.isLoadingPrompts=!1},error:a=>{console.error("Error loading prompts:",a),this.errorMessage="Failed to load prompts",this.isLoadingPrompts=!1}})}toggleDayOfWeek(a){let e=this.daysOfWeek.indexOf(a);e>-1?this.daysOfWeek.splice(e,1):this.daysOfWeek.push(a),this.daysOfWeek.sort()}isDaySelected(a){return this.daysOfWeek.includes(a)}addParameter(){this.parameters.push({key:"",value:""})}removeParameter(a){this.parameters.splice(a,1)}trackByIndex(a){return a}formatDateForInput(a){let e=a.getFullYear(),t=String(a.getMonth()+1).padStart(2,"0"),n=String(a.getDate()).padStart(2,"0"),o=String(a.getHours()).padStart(2,"0"),u=String(a.getMinutes()).padStart(2,"0");return`${e}-${t}-${n}T${o}:${u}`}validateForm(){if(!this.name.trim())return this.errorMessage="Name is required",!1;if(!this.promptId)return this.errorMessage="Prompt is required",!1;if(this.intervalValue<1)return this.errorMessage="Interval must be at least 1",!1;switch(this.intervalUnit){case"min":if(this.intervalValue>59)return this.errorMessage="Minutes interval must be between 1 and 59 (use hours for longer)",!1;break;case"h":if(this.intervalValue>24)return this.errorMessage="Hours interval must be between 1 and 24 (use days for longer)",!1;break;case"d":if(this.intervalValue>31)return this.errorMessage="Days interval must be between 1 and 31 (use months for longer)",!1;break;case"M":if(this.intervalValue>12)return this.errorMessage="Months interval must be between 1 and 12",!1;break}return this.endConditionType==="occurrences"&&this.endOccurrences<1?(this.errorMessage="Occurrences must be at least 1",!1):this.endConditionType==="endTimestamp"&&!this.endTimestamp?(this.errorMessage="End date is required",!1):!0}buildSchedule(){let e={startTimestamp:(this.startTimestamp?new Date(this.startTimestamp):new Date).toISOString(),interval:`${this.intervalValue}${this.intervalUnit}`};return this.daysOfWeek.length>0&&(e.daysOfWeek=[...this.daysOfWeek]),this.endConditionType==="occurrences"?e.endCondition={type:"occurrences",value:this.endOccurrences}:this.endConditionType==="endTimestamp"&&(e.endCondition={type:"endTimestamp",value:this.endTimestamp}),e}buildParameters(){if(this.parameterMode==="simple")return this.simpleParameter.trim()?{PARAMETERS:this.simpleParameter.trim()}:void 0;let a=this.parameters.filter(t=>t.key.trim());if(a.length===0)return;let e={};return a.forEach(t=>{e[t.key]=t.value}),e}save(){if(this.errorMessage="",!this.validateForm())return;let a=this.buildSchedule(),e=this.buildParameters();this.isSaving=!0,this.isEditMode&&this.schedulerId?this.schedulerApi.updateScheduler(this.schedulerId,{name:this.name.trim(),enabled:this.enabled,promptId:this.promptId,schedule:a,parameters:e}).subscribe({next:()=>{this.isSaving=!1,this.dialogRef.close(!0)},error:t=>{console.error("Error updating scheduler:",t),this.errorMessage=t?.error?.error||t?.message||"Failed to update scheduler",this.isSaving=!1}}):this.schedulerApi.createScheduler({name:this.name.trim(),promptId:this.promptId,schedule:a,parameters:e,enabled:this.enabled}).subscribe({next:()=>{this.isSaving=!1,this.dialogRef.close(!0)},error:t=>{console.error("Error creating scheduler:",t),this.errorMessage=t?.error?.error||t?.message||"Failed to create scheduler",this.isSaving=!1}})}cancel(){this.dialogRef.close(!1)}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=I({type:l,selectors:[["app-scheduler-form"]],decls:89,vars:17,consts:[["mat-dialog-title",""],[1,"form-container"],["appearance","outline",1,"full-width"],["matInput","","placeholder","My Scheduler","required","",3,"ngModelChange","ngModel"],["required","",3,"ngModelChange","ngModel"],[3,"value"],["matInput","","type","datetime-local",3,"ngModelChange","ngModel"],[1,"interval-section"],[1,"interval-fields"],["appearance","outline",1,"interval-value"],["matInput","","type","number","min","1","required","",3,"ngModelChange","ngModel"],["appearance","outline",1,"interval-unit"],["value","min"],["value","h"],["value","d"],["value","M"],[1,"days-section"],[1,"days-checkboxes"],[3,"checked"],[1,"hint"],[1,"end-condition-section"],[3,"ngModelChange","ngModel"],["value","none"],["value","occurrences"],["value","endTimestamp"],[1,"parameters-section"],[1,"section-header"],[1,"mode-toggle",3,"ngModelChange","ngModel"],["value","simple"],["value","structured"],[1,"enabled-section"],[1,"error-message"],["align","end"],["mat-button","",3,"click","disabled"],["mat-raised-button","","color","primary",3,"click","disabled"],[3,"change","checked"],["matInput","","type","datetime-local","required","",3,"ngModelChange","ngModel"],["matInput","","placeholder","e.g., 1234 or staging",3,"ngModelChange","ngModel"],["mat-icon-button","","type","button","title","Add parameter",3,"click"],[1,"parameters-list"],[1,"parameter-item"],["appearance","outline",1,"param-key"],["matInput","","placeholder","parameterName",3,"ngModelChange","ngModel"],["appearance","outline",1,"param-value"],["matInput","","placeholder","value",3,"ngModelChange","ngModel"],["mat-icon-button","","type","button","title","Remove parameter",1,"remove-btn",3,"click"]],template:function(e,t){e&1&&(i(0,"h2",0),s(1),r(),i(2,"mat-dialog-content")(3,"div",1)(4,"mat-form-field",2)(5,"mat-label"),s(6,"Name"),r(),i(7,"input",3),v("ngModelChange",function(o){return f(t.name,o)||(t.name=o),o}),r(),i(8,"mat-hint"),s(9,"A descriptive name for this scheduler"),r()(),i(10,"mat-form-field",2)(11,"mat-label"),s(12,"Prompt"),r(),i(13,"mat-select",4),v("ngModelChange",function(o){return f(t.promptId,o)||(t.promptId=o),o}),A(14,Wt,2,2,"mat-option",5,Rt),r(),i(16,"mat-hint"),s(17,"Select the prompt to execute"),r()(),i(18,"mat-form-field",2)(19,"mat-label"),s(20,"Start Date & Time"),r(),i(21,"input",6),v("ngModelChange",function(o){return f(t.startTimestamp,o)||(t.startTimestamp=o),o}),r(),i(22,"mat-hint"),s(23,"When to start the scheduler (leave empty for now)"),r()(),i(24,"div",7)(25,"h3"),s(26,"Schedule Interval"),r(),i(27,"div",8)(28,"mat-form-field",9)(29,"mat-label"),s(30,"Every"),r(),i(31,"input",10),v("ngModelChange",function(o){return f(t.intervalValue,o)||(t.intervalValue=o),o}),r()(),i(32,"mat-form-field",11)(33,"mat-label"),s(34,"Unit"),r(),i(35,"mat-select",4),v("ngModelChange",function(o){return f(t.intervalUnit,o)||(t.intervalUnit=o),o}),i(36,"mat-option",12),s(37,"Minutes (1-59)"),r(),i(38,"mat-option",13),s(39,"Hours (1-24)"),r(),i(40,"mat-option",14),s(41,"Days (1-31)"),r(),i(42,"mat-option",15),s(43,"Months (1-12)"),r()()()()(),i(44,"div",16)(45,"h3"),s(46,"Days of Week (Optional)"),r(),i(47,"div",17),A(48,Nt,2,2,"mat-checkbox",18,Lt),r(),i(50,"p",19),s(51,"Leave empty to run every day"),r()(),i(52,"div",20)(53,"h3"),s(54,"End Condition (Optional)"),r(),i(55,"mat-form-field",2)(56,"mat-label"),s(57,"End Type"),r(),i(58,"mat-select",21),v("ngModelChange",function(o){return f(t.endConditionType,o)||(t.endConditionType=o),o}),i(59,"mat-option",22),s(60,"Never (run indefinitely)"),r(),i(61,"mat-option",23),s(62,"After X occurrences"),r(),i(63,"mat-option",24),s(64,"Until specific date"),r()()(),M(65,Gt,4,1,"mat-form-field",2),M(66,zt,4,1,"mat-form-field",2),r(),i(67,"div",25)(68,"div",26)(69,"h3"),s(70,"Parameters (Optional)"),r(),i(71,"mat-button-toggle-group",27),v("ngModelChange",function(o){return f(t.parameterMode,o)||(t.parameterMode=o),o}),i(72,"mat-button-toggle",28),s(73,"Simple"),r(),i(74,"mat-button-toggle",29),s(75,"Structured"),r()()(),M(76,Ut,7,2,"div"),M(77,qt,8,2,"div"),r(),i(78,"div",30)(79,"mat-checkbox",21),v("ngModelChange",function(o){return f(t.enabled,o)||(t.enabled=o),o}),s(80,"Enabled"),r(),i(81,"p",19),s(82,"Scheduler will only run if enabled"),r()(),M(83,Qt,5,1,"div",31),r()(),i(84,"mat-dialog-actions",32)(85,"button",33),g("click",function(){return t.cancel()}),s(86,"Cancel"),r(),i(87,"button",34),g("click",function(){return t.save()}),s(88),r()()),e&2&&(d(),E(t.isEditMode?"Edit Scheduler":"Create Scheduler"),d(6),_("ngModel",t.name),d(6),_("ngModel",t.promptId),d(),R(t.availablePrompts),d(7),_("ngModel",t.startTimestamp),d(10),_("ngModel",t.intervalValue),d(4),_("ngModel",t.intervalUnit),d(13),R(t.daysOfWeekOptions),d(10),_("ngModel",t.endConditionType),d(7),C(t.endConditionType==="occurrences"?65:-1),d(),C(t.endConditionType==="endTimestamp"?66:-1),d(5),_("ngModel",t.parameterMode),d(5),C(t.parameterMode==="simple"?76:-1),d(),C(t.parameterMode==="structured"?77:-1),d(2),_("ngModel",t.enabled),d(4),C(t.errorMessage?83:-1),d(2),b("disabled",t.isSaving),d(2),b("disabled",t.isSaving),d(),w(" ",t.isSaving?"Saving...":"Save"," "))},dependencies:[Se,H,Ye,Ze,z,et,Je,U,Ae,De,Ve,Be,W,Ne,L,nt,tt,$e,qe,Qe,Ke,G,N,lt,rt,ot,dt,st,vt,ae,$],styles:[".form-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0;min-width:600px}@media(max-width:768px){.form-container[_ngcontent-%COMP%]{min-width:auto}}.full-width[_ngcontent-%COMP%]{width:100%}.interval-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 .5rem;font-size:1rem;font-weight:600}.interval-section[_ngcontent-%COMP%] .interval-fields[_ngcontent-%COMP%]{display:flex;gap:1rem}.interval-section[_ngcontent-%COMP%] .interval-fields[_ngcontent-%COMP%] .interval-value[_ngcontent-%COMP%], .interval-section[_ngcontent-%COMP%] .interval-fields[_ngcontent-%COMP%] .interval-unit[_ngcontent-%COMP%]{flex:1}.days-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 .5rem;font-size:1rem;font-weight:600}.days-section[_ngcontent-%COMP%] .days-checkboxes[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:1rem;margin-bottom:.5rem}.days-section[_ngcontent-%COMP%] .days-checkboxes[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{min-width:120px}.days-section[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary)}.end-condition-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 .5rem;font-size:1rem;font-weight:600}.parameters-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:.5rem}.parameters-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1rem;font-weight:600}.parameters-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%] .mode-toggle[_ngcontent-%COMP%]{height:32px}.parameters-section[_ngcontent-%COMP%] .parameters-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.parameters-section[_ngcontent-%COMP%] .parameter-item[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem}.parameters-section[_ngcontent-%COMP%] .parameter-item[_ngcontent-%COMP%] .param-key[_ngcontent-%COMP%]{flex:1}.parameters-section[_ngcontent-%COMP%] .parameter-item[_ngcontent-%COMP%] .param-value[_ngcontent-%COMP%]{flex:2}.parameters-section[_ngcontent-%COMP%] .parameter-item[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{margin-top:8px}.parameters-section[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:.5rem 0 0;font-size:.85rem;color:var(--color-text-secondary)}.enabled-section[_ngcontent-%COMP%]{padding:1rem;background:var(--color-surface);border-radius:8px;border:1px solid var(--color-border)}.enabled-section[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{display:block;margin-bottom:.5rem}.enabled-section[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary)}.error-message[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem;background:#f443361a;border:1px solid var(--color-error);border-radius:4px;color:var(--color-error)}.error-message[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem}.error-message[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}"]})};var $t=()=>[],Kt=l=>({id:l});function Xt(l,a){if(l&1&&(i(0,"div",6),s(1),r()),l&2){let e=c();d(),E(e.errorMessage())}}function Yt(l,a){if(l&1){let e=x();i(0,"ds-entity-card",8),g("selected",function(n){p(e);let o=c();return h(o.onEdit(n))}),ce(1,9),i(2,"button",10),g("click",function(n){return n.stopPropagation()}),i(3,"mat-icon"),s(4,"more_vert"),r()(),me(),r()}if(l&2){let e=a.$implicit;c();let t=P(11);b("id",e.id)("name",e.name)("description",e.description)("badges",e.badges??_e(6,$t)),d(2),b("matMenuTriggerFor",t)("matMenuTriggerData",fe(7,Kt,e.id))}}function Zt(l,a){if(l&1){let e=x();i(0,"button",11),g("click",function(){let n=p(e).id,o=c();return h(o.onEdit(n))}),i(1,"mat-icon"),s(2,"edit"),r(),s(3," Edit "),r(),i(4,"button",11),g("click",function(){let n=p(e).id,o=c();return h(o.onToggleEnabled(n))}),i(5,"mat-icon"),s(6),r(),s(7),r(),i(8,"button",11),g("click",function(){let n=p(e).id,o=c();return h(o.onRunNow(n))}),i(9,"mat-icon"),s(10,"play_arrow"),r(),s(11," Run now "),r(),i(12,"button",12),g("click",function(){let n=p(e).id,o=c();return h(o.onDelete(n))}),i(13,"mat-icon"),s(14,"delete"),r(),s(15," Delete "),r()}if(l&2){let e=a.id,t=c();d(6),E(t.isEnabled(e)?"pause_circle":"play_circle"),d(),w(" ",t.isEnabled(e)?"Disable":"Enable"," ")}}var yt=class l{schedulerApi=m(j);promptApi=m(q);configApi=m(ht);location=m(Ce);dialog=m(Fe);schedulers=k([]);prompts=k([]);isLoading=k(!1);errorMessage=k(null);showOnlyMine=k(!0);currentUsername=k("");schedulerItems=ye(()=>{let a=this.schedulers(),e=this.currentUsername(),n=this.showOnlyMine()&&e?a.filter(y=>this.isMyScheduler(y)):a,u=[...new Set(n.map(y=>y.createdBy))].sort((y,O)=>y===e&&O!==e?-1:O===e&&y!==e?1:y.localeCompare(O)),T=[];for(let y of u){let O=y===e?`${y} (you)`:y;for(let D of n.filter(Mt=>Mt.createdBy===y))T.push({id:D.id,name:D.name,description:this.buildDescription(D),badges:this.buildBadges(D),groupKey:y,groupLabel:O})}return T});ngOnInit(){this.configApi.getUserConfig().subscribe({next:a=>this.currentUsername.set(a.username??""),error:()=>{}}),this.loadPrompts(),this.loadSchedulers()}loadPrompts(){this.promptApi.listPrompts().subscribe({next:a=>this.prompts.set(a),error:()=>{}})}loadSchedulers(){this.isLoading.set(!0),this.schedulerApi.listSchedulers().subscribe({next:a=>{this.schedulers.set(a),this.isLoading.set(!1)},error:a=>{this.errorMessage.set(a?.error?.error??"Failed to load schedulers"),this.isLoading.set(!1)}})}onBack(){this.location.back()}onCreate(){this.dialog.open(F,{width:"700px",maxHeight:"90vh",data:{mode:"create"}}).afterClosed().subscribe(e=>{e&&this.loadSchedulers()})}onEdit(a){this.schedulerApi.getScheduler(a).subscribe({next:e=>{this.dialog.open(F,{width:"700px",maxHeight:"90vh",data:{mode:"edit",scheduler:e}}).afterClosed().subscribe(n=>{n&&this.loadSchedulers()})},error:e=>this.errorMessage.set(e?.error?.error??"Failed to load scheduler")})}onToggleEnabled(a){let e=this.schedulers().find(n=>n.id===a);if(!e)return;(e.enabled?this.schedulerApi.disableScheduler(a):this.schedulerApi.enableScheduler(a)).subscribe({next:()=>this.loadSchedulers(),error:n=>this.errorMessage.set(n?.error?.error??"Failed to toggle scheduler")})}onRunNow(a){this.schedulerApi.runSchedulerNow(a).subscribe({next:e=>{alert(`Scheduler executed successfully! Thread ID: ${e.threadId}`),this.loadSchedulers()},error:e=>this.errorMessage.set(e?.error?.error??"Failed to run scheduler")})}onDelete(a){confirm("Are you sure you want to delete this scheduler?")&&this.schedulerApi.deleteScheduler(a).subscribe({next:()=>this.loadSchedulers(),error:e=>this.errorMessage.set(e?.error?.error??"Failed to delete scheduler")})}isEnabled(a){return this.schedulers().find(e=>e.id===a)?.enabled??!1}buildDescription(a){let e;if(a.promptId)e=this.getPromptName(a.promptId);else if(a.agentName&&a.instruction){let o=a.instruction.length>40?a.instruction.slice(0,40)+"\u2026":a.instruction;e=`${a.agentName}: ${o}`}else console.error(`Scheduler "${a.name}" (${a.id}) has neither promptId nor agentName+instruction`),e="Unknown source";let t=this.formatInterval(a.schedule.interval),n=a.nextRun?new Date(a.nextRun).toLocaleString():"Expired";return`${e} \xB7 ${t} \xB7 Next: ${n}`}buildBadges(a){return[a.enabled?{label:"enabled",variant:"success"}:{label:"disabled",variant:"warning"}]}getPromptName(a){let e=this.prompts().find(t=>t.id===a);return e?e.name:a}formatInterval(a){let e=/^(\d+)(min|h|d|M)$/.exec(a);if(!e)return a;let[,t,n]=e;if(!t||!n)return a;let u={min:"minute",h:"hour",d:"day",M:"month"}[n]??n;return`Every ${t} ${u}${parseInt(t,10)>1?"s":""}`}isMyScheduler(a){let e=t=>t.replace(/[.\s]+/g,"_").toLowerCase();return e(a.createdBy)===e(this.currentUsername())}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=I({type:l,selectors:[["app-scheduler-list"]],decls:13,vars:5,consts:[["schedulerCard",""],["cardMenu","matMenu"],[1,"scheduler-list-page"],["title","Schedulers","cardMinWidth","384px","contentMaxWidth","1400px","searchPlaceholder","Filter schedulers\u2026","emptyMessage","No schedulers found.",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","mat-icon-button","","title","Back",3,"click"],["toolbar-extras","","color","primary",1,"scheduler-list__mine-toggle",3,"ngModelChange","ngModel"],[1,"scheduler-list__error"],["matMenuContent",""],[3,"selected","id","name","description","badges"],["dsCardActions",""],["mat-icon-button","",3,"click","matMenuTriggerFor","matMenuTriggerData"],["mat-menu-item","",3,"click"],["mat-menu-item","",1,"scheduler-list__delete-item",3,"click"]],template:function(e,t){if(e&1&&(i(0,"div",2)(1,"ds-entity-list",3),g("createRequested",function(){return t.onCreate()}),i(2,"button",4),g("click",function(){return t.onBack()}),i(3,"mat-icon"),s(4,"chevron_left"),r()(),i(5,"mat-slide-toggle",5),g("ngModelChange",function(o){return t.showOnlyMine.set(o)}),s(6," Mine "),r()(),M(7,Xt,2,1,"div",6),r(),X(8,Yt,5,9,"ng-template",null,0,ve),i(10,"mat-menu",null,1),X(12,Zt,16,2,"ng-template",7),r()),e&2){let n=P(9);d(),b("items",t.schedulerItems())("showCreate",!0)("itemTemplate",n),d(4),b("ngModel",t.showOnlyMine()),d(2),C(t.errorMessage()?7:-1)}},dependencies:[pt,gt,ut,W,L,G,N,mt,ct,je,Ue,Ge,ze,He,H,z,U],styles:["[_nghost-%COMP%]{display:block;width:100%;min-height:100vh;background:var(--color-bg);overflow-y:auto}.scheduler-list__mine-toggle[_ngcontent-%COMP%]{flex-shrink:0;font-size:.875rem}.scheduler-list__delete-item[_ngcontent-%COMP%]{color:var(--color-error, #ff3b30)}.scheduler-list__delete-item[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:inherit}.scheduler-list__error[_ngcontent-%COMP%]{margin:1rem auto;max-width:900px;padding:.75rem 1rem;background:#dc262614;border:1px solid rgba(220,38,38,.25);border-radius:8px;color:var(--color-error, #ff3b30);font-size:.875rem}"]})};export{yt as SchedulerListComponent};
|