1"use strict";(self.webpackChunkbusiness=self.webpackChunkbusiness||[]).push([[663],{4663(Fs,bt,g){g.d(bt,{ConsolidatedApprovalLogJourneyBundleModule:()=>Rs});var O=g(49769),e=g(35547),s=g(60375),c=g(17705),Z=g(59882),ie=g(93049),Q=g(71505),j=g(81865),N=g(76579),C=g(95992),fe=g(5470),b=g(93179),_=g(37017),ae=g(86493),$=g(21413),T=g(88141),F=g(99437),G=g(983),P=g(70980),y=g(96354),w=g(25558),ee=g(7673),W=g(71203),Ge=g(30794),u=g(50026),At=g(34868),D=g(91413),ft=g(11294);class vt{encodeKey(r){return encodeURIComponent(r)}encodeValue(r){return encodeURIComponent(r)}decodeKey(r){return decodeURIComponent(r)}decodeValue(r){return decodeURIComponent(r)}}const Ct=new s.nKC("ACCESS_CONTROL_APPROVALS_BASE_PATH",{providedIn:"root",factory:()=>`${(0,s.WQX)(ft.Sw)}/access-control`});class Be{constructor(r={}){this.apiKeys=r.apiKeys,this.username=r.username,this.password=r.password,this.accessToken=r.accessToken,this.basePath=r.basePath,this.withCredentials=r.withCredentials,this.encoder=r.encoder,this.encodeParam=r.encodeParam?r.encodeParam
1:t=>this.defaultEncodeParam(t),this.credentials=r.credentials?r.credentials:{}}selectHeaderContentType(r){if(0===r.length)return;const t=r.find(o=>this.isJsonMime(o));return void 0===t?r[0]:t}selectHeaderAccept(r){if(0===r.length)return;const t=r.find(o=>this.isJsonMime(o));return void 0===t?r[0]:t}isJsonMime(r){const t=new RegExp("^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$","i");return null!==r&&(t.test(r)||"application/json-patch+json"===r.toLowerCase())}lookupCredential(r){const t=this.credentials[r];return"function"==typeof t?t():t}defaultEncodeParam(r){const t="date-time"===r.dataFormat&&r.value instanceof Date?r.value.toISOString():r.value;return encodeURIComponent(String(t))}}let H=(()=>{class n{constructor(t,o,i){this.httpClient=t,this.basePath="/access-control",this.defaultHeaders=new D.Lr,this.configuration=new Be,i&&(this.configuration=i),"string"!=typeof this.configuration.basePath&&("string"!=typeof o&&(o=this.basePath),this.configuration.basePath=o),this.encoder=this.configuration.encoder||new vt}addToHttpParams(t,o,i){return"object"!=typeof o||o instanceof Date?this.addToHttpParamsRecursive(t,o,i):this.addToHttpParamsRecursive(t,o)}addToHttpParamsRecursive(t,o,i){if(null==o)return t;if("object"==typeof o)if(Array.isArray(o))o.forEach(a=>t=this.addToHttpParamsRecursive(t,a,i));else if(o instanceof Date){if(null==i)throw Error("key may not be null if value is Date");t=t.append(i,o.toISOString().substring(0,10))}else Object.keys(o).forEach(a=>t=this.addToHttpParamsRecursive(t,o[a],null!=i?`${i}.${a}`:a));else{if(null==i)throw Error("key may not be null if value is not object or array");t=t.append(i,o)}return t}getDataGroupConsolidatedApprovalDetailsItem(t,o="body",i=!1,a){const l=t.approvalId;if(null==l)throw new Error("Required parameter approvalId was null or undefined when calling getDataGroupConsolidatedApprovalDetailsItem.");let d=this.defaultHeaders,p=a&&a.httpHeaderAccept;void 0===p&&(p=this.configuration.selectHeaderAccept(["application/json"])),void 0!==p&&(d=d.set("Accept",p));let h=a&&a.context;void 0===h&&(h=new D._y);let m="json";p&&(m=p.startsWith("text")?"text":this.configuration.isJsonMime(p)?"json":"blob");let f=`/client-api/v1/access-control/approvals/cross-context/${this.configuration.encodeParam({name:"approvalId",value:l,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/data-group`;return this.httpClient.request("get",`${this.configuration.basePath}${f}`,{context:h,responseType:m,withCredentials:this.configuration.withCredentials,headers:d,observe:o,reportProgress:i})}getDataGroupConsolidatedApprovalDetailsItemUrl(t){const o=t.approvalId;if(null==o)throw new Error("Required parameter approvalId was null or undefined when calling getDataGroupConsolidatedApprovalDetailsItem.");return`${this.configuration.basePath}/client-api/v1/access-control/approvals/cross-context/${this.configuration.encodeParam({name:"approvalId",value:o,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/data-group`}getFunctionGroupConsolidatedApprovalDetailsItem(t,o="body",i=!1,a){const l=t.approvalId;if(null==l)throw new Error("Required parameter approvalId was null or undefined when calling getFunctionGroupConsolidatedApprovalDetailsItem.");let d=this.defaultHeaders,p=a&&a.httpHeaderAccept;void 0===p&&(p=this.configuration.selectHeaderAccept(["application/json"])),void 0!==p&&(d=d.set("Accept",p));let h=a&&a.context;void 0===h&&(h=new D._y);let m="json";p&&(m=p.startsWith("text")?"text":this.configuration.isJsonMime(p)?"json":"blob");let f=`/client-api/v1/access-control/approvals/cross-context/${this.configuration.encodeParam({name:"approvalId",value:l,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/function-group`;return this.httpClient.request("get",`${this.configuration.basePath}${f}`,{context:h,responseType:m,withCredentials:this.configuration.withCredentials,headers:d,observe:o,reportProgress:i})}getFunctionGroupConsolidatedApprovalDetailsItemUrl(t){const o=t.approvalId;if(null==o)throw new Error("Required parameter approvalId was null or undefined when calling getFunctionGroupConsolidatedApprovalDetailsItem.");return`${this.configuration.basePath}
1/client-api/v1/access-control/approvals/cross-context/${this.configuration.encodeParam({name:"approvalId",value:o,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/function-group`}getPermissionsConsolidatedApprovalDetailsItem(t,o="body",i=!1,a){const l=t.approvalId;if(null==l)throw new Error("Required parameter approvalId was null or undefined when calling getPermissionsConsolidatedApprovalDetailsItem.");let d=this.defaultHeaders,p=a&&a.httpHeaderAccept;void 0===p&&(p=this.configuration.selectHeaderAccept(["application/json"])),void 0!==p&&(d=d.set("Accept",p));let h=a&&a.context;void 0===h&&(h=new D._y);let m="json";p&&(m=p.startsWith("text")?"text":this.configuration.isJsonMime(p)?"json":"blob");let f=`/client-api/v1/access-control/approvals/cross-context/${this.configuration.encodeParam({name:"approvalId",value:l,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/permissions`;return this.httpClient.request("get",`${this.configuration.basePath}${f}`,{context:h,responseType:m,withCredentials:this.configuration.withCredentials,headers:d,observe:o,reportProgress:i})}getPermissionsConsolidatedApprovalDetailsItemUrl(t){const o=t.approvalId;if(null==o)throw new Error("Required parameter approvalId was null or undefined when calling getPermissionsConsolidatedApprovalDetailsItem.");return`${this.configuration.basePath}/client-api/v1/access-control/approvals/cross-context/${this.configuration.encodeParam({name:"approvalId",value:o,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/permissions`}getServiceAgreementConsolidatedApprovalDetailsItem(t,o="body",i=!1,a){const l=t.approvalId;if(null==l)throw new Error("Required parameter approvalId was null or undefined when calling getServiceAgreementConsolidatedApprovalDetailsItem.");let d=this.defaultHeaders,p=a&&a.httpHeaderAccept;void 0===p&&(p=this.configuration.selectHeaderAccept(["application/json"])),void 0!==p&&(d=d.set("Accept",p));let h=a&&a.context;void 0===h&&(h=new D._y);let m="json";p&&(m=p.startsWith("text")?"text":this.configuration.isJsonMime(p)?"json":"blob");let f=`/client-api/v1/access-control/approvals/cross-context/${this.configuration.encodeParam({name:"approvalId",value:l,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/service-agreement`;return this.httpClient.request("get",`${this.configuration.basePath}${f}`,{context:h,responseType:m,withCredentials:this.configuration.withCredentials,headers:d,observe:o,reportProgress:i})}getServiceAgreementConsolidatedApprovalDetailsItemUrl(t){const o=t.approvalId;if(null==o)throw new Error("Required parameter approvalId was null or undefined when calling getServiceAgreementConsolidatedApprovalDetailsItem.");return`${this.configuration.basePath}/client-api/v1/access-control/approvals/cross-context/${this.configuration.encodeParam({name:"approvalId",value:o,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/service-agreement`}getWizardConsolidatedApprovalDetails(t,o="body",i=!1,a){const l=t.approvalId;if(null==l)throw new Error("Required parameter approvalId was null or undefined when calling getWizardConsolidatedApprovalDetails.");let d=this.defaultHeaders,p=a&&a.httpHeaderAccept;void 0===p&&(p=this.configuration.selectHeaderAccept(["application/json"])),void 0!==p&&(d=d.set("Accept",p));let h=a&&a.context;void 0===h&&(h=new D._y);let m="json";p&&(m=p.startsWith("text")?"text":this.configuration.isJsonMime(p)?"json":"blob");let f=`/client-api/v1/access-control/approvals/cross-context/${this.configuration.encodeParam({name:"approvalId",value:l,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/wizard-setup`;return this.httpClient.request("get",`${this.configuration.basePath}${f}`,{context:h,responseType:m,withCredentials:this.configuration.withCredentials,headers:d,observe:o,reportProgress:i})}getWizardConsolidatedApprovalDetailsUrl(t){const o=t.approvalId;if(null==o)throw new Error("Required parameter approvalId was null or undefined when calling getWizardConsolidatedApprovalDetails.");return`${this.configuration.basePath}
1/client-api/v1/access-control/approvals/cross-context/${this.configuration.encodeParam({name:"approvalId",value:o,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/wizard-setup`}postApproveApprovalRequest(t,o="body",i=!1,a){const l=t.approvalId;if(null==l)throw new Error("Required parameter approvalId was null or undefined when calling postApproveApprovalRequest.");let d=this.defaultHeaders,p=a&&a.httpHeaderAccept;void 0===p&&(p=this.configuration.selectHeaderAccept(["application/json"])),void 0!==p&&(d=d.set("Accept",p));let h=a&&a.context;void 0===h&&(h=new D._y);let m="json";p&&(m=p.startsWith("text")?"text":this.configuration.isJsonMime(p)?"json":"blob");let f=`/client-api/v1/access-control/approvals/cross-context/${this.configuration.encodeParam({name:"approvalId",value:l,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/approve`;return this.httpClient.request("post",`${this.configuration.basePath}${f}`,{context:h,responseType:m,withCredentials:this.configuration.withCredentials,headers:d,observe:o,reportProgress:i})}postApproveApprovalRequestUrl(t){const o=t.approvalId;if(null==o)throw new Error("Required parameter approvalId was null or undefined when calling postApproveApprovalRequest.");return`${this.configuration.basePath}/client-api/v1/access-control/approvals/cross-context/${this.configuration.encodeParam({name:"approvalId",value:o,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/approve`}postFetchArrangementsApprovalDetails(t,o="body",i=!1,a){const l=t.approvalId;if(null==l)throw new Error("Required parameter approvalId was null or undefined when calling postFetchArrangementsApprovalDetails.");const d=t.postFetchArrangementsRequest;if(null==d)throw new Error("Required parameter postFetchArrangementsRequest was null or undefined when calling postFetchArrangementsApprovalDetails.");const p=t.size,h=t.cursor;let m=new D.Nl({encoder:this.encoder});null!=p&&(m=this.addToHttpParams(m,p,"size")),null!=h&&(m=this.addToHttpParams(m,h,"cursor"));let f=this.defaultHeaders,A=a&&a.httpHeaderAccept;void 0===A&&(A=this.configuration.selectHeaderAccept(["application/json"])),void 0!==A&&(f=f.set("Accept",A));let M=a&&a.context;void 0===M&&(M=new D._y);const I=this.configuration.selectHeaderContentType(["application/json"]);void 0!==I&&(f=f.set("Content-Type",I));let S="json";A&&(S=A.startsWith("text")?"text":this.configuration.isJsonMime(A)?"json":"blob");let U=`/client-api/v1/access-control/approvals/cross-context/${this.configuration.encodeParam({name:"approvalId",value:l,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/arrangements/details`;return this.httpClient.request("post",`${this.configuration.basePath}${U}`,{context:M,body:d,params:m,responseType:S,withCredentials:this.configuration.withCredentials,headers:f,observe:o,reportProgress:i})}postFetchArrangementsApprovalDetailsUrl(t){const o=t.approvalId;if(null==o)throw new Error("Required parameter approvalId was null or undefined when calling postFetchArrangementsApprovalDetails.");if(null==t.postFetchArrangementsRequest)throw new Error("Required parameter postFetchArrangementsRequest was null or undefined when calling postFetchArrangementsApprovalDetails.");const a=t.size,l=t.cursor;let d=new D.Nl({encoder:this.encoder});null!=a&&(d=this.addToHttpParams(d,a,"size")),null!=l&&(d=this.addToHttpParams(d,l,"cursor"));const p=d.toString();return`${this.configuration.basePath}/client-api/v1/access-control/approvals/cross-context/${this.configuration.encodeParam({name:"approvalId",value:o,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/arrangements/details${p?`?${p}`:""}`}postFetchContactsApprovalDetails(t,o="body",i=!1,a){const l=t.approvalId;if(null==l)throw new Error("Required parameter approvalId was null or undefined when calling postFetchContactsApprovalDetails.");const d=t.postFetchContactsRequest;if(null==d)throw new Error("Required parameter postFetchContactsRequest was null or undefined when calling postFetchContactsApprovalDetails.");const p=t.size,h=t.cursor;let m=new D.Nl({encoder:this.encoder});null!=p&&(m=this.addToHttpParams(m,p,"size")),null!=h&&(m=this.addToHttpParams(m,h,"cursor"));let f=this.defaultHeaders,A=a&&a.httpHeaderAccept;void 0===A&&(A=this.configuration.selectHeaderAccept(["application/json"])),void 0!==A&&(f=f.set("Accept",A));let M=a&&a.context;void 0===M&&(M=new D._y);const I=this.configuration.selectHeaderContentType(["application/json"]);void 0!==I&&(f=f.set("Content-Type",I));let S="json";A&&(S=A.startsWith("text")?"text":this.configuration.isJsonMime(A)?"json":"blob");
1let U=`/client-api/v1/access-control/approvals/cross-context/${this.configuration.encodeParam({name:"approvalId",value:l,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/contacts/details`;return this.httpClient.request("post",`${this.configuration.basePath}${U}`,{context:M,body:d,params:m,responseType:S,withCredentials:this.configuration.withCredentials,headers:f,observe:o,reportProgress:i})}postFetchContactsApprovalDetailsUrl(t){const o=t.approvalId;if(null==o)throw new Error("Required parameter approvalId was null or undefined when calling postFetchContactsApprovalDetails.");if(null==t.postFetchContactsRequest)throw new Error("Required parameter postFetchContactsRequest was null or undefined when calling postFetchContactsApprovalDetails.");const a=t.size,l=t.cursor;let d=new D.Nl({encoder:this.encoder});null!=a&&(d=this.addToHttpParams(d,a,"size")),null!=l&&(d=this.addToHttpParams(d,l,"cursor"));const p=d.toString();return`${this.configuration.basePath}/client-api/v1/access-control/approvals/cross-context/${this.configuration.encodeParam({name:"approvalId",value:o,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/contacts/details${p?`?${p}`:""}`}postFetchDataGroupAssignedUsersList(t,o="body",i=!1,a){const l=t.approvalId;if(null==l)throw new Error("Required parameter approvalId was null or undefined when calling postFetchDataGroupAssignedUsersList.");const d=t.postFetchGroupAssignedUsersRequest;if(null==d)throw new Error("Required parameter postFetchGroupAssignedUsersRequest was null or undefined when calling postFetchDataGroupAssignedUsersList.");const p=t.size,h=t.cursor;let m=new D.Nl({encoder:this.encoder});null!=p&&(m=this.addToHttpParams(m,p,"size")),null!=h&&(m=this.addToHttpParams(m,h,"cursor"));let f=this.defaultHeaders,A=a&&a.httpHeaderAccept;void 0===A&&(A=this.configuration.selectHeaderAccept(["application/json"])),void 0!==A&&(f=f.set("Accept",A));let M=a&&a.context;void 0===M&&(M=new D._y);const I=this.configuration.selectHeaderContentType(["application/json"]);void 0!==I&&(f=f.set("Content-Type",I));let S="json";A&&(S=A.startsWith("text")?"text":this.configuration.isJsonMime(A)?"json":"blob");let U=`/client-api/v1/access-control/approvals/cross-context/${this.configuration.encodeParam({name:"approvalId",value:l,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/data-group/users`;return this.httpClient.request("post",`${this.configuration.basePath}${U}`,{context:M,body:d,params:m,responseType:S,withCredentials:this.configuration.withCredentials,headers:f,observe:o,reportProgress:i})}postFetchDataGroupAssignedUsersListUrl(t){const o=t.approvalId;if(null==o)throw new Error("Required parameter approvalId was null or undefined when calling postFetchDataGroupAssignedUsersList.");if(null==t.postFetchGroupAssignedUsersRequest)throw new Error("Required parameter postFetchGroupAssignedUsersRequest was null or undefined when calling postFetchDataGroupAssignedUsersList.");const a=t.size,l=t.cursor;let d=new D.Nl({encoder:this.encoder});null!=a&&(d=this.addToHttpParams(d,a,"size")),null!=l&&(d=this.addToHttpParams(d,l,"cursor"));const p=d.toString();return`${this.configuration.basePath}/client-api/v1/access-control/approvals/cross-context/${this.configuration.encodeParam({name:"approvalId",value:o,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/data-group/users${p?`?${p}`:""}`}postFetchFunctionGroupAssignedUsersList(t,o="body",i=!1,a){const l=t.approvalId;if(null==l)throw new Error("Required parameter approvalId was null or undefined when calling postFetchFunctionGroupAssignedUsersList.");const d=t.postFetchGroupAssignedUsersRequest;if(null==d)throw new Error("Required parameter postFetchGroupAssignedUsersRequest was null or undefined when calling postFetchFunctionGroupAssignedUsersList.");const p=t.size,h=t.cursor;let m=new D.Nl({encoder:this.encoder});null!=p&&(m=this.addToHttpParams(m,p,"size")),null!=h&&(m=this.addToHttpParams(m,h,"cursor"));let f=this.defaultHeaders,A=a&&a.httpHeaderAccept;void 0===A&&(A=this.configuration.selectHeaderAccept(["application/json"])),void 0!==A&&(f=f.set("Accept",A));let M=a&&a.context;void 0===M&&(M=new D._y);const I=this.configuration.selectHeaderContentType(["application/json"]);void 0!==I&&(f=f.set("Content-Type",I));let S="json";A&&(S=A.startsWith("text")?"text":this.configuration.isJsonMime(A)?"json":"blob");
1let U=`/client-api/v1/access-control/approvals/cross-context/${this.configuration.encodeParam({name:"approvalId",value:l,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/function-group/users`;return this.httpClient.request("post",`${this.configuration.basePath}${U}`,{context:M,body:d,params:m,responseType:S,withCredentials:this.configuration.withCredentials,headers:f,observe:o,reportProgress:i})}postFetchFunctionGroupAssignedUsersListUrl(t){const o=t.approvalId;if(null==o)throw new Error("Required parameter approvalId was null or undefined when calling postFetchFunctionGroupAssignedUsersList.");if(null==t.postFetchGroupAssignedUsersRequest)throw new Error("Required parameter postFetchGroupAssignedUsersRequest was null or undefined when calling postFetchFunctionGroupAssignedUsersList.");const a=t.size,l=t.cursor;let d=new D.Nl({encoder:this.encoder});null!=a&&(d=this.addToHttpParams(d,a,"size")),null!=l&&(d=this.addToHttpParams(d,l,"cursor"));const p=d.toString();return`${this.configuration.basePath}/client-api/v1/access-control/approvals/cross-context/${this.configuration.encodeParam({name:"approvalId",value:o,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/function-group/users${p?`?${p}`:""}`}postFetchUsersApprovalDetails(t,o="body",i=!1,a){const l=t.approvalId;if(null==l)throw new Error("Required parameter approvalId was null or undefined when calling postFetchUsersApprovalDetails.");const d=t.postFetchUsersRequest;if(null==d)throw new Error("Required parameter postFetchUsersRequest was null or undefined when calling postFetchUsersApprovalDetails.");const p=t.size,h=t.cursor;let m=new D.Nl({encoder:this.encoder});null!=p&&(m=this.addToHttpParams(m,p,"size")),null!=h&&(m=this.addToHttpParams(m,h,"cursor"));let f=this.defaultHeaders,A=a&&a.httpHeaderAccept;void 0===A&&(A=this.configuration.selectHeaderAccept(["application/json"])),void 0!==A&&(f=f.set("Accept",A));let M=a&&a.context;void 0===M&&(M=new D._y);const I=this.configuration.selectHeaderContentType(["application/json"]);void 0!==I&&(f=f.set("Content-Type",I));let S="json";A&&(S=A.startsWith("text")?"text":this.configuration.isJsonMime(A)?"json":"blob");let U=`/client-api/v1/access-control/approvals/cross-context/${this.configuration.encodeParam({name:"approvalId",value:l,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/users/details`;return this.httpClient.request("post",`${this.configuration.basePath}${U}`,{context:M,body:d,params:m,responseType:S,withCredentials:this.configuration.withCredentials,headers:f,observe:o,reportProgress:i})}postFetchUsersApprovalDetailsUrl(t){const o=t.approvalId;if(null==o)throw new Error("Required parameter approvalId was null or undefined when calling postFetchUsersApprovalDetails.");if(null==t.postFetchUsersRequest)throw new Error("Required parameter postFetchUsersRequest was null or undefined when calling postFetchUsersApprovalDetails.");const a=t.size,l=t.cursor;let d=new D.Nl({encoder:this.encoder});null!=a&&(d=this.addToHttpParams(d,a,"size")),null!=l&&(d=this.addToHttpParams(d,l,"cursor"));const p=d.toString();return`${this.configuration.basePath}/client-api/v1/access-control/approvals/cross-context/${this.configuration.encodeParam({name:"approvalId",value:o,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/users/details${p?`?${p}`:""}`}postRejectApprovalRequest(t,o="body",i=!1,a){const l=t.approvalId;if(null==l)throw new Error("Required parameter approvalId was null or undefined when calling postRejectApprovalRequest.");let d=this.defaultHeaders,p=a&&a.httpHeaderAccept;void 0===p&&(p=this.configuration.selectHeaderAccept(["application/json"])),void 0!==p&&(d=d.set("Accept",p));let h=a&&a.context;void 0===h&&(h=new D._y);let m="json";p&&(m=p.startsWith("text")?"text":this.configuration.isJsonMime(p)?"json":"blob");let f=`/client-api/v1/access-control/approvals/cross-context/${this.configuration.encodeParam({name:"approvalId",value:l,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/reject`;return this.httpClient.request("post",`${this.configuration.basePath}${f}`,{context:h,responseType:m,withCredentials:this.configuration.withCredentials,headers:d,observe:o,reportProgress:i})}postRejectApprovalRequestUrl(t){const o=t.approvalId;if(null==o)throw new Error("Required parameter approvalId was null or undefined when calling postRejectApprovalRequest.");return`${this.configuration.basePath}
1/client-api/v1/access-control/approvals/cross-context/${this.configuration.encodeParam({name:"approvalId",value:o,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/reject`}postSearchConsolidatedApprovals(t,o="body",i=!1,a){const l=t.postSearchApprovalsRequest;if(null==l)throw new Error("Required parameter postSearchApprovalsRequest was null or undefined when calling postSearchConsolidatedApprovals.");const d=t.size,p=t.cursor;let h=new D.Nl({encoder:this.encoder});null!=d&&(h=this.addToHttpParams(h,d,"size")),null!=p&&(h=this.addToHttpParams(h,p,"cursor"));let m=this.defaultHeaders,f=a&&a.httpHeaderAccept;void 0===f&&(f=this.configuration.selectHeaderAccept(["application/json"])),void 0!==f&&(m=m.set("Accept",f));let A=a&&a.context;void 0===A&&(A=new D._y);const x=this.configuration.selectHeaderContentType(["application/json"]);void 0!==x&&(m=m.set("Content-Type",x));let I="json";return f&&(I=f.startsWith("text")?"text":this.configuration.isJsonMime(f)?"json":"blob"),this.httpClient.request("post",`${this.configuration.basePath}/client-api/v1/access-control/approvals/cross-context/search`,{context:A,body:l,params:h,responseType:I,withCredentials:this.configuration.withCredentials,headers:m,observe:o,reportProgress:i})}postSearchConsolidatedApprovalsUrl(t){if(null==t.postSearchApprovalsRequest)throw new Error("Required parameter postSearchApprovalsRequest was null or undefined when calling postSearchConsolidatedApprovals.");const i=t.size,a=t.cursor;let l=new D.Nl({encoder:this.encoder});null!=i&&(l=this.addToHttpParams(l,i,"size")),null!=a&&(l=this.addToHttpParams(l,a,"cursor"));const d=l.toString();return`${this.configuration.basePath}/client-api/v1/access-control/approvals/cross-context/search${d?`?${d}`:""}`}static{this.\u0275fac=function(o){return new(o||n)(s.KVO(D.Qq),s.KVO(Ct,8),s.KVO(Be,8))}}static{this.\u0275prov=s.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var E=g(96138),Y=g(76544);const St="Un probl\xE8me technique nous emp\xEAche de traiter votre demande. R\xE9essayez plus tard.";let xe=(()=>{class n{constructor(){this.selectedSACounter=(0,s.vPA)(null),this.loading=(0,s.vPA)(!1),this.error=new $.B,this.error$=this.error.asObservable(),this.notificationService=(0,s.WQX)(ae.JE),this.consolidatedApprovalsService=(0,s.WQX)(Ge.Pr),this.entitlementsService=(0,s.WQX)(u.Y5)}getConsolidatedApprovalsCount(t,o){return this.loading.set(!0),this.consolidatedApprovalsService.postConsolidatedApprovalsCount({consolidatedApprovalCountersRequest:{selectedServiceAgreementsCounters:{serviceAgreementIds:o.map(i=>i.serviceAgreementId),functionsFilter:t}}}).pipe((0,T.M)(i=>{this.entitlementsService.setSelectedServiceAgreements(i.selectedServiceAgreementCounters?.selectedFunctionsCounters.length?o:[])}),(0,F.W)(i=>(this.showErrorNotification(),this.error.next(i),G.w)),(0,P.j)(()=>{this.loading.set(!1)}))}showErrorNotification(){this.notificationService.showNotification({header:St,message:"",modifier:"error",ttl:3e3})}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275prov=s.jDH({token:n,factory:n.\u0275fac})}}return n})(),Pe=(()=>{class n{constructor(){this.isLoading=(0,s.vPA)(!1),this.isEnd=(0,s.vPA)(!1),this.cursor=(0,s.vPA)(""),this.error=(0,s.vPA)(void 0),this.consolidatedApprovalsService=(0,s.WQX)(At.bF)}getLimitsApprovalLog(t,o,i){const a={searchApprovalsRequestDto:{serviceAgreementIds:i,businessFunctions:o},size:t};return this.cursor()&&(a.searchApprovalsRequestDto.cursor=this.cursor()),this.isLoading.set(!0),this.consolidatedApprovalsService.postSearchPendingApprovals(a).pipe((0,T.M)(l=>{this.cursor.set(l.cursor??""),this.isEnd.set(!this.cursor())}),(0,y.T)(l=>({regularLimits:l.regularLimits??[],globalLimits:l.globalLimits??[],shadowLimits:l.shadowLimits??[]})),(0,F.W)(l=>(this.error.set(l),G.w)),(0,P.j)(()=>{this.isLoading.set(!1)}))}clearCursor(){this.cursor.set("")}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275prov=s.jDH({token:n,factory:n.\u0275fac})}}return n})(),we=(()=>{class n{constructor(){this.isLoading=(0,s.vPA)(!1),this.isEnd=(0,s.vPA)(!1),this.cursor=(0,s.vPA)(""),this.error=(0,s.vPA)(void 0),this.accessControlService=(0,s.WQX)(H)}
1getAccessControlLog(t,o,i){const a=this.buildSearchRequestParams(t,o,i);return this.isLoading.set(!0),this.accessControlService.postSearchConsolidatedApprovals(a).pipe((0,T.M)(l=>this.updateCursorState(l.nextPage)),(0,y.T)(l=>l??this.getDefaultResponse()),(0,F.W)(l=>(this.error.set(l),G.w)),(0,P.j)(()=>{this.isLoading.set(!1)}))}getDefaultResponse(){return{nextPage:"",items:[]}}clearCursor(){this.cursor.set("")}buildSearchRequestParams(t,o,i){return{postSearchApprovalsRequest:{serviceAgreementIds:i,functions:o},...this.cursor()?{cursor:this.cursor()}:{},size:t}}updateCursorState(t){this.cursor.set(t??""),this.isEnd.set(!this.cursor())}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275prov=s.jDH({token:n,factory:n.\u0275fac})}}return n})(),je=(()=>{class n{constructor(){this.isLoading=(0,s.vPA)(!1),this.isEnd=(0,s.vPA)(!1),this.cursor=(0,s.vPA)(""),this.error=(0,s.vPA)(void 0),this.approvalsService=(0,s.WQX)(Ge.Pr)}getApprovalsLog(t,o,i){const a={postSearchConsolidatedApprovalDetailsRequest:{serviceAgreementIds:i,functions:o},size:t};return this.cursor()&&(a.postSearchConsolidatedApprovalDetailsRequest.cursor=this.cursor()),this.isLoading.set(!0),this.approvalsService.postConsolidatedApprovalsSearch(a).pipe((0,T.M)(l=>{this.cursor.set(l.cursor??""),this.isEnd.set(!this.cursor())}),(0,y.T)(l=>l.approvablePolicyAssignments??[]),(0,F.W)(l=>(this.error.set(l),G.w)),(0,P.j)(()=>{this.isLoading.set(!1)}))}clearCursor(){this.cursor.set("")}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275prov=s.jDH({token:n,factory:n.\u0275fac})}}return n})(),K=(()=>{class n{constructor(){this.httpService=(0,s.WQX)(H)}getDetails(t){return this.httpService.getDataGroupConsolidatedApprovalDetailsItem({approvalId:t})}fetchArrangements(t,o,i,a){return this.httpService.postFetchArrangementsApprovalDetails({approvalId:t,postFetchArrangementsRequest:{accountIds:o},size:i,cursor:a})}postFetchContactsApprovalDetails(t,o,i,a){return this.httpService.postFetchContactsApprovalDetails({approvalId:t,postFetchContactsRequest:{contactIds:o},size:i,cursor:a})}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275prov=s.jDH({token:n,factory:n.\u0275fac})}}return n})(),ke=(()=>{class n{constructor(){this.httpService=(0,s.WQX)(H)}getDetails(t){return this.httpService.getFunctionGroupConsolidatedApprovalDetailsItem({approvalId:t})}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275prov=s.jDH({token:n,factory:n.\u0275fac})}}return n})(),Ve=(()=>{class n{constructor(){this.consolidatedApprovalsHttpService=(0,s.WQX)(H)}approve(t,o){return this.consolidatedApprovalsHttpService.postApproveApprovalRequest({approvalId:t})}reject(t,o){return this.consolidatedApprovalsHttpService.postRejectApprovalRequest({approvalId:t})}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275prov=s.jDH({token:n,factory:n.\u0275fac})}}return n})();function Dt(n){return{userId:n.id,userFullName:n.fullName,externalId:n.externalId}}let Ue=(()=>{class n{#e=(0,s.WQX)(H);getDetails(t){return this.#e.getWizardConsolidatedApprovalDetails({approvalId:t}).pipe((0,w.n)(o=>this.#t(t,o)))}fetchUsers(t,o,i,a){return this.#e.postFetchUsersApprovalDetails({approvalId:t,postFetchUsersRequest:{userIds:o},size:i,cursor:a})}#t(t,o){const i=o.users??[];return 0===i.length?(0,ee.of)({...o,users:[]}):this.fetchUsers(t,i,i.length).pipe((0,y.T)(a=>{const l=(a.items??[]).map(Dt);return{...o,users:l}}))}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275prov=s.jDH({token:n,factory:n.\u0275fac})}}return n})(),se=(()=>{class n{#e=(0,s.WQX)(H);getDetails(t){return this.#e.getServiceAgreementConsolidatedApprovalDetailsItem({approvalId:t})}fetchUsers(t,o,i,a){return this.#e.postFetchUsersApprovalDetails({approvalId:t,postFetchUsersRequest:{userIds:o},size:i,cursor:a})}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275prov=s.jDH({token:n,factory:n.\u0275fac})}}return n})(),ve=(()=>{class n{#e=(0,s.WQX)(H);getDetails(t){return this.#e.getPermissionsConsolidatedApprovalDetailsItem({approvalId:t})}getUser(t,o){return this.#e.postFetchUsersApprovalDetails({approvalId:t,postFetchUsersRequest:{userIds:o},size:1}).pipe((0,y.T)(i=>i.items[0]))}fetchArrangements(t,o,i,a){return this.#e.postFetchArrangementsApprovalDetails({approvalId:t,postFetchArrangementsRequest:{accountIds:o},size:i,cursor:a})}fetchContacts(t,o,i,a){return this.#e.postFetchContactsApprovalDetails({approvalId:t,postFetchContactsRequest:{contactIds:o},size:i,cursor:a})}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275prov=s.jDH({token:n,factory:n.\u0275fac})}}return n})();const $e={isOpen:!1,loading:!1,error:null,users:[],cursor:null,searchTerm:"",approvalId:null,groupType:null,groupSubType:null},re=(0,E.Eu)((0,E.Q2)($e),(0,E.QO)(n=>({hasMorePages:(0,_.EW)(()=>
1null!==n.cursor())})),(0,E.RI)(n=>{const r=(0,s.WQX)(H),t=i=>({userId:i.userId??"",userName:i.userFullName??"",legalEntityName:i.userLegalEntityName??""}),o=(0,Y.o)((0,W.F)((0,w.n)(({append:i})=>{const a=n.approvalId(),l=n.groupType(),d=n.searchTerm(),p=n.cursor();if(!a||!l)return G.w;(0,E.M8)(n,{loading:!0});const h={approvalId:a,postFetchGroupAssignedUsersRequest:d?{userName:d}:{},cursor:p??void 0};return("data-group"===l?r.postFetchDataGroupAssignedUsersList(h):r.postFetchFunctionGroupAssignedUsersList(h)).pipe((0,T.M)(f=>{const A=f.items.map(t);(0,E.M8)(n,M=>({users:i?[...M.users,...A]:A,cursor:f.nextPage??null,loading:!1,error:null}))}),(0,F.W)(f=>((0,E.M8)(n,{error:f,loading:!1}),G.w)))})));return{openModal(i,a,l){(0,E.M8)(n,{isOpen:!0,approvalId:i,groupType:a,groupSubType:l,users:[],cursor:null,searchTerm:"",error:null}),o({append:!1})},closeModal(){(0,E.M8)(n,$e)},search(i){(0,E.M8)(n,{searchTerm:i,cursor:null,users:[]}),o({append:!1})},loadMore(){o({append:!0})},retry(){(0,E.M8)(n,{error:null}),o({append:!1})}}}));var z=g(96697),te=g(56977),Mt=g(70274),Ce=g(27468),Ee=g(84412),Lt=g(53993),Tt=g(23294),Nt=g(70152),v=g(73018),L=g(89079),It=g(11804),Ot=g(11610),le=g(64343),ce=g(99988),R=g(23130),de=g(88898),B=g(65156),ze=g(6970),He=g(160),k=g(89417),Se=g(77605),pe=g(56450),ne=g(60391),De=g(26285),_e=g(26319),ue=g(87065),Xe=g(63542),yt=g(14849),me=g(73286);function Rt(n,r){1&n&&(e.j41(0,"th",10),e.pXf(1,5),e.k0s())}function Ft(n,r){if(1&n&&(e.j41(0,"td",16),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit,o=e.XpG();e.R7$(),e.JRh(o.serviceAgreements[t.serviceAgreementId])}}function Gt(n,r){if(1&n&&(e.j41(0,"tr",14)(1,"td"),e.nrm(2,"bb-approval-category",15),e.nI1(3,"bfName"),e.k0s(),e.nVh(4,Ft,2,1,"td",16),e.j41(5,"td",17),e.EFF(6),e.k0s(),e.j41(7,"td",18),e.EFF(8),e.k0s(),e.j41(9,"td",19),e.nrm(10,"bb-formatted-full-date-time",20),e.k0s()()),2&n){const t=r.$implicit,o=e.XpG();e.Y8G("bbRow",t),e.R7$(2),e.Y8G("category",e.i5U(3,7,t.functionCode,t.function))("iconKey",t.function),e.R7$(2),e.vxM(o.selectedServiceAgreementsLength>1?4:-1),e.R7$(2),e.JRh(t.action),e.R7$(2),e.JRh(t.userFullName),e.R7$(2),e.Y8G("dateTime",t.createdAt)}}function Bt(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-load-button-ui",5),e.bIt("paramChange",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.loadMore.emit())}),e.j41(1,"span"),e.pXf(2,0),e.k0s()()}if(2&n){const t=e.XpG();e.Y8G("disabled",t.disabled())("isLoading",t.isLoading())}}function xt(n,r){1&n&&(e.j41(0,"p",4),e.pXf(1,1),e.k0s())}const q=()=>({size:"lg"});function Pt(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-approval-log-details",3),e.bIt("navigateToList",function(){s.eBV(t);const i=e.XpG(2);return s.Njj(i.closeModal())}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("approvalId",t.approvalDataInfo.id)("approvalDataInfo",t.approvalDataInfo)("entitlementsItem",t.entitlementsItem)("isModal",!0)("isCommentEnabled",t.enableComment())}}function wt(n,r){if(1&n&&e.nVh(0,Pt,1,5,"bb-approval-log-details",2),2&n){const t=e.XpG();e.vxM(t.approvalDataInfo?0:-1)}}function jt(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-approval-log-details",3),e.bIt("navigateToList",function(){s.eBV(t);const i=e.XpG(2);return s.Njj(i.closeModal())}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("approvalId",t.approvalDataInfo.id)("approvalDataInfo",t.approvalDataInfo)("entitlementsItem",t.entitlementsItem)("isModal",!0)("isCommentEnabled",t.enableComment())("defaultZero",t.defaultZero())("pendingApprovalsHandling",t.pendingApprovalsHandling())("complexBF",t.complexBF())}}function kt(n,r){if(1&n&&e.nVh(0,jt,1,8,"bb-approval-log-details",2),2&n){const t=e.XpG();e.vxM(t.approvalDataInfo?0:-1)}}function Vt(n,r){if(1&n&&(e.j41(0,"div",4)(1,"span",5),e.EFF(2),e.k0s(),e.j41(3,"span"),e.pXf(4,0),e.k0s()()),2&n){const t=e.XpG();e.R7$(2),e.SpI(" + ",t.serviceAgreementsAmount()," ")}}function Ut(n,r){1&n&&e.nrm(0,"bb-badge-ui",4)}function $t(n,r){if(1&n&&(e.j41(0,"div",5),e.nrm(1,"bb-badge-counter-ui",6),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.Y8G("count",t.counter())("color","danger")}}const zt=["dropdownPanel"],Ht=[[["","switcherBody",""]],[["","switcherSelectedItem",""]]],Xt=["[switcherBody]","[switcherSelectedItem]"],Ke=n=>({isOpen:n});function Kt(n,r){1&n&&e.eu8(0)}function Jt(n,r){if(1&n){const t=e.RV6();e.j41(0,"div",2)(1,"div",4),e.bIt("bbKeyboardClick",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.onMobileTriggerActivate())}),e.DNE(2,Kt,1,0,"ng-container",5),e.k0s()()}if(2&n){const t=e.XpG(),o=e.sdS(3);e.R7$(),e.BMQ("aria-expanded",t.isModalOpen())("aria-disabled",t.isDisabled()?"true":null)("tabindex",t.isDisabled()?-1:0),e.R7$(),e.Y8G("ngTemplateOutlet",o)("ngTemplateOutletContext",e.eq3(5,Ke,t.isModalOpen()))}}function Wt(n,r){1&n&&e.eu8(0)}function Yt(n,r){if(1&n&&e.DNE(0,Wt,1,0,"ng-container",5),2&n){const t=r.isOpen;e.XpG(2);const o=e.sdS(3);e.Y8G("ngTemplateOutlet",o)("ngTemplateOutletContext",e.eq3(2,Ke,t))}}function Qt(n,r){1&n&&(e.j41(0,"div",8),e.SdG(1),e.k0s())}function qt(n,r){if(1&n&&(e.j41(0,"bb-dropdown-panel-ui",3,1),e.DNE(2,Yt,1,4,"ng-template",6)(3,Qt,2,0,"ng-template",7),e.k0s()),2&n){const t=e.XpG();e.Y8G("disabled",t.isDisabled())}}function Zt(n,r){if(1&n&&e.nrm(0,"bb-icon-ui",12),2&n){const t=e.XpG().isOpen,o=e.XpG();e.AVh("bb-stack__item--push-right",o.modalTrigger()),e.Y8G("name",t?"toggle-up":"toggle-down")}}function en(n,r){if(1&n&&(e.j41(0,"div",9)(1,"div",10),e.SdG(2,1),e.k0s(),e.nVh(3,Zt,1,3,"bb-icon-ui",11),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.HbH(t.modalTrigger()?"bb-stack__item bb-ellipsis--responsive-container bb-stack__item--fill bb-text-align-start":"bb-sa-switcher--title-container"),e.R7$(2),e.vxM(t.isDisabled()?-1:3)}}const tn=["calDetailCustomContainer"];function nn(n,r){}const on=["calHeaderCustomContainer"];function an(n,r){}function sn(n,r){if(1&n&&(e.j41(0,"span",10),e.EFF(1," \u2022 "),e.k0s(),e.j41(2,"span"),e.pXf(3,1),e.k0s(),e.j41(4,"span",11),e.EFF(5),e.k0s()),2&n){const t=e.XpG(2);e.R7$(5),e.SpI(" ",t.affectedSaName()," ")}}function rn(n,r){if(1&n&&(e.j41(0,"div",7)(1,"span"),e.pXf(2,0),e.k0s(),e.j41(3,"span",8),e.EFF(4),e.k0s(),e.nrm(5,"bb-formatted-full-date-time",9),e.nVh(6,sn,6,1),e.k0s()),2&n){const t=e.XpG();e.R7$(4),e.SpI(" ",t.userName()," "),e.R7$(),e.Y8G("dateTime",t.initiatedAt().toISOString()),e.R7$(),e.vxM(t.showSa()?6:-1)}}const ln=["*"];function cn(n,r){1&n&&e.eu8(0)}function dn(n,r){if(1&n&&(e.j41(0,"div"),e.DNE(1,cn,1,0,"ng-container",4),e.k0s()),2&n){const t=e.XpG(),o=e.sdS(6);e.AVh("bb-block--full-width",t.isContentLoaded()),e.R7$(),e.Y8G("ngTemplateOutlet",o)}}function pn(n,r){1&n&&e.nrm(0,"bb-loading-indicator-ui",5)}function _n(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-approval-log-details-action-buttons",6),e.bIt("approve",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.approve.emit(i))})("reject",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.reject.emit(i))}),e.k0s(),e.nrm(1,"hr",7)}if(2&n){const t=e.XpG(2);e.Y8G("approvalDetails",t.approvalDetails())("approveLoading",t.approveLoading())("rejectLoading",t.rejectLoading())("enableComment",!1)}}function un(n,r){if(1&n&&(e.nVh(0,pn,1,0,"bb-loading-indicator-ui",5),e.nVh(1,_n,2,4),e.SdG(2)),2&n){const t=e.XpG();e.vxM(t.isContentLoaded()||t.error()?-1:0),e.R7$(),e.vxM(t.isContentLoaded()?1:-1)}}function mn(n,r){if(1&n&&e.nrm(0,"bb-approval-header",8),2&n){const t=e.XpG();e.Y8G("headerName",t.headerName())("action",t.action())("showSubHeader",t.isContentLoaded())("userName",t.approvalDetails().userFullName)("initiatedAt",t.initiatedAt())("affectedSaName",t.affectedSaName())}}function gn(n,r){1&n&&(e.j41(0,"p",1),e.pXf(1,0),e.k0s())}function hn(n,r){if(1&n&&e.nrm(0,"bb-job-role-info-update",2),2&n){const t=e.XpG();e.Y8G("action",t.action())("isApprovalLog",!0)("functionGroupChangelog",t.transformedChangelog())}}function bn(n,r){1&n&&(e.j41(0,"div",1),e.nrm(1,"bb-icon-ui",3),e.j41(2,"span"),e.pXf(3,0),e.k0s()())}function An(n,r){if(1&n&&e.nrm(0,"bb-entitlements-header",2),2&n){const t=e.XpG();e.Y8G("header",t.displayName())("description",t.displayDescription())("badgeType",t.displayType())}}const fn=(n,r)=>r.id;function vn(n,r){if(1&n&&e.nrm(0,"bb-payee-list-item",6),2&n){const t=r.$implicit;e.AVh("divider-outer-bottom",r.$index!==r.$count-1),e.Y8G("payee",t)("checkboxEnabled",!1)("showRemoveButton",!1)}}function Cn(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-load-approval-items-button",7),e.bIt("loadMore",function(){s.eBV(t);const i=e.XpG(2);return s.Njj(i.loadMore.emit())}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("isLoading",t.isLoading())("disabled",t.disabled())("isEnd",t.isEnd())}}function En(n,r){if(1&n&&(e.j41(0,"span",1),e.pXf(1,0),e.k0s(),e.nrm(2,"hr",2),e.j41(3,"div",3),e.Z7z(4,vn,1,5,"bb-payee-list-item",4,fn),e.k0s(),e.nVh(6,Cn,1,3,"bb-load-approval-items-button",5)),2&n){const t=e.XpG();e.R7$(4),e.Dyx(t.payees()),e.R7$(2),e.vxM(t.payees().length>=t.pageSize()?6:-1)}}function Sn(n,r){if(1&n&&(e.j41(0,"h2"),e.pXf(1,0),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.uP7(t.payeeGroupName()),e.nnv(1)}}function Dn(n,r){1&n&&(e.j41(0,"div",4),e.nrm(1,"bb-loading-indicator-ui"),e.k0s())}function Mn(n,r){1&n&&(e.j41(0,"div",4),e.nrm(1,"bb-empty-state-ui",6),e.k0s()),2&n&&(e.R7$(),e.Y8G("headingLevel",3))}function Ln(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-payee-group-items",7),e.bIt("loadMore",function(){s.eBV(t);const i=e.XpG(2);return s.Njj(i.loadMore.emit())}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("payees",t.payees())("isLoading",t.isLoading())("isEnd",t.isEnd())("pageSize",t.pageSize())}}
1function Tn(n,r){if(1&n&&e.nVh(0,Dn,2,0,"div",4)(1,Mn,2,1,"div",4)(2,Ln,1,4,"bb-payee-group-items",5),2&n){const t=e.XpG();e.vxM(t.isLoading()&&!t.payees().length?0:t.payees().length?2:1)}}function Nn(n,r){1&n&&(e.j41(0,"div",2),e.nrm(1,"bb-icon-ui",3),e.j41(2,"span"),e.pXf(3,0),e.k0s()())}function In(n,r){if(1&n&&(e.nrm(0,"bb-entitlements-header",4),e.j41(1,"div",5)(2,"bb-review-property",6)(3,"span",7),e.EFF(4),e.k0s(),e.j41(5,"span",8),e.EFF(6),e.k0s()(),e.j41(7,"bb-review-property",9)(8,"span",7),e.EFF(9),e.k0s(),e.j41(10,"span",8),e.EFF(11),e.k0s()(),e.j41(12,"div",10)(13,"div",11)(14,"strong"),e.pXf(15,1),e.k0s(),e.j41(16,"strong"),e.EFF(17,":"),e.k0s()(),e.j41(18,"div",12),e.EFF(19),e.k0s()()()),2&n){let t,o,i,a;const l=e.XpG();e.Y8G("type",l.headerType())("header",l.displayName())("description",l.headerDescription()),e.R7$(2),e.Y8G("showOldValue",l.showNameOldValue()),e.R7$(2),e.JRh(null==(t=l.oldState())?null:t.name),e.R7$(2),e.JRh(null==(o=l.displayState())?null:o.name),e.R7$(),e.Y8G("showOldValue",l.showDescriptionOldValue()),e.R7$(2),e.JRh((null==(i=l.oldState())?null:i.description)||l.notSetText),e.R7$(2),e.JRh((null==(a=l.displayState())?null:a.description)||l.notSetText),e.R7$(8),e.SpI(" ",l.groupTypeLabel()," ")}}function On(n,r){if(1&n&&(e.j41(0,"h2",5),e.pXf(1,0),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.uP7(t.accountGroupName()),e.nnv(1)}}function yn(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-load-approval-items-button",10),e.bIt("loadMore",function(){s.eBV(t);const i=e.XpG(3);return s.Njj(i.loadMore.emit())}),e.k0s()}if(2&n){const t=e.XpG(3);e.Y8G("isLoading",t.isLoading())("isEnd",t.isEnd())}}function Rn(n,r){if(1&n&&(e.nrm(0,"bb-accounts-table-body",8),e.nVh(1,yn,1,2,"bb-load-approval-items-button",9)),2&n){const t=e.XpG(2);e.Y8G("products",t.products())("showLegalEntityName",t.showLegalEntityName())("availableLegalEntities",t.availableLegalEntities())("checkboxEnabled",!1)("showRemoveButton",!1),e.R7$(),e.vxM(t.products().length>=t.pageSize()?1:-1)}}function Fn(n,r){1&n&&(e.j41(0,"div",6),e.nrm(1,"bb-loading-indicator-ui",11),e.k0s())}function Gn(n,r){1&n&&(e.j41(0,"div",7),e.nrm(1,"bb-empty-state-ui",12),e.k0s()),2&n&&(e.R7$(),e.Y8G("headingLevel",3))}function Bn(n,r){if(1&n&&e.nVh(0,Rn,2,6)(1,Fn,2,0,"div",6)(2,Gn,2,1,"div",7),2&n){const t=e.XpG();e.vxM(t.products().length?0:!t.products().length&&t.isLoading()?1:2)}}const xn=()=>({backdrop:"static",centered:!0,size:"lg"});function Pn(n,r){if(1&n&&(e.j41(0,"div",5)(1,"div",6)(2,"div",7)(3,"h2",8),e.pXf(4,0),e.k0s()()(),e.nrm(5,"bb-job-role-name",9),e.k0s()),2&n){const t=e.XpG();e.R7$(5),e.Y8G("showIcon",!1)("headingLevel",3)("jobRole",t.jobRole())}}function wn(n,r){if(1&n&&e.nrm(0,"bb-job-role-permissions-details",10),2&n){const t=e.XpG();e.Y8G("groupedBusinessFunctions",t.groupedBusinessFunctions())("enableBfTooltipInfo",t.enableBfTooltipInfo())("bfTooltipInfoFunctionCodes",t.bfTooltipInfoFunctionCodes())}}function jn(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-alert-ui",2),e.bIt("supportiveLinkClick",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.onLinkClick())}),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("title",t.alertTitle())("supportiveLinkText",t.linkText)}}function kn(n,r){if(1&n&&e.nrm(0,"bb-alert-ui",1),2&n){const t=e.XpG();e.Y8G("title",t.alertTitle())("message",t.noPermissionMessage)}}const Vn=(n,r)=>r.userId;function Un(n,r){if(1&n&&(e.j41(0,"div",5)(1,"h2",6),e.EFF(2),e.k0s()()),2&n){const t=e.XpG(2);e.R7$(2),e.Lme("",t.usersAssignedText()," (",t.usersCountDisplay(),")")}}function $n(n,r){1&n&&(e.j41(0,"div",7),e.nrm(1,"bb-loading-indicator-ui"),e.k0s())}function zn(n,r){if(1&n){const t=e.RV6();e.j41(0,"button",13),e.bIt("click",function(){s.eBV(t);const i=e.XpG(4);return s.Njj(i.onRetry())}),e.EFF(1),e.k0s()}if(2&n){const t=e.XpG(4);e.R7$(),e.SpI(" ",t.retryText," ")}}function Hn(n,r){if(1&n&&(e.j41(0,"div",8),e.nrm(1,"bb-empty-state-ui",11),e.nVh(2,zn,2,1,"button",12),e.k0s()),2&n){const t=e.XpG(3);e.R7$(),e.Y8G("title",t.resolvedErrorTitle())("subtitle",t.resolvedErrorMessage())("headingLevel",3),e.R7$(),e.vxM(t.isStaleApprovalError()?-1:2)}}function Xn(n,r){if(1&n&&(e.j41(0,"div",9),e.nrm(1,"bb-empty-state-ui",14),e.k0s()),2&n){const t=e.XpG(3);e.R7$(),e.Y8G("title",t.emptyTitle)("subtitle",t.emptyMessage)("headingLevel",3)}}function Kn(n,r){if(1&n&&(e.j41(0,"tr")(1,"td")(2,"div",18),e.nrm(3,"bb-avatar-ui",19),e.j41(4,"div",20)(5,"div",21),e.EFF(6),e.k0s(),e.j41(7,"div",22),e.EFF(8),e.k0s()()()(),e.j41(9,"td")(10,"div",18),e.nrm(11,"bb-icon-ui",23),e.j41(12,"div",24),e.EFF(13),e.k0s()()()()),2&n){const t=r.$implicit;e.R7$(3),e.Y8G("name",t.userName),e.R7$(3),e.JRh(t.userName),e.R7$(2),e.JRh(t.userId),e.R7$(5),e.SpI(" ",t.legalEntityName," ")}}function Jn(n,r){if(1&n){const t=e.RV6();e.j41(0,"div",17)(1,"bb-load-button-ui",25),e.bIt("click",function(){s.eBV(t);const i=e.XpG(4);return s.Njj(i.onLoadMore())})("keydown.enter",function(){s.eBV(t);const i=e.XpG(4);return s.Njj(i.onLoadMore())}),e.EFF(2),e.k0s()()}if(2&n){const t=e.XpG(4);e.R7$(),e.Y8G("isLoading",t.loading())("totalCount",1),e.R7$(),e.SpI(" ",t.loadMoreText," ")}}function Wn(n,r){if(1&n&&(e.j41(0,"div",10)(1,"table",15)(2,"thead")(3,"tr")(4,"th",16),e.EFF(5),e.k0s(),e.j41(6,"th",16),e.EFF(7),e.k0s()()(),e.j41(8,"tbody"),e.Z7z(9,Kn,14,4,"tr",null,Vn),e.k0s()(),e.nVh(11,Jn,3,3,"div",17),e.k0s()),2&n){const t=e.XpG(3);e.R7$(5),e.JRh(t.nameColumnHeader),e.R7$(2),e.JRh(t.legalEntityColumnHeader),e.R7$(2),e.Dyx(t.users()),e.R7$(2),e.vxM(t.hasMorePages()?11:-1)}}
1function Yn(n,r){if(1&n&&e.nVh(0,$n,2,0,"div",7)(1,Hn,3,4,"div",8)(2,Xn,2,3,"div",9)(3,Wn,12,3,"div",10),2&n){const t=e.XpG(2);e.vxM(t.loading()&&0===t.users().length?0:t.error()?1:0===t.users().length?2:3)}}function Qn(n,r){if(1&n){const t=e.RV6();e.j41(0,"button",26),e.bIt("click",function(){s.eBV(t);const i=e.XpG(2);return s.Njj(i.onClose())}),e.EFF(1),e.k0s()}if(2&n){const t=e.XpG(2);e.R7$(),e.SpI(" ",t.closeText," ")}}function qn(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-modal-ui",1),e.bIt("cancel",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.onClose())}),e.j41(1,"bb-modal-header-ui"),e.DNE(2,Un,3,2,"ng-template",2),e.k0s(),e.j41(3,"bb-modal-body-ui"),e.DNE(4,Yn,4,1,"ng-template",3),e.k0s(),e.j41(5,"bb-modal-footer-ui"),e.DNE(6,Qn,2,1,"ng-template",4),e.k0s()()}2&n&&e.Y8G("isOpen",!0)("modalOptions",e.lJ4(2,q))}function Zn(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-user-permissions-review",1),e.bIt("dataGroupItemClicked",function(i){s.eBV(t);const a=e.XpG();return s.Njj(a.dataGroupItemClicked.emit(i))})("seeDetailsClicked",function(i){s.eBV(t);const a=e.XpG();return s.Njj(a.jobRoleItemClicked.emit(i))}),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("user",t.user())("cagList",t.cagList())("defaultState",t.defaultState())("selfApproveEnabled",t.selfApproveEnabled())("enableCAG",t.enableCAG())("userPermissionsChangesReview",t.userPermissionsChangesReview())}}let eo=(()=>{class n{constructor(){this.category=(0,c.hFB)(""),this.iconKey=(0,c.hFB)(""),this.icon=(0,_.EW)(()=>{const t=this.iconKey()||this.category();return u._N[t]??"assignment-ind"})}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-approval-category"]],inputs:{category:[1,"category"],iconKey:[1,"iconKey"]},decls:5,vars:2,consts:[[1,"bb-stack"],[1,"bb-entitlements-icon","bb-stack__item"],["data-role","approval-category-icon","size","md",3,"name"],["data-role","approval-category-name",1,"bb-text-bold",3,"text"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"div",1),e.nrm(2,"bb-icon-ui",2),e.k0s(),e.j41(3,"div"),e.nrm(4,"bb-ellipsis-ui",3),e.k0s()()),2&o&&(e.R7$(2),e.Y8G("name",i.icon()),e.R7$(2),e.Y8G("text",i.category()))},dependencies:[R.o,R.R,ce.eP,ce.ti],encapsulation:2,changeDetection:0})}}return n})(),ge=(()=>{class n{constructor(){this.tableData=(0,c.hFB)([]),this.selectedServiceAgreements=(0,c.hFB)(null),this.selectItem=(0,c.CGW)(),this.uiConfigurationService=(0,s.WQX)(v.cGx),this.dateFormat=this.uiConfigurationService.getDateFormat(),this.serviceAgreements={},this.selectedServiceAgreementsLength=0,(0,s.QZP)(()=>{const t=this.selectedServiceAgreements();t&&(this.selectedServiceAgreementsLength=t.length,t.forEach(o=>{this.serviceAgreements[o.serviceAgreementId]=o.serviceAgreementName}))})}onRowSelected(t){const o=this.tableData().indexOf(t);-1!==o&&this.selectItem.emit(o)}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-entitlements-table"]],inputs:{tableData:[1,"tableData"],selectedServiceAgreements:[1,"selectedServiceAgreements"]},outputs:{selectItem:"selectItem"},decls:18,vars:2,consts:()=>{let t,o,i,a,l,d;return t="Liste d'actions en attente d'approbation",o="Cat\xE9gorie",i="Action",a="Initi\xE9 par ",l="Date et heure",d="Entente de service",[t,o,i,a,l,d,["data-role","entitlements-table-scroll",1,"table-responsive-md","mw-100"],["bbTableFocus","",1,"table","table-hover","w-auto","w-md-100",3,"rowClick","bbTable"],[1,"visually-hidden"],["data-role","category-header"],["data-role","service-agreement-header"],["data-role","action-header"],["data-role","initiated-by-header"],["data-role","date-time-header"],["data-role","entitlement-table-row",3,"bbRow"],[3,"category","iconKey"],["data-role","service-agreement-name"],["data-role","approval-action"],["data-role","approval-user-name"],["data-role","approval-date-time"],[3,"dateTime"]]},template:function(o,i){1&o&&(e.j41(0,"div",6)(1,"table",7),e.bIt("rowClick",function(l){return i.onRowSelected(l)}),e.j41(2,"caption",8),e.pXf(3,0),e.k0s(),e.j41(4,"thead")(5,"tr")(6,"th",9),e.pXf(7,1),e.k0s(),e.nVh(8,Rt,2,0,"th",10),e.j41(9,"th",11),e.pXf(10,2),e.k0s(),e.j41(11,"th",12),e.pXf(12,3),e.k0s(),e.j41(13,"th",13),e.pXf(14,4),e.k0s()()(),e.j41(15,"tbody"),e.Z7z(16,Gt,11,10,"tr",14,e.fX1),e.k0s()()()),2&o&&(e.R7$(),e.Y8G("bbTable",i.tableData()),e.R7$(7),e.vxM(i.selectedServiceAgreementsLength>1?8:-1),e.R7$(8),e.Dyx(i.tableData()))},dependencies:[le.bG,le.OT,le.sZ,le.o2,Ot.Bk,b.yxh,eo,b.a6Q,b.coU],encapsulation:2,changeDetection:0})}}return n})(),J=(()=>{class n{constructor(){this.isLoading=(0,c.hFB)(!1),this.isEnd=(0,c.hFB)(!1),this.disabled=(0,c.hFB)(!1),this.loadMore=(0,c.CGW)()}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-load-approval-items-button"]],inputs:{isLoading:[1,"isLoading"],isEnd:[1,"isEnd"],disabled:[1,"disabled"]},outputs:{loadMore:"loadMore"},decls:3,vars:1,consts:()=>{let t,o;return t="Afficher plus",o=" ",[t,o,[1,"bb-stack","bb-stack--center"],["data-role","load-more-button","color","link-text","buttonSize","sm",3,"disabled","isLoading"],["data-role","end-of-list-message"],["data-role","load-more-button","color","link-text","buttonSize","sm",3,"paramChange","disabled","isLoading"]]},template:function(o,i){1&o&&(e.j41(0,"div",2),e.nVh(1,Bt,3,2,"bb-load-button-ui",3)(2,xt,2,0,"p",4),e.k0s()),2&o&&(e.R7$(),e.vxM(i.isEnd()?2:1))},dependencies:[de.t,de.e,R.o],encapsulation:2,changeDetection:0})}}return n})(),oe=(()=>{class n{static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-approval-items-resolved"]],decls:2,vars:1,consts:()=>{let t,o;return t="Aucune action \xE0 approuver pour cette cat\xE9gorie",o="Lorsqu'il y aura des actions \xE0 approuver, elles appara\xEEtront ici.",[["data-role","empty-approvals-container",1,"bb-state-container"],["data-role","empty-approvals-description","title",t,"subtitle",o,"image","ic_scenario_approval",3,"headingLevel"]]},template:function(o,i){1&o&&(e.j41(0,"div",0),e.nrm(1,"bb-empty-state-ui",1),e.k0s()),2&o&&(e.R7$(),e.Y8G("headingLevel",3))},dependencies:[B.b,B.o],encapsulation:2})}}return n})(),to=(()=>{class n{constructor(){this.limit=(0,c.hFB)(),this.enableComment=(0,c.hFB)(!1),this.dismiss=(0,c.CGW)(),(0,s.QZP)(()=>{const t=this.limit();if(t){const{pendingApproval:o,...i}=t;this.approvalDataInfo={...o.approval,policy:o.policy},this.entitlementsItem=Object.values(i)[0]}})}closeModal(){this.dismiss.emit()}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-limits-detail-view"]],inputs:{limit:[1,"limit"],enableComment:[1,"enableComment"]}
1,outputs:{dismiss:"dismiss"},decls:3,vars:3,consts:[["data-role","limits-detail-view-modal",3,"cancel","modalOptions","isOpen"],["bbCustomModalBody",""],["data-role","approval-log-details-view",3,"approvalId","approvalDataInfo","entitlementsItem","isModal","isCommentEnabled"],["data-role","approval-log-details-view",3,"navigateToList","approvalId","approvalDataInfo","entitlementsItem","isModal","isCommentEnabled"]],template:function(o,i){1&o&&(e.j41(0,"bb-modal-ui",0),e.bIt("cancel",function(){return i.closeModal()}),e.j41(1,"bb-modal-body-ui"),e.DNE(2,wt,1,1,"ng-template",1),e.k0s()()),2&o&&e.Y8G("modalOptions",e.lJ4(2,q))("isOpen",!0)},dependencies:[ze.mk,He.No,C.Q_,C.zf,C.Jy,C.GI,j.tm,R.o],encapsulation:2})}}return n})(),no=(()=>{class n{constructor(){this.approval=(0,c.hFB)(!1),this.enableComment=(0,c.hFB)(!1),this.defaultZero=(0,c.hFB)(!1),this.pendingApprovalsHandling=(0,c.hFB)(v.Ipq.OFF),this.complexBF=(0,c.hFB)([]),this.dismiss=(0,c.CGW)(),(0,s.QZP)(()=>{const{approvalSearchDetail:t,policyAssignment:o}=this.approval(),i=t?.policy;this.approvalDataInfo={...t?.approval,policy:i},this.entitlementsItem=o,this.entitlementsItem&&t.approval.action===u.iY.EDIT&&this.entitlementsItem.editedPolicyAssignment&&this.entitlementsItem.assignedPolicies&&(this.entitlementsItem={...this.entitlementsItem,assignedPolicies:this.entitlementsItem?.editedPolicyAssignment?.assignedPolicies??[],editedPolicyAssignment:{...this.entitlementsItem?.editedPolicyAssignment,assignedPolicies:this.entitlementsItem?.assignedPolicies??[]}})})}closeModal(){this.dismiss.emit()}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-approvals-detail-view"]],inputs:{approval:[1,"approval"],enableComment:[1,"enableComment"],defaultZero:[1,"defaultZero"],pendingApprovalsHandling:[1,"pendingApprovalsHandling"],complexBF:[1,"complexBF"]}
1,outputs:{dismiss:"dismiss"},decls:3,vars:3,consts:[["data-role","approvals-detail-view-modal",3,"cancel","modalOptions","isOpen"],["bbCustomModalBody",""],["data-role","approvals-approval-log-details-view",3,"approvalId","approvalDataInfo","entitlementsItem","isModal","isCommentEnabled","defaultZero","pendingApprovalsHandling","complexBF"],["data-role","approvals-approval-log-details-view",3,"navigateToList","approvalId","approvalDataInfo","entitlementsItem","isModal","isCommentEnabled","defaultZero","pendingApprovalsHandling","complexBF"]],template:function(o,i){1&o&&(e.j41(0,"bb-modal-ui",0),e.bIt("cancel",function(){return i.closeModal()}),e.j41(1,"bb-modal-body-ui"),e.DNE(2,kt,1,1,"ng-template",1),e.k0s()()),2&o&&e.Y8G("modalOptions",e.lJ4(2,q))("isOpen",!0)},dependencies:[ze.mk,He.No,C.Q_,C.zf,C.Jy,C.GI],encapsulation:2})}}return n})(),Me=(()=>{class n{constructor(){this.title=(0,c.hFB)(""),this.serviceAgreementsAmount=(0,c.hFB)(0)}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-service-agreement-title"]],inputs:{title:[1,"title"],serviceAgreementsAmount:[1,"serviceAgreementsAmount"]},decls:4,vars:4,consts:()=>{let t;return t=" de plus",[t,[1,"bb-stack","bb-stack--density-sm","bb-stack--align-center"],["data-role","selected-sa-icon",1,"bb-stack__item",3,"name","iconSize"],["data-role","selected-sa-title","tooltipTriggers","hover",1,"bb-ellipsis--responsive-container",3,"text"],[1,"bb-sa-switcher--other-box","bb-padding-box-horizontal--sm","bb-padding-box-vertical--xs","bb-stack__item"],["data-role","other-sa-amount"]]},template:function(o,i){1&o&&(e.j41(0,"div",1),e.nrm(1,"bb-user-context-icon-ui",2)(2,"bb-ellipsis-ui",3),e.nVh(3,Vt,5,1,"div",4),e.k0s()),2&o&&(e.R7$(),e.Y8G("name",i.title())("iconSize","sm"),e.R7$(),e.Y8G("text",i.title()),e.R7$(),e.vxM(i.serviceAgreementsAmount()>0?3:-1))},dependencies:[b.s1W,b.VO2,ce.eP,ce.ti],encapsulation:2,changeDetection:0})}}return n})(),oo=(()=>{class n{static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-empty-search-results"]],decls:2,vars:1,consts:()=>{let t,o;return t="Aucun r\xE9sultat trouv\xE9",o="V\xE9rifiez les d\xE9tails de votre recherche et r\xE9essayez.",[["data-role","empty-search-container",1,"bb-state-container"],["data-role","empty-search-description","title",t,"subtitle",o,"image","ic_asset_laptop",3,"headingLevel"]]},template:function(o,i){1&o&&(e.j41(0,"div",0),e.nrm(1,"bb-empty-state-ui",1),e.k0s()),2&o&&(e.R7$(),e.Y8G("headingLevel",3))},dependencies:[B.b,B.o],encapsulation:2,changeDetection:0})}}return n})(),io=(()=>{class n{constructor(){this.serviceAgreements=(0,c.hFB)([]),this.searchControl=c.hFB.required()}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-search-box"]],hostAttrs:[1,"bb-d-block","bb-block--full-width"],inputs:{serviceAgreements:[1,"serviceAgreements"],searchControl:[1,"searchControl"]},decls:2,vars:4,consts:()=>{let t,o;return t="Rechercher une entente de service",o="Rechercher une entente de service",[[1,"bb-padding-box-horizontal--md","bb-padding-box-vertical--md"],["data-role","sa-search-input","size","md","placeholder",t,"aria-label",o,3,"clear","showClear","showSearch","formControl","disabled"]]},template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"bb-search-box-ui",1),e.bIt("clear",function(){return i.searchControl().patchValue("")}),e.k0s()()),2&o&&(e.R7$(),e.Y8G("showClear",!0)("showSearch",!0)("formControl",i.searchControl())("disabled",!i.searchControl().value&&!i.serviceAgreements().length))},dependencies:[Se.u,Se.T,k.X1,k.BC,k.l_],encapsulation:2,changeDetection:0})}}return n})(),ao=(()=>{class n{constructor(){this.counter=(0,c.hFB)(0),this.name=(0,c.hFB)(""),this.isCurrent=(0,c.hFB)(!1),this.isSelected=!1,this.selectItem=(0,c.CGW)(),this.checkboxAriaLabel=(0,_.EW)(()=>this.counter()>0?this.#e.checkboxLabelWithCount(this.name(),this.counter()):this.#e.checkboxLabel(this.name())),this.#e={checkboxLabel:t=>"S\xE9lectionner " + t + "",checkboxLabelWithCount:(t,o)=>"S\xE9lectionner l'entente de service " + t + ", qui a " + o + " actions \xE0 approuver"}}#e;static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-service-agreement-item"]],hostAttrs:[1,"bb-stack","bb-stack--align-center","bb-stack--density-sm","bb-padding-box-vert
1ical--sm","bb-block--full-width"],inputs:{counter:[1,"counter"],name:[1,"name"],isCurrent:[1,"isCurrent"],isSelected:"isSelected"},outputs:{selectItem:"selectItem"},decls:7,vars:8,consts:()=>{let t;return t="Actuel",[["data-role","service-agreement-checkbox",1,"bb-stack__item",3,"ngModelChange","ngModel","disabled","aria-label"],["data-role","service-agreement-icon",1,"bb-stack__item",3,"name","iconSize"],[1,"bb-inline-stack","bb-inline-stack--density-sm","bb-stack__item"],["data-role","service-agreement-name",1,"bb-inline-stack__item"],["data-role","service-agreement-badge","text",t,"color","info",1,"bb-inline-stack__item"],[1,"bb-stack__item","bb-stack__item--push-right","bb-stack__item--no-shrink"],["data-role","service-agreement-counter",3,"count","color"]]},template:function(o,i){1&o&&(e.j41(0,"bb-input-checkbox-ui",0),e.mxI("ngModelChange",function(l){return e.DH7(i.isSelected,l)||(i.isSelected=l),l}),e.bIt("ngModelChange",function(l){return i.selectItem.emit(l)}),e.k0s(),e.nrm(1,"bb-user-context-icon-ui",1),e.j41(2,"span",2)(3,"span",3),e.
1EFF(4),e.k0s(),e.nVh(5,Ut,1,0,"bb-badge-ui",4),e.k0s(),e.nVh(6,$t,2,2,"div",5)),2&o&&(e.R50("ngModel",i.isSelected),e.Y8G("disabled",i.isCurrent()&&!i.counter()),e.jOp("aria-label",i.checkboxAriaLabel()),e.R7$(),e.Y8G("name",i.name())("iconSize","sm"),e.R7$(3),e.SpI(" ",i.name()," "),e.R7$(),e.vxM(i.isCurrent()?5:-1),e.R7$(),e.vxM(i.counter()>0?6:-1))},dependencies:[ne.m,ne.R,k.YN,k.BC,k.vS,b.s1W,b.VO2,Q.y,Q.d,pe.E,pe.n],encapsulation:2,changeDetection:0})}}return n})(),Le=(()=>{class n{constructor(){this.isDisabled=(0,c.hFB)(!1),this.modalTrigger=(0,c.hFB)(!1),this.isModalOpen=(0,c.hFB)(!1),this.modalTriggerClick=(0,c.CGW)(),this.destroy$=new $.B}set closeDropdown(t){t.pipe((0,te.Q)(this.destroy$)).subscribe(()=>{this.dropdownPanel&&this.dropdownPanel.closeMenu()})}onMobileTriggerActivate(){this.isDisabled()||this.modalTriggerClick.emit()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-service-agreements-switcher"]],viewQuery:function(o,i){if(1&o&&e.GBs(zt,5),2&o){let a;e.mGM(a=e.lsd())&&(i.dropdownPanel=a.first)}},inputs:{isDisabled:[1,"isDisabled"],modalTrigger:[1,"modalTrigger"],isModalOpen:[1,"isModalOpen"],closeDropdown:"closeDropdown"},outputs:{modalTriggerClick:"modalTriggerClick"},ngContentSelectors:Xt,decls:4,vars:1,consts:()=>{let t;return t="S\xE9lectionner des contrats de service",[["toggleTpl",""],["dropdownPanel",""],[1,"bb-padding-box-horizontal--md"],["data-role","sa-switcher-dropdown","buttonClass","bb-sa-switcher--active bb-sa-switcher--dropdown-toggle",1,"bb-sa-switcher--dropdown","bb-dropdown-width",3,"disabled"],["role","button","data-role","sa-switcher-mobile-trigger","aria-label",t,1,"bb-sa-switcher--active","bb-sa-switcher--mobile-trigger","bb-accessgroup-focus-visible-outline",3,"bbKeyboardClick"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["bbDropdownToggle",""],["bbDropdownMenu",""],["data-role","sa-switcher-body",1,"bb-sa-switcher--body"],[1,"bb-stack","bb-padding-box-vertical--md","bb-padding-box-horizontal--sm"],["data-role","sa-switcher-title"],["data-role","sa-switcher-arrow",1,"bb-stack__item",3,"bb-stack__item--push-right","name"],["data-role","sa-switcher-arrow",1,"bb-stack__item",3,"name"]]},template:function(o,i){1&o&&(e.NAR(Ht),e.nVh(0,Jt,3,7,"div",2)(1,qt,4,1,"bb-dropdown-panel-ui",3),e.DNE(2,en,4,3,"ng-template",null,0,e.C5r)),2&o&&e.vxM(i.modalTrigger()?0:1)},dependencies:[O.T3,_e.iv,_e.VW,_e.rl,_e.eO,R.o,R.R,De.e,De.p],encapsulation:2,changeDetection:0})}}return n})(),so=(()=>{class n{constructor(){this.extensionToken=c.hFB.required(),this.data=(0,c.hFB)(),this.injector=(0,s.WQX)(s.zZn)}ngOnInit(){this.injector.get(this.extensionToken(),[]).forEach(o=>{const i=this.calDetailCustomContainer.createComponent(o);this.data()&&i.setInput("data",this.data())})}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-detail-extension-host"]],viewQuery:function(o,i){if(1&o&&e.GBs(tn,7,e.c1b),2&o){let a;e.mGM(a=e.lsd())&&(i.calDetailCustomContainer=a.first)}},inputs:{extensionToken:[1,"extensionToken"],data:[1,"data"]},decls:2,vars:0,consts:[["calDetailCustomContainer",""]],template:function(o,i){1&o&&e.PeT(0,nn,0,0,"ng-template",null,0,e.C5r)},encapsulation:2})}}return n})(),ro=(()=>{class n{constructor(){this.extensionToken=c.hFB.required(),this.data=(0,c.hFB)(),this.injector=(0,s.WQX)(s.zZn)}ngOnInit(){this.injector.get(this.extensionToken(),[]).forEach(o=>{const i=this.calHeaderCustomContainer.createComponent(o);this.data()&&i.setInput("data",this.data())})}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-header-extension-host"]],viewQuery:function(o,i){if(1&o&&e.GBs(on,7,e.c1b),2&o){let a;e.mGM(a=e.lsd())&&(i.calHeaderCustomContainer=a.first)}},inputs:{extensionToken:[1,"extensionToken"],data:[1,"data"]},decls:2,vars:0,consts:[["calHeaderCustomContainer",""]],template:function(o,i){1&o&&e.PeT(0,an,0,0,"ng-template",null,0,e.C5r)},encapsulation:2})}}return n})(),Je=(()=>{class n{transform(t,o){return t.reduce((i,a)=>{const l=o.find(d=>d.functionName===a.functionName&&d.resourceName===a.resourceName);return i+(l?.count??0)},0)}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275pipe=e.EJ8({name:"calculateTabCount",type:n,pure:!0})}}return n})(),lo=(()=>{class n{constructor(){this.headerName=c.hFB.required(),this.action=c.hFB.required(),this.showSubHeader=(0,c.hFB)(!0),this.userName=(0,c.hFB)(void 0),this.affectedSaName=(0,
1c.hFB)(void 0),this.initiatedAt=(0,c.hFB)(void 0),this.metaByAction={CREATE:{label:"en cours de cr\xE9ation",cssClass:"bb-text-success"},EDIT:{label:"en cours de modification",cssClass:"bb-text-primary"},DELETE:{label:"en cours de suppression",cssClass:"bb-text-danger"},UNKNOWN:{label:" ",cssClass:"bb-text-muted"}},this.actionMeta=(0,_.EW)(()=>{const t=this.action();return this.metaByAction[t]??{cssClass:"bb-text-muted",label:`${this.metaByAction[u.iY.UNKNOWN].label}: ${t}`}}),this.showInitiated=(0,_.EW)(()=>{const t=this.userName()?.trim(),o=this.initiatedAt();return!!t&&!!o}),this.showSa=(0,_.EW)(()=>{const t=this.affectedSaName()?.trim();return this.showInitiated()&&!!t})}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-approval-header"]],inputs:{headerName:[1,"headerName"],action:[1,"action"],showSubHeader:[1,"showSubHeader"],userName:[1,"userName"],affectedSaName:[1,"affectedSaName"],initiatedAt:[1,"initiatedAt"]},decls:8,vars:4,consts:()=>{let t,o;return t="Initi\xE9 par ",o="Entente de service : ",[t,o,[1,"bb-stack"],[1,"bb-stack__item"],[1,"bb-block","bb-block--xs"],["data-role","approval-log-details-header-title",1,"bb-heading-3"],[1,"bb-text",3,"ngClass"],["data-role","approval-log-details-header-subtitle",1,"bb-block","bb-block--xs"],["data-role","approval-log-details-header-username"],[3,"dateTime"],["aria-hidden","true"],["data-role","approval-log-details-header-sa",1,"break-word"]]},template:function(o,i){1&o&&(e.j41(0,"header",2)(1,"div",3)(2,"div",4)(3,"h2",5),e.EFF(4),e.j41(5,"span",6),e.EFF(6),e.k0s()()(),e.nVh(7,rn,7,3,"div",7),e.k0s()()),2&o&&(e.R7$(4),e.SpI(" ",i.headerName()," "),e.R7$(),e.Y8G("ngClass",i.actionMeta().cssClass),e.R7$(),e.JRh(i.actionMeta().label),e.R7$(),e.vxM(i.showInitiated()&&i.showSubHeader()?7:-1))},dependencies:[O.YU,b.yxh],encapsulation:2,changeDetection:0})}}return n})();const co={groupHeader:"Groupe de comptes"};let po=(()=>{class n{constructor(){this.isContentLoaded=c.hFB.required(),this.approvalDetails=c.hFB.required(),this.affectedSaName=(0,c.hFB)(void 0),this.approveLoading=(0,c.hFB)(!1),this.rejectLoading=(0,c.hFB)(!1),this.enableComment=(0,c.hFB)(!1),this.error=(0,c.hFB)(void 0),this.closeModal=(0,c.CGW)(),this.approve=(0,c.CGW)(),this.reject=(0,c.CGW)(),this.#e=(0,s.WQX)(v.CKB),this.action=(0,_.EW)(()=>this.approvalDetails().action??u.iY.UNKNOWN),this.initiatedAt=(0,_.EW)(()=>this.approvalDetails().createdAt?new Date(this.approvalDetails().createdAt):void 0),this.headerName=(0,_.EW)(()=>this.approvalDetails().functionCode===u.eI.ManageDataGroups?co.groupHeader:this.#e.getBusinessFunctionName(this.approvalDetails().functionCode)??this.approvalDetails().function??"")}#e;static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-cal-detail-view-modal"]],inputs:{isContentLoaded:[1,"isContentLoaded"],approvalDetails:[1,"approvalDetails"],affectedSaName:[1,"affectedSaName"],approveLoading:[1,"approveLoading"],rejectLoading:[1,"rejectLoading"],enableComment:[1,"enableComment"],error:[1,"error"]},outputs:{closeModal:"closeModal",approve:"approve",reject:"reject"},ngContentSelectors:ln,decls:7,vars:3,consts:[["customHeaderTemplate",""],["data-role","cal-detail-view-modal",3,"cancel","modalOptions","isOpen"],["bbCustomModalHeader",""],["bbCustomModalBody",""],[4,"ngTemplateOutlet"],["loaderSize","lg"],[1,"bb-stack","bb-block--full-width","bb-block--lg",3,"approve","reject","approvalDetails","approveLoading","rejectLoading","enableComment"],[1,"bb-block--xl"],[3,"headerName","action","showSubHeader","userName","initiatedAt","affectedSaName"]],template:function(o,i){if(1&o){const a=e.RV6();e.NAR(),e.j41(0,"bb-modal-ui",1),e.bIt("cancel",function(){return s.eBV(a),s.Njj(i.closeModal.emit())}),e.j41(1,"bb-modal-header-ui"),e.DNE(2,dn,2,3,"ng-template",2),e.k0s(),e.j41(3,"bb-modal-body-ui"),e.DNE(4,un,3,2,"ng-template",3),e.k0s()(),e.DNE(5,mn,1,6,"ng-template",null,0,e.C5r)}2&o&&e.Y8G("modalOptions",e.lJ4(2,q))("isOpen",!0)},dependencies:[O.T3,C.Q_,C.zf,C.Jy,C.GI,C.ep,C.Pe,b.WS4,N.m,N.T,lo],encapsulation:2,changeDetection:0})}}return n})(),_o=(()=>{class n{constructor(){this.datePipe=(0,s.WQX)(O.vh),this.oldState=(0,c.hFB)(),this.newState=(0,c.hFB)(),this.action=(0,c.hFB)(),this.showNoDataMessage=(0,_.EW)(()=>!this.oldState()&&!this.newState()),this.transformedChangelog=(0,_.EW)(()=>{const t=this.action(),o=this.oldState(),i=this.newState();return t===u.iY.CREATE?{oldState:{},newState:this.transformState(i)}
1:t===u.iY.DELETE?{oldState:this.transformState(o),newState:{}}:{oldState:this.transformState(o),newState:this.transformState(i)}})}extractDate(t){if(t)try{return this.datePipe.transform(t,"yyyy-MM-dd")??void 0}catch{return}}extractTime(t){if(t)try{return this.datePipe.transform(t,"HH:mm:ss")??void 0}catch{return}}mapApprovalType(t,o){if(t&&o)return{id:t,name:o,rank:0}}transformState(t){if(!t)return;const o=t.validFrom??null,i=t.validUntil??null;return{name:t.name??"",description:t.description??"",validFromDate:this.extractDate(o),validFromTime:this.extractTime(o),validUntilDate:this.extractDate(i),validUntilTime:this.extractTime(i),approvalType:this.mapApprovalType(t.approvalTypeId,t.approvalTypeName),approvalTypeId:t.approvalTypeId??void 0}}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-cal-function-group-info-update"]],inputs:{oldState:[1,"oldState"],newState:[1,"newState"],action:[1,"action"]},features:[e.Jv_([O.vh])],decls:2,vars:1,consts:()=>{let t;return t=" No data available ",[t,["data-role","no-data-message",1,"text-muted"],[3,"action","isApprovalLog","functionGroupChangelog"]]},template:function(o,i){1&o&&e.nVh(0,gn,2,0,"p",1)(1,hn,1,3,"bb-job-role-info-update",2),2&o&&e.vxM(i.showNoDataMessage()?0:1)},dependencies:[b.Gcx],encapsulation:2,changeDetection:0})}}return n})(),uo=(()=>{class n{constructor(){this.#e=(0,s.WQX)(v.CKB),this.action=(0,c.hFB)(null),this.oldState=(0,c.hFB)(null),this.newState=(0,c.hFB)(null),this.functionGroupType=(0,c.hFB)(null),this.displayState=(0,_.EW)(()=>{const t=this.action(),o=this.newState(),i=this.oldState();switch(t){case"CREATE":return o;case"DELETE":return i;case"EDIT":return i??o;default:return null}}),this.hasError=(0,_.EW)(()=>null===this.displayState()),this.displayName=(0,_.EW)(()=>{const o=this.displayState()?.name;if(!o)return "Unknown Job Role";const i=this.functionGroupType();return("SYSTEM"===i||!i&&"SYSTEM_FUNCTION_GROUP"===o)&&this.#e.getSystemJobRoleName()||o}),this.displayDescription=(0,_.EW)(()=>{const o=this.displayState()?.description??"";return o?("SYSTEM"===this.functionGroupType()||"SYSTEM_FUNCTION_GROUP"===o)&&this.#e.getSystemJobRoleDescription()||o:""}),this.displayType=(0,_.EW)(()=>{const t=this.functionGroupType();return t?"DEFAULT"===t?"REGULAR":t:null})}#e;static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-function-group-approval-sub-header"]],inputs:{action:[1,"action"],oldState:[1,"oldState"],newState:[1,"newState"],functionGroupType:[1,"functionGroupType"]},decls:2,vars:1,consts:()=>{let t;return t=" Unable to load job role information ",[t,["data-role","error-state"],["type","job-role","semanticHeading","",3,"header","description","badgeType"],["name","warning","color","danger"]]},template:function(o,i){1&o&&e.nVh(0,bn,4,0,"div",1)(1,An,1,3,"bb-entitlements-header",2),2&o&&e.vxM(i.hasError()?0:1)},dependencies:[b.gP3,b.J_v,R.o,R.R],encapsulation:2,changeDetection:0})}}return n})(),mo=(()=>{class n{constructor(){this.permissionMatrix=(0,c.hFB)([]),this.enableBfTooltipInfo=(0,c.hFB)(!1),this.bfTooltipInfoFunctionCodes=(0,c.hFB)(null),this.transformedMatrix=(0,_.EW)(()=>{const t=this.permissionMatrix();return this.transformPermissionMatrix(t)}),this.groupedPermissions=(0,_.EW)(()=>{const t=this.transformedMatrix(),o=this.initializeGroupMaps();return this.categorizeItemsByAction(t,o),this.buildGroupedResult(o)}),this.matrixAddedItems=(0,_.EW)(()=>this.groupedPermissions().added),this.matrixRemovedItems=(0,_.EW)(()=>this.groupedPermissions().removed),this.matrixModifiedItems=(0,_.EW)(()=>this.groupedPermissions().modified),this.matrixUnchangedItems=(0,_.EW)(()=>this.groupedPermissions().unchanged),this.matrixCounter=(0,_.EW)(()=>this.groupedPermissions().counter)}initializeGroupMaps(){return{added:new Map,removed:new Map,modified:new Map,unchanged:new Map}}categorizeItemsByAction(t,o){for(const i of t){const a=this.getTargetMap(i.action,o);if(a){const l=this.getGroupKeyForResource(i.resource),d=a.get(l)??[];d.push(i),a.set(l,d)}}}getGroupKeyForResource(t){return v.ZU8.find(o=>v.CuB[o]?.includes(t))??"other"}getTargetMap(t,o){switch(t){case u.aG.Added:return o.added;case u.aG.Removed:return o.removed;case u.aG.Changed:return o.modified;case u.aG.Unchanged:return o.unchanged;default:return}}buildGroupedResult(t){const o=this.mapToChangeLogArray(t.added),i=this.mapToChangeLogArray(t.removed),a=this.mapToChangeLogArray(t.modified),l=this.mapToChangeLogArray(t.unchanged);return{added:o,removed:i,modified:a,unchanged:l,counter:{matrixAddedCounter:(0,v.ncJ)(o)??0,matrixRemovedCounter:(0,v.ncJ)(i)??0,matrixM
1odifiedCounter:(0,v.ncJ)(a)??0,matrixUnchangedCounter:(0,v.ncJ)(l)??0}}}mapToChangeLogArray(t){const o=[];for(const[i,a]of t.entries())o.push({groupKey:i,businessFunctions:this.toPermissionMatrixItems(a)});return o.sort((i,a)=>v.ZU8.indexOf(i.groupKey)-v.ZU8.indexOf(a.groupKey))}toPermissionMatrixItems(t){return t}transformPermissionMatrix(t){return t?t.filter(o=>this.isKnownAction(o.action)).map(o=>({functionId:o.functionId??"",functionCode:o.functionCode??"",resource:o.resource??"",name:o.name??"",action:this.mapPermissionAction(o.action),privileges:this.mapPrivileges(o.privileges)})):[]}isKnownAction(t){const o=t?.toLowerCase();return"added"===o||"removed"===o||"changed"===o||"unchanged"===o}mapPrivileges(t){const o=i=>i?{oldValue:i.oldValue??null,newValue:i.newValue??null}:null;return{view:o(t?.view),create:o(t?.create),edit:o(t?.edit),delete:o(t?.delete),approve:o(t?.approve),cancel:o(t?.cancel),execute:o(t?.execute)}}mapPermissionAction(t){switch(t?.toLowerCase()){case"added":return u.aG.Added;case"removed":return u.aG.Removed;case"changed":return u.aG.Changed;default:return u.aG.Unchanged}}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-cal-function-group-permission-matrix"]],inputs:{permissionMatrix:[1,"permissionMatrix"],enableBfTooltipInfo:[1,"enableBfTooltipInfo"],bfTooltipInfoFunctionCodes:[1,"bfTooltipInfoFunctionCodes"]},decls:1,vars:8,consts:[[3,"matrixAddedItems","matrixRemovedItems","matrixModifiedItems","matrixUnchangedItems","matrixCounter","showBFCount","enableBfTooltipInfo","bfTooltipInfoFunctionCodes"]],template:function(o,i){1&o&&e.nrm(0,"bb-permission-matrix-container",0),2&o&&e.Y8G("matrixAddedItems",i.matrixAddedItems())("matrixRemovedItems",i.matrixRemovedItems())("matrixModifiedItems",i.matrixModifiedItems())("matrixUnchangedItems",i.matrixUnchangedItems())("matrixCounter",i.matrixCounter())("showBFCount",!0)("enableBfTooltipInfo",i.enableBfTooltipInfo())("bfTooltipInfoFunctionCodes",i.bfTooltipInfoFunctionCodes())},dependencies:[b.VIm],encapsulation:2,changeDetection:0})}}return n})(),We=(()=>{class n{constructor(){this.payees=(0,c.hFB)([]),this.pageSize=(0,c.hFB)(v.yQz),this.isLoading=(0,c.hFB)(!1),this.disabled=(0,c.hFB)(!1),this.isEnd=(0,c.hFB)(!1),this.loadMore=(0,c.CGW)()}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-payee-group-items"]],inputs:{payees:[1,"payees"],pageSize:[1,"pageSize"],isLoading:[1,"isLoading"],disabled:[1,"disabled"],isEnd:[1,"isEnd"]},outputs:{loadMore:"loadMore"},decls:1,vars:1,consts:()=>{let t;return t="Payee name",[t,[1,"bb-subheader","bb-subheader--regular","bb-text-semi-bold"],[1,"bb-block","bb-block--xs"],["role","list"],["role","listitem","data-role","payee-group-item",1,"d-block","bb-padding-box-vertical--md",3,"payee","checkboxEnabled","showRemoveButton","divider-outer-bottom"],["data-role","load-more-button",3,"isLoading","disabled","isEnd"],["role","listitem","data-role","payee-group-item",1,"d-block","bb-padding-box-vertical--md",3,"payee","checkboxEnabled","showRemoveButton"],["data-role","load-more-button",3,"loadMore","isLoading","disabled","isEnd"]]},template:function(o,i){1&o&&e.nVh(0,En,7,1),2&o&&e.vxM(i.payees().length>0?0:-1)},dependencies:[b.Xqb,J],encapsulation:2,changeDetection:0})}}return n})(),Ye=(()=>{class n{constructor(){this.isOpen=(0,c.hFB)(!1),this.payeeGroupName=(0,
1c.hFB)(""),this.payees=(0,c.hFB)([]),this.isLoading=(0,c.hFB)(!1),this.isEnd=(0,c.hFB)(!1),this.pageSize=(0,c.hFB)(v.yQz),this.closed=(0,c.CGW)(),this.loadMore=(0,c.CGW)()}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-payee-group-items-modal"]],inputs:{isOpen:[1,"isOpen"],payeeGroupName:[1,"payeeGroupName"],payees:[1,"payees"],isLoading:[1,"isLoading"],isEnd:[1,"isEnd"],pageSize:[1,"pageSize"]},outputs:{closed:"closed",loadMore:"loadMore"},decls:5,vars:3,consts:()=>{let t,o,i;return t="D\xE9tails du groupe de b\xE9n\xE9ficiaires \"" + "\ufffd0\ufffd" + "\"",o="No payees found",i="There are currently no payees assigned",[t,[3,"cancel","isOpen","modalOptions"],["bbCustomModalHeader",""],["bbCustomModalBody",""],[1,"bb-state-container","bb-state-container--min-height"],["data-role","payee-group-items-modal-items",3,"payees","isLoading","isEnd","pageSize"],["title",o,"subtitle",i,"image","ic_asset_light_bulb",3,"headingLevel"],["data-role","payee-group-items-modal-items",3,"loadMore","payees","isLoading","isEnd","pageSize"]]},template:function(o,i){1&o&&(e.j41(0,"bb-modal-ui",1),e.bIt("cancel",function(){return i.closed.emit()}),e.j41(1,"bb-modal-header-ui"),e.DNE(2,Sn,2,1,"ng-template",2),e.k0s(),e.j41(3,"bb-modal-body-ui"),e.DNE(4,Tn,3,1,"ng-template",3),e.k0s()()),2&o&&e.Y8G("isOpen",i.isOpen())("modalOptions",e.lJ4(2,q))},dependencies:[C.Q_,C.zf,C.Jy,C.GI,C.ep,C.Pe,We,B.b,B.o,N.m,N.T],encapsulation:2,changeDetection:0})}}return n})();const Te={notSet:"Not set",payeeGroup:"Payee group",accountGroup:"Groupe de comptes"};let go=(()=>{class n{constructor(){this.action=(0,c.hFB)(null),this.oldState=(0,c.hFB)(null),this.newState=(0,c.hFB)(null),this.dataGroupType=(0,c.hFB)(null),this.displayState=(0,_.EW)(()=>{const t=this.action(),o=this.newState(),i=this.oldState();switch(t){case u.iY.CREATE:return o;case u.iY.DELETE:return i;case u.iY.EDIT:return o&&i?o:null;default:return null}}),this.hasError=(0,_.EW)(()=>null===this.displayState()),this.headerType=(0,_.EW)(()=>this.dataGroupType()===v.Pmp.CONTACTS?v.KME.PAYEE:v.KME.ACCOUNT),this.groupTypeLabel=(0,_.EW)(()=>this.dataGroupType()===v.Pmp.CONTACTS?Te.payeeGroup:Te.accountGroup),this.displayName=(0,_.EW)(()=>this.action()===u.iY.CREATE?this.newState()?.name??"":this.oldState()?.name??""),this.headerDescription=(0,_.EW)(()=>this.action()===u.iY.CREATE?this.newState()?.description??"":this.oldState()?.description??""),this.showNameOldValue=(0,_.EW)(()=>this.action()===u.iY.EDIT&&this.oldState()?.name!==this.newState()?.name),this.showDescriptionOldValue=(0,_.EW)(()=>this.action()===u.iY.EDIT&&this.oldState()?.description!==this.newState()?.description),this.notSetText=Te.notSet}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-data-group-approval-sub-header"]],inputs:{action:[1,"action"],oldState:[1,"oldState"],newState:[1,"newState"],dataGroupType:[1,"dataGroupType"]},decls:2,vars:1,consts:()=>{let t,o,i,a;return t=" Couldn't fetch name and description for data group ",o="Nom",i="Description",a="Type de groupe",[t,a,["data-role","sub-header-error"],["name","warning","color","danger"],["semanticHeading","",1,"bb-stack","bb-block--xl",3,"type","header","description"],[1,"bb-block--md"],["data-role","review-property-name","name",o,3,"showOldValue"],["oldValue",""],["newValue",""],["data-role","review-property-description","name",i,3,"showOldValue"],["data-role","review-property-type",1,"bb-stack","row","bb-block","bb-block--md"],[1,"col-2"],[1,"bb-subtitle","break-word","col-10"]]},template:function(o,i){1&o&&e.nVh(0,Nn,4,0,"div",2)(1,In,20,10),2&o&&e.vxM(i.hasError()?0:1)},dependencies:[b.gP3,b.J_v,R.o,R.R,b.ng9],encapsulation:2,changeDetection:0})}}return n})(),Qe=(()=>{class n{constructor(){this.isOpen=(0,c.hFB)(!1),this.accountGroupName=(0,
1c.hFB)(""),this.products=(0,c.hFB)([]),this.pageSize=(0,c.hFB)(v.yQz),this.isLoading=(0,c.hFB)(!1),this.isEnd=(0,c.hFB)(!1),this.showLegalEntityName=(0,c.hFB)(!1),this.availableLegalEntities=(0,c.hFB)(void 0),this.closed=(0,c.CGW)(),this.loadMore=(0,c.CGW)()}onClose(){this.closed.emit()}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-account-group-items-modal"]],inputs:{isOpen:[1,"isOpen"],accountGroupName:[1,"accountGroupName"],products:[1,"products"],pageSize:[1,"pageSize"],isLoading:[1,"isLoading"],isEnd:[1,"isEnd"],showLegalEntityName:[1,"showLegalEntityName"],availableLegalEntities:[1,"availableLegalEntities"]},outputs:{closed:"closed",loadMore:"loadMore"},decls:5,vars:4,consts:()=>{let t,o,i;return t=" D\xE9tails du groupe de comptes '" + "\ufffd0\ufffd" + "'",o="No results to show",i="Lorsque ce groupe contiendra des comptes, ils appara\xEEtront ici.",[t,[3,"cancel","isOpen","modalOptions"],[3,"showClose"],["bbCustomModalHeader",""],["bbCustomModalBody",""],["data-role","account-group-items-modal-title"],["data-role","account-group-items-modal-loading",1,"bb-state-container","bb-state-container--min-height"],["data-role","account-group-items-modal-empty",1,"bb-state-container","bb-state-container--min-height"],["data-role","account-group-items-modal-table-body",3,"products","showLegalEntityName","availableLegalEntities","checkboxEnabled","showRemoveButton"],[3,"isLoading","isEnd"],[3,"loadMore","isLoading","isEnd"],["loaderSize","md"],["title",o,"subtitle",i,"image","ic_asset_laptop",3,"headingLevel"]]},template:function(o,i){1&o&&(e.j41(0,"bb-modal-ui",1),e.bIt("cancel",function(){return i.onClose()}),e.j41(1,"bb-modal-header-ui",2),e.DNE(2,On,2,1,"ng-template",3),e.k0s(),e.j41(3,"bb-modal-body-ui"),e.DNE(4,Bn,3,1,"ng-template",4),e.k0s()()),2&o&&(e.Y8G("isOpen",i.isOpen())("modalOptions",e.lJ4(3,q)),e.R7$(),e.Y8G("showClose",!0))},dependencies:[C.Q_,C.zf,C.Jy,C.GI,C.ep,C.Pe,b.IYk,J,B.b,B.o,N.m,N.T],encapsulation:2,changeDetection:0})}}return n})(),ho=(()=>{class n{constructor(){this.groups=c.hFB.required(),this.showTitle=(0,c.hFB)(!0),this.groupActivate=(0,c.CGW)()}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-cal-wizard-assigned-account-groups"]],inputs:{groups:[1,"groups"],showTitle:[1,"showTitle"]},outputs:{groupActivate:"groupActivate"},decls:1,vars:3,consts:[[3,"groupActivate","groups","showTitle","showAssignedHelper"]],template:function(o,i){1&o&&(e.j41(0,"bb-wizard-assigned-account-groups",0),e.bIt("groupActivate",function(l){return i.groupActivate.emit(l)}),e.k0s()),2&o&&e.Y8G("groups",i.groups())("showTitle",i.showTitle())("showAssignedHelper",!0)},dependencies:[b.wFs],encapsulation:2,changeDetection:0})}}return n})(),bo=(()=>{class n{constructor(){this.enableBfTooltipInfo=(0,c.hFB)(!1),this.bfTooltipInfoFunctionCodes=(0,c.hFB)(null),this.jobRole=(0,c.hFB)(void 0),this.closed=(0,c.CGW)(),this.groupedBusinessFunctions=(0,_.EW)(()=>this.jobRole()?.groupedBusinessFunctions??[])}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-job-role-permissions-modal"]],inputs:{enableBfTooltipInfo:[1,"enableBfTooltipInfo"],bfTooltipInfoFunctionCodes:[1,"bfTooltipInfoFunctionCodes"],jobRole:[1,"jobRole"]},outputs:{closed:"closed"},decls:5,vars:4,consts:()=>{let t;return t=" D\xE9tails du r\xF4le ",[t,[3,"cancel","isOpen","modalOptions"],["tabindex","0",3,"showClose"],["bbCustomModalHeader",""],["bbCustomModalBody",""],[1,"bb-block","bb-block--full-width"],[1,"bb-stack","bb-block","bb-block--md"],[1,"bb-stack__item"],["data-role","job-role-permissions-modal-header-title"],[3,"showIcon","headingLevel","jobRole"],["data-role","job-role-permissions-modal-body",3,"groupedBusinessFunctions","enableBfTooltipInfo","bfTooltipInfoFunctionCodes"]]},template:function(o,i){1&o&&(e.j41(0,"bb-modal-ui",1),e.bIt("cancel",function(){return i.closed.emit()}),e.j41(1,"bb-modal-header-ui",2),e.DNE(2,Pn,6,3,"ng-template",3),e.k0s(),e.j41(3,"bb-modal-body-ui"),e.DNE(4,wn,1,3,"ng-template",4),e.k0s()()),2&o&&(e.Y8G("isOpen",!0)("modalOptions",e.lJ4(3,xn)),e.R7$(),e.Y8G("showClose",!0))},dependencies:[C.Q_,C.zf,C.Jy,C.GI,C.ep,C.Pe,b.pew,b.B5o,b.wpj],encapsulation:2,changeDetection:0})}}return n})(),qe=(()=>{class n{constructor(){this.groupSubType=c.hFB.required(),this.canViewImpactedUsers=c.hFB.required(),this.viewUsersClicked=(0,c.CGW)(),this.alertTitle=(0,_.EW)(()=>{switch(this.groupSubType()){case"account-group":return "La modification de ce groupe de comptes impactera les utilisateurs auxquels il a \xE9t\xE9 attribu\xE9.";case"payee-group":return "Editing this payee group may impact users who are currently assigned to it.";case"job-role":return "La modification de ce r\xF4le impactera les utilisateurs auxquels il a \xE9t\xE9 attribu\xE9.";default:return""}}),this.linkText="Consulter la liste des utilisateurs impact\xE9s",this.noPermissionMessage="You do not have permission to view the list of impacted users"}
1onLinkClick(){this.viewUsersClicked.emit()}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-cal-affected-users-alert"]],inputs:{groupSubType:[1,"groupSubType"],canViewImpactedUsers:[1,"canViewImpactedUsers"]},outputs:{viewUsersClicked:"viewUsersClicked"},decls:2,vars:1,consts:[["data-role","affected-users-link","modifier","warning",3,"title","supportiveLinkText"],["data-role","affected-users-no-permission","modifier","warning",3,"title","message"],["data-role","affected-users-link","modifier","warning",3,"supportiveLinkClick","title","supportiveLinkText"]],template:function(o,i){1&o&&e.nVh(0,jn,1,2,"bb-alert-ui",0)(1,kn,1,2,"bb-alert-ui",1),2&o&&e.vxM(i.canViewImpactedUsers()?0:1)},dependencies:[ue.Z,ue.C],encapsulation:2,changeDetection:0})}}return n})(),Ze=(()=>{class n{constructor(){this.isOpen=c.hFB.required(),this.loading=c.hFB.required(),this.error=c.hFB.required(),this.users=c.hFB.required(),this.hasMorePages=c.hFB.required(),this.groupSubType=c.hFB.required(),this.totalUsersCount=(0,c.hFB)(null),this.closeModal=(0,c.CGW)(),this.search=(0,c.CGW)(),this.loadMore=(0,c.CGW)(),this.retry=(0,c.CGW)(),this.usersCountDisplay=(0,_.EW)(()=>{const t=this.totalUsersCount();if(null!==t)return t;const o=this.users().length;return this.hasMorePages()?`${o}+`:o}),this.staleApprovalMessage=(0,_.EW)(()=>(0,v.ni0)(this.error())),this.isStaleApprovalError=(0,_.EW)(()=>void 0!==this.staleApprovalMessage()),this.resolvedErrorTitle=(0,_.EW)(()=>this.staleApprovalMessage()?.title??this.errorTitle),this.resolvedErrorMessage=(0,_.EW)(()=>this.staleApprovalMessage()?.message??this.errorMessage),this.usersAssignedText=(0,_.EW)(()=>{switch(this.groupSubType()){case"account-group":return "Utilisateurs auxquels ce groupe de comptes a \xE9t\xE9 attribu\xE9";case"payee-group":return "Utilisateurs auxquels ce groupe de comptes a \xE9t\xE9 attribu\xE9";case"job-role":return "Utilisateurs avec ce r\xF4le";default:return "Users assigned"}}),this.searchAriaLabel="Search users",this.searchPlaceholder="Search by name",this.nameColumnHeader="Nom et code d'utilisateur",this.legalEntityColumnHeader="Entit\xE9 l\xE9gale",this.loadMoreText="Afficher plus",this.closeText="Fermer",this.retryText="Retry",this.errorTitle="Unable to load users",this.errorMessage="An error occurred while loading the user list. Please try again.",this.emptyTitle="No users found",this.emptyMessage="No users match your search criteria."}onClose(){this.closeModal.emit()}onSearch(t){this.search.emit(t)}onLoadMore(){this.loadMore.emit()}onRetry(){this.retry.emit()}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-cal-affected-users-modal"]],inputs:{isOpen:[1,"isOpen"],loading:[1,"loading"],error:[1,"error"],users:[1,"users"],hasMorePages:[1,"hasMorePages"],groupSubType:[1,"groupSubType"],totalUsersCount:[1,"totalUsersCount"]},outputs:{closeModal:"closeModal",search:"search",loadMore:"loadMore",retry:"retry"},decls:1,vars:1,consts:[[3,"isOpen","modalOptions"],[3,"cancel","isOpen","modalOptions"],["bbCustomModalHeader",""],["bbCustomModalBody",""],["bbCustomModalFooter",""],[1,"bb-stack","bb-stack--wrap"],["data-role","modal-title"],["data-role","loading-indicator",1,"d-flex","justify-content-center","align-items-center","py-5"],["data-role","error-state",1,"d-flex","flex-column","align-items-center","py-4"],["data-role","empty-state",1,"d-flex","flex-column","align-items-center","py-4"],[1,"table-responsive"],["iconName","error",3,"title","subtitle","headingLevel"],["bbButton","","data-role","retry-button","color","primary"],["bbButton","","data-role","retry-button","color","primary",3,"click"],["iconName","search",3,"title","subtitle","headingLevel"],["data-role","users-table",1,"table"],["scope","col"],[1,"d-flex","justify-content-center","bb-block","bb-block--md"],[1,"bb-stack"],["data-role","user-avatar-icon","aria-hidden","true",1,"bb-stack__item--spacing-sm",3,"name"],[1,"bb-stack__item"],["data-role","affected-user-name",1,"bb-text-bold"],["data-role","affected-user-id",1,"bb-text-support"],["size","sm","name","domain","color","dark",1,"bb-stack__item","bb-stack__item--spacing-xs"],["data-role","affected-user-legal-entity-name",1,"bb-stack__item"],["data-role","load-more-button","color","link",3,"click","keydown.enter","isLoading","totalCount"],["bbButton","","data-role","footer-close-button","color","secondary",3,"click"]],template:function(o,i){1&o&&e.nVh(0,qn,7,3,"bb-modal-ui",0),2&o&&e.vxM(i.isOpen()?0:-1)},dependencies:[Xe.mC,Xe.fw,C.Q_,C.zf,C.s$,C.xg,C.Jy,C.GI,C.ep,C.Pe,j.tm,j._f,de.t,de.e,N.m,N.T,yt.u,B.b,B.o,R.o,R.R],encapsulation:2,changeDetection:0})}}return n})(),Ao=(()=>{class n{constructor(){this.permissionsDetails=(0,c.hFB)(null),this.user=(0,c.hFB)(null),this.defaultState=(0,c.hFB)(!0),this.selfApproveEnabled=(0,c.hFB)(!0),this.enableCAG=(0,c.hFB)(!1),this.dataGroupItemClicked=(0,c.CGW)(),this.jobRoleItem
1Clicked=(0,c.CGW)(),this.userPermissionsChangesReview=(0,_.EW)(()=>(0,u.HX)(this.permissionsDetails())),this.cagList=(0,_.EW)(()=>{const t=this.permissionsDetails();if(!t)return[];const o=[...t.newFunctionGroups??[],...t.removedFunctionGroups??[],...t.unmodifiedFunctionGroups??[]],i=new Set,a=[];for(const l of o)l.customerAccessGroups?.length&&!i.has(l.id)&&(i.add(l.id),a.push({functionGroupId:l.id,customerAccessGroups:l.customerAccessGroups}));return a})}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-cal-user-permissions-review"]],inputs:{permissionsDetails:[1,"permissionsDetails"],user:[1,"user"],defaultState:[1,"defaultState"],selfApproveEnabled:[1,"selfApproveEnabled"],enableCAG:[1,"enableCAG"]},outputs:{dataGroupItemClicked:"dataGroupItemClicked",jobRoleItemClicked:"jobRoleItemClicked"},decls:1,vars:1,consts:[[3,"user","cagList","defaultState","selfApproveEnabled","enableCAG","userPermissionsChangesReview"],[3,"dataGroupItemClicked","seeDetailsClicked","user","cagList","defaultState","selfApproveEnabled","enableCAG","userPermissionsChangesReview"]],template:function(o,i){1&o&&e.nVh(0,Zn,1,6,"bb-user-permissions-review",0),2&o&&e.vxM(i.permissionsDetails()?0:-1)},dependencies:[me.T9],encapsulation:2,changeDetection:0})}}return n})();var et=g(11297),Ne=g(47630),fo=g(35445);let Co=(()=>{class n{static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275mod=e.$C({type:n})}static{this.\u0275inj=s.G2t({imports:[ne.m,k.YN,fo.w1]})}}return n})();const Eo=()=>({size:"lg"});function So(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-entitlements-table",5),e.bIt("selectItem",function(i){s.eBV(t);const a=e.XpG();return s.Njj(a.selectCustom(i))}),e.k0s(),e.j41(1,"bb-load-approval-items-button",6),e.bIt("loadMore",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.loadMore())}),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("tableData",t.tableCustomData)("selectedServiceAgreements",t.serviceAgreements),e.R7$(),e.Y8G("isLoading",t.customSearch.isLoading)("isEnd",t.customSearch.isEnd)}}function Do(n,r){1&n&&e.nrm(0,"bb-loading-indicator-ui",2)}function Mo(n,r){if(1&n&&e.nrm(0,"bb-accessgroup-error",3),2&n){e.XpG();const t=e.r8f(0);e.Y8G("httpError",t)("headingLevel",2)}}function Lo(n,r){1&n&&(e.j41(0,"div",4),e.nrm(1,"bb-approval-items-resolved",7),e.k0s())}function To(n,r){1&n&&e.eu8(0)}function No(n,r){if(1&n){const t=e.RV6();e.j41(0,"div",10),e.nrm(1,"bb-header-extension-host",11),e.DNE(2,To,1,0,"ng-container",12),e.k0s(),e.j41(3,"div",13),e.PLo(4,1),e.nrm(5,"strong")(6,"bb-formatted-full-date-time",14),e.YFu(),e.k0s(),e.j41(7,"bb-approval-log-details-action-buttons",15),e.bIt("approve",function(){s.eBV(t);const i=e.XpG(2);return s.Njj(i.approve())})("reject",function(){s.eBV(t);const i=e.XpG(2);return s.Njj(i.reject())}),e.k0s(),e.nrm(8,"bb-detail-extension-host",11)}if(2&n){e.XpG();const t=e.sdS(4),o=e.XpG();e.R7$(),e.Y8G("extensionToken",o.headerToken())("data",o.selectedCustomData),e.R7$(),e.Y8G("ngTemplateOutlet",t),e.R7$(4),e.Y8G("dateTime",null==o.selectedCustomData?null:o.selectedCustomData.pendingApproval.approval.createdAt),e.uP7(null==o.selectedCustomData?null:o.selectedCustomData.pendingApproval.approval.userFullName),e.nnv(4),e.R7$(),e.Y8G("approvalDetails",null==o.selectedCustomData?null:o.selectedCustomData.detailedApproval)("approveLoading",o.isApproving)("rejectLoading",o.isRejecting),e.R7$(),e.Y8G("extensionToken",o.detailsToken())("data",o.selectedCustomData)}}function Io(n,r){if(1&n){const t=e.RV6();e.j41(0,"div",16)(1,"button",17),e.bIt("click",function(){s.eBV(t);const i=e.XpG(2);return s.Njj(i.closeModal())}),e.nrm(2,"bb-icon-ui",18),e.k0s()()}2&n&&(e.R7$(),e.Y8G("circle",!0))}function Oo(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-modal-ui",8),e.bIt("cancel",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.closeModal())}),e.j41(1,"bb-modal-body-ui"),e.DNE(2,No,9,10,"ng-template",9),e.k0s()(),e.DNE(3,Io,3,1,"ng-template",null,0,e.C5r)}2&n&&e.Y8G("modalOptions",e.lJ4(2,Eo))("isOpen",!0)}function yo(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-load-approval-items-button",3),e.bIt("loadMore",function(){s.eBV(t);const i=e.XpG(2);return s.Njj(i.onLoadMore())}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("isLoading",t.isLoading())("isEnd",t.isEnd())("disabled",t.isApproveRejectLoading())}}function Ro(n,r){if(1&n&&(e.j41(0,"bb-review-section",0),e.nrm(1,"bb-accounts-table-body",1),e.nVh(2,yo,1,3,"bb-load-approval-items-button",2),e.k0s()),2&n){const t=e.XpG();e.Y8G("type",t.sectionType())("shouldShowCounter",!1)("itemsName",t.translations.accounts),e.R7$(),e.Y8G("products",t.accounts())("showLegalEntityName",t.showLegalEntityName())("availableLegalEntities",t.saParticipants()),e.R7$(),e.vxM(t.accounts().length>=t.pageSize()&&t.cursor()?2:-1)}}function Fo(n,r){1&n&&(e.j41(0,"div",0),e.nrm(1,"bb-empty-state-ui",1),e.k0s()),2&n&&(e.R7$(),e.Y8G("headingLevel",3))}function Go(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-account-group-section",5),e.bIt("sectionError",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.sectionError.emit(i))}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("sectionType","added")("accountIds",t.addedIds())("initialData",t.addedInitialData())("approvalId",t.approvalId())("pageSize",t.pageSize())("saParticipants",t.saParticipantsMapped())("showLegalEntityName",t.showLegalEntitiesColumn())("isApproveRejectLoading",t.isApproveRejectLoading())}}function Bo(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-account-group-section",6),e.bIt("sectionError",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.sectionError.emit(i))}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("sectionType","removed")("accountIds",t.removedIds())("initialData",t.removedInitialData())("approvalId",t.approvalId())("pageSize",t.pageSize())("saParticipants",t.saParticipantsMapped())("showLegalEntityName",t.showLegalEntitiesColumn())("isApproveRejectLoading",t.isApproveRejectLoading())}}function xo(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-account-group-section",7),e.bIt("sectionError",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.sectionError.emit(i))}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("sectionType","unchanged")("accountIds",t.unchangedIds())("initialData",t.unchangedInitialData())("approvalId",t.approvalId())("pageSize",t.pageSize())("saParticipants",t.saParticipantsMapped())("showLegalEntityName",t.showLegalEntitiesColumn())("isApproveRejectLoading",t.isApproveRejectLoading())}}function Po(n,r){if(1&n&&(e.nVh(0,Go,1,8,"bb-account-group-section",2),e.nVh(1,Bo,1,8,"bb-account-group-section",3),e.nVh(2,xo,1,8,"bb-account-group-section",4)),2&n){const t=e.XpG();e.vxM(t.addedIds().length?0:-1),e.R7$(),e.vxM(t.removedIds().length?1:-1),e.R7$(),e.vxM(t.unchangedIds().length?2:-1)}}function wo(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-review-section",0)(1,"bb-payee-group-items",1),e.bIt("loadMore",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.onLoadMore())}),e.k0s()()}if(2&n){const t=e.XpG();e.Y8G("type",t.type())("shouldShowCounter",!1)("itemsName",t.translations.payeeLabel),e.R7$(),e.Y8G("payees",t.payees())("pageSize",t.pageSize())("isLoading",t.isLoading())("isEnd",t.isEnd())("disabled",t.isApproveRejectLoading())}}function jo(n,r){1&n&&(e.j41(0,"div",0),e.nrm(1,"bb-empty-state-ui",1),e.k0s()),2&n&&(e.R7$(),e.Y8G("headingLevel",3))}function ko(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-payee-category-section",5),e.bIt("paginationError",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.paginationError.emit(i))}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("approvalId",t.approvalId())("ids",t.addedIds())("initialPayees",t.addedInitialData())("pageSize",t.pageSize())("isApproveRejectLoading",t.isApproveRejectLoading())}}function Vo(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-payee-category-section",6),e.bIt("paginationError",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.paginationError.emit(i))}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("approvalId",t.approvalId())("ids",t.removedIds())("initialPayees",t.removedInitialData())("pageSize",t.pageSize())("isApproveRejectLoading",t.isApproveRejectLoading())}}function Uo(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-payee-category-section",7),e.bIt("paginationError",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.paginationError.emit(i))}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("approvalId",t.approvalId())("ids",t.unchangedIds())("initialPayees",t.unchangedInitialData())("pageSize",t.pageSize())("isApproveRejectLoading",t.isApproveRejectLoading())}}function $o(n,r){if(1&n&&(e.nVh(0,ko,1,5,"bb-payee-category-section",2),e.nVh(1,Vo,1,5,"bb-payee-category-section",3),e.nVh(2,Uo,1,5,"bb-payee-category-section",4)),2&n){const t=e.XpG();e.vxM(t.addedIds().length>0?0:-1),e.R7$(),e.vxM(t.removedIds().length>0?1:-1),e.R7$(),e.vxM(t.unchangedIds().length>0?2:-1)}}function zo(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-accessgroup-error",1),e.bIt("retryClick",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.retryFetch())}),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("httpError",t.error())("showRetryAction",!0)("retryActionText",t.translations.tryAgain)}}function Ho(n,r){if(1&n){const t=e.RV6();e.j41(0,"div",4)(1,"bb-cal-affected-users-alert",9),e.bIt("viewUsersClicked",function(){s.eBV(t);const i=e.XpG(2);return s.Njj(i.onViewAffectedUsersClick())}),e.k0s()()}if(2&n){const t=e.XpG(2);e.R7$(),e.Y8G("groupSubType",t.groupSubType())("canViewImpactedUsers",t.canViewImpactedUsers())}}function Xo(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-account-group-review-sections",10),e.bIt("sectionError",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.processResponseError(i))}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("details",t.details())("initialArrangementItems",t.initialArrangementItems())("showLegalEntitiesColumn",t.showLegalEntityName())("pageSize",t.pageSize)("isApproveRejectLoading",t.isApproveRejectLoading())}}function Ko(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-payee-group-review-sections",11),e.bIt("paginationError",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.processResponseError(i))}),e.k0s()}if(2&n){const t=e.XpG(2);
1e.Y8G("dataGroupDetails",t.details())("initialContactItemsResponses",t.initialContactItems())("pageSize",t.pageSize)("isApproveRejectLoading",t.isApproveRejectLoading())}}function Jo(n,r){if(1&n){const t=e.RV6();e.j41(0,"div",2),e.nrm(1,"bb-data-group-approval-sub-header",3),e.k0s(),e.nVh(2,Ho,2,2,"div",4),e.j41(3,"bb-cal-affected-users-modal",5),e.bIt("closeModal",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.affectedUsersStore.closeModal())})("search",function(i){s.eBV(t);const a=e.XpG();return s.Njj(a.affectedUsersStore.search(i))})("loadMore",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.affectedUsersStore.loadMore())})("retry",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.affectedUsersStore.retry())}),e.k0s(),e.nrm(4,"hr",6),e.nVh(5,Xo,1,5,"bb-account-group-review-sections",7),e.nVh(6,Ko,1,4,"bb-payee-group-review-sections",8)}if(2&n){const t=e.XpG();e.R7$(),e.Y8G("action",t.action())("oldState",t.details().oldState??null)("newState",t.details().newState??null)("dataGroupType",t.dataGroupType()),e.R7$(),e.vxM(t.showAlert()?2:-1),e.R7$(),e.Y8G("isOpen",t.affectedUsersStore.isOpen())("loading",t.affectedUsersStore.loading())("error",t.affectedUsersStore.error())("users",t.affectedUsersStore.users())("hasMorePages",t.affectedUsersStore.hasMorePages())("groupSubType",t.groupSubType()),e.R7$(2),e.vxM(t.isArrangementsType()?5:-1),e.R7$(),e.vxM(t.isContactsType()?6:-1)}}function Wo(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-accessgroup-error",1),e.bIt("retryClick",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.retryFetch())}),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("httpError",t.error())("showRetryAction",!0)("retryActionText",t.translations.tryAgain)}}function Yo(n,r){if(1&n){const t=e.RV6();e.j41(0,"div",5)(1,"bb-cal-affected-users-alert",9),e.bIt("viewUsersClicked",function(){s.eBV(t);const i=e.XpG(2);return s.Njj(i.onViewAffectedUsersClick())}),e.k0s()()}if(2&n){const t=e.XpG(2);e.R7$(),e.Y8G("groupSubType","job-role")("canViewImpactedUsers",t.canViewImpactedUsers())}}function Qo(n,r){if(1&n){const t=e.RV6();e.j41(0,"div",2),e.nrm(1,"bb-function-group-approval-sub-header",3),e.k0s(),e.j41(2,"div",2),e.nrm(3,"bb-cal-function-group-info-update",4),e.k0s(),e.nVh(4,Yo,2,2,"div",5),e.j41(5,"bb-cal-affected-users-modal",6),e.bIt("closeModal",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.affectedUsersStore.closeModal())})("loadMore",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.affectedUsersStore.loadMore())})("retry",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.affectedUsersStore.retry())}),e.k0s(),e.nrm(6,"hr",7),e.j41(7,"div"),e.nrm(8,"bb-cal-function-group-permission-matrix",8),e.k0s()}if(2&n){const t=e.XpG();e.R7$(),e.Y8G("action",t.functionGroupDetails().action)("oldState",t.functionGroupDetails().oldState??null)("newState",t.functionGroupDetails().newState??null)("functionGroupType",t.functionGroupDetails().functionGroupType??null),e.R7$(2),e.Y8G("action",t.transformedAction())("oldState",t.functionGroupDetails().oldState??null)("newState",t.functionGroupDetails().newState??null),e.R7$(),e.vxM(t.showAlert()?4:-1),e.R7$(),e.Y8G("isOpen",t.affectedUsersStore.isOpen())("loading",t.affectedUsersStore.loading())("error",t.affectedUsersStore.error())("users",t.affectedUsersStore.users())("groupSubType",t.affectedUsersStore.groupSubType())("hasMorePages",t.affectedUsersStore.hasMorePages()),e.R7$(3),e.Y8G("permissionMatrix",t.functionGroupDetails().permissionMatrix??void 0)("enableBfTooltipInfo",t.enableBfTooltipInfo())("bfTooltipInfoFunctionCodes",t.bfTooltipInfoFunctionCodes())}}function qo(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-accessgroup-error",11),e.bIt("retryClick",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.retryFetch())}),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("httpError",t.error())("showRetryAction",!0)("retryActionText",t.translations.tryAgain)}}function Zo(n,r){if(1&n){const t=e.RV6();e.j41(0,"div",15)(1,"bb-approval-log-wizard-current-permissions",32),e.bIt("jobRoleDetailOpen",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.openJobRoleDetailModal(i))})("accountGroupDetailOpen",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.openAccountGroupModal(i))})("payeeGroupDetailOpen",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.openPayeeGroupModal(i))}),e.k0s()()}if(2&n){const t=e.XpG(2);e.R7$(),e.Y8G("userCurrentPermissions",t.currentPermissions())("approvalLogWizardChangelog",t.wizardChangelog())}}function ei(n,r){if(1&n&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"number"),e.k0s()),2&n){const t=e.XpG(3);e.R7$(),e.SpI(" (",e.bMT(2,1,t.accountIds().length),")")}}function ti(n,r){if(1&n){const t=e.RV6();e.j41(0,"div",33)(1,"h4",34)(2,"span"),e.pXf(3,4),e.k0s(),e.nVh(4,ei,3,3,"span"),e.k0s()(),e.j41(5,"div",26)(6,"bb-approval-log-wizard-accounts",35),e.bIt("pageChange",function(){s.eBV(t);const i=e.XpG(2);return s.Njj(i.onAccountsPageChange())}),e.k0s()()}if(2&n){const t=e.XpG(2);e.R7$(4),e.vxM(t.accountIds().length?4:-1),e.R7$(2),e.Y8G("approvalLogWizardAccounts",t.accountsInfo())}}function ni(n,r){if(1&n){const t=e.RV6();e.j41(0,"div",28)(1,"bb-review-section",36)(2,"bb-cal-wizard-assigned-account-groups",37),e.bIt("groupActivate",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.onWizardGroupActivate(i))}),e.k0s()()()}if(2&n){const t=e.XpG(2);e.R7$(),e.Y8G("count",t.wizardAssignedGroups().length)("itemsName",t.accountGroupsSectionLabel)("sectionLabel",t.accountGroupsAddedLabel),e.R7$(),e.Y8G("groups",t.wizardAssignedGroups())("showTitle",!1)}}function oi(n,r){1&n&&e.nrm(0,"bb-badge-ui",41)}function ii(n,r){if(1&n&&(e.j41(0,"div",42),e.nrm(1,"bb-approval-log-wizard-limits",46),e.k0s()),2&n){const t=e.XpG(3);e.R7$(),e.Y8G("approvalLogWizardChangelogLimits",t.details().currentLimits[0].limit)("limitsBound",t.limitsBound())}}function ai(n,r){if(1&n&&(e.j41(0,"div",43)(1,"div",47),e.nrm(2,"bb-icon-ui",48),e.j41(3,"div",49),e.pXf(4,6),e.k0s(),e.nrm(5,"bb-badge-ui",50),e.k0s(),e.j41(6,"div",51),e.nrm(7,"bb-approval-log-wizard-limits",46),e.k0s()()),2&n){const t=e.XpG(3);e.R7$(7),e.Y8G("approvalLogWizardChangelogLimits",t.details().currentLimits[0].limit)("limitsBound",t.limitsBound())}}function si(n,r){if(1&n&&(e.j41(0,"div",44)(1,"div",47),e.nrm(2,"bb-icon-ui",20),e.j41(3,"div",21),e.pXf(4,7),e.k0s(),e.nrm(5,"bb-badge-ui",52),e.k0s(),e.j41(6,"div",53),e.nrm(7,"bb-approval-log-wizard-limits",46),e.k0s()()),2&n){const t=e.XpG(3);e.R7$(7),e.Y8G("approvalLogWizardChangelogLimits",t.details().newLimit)("limitsBound",t.limitsBound())}}function ri(n,r){1&n&&(e.j41(0,"div",45)(1,"div",26)(2,"div",54),e.nrm(3,"bb-icon-ui",5
15),e.j41(4,"div",56)(5,"h4",57),e.pXf(6,8),e.k0s(),e.j41(7,"p",58),e.pXf(8,9),e.k0s()()()()())}function li(n,r){if(1&n&&(e.j41(0,"div",38),e.nrm(1,"bb-icon-ui",39),e.j41(2,"h3",40),e.pXf(3,5),e.k0s(),e.nVh(4,oi,1,0,"bb-badge-ui",41),e.k0s(),e.nVh(5,ii,2,2,"div",42),e.nVh(6,ai,8,2,"div",43),e.nVh(7,si,8,2,"div",44),e.nVh(8,ri,9,0,"div",45)),2&n){let t,o,i,a;const l=e.XpG(2);e.R7$(4),e.vxM(!l.limitsModified()&&null!=(t=l.details())&&null!=t.currentLimits&&t.currentLimits.length?4:-1),e.R7$(),e.vxM(null==(o=l.details())||null==o.currentLimits||!o.currentLimits.length||l.limitsModified()||l.hasNewLimits()?-1:5),e.R7$(),e.vxM(null!=(i=l.details())&&null!=i.currentLimits&&i.currentLimits.length&&l.limitsModified()?6:-1),e.R7$(),e.vxM(l.hasNewLimits()?7:-1),e.R7$(),e.vxM(null!=(a=l.details())&&null!=a.currentLimits&&a.currentLimits.length||l.hasNewLimits()?-1:8)}}function ci(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-job-role-detail-modal",59),e.bIt("close",function(){s.eBV(t);const i=e.XpG(2);return s.Njj(i.closeJobRoleDetailModal())}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("jobRoleDetail",r)("serviceAgreementId",t.serviceAgreementId())("allBusinessFunctions",t.selectedJobRoleBusinessFunctions())("enableBfTooltipInfo",t.enableBfTooltipInfo())("bfTooltipInfoFunctionCodes",t.bfTooltipInfoFunctionCodes())}}function di(n,r){if(1&n){const t=e.RV6();e.j41(0,"div")(1,"div",12),e.nrm(2,"bb-icon-ui",13),e.j41(3,"h3",14),e.pXf(4,0),e.k0s()(),e.j41(5,"div",15),e.nrm(6,"bb-approval-log-wizard-user",16),e.k0s(),e.j41(7,"div",12),e.nrm(8,"bb-icon-ui",17),e.j41(9,"h3",14),e.pXf(10,1),e.k0s()(),e.nVh(11,Zo,2,2,"div",15),e.j41(12,"div",18)(13,"div",19),e.nrm(14,"bb-icon-ui",20),e.j41(15,"div",21),e.pXf(16,2),e.k0s(),e.nrm(17,"bb-badge-ui",22),e.k0s(),e.j41(18,"div",23)(19,"div",24)(20,"div",25)(21,"h4"),e.pXf(22,3),e.k0s()(),e.j41(23,"div",26)(24,"bb-approval-log-wizard-permissions",27),e.bIt("jobRoleDetailOpen",function(i){s.eBV(t);const a=e.XpG();return s.Njj(a.openJobRoleDetailModal(i))}),e.k0s()(),e.nVh(25,ti,7,2),e.k0s()(),e.nVh(26,ni,3,5,"div",28),e.k0s(),e.nVh(27,li,9,5),e.k0s(),e.nVh(28,ci,1,5,"bb-job-role-detail-modal",29),e.j41(29,"bb-account-group-items-modal",30),e.bIt("closed",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.closeAccountGroupModal())})("loadMore",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.onAccountGroupLoadMore())}),e.k0s(),e.j41(30,"bb-payee-group-items-modal",31),e.bIt("closed",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.closePayeeGroupModal())})("loadMore",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.onPayeeGroupLoadMore())}),e.k0s()}if(2&n){let t,o,i,a,l;const d=e.XpG();e.R7$(6),e.Y8G("approvalLogWizardUser",null==(t=d.transformedData())?null:t.primaryUser)("approvalLogWizardUserData",(null==(o=d.transformedData())?null:o.legalEntityData)??null)("externalUserId",null==(i=d.transformedData())||null==i.primaryUser?null:i.primaryUser.externalId),e.R7$(5),e.vxM(d.hasCurrentPermissions()&&null!=(a=d.transformedData())&&a.hasCurrentPermissions?11:-1),e.R7$(13),e.Y8G("approvalLogWizardJobRoles",d.newJobRoles())("approvalLogWizardChangelog",d.wizardChangelog())("enableBfTooltipInfo",d.enableBfTooltipInfo())("bfTooltipInfoFunctionCodes",d.bfTooltipInfoFunctionCodes())("handleJobRoleDetailExternally",!0),e.R7$(),e.vxM(d.showFlatAccountsSection()?25:-1),e.R7$(),e.vxM(d.wizardAssignedGroups().length?26:-1),e.R7$(),e.vxM(d.limitsStepVisible()?27:-1),e.R7$(),e.vxM((l=d.selectedJobRole())?28:-1,l),e.R7$(),e.Y8G("isOpen",d.isAccountGroupModalOpen())("accountGroupName",d.selectedAccountGroupName())("products",d.accountGroupModalProducts())("isLoading",d.accountGroupModalLoading())("isEnd",d.accountGroupModalIsEnd())("showLegalEntityName",d.showLegalEntityName())("availableLegalEntities",d.availableLegalEntities()),e.R7$(),e.Y8G("isOpen",d.isPayeeGroupModalOpen())("payeeGroupName",d.selectedPayeeGroupName())("payees",d.payeeGroupModalContacts())("isLoading",d.payeeGroupModalLoading())("isEnd",d.payeeGroupModalIsEnd())}}function pi(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-accessgroup-error",1),e.bIt("retryClick",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.retryFetch())}),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("httpError",t.error())("showRetryAction",!0)("retryActionText",t.translations.tryAgain)}}function _i(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-job-role-permissions-modal",7),e.bIt("closed",function(){s.eBV(t);const i=e.XpG(2);return s.Njj(i.onJobRoleModalClosed())}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("jobRole",t.modalStore.selectedJobRoleItem())("enableBfTooltipInfo",t.enableBfTooltipInfo())("bfTooltipInfoFunctionCodes",t.bfTooltipInfoFunctionCodes())}}function ui(n,r){if(1&n){const t=e.RV6();e.nrm(0,"bb-user-permissions-approval-subheader",2),e.j41(1,"bb-cal-user-permissions-review",3),e.bIt("jobRoleItem
1Clicked",function(i){s.eBV(t);const a=e.XpG();return s.Njj(a.openJobRoleModal(i))})("dataGroupItemClicked",function(i){s.eBV(t);const a=e.XpG();return s.Njj(a.openDataGroupModal(i))}),e.k0s(),e.nVh(2,_i,1,3,"bb-job-role-permissions-modal",4),e.j41(3,"bb-account-group-items-modal",5),e.bIt("closed",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.onAccountGroupModalClosed())})("loadMore",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.onAccountGroupLoadMore())}),e.k0s(),e.j41(4,"bb-payee-group-items-modal",6),e.bIt("closed",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.onPayeeGroupModalClosed())})("loadMore",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.onPayeeGroupLoadMore())}),e.k0s()}if(2&n){let t,o;const i=e.XpG(),a=e.r8f(0),l=e.r8f(1);e.Y8G("user",a),e.R7$(),e.Y8G("permissionsDetails",l)("user",a)("enableCAG",i.enableCAG()),e.R7$(),e.vxM(i.modalStore.selectedJobRoleItem()?2:-1),e.R7$(),e.Y8G("isOpen",!!i.modalStore.selectedAccountGroup())("accountGroupName",(null==(t=i.modalStore.selectedAccountGroup())?null:t.name)??"")("products",i.modalStore.accountGroupProducts())("isLoading",i.modalStore.accountGroupIsLoading())("isEnd",i.modalStore.accountGroupIsEnd())("showLegalEntityName",i.showLegalEntityName())("availableLegalEntities",i.availableLegalEntities()),e.R7$(),e.Y8G("isOpen",!!i.modalStore.selectedPayeeGroup())("payeeGroupName",(null==(o=i.modalStore.selectedPayeeGroup())?null:o.name)??"")("payees",i.modalStore.payeeGroupContacts())("isLoading",i.modalStore.payeeGroupIsLoading())("isEnd",i.modalStore.payeeGroupIsEnd())}}function mi(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-load-approval-items-button",3),e.bIt("loadMore",function(){s.eBV(t);const i=e.XpG(2);return s.Njj(i.onLoadMore())}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("isLoading",t.store.loading())("isEnd",!t.store.cursor())("disabled",t.isApproveRejectLoading())}}function gi(n,r){if(1&n&&(e.j41(0,"bb-review-section",0),e.nrm(1,"bb-service-agreement-admins-table",1),e.nVh(2,mi,1,3,"bb-load-approval-items-button",2),e.k0s()),2&n){const t=e.XpG();e.Y8G("type",t.sectionType())("shouldShowCounter",!1)("itemsName",t.adminsLabel),e.R7$(),e.Y8G("admins",t.store.users()),e.R7$(),e.vxM(t.store.users().length>=t.pageSize()?2:-1)}}function hi(n,r){1&n&&(e.j41(0,"div",0),e.nrm(1,"bb-empty-state-ui",2),e.k0s()),2&n&&(e.R7$(),e.Y8G("headingLevel",3))}function bi(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-admin-section",7),e.bIt("sectionError",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.sectionError.emit(i))}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("sectionType","added")("userIds",t.addedIds())("initialData",t.addedInitialData())("approvalId",t.approvalId())("pageSize",t.pageSize())("isApproveRejectLoading",t.isApproveRejectLoading())}}function Ai(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-admin-section",8),e.bIt("sectionError",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.sectionError.emit(i))}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("sectionType","removed")("userIds",t.removedIds())("initialData",t.removedInitialData())("approvalId",t.approvalId())("pageSize",t.pageSize())("isApproveRejectLoading",t.isApproveRejectLoading())}}function fi(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-admin-section",9),e.bIt("sectionError",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.sectionError.emit(i))}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("sectionType","unchanged")("userIds",t.unchangedIds())("initialData",t.unchangedInitialData())("approvalId",t.approvalId())("pageSize",t.pageSize())("isApproveRejectLoading",t.isApproveRejectLoading())}}function vi(n,r){if(1&n&&(e.j41(0,"bb-accordion",1),e.nrm(1,"bb-icon-ui",3),e.nVh(2,bi,1,6,"bb-admin-section",4),e.nVh(3,Ai,1,6,"bb-admin-section",5),e.nVh(4,fi,1,6,"bb-admin-section",6),e.k0s()),2&n){const t=e.XpG();e.Y8G("title",t.adminsLabel)("initiallyOpened",!0)("dataRole","admins-header"),e.R7$(2),e.vxM(t.addedIds().length?2:-1),e.R7$(),e.vxM(t.removedIds().length?3:-1),e.R7$(),e.vxM(t.unchangedIds().length?4:-1)}}function Ci(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-accessgroup-error",1),e.bIt("retryClick",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.retryFetch())}),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("httpError",t.error())("retryActionText",t.tryAgainLabel)("showRetryAction",!0)}}function Ei(n,r){if(1&n){const t=e.RV6();e.j41(0,"div",2)(1,"div",3),e.nrm(2,"bb-service-agreement-header-card",4),e.k0s(),e.nrm(3,"bb-service-agreement-review-sub-header",5),e.k0s(),e.nrm(4,"hr",6)(5,"bb-legal-entities-review",7),e.j41(6,"bb-admin-review-sections",8),e.bIt("sectionError",function(i){s.eBV(t);const a=e.XpG();return s.Njj(a.processResponseError(i))}),e.k0s()}if(2&n){const t=e.XpG();e.R7$(2),e.Y8G("serviceAgreement",t.oldSaItem()??t.newSaItem())("showDisabledState",!0),e.R7$(),e.Y8G("newDetails",t.newSaItem())("oldDetails",t.oldSaItem()),e.R7$(2),e.Y8G("participantsAdded",t.participantDiff().added)("participantsRemoved",t.participantDiff().removed)("participantsMo
1dified",t.participantDiff().modified)("participantsUnchanged",t.participantDiff().unchanged),e.R7$(),e.Y8G("details",t.details())("initialUserItems",t.initialAdminData())("pageSize",t.pageSize())("isApproveRejectLoading",t.isApproveRejectLoading())}}const Ie=n=>({error:n});function Si(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-entitlements-table",6),e.bIt("selectItem",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.selectApproval(i))}),e.k0s(),e.j41(1,"bb-load-approval-items-button",7),e.bIt("loadMore",function(){s.eBV(t);const i=e.XpG(2);return s.Njj(i.loadMore())}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("tableData",t.tableAccessControlData)("selectedServiceAgreements",t.serviceAgreements),e.R7$(),e.Y8G("isLoading",t.accessControlSearch.isLoading())("isEnd",t.accessControlSearch.isEnd())}}function Di(n,r){1&n&&e.nrm(0,"bb-loading-indicator-ui",3)}function Mi(n,r){if(1&n&&e.nrm(0,"bb-accessgroup-error",4),2&n){const t=e.XpG().error;e.Y8G("httpError",t)("headingLevel",2)}}function Li(n,r){1&n&&(e.j41(0,"div",5),e.nrm(1,"bb-approval-items-resolved",8),e.k0s())}function Ti(n,r){if(1&n&&(e.nVh(0,Si,2,4),e.nVh(1,Di,1,0,"bb-loading-indicator-ui",3),e.nVh(2,Mi,1,2,"bb-accessgroup-error",4),e.nVh(3,Li,2,0,"div",5)),2&n){const t=r.error,o=e.XpG();e.vxM(o.tableAccessControlData.length&&!t?0:-1),e.R7$(),e.vxM(o.accessControlSearch.isLoading()&&!o.tableAccessControlData.length?1:-1),e.R7$(),e.vxM(t?2:-1),e.R7$(),e.vxM(o.accessControlSearch.isLoading()||o.tableAccessControlData.length||t?-1:3)}}function Ni(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-data-groups-container",16),e.bIt("isContentLoaded",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.isContainerContentLoaded.set(i))})("affectedSaName",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.affectedSaName.set(i))})("errorOccurred",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.error.set(i))}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("approvalId",t.selectedApprovalData.id)("isApproveRejectLoading",t.isApproveRejectLoading())}}function Ii(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-function-groups-container",17),e.bIt("isContentLoaded",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.isContainerContentLoaded.set(i))})("affectedSaName",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.affectedSaName.set(i))})("errorOccurred",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.error.set(i))}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("approvalId",t.selectedApprovalData.id)("enableBfTooltipInfo",t.enableBfTooltipInfo())("bfTooltipInfoFunctionCodes",t.bfTooltipInfoFunctionCodes())}}function Oi(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-quick-user-setup-container",18),e.bIt("isContentLoaded",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.isContainerContentLoaded.set(i))})("affectedSaName",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.affectedSaName.set(i))})("errorOccurred",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.error.set(i))}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("approvalId",t.selectedApprovalData.id)("showLegalEntityName",t.showLegalEntityName())("enableBfTooltipInfo",t.enableBfTooltipInfo())("bfTooltipInfoFunctionCodes",t.bfTooltipInfoFunctionCodes())("limitsStepVisible",t.limitsStepVisible())}}function yi(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-user-permissions-container",19),e.bIt("isContentLoaded",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.isContainerContentLoaded.set(i))})("affectedSaName",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.affectedSaName.set(i))})("errorOccurred",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.error.set(i))}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("approvalId",t.selectedApprovalData.id)("isApproveRejectLoading",t.isApproveRejectLoading())("showLegalEntityName",t.showLegalEntityName())("enableBfTooltipInfo",t.enableBfTooltipInfo())("bfTooltipInfoFunctionCodes",t.bfTooltipInfoFunctionCodes())("enableCAG",t.enableCAG())}}function Ri(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-service-agreement-container",20),e.bIt("isContentLoaded",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.isContainerContentLoaded.set(i))})("affectedSaName",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.affectedSaName.set(i))})("errorOccurred",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.error.set(i))}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("approvalId",t.selectedApprovalData.id)("isApproveRejectLoading",t.isApproveRejectLoading())}}function Fi(n,r){if(1&n&&(e.j41(0,"p",15),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(),e.JRh(t.translations.fallbackMessage)}}function Gi(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-cal-detail-view-modal",9),e.bIt("closeModal",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.onCloseModal())})("approve",function(i){s.eBV(t);const a=e.XpG();return s.Njj(a.approve(i))})("reject",function(i){s.eBV(t);const a=e.XpG();return s.Njj(a.reject(i))}),e.nVh(1,Ni,1,2,"bb-data-groups-container",10)(2,Ii,1,3,"bb-function-groups-container",11)(3,Oi,1,5,"bb-quick-user-setup-container",12)(4,yi,1,6,"bb-user-permissions-container",13)(5,Ri,1,2,"bb-service-agreement-container",14)(6,Fi,2,1,"p",15),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("isContentLoaded",t.isContainerContentLoaded())("affectedSaName",t.affectedSaName())("approvalDetails",t.selectedApprovalData)("approveLoading",t.isApproveLoading())("rejectLoading",t.isRejectLoading())("enableComment",t.enableComment())("error",t.error()),e.R7$(),e.vxM(t.selectedApprovalData.functionCode===t.FunctionCode.ManageDataGroups?1:t.selectedApprovalData.functionCode===t.FunctionCode.ManageFunctionGroups?2:t.selectedApprovalData.functionCode===t.FunctionCode.QuickUserSetup?3:t.selectedApprovalData.functionCode===t.FunctionCode.AssignPermissions||t.selectedApprovalData.functionCode===t.FunctionCode.ManageSelfApprovePermissions?4:t.selectedApprovalData.functionCode===t.FunctionCode.ManageServiceAgreements?5:6)}}function Bi(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-entitlements-table",6),e.bIt("selectItem",function(i){s.eBV(t);const a=e.XpG(2);
1return s.Njj(a.selectApproval(i))}),e.k0s(),e.j41(1,"bb-load-approval-items-button",7),e.bIt("loadMore",function(){s.eBV(t);const i=e.XpG(2);return s.Njj(i.loadMore())}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("tableData",t.tableApprovalsData)("selectedServiceAgreements",t.serviceAgreements),e.R7$(),e.Y8G("isLoading",t.approvalsSearch.isLoading())("isEnd",t.approvalsSearch.isEnd())}}function xi(n,r){1&n&&e.nrm(0,"bb-loading-indicator-ui",3)}function Pi(n,r){if(1&n&&e.nrm(0,"bb-accessgroup-error",4),2&n){const t=e.XpG().error;e.Y8G("httpError",t)("headingLevel",2)}}function wi(n,r){1&n&&(e.j41(0,"div",5),e.nrm(1,"bb-approval-items-resolved",8),e.k0s())}function ji(n,r){if(1&n&&(e.nVh(0,Bi,2,4),e.nVh(1,xi,1,0,"bb-loading-indicator-ui",3),e.nVh(2,Pi,1,2,"bb-accessgroup-error",4),e.nVh(3,wi,2,0,"div",5)),2&n){const t=r.error,o=e.XpG();e.vxM(o.tableApprovalsData.length&&!t?0:-1),e.R7$(),e.vxM(o.approvalsSearch.isLoading()&&!o.tableApprovalsData.length?1:-1),e.R7$(),e.vxM(t?2:-1),e.R7$(),e.vxM(o.approvalsSearch.isLoading()||o.tableApprovalsData.length||t?-1:3)}}function ki(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-approvals-detail-view",9),e.bIt("dismiss",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.closeModal())}),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("approval",t.selectedApprovalData)("enableComment",t.enableComment())("defaultZero",t.defaultZero())("pendingApprovalsHandling",t.pendingApprovalsHandling())("complexBF",t.complexBF())}}function Vi(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-entitlements-table",6),e.bIt("selectItem",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.selectLimit(i))}),e.k0s(),e.j41(1,"bb-load-approval-items-button",7),e.bIt("loadMore",function(){s.eBV(t);const i=e.XpG(2);return s.Njj(i.loadMore())}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("tableData",t.tableLimitsData)("selectedServiceAgreements",t.serviceAgreements),e.R7$(),e.Y8G("isLoading",t.limitsSearch.isLoading())("isEnd",t.limitsSearch.isEnd())}}function Ui(n,r){1&n&&e.nrm(0,"bb-loading-indicator-ui",2)}function $i(n,r){if(1&n&&e.nrm(0,"bb-accessgroup-error",3),2&n){const t=e.XpG().error;e.Y8G("httpError",t)("headingLevel",2)}}function zi(n,r){1&n&&(e.j41(0,"div",4),e.nrm(1,"bb-approval-items-resolved",8),e.k0s())}function Hi(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-limits-detail-view",9),e.bIt("dismiss",function(){s.eBV(t);const i=e.XpG(2);return s.Njj(i.closeModal())}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("limit",t.selectedLimitData)("enableComment",t.enableComment())}}function Xi(n,r){if(1&n&&(e.nVh(0,Vi,2,4),e.nVh(1,Ui,1,0,"bb-loading-indicator-ui",2),e.nVh(2,$i,1,2,"bb-accessgroup-error",3),e.nVh(3,zi,2,0,"div",4),e.nVh(4,Hi,1,2,"bb-limits-detail-view",5)),2&n){const t=r.error,o=e.XpG();e.vxM(o.tableLimitsData.length&&!t?0:-1),e.R7$(),e.vxM(o.limitsSearch.isLoading()&&!o.tableLimitsData.length?1:-1),e.R7$(),e.vxM(t?2:-1),e.R7$(),e.vxM(o.limitsSearch.isLoading()||o.tableLimitsData.length||t?-1:3),e.R7$(),e.vxM(o.isLimitsDetailedViewModalOpen?4:-1)}}const Ki=(n,r,t,o)=>({approvalsCounter:n,limitsCounter:r,accessControlCounter:t,selectedTabType:o});function Ji(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-alert-ui",8)(1,"div",9)(2,"div",10)(3,"strong",11),e.pXf(4,2),e.k0s(),e.j41(5,"div",12),e.pXf(6,3),e.k0s()(),e.j41(7,"div",13)(8,"button",14),e.bIt("click",function(){s.eBV(t);const i=e.XpG(2);return s.Njj(i.reloadView())}),e.pXf(9,4),e.k0s()()()()}}function Wi(n,r){if(1&n&&(e.j41(0,"span",17),e.EFF(1),e.k0s()),2&n){const t=e.XpG(3).approvalsCounter;e.R7$(),e.SpI("(",t,")")}}function Yi(n,r){if(1&n&&(e.j41(0,"span",18),e.EFF(1),e.k0s()),2&n){const t=e.XpG(3).limitsCounter;e.R7$(),e.SpI("(",t,")")}}function Qi(n,r){if(1&n&&(e.j41(0,"span",19),e.EFF(1),e.k0s()),2&n){const t=e.XpG(3).accessControlCounter;e.R7$(),e.SpI("(",t,")")}}function qi(n,r){if(1&n&&(e.j41(0,"bb-tab-ui")(1,"div",9)(2,"div",16),e.EFF(3),e.k0s(),e.nVh(4,Wi,2,1,"span",17),e.nVh(5,Yi,2,1,"span",18),e.nVh(6,Qi,2,1,"span",19),e.k0s()()),2&n){const t=r.$implicit,o=e.XpG(2),i=o.approvalsCounter,a=o.limitsCounter,l=o.accessControlCounter,d=e.XpG();e.R7$(3),e.SpI(" ",t.name," "),e.R7$(),e.vxM(t.key===d.consolidatedApprovalsTabs.Approvals&&i>0?4:-1),e.R7$(),e.vxM(t.key===d.consolidatedApprovalsTabs.Limits&&a>0?5:-1),e.R7$(),e.vxM(t.key===d.consolidatedApprovalsTabs.AccessControl&&l>0?6:-1)}}function Zi(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-approvals-container",21),e.bIt("checkCounter",function(i){s.eBV(t);const a=e.XpG(4);return s.Njj(a.checkTabCounter(i))}),e.k0s()}if(2&n){const t=e.XpG(4);e.Y8G("pageSize",t.pageSize())("currentTabIndex",t.selectedTabIndex)("businessFunctions",t.businessFunctions)("selectedServiceAgreements",t.selectedServiceAgreements())("enableComment",t.enableComment())("defaultZero",t.defaultZero())("pendingApprovalsHandling",t.pendingApprovalsHandling())("complexBF",t.complexBF())}}function ea(n,r){1&n&&e.eu8(0)}function ta(n,r){if(1&n&&e.DNE(0,ea,1,0,"ng-container",22),2&n){e.XpG(4);const t=e.sdS(8);e.Y8G("ngTemplateOutlet",t)}}
1function na(n,r){if(1&n&&e.nVh(0,Zi,1,8,"bb-approvals-container",20)(1,ta,1,1,"ng-container"),2&n){const t=e.XpG(2).approvalsCounter;e.vxM(t>0?0:1)}}function oa(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-limits-container",24),e.bIt("checkCounter",function(i){s.eBV(t);const a=e.XpG(4);return s.Njj(a.checkTabCounter(i))}),e.k0s()}if(2&n){const t=e.XpG(4);e.Y8G("pageSize",t.pageSize())("currentTabIndex",t.selectedTabIndex)("businessFunctions",t.businessFunctions)("selectedServiceAgreements",t.selectedServiceAgreements())("enableComment",t.enableComment())}}function ia(n,r){1&n&&e.eu8(0)}function aa(n,r){if(1&n&&e.DNE(0,ia,1,0,"ng-container",22),2&n){e.XpG(4);const t=e.sdS(8);e.Y8G("ngTemplateOutlet",t)}}function sa(n,r){if(1&n&&e.nVh(0,oa,1,5,"bb-limits-container",23)(1,aa,1,1,"ng-container"),2&n){const t=e.XpG(2).limitsCounter;e.vxM(t>0?0:1)}}function ra(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-access-control-container",26),e.bIt("checkCounter",function(i){s.eBV(t);const a=e.XpG(4);return s.Njj(a.checkTabCounter(i))}),e.k0s()}if(2&n){const t=e.XpG(4);e.Y8G("pageSize",t.pageSize())("currentTabIndex",t.selectedTabIndex)("businessFunctions",t.businessFunctions)("selectedServiceAgreements",t.selectedServiceAgreements())("enableComment",t.enableComment())("enableBfTooltipInfo",t.enableBfTooltipInfo())("bfTooltipInfoFunctionCodes",t.bfTooltipInfoFunctionCodes())("enableCAG",t.enableCAG())("limitsStepVisible",t.limitsStepVisible())("notificationDismissTime",t.notificationDismissTime())}}function la(n,r){1&n&&e.eu8(0)}function ca(n,r){if(1&n&&e.DNE(0,la,1,0,"ng-container",22),2&n){e.XpG(4);const t=e.sdS(8);e.Y8G("ngTemplateOutlet",t)}}function da(n,r){if(1&n&&e.nVh(0,ra,1,10,"bb-access-control-container",25)(1,ca,1,1,"ng-container"),2&n){const t=e.XpG(2).accessControlCounter;e.vxM(t>0?0:1)}}function pa(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-tab-group-ui",15),e.bIt("select",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.switchTab(i))}),e.Z7z(1,qi,7,4,"bb-tab-ui",null,e.fX1),e.k0s(),e.nVh(3,na,2,1),e.nVh(4,sa,2,1),e.nVh(5,da,2,1)}if(2&n){const t=e.XpG().selectedTabType,o=e.XpG();e.Y8G("initialSelection",o.selectedTabIndex),e.R7$(),e.Dyx(o.subTabs),e.R7$(2),e.vxM(t===o.consolidatedApprovalsTabs.Approvals?3:-1),e.R7$(),e.vxM(t===o.consolidatedApprovalsTabs.Limits?4:-1),e.R7$(),e.vxM(t===o.consolidatedApprovalsTabs.AccessControl?5:-1)}}function _a(n,r){if(1&n&&(e.j41(0,"div",6)(1,"div",7),e.nVh(2,Ji,10,0,"bb-alert-ui",8),e.nI1(3,"async"),e.nVh(4,pa,6,4),e.k0s()()),2&n){const t=e.XpG();e.R7$(2),e.vxM(e.bMT(3,2,t.showNotificationBanner$)?2:-1),e.R7$(2),e.vxM(t.subTabs.length?4:-1)}}function ua(n,r){1&n&&e.nrm(0,"bb-approval-items-resolved",27)}function ma(n,r){if(1&n&&(e.PLo(0,0,1),e.nrm(1,"span",14)(2,"span"),e.YFu()),2&n){const t=e.XpG(4);e.R7$(2),e.uP7(t.serviceAgreements.length),e.nnv(0)}}function ga(n,r){if(1&n){const t=e.RV6();e.j41(0,"div",13)(1,"bb-input-checkbox-ui",15),e.nI1(2,"invokeFunction"),e.nI1(3,"invokeFunction"),e.bIt("change",function(i){s.eBV(t);const a=e.XpG(4);return s.Njj(a.changeItemsSelection(i))}),e.k0s(),e.j41(4,"span",16),e.pXf(5,1),e.k0s()()}if(2&n){const t=e.XpG(4);e.R7$(),e.Y8G("ngModel",e.brH(2,2,t.switcherService.selectedServiceAgreements,t.isEveryItemSelected,t.serviceAgreements))("indeterminate",e.brH(3,6,t.switcherService.selectedServiceAgreements,t.isSomeItemsSelected,t.serviceAgreements))}}function ha(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-service-agreement-item",19),e.bIt("selectItem",function(i){s.eBV(t);const a=e.XpG().$implicit,l=e.XpG(4);return s.Njj(l.selectItem(i,a))}),e.k0s()}if(2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.Y8G("counter",t.count)("name",t.serviceAgreementName)("isSelected",t.isSelected)("isCurrent",t.serviceAgreementId===o.currentServiceAgreement.serviceAgreementId),e.BMQ("data-role",t.isContextSA?"current-service-agreement-item":"service-agreement-item")}}function ba(n,r){if(1&n&&e.nrm(0,"bb-service-agreement-item",18),2&n){const t=e.XpG().$implicit;e.Y8G("counter",t.count)("name",t.serviceAgreementName)("isSelected",!1)("isCurrent",!0)}}function Aa(n,r){1&n&&e.nVh(0,ha,1,5,"bb-service-agreement-item",17)(1,ba,1,4,"bb-service-agreement-item",18),2&n&&e.vxM(r.$implicit.count>0?0:1)}function fa(n,r){if(1&n&&(e.j41(0,"div",9)(1,"span",11),e.PLo(2,0),e.nrm(3,"span"),e.nVh(4,ma,3,1),e.nrm(5,"span",12)(6,"span"),e.YFu(),e.k0s(),e.nVh(7,ga,6,10,"div",13),e.Z7z(8,Aa,2,1,null,null,e.fX1),e.k0s()),2&n){const t=e.XpG(3);e.R7$(4),e.vxM(t.switcherService.searchText.length?4:-1),e.R7$(2),e.uP7(t.switcherService.serviceAgreementsAmount),e.nnv(2),e.R7$(),e.vxM(t.serviceAgreements.length?7:-1),e.R7$(),e.Dyx(t.serviceAgreements)}}function va(n,r){1&n&&e.nrm(0,"bb-empty-search-results",10)}function Ca(n,r){if(1&n&&(e.j41(0,"div",8),e.nVh(1,fa,10,3,"div",9),e.nVh(2,va,1,0,"bb-empty-search-results",10),e.k0s()),2&n){const t=e.XpG(2);e.AVh("bb-stack__item",t.showFullScreenModal())("bb-stack__item--fill",t.showFullScreenModal())("bb-block--full-width",t.showFullScreenModal()),e.R7$(),e.vxM(!t.switcherService.searchText||t.serviceAgreements.length?1:-1),e.R7$(),e.vxM(t.switcherService.searchText&&!t.serviceAgreements.length?2:-1)}}function Ea(n,r){if(1&n&&(e.j41(0,"div",20),e.nrm(1,"bb-loading-indicator-ui",21),e.k0s()),2&n){const t=e.XpG(2);e.AVh("bb-stack__item",t.showFullScreenModal())("bb-stack__item--fill",t.showFullScreenModal())}}function Sa(n,r){if(1&n){const t=e.RV6();e.j41(0,"div",7)(1,"button",22),e.bIt("click",function(){s.eBV(t);const i=e.XpG(2);return s.Njj(i.apply())}),e.j41(2,"span"),e.pXf(3,2),e.k0s()()()}if(2&n){const t=e.XpG(2);e.R7$(),e.Y8G("disabled",!t.switcherService.selectedServiceAgreements.length||t.isApplyDisabled)}}function Da(n,r){if(1&n&&(e.j41(0,"div"),e.nrm(1,"bb-search-box",4),e.nV
1h(2,Ca,3,8,"div",5)(3,Ea,2,4,"div",6),e.nVh(4,Sa,4,1,"div",7),e.k0s()),2&n){const t=e.XpG();e.HbH(t.showFullScreenModal()?"bb-stack bb-stack--vertical bb-stack--align-top bb-stack--density-none bb-sa-switcher--body-fill":null),e.R7$(),e.Y8G("searchControl",t.searchControl)("serviceAgreements",t.serviceAgreements),e.R7$(),e.vxM(t.isLoading()?3:2),e.R7$(2),e.vxM(t.showFullScreenModal()?-1:4)}}const he_approved=" ",he_rejected=" ",he_approved_fail=" ",he_rejected_fail=" ";let tt=(()=>{class n{constructor(){this.strategyToken=(0,c.hFB)(),this.headerToken=(0,c.hFB)(),this.detailsToken=(0,c.hFB)(),this.pageSize=c.hFB.required(),this.businessFunctions=(0,c.hFB)([]),this.enableComment=(0,c.hFB)(!1),this.selectedServiceAgreements=(0,c.hFB)([]),this.checkCounter=(0,c.CGW)(),this.isApproving=!1,this.isRejecting=!1,this.tableCustomData=[],this.customData=[],this.serviceAgreements=[],this.isCustomDetailedViewModalOpen=!1,this.entitlementsService=(0,s.WQX)(u.Y5),this.destroyRef=(0,s.WQX)(s.abz),this.injector=(0,s.WQX)(s.zZn),this.notificationService=(0,s.WQX)(ae.JE),this.translationsService=(0,s.WQX)(v.CKB),(0,s.QZP)(()=>{this.selectedServiceAgreements(),this.refreshCustomItems()})}ngOnInit(){const t=this.strategyToken();t&&(this.customSearch=this.injector.get(t)),this.error$=this.customSearch.error$}refreshCustomItems(){this.selectedServiceAgreements().length&&(this.serviceAgreements=[...this.selectedServiceAgreements()],this.customSearch.clearCursor(),this.getCustomItems())}selectCustom(t){const o=this.customData[t];this.selectedCustomData={...o,detailedApproval:{...o.pendingApproval.approval,policy:o.pendingApproval.policy}},this.isCustomDetailedViewModalOpen=!0}loadMore(){this.customSearch.getCustomApprovalLog(this.pageSize(),this.businessFunctions(),this.serviceAgreements.map(t=>t.serviceAgreementId)).pipe((0,z.s)(1),(0,L.pQ)(this.destroyRef),(0,T.M)(t=>{this.customData=[...this.customData,...t.customData]}),(0,y.T)(t=>(0,u.Yt)(t.customData))).subscribe(t=>{this.tableCustomData=[...this.tableCustomData,...t],this.customSearch.isEnd&&this.checkCounter.emit(this.customData.length)})}getCustomItems(){this.customData=[],this.tableCustomData=[],this.customSearch.getCustomApprovalLog(this.pageSize(),this.businessFunctions(),this.serviceAgreements.map(t=>t.serviceAgreementId)).pipe((0,z.s)(1),(0,L.pQ)(this.destroyRef),(0,T.M)(t=>{this.customData=[...t.customData]}),(0,y.T)(t=>(0,u.Yt)(t.customData))).subscribe(t=>{this.tableCustomData=[...t],this.customSearch.isEnd&&this.checkCounter.emit(this.customData.length)})}closeModal(){this.isCustomDetailedViewModalOpen=!1,this.customSearch.clearCursor(),this.entitlementsService.reloadServiceAgreements()}approve(){const t=this.selectedCustomData?.pendingApproval?.approval?.id,o=this.translationsService.getBusinessFunctionName(this.selectedCustomData?.pendingApproval?.approval?.functionCode)??this.selectedCustomData?.pendingApproval?.approval?.function;t&&(this.isApproving=!0,this.customSearch.approve(t).pipe((0,L.pQ)(this.destroyRef),(0,P.j)(()=>this.isApproving=!1)).subscribe({next:()=>{this.notificationService.showNotification({header:o+" "+he_approved,message:"",modifier:"success",ttl:5e3}),this.closeModal()},error:()=>{this.notificationService.showNotification({header:o+" "+he_approved_fail,message:"",modifier:"error",ttl:5e3})}}))}reject(){const t=this.selectedCustomData?.pendingApproval?.approval?.id,o=this.translationsService.getBusinessFunctionName(this.selectedCustomData?.pendingApproval?.approval?.functionCode)??this.selectedCustomData?.pendingApproval?.approval?.function;t&&(this.isRejecting=!0,this.customSearch.reject(t).pipe((0,L.pQ)(this.destroyRef),(0,P.j)(()=>this.isRejecting=!1)).subscribe({next:()=>{this.notificationService.showNotification({header:o+" "+he_rejected,message:"",modifier:"success",ttl:5e3}),this.closeModal()},error:()=>{this.notificationService.showNotification({header:o+" "+he_rejected_fail,message:"",modifier:"error",ttl:5e3})}}))}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-custom-cal-container"]],inputs:{strategyToken:[1,"strategyToken"],headerToken:[1,"headerToken"],detailsToken:[1,"detailsToken"],pageSize:[1,"pageSize"],businessFunctions:[1,"businessFunctions"],enableComment:[1,"enableComment"],selectedServiceAgreements:[1,"selectedServiceAgreements"]},outputs:{checkCounter:"checkCounter"},decls:7,vars:8,consts:()=>{let t,o,i;return t="Chargement...",o=" Inititi\xE9 par " + "\ufffd#5\ufffd" + " " + "\ufffd0\ufffd" + " " + "\ufffd/#5\ufffd" + "" + "\ufffd#6\ufffd" + "" + "\ufffd/#6\ufffd" + "",i=" ",[["closeModalButton",""],o,["loader
1Size","sm","data-role","loading-indicator","text",t],[3,"httpError","headingLevel"],["data-role","all-limit-items-approved"],["data-role","limits-table",3,"selectItem","tableData","selectedServiceAgreements"],["data-role","load-more-button",3,"loadMore","isLoading","isEnd"],["data-role","all-items-approved"],["data-role","approvals-detail-view-modal",3,"cancel","modalOptions","isOpen"],["bbCustomModalBody",""],[1,"bb-block","bb-block--xs","bb-stack"],[3,"extensionToken","data"],[4,"ngTemplateOutlet"],["data-role","approval-log-details-header-subtitle",1,"bb-block","bb-block--xs"],[3,"dateTime"],[3,"approve","reject","approvalDetails","approveLoading","rejectLoading"],[1,"bb-stack__item","bb-stack__item--push-right","bb-stack__item--align-top"],["bbButton","","color","dark","buttonSize","sm","aria-label",i,"data-role","approval-log-details-header-close-button",3,"click","circle"],["name","clear"]]},template:function(o,i){if(1&o&&(e.SS7(0),e.nI1(1,"async"),e.nVh(2,So,2,4),e.nVh(3,Do,1,0,"bb-loading-indicator-ui",2),e.nVh(4,Mo,1,2,"bb-accessgroup-error",3),e.nVh(5,Lo,2,0,"div",4),e.nVh(6,Oo,5,3)),2&o){const a=e.bH3(e.bMT(1,5,i.error$));e.R7$(2),e.vxM(i.tableCustomData.length&&!a?2:-1),e.R7$(),e.vxM(i.customSearch.isLoading&&!i.tableCustomData.length?3:-1),e.R7$(),e.vxM(a?4:-1),e.R7$(),e.vxM(i.customSearch.isLoading||i.tableCustomData.length||a?-1:5),e.R7$(),e.vxM(i.isCustomDetailedViewModalOpen?6:-1)}},dependencies:[ge,J,N.m,N.T,oe,b.OY,b.lW9,C.Q_,C.zf,C.Jy,C.GI,It.c5,b.WS4,so,ro,O.MD,O.T3,b.yxh,j.tm,j._f,R.o,R.R,ae.CF,O.Jj],encapsulation:2})}}return n})();const Ma={accounts:"Comptes"};let La=(()=>{class n{constructor(){this.sectionType=c.hFB.required(),this.accountIds=c.hFB.required(),this.approvalId=c.hFB.required(),this.pageSize=(0,c.hFB)(10),this.saParticipants=(0,c.hFB)([]),this.showLegalEntityName=(0,c.hFB)(!0),this.initialData=(0,c.hFB)(null),this.isApproveRejectLoading=(0,c.hFB)(!1),this.sectionError=(0,c.CGW)(),this.paginatedAccounts=(0,s.vPA)([]),this.paginatedCursor=(0,s.vPA)(null),this.mappedInitialAccounts=(0,_.EW)(()=>(this.initialData()?.items??[]).map(this.mapToProductSummaryItem)),this.accounts=(0,_.EW)(()=>[...this.mappedInitialAccounts(),...this.paginatedAccounts()]),this.cursor=(0,_.EW)(()=>{const t=this.initialData();if(t&&!((t.items?.length??0)<this.pageSize()))return this.paginatedCursor()??t.nextPage??void 0}),this.isLoading=(0,s.vPA)(!1),this.isEnd=(0,s.vPA)(!1),this.isEmpty=(0,_.EW)(()=>0===this.accounts().length),this.translations=Ma,this.loadMoreTrigger$=new $.B,this.cancelRequest$=new $.B,this.detailsService=(0,s.WQX)(K),(0,s.QZP)(()=>{this.isApproveRejectLoading()&&(this.cancelRequest$.next(),this.isLoading.set(!1))}),this.loadMoreTrigger$.pipe((0,w.n)(()=>(this.isLoading.set(!0),this.detailsService.fetchArrangements(this.approvalId(),this.accountIds(),this.pageSize(),this.cursor()).pipe((0,te.Q)(this.cancelRequest$),(0,T.M)(t=>{const o=(t.items??[]).map(this.mapToProductSummaryItem);this.paginatedAccounts.update(a=>[...a,...o]);const i=o.length<this.pageSize()||t.nextPage===this.cursor();this.paginatedCursor.set(i?null:t.nextPage),this.isEnd.set(i)}),(0,F.W)(t=>(this.sectionError.emit(t),(0,ee.of)(void 0))),(0,P.j)(()=>{this.isLoading.set(!1)})))),(0,L.pQ)()).subscribe()}onLoadMore(){this.isLoading()||this.isEnd()||this.loadMoreTrigger$.next()}mapToProductSummaryItem(t){return{id:t.id,legalEntityIds:t.legalEntityIds,debitCards:[],displayName:t.name,name:t.name,IBAN:t.IBAN,BBAN:t.BBAN,productKindName:t.productKindName,currency:t.currency,productNumber:t.productNumber,number:t.number,productTypeName:t.productTypeName}}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-account-group-section"]],inputs:{sectionType:[1,"sectionType"],accountIds:[1,"accountIds"],approvalId:[1,"approvalId"],pageSize:[1,"pageSize"],saParticipants:[1,"saParticipants"],showLegalEntityName:[1,"showLegalEntityName"],initialData:[1,"initialData"],isApproveRejectLoading:[1,"isApproveRejectLoading"]},outputs:{sectionError:"sectionError"},features:[e.Jv_([K])],decls:1,vars:1,consts:[[3,"type","shouldShowCounter","itemsName"],[3,"products","showLegalEntityName","availableLegalEntities"],[3,"isLoading","isEnd","disabled"],[3,"loadMore","isLoading","isEnd","disabled"]],template:function(o,i){1&o&&e.nVh(0,Ro,3,7,"bb-review-section",0),2&o&&e.vxM(i.accounts().length>0?0:-1)},dependencies:[b.Vnm,b.IYk,J],encapsulation:2,changeDetection:0})}}return n})(),Ta=(()=>{class n{constructor(){this.details=(0,c.hFB)(),this.initialArrangementItems=c.hFB.required(),this.saParticipants=(0,c.hFB)([]),this.showLegalEntitiesColumn=(0,c.hFB)(!1),this.pageSize=(0,c.hFB)(10),this.isApproveRejectLoading=(0,c.hFB)(!1),this.sectionError=(0,c.CGW)(),this.approvalId=(0,_.EW)(()=>this.details()?.approvalId??""),this.addedIds=(0,_.EW)(()=>this.details()?.addedDataItems??[]),this.removedIds=(0,_.EW)(()=>this.details()?.removedDataItems??[]),this.unchangedIds=(0,_.EW)(()=>this.details()?.unmodifiedDataItems??[]),this.addedInitialData=(0,_.EW)(()=>this.initialArrangementItems().added),this.removedInitialData=(0,_.EW)(()=>this.initialArrangementItems().removed),this.unchangedInitialData=(0,_.EW)(()=>this.initialArrangementItems().unchanged),this.hasAnySections=(0,_.
1EW)(()=>!!this.addedInitialData()?.items?.length||!!this.removedInitialData()?.items?.length||!!this.unchangedInitialData()?.items?.length),this.saParticipantsMapped=(0,_.EW)(()=>(this.details()?.saParticipants??[]).map(i=>({id:i.legalEntityId,name:i.legalEntityName})))}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-account-group-review-sections"]],inputs:{details:[1,"details"],initialArrangementItems:[1,"initialArrangementItems"],saParticipants:[1,"saParticipants"],showLegalEntitiesColumn:[1,"showLegalEntitiesColumn"],pageSize:[1,"pageSize"],isApproveRejectLoading:[1,"isApproveRejectLoading"]},outputs:{sectionError:"sectionError"},decls:2,vars:1,consts:()=>{let t,o;return t="Aucun compte",o="Aucun compte n\u2019est actuellement attribu\xE9",[["data-role","empty-state",1,"bb-state-container"],["data-role","review-empty-state","title",t,"subtitle",o,"image","ic_asset_light_bulb",3,"headingLevel"],["data-role","added-section",3,"sectionType","accountIds","initialData","approvalId","pageSize","saParticipants","showLegalEntityName","isApproveRejectLoading"],["data-role","removed-section",3,"sectionType","accountIds","initialData","approvalId","pageSize","saParticipants","showLegalEntityName","isApproveRejectLoading"],["data-role","unchanged-section",3,"sectionType","accountIds","initialData","approvalId","pageSize","saParticipants","showLegalEntityName","isApproveRejectLoading"],["data-role","added-section",3,"sectionError","sectionType","accountIds","initialData","approvalId","pageSize","saParticipants","showLegalEntityName","isApproveRejectLoading"],["data-role","removed-section",3,"sectionError","sectionType","accountIds","initialData","approvalId","pageSize","saParticipants","showLegalEntityName","isApproveRejectLoading"],["data-role","unchanged-section",3,"sectionError","sectionType","accountIds","initialData","approvalId","pageSize","saParticipants","showLegalEntityName","isApproveRejectLoading"]]},template:function(o,i){1&o&&e.nVh(0,Fo,2,1,"div",0)(1,Po,3,3),2&o&&e.vxM(i.hasAnySections()?1:0)},dependencies:[B.b,B.o,La],encapsulation:2,changeDetection:0})}}return n})();const Na={payeeLabel:"Payees"};let Ia=(()=>{class n{constructor(){this.destroyRef=(0,s.WQX)(s.abz),this.detailsService=(0,s.WQX)(K),this.type=c.hFB.required(),this.approvalId=c.hFB.required(),this.ids=c.hFB.required(),this.initialPayees=(0,c.hFB)(void 0),this.pageSize=(0,c.hFB)(v.yQz),this.isApproveRejectLoading=(0,c.hFB)(!1),this.paginationError=(0,c.CGW)(),this.payees=(0,s.vPA)([]),this.isLoading=(0,s.vPA)(!1),this.isEnd=(0,s.vPA)(!1),this.translations=Na,this.hasPayees=(0,_.EW)(()=>this.payees().length>0||this.initialPayees()?.items?.length),this.nextPage=(0,s.vPA)(void 0),this.prevNextPage=(0,s.vPA)(void 0),this.loadMoreSubject=new $.B,this.cancelRequest$=new $.B,(0,s.QZP)(()=>{const t=this.initialPayees();t&&this.processInitialData(t)}),(0,s.QZP)(()=>{this.isApproveRejectLoading()&&(this.cancelRequest$.next(),this.isLoading.set(!1))}),this.setupLoadMoreSubscription()}onLoadMore(){!this.isEnd()&&!this.isLoading()&&this.loadMoreSubject.next()}setupLoadMoreSubscription(){this.loadMoreSubject.pipe((0,Mt.H)(()=>{const t=this.ids(),o=this.nextPage(),i=this.approvalId();return!t?.length||this.isEnd()?G.w:(this.isLoading.set(!0),this.prevNextPage.set(o),this.detailsService.postFetchContactsApprovalDetails(i,t,this.pageSize(),o).pipe((0,te.Q)(this.cancelRequest$),(0,F.W)(a=>(this.isLoading.set(!1),this.paginationError.emit(a),G.w))))}),(0,L.pQ)(this.destroyRef)).subscribe(t=>{this.appendContacts(t),this.isLoading.set(!1)})}processInitialData(t){if(!t.items.length)return void this.isEnd.set(!0);const o=t.items.map(i=>(0,u.bs)(i));this.payees.set(o),this.nextPage.set(t.nextPage),t.items.length<this.pageSize()&&this.isEnd.set(!0)}appendContacts(t){if(!t.items.length)return void this.isEnd.set(!0);const o=t.items.map(l=>(0,u.bs)(l)),i=new Set(this.payees().map(l=>l.id)),a=o.filter(l=>!i.has(l.id));a.length>0&&this.payees.update(l=>[...l,...a]),this.processCursorPagination(t)}processCursorPagination(t){const o=this.prevNextPage();t.nextPage===o||t.items.length<this.pageSize()?this.isEnd.set(!0):this.nextPage.set(t.nextPage)}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-payee-category-section"]],inputs:{type:[1,"type"],approvalId:[1,"approvalId"],ids:[1,"ids"],initialPayees:[1,"initialPayees"],pageSize:[1,"pageSize"],isApproveRejectLoading:[1,"isApproveRejectLoading"]},outputs:{paginationError:"paginationError"},features:[e.Jv_([K])],decls:1,vars:1,consts:[[3,"type","shouldShowCounter","itemsName"],[3,"loadMore","payees","pageSize","isLoading","isEnd","disabled"]],template:function(o,i){1&o&&e.nVh(0,wo,2,8,"bb-review-section",0),2&o&&e.vxM(i.hasPayees()?0:-1)},dependencies:[b.Vnm,We],encapsulation:2,changeDetection:0})}}return n})(),Oa=(()=>
1{class n{constructor(){this.dataGroupDetails=c.hFB.required(),this.initialContactItemsResponses=c.hFB.required(),this.pageSize=(0,c.hFB)(v.yQz),this.isApproveRejectLoading=(0,c.hFB)(!1),this.paginationError=(0,c.CGW)(),this.approvalId=(0,_.EW)(()=>this.dataGroupDetails()?.approvalId??""),this.addedIds=(0,_.EW)(()=>this.dataGroupDetails()?.addedDataItems??[]),this.removedIds=(0,_.EW)(()=>this.dataGroupDetails()?.removedDataItems??[]),this.unchangedIds=(0,_.EW)(()=>this.dataGroupDetails()?.unmodifiedDataItems??[]),this.addedInitialData=(0,_.EW)(()=>this.findInitialDataForCategory(v.LHk.ADDED)),this.removedInitialData=(0,_.EW)(()=>this.findInitialDataForCategory(v.LHk.REMOVED)),this.unchangedInitialData=(0,_.EW)(()=>this.findInitialDataForCategory(v.LHk.UNCHANGED)),this.noPayeesAssigned=(0,_.EW)(()=>{const t=this.dataGroupDetails(),o=this.initialContactItemsResponses();return o.length?o.every(i=>!i.items.length):!t?.addedDataItems?.length&&!t?.removedDataItems?.length&&!t?.unmodifiedDataItems?.length})}findInitialDataForCategory(t){const o=this.initialContactItemsResponses(),i=this.dataGroupDetails();if(!o.length||!i)return;const a=this.getCategoryIds(t);if(!a?.length)return;const l=new Set(a);return o.find(d=>{if(!d.items.length)return!1;const p=d.items[0].id;return p&&l.has(p)})}getCategoryIds(t){const o=this.dataGroupDetails();switch(t){case v.LHk.ADDED:return o?.addedDataItems;case v.LHk.REMOVED:return o?.removedDataItems;case v.LHk.UNCHANGED:return o?.unmodifiedDataItems;default:return}}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-payee-group-review-sections"]],inputs:{dataGroupDetails:[1,"dataGroupDetails"],initialContactItemsResponses:[1,"initialContactItemsResponses"],pageSize:[1,"pageSize"],isApproveRejectLoading:[1,"isApproveRejectLoading"]},outputs:{paginationError:"paginationError"},decls:2,vars:1,consts:()=>{let t,o;return t=" ",o="There are currently no payees assigned",[["data-role","empty-state",1,"bb-state-container"],["data-role","review-empty-state","title",t,"subtitle",o,"image","ic_asset_light_bulb",3,"headingLevel"],["data-role","added-section","type","added",3,"approvalId","ids","initialPayees","pageSize","isApproveRejectLoading"],["data-role","removed-section","type","removed",3,"approvalId","ids","initialPayees","pageSize","isApproveRejectLoading"],["data-role","unchanged-section","type","unchanged",3,"approvalId","ids","initialPayees","pageSize","isApproveRejectLoading"],["data-role","added-section","type","added",3,"paginationError","approvalId","ids","initialPayees","pageSize","isApproveRejectLoading"],["data-role","removed-section","type","removed",3,"paginationError","approvalId","ids","initialPayees","pageSize","isApproveRejectLoading"],["data-role","unchanged-section","type","unchanged",3,"paginationError","approvalId","ids","initialPayees","pageSize","isApproveRejectLoading"]]},template:function(o,i){1&o&&e.nVh(0,jo,2,1,"div",0)(1,$o,3,3),2&o&&e.vxM(i.noPayeesAssigned()?0:1)},dependencies:[B.b,B.o,Ia],encapsulation:2,changeDetection:0})}}return n})();const ya={tryAgain:"R\xE9essayer"};let Ra=(()=>{class n extends u.mF{extractServiceAgreementName(t){return t.serviceAgreementName??""}constructor(){super(),this.approvalId=c.hFB.required(),this.showLegalEntityName=(0,c.hFB)(!0),this.isApproveRejectLoading=(0,c.hFB)(!1),this.initialContactItems=(0,s.vPA)([]),this.initialArrangementItems=(0,s.vPA)({added:null,removed:null,unchanged:null}),this.initialDetailsLoaded=(0,_.EW)(()=>this.initialContactsLoadComplete()||this.isInitialAccountsLoadComplete()),this.detailsService=(0,s.WQX)(K),this.affectedUsersStore=(0,s.WQX)(re),this.translations=ya,this.pageSize=v.yQz,this.initialContactsLoadComplete=(0,s.vPA)(!1),this.isInitialAccountsLoadComplete=(0,s.vPA)(!1),this.dataGroupType=(0,_.EW)(()=>this.details()?.type),this.isContactsType=(0,_.EW)(()=>this.dataGroupType()===v.Pmp.CONTACTS),this.isArrangementsType=(0,_.EW)(()=>this.dataGroupType()===v.Pmp.ARRANGEMENTS),this.action=(0,_.EW)(()=>this.details()?.action),this.showAlert=(0,_.EW)(()=>{const t=this.details();return"EDIT"===t?.action&&!0===t?.hasAssignedUsers}),this.canViewImpactedUsers=(0,_.EW)(()=>this.details()?.canViewImpactedUsers??!1),this.groupSubType=(0,_.EW)(()=>this.isArrangementsType()?"account-group":"payee-group"),this.allDetailsLoaded=(0,_.
1EW)(()=>this.initialDetailsLoaded()&&this.details()),(0,s.QZP)(()=>{const t=this.approvalId();this.executeFetch(t)})}ngOnDestroy(){this.error.set(void 0),this.isContentLoaded.emit(!1)}executeFetch(t){this.initialContactsLoadComplete.set(!1),this.initialContactItems.set([]),this.detailsService.getDetails(t).pipe((0,F.W)(o=>(this.details.set(void 0),this.processResponseError(o),G.w)),(0,L.pQ)(this.destroyRef)).subscribe(o=>{this.details.set(o),this.error.set(void 0),this.affectedSaName.emit(this.extractServiceAgreementName(o)),o.type===v.Pmp.CONTACTS?this.#t(o):o.type===v.Pmp.ARRANGEMENTS&&this.#e(o)})}processResponseError(t){this.error.set(t),this.isContentLoaded.emit(!1),this.errorOccurred.emit(t)}onViewAffectedUsersClick(){this.affectedUsersStore.openModal(this.approvalId(),"data-group",this.groupSubType())}#e(t){const o=[{key:"added",ids:t.addedDataItems??[]},{key:"removed",ids:t.removedDataItems??[]},{key:"unchanged",ids:t.unmodifiedDataItems??[]}].filter(({ids:i})=>i.length>0).map(({key:i,ids:a})=>({key:i,requests:this.detailsService.fetchArrangements(this.approvalId(),a,this.pageSize)}));if(0===o.length)return this.isInitialAccountsLoadComplete.set(!0),void this.isContentLoaded.emit(!0);(0,Ce.p)(o.map(i=>i.requests)).pipe((0,F.W)(i=>(this.processResponseError(i),G.w)),(0,P.j)(()=>this.isInitialAccountsLoadComplete.set(!0)),(0,L.pQ)(this.destroyRef)).subscribe(i=>{const a={added:null,removed:null,unchanged:null};o.forEach((l,d)=>{a[l.key]=i[d]}),this.initialArrangementItems.set(a),this.isContentLoaded.emit(!0)})}#t(t){const o=[];if([t.addedDataItems,t.removedDataItems,t.unmodifiedDataItems].forEach(i=>{i?.length&&o.push(this.detailsService.postFetchContactsApprovalDetails(t.approvalId,i,this.pageSize))}),0===o.length)return this.initialContactsLoadComplete.set(!0),void this.isContentLoaded.emit(!0);(0,Ce.p)(o).pipe((0,F.W)(i=>(this.processResponseError(i),G.w)),(0,P.j)(()=>{this.initialContactsLoadComplete.set(!0)}),(0,L.pQ)(this.destroyRef)).subscribe(i=>{this.initialContactItems.set(i),this.isContentLoaded.emit(!0)})}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-data-groups-container"]],inputs:{approvalId:[1,"approvalId"],showLegalEntityName:[1,"showLegalEntityName"],isApproveRejectLoading:[1,"isApproveRejectLoading"]},features:[e.Jv_([K,re]),e.Vt3],decls:2,vars:2,consts:[["data-role","error-state",3,"httpError","showRetryAction","retryActionText"],["data-role","error-state",3,"retryClick","httpError","showRetryAction","retryActionText"],[1,"bb-block--xl"],["data-role","sub-header",3,"action","oldState","newState","dataGroupType"],[1,"bb-block","bb-block--md"],[3,"closeModal","search","loadMore","retry","isOpen","loading","error","users","hasMorePages","groupSubType"],[1,"bb-block","bb-block--xl"],["data-role","account-group-review-sections",3,"details","initialArrangementItems","showLegalEntitiesColumn","pageSize","isApproveRejectLoading"],["data-role","contacts-content",3,"dataGroupDetails","initialContactItemsResponses","pageSize","isApproveRejectLoading"],["data-role","affected-users-alert",3,"viewUsersClicked","groupSubType","canViewImpactedUsers"],["data-role","account-group-review-sections",3,"sectionError","details","initialArrangementItems","showLegalEntitiesColumn","pageSize","isApproveRejectLoading"],["data-role","contacts-content",3,"paginationError","dataGroupDetails","initialContactItemsResponses","pageSize","isApproveRejectLoading"]],template:function(o,i){1&o&&(e.nVh(0,zo,1,3,"bb-accessgroup-error",0),e.nVh(1,Jo,7,13)),2&o&&(e.vxM(i.error()?0:-1),e.R7$(),e.vxM(i.allDetailsLoaded()&&!i.error()?1:-1))},dependencies:[b.OY,b.lW9,Ta,N.m,Oa,go,qe,Ze],encapsulation:2,changeDetection:0})}}return n})();const Fa={tryAgain:"R\xE9essayer"};let Ga=(()=>{class n extends u.mF{constructor(){super(),this.approvalId=c.hFB.required(),this.enableBfTooltipInfo=(0,c.hFB)(!0),this.bfTooltipInfoFunctionCodes=(0,c.hFB)(null),this.functionGroupDetails=this.details,this.detailsService=(0,s.WQX)(ke),this.translations=Fa,this.affectedUsersStore=(0,s.WQX)(re),this.showAlert=(0,_.EW)(()=>
1{const t=this.functionGroupDetails();return!!t&&("EDIT"===t.action&&!0===t.hasAssignedUsers&&"TEMPLATE"!==t.functionGroupType)}),this.canViewImpactedUsers=(0,_.EW)(()=>this.functionGroupDetails()?.canViewImpactedUsers??!1),this.transformedAction=(0,_.EW)(()=>{const t=this.functionGroupDetails();return(0,u.qC)(t?.action)}),(0,s.QZP)(()=>{const t=this.approvalId();this.executeFetch(t)})}extractServiceAgreementName(t){return t.serviceAgreementName??""}onViewAffectedUsersClick(){this.affectedUsersStore.openModal(this.approvalId(),"function-group","job-role")}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-function-groups-container"]],inputs:{approvalId:[1,"approvalId"],enableBfTooltipInfo:[1,"enableBfTooltipInfo"],bfTooltipInfoFunctionCodes:[1,"bfTooltipInfoFunctionCodes"]},features:[e.Jv_([ke,re]),e.Vt3],decls:2,vars:2,consts:[["data-role","error-state",3,"httpError","showRetryAction","retryActionText"],["data-role","error-state",3,"retryClick","httpError","showRetryAction","retryActionText"],[1,"bb-block--xl"],["data-role","sub-header",3,"action","oldState","newState","functionGroupType"],["data-role","info-update",3,"action","oldState","newState"],[1,"bb-block","bb-block--md"],["data-role","affected-users-modal",3,"closeModal","loadMore","retry","isOpen","loading","error","users","groupSubType","hasMorePages"],[1,"bb-block","bb-block--xl"],["data-role","permission-matrix",3,"permissionMatrix","enableBfTooltipInfo","bfTooltipInfoFunctionCodes"],["data-role","affected-users-alert",3,"viewUsersClicked","groupSubType","canViewImpactedUsers"]],template:function(o,i){1&o&&(e.nVh(0,Wo,1,3,"bb-accessgroup-error",0),e.nVh(1,Qo,9,17)),2&o&&(e.vxM(i.error()?0:-1),e.R7$(),e.vxM(i.functionGroupDetails()&&!i.error()?1:-1))},dependencies:[b.OY,b.lW9,uo,_o,mo,qe,Ze],encapsulation:2,changeDetection:0})}}return n})();const nt={tryAgain:"R\xE9essayer",accountGroups:"Account groups"};let Ba=(()=>{class n extends u.mF{#e;#t;#o;#s;#n;#a;#r;#c;#l;#d;#i;#_;#p;#u;#h;#m;#g;#b;#A;#v;#C;constructor(){super(),this.approvalId=c.hFB.required(),this.enableBfTooltipInfo=(0,c.hFB)(!0),this.bfTooltipInfoFunctionCodes=(0,c.hFB)(null),this.showLegalEntityName=(0,c.hFB)(!0),this.limitsStepVisible=(0,c.hFB)(!0),this.detailsService=(0,s.WQX)(Ue),this.#e=(0,s.WQX)(et.u8),this.#t=(0,s.WQX)(K),this.translations=nt,this.accountGroupsSectionLabel=nt.accountGroups,this.accountGroupsAddedLabel=v.vWS.added,this.#o=10,this.#s=(0,s.vPA)([]),this.#n=(0,s.vPA)(!1),this.#a=void 0,this.transformedData=(0,_.EW)(()=>{const t=this.details();if(t)return(0,u.Wi)(t)}),this.currentPermissions=(0,_.EW)(()=>{const t=this.transformedData();if(t?.currentPermissions)return(0,u.s1)(t.currentPermissions)}),this.wizardChangelog=(0,_.EW)(()=>{const t=this.transformedData();if(t?.changelog)return(0,u.ws)(t.changelog)}),this.newJobRoles=(0,_.EW)(()=>{const t=this.transformedData();if(t?.newFunctionGroups)return(0,u.do)(t.newFunctionGroups)}),this.hasCurrentPermissions=(0,_.EW)(()=>(this.details()?.assignedFunctionGroups?.length??0)>0),this.hasNewLimits=(0,_.EW)(()=>!!this.details()?.newLimit),this.limitsModified=(0,_.EW)(()=>{const t=this.details();if(!t)return!1;const o=t.currentLimits,i=t.newLimit;if(!o?.length||!i)return!1;const a=o[0]?.limit;return!!a&&JSON.stringify(a)!==JSON.stringify(i)}),this.limitsBound=(0,L.ot)(this.#e.getLimitsPeriods$,{initialValue:[]}),this.accountIds=(0,_.EW)(()=>this.details()?.accounts??[]),this.wizardAssignedGroups=(0,_.EW)(()=>(0,v.zym)(this.details()?.dataGroups)),this.showFlatAccountsSection=(0,_.EW)(()=>this.accountIds().length>0&&0===this.wizardAssignedGroups().length),this.availableLegalEntities=(0,_.EW)(()=>{const t=this.details()?.saParticipants??[];return(0,u.wd)(t)}),this.#r=(0,s.vPA)(!1),this.accountsInfo=(0,_.EW)(()=>{const t=this.#s(),o=this.accountIds().length;return{accountsDetails:t,accountsCount:this.#r()?t.length:o,maxPagesCount:Math.ceil(o/this.#o),itemsPerRequest:this.#o,isLoading:this.#n()}}),this.selectedJobRole=(0,s.vPA)(void 0),this.#c=(0,s.vPA)(void 0),this.serviceAgreementId=(0,_.EW)(()=>this.details()?.serviceAgreementId??""),this.selectedJobRoleBusinessFunctions=(0,_.
1EW)(()=>{const t=this.#c();return(0,u.pc)(t)}),this.#l=(0,s.vPA)(void 0),this.isAccountGroupModalOpen=(0,_.EW)(()=>!!this.#l()),this.selectedAccountGroupName=(0,_.EW)(()=>this.#l()?.name??""),this.#d=(0,s.vPA)([]),this.#i=(0,s.vPA)(!1),this.#_=void 0,this.#p=(0,s.vPA)(!1),this.accountGroupModalProducts=(0,_.EW)(()=>this.#d()),this.accountGroupModalLoading=(0,_.EW)(()=>this.#i()),this.accountGroupModalIsEnd=(0,_.EW)(()=>this.#p()),this.#u=(0,s.vPA)(void 0),this.isPayeeGroupModalOpen=(0,_.EW)(()=>!!this.#u()),this.selectedPayeeGroupName=(0,_.EW)(()=>this.#u()?.name??""),this.#h=(0,s.vPA)([]),this.#m=(0,s.vPA)(!1),this.#g=void 0,this.#b=(0,s.vPA)(!1),this.payeeGroupModalContacts=(0,_.EW)(()=>this.#h()),this.payeeGroupModalLoading=(0,_.EW)(()=>this.#m()),this.payeeGroupModalIsEnd=(0,_.EW)(()=>this.#b()),this.#A=(0,Y.o)((0,W.F)((0,T.M)(()=>this.#n.set(!0)),(0,w.n)(({approvalId:t,accountIds:o})=>{const i=this.#a;return this.#t.fetchArrangements(t,o,this.#o,i).pipe((0,T.M)(a=>{const l=(a.items??[]).map(u.FQ);this.#s.update(p=>[...p,...l]),l.length<this.#o||!a.nextPage||a.nextPage===i?(this.#r.set(!0),this.#a=void 0):this.#a=a.nextPage,this.#n.set(!1)}),(0,F.W)(()=>(this.#n.set(!1),(0,ee.of)(null))))}))),this.#v=(0,Y.o)((0,W.F)((0,T.M)(()=>this.#i.set(!0)),(0,w.n)(({approvalId:t,accountIds:o})=>{const i=this.#_;return this.#t.fetchArrangements(t,o,this.#o,i).pipe((0,T.M)(a=>{const l=(a.items??[]).map(u.FQ);this.#d.update(p=>[...p,...l]),l.length<this.#o||!a.nextPage||a.nextPage===i?(this.#p.set(!0),this.#_=void 0):this.#_=a.nextPage,this.#i.set(!1)}),(0,F.W)(()=>(this.#i.set(!1),(0,ee.of)(null))))}))),this.#C=(0,Y.o)((0,W.F)((0,T.M)(()=>this.#m.set(!0)),(0,w.n)(({approvalId:t,contactIds:o})=>{const i=this.#g;return this.#t.postFetchContactsApprovalDetails(t,o,this.#o,i).pipe((0,T.M)(a=>{const l=a.items??[];this.#h.update(p=>[...p,...l]),l.length<this.#o||!a.nextPage||a.nextPage===i?(this.#b.set(!0),this.#g=void 0):this.#g=a.nextPage,this.#m.set(!1)}),(0,F.W)(()=>(this.#m.set(!1),(0,ee.of)(null))))}))),this.#f=!1,(0,s.QZP)(()=>{const t=this.approvalId();this.executeFetch(t)}),(0,s.QZP)(()=>{const t=this.details(),o=t?.accounts,i=t?.approvalId;o?.length&&i&&this.#D(i,o)})}#f;#D(t,o){this.#f||(this.#f=!0,this.#A({approvalId:t,accountIds:o}))}onAccountsPageChange(){const t=this.details();t?.approvalId&&t?.accounts?.length&&this.#A({approvalId:t.approvalId,accountIds:t.accounts})}extractServiceAgreementName(t){return t.serviceAgreementName??""}openJobRoleDetailModal(t){this.selectedJobRole.set(t);const o=this.transformedData(),a=[...o?.currentPermissions?.functionGroups??[],...o?.newFunctionGroups??[]].find(l=>l.id===t.id);this.#c.set(a)}closeJobRoleDetailModal(){this.selectedJobRole.set(void 0),this.#c.set(void 0)}onWizardGroupActivate(t){t.isDeleted||!t.accountIds.length||this.openAccountGroupModal({id:t.id,name:t.name,description:t.description,type:"ARRANGEMENTS",serviceAgreementId:this.details()?.serviceAgreementId??"",dataItems:t.accountIds,items:t.accountIds})}openAccountGroupModal(t){this.#l.set(t),this.#d.set([]),this.#_=void 0,this.#p.set(!1),this.#E()}closeAccountGroupModal(){this.#l.set(void 0),this.#d.set([]),this.#_=void 0,this.#p.set(!1)}#E(){const t=this.#l(),o=this.details()?.approvalId,i=t?.dataItems??t?.items??[];!o||!i.length||this.#v({approvalId:o,accountIds:i})}onAccountGroupLoadMore(){!this.#i()&&!this.#p()&&this.#E()}openPayeeGroupModal(t){this.#u.set(t),this.#h.set([]),this.#g=void 0,this.#b.set(!1),this.#S()}closePayeeGroupModal(){this.#u.set(void 0),this.#h.set([]),this.#g=void 0,this.#b.set(!1)}#S(){const t=this.#u(),o=this.details()?.approvalId,i=t?.dataItems??t?.items??[];!o||!i.length||this.#C({approvalId:o,contactIds:i})}onPayeeGroupLoadMore(){!this.#m()&&!this.#b()&&this.#S()}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-quick-user-setup-container"]],inputs:{approvalId:[1,"approvalId"],enableBfTooltipInfo:[1,"enableBfTooltipInfo"],bfTooltipInfoFunctionCodes:[1,"bfTooltipInfoFunctionCodes"],showLegalEntityName:[1,"showLegalEntityName"],limitsStepVisible:[1,"limitsStepVisible"]},features:[e.Jv_([Ue,et.u8,K]),e.Vt3],decls:2,vars:1,consts:()=>{let t,o,i,a,l,d,p,h,m,f,A,M,x,I;return t="Ajout\xE9",o="1. Utilisateur",i="2. Autorisations et comptes",a="Nouvelles autorisations",l="Autorisations",d="Comptes",p="Non modifi\xE9",h="3. Limites",m="Removed",f="Limites actuelles",A="Ajout\xE9",M="Nouvelles limites",x="Aucune limite de paiement",I="Aucune restriction pour les paiements",[o,i,a,l,d,h,f,M,x,I,["data-role","error-state",3,"httpError","showRetryAction","retryActionText"],["data-role","error-state",3,"retryClick","httpError","showRetryAction","retryActionText"],[1,"bb-stack","bb-block","bb-block--md","bb-stack--align-top"],["name","user","size","md",1,"bb-stack__item"],[1,"h4"],[1,"bb-block","bb-block--xl"],["data-role","user-section",3,"approvalLogWizardUser","a
1pprovalLogWizardUserData","externalUserId"],["name","how-to-reg","size","md",1,"bb-stack__item"],["data-role","add-new-permission-block",1,"bb-block","bb-block--xl"],[1,"bb-stack","bb-block","bb-block--md","bb-stack--align-bottom"],["name","add-circle","color","success",1,"bb-stack__item"],[1,"bb-text-success","bb-stack__item","bb-text-bold"],["data-role","added-badge","color","success","text",t,1,"bb-stack__item"],[1,"bb-card","bb-approval-log-border-add-success-item","bb-block--xl"],[1,"bb-card__body","bb-stack--density-md"],[1,"bb-block","bb-stack--align-top"],[1,"bb-card__body"],["data-role","permissions-section",3,"jobRoleDetailOpen","approvalLogWizardJobRoles","approvalLogWizardChangelog","enableBfTooltipInfo","bfTooltipInfoFunctionCodes","handleJobRoleDetailExternally"],["data-role","wizard-assigned-account-groups-section",1,"bb-block","bb-block--xl"],["data-role","job-role-detail-modal",3,"jobRoleDetail","serviceAgreementId","allBusinessFunctions","enableBfTooltipInfo","bfTooltipInfoFunctionCodes"],["data-role","account-group-items-modal",3,"closed","loadMore","isOpen","accountGroupName","products","isLoading","isEnd","showLegalEntityName","availableLegalEntities"],["data-role","payee-group-items-modal",3,"closed","loadMore","isOpen","payeeGroupName","payees","isLoading","isEnd"],["data-role","current-permissions-section",3,"jobRoleDetailOpen","accountGroupDetailOpen","payeeGroupDetailOpen","userCurrentPermissions","approvalLogWizardChangelog"],[1,"bb-stack--align-top"],["data-role","approval-log-wizard-accounts-header"],["data-role","accounts-section",3,"pageChange","approvalLogWizardAccounts"],["type","added",3,"count","itemsName","sectionLabel"],[3,"groupActivate","groups","showTitle"],["data-role","limits-header-section",1,"bb-stack","bb-block","bb-block--md","bb-stack--align-top"],["name","lock","size","md",1,"bb-stack__item","bb-text-bold"],[1,"bb-stack__item","h4"],["data-role","unmodified-limits-badge","color","secondary","text",p,1,"bb-stack__item"],["data-role","unmodified-limits-section",1,"bb-card","bb-block","bb-block--md"],["data-role","current-limits-section"],["data-role","new-limits-section"],["data-role","no-limits-section",1,"bb-card"],[3,"approvalLogWizardChangelogLimits","limitsBound"],[1,"bb-stack","bb-block","bb-block--md","bb-stack__item--align-bottom"],["name","remove-circle","color","danger",1,"bb-stack__item"],[1,"bb-text-danger","bb-stack__item","bb-text-bold"],["data-role","removed-badge","color","danger","text",m,1,"bb-stack__item"],[1,"bb-card","bb-block","bb-block--md","bb-approval-log-border-remove-item"],["data-role","new-limits-added-badge","color","success","text",A,1,"bb-stack__item"],[1,"bb-card","bb-approval-log-border-add-success-item","bb-block","bb-block--md"],[1,"bb-stack","bb-stack--density-lg","bb-stack--align-top"],["name","payments","size","md",1,"bb-stack__item"],[1,"bb-block","bb-stack__item"],[1,"bb-heading-3"],[1,"bb-text-support"],["data-role","job-role-detail-modal",3,"close","jobRoleDetail","serviceAgreementId","allBusinessFunctions","enableBfTooltipInfo","bfTooltipInfoFunctionCodes"]]},template:function(o,i){1&o&&e.nVh(0,qo,1,3,"bb-accessgroup-error",10)(1,di,31,25),2&o&&e.vxM(i.error()?0:i.details()?1:-1)},dependencies:[b.OY,b.lW9,b.BlF,b.$0X,me.s1,b.AY2,b.epn,me.Wn,me.ny,Qe,ho,Ye,b.Vnm,pe.E,pe.n,R.o,R.R,O.QX],encapsulation:2,changeDetection:0})}}return n})();const ot=(0,E.Eu)((0,E.Q2)({selectedJobRoleItem:void 0,selectedAccountGroup:void 0,accountGroupProducts:[],accountGroupCursor:void 0,accountGroupIsEnd:!1,accountGroupIsLoading:!1,selectedPayeeGroup:void 0,payeeGroupContacts:[],payeeGroupCursor:void 0,payeeGroupIsEnd:!1,payeeGroupIsLoading:!1}),(0,E.pq)(()=>({_detailsService:(0,s.WQX)(ve)})),(0,E.RI)(n=>({openJobRole(r){(0,E.M8)(n,{selectedJobRoleItem:r})},closeJobRole(){(0,E.M8)(n,{selectedJobRoleItem:void 0})},closeAccountGroup(){(0,E.M8)(n,{selectedAccountGroup:void 0,accountGroupProducts:[],accountGroupCursor:void 0,accountGroupIsEnd:!1})},closePayeeGroup(){(0,E.M8)(n,{selectedPayeeGroup:void 0,payeeGroupContacts:[],payeeGroupCursor:void 0,payeeGroupIsEnd:!1})},_applyArrangementsPage(r,t){(0,E.M8)(n,o=>({accountGroupProducts:[...o.accountGroupProducts,...r.items.map(u.FQ)],accountGroupCursor:r.nextPage,accountGroupIsEnd:r.nextPage===t,accountGroupIsLoading:!1}))},_handleArrangementsError(){(0,E.M8)(n,{accountGroupIsLoading:!1})},_applyContactsPage(r,t){(0,E.M8)(n,o=>({payeeGroupContacts:[...o.payeeGroupContacts,...r.items.map(u.bs)],payeeGroupCursor:r.nextPage,payeeGroupIsEnd:r.nextPage===t,payeeGroupIsLoading:!1}))},_handleContactsError(){(0,E.M8)(n,{payeeGroupIsLoading:!1})}})),(0,E.RI)(n=>({loadArrangements:(0,Y.o)((0,W.F)((0,w.n)(r=>{const t=n.accountGroupCursor();return(0,E.M8)(n,{accountGroupIsLoading:!0}),n._detailsService.fetchArrangements(r,n.selectedAccountGroup()?.dataItems??[],v.yQz,t).pipe((0,T.M)(o=>n._applyArrangementsPage(o,t)),(0,F.W)(()=>(n._handleArrangementsError(),G.w)))}
1))),loadContacts:(0,Y.o)((0,W.F)((0,w.n)(r=>{const t=n.payeeGroupCursor();return(0,E.M8)(n,{payeeGroupIsLoading:!0}),n._detailsService.fetchContacts(r,n.selectedPayeeGroup()?.dataItems??[],v.yQz,t).pipe((0,T.M)(o=>n._applyContactsPage(o,t)),(0,F.W)(()=>(n._handleContactsError(),G.w)))})))})),(0,E.RI)(n=>({openDataGroup(r,t){r.type===v.Pmp.ARRANGEMENTS&&((0,E.M8)(n,{selectedAccountGroup:r,accountGroupProducts:[],accountGroupCursor:void 0,accountGroupIsEnd:!1,accountGroupIsLoading:!1}),n.loadArrangements(t)),r.type===v.Pmp.CONTACTS&&((0,E.M8)(n,{selectedPayeeGroup:r,payeeGroupContacts:[],payeeGroupCursor:void 0,payeeGroupIsEnd:!1,payeeGroupIsLoading:!1}),n.loadContacts(t))},triggerLoadMoreArrangements(r){n.loadArrangements(r)},triggerLoadMoreContacts(r){n.loadContacts(r)}})));let Pa=(()=>{class n extends u.mF{constructor(){super(),this.approvalId=c.hFB.required(),this.isApproveRejectLoading=(0,c.hFB)(!1),this.showLegalEntityName=(0,c.hFB)(!0),this.enableBfTooltipInfo=(0,c.hFB)(!1),this.bfTooltipInfoFunctionCodes=(0,c.hFB)(null),this.enableCAG=(0,c.hFB)(!1),this.user=(0,s.vPA)(null),this.serviceAgreementId=(0,_.EW)(()=>this.details()?.serviceAgreementId),this.availableLegalEntities=(0,_.EW)(()=>{const t=this.details()?.saParticipants??[];return(0,u.wd)(t)}),this.detailsService=(0,s.WQX)(ve),this.modalStore=(0,s.WQX)(ot),this.translations={tryAgain:"R\xE9essayer"},(0,s.QZP)(()=>{this.executeFetch(this.approvalId())})}ngOnDestroy(){this.error.set(void 0),this.isContentLoaded.emit(!1)}openJobRoleModal(t){this.isApproveRejectLoading()||this.modalStore.openJobRole(t)}onJobRoleModalClosed(){this.modalStore.closeJobRole()}openDataGroupModal(t){this.isApproveRejectLoading()||this.modalStore.openDataGroup(t,this.approvalId())}onAccountGroupModalClosed(){this.modalStore.closeAccountGroup()}onAccountGroupLoadMore(){this.modalStore.triggerLoadMoreArrangements(this.approvalId())}onPayeeGroupModalClosed(){this.modalStore.closePayeeGroup()}onPayeeGroupLoadMore(){this.modalStore.triggerLoadMoreContacts(this.approvalId())}executeFetch(t){this.details.set(void 0),this.user.set(null),this.error.set(void 0),this.detailsService.getDetails(t).pipe((0,w.n)(o=>(this.details.set(o),this.affectedSaName.emit(o.serviceAgreementName??""),this.detailsService.getUser(t,[o.userId]))),(0,F.W)(o=>(this.#t(o),G.w)),(0,L.pQ)(this.destroyRef)).subscribe(o=>{this.user.set(this.#e(o)),this.isContentLoaded.emit(!0)})}extractServiceAgreementName(t){return t.serviceAgreementName??""}#e(t){return{...t,legalEntityId:t.legalEntity.id,legalEntityName:t.legalEntity.name,isTypeBank:"BANK"===t.legalEntity.type}}#t(t){this.error.set(t),this.isContentLoaded.emit(!1),this.errorOccurred.emit(t)}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-user-permissions-container"]],inputs:{approvalId:[1,"approvalId"],isApproveRejectLoading:[1,"isApproveRejectLoading"],showLegalEntityName:[1,"showLegalEntityName"],enableBfTooltipInfo:[1,"enableBfTooltipInfo"],bfTooltipInfoFunctionCodes:[1,"bfTooltipInfoFunctionCodes"],enableCAG:[1,"enableCAG"]},features:[e.Jv_([ve,ot]),e.Vt3],decls:4,vars:4,consts:[["data-role","error-state",3,"httpError","showRetryAction","retryActionText"],["data-role","error-state",3,"retryClick","httpError","showRetryAction","retryActionText"],[3,"user"],[3,"jobRoleItemClicked","dataGroupItemClicked","permissionsDetails","user","enableCAG"],[3,"jobRole","enableBfTooltipInfo","bfTooltipInfoFunctionCodes"],[3,"closed","loadMore","isOpen","accountGroupName","products","isLoading","isEnd","showLegalEntityName","availableLegalEntities"],[3,"closed","loadMore","isOpen","payeeGroupName","payees","isLoading","isEnd"],[3,"closed","jobRole","enableBfTooltipInfo","bfTooltipInfoFunctionCodes"]],template:function(o,i){if(1&o&&(e.SS7(0)(1),e.nVh(2,pi,1,3,"bb-accessgroup-error",0),e.nVh(3,ui,5,17)),2&o){const a=e.bH3(i.user());e.R7$();const l=e.bH3(i.details());e.R7$(),e.vxM(i.error()?2:-1),e.R7$(),e.vxM(l&&a?3:-1)}},dependencies:[b.OY,b.lW9,b.jq4,Ao,bo,Qe,Ye],encapsulation:2,changeDetection:0})}}return n})();function it(n){return{id:n.id,externalId:n.externalId,fullName:n.fullName,legalEntityId:n.legalEntity?.id,legalEntityName:n.legalEntity?.name}}const at=(0,E.Eu)((0,E.Q2)({paginatedUsers:[],paginatedCursor:void 0,loading:!1,error:void 0}),(0,E.pq)(()=>({_detailsService:(0,s.WQX)(se),_initialData:(0,s.vPA)(null),_pageSize:(0,s.vPA)(v.yQz)})),(0,E.QO)(n=>({users:(0,_.EW)(()=>[...(n._initialData()?.items??[]).map(it),...n.paginatedUsers()]),cursor:(0,_.EW)(()=>
1{if(n._initialData()&&!((n._initialData()?.items?.length??0)<n._pageSize()))return void 0===n.paginatedCursor()?n._initialData()?.nextPage??void 0:n.paginatedCursor()??void 0})})),(0,E.RI)(n=>({setInitialData(r){n._initialData.set(r)},setPageSize(r){n._pageSize.set(r)},loadMore:(0,Y.o)((0,W.F)((0,w.n)(r=>r?((0,E.M8)(n,{loading:!0,error:void 0}),n._detailsService.fetchUsers(r.approvalId,r.userIds,n._pageSize(),n.cursor()).pipe((0,T.M)(t=>{const i=(t.items?.length??0)<n._pageSize()||t.nextPage===n.cursor();(0,E.M8)(n,a=>({paginatedUsers:[...a.paginatedUsers,...(t.items??[]).map(it)],paginatedCursor:i?null:t.nextPage}))}),(0,F.W)(t=>((0,E.M8)(n,{error:t}),G.w)),(0,P.j)(()=>(0,E.M8)(n,{loading:!1})))):((0,E.M8)(n,{loading:!1}),G.w)))),cancelPendingRequest(){this.loadMore(null)}})));let ja=(()=>{class n{constructor(){this.sectionType=c.hFB.required(),this.userIds=c.hFB.required(),this.approvalId=c.hFB.required(),this.pageSize=(0,c.hFB)(v.yQz),this.initialData=(0,c.hFB)(null),this.isApproveRejectLoading=(0,c.hFB)(!1),this.sectionError=(0,c.CGW)(),this.store=(0,s.WQX)(at),this.adminsLabel=" ",(0,s.QZP)(()=>this.store.setInitialData(this.initialData())),(0,s.QZP)(()=>this.store.setPageSize(this.pageSize())),(0,s.QZP)(()=>{this.isApproveRejectLoading()&&this.store.cancelPendingRequest()}),(0,s.QZP)(()=>{const t=this.store.error();t&&this.sectionError.emit(t)})}onLoadMore(){this.store.loading()||!this.store.cursor()||this.store.loadMore({approvalId:this.approvalId(),userIds:this.userIds()})}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-admin-section"]],inputs:{sectionType:[1,"sectionType"],userIds:[1,"userIds"],approvalId:[1,"approvalId"],pageSize:[1,"pageSize"],initialData:[1,"initialData"],isApproveRejectLoading:[1,"isApproveRejectLoading"]},outputs:{sectionError:"sectionError"},features:[e.Jv_([se,at])],decls:1,vars:1,consts:[[3,"type","shouldShowCounter","itemsName"],[3,"admins"],[3,"isLoading","isEnd","disabled"],[3,"loadMore","isLoading","isEnd","disabled"]],template:function(o,i){1&o&&e.nVh(0,gi,3,5,"bb-review-section",0),2&o&&e.vxM(i.store.users().length>0?0:-1)},dependencies:[b.Vnm,b.TiM,J],encapsulation:2,changeDetection:0})}}return n})(),ka=(()=>{class n{constructor(){this.details=(0,c.hFB)(void 0),this.initialUserItems=c.hFB.required(),this.pageSize=(0,c.hFB)(v.yQz),this.isApproveRejectLoading=(0,c.hFB)(!1),this.sectionError=(0,c.CGW)(),this.approvalId=(0,_.EW)(()=>this.details()?.approvalId??""),this.#e=(0,_.EW)(()=>this.details()?.oldState?.admins??[]),this.#t=(0,_.EW)(()=>this.details()?.newState?.admins??[]),this.addedIds=(0,_.EW)(()=>{const t=this.#e();return this.#t().filter(o=>!t.includes(o))}),this.removedIds=(0,_.EW)(()=>this.#e().filter(t=>!this.#t().includes(t))),this.unchangedIds=(0,_.EW)(()=>this.#e().filter(t=>this.#t().includes(t))),this.addedInitialData=(0,_.EW)(()=>this.initialUserItems().added),this.removedInitialData=(0,_.EW)(()=>this.initialUserItems().removed),this.unchangedInitialData=(0,_.EW)(()=>this.initialUserItems().unchanged),this.adminsLabel="Administrateurs",this.hasAnySections=(0,_.EW)(()=>!!this.addedInitialData()?.items?.length||!!this.removedInitialData()?.items?.length||!!this.unchangedInitialData()?.items?.length)}#e;#t;static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-admin-review-sections"]],inputs:{details:[1,"details"],initialUserItems:[1,"initialUserItems"],pageSize:[1,"pageSize"],isApproveRejectLoading:[1,"isApproveRejectLoading"]},outputs:{sectionError:"sectionError"},decls:2,vars:1,consts:()=>{let t,o;return t=" ",o=" ",[["data-role","empty-state",1,"bb-state-container"],["data-role","bb-accordion-admins",3,"title","initiallyOpened","dataRole"],["data-role","review-empty-state","title",t,"subtitle",o,"image","ic_asset_light_bulb",3,"headingLevel"],["headerStart","","name","user",1,"me-2"],["data-role","added-section",3,"sectionType","userIds","initialData","approvalId","pageSize","isApproveRejectLoading"],["data-role","removed-section",3,"sectionType","userIds","initialData","approvalId","pageSize","isApproveRejectLoading"],["data-role","unchanged-section",3,"sectionType","userIds","initialData","approvalId","pageSize","isApproveRejectLoading"],["data-role","added-section",3,"sectionError","sectionType","userIds","initialData","approvalId","pageSize","isApproveRejectLoading"],["data-role","removed-section",3,"sectionError","sectionType","userIds","initialData","approvalId","pageSize","isApproveRejectLoading"],["data-role","unchanged-section",3,"sectionError","sectionType","userIds","initialData","approvalId","pageSize","isApproveRejectLoading"]]},template:function(o,i){1&o&&e.nVh(0,hi,2,1,"div",0)(1,vi,5,6,"bb-accordion",1),2&o&&e.vxM(i.hasAnySections()?1:0)},dependencies:[b.h6p,b.oij,R.o,R.R,B.b,B.o,ja],encapsulation:2,changeDetection:0})}}return n})(),Va=(()=>{class n extends u.mF{constructor(){super(),this.approvalId=c.hFB.required(),this.pageSize=(0,c.hFB)(v.yQz),this.isApproveRejectLoading=(0,c.hFB)(!1),this.isContentLoaded=(0,c.CGW)(),this.initialAdminData=(0,s.vPA)({added:null,removed:null,unchanged:null}),this.isInitialAdminLoadComplete=(0,s.vPA)(!1),this.detailsService=(0,s.WQX)(se),this.tryAgainLabel="R\xE9essayer",this.participantDiff=(0,_.EW)(()=>{const t=this.#t(this.details()?.newState?.legalEntities),o=this.#t(this.details()?.oldState?.legalEntities);return(0,u.y_)(t,o)}
1),this.showDetails=(0,_.EW)(()=>!!this.details()&&this.isInitialAdminLoadComplete()&&!this.error()),this.newSaItem=(0,_.EW)(()=>this.#e(this.details()?.newState??{})),this.oldSaItem=(0,_.EW)(()=>{const t=this.details()?.oldState;return t?this.#e(t):void 0}),(0,s.QZP)(()=>{this.executeFetch(this.approvalId())})}executeFetch(t){this.#s(),this.detailsService.getDetails(t).pipe((0,w.n)(o=>{this.details.set(o),this.error.set(void 0),this.affectedSaName.emit(o.oldState?.name??o.newState?.name??"");const i=this.#o(o);return i.added.length||i.removed.length||i.unchanged.length?this.#a(i,t):(this.#n({added:null,removed:null,unchanged:null}),G.w)}),(0,F.W)(o=>(this.processResponseError(o),G.w)),(0,L.pQ)(this.destroyRef)).subscribe()}extractServiceAgreementName(t){return t.newState?.name??""}processResponseError(t){this.details.set(void 0),this.error.set(t),this.errorOccurred.emit(t),this.isContentLoaded.emit(!1)}#e(t){const o=t.validFrom?.split("T"),i=t.validUntil?.split("T");return{name:t.name??"",description:t.description??"",customerCategory:t.customerCategory,purpose:t.purpose??"",validFromDate:o?.[0]??"",validFromTime:o?.[1]??"",validUntilDate:i?.[0]??"",validUntilTime:i?.[1]??"",id:"",creatorLegalEntity:"",status:t.status,isMaster:!1}}#t(t){return t?.length?(0,u.RV)(t):[]}#o(t){const o=t.newState?.admins??[];if(!t.oldState)return{added:o,removed:[],unchanged:[]};const i=t.oldState.admins??[],a=new Set(i),l=new Set(o);return{added:o.filter(d=>!a.has(d)),removed:i.filter(d=>!l.has(d)),unchanged:o.filter(d=>a.has(d))}}#s(){this.details.set(void 0),this.error.set(void 0),this.initialAdminData.set({added:null,removed:null,unchanged:null}),this.isInitialAdminLoadComplete.set(!1),this.isContentLoaded.emit(!1)}#n(t){this.initialAdminData.set(t),this.isInitialAdminLoadComplete.set(!0),this.isContentLoaded.emit(!0)}#a(t,o){const i=[{key:"added",ids:t.added},{key:"removed",ids:t.removed},{key:"unchanged",ids:t.unchanged}].filter(({ids:a})=>a.length>0);return(0,Ce.p)(i.map(a=>this.detailsService.fetchUsers(o,a.ids,this.pageSize()))).pipe((0,T.M)(a=>{const l={added:null,removed:null,unchanged:null};i.forEach((d,p)=>{l[d.key]=a[p]}),this.#n(l)}))}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-service-agreement-container"]],inputs:{approvalId:[1,"approvalId"],pageSize:[1,"pageSize"],isApproveRejectLoading:[1,"isApproveRejectLoading"]},outputs:{isContentLoaded:"isContentLoaded"},features:[e.Jv_([se]),e.Vt3],decls:2,vars:2,consts:[[3,"httpError","retryActionText","showRetryAction"],[3,"retryClick","httpError","retryActionText","showRetryAction"],["data-role","service-agreement-name-card",1,"bb-block","bb-block--lg"],[1,"bb-block","bb-block--lg"],[3,"serviceAgreement","showDisabledState"],[3,"newDetails","oldDetails"],[1,"bb-block--xl"],[3,"participantsAdded","participantsRemoved","participantsModified","participantsUnchanged"],[3,"sectionError","details","initialUserItems","pageSize","isApproveRejectLoading"]],template:function(o,i){1&o&&(e.nVh(0,Ci,1,3,"bb-accessgroup-error",0),e.nVh(1,Ei,7,12)),2&o&&(e.vxM(i.error()?0:-1),e.R7$(),e.vxM(i.showDetail
1s()?1:-1))},dependencies:[b.OY,b.lW9,ka,b._GD,b.qTu,b.oK1],encapsulation:2,changeDetection:0})}}return n})();const V={headerApproved:"Une action a \xE9t\xE9 approuv\xE9e pour la permission suivante : ",headerRejected:"Une action a \xE9t\xE9 rejet\xE9e pour la permission suivante : ",messageApproved:" ",messageRejected:" ",headerApprovalFailed:" ",headerRejectionFailed:" ",messageApprovalFailed:"La demande de changement d'acc\xE8s n'a pas pu \xEAtre approuv\xE9e. R\xE9essayez plus tard.",messageRejectionFailed:"La demande de changement d'acc\xE8s n'a pas pu \xEAtre rejet\xE9e. R\xE9essayez plus tard.",messageErrorSuffix:"Un probl\xE8me technique nous emp\xEAche de traiter votre demande. R\xE9essayez plus tard.",businessFunctionFallback:"Nom de la permission",fallbackMessage:"Un probl\xE8me technique nous emp\xEAche de traiter votre demande. R\xE9essayez plus tard."};let Ua=(()=>{class n{#e;#t;#o;#s;#n;#a;constructor(){this.accessControlSearch=(0,s.WQX)(we),this.#e=(0,s.WQX)(u.Y5),this.#t=(0,s.WQX)(s.abz),this.#o=(0,s.WQX)(Ve),this.#s=(0,s.WQX)(v.CKB),this.#n=(0,s.WQX)(ae.JE),this.isApproveLoading=(0,s.vPA)(!1),this.isRejectLoading=(0,s.vPA)(!1),this.isContainerContentLoaded=(0,s.vPA)(!1),this.affectedSaName=(0,s.vPA)(void 0),this.isPaginationLoading=(0,s.vPA)(!1),this.error=(0,s.vPA)(void 0),this.isApproveRejectLoading=(0,_.EW)(()=>this.isApproveLoading()||this.isRejectLoading()),this.FunctionCode=u.eI,this.translations=V,this.#a=new $.B,this.pageSize=c.hFB.required(),this.currentTabIndex=(0,c.hFB)(0),this.businessFunctions=(0,c.hFB)([]),this.enableComment=(0,c.hFB)(!1),this.selectedServiceAgreements=(0,c.hFB)(null),this.notificationDismissTime=c.hFB.required(),this.showLegalEntityName=(0,c.hFB)(!0),this.enableBfTooltipInfo=(0,c.hFB)(!1),this.bfTooltipInfoFunctionCodes=(0,c.hFB)(null),this.enableCAG=(0,c.hFB)(!1),this.limitsStepVisible=(0,c.hFB)(!0),this.checkCounter=(0,c.CGW)(),this.tableAccessControlData=[],this.serviceAgreements=[],this.accessControlData=[],this.isApprovalsDetailedViewModalOpen=(0,s.vPA)(!1),(0,s.QZP)(()=>{const t=this.selectedServiceAgreements();t?.length&&(0,s.O8t)(()=>{this.serviceAgreements=[...t],this.accessControlSearch.clearCursor(),this.#r()})})}loadMore(){this.accessControlSearch.getAccessControlLog(this.pageSize(),this.businessFunctions(),this.serviceAgreements.map(t=>t.serviceAgreementId)).pipe((0,z.s)(1),(0,L.pQ)(this.#t),(0,y.T)(t=>t??[])).subscribe(t=>{this.accessControlData=[...this.accessControlData,...t.items];const o=(0,u.Ec)(t.items);this.tableAccessControlData=[...this.tableAccessControlData,...o],this.accessControlSearch.isEnd()&&this.checkCounter.emit(this.accessControlData.length)})}selectApproval(t){this.selectedApprovalData=(0,u.JS)(this.accessControlData[t]),this.isApprovalsDetailedViewModalOpen.set(!0)}#r(){this.tableAccessControlData=[],this.accessControlSearch.getAccessControlLog(this.pageSize(),this.businessFunctions(),this.serviceAgreements.map(t=>t.serviceAgreementId)).pipe((0,z.s)(1),(0,L.pQ)(this.#t),(0,y.T)(t=>t??[])).subscribe(t=>{this.accessControlData=[...t.items],this.tableAccessControlData=(0,u.Ec)(t.items),this.accessControlSearch.isEnd()&&this.checkCounter.emit(this.accessControlData.length)})}closeModal(){this.isApprovalsDetailedViewModalOpen.set(!1),this.accessControlSearch.clearCursor(),this.#e.reloadServiceAgreements(),this.#e.setSelectedTab(this.currentTabIndex())}approve(t){const o=this.selectedApprovalData?.id;if(!o)return;const i=this.#d();this.isApproveLoading.set(!0);const a=this.enableComment()?t:void 0;this.#o.approve(o,a).pipe((0,te.Q)(this.#a),(0,L.pQ)(this.#t),(0,P.j)(()=>this.isApproveLoading.set(!1))).subscribe({next:()=>{this.#i(V.headerApproved,`${i} ${V.messageApproved}`,"success",this.notificationDismissTime()),this.#l()},error:l=>{const d=this.#c(l);d?this.#i(d.header,d.message,"error",this.notificationDismissTime()):this.#i(V.headerApprovalFailed,`${V.messageApprovalFailed} ${i}. ${V.messageErrorSuffix}`,"error",this.notificationDismissTime())}})}reject(t){const o=this.selectedApprovalData?.id;if(!o)return;const i=this.#d();this.isRejectLoading.set(!0);const a=this.enableComment()?t:void 0;this.#o.reject(o,a).pipe((0,te.Q)(this.#a),(0,L.pQ)(this.#t),(0,P.j)(()=>this.isRejectLoading.set(!1))).subscribe({next:()=>{this.#i(V.headerRejected,`${i} ${V.messageRejected}`,"success",this.notificationDismissTime()),this.#l()},error:l=>{const d=this.#c(l);d?this.#i(d.header,d.message,"error",this.notificationDismissTime()):this.#i(V.headerRejectionFailed,`${V.messageRejectionFailed} ${i}. ${V.messageErrorSuffix}`,"error",this.notificationDismissTime())}})}#c(t){const o=(0,v.r_g)(t);return o?{header:o.title,message:o.message}:void 0}#l(){this.isApprovalsDetailedViewModalOpen.set(!1),this.accessControlSearch.clearCursor(
1),this.#e.reloadServiceAgreements()}#d(){const t=this.selectedApprovalData?.functionCode;return this.#s.getBusinessFunctionName(t)??this.selectedApprovalData?.function??V.businessFunctionFallback}#i(t,o,i,a){this.#n.showNotification({header:t,message:o,modifier:i,ttl:a})}onCloseModal(){this.#a.next(),this.isApprovalsDetailedViewModalOpen.set(!1),this.isContainerContentLoaded.set(!1),this.error.set(void 0),this.affectedSaName.set(void 0)}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-access-control-container"]],inputs:{pageSize:[1,"pageSize"],currentTabIndex:[1,"currentTabIndex"],businessFunctions:[1,"businessFunctions"],enableComment:[1,"enableComment"],selectedServiceAgreements:[1,"selectedServiceAgreements"],notificationDismissTime:[1,"notificationDismissTime"],showLegalEntityName:[1,"showLegalEntityName"],enableBfTooltipInfo:[1,"enableBfTooltipInfo"],bfTooltipInfoFunctionCodes:[1,"bfTooltipInfoFunctionCodes"],enableCAG:[1,"enableCAG"],limitsStepVisible:[1,"limitsStepVisible"]},outputs:{checkCounter:"checkCounter"},features:[e.Jv_([we,Ve])],decls:4,vars:5,consts:()=>{let t;return t="Chargement...",[["mainTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["data-role","access-control-detail-modal",3,"isContentLoaded","affectedSaName","approvalDetails","approveLoading","rejectLoading","enableComment","error"],["loaderSize","sm","data-role","loading-indicator","text",t],[3,"httpError","headingLevel"],["data-role","all-access-control-items-approved"],["data-role","access-control-table",3,"selectItem","tableData","selectedServiceAgreements"],["data-role","load-more-button",3,"loadMore","isLoading","isEnd"],["data-role","all-items-approved"],["data-role","access-control-detail-modal",3,"closeModal","approve","reject","isContentLoaded","affectedSaName","approvalDetails","approveLoading","rejectLoading","enableComment","error"],["data-role","data-groups-container",3,"approvalId","isApproveRejectLoading"],["data-role","function-groups-container",3,"approvalId","enableBfTooltipInfo","bfTooltipInfoFunctionCodes"],["data-role","quick-user-setup-container",3,"approvalId","showLegalEntityName","enableBfTooltipInfo","bfTooltipInfoFunctionCodes","limitsStepVisible"],["data-role","user-permissions-container",3,"approvalId","isApproveRejectLoading","showLegalEntityName","enableBfTooltipInfo","bfTooltipInfoFunctionCodes","enableCAG"],["data-role","service-agreement-container",3,"approvalId","isApproveRejectLoading"],["data-role","unrecognized-type-fallback"],["data-role","data-groups-container",3,"isContentLoaded","affectedSaName","errorOccurred","approvalId","isApproveRejectLoading"],["data-role","function-groups-container",3,"isContentLoaded","affectedSaName","errorOccurred","approvalId","enableBfTooltipInfo","bfTooltipInfoFunctionCodes"],["data-role","quick-user-setup-container",3,"isContentLoaded","affectedSaName","errorOccurred","approvalId","showLegalEntityName","enableBfTooltipInfo","bfTooltipInfoFunctionCodes","limitsStepVisible"],["data-role","user-permissions-container",3,"isContentLoaded","affectedSaName","errorOccurred","approvalId","isApproveRejectLoading","showLegalEntityName","enableBfTooltipInfo","bfTooltipInfoFunctionCodes","enableCAG"],["data-role","service-agreement-container",3,"isContentLoaded","affectedSaName","errorOccurred","approvalId","isApproveRejectLoading"]]},template:function(o,i){if(1&o&&(e.eu8(0,1),e.DNE(1,Ti,4,4,"ng-template",null,0,e.C5r),e.nVh(3,Gi,7,8,"bb-cal-detail-view-modal",2)),2&o){const a=e.sdS(2);e.Y8G("ngTemplateOutlet",a)("ngTemplateOutletContext",e.eq3(3,Ie,i.accessControlSearch.error())),e.R7$(3),e.vxM(i.isApprovalsDetailedViewModalOpen()?3:-1)}},dependencies:[oe,b.OY,b.lW9,N.m,N.T,J,ge,po,O.T3,Ra,Ga,Va,Ba,Pa],encapsulation:2,changeDetection:0})}}return n})(),$a=(()=>{class n{constructor(){this.approvalsSearch=(0,s.WQX)(je),this.entitlementsService=(0,s.WQX)(u.Y5),this.destroyRef=(0,s.WQX)(s.abz),this.pageSize=c.hFB.required(),this.currentTabIndex=(0,c.hFB)(0),this.businessFunctions=(0,c.hFB)([]),this.selectedServiceAgreements=(0,c.hFB)(null),this.enableComment=(0,c.hFB)(!1),this.defaultZero=(0,c.hFB)(!1),this.enableCAG=(0,c.hFB)(!1),this.pendingApprovalsHandling=(0,c.hFB)(v.Ipq.OFF),this.complexBF=(0,c.hFB)([]),this.checkCounter=(0,c.CGW)(),this.tableApprovalsData=[],this.serviceAgreements=[],this.approvalData=[],this.isApprovalsDetailedViewModalOpen=!1,(0,s.QZP)(()=>{const t=this.selectedServiceAgreements();t?.length&&(0,s.O8t)(()=>{this.serviceAgreements=[...t],this.approvalsSearch.clearCursor(
1),this.getApprovalItems()})})}loadMore(){this.approvalsSearch.getApprovalsLog(this.pageSize(),this.businessFunctions(),this.serviceAgreements.map(t=>t.serviceAgreementId)).pipe((0,z.s)(1),(0,L.pQ)(this.destroyRef),(0,y.T)(t=>t??[])).subscribe(t=>{this.approvalData=[...this.approvalData,...t];const o=(0,u.VZ)(t);this.tableApprovalsData=[...this.tableApprovalsData,...o],this.approvalsSearch.isEnd()&&this.checkCounter.emit(this.approvalData.length)})}selectApproval(t){this.selectedApprovalData=this.approvalData[t],this.isApprovalsDetailedViewModalOpen=!0}closeModal(){this.isApprovalsDetailedViewModalOpen=!1,this.approvalsSearch.clearCursor(),this.entitlementsService.reloadServiceAgreements(),this.entitlementsService.setSelectedTab(this.currentTabIndex())}getApprovalItems(){this.tableApprovalsData=[],this.approvalsSearch.getApprovalsLog(this.pageSize(),this.businessFunctions(),this.serviceAgreements.map(t=>t.serviceAgreementId)).pipe((0,z.s)(1),(0,L.pQ)(this.destroyRef),(0,y.T)(t=>t??[])).subscribe(t=>{this.approvalData=[...t],this.tableApprovalsData=(0,u.VZ)(t),this.approvalsSearch.isEnd()&&this.checkCounter.emit(this.approvalData.length)})}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-approvals-container"]],inputs:{pageSize:[1,"pageSize"],currentTabIndex:[1,"currentTabIndex"],businessFunctions:[1,"businessFunctions"],selectedServiceAgreements:[1,"selectedServiceAgreements"],enableComment:[1,"enableComment"],defaultZero:[1,"defaultZero"],enableCAG:[1,"enableCAG"],pendingApprovalsHandling:[1,"pendingApprovalsHandling"],complexBF:[1,"complexBF"]},outputs:{checkCounter:"checkCounter"},features:[e.Jv_([je])],decls:4,vars:5,consts:()=>{let t;return t="Chargement...",[["mainTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["data-role","approvals-detail-modal",3,"approval","enableComment","defaultZero","pendingApprovalsHandling","complexBF"],["loaderSize","sm","data-role","loading-indicator","text",t],[3,"httpError","headingLevel"],["data-role","all-limit-items-approved"],["data-role","approvals-table",3,"selectItem","tableData","selectedServiceAgreements"],["data-role","load-more-button",3,"loadMore","isLoading","isEnd"],["data-role","all-items-approved"],["data-role","approvals-detail-modal",3,"dismiss","approval","enableComment","defaultZero","pendingApprovalsHandling","complexBF"]]},template:function(o,i){if(1&o&&(e.eu8(0,1),e.DNE(1,ji,4,4,"ng-template",null,0,e.C5r),e.nVh(3,ki,1,5,"bb-approvals-detail-view",2)),2&o){const a=e.sdS(2);e.Y8G("ngTemplateOutlet",a)("ngTemplateOutletContext",e.eq3(3,Ie,i.approvalsSearch.error())),e.R7$(3),e.vxM(i.isApprovalsDetailedViewModalOpen?3:-1)}},dependencies:[no,oe,b.OY,b.lW9,N.m,N.T,J,ge,O.T3],encapsulation:2})}}return n})(),za=(()=>{class n{constructor(){this.limitsSearch=(0,s.WQX)(Pe),this.entitlementsService=(0,s.WQX)(u.Y5),this.destroyRef=(0,s.WQX)(s.abz),this.pageSize=c.hFB.required(),this.currentTabIndex=(0,c.hFB)(1),this.businessFunctions=(0,c.hFB)([]),this.selectedServiceAgreements=(0,c.hFB)(null),this.enableComment=(0,c.hFB)(!1),this.checkCounter=(0,c.CGW)(),this.tableLimitsData=[],this.limitsData=[],this.serviceAgreements=[],this.isLimitsDetailedViewModalOpen=!1,(0,s.QZP)(()=>{const t=this.selectedServiceAgreements();t?.length&&(0,s.O8t)(()=>{this.serviceAgreements=[...t],this.limitsSearch.clearCursor(),this.getLimitItems()})})}selectLimit(t){this.selectedLimitData=this.limitsData[t],this.isLimitsDetailedViewModalOpen=!0}loadMore(){this.limitsSearch.getLimitsApprovalLog(this.pageSize(),this.businessFunctions(),this.serviceAgreements.map(t=>t.serviceAgreementId)).pipe((0,z.s)(1),(0,L.pQ)(this.destroyRef),(0,T.M)(t=>{this.limitsData=[...this.limitsData,...t.regularLimits,...t.globalLimits,...t.shadowLimits]}),(0,y.T)(t=>(0,u.vx)(t))).subscribe(t=>{this.tableLimitsData=[...this.tableLimitsData,...t],this.limitsSearch.isEnd()&&this.checkCounter.emit(this.limitsData.length)})}getLimitItems(){this.limitsData=[],this.tableLimitsData=[],this.limitsSearch.getLimitsApprovalLog(this.pageSize(),this.businessFunctions(),this.serviceAgreements.map(t=>t.serviceAgreementId)).pipe((0,z.s)(1),(0,L.pQ)(this.destroyRef),(0,T.M)(t=>{this.limitsData=[...t.regularLimits,...t.globalLimits,...t.shadowLimits]}),(0,y.T)(t=>(0,u.vx)(t))).subscribe(t=>
1{this.tableLimitsData=[...t],this.limitsSearch.isEnd()&&this.checkCounter.emit(this.limitsData.length)})}closeModal(){this.isLimitsDetailedViewModalOpen=!1,this.limitsSearch.clearCursor(),this.entitlementsService.reloadServiceAgreements(),this.entitlementsService.setSelectedTab(this.currentTabIndex())}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-limits-container"]],inputs:{pageSize:[1,"pageSize"],currentTabIndex:[1,"currentTabIndex"],businessFunctions:[1,"businessFunctions"],selectedServiceAgreements:[1,"selectedServiceAgreements"],enableComment:[1,"enableComment"]},outputs:{checkCounter:"checkCounter"},features:[e.Jv_([Pe])],decls:3,vars:4,consts:()=>{let t;return t="Chargement...",[["mainTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["loaderSize","sm","data-role","loading-indicator","text",t],[3,"httpError","headingLevel"],["data-role","all-limit-items-approved"],["data-role","limits-detail-modal",3,"limit","enableComment"],["data-role","limits-table",3,"selectItem","tableData","selectedServiceAgreements"],["data-role","load-more-button",3,"loadMore","isLoading","isEnd"],["data-role","all-items-approved"],["data-role","limits-detail-modal",3,"dismiss","limit","enableComment"]]},template:function(o,i){if(1&o&&(e.eu8(0,1),e.DNE(1,Xi,5,5,"ng-template",null,0,e.C5r)),2&o){const a=e.sdS(2);e.Y8G("ngTemplateOutlet",a)("ngTemplateOutletContext",e.eq3(2,Ie,i.limitsSearch.error()))}},dependencies:[to,oe,b.OY,b.lW9,N.m,N.T,J,ge,O.T3],encapsulation:2})}}return n})(),st=(()=>{class n{constructor(){this.entitlementsService=(0,s.WQX)(u.Y5),this.pageSize=c.hFB.required(),this.selectedServiceAgreements=(0,c.hFB)([]),this.enableComment=(0,c.hFB)(!1),this.defaultZero=(0,c.hFB)(!1),this.config=(0,c.hFB)(),this.notificationDismissTime=(0,c.hFB)(v.TgY),this.enableBfTooltipInfo=(0,c.hFB)(!1),this.bfTooltipInfoFunctionCodes=(0,c.hFB)(null),this.enableCAG=(0,c.hFB)(!1),this.enableAccessControlCAL=(0,c.hFB)(!1),this.limitsStepVisible=(0,c.hFB)(!0),this.pendingApprovalsHandling=(0,c.hFB)(v.Ipq.OFF),this.complexBF=(0,c.hFB)([]),this.subTabs=[],this.businessFunctions=[],this.selectedTabIndex=0,this.consolidatedApprovalsTabs=u.Mi,this.checkCounterSubject=new $.B,this.showNotificationBannerSubject=new Ee.t(!1),this.selectedTabTypeSubject=new Ee.t(void 0),this.selectedTabType$=this.selectedTabTypeSubject.asObservable(),this.showNotificationBanner$=this.showNotificationBannerSubject.asObservable(),this.checkCounterSubject.pipe((0,Lt.E)(this.defineCurrentCounter()),(0,y.T)(([t,o])=>t!==o),(0,L.pQ)()).subscribe(t=>{this.showNotificationBannerSubject.next(t)}),(0,s.QZP)(()=>{const t=this.config();t&&(this.entitlementsConfig=t,t?.subTabs?(this.subTabs=t.subTabs.filter(o=>o.key!==u.Mi.AccessControl||this.enableAccessControlCAL()),this.selectedTabTypeSubject.next(t.subTabs[0].key),this.businessFunctions=[...t.businessFunctions,...t.subTabs[0].businessFunctions],this.entitlementsService.lastSelectedTab&&this.switchTab(this.entitlementsService.lastSelectedTab)):(this.subTabs=[],this.businessFunctions=[...t.businessFunctions]))})}switchTab(t){this.selectedTabIndex=t,this.selectedTabTypeSubject.next(this.subTabs[t].key),this.businessFunctions=[...this.entitlementsConfig.businessFunctions,...this.subTabs[t].businessFunctions],this.showNotificationBannerSubject.next(!1),this.entitlementsService.setSelectedTab(t)}checkTabCounter(t){this.checkCounterSubject.next(t)}reloadView(){this.showNotificationBannerSubject.next(!1),this.entitlementsService.setSelectedTab(this.selectedTabIndex),this.entitlementsService.reloadServiceAgreements()}defineCurrentCounter(){return this.selectedTabType$.pipe((0,w.n)(t=>{switch(t){case u.Mi.Limits:return this.entitlementsService.limitsCounter$;case u.Mi.AccessControl:return this.entitlementsService.accessControlCounter$;default:return this.entitlementsService.approvalsCounter$}}))}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-entitlements-container"]],inputs:{pageSize:[1,"pageSize"],selectedServiceAgreements:[1,"selectedServiceAgreements"],enableComment:[1,"enableComment"],defaultZero:[1,"defaultZero"],config:[1,"config"],notificationDismissTime:[1,"notificationDismissTime"],enableBfTooltipInfo:[1,"enableBfTooltipInfo"],bfTooltipInfoFunctionCodes:[1,"bfTooltipInfoFunctionCodes"],enableCAG:[1,"enableCAG"],enableAccessControlCAL:[1,"enableAccessControlCAL"],limitsStepVisible:[1,"limitsStepVisible"],pendingApprovalsHandling:[1,"pendingApprovalsHandling"],complexBF:[1,"complexBF"]},decls:9,vars:15,consts:()=>{let t,o,i;return t="Certaines actions ont d\xE9j\xE0 \xE9t\xE9 approuv\xE9es",o="Actualisez la page pour voir la nouvelle liste des actions \xE0 approuver.",i="Actualiser",[["mainTemplate",""],["allItemsApprovedTmpl",""],t,o,i,[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"card"],[1,"card-body"],["title","","modifier","warning","data-role","counter-mismatch-alert"],[1,"bb-stack"],[1,"bb-stack__item"],[1,"alert-heading"],[1,"alert-description"],[1,"bb-stack__item","bb-stack__item--push-right"],["bbButton","","color","outline-dark","data-role","reload-view-button",3,"click"],["data-role","entitlements-tab-group",1,"bb-tab--default","bb-text-nowrap",3,"select","initialSelection"],["data-role","entitlements-tab-name",1,"bb-stack__item","bb-stack__item--spacing-sm"],["data-role","approval-counter",1,"bb-stack__item"],["data-role","limits-counter",1,"bb-stack__item"],["data-role","entitlements-counter",1,"bb-stack__item"],["data-role","approvals-table",3,"pageSize","currentTabIndex","businessFunctions","selectedServiceAgreements","enableComment","defaultZero","pendingApprovalsHandling","complexBF"],["data-role","approvals-table",3,"checkCounter","pageSize","currentTabIndex","businessFunctions","selectedServiceAgreements","enableComment","defaultZero","pendingApprovalsHandling","complexBF"],[4,"ngTemplateOutlet"],["data-role","limits-table",3,"pageSize","currentTabIndex","businessFunctions","selectedServiceAgreements","enableComment"],["data-role","limits-table",3,"checkCounter","pageSize","currentTabIndex","businessFunctions","selectedServiceAgreements","enableComment"],["data-role","access-control-table",3,"pageSize","currentTabIndex","businessFunctions","selectedServiceAgreements","enableComment","enableBfTooltipInfo","bfTooltipInfoFunctionCodes","enableCAG","limitsStepVisible","notificationDismissTime"],["data-role","access-control-table",3,"checkCounter","pageSize","currentTabIndex","businessFunctions","selectedServiceAgreements","enableComment","enableBfTooltipInfo","bfTooltipInfoFunctionCodes","enableCAG","limitsStepVisible","notificationDismissTime"],["data-role","all-items-approved"]]},template:function(o,i){if(1&o&&(e.eu8(0,5),e.nI1(1,"async"),e.nI1(2,"async"),e.nI1(3,"async"),e.nI1(4,"async"),e.DNE(
15,_a,5,4,"ng-template",null,0,e.C5r)(7,ua,1,0,"ng-template",null,1,e.C5r)),2&o){const a=e.sdS(6);e.Y8G("ngTemplateOutlet",a)("ngTemplateOutletContext",e.ziG(10,Ki,e.bMT(1,2,i.entitlementsService.approvalsCounter$),e.bMT(2,4,i.entitlementsService.limitsCounter$),e.bMT(3,6,i.entitlementsService.accessControlCounter$),e.bMT(4,8,i.selectedTabType$)))}},dependencies:[oe,Ua,$a,za,Q.y,Ne.Ql,Ne.W1,Ne.je,ue.Z,ue.C,O.T3,j.tm,j._f,O.Jj],encapsulation:2})}}return n})(),Oe=(()=>{class n{constructor(){this.serviceAgreementCounters=(0,c.hFB)(),this.showFullScreenModal=(0,c.hFB)(!1),this.searchValue=(0,c.CGW)(),this.applySelection=(0,c.CGW)(),this.serviceAgreements=[],this.searchControl=new k.MJ(""),this.isLoading=(0,s.vPA)(!1),this.isApplyDisabled=!0,this.switcherService=(0,s.WQX)(u.lC),this.searchControl.valueChanges.pipe((0,Tt.F)(),(0,T.M)(t=>{this.isLoading.set(!0),this.switcherService.searchText=t??"",this.searchValue.emit(this.switcherService.searchText)}),(0,Nt.B)(500),(0,L.pQ)()).subscribe(()=>{this.isLoading.set(!1)}),(0,s.QZP)(()=>{const t=this.serviceAgreementCounters();t&&(this.setCurrentServiceAgreement(t.contextSA),this.setInitialSelectionState(t),this.setServiceAgreementsAmount(),this.setInitialSearchText())})}changeItemsSelection(t){t.preventDefault(),t.stopPropagation(),this.isSomeItemsSelected(this.switcherService.selectedServiceAgreements,this.serviceAgreements)?this.selectAllItems():this.isEveryItemSelected(this.switcherService.selectedServiceAgreements,this.serviceAgreements)?this.clearSelection():this.selectAllItems()}isEveryItemSelected(t,o){const i=t.map(a=>a.serviceAgreementId);return o.every(a=>i.includes(a.serviceAgreementId)||a.isContextSA&&0===a.count)}isSomeItemsSelected(t,o){const i=t.map(a=>a.serviceAgreementId);return!o.every(a=>i.includes(a.serviceAgreementId)||a.isContextSA&&0===a.count)&&o.some(a=>i.includes(a.serviceAgreementId))}selectItem(t,o){this.switcherService.changeItemSelection(t,o),this.isApplyDisabled=this.switcherService.checkIsApplyDisabled()}apply(){this.switcherService.applySelection(this.currentServiceAgreement.serviceAgreementId),this.isApplyDisabled=!0,this.applySelection.emit(this.switcherService.selectedServiceAgreements)}triggerApply(){this.apply()}onClearSearch(){this.searchControl.patchValue("")}setInitialSelectionState(t){const o=this.switcherService.selectedServiceAgreements.map(i=>i.serviceAgreementId);this.serviceAgreements=t.serviceAgreements.map(i=>({...i,isSelected:o.includes(i.serviceAgreementId)}))}selectAllItems(){const t=this.switcherService.selectedServiceAgreements.map(i=>i.serviceAgreementId),o=this.serviceAgreements.filter(i=>i.count>0&&!t.includes(i.serviceAgreementId));this.switcherService.selectedServiceAgreements=[...this.switcherService.selectedServiceAgreements,...o],this.switchItemsSelection(!0)}clearSelection(){const t=this.serviceAgreements.map(o=>o.serviceAgreementId);this.switcherService.selectedServiceAgreements=this.switcherService.selectedServiceAgreements.filter(o=>!t.includes(o.serviceAgreementId)),this.switchItemsSelection(!1)}switchItemsSelection(t){this.serviceAgreements.find(o=>o.isContextSA)&&(this.currentServiceAgreement.isSelected=t),this.serviceAgreements=this.serviceAgreements.map(o=>({...o,isSelected:t})),this.isApplyDisabled=this.switcherService.checkIsApplyDisabled()}setInitialSearchText(){this.switcherService.searchText&&this.searchControl.setValue(this.switcherService.searchText)}setServiceAgreementsAmount(){void 0===this.switcherService.serviceAgreementsAmount&&(this.switcherService.serviceAgreementsAmount=this.serviceAgreements.length)}setCurrentServiceAgreement(t){!this.currentServiceAgreement&&t&&(this.currentServiceAgreement=t)}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-service-agreements-body"]],inputs:{serviceAgreementCounters:[1,"serviceAgreementCounters"],showFullScreenModal:[1,"showFullScreenModal"]},outputs:{searchValue:"searchValue",applySelection:"applySelection"},decls:1,vars:1,consts:()=>{let t,o,i,a,l;return t="Ententes de service " + "[\ufffd#3\ufffd|\ufffd#2:1\ufffd|\ufffd#6\ufffd]" + "(" + "[\ufffd/#3\ufffd|\ufffd/#1:1\ufffd|\ufffd/#2:1\ufffd|\ufffd/#5\ufffd|\ufffd/#6\ufffd]" + "" + "\ufffd*4:1\ufffd" + "" + "\ufffd#1:1\ufffd" + "" + "\ufffd0:1\ufffd" + "" + "[\ufffd/#3\ufffd|\ufffd/#1:1\ufffd|\ufffd/#2:1\ufffd|\ufffd/#5\ufffd|\ufffd/#6\ufffd]" + "" + "[\ufffd#3\ufffd|\ufffd#2:1\ufffd|\ufffd#6\ufffd]" + "/" + "[\ufffd/#3\ufffd|\ufffd/#1:1\ufffd|\ufffd/#2:1\ufffd|\ufffd/#5\ufffd|\ufffd/#6\ufffd]" + "" + "\ufffd/*4:1\ufffd" + "" + "\ufffd#5\ufffd" + "" + "\ufffd0\ufffd" + "" + "[\ufffd/#3\ufffd|\ufffd/#1:1\ufffd|\ufffd/#2:1\ufffd|\ufffd/#5\ufffd|\ufffd/#6\ufffd]" + "" + "[\ufffd#3\ufffd|\ufffd#2:1\ufffd|\ufffd#6\ufffd]" + ")" + "[\ufffd/#3\ufffd|\ufffd/#1:1\ufffd|\ufffd/#2:1\ufffd|\ufffd/#5\ufffd|\ufffd/#6\ufffd]" + "",t=e.k04(t),o="S\xE9lectionner toutes les ententes de service",i="Tout s\xE9lectionner",a="Loading...",l="Appliquer",[t,i,l,[3,"class"],["data-role","sa-search-box",3,"searchControl","serviceAgreements"],["data-role","sa-switcher-container",1,"bb-padding-box-horizontal--md","bb-padding-box-vert
1ical--sm","bb-sa-switcher-list",3,"bb-stack__item","bb-stack__item--fill","bb-block--full-width"],["data-role","loading-state",1,"bb-state-container","bb-block","bb-block--lg",3,"bb-stack__item","bb-stack__item--fill"],[1,"bb-stack","divider-outer-top","bb-padding-box--md"],["data-role","sa-switcher-container",1,"bb-padding-box-horizontal--md","bb-padding-box-vertical--sm","bb-sa-switcher-list"],["data-role","sa-list"],["data-role","empty-search"],["data-role","sa-counter",1,"text-small","bb-subheader","bb-text-support"],["data-role","sa-counter-all"],["data-role","select-all-container",1,"bb-stack","bb-stack--density-sm","bb-padding-box-vertical--sm"],["data-role","sa-counter-found"],["data-role","select-all-checkbox","aria-label",o,1,"bb-stack__item",3,"change","ngModel","indeterminate"],[1,"bb-subheader"],[3,"counter","name","isSelected","isCurrent"],["data-role","current-service-agreement-item",3,"counter","name","isSelected","isCurrent"],[3,"selectItem","counter","name","isSelected","isCurrent"],["data-role","loading-state",1,"bb-state-container","bb-block","bb-block--lg"],["loaderSize","sm","text",a],["bbButton","","color","primary","data-role","apply-button","buttonSize","sm",1,"bb-stack__item","bb-stack__item--push-right",3,"click","disabled"]]},template:function(o,i){1&o&&e.nVh(0,Da,5,6,"div",3),2&o&&e.vxM(i.serviceAgreements&&i.currentServiceAgreement?0:-1)},dependencies:[k.YN,k.BC,k.vS,k.X1,Q.y,j.tm,j._f,B.b,R.o,ne.m,ne.R,N.m,N.T,Se.u,b.s1W,Co,b.PHJ,De.e,oo,io,ao,b.PeJ],encapsulation:2,changeDetection:0})}}return n})();var Ha=g(81535),Xa=g(84572),Ka=g(5964),Ja=g(13018);const Wa=(n,r,t)=>({userServiceAgreementsCounters:n,searchValue:r,error:t}),Ya=n=>({"container--drag-up":n}),Qa=()=>({fullscreen:!0,scrollable:!1}),qa=n=>[n],Za=(n,r)=>r.route;function es(n,r){if(1&n&&e.nrm(0,"bb-page-header-ui",4),2&n){const t=e.XpG(2);e.Y8G("showBackground",t.config.deElevatedHeading)}}function ts(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-service-agreements-body",16),e.bIt("searchValue",function(i){s.eBV(t);const a=e.XpG(5);return s.Njj(a.searchServiceAgreement(i))})("applySelection",function(i){s.eBV(t);const a=e.XpG(5);return s.Njj(a.onSwitcherModalApply(i))}),e.k0s()}if(2&n){const t=e.XpG(4).userServiceAgreementsCounters;e.Y8G("serviceAgreementCounters",t)("showFullScreenModal",!0)}}function ns(n,r){if(1&n){const t=e.RV6();e.j41(0,"button",17),e.bIt("click",function(){s.eBV(t);const i=e.XpG(5);return s.Njj(i.applyFromModal())}),e.j41(1,"span"),e.pXf(2,2),e.k0s()()}if(2&n){const t=e.XpG(5);e.Y8G("block",!0)("disabled",t.isModalApplyDisabled())}}function os(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-modal-ui",12),e.bIt("cancel",function(){s.eBV(t);const i=e.XpG(4);return s.Njj(i.isSwitcherModalOpen.set(!1))}),e.j41(1,"bb-modal-header-ui",13),e.bIt("close",function(){s.eBV(t);const i=e.XpG(4);return s.Njj(i.isSwitcherModalOpen.set(!1))}),e.k0s(),e.j41(2,"bb-modal-body-ui"),e.DNE(3,ts,1,2,"ng-template",14),e.k0s(),e.j41(4,"bb-modal-footer-ui"),e.DNE(5,ns,3,2,"ng-template",15),e.k0s()()}2&n&&e.Y8G("isOpen",!0)("modalOptions",e.lJ4(2,Qa))}function is(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-service-agreements-switcher",8),e.bIt("modalTriggerClick",function(){s.eBV(t);const i=e.XpG(3);return s.Njj(i.isSwitcherModalOpen.set(!0))}),e.j41(1,"div",9),e.nrm(2,"bb-service-agreement-title",10),e.k0s()(),e.nVh(3,os,6,3,"bb-modal-ui",11)}if(2&n){let t;const o=e.XpG(2),i=o.userServiceAgreementsCounters,a=o.searchValue,l=e.XpG();e.Y8G("modalTrigger",!0)("isModalOpen",l.isSwitcherModalOpen())("isDisabled",l.isSwitcherDisabled(i,a)),e.R7$(2),e.Y8G("title",l.selectedServiceAgreement.title||(null==(t=l.contextSA())?null:t.serviceAgreementName)||"")("serviceAgreementsAmount",l.selectedServiceAgreement.selectedServiceAgreementsAmount),e.R7$(),e.vxM(l.isSwitcherModalOpen()?3:-1)}}function as(n,r){if(1&n){const t=e.RV6();e.j41(0,"bb-service-agreements-switcher",7)(1,"div",9),e.qex(2),e.nrm(3,"bb-service-agreement-title",10),e.bVm(),e.k0s(),e.j41(4,"div",18)(5,"bb-service-agreements-body",19),e.bIt("searchValue",function(i){s.eBV(t);const a=e.XpG(3);return s.Njj(a.searchServiceAgreement(i))})("applySelection",function(i){s.eBV(t);const a=e.XpG(3);return s.Njj(a.applySelectedSA(i))}),e.k0s()()()}if(2&n){let t;const o=e.XpG(2),i=o.userServiceAgreementsCounters,a=o.searchValue,l=e.XpG();e.Y8G("closeDropdown",l.closeDropdown$)("isDisabled",l.isSwitcherDisabled(i,a)),e.R7$(3),e.Y8G("title",l.selectedServiceAgreement.title||(null==(t=l.contextSA())?null:t.serviceAgreementName)||"")("serviceAgreementsAmount",l.selectedServiceAgreement.selectedServiceAgreementsAmount),e.R7$(2),e.Y8G("serviceAgreementCounters",i)}}
1function ss(n,r){if(1&n&&e.nVh(0,is,4,6)(1,as,6,5,"bb-service-agreements-switcher",7),2&n){const t=e.XpG(2);e.vxM(t.isMobile()?0:1)}}function rs(n,r){if(1&n&&(e.j41(0,"div",6),e.nrm(1,"bb-accessgroup-error",20),e.k0s()),2&n){const t=e.XpG().error;e.R7$(),e.Y8G("httpError",t)}}function ls(n,r){if(1&n&&(e.j41(0,"span",26),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.SpI("(",t>999?"999+":t,")")}}function cs(n,r){1&n&&e.nVh(0,ls,2,1,"span",26),2&n&&e.vxM(r>0?0:-1)}function ds(n,r){if(1&n&&(e.nVh(0,cs,1,1),e.nI1(1,"async")),2&n){let t;const o=e.XpG(4);e.vxM((t=e.bMT(1,1,o.entitlementsService.entitlementsCounter$))?0:-1,t)}}function ps(n,r){if(1&n&&(e.j41(0,"span",26),e.EFF(1),e.k0s()),2&n){e.XpG();const t=e.r8f(0);e.R7$(),e.SpI("(",t>999?"999+":t,")")}}function _s(n,r){if(1&n&&(e.SS7(0),e.nI1(1,"calculateTabCount"),e.nVh(2,ps,2,1,"span",26)),2&n){const t=e.XpG(2).$implicit;e.XpG(3);const o=e.r8f(0),i=e.bH3(e.i5U(1,1,t.bf,o));e.R7$(2),e.vxM(i>0?2:-1)}}function us(n,r){if(1&n&&e.nVh(0,_s,3,5),2&n){e.XpG(4);const t=e.r8f(0);e.vxM(t?0:-1)}}function ms(n,r){if(1&n&&(e.j41(0,"a",22)(1,"div",24)(2,"span",25),e.EFF(3),e.k0s(),e.nVh(4,ds,2,3),e.nVh(5,us,1,1),e.k0s()()),2&n){const t=r.$implicit,o=e.XpG(3);e.Y8G("routerLink",e.eq3(4,qa,t.route)),e.R7$(3),e.JRh(null==t?null:t.title),e.R7$(),e.vxM(t.key===o.consolidatedApprovalsTabs.Entitlements?4:-1),e.R7$(),e.vxM(t.key===o.consolidatedApprovalsTabs.Custom?5:-1)}}function gs(n,r){1&n&&(e.j41(0,"div",23),e.nrm(1,"router-outlet"),e.k0s())}function hs(n,r){1&n&&e.eu8(0)}function bs(n,r){if(1&n&&e.DNE(0,hs,1,0,"ng-container",27),2&n){e.XpG();const t=e.sdS(7);e.Y8G("ngTemplateOutlet",t)}}function As(n,r){1&n&&(e.j41(0,"div",28)(1,"div",29)(2,"div",30),e.nrm(3,"bb-loading-indicator-ui"),e.k0s()()())}function fs(n,r){if(1&n&&(e.j41(0,"div")(1,"div",21),e.Z7z(2,ms,6,6,"a",22,Za),e.k0s()(),e.nVh(4,gs,2,0,"div",23)(5,bs,1,1,"ng-container"),e.DNE(6,As,4,0,"ng-template",null,1,e.C5r)),2&n){const t=e.XpG(2);e.AVh("bb-tab--on-color",t.config.displayHeading&&t.config.deElevatedHeading),e.R7$(2),e.Dyx(t.tabs),e.R7$(2),e.vxM(t.isLoading?5:4)}}function vs(n,r){if(1&n&&(e.nVh(0,es,1,1,"bb-page-header-ui",4),e.j41(1,"div",5),e.nVh(2,ss,2,1),e.nVh(3,rs,2,1,"div",6),e.nVh(4,fs,8,3),e.k0s()),2&n){const t=r.error,o=e.XpG();e.vxM(o.config.displayHeading?0:-1),e.R7$(),e.Y8G("ngClass",e.eq3(5,Ya,o.config.displayHeading&&o.config.deElevatedHeading)),e.R7$(),e.vxM(t||o.isLoading?-1:2),e.R7$(),e.vxM(t?3:-1),e.R7$(),e.vxM(t?-1:4)}}const rt=()=>[];function Cs(n,r){if(1&n&&e.nrm(0,"bb-custom-cal-container",2),2&n){const t=e.XpG();e.Y8G("strategyToken",t.currentStrategyToken)("headerToken",t.headerExtensionToken)("businessFunctions",t.businessFunctions||e.lJ4(7,rt))("detailsToken",t.detailExtensionToken)("pageSize",t.config.approvalItemsAmount)("selectedServiceAgreements",t.selectedServiceAgreements()||e.lJ4(8,rt))("enableComment",t.config.isCommentingEnabled)}}function Es(n,r){1&n&&(e.j41(0,"div",0),e.nrm(1,"bb-payments-view"),e.k0s())}function Ss(n,r){1&n&&(e.j41(0,"div",0),e.nrm(1,"bb-batches-view"),e.k0s())}function Ds(n,r){1&n&&(e.j41(0,"div",0),e.nrm(1,"bb-contacts-view"),e.k0s())}function Ms(n,r){if(1&n&&(e.nrm(0,"bb-custom-cal-view",1),e.nI1(1,"async"),e.nI1(2,"async")),2&n){const t=e.XpG();e.Y8G("configNumber",e.bMT(1,2,t.configIndex$))("selectedServiceAgreements",e.bMT(2,4,t.entitlementsService.selectedServiceAgreements$))}}function Ls(n,r){if(1&n&&(e.j41(0,"div",0),e.nrm(1,"bb-entitlements-view",1),e.nI1(2,"async"),e.nI1(3,"async"),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.Y8G("configNumber",e.bMT(2,2,t.configIndex$))("selectedServiceAgreements",e.bMT(3,4,t.entitlementsService.selectedServiceAgreements$))}}const lt=new s.nKC("ConsolidatedApprovalLogJourneyConfigurationToken injection token"),be={payments:"Paiements",batches:"Fichiers",contacts:"Contacts",entitlements:"Permissions"},ct={deElevatedHeading:!0,displayHeading:!0,customTabs:[{key:u.Mi.Payments,name:be.payments,businessFunctions:[]},{key:u.Mi.Batches,name:be.batches,businessFunctions:[]},{key:u.Mi.Contacts,name:be.contacts,businessFunctions:[]},{key:u.Mi.Entitlements,name:be.entitlements,businessFunctions:[]}],approvalItemsAmount:10,isCommentingEnabled:!0,pendingApprovalsHandling:v.Ipq.RESET,defaultZero:!1,complexBF:[],notificationDismissTime:v.TgY,showLegalEntityName:!1,enableSequentialApprovals:!1,enableBfTooltipInfo:!0,bfTooltipInfoFunctionCodes:["quick.user.setup","assign.permissions","manage.self.approve.permissions","manage.a
1pproval.policy.global.restrictions","manage.approval.policy.restrictions"],enableCAG:!1,enableAccessControlCAL:!1,limitsStepVisible:!0};let Ae=(()=>{class n{constructor(){this.config=(0,s.WQX)(lt,{optional:!0}),this._config={...ct,...this.config??{}}}get enableCAG(){return this._config.enableCAG??!1}get enableAccessControlCAL(){return this._config.enableAccessControlCAL??!1}get deElevatedHeading(){return this._config.deElevatedHeading}get displayHeading(){return this._config.displayHeading}get customTabs(){return this._config.customTabs}get approvalItemsAmount(){return this._config.approvalItemsAmount}get isCommentingEnabled(){return this.config?.isCommentingEnabled??ct.isCommentingEnabled}get pendingApprovalsHandling(){return this._config.pendingApprovalsHandling}get defaultZero(){return this._config.defaultZero}get complexBF(){return this._config.complexBF}get notificationDismissTime(){return this._config.notificationDismissTime}get showLegalEntityName(){return this._config.showLegalEntityName}get enableSequentialApprovals(){return this._config.enableSequentialApprovals}get enableBfTooltipInfo(){return this._config.enableBfTooltipInfo??!1}get bfTooltipInfoFunctionCodes(){return this._config.bfTooltipInfoFunctionCodes??null}get limitsStepVisible(){return this._config.limitsStepVisible??!0}setDeElevatedHeading(t){this._config.deElevatedHeading=t}setDisplayHeading(t){this._config.displayHeading=t}setCustomTabs(t){this._config.customTabs=t}setApprovalItemsAmount(t){this.checkApprovalItemsAmountHasCorrectRange(t)&&(this._config.approvalItemsAmount=t)}setPendingApprovalsHandling(t){this._config.pendingApprovalsHandling=t}setDefaultZero(t){this._config.defaultZero=t}setComplexBF(t){this._config.complexBF=t}setNotificationDismissTime(t){this._config.notificationDismissTime=t}setShowLegalEntityName(t){this._config.showLegalEntityName=t}setEnableSequentialApprovals(t){this._config.enableSequentialApprovals=t}setEnableBfTooltipInfo(t){this._config.enableBfTooltipInfo=t}setBfTooltipInfoFunctionCodes(t){this._config.bfTooltipInfoFunctionCodes=t}setEnableCAG(t){this._config.enableCAG=t}setEnableAccessControlCAL(t){this._config.enableAccessControlCAL=t}setLimitsStepVisible(t){this._config.limitsStepVisible=t}checkApprovalItemsAmountHasCorrectRange(t){if(t<1||t>100)throw new Error(`Cannot set approvalItemsAmount to ${t}. It must be in the range of 1-100.`);return!0}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275prov=s.jDH({token:n,factory:n.\u0275fac})}}return n})(),dt=(()=>{class n{#e;#t;#o;#s;#n;#a;#r;#c;#l;constructor(){this.#e=new Ee.t(""),this.searchValue$=this.#e.asObservable(),this.#t=new $.B,this.#o=(0,s.WQX)(Z.Ix),this.#s=(0,s.WQX)(Z.nX),this.config=(0,s.WQX)(Ae),this.#n=(0,s.WQX)(xe),this.#a=(0,s.WQX)(Ja.eo),this.entitlementsService=(0,s.WQX)(u.Y5),this.#r=(0,s.WQX)(u.lC),this.userServiceAgreementsCounters$=(0,Xa.z)([this.#t,this.searchValue$]).pipe((0,y.T)(([t,o])=>{const i=o?.toLowerCase().trim()??"";return[t.userServiceAgreementCounters.filter(a=>a.serviceAgreementName?.toLowerCase().includes(i)),i]}),(0,y.T)(([t,o])=>this.#g(t,o))),this.#c=new $.B,this.closeDropdown$=this.#c.asObservable(),this.#l=(0,s.WQX)(Ha.Q),this.isMobile=(0,L.ot)(this.#l.observe("(max-width: 768px)").pipe((0,y.T)(t=>t.matches)),{initialValue:!1}),this.isSwitcherModalOpen=(0,s.vPA)(!1),this.contextSA=this.#n.selectedSACounter,this.isLoading=!1,this.consolidatedApprovalsTabs=u.Mi,this.selectedServiceAgreement={title:"",selectedServiceAgreementsAmount:0},this.error$=this.#n.error$,this.tabs=this.#_(this.config.customTabs)||[],this.#i(),this.#o.events.pipe((0,Ka.p)(t=>t instanceof Z.wF),(0,L.pQ)()).subscribe(()=>{this.#s.firstChild?.snapshot?.paramMap.get("tab")||(this.#i(),this.#d())}),this.entitlementsService.reloadServiceAgreements$.pipe((0,L.pQ)()).subscribe(()=>{this.applySelectedSA(this.#r.selectedServiceAgreements)})}ngOnInit(){this.#d()}#d(){let t;this.isLoading=!0,this.#a.getServiceAgreementContext().pipe((0,T.M)(o=>{t=o}),(0,w.n)(o=>this.#n.getConsolidatedApprovalsCount(this.#p(this.config.customTabs),[{serviceAgreementId:o.id,serviceAgreementName:o.name}])),(0,T.M)(o=>{const i=o.userServiceAgreementCounters.find(a=>a.serviceAgreementId===t.id)?.count;i&&this.#m(t,i)}),(0,z.s)(1),(0,P.j)(()=>{this.isLoading=!1})).subscribe(o=>{this.#h(o,t),this.#t.next(o),this.#u(o,t)}
1)}ngOnDestroy(){this.#r.selectedServiceAgreements=[],this.#r.previouslySelectedIds=[],this.entitlementsService.lastSelectedTab=0}searchServiceAgreement(t){this.#e.next(t??"")}onSwitcherModalApply(t){this.applySelectedSA(t),this.isSwitcherModalOpen.set(!1)}applyFromModal(){this.switcherBody?.triggerApply()}isModalApplyDisabled(){return this.#r.checkIsApplyDisabled()}isSwitcherDisabled(t,o){const i=o??"",a=t?.serviceAgreements??[];return!a.length&&!i.length||!i.length&&(!a.some(d=>d.count>0)||1===a.length&&!!a[0].isContextSA&&a[0].count>0)}applySelectedSA(t){this.isLoading=!0,this.selectedServiceAgreement={selectedServiceAgreementsAmount:t.length-1,title:t[0].serviceAgreementName},this.#n.getConsolidatedApprovalsCount(this.#p(this.config.customTabs),t.map(o=>({serviceAgreementId:o.serviceAgreementId,serviceAgreementName:o.serviceAgreementName}))).pipe((0,z.s)(1),(0,P.j)(()=>{this.isLoading=!1})).subscribe(o=>{o.selectedServiceAgreementCounters?(this.entitlementsService.setCounters(o.selectedServiceAgreementCounters?.selectedFunctionsCounters),this.#t.next(o)):this.entitlementsService.setCounters([])}),this.#c.next()}#i(){if(!this.tabs.length)return;const t=this.#s.firstChild?.snapshot?.paramMap.get("tab");t&&this.tabs.some(i=>i.route===t)||this.#o.navigate([this.tabs[0].route],{relativeTo:this.#s})}#_(t){return t?.filter(o=>o.key&&o.name).map((o,i)=>({title:o.name||`Tab_${i+1}`,route:`${o.key}_${i+1}`||`${i+1}`,key:o.key,bf:o.businessFunctions}))}#p(t){const o=[];return t?.forEach(i=>{if(i.businessFunctions.length&&o.push(...i.businessFunctions),i.subTabs?.length){const a=i.subTabs?.map(l=>l.businessFunctions).reduce((l,d)=>l.concat(d),[]);o.push(...a)}}),o}#u(t,o){t.selectedServiceAgreementCounters?this.entitlementsService.setCounters(t.selectedServiceAgreementCounters?.selectedFunctionsCounters):(this.entitlementsService.setCounters([]),this.#n.selectedSACounter.set({serviceAgreementId:o.id,serviceAgreementName:o.name,count:0}))}#h(t,o){const i=t.userServiceAgreementCounters.find(a=>a.serviceAgreementId===o.id);i?this.#n.selectedSACounter.set(i):this.#n.selectedSACounter.set({serviceAgreementId:o.id,serviceAgreementName:o.name,count:0})}#m(t,o){this.#r.selectedServiceAgreements=[{serviceAgreementName:t.name,serviceAgreementId:t.id,count:o??0,isContextSA:!0,isSelected:!0}],this.#r.previouslySelectedIds=[t.id]}#g(t,o=""){const i={...this.contextSA(),isSelected:!!this.contextSA()?.count,isContextSA:!0};let a=t.sort((p,h)=>(0,u.oz)(p,h,this.contextSA()?.serviceAgreementId??"")).map(p=>({...p,isSelected:p.serviceAgreementId===this.contextSA()?.serviceAgreementId&&p.count>0,isContextSA:p.serviceAgreementId===this.contextSA()?.serviceAgreementId}));const l=this.contextSA()?.serviceAgreementId??"",d=a.some(p=>p.serviceAgreementId===l);if((0,u.T4)(d,i,o))a=[i,...a];else{const p=a.findIndex(h=>h.isContextSA);if(p>-1){const[h]=a.splice(p,1);a=[h,...a]}}return{serviceAgreements:(0,u.Jb)(a,o),contextSA:i}}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-consolidated-approval-log-journey"]],viewQuery:function(o,i){if(1&o&&e.GBs(Oe,5),2&o){let a;e.mGM(a=e.lsd())&&(i.switcherBody=a.first)}},standalone:!1,decls:8,vars:15,consts:()=>{let t,o,i,a;return t="Actions \xE0 approuver",o="S\xE9lectionner des contrats de service",i="Fermer le menu d\xE9roulant des ententes de service",a="Appliquer",[["mainTemplate",""],["loadingTmpl",""],a,[3,"ngTemplateOutlet","ngTemplateOutletContext"],["title",t,"data-role","consolidated-approvals-log-journey-page-header",3,"showBackground"],[1,"container-fluid",3,"ngClass"],[1,"card","card-body","bb-block--lg"],[3,"closeDropdown","isDisabled"],[3,"modalTriggerClick","modalTrigger","isModalOpen","isDisabled"],["switcherSelectedItem","",1,"bb-ellipsis--responsive-container"],[3,"title","serviceAgreementsAmount"],[3,"isOpen","modalOptions"],[3,"cancel","isOpen","modalOptions"],["title",o,"closeButtonAriaLabel",i,3,"close"],["bbCustomModalBody",""],["bbCustomModalFooter",""],[3,"searchValue","applySelection","serviceAgreementCounters","showFullScreenModal"],["bbButton","","color","primary","type","button","data-role","apply-button",3,"click","block","disabled"],["switcherBody","",1,"dropdown-menu-toggle-button__content--full-width"],[3,"searchValue","applySelection","serviceAgreementCounters"],[1,"bb-state-container",3,"httpError"],["role","tablist",1,"bb-tab-container__tabs","nav","nav-tabs"],["role","tab","data-role","consolidated-approvals-log-journey-tab","routerLinkActive","active",1,"nav-link","nav-item",3,"routerLink"],["role","tabpanel",1,"bb-tab-container__content","tab-content"],[1,"bb-stack"],["data-role","tab-title",1,"bb-stack__item","bb-stack__item--spacing-xs"],["data-role","tab-counter",1,"bb-stack__item"],[4,"ngTemplateOutlet"],[1,"card"],[1,"card-body"],["data-role","approval-levels-table-loading-state",1,"bb-state-container","bb-state-container--min-height"]]},template:function(o,i){if(1&o&&(e.SS7(0),e.nI1(1,"async"),e.eu8(2,3),e.nI1(3,"async"),e.nI1(4,"async"),e.nI1(5,"async"),e.DNE(6,vs,5,7,"ng-template",null,0,e.C5r)),2&o){const a=e.sdS(7);e.bH3(e.bMT(1,2,i.entitlementsService._counters)),e.R7$(2),e.Y8G("ngTemplateOutlet",a)("ngTemplateOutletContext",e.sMw(11,Wa,e.bMT(3,5,i.userServiceAgreementsCounters$),e.bMT(4,7,i.searchValue$),e.bMT(5,9,i.error$)))}},dependencies:[O.YU,O.T3,Z.n3,ie.Wk,ie.wQ,fe.yv,N.T,j._f,C.zf,C.s$,C.xg,C.Jy,C.GI,C.ep,b.lW9,Le,Me,Oe,O.Jj,Je],encapsulation:2})}}return n})(),pt=(()=>{class n{static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-payments-view"]],standalone:!1,decls:0,vars:0,template:function(o,i){},encapsulation:2})}}return n})(),_t=(()=>{class n{static{this.\u0275fac=function(o){return new(o||n)}}
1static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-batches-view"]],standalone:!1,decls:0,vars:0,template:function(o,i){},encapsulation:2})}}return n})(),ut=(()=>{class n{static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-contacts-view"]],standalone:!1,decls:0,vars:0,template:function(o,i){},encapsulation:2})}}return n})(),mt=(()=>{class n{constructor(){this.configNumber=(0,c.hFB)(0),this.selectedServiceAgreements=(0,c.hFB)([]),this.currentStrategyToken=null,this.detailExtensionToken=null,this.headerExtensionToken=null,this.businessFunctions=[],this.config=(0,s.WQX)(Ae)}ngOnChanges(){const t=this.config.customTabs?.[this.configNumber()-1]?.searchStrategy,o=this.config.customTabs?.[this.configNumber()-1]?.headerToken,i=this.config.customTabs?.[this.configNumber()-1]?.detailToken,a=this.config.customTabs?.[this.configNumber()-1]?.businessFunctions;this.currentStrategyToken=null,queueMicrotask(()=>{this.currentStrategyToken=t,this.detailExtensionToken=i,this.headerExtensionToken=o,this.businessFunctions=a})}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-custom-cal-view"]],inputs:{configNumber:[1,"configNumber"],selectedServiceAgreements:[1,"selectedServiceAgreements"]},standalone:!1,features:[e.OA$],decls:3,vars:1,consts:[[1,"card"],[1,"card-body"],[3,"strategyToken","headerToken","businessFunctions","detailsToken","pageSize","selectedServiceAgreements","enableComment"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"div",1),e.nVh(2,Cs,1,9,"bb-custom-cal-container",2),e.k0s()()),2&o&&(e.R7$(2),e.vxM(i.currentStrategyToken?2:-1))},dependencies:[tt],encapsulation:2})}}return n})(),gt=(()=>{class n{constructor(){this.configNumber=(0,c.hFB)(0),this.selectedServiceAgreements=(0,c.hFB)([]),this.config=(0,s.WQX)(Ae)}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-entitlements-view"]],inputs:{configNumber:[1,"configNumber"],selectedServiceAgreements:[1,"selectedServiceAgreements"]},standalone:!1,decls:1,vars:13,consts:[[3,"pageSize","config","selectedServiceAgreements","enableComment","defaultZero","pendingApprovalsHandling","complexBF","enableBfTooltipInfo","bfTooltipInfoFunctionCodes","notificationDismissTime","enableCAG","enableAccessControlCAL","limitsStepVisible"]],template:function(o,i){1&o&&e.nrm(0,"bb-entitlements-container",0),2&o&&e.Y8G("pageSize",i.config.approvalItemsAmount)("config",i.config.customTabs?i.config.customTabs[i.configNumber()-1]:void 0)("selectedServiceAgreements",i.selectedServiceAgreements())("enableComment",i.config.isCommentingEnabled)("defaultZero",i.config.defaultZero)("pendingApprovalsHandling",i.config.pendingApprovalsHandling)("complexBF",i.config.complexBF)("enableBfTooltipInfo",i.config.enableBfTooltipInfo)("bfTooltipInfoFunctionCodes",i.config.bfTooltipInfoFunctionCodes)("notificationDismissTime",i.config.notificationDismissTime)("enableCAG",i.config.enableCAG)("enableAccessControlCAL",i.config.enableAccessControlCAL)("limitsStepVisible",i.config.limitsStepVisible)},dependencies:[st],encapsulation:2})}}return n})();const Ts={path:"",component:dt,children:[{path:":tab",pathMatch:"full",component:(()=>{class n{constructor(){this.route=(0,s.WQX)(Z.nX),this.entitlementsService=(0,s.WQX)(u.Y5),this.ApprovalsKeys=u.Mi,this.activeTab$=this.route.params.pipe((0,y.T)(t=>t?.tab?.split("_")[0])),this.configIndex$=this.route.params.pipe((0,y.T)(t=>t?.tab?.slice(t?.tab?.indexOf("_")+1)))}ngOnDestroy(){this.entitlementsService.setCounters([])}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["bb-consolidated-approval-log-view"]],standalone:!1,decls:7,vars:3,consts:[["role","tabpanel"],[3,"configNumber","selectedServiceAgreements"]],template:function(o,i){if(1&o&&(e.j41(0,"div"),e.nVh(1,Es,2,0,"div",0),e.nI1(2,"async"),e.vZN(3,Ss,2,0,"div",0)(4,Ds,2,0,"div",0)(5,Ms,3,6,"bb-custom-cal-view",1)(6,Ls,4,6,"div",0),e.k0s()),2&o){let a;e.R7$(),e.vxM((a=e.bMT(2,1,i.activeTab$))===i.ApprovalsKeys.Payments?1:a===i.ApprovalsKeys.Batches?3:a===i.ApprovalsKeys.Contacts?4:a===i.ApprovalsKeys.Custom?5:a===i.ApprovalsKeys.Entitlements?6:-1)}},dependencies:[pt,_t,ut,mt,gt,O.Jj],encapsulation:2})}}return n})()}]},Ns=[st,Oe,tt];let Is=(()=>{class n{static forRoot(t={route:Ts}){return{ngModule:n,providers:[(0,ie.sV)([t.route])]}}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275mod=e.$C({type:n})}static{this.\u0275inj=s.G2t({providers:[Ae,xe,u.Y5,u.lC],imports:[O.MD,ie.iI,fe.Lo,N.m,Q.y,j.tm,C.Q_,b.OY,Le,Me,Ns]})}}return n})();var ye=g(81606),Re=g(63753),Os=g(1915),Fe=g(2809);const ys={key:u.Mi.Entitlements,name:"Gestion des acc\xE8s",businessFunctions:[],subTabs:[{key:u.Mi.AccessControl,name:"Permissions",businessFunctions:Fe.x3q}
1,{key:u.Mi.Approvals,name:"R\xE8gles d'approbation",businessFunctions:[{functionName:Fe.gU4.AssignApprovalPolicies,resourceName:Fe.i0l.Approvals}]}]};let Rs=(()=>{class n{static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275mod=e.$C({type:n})}static{this.\u0275inj=s.G2t({providers:[{provide:lt,useFactory:()=>({deElevatedHeading:!0,displayHeading:!0,customTabs:[ys],enableAccessControlCAL:!0,isCommentingEnabled:!0,pendingApprovalsHandling:v.Ipq.RESET})},{provide:ye.Sc,useExisting:Re.SK},{provide:ye.Sc,useExisting:Re.SK},{provide:ye.Sc,useExisting:Re.SK},{provide:v.CKB,useClass:Os.Jv}],imports:[Is.forRoot()]})}}return n})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.