PageSourceSearch

https://razorsys.com/401.da1654754f6a0503.js

js razorsys.com collected 2026-10-04 03:42:29 UTC 642,395 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkwebclient_webpack=self.webpackChunkwebclient_webpack||[]).push([[401],{14059(te,k,t){t.d(k,{ZU:()=>q,lE:()=>K,bQ:()=>D});var C=t(85802),y=t(17705),A=t(89417),o=t(59882),g=t(9836),c=t(71747),p=t(74651),b=t(84412),L=t(85343),H=t(96354),S=t(38601),I=t(54327),i=t(48643),r=t(62329),T=t(74005),n=t(76415),u=t(47429),_=t(82286),d=t(83188),$=t(87019),w=t(59625),R=t(73370),f=t(68018),O=t(49769),M=t(78713),m=t(91382),P=t(45764),a=t(62653),l=t(89755),e=t(12426),s=t(42610),h=t(58368),x=t(4801),E=t(89079),B=t(77498);class j{dataSource;callsParameters;constructor(F,N){this.dataSource=F,this.callsParameters=N}resolveData(F,N,Z,Y){if(!this.callsParameters||!this.callsParameters.canViewReport)return(0,I.BY)().pipe((0,B.c)(0));const z=F-1;return this.dataSource.requestAbandonedChatsStatistics(this.callsParameters,z,N+1,z*N).pipe((0,H.T)(ie=>(0,I.ro)(F,N,ie.value)))}}var v=t(35547);const Q=(G,F)=>[G,F];function V(G,F){if(1&G){const N=v.RV6();v.j41(0,"tr")(1,"td",11),v.EFF(2),v.k0s(),v.j41(3,"td",12),v.EFF(4),v.nI1(5,"emptyValue"),v.k0s(),v.j41(6,"td"),v.EFF(7),v.nI1(8,"emptyValue"),v.k0s(),v.j41(9,"td"),v.EFF(10),v.nI1(11,"emptyValue"),v.k0s(),v.j41(12,"td"),v.EFF(13),v.nI1(14,"emptyValue"),v.k0s(),v.j41(15,"td"),v.EFF(16),v.nI1(17,"appJsDateFormat"),v.nI1(18,"emptyValue"),v.k0s(),v.j41(19,"td"),v.EFF(20),v.nI1(21,"emptyValue"),v.k0s(),v.j41(22,"td"),v.EFF(23),v.nI1(24,"emptyValue"),v.k0s(),v.j41(25,"td")(26,"span",13),v.bIt("click",function(){const Y=C.eBV(N).$implicit,z=v.XpG();return C.Njj(z.msgEllipsis.add(Y))}),v.EFF(27),v.k0s()()()}if(2&G){const N=F.$implicit,Z=v.XpG();v.R7$(2),v.JRh(Z.formatAndJoinValues(v.l_i(26,Q,N.QueueNo,N.QueueDisplayName))),v.R7$(2),v.JRh(v.bMT(5,10,N.Source)),v.R7$(3),v.JRh(v.bMT(8,12,N.ParticipantName)),v.R7$(3),v.JRh(v.bMT(11,14,N.ParticipantNumber)),v.R7$(3),v.JRh(v.bMT(14,16,N.ParticipantEmail)),v.R7$(3),v.JRh(v.bMT(18,20,v.bMT(17,18,N.DateOfRequest))),v.R7$(4),v.JRh(v.bMT(21,22,N.ReasonForAbandoned)),v.R7$(3),v.JRh(v.bMT(24,24,N.ReasonForDealtWith)),v.R7$(3),v.Y8G("appEllipsis",!Z.msgEllipsis.has(N)),v.R7$(),v.SpI(" ",N.ParticipantMessage," ")}}function W(G,F){1&G&&(v.j41(0,"tr")(1,"td",14),v.nrm(2,"div",15),v.k0s()())}function U(G,F){if(1&G&&(v.j41(0,"tr")(1,"td",16),v.EFF(2),v.nI1(3,"translate"),v.k0s()()),2&G){const N=v.XpG();v.R7$(2),v.SpI(" ",v.bMT(3,1,N.noDataMessage(!N.isReportAvailable,!N.canViewReport))," ")}}function K(G=null){const F=G?[G]:null;return new A.gE({dateRange:new A.MJ(new r.J,{nonNullable:!0}),participant:new A.MJ((0,_.HX)(),{nonNullable:!0}),pbxPeers:new A.MJ(new a.X("_i18n.ReportsQueues","queue","pbxPeers",[c.J.Queue],{pbxPeers:F}),{nonNullable:!0})})}function D(G,F=!0){const{dateRange:N,participant:Z,pbxPeers:Y}=G;return{...N.value,participant:Z.value.selectedValue,...Y.value,canViewReport:F}}let q=(()=>{class G{localStorageService=(0,C.WQX)(e.sj);cd=(0,C.WQX)(y.gRc);dataSource=(0,C.WQX)(g.h);route=(0,C.WQX)(o.nX);router=(0,C.WQX)(o.Ix);fileDownloadService=(0,C.WQX)(i.y);modalService=(0,C.WQX)(S.B);destroy$=(0,C.WQX)(C.abz);pager;chats;parameters$=new b.t(null);firstQueue=this.route.snapshot.data.firstQueue;filter=K(this.firstQueue);msgEllipsis=new Set;canViewReport=null!=this.firstQueue;scheduledReportType=p.G.AbandonedChats;noDataMessage=I.Ns;get isReportAvailable(){return this.route.snapshot.data.reportsAvailable}get parameters(){return D(this.filter.value,this.canViewReport&&this.isReportAvailable)}constructor(){const N=this.parameters$.pipe((0,H.T)(Z=>new j(this.dataSource,Z)));
1this.pager=new x.f(this.destroy$,N,void 0,this.getStoredPageSize()),this.pager.pagedItems$.pipe((0,E.pQ)(this.destroy$)).subscribe({next:Z=>{this.updateItems(Z)},error:Z=>this.modalService.error(Z)})}updateItems(N){this.chats=N.value??[],this.cd.markForCheck()}getStoredPageSize(){const N=this.localStorageService.retrieve(s.Hh.ReportPageSize);return N?+N:h.n}onPageSizeChange(N){this.localStorageService.store(s.Hh.ReportPageSize,N),this.pager.pageSizeChanged(N)}submitFilter(){this.parameters$.next(this.parameters)}onSaveReport(N){(0,m.J)(this.modalService,this.scheduledReportType,N,this.dataSource.generateReportParams(this.parameters))}downloadCsv(){this.fileDownloadService.download(this.dataSource.generateCSVDownloadLink(this.parameters))}back(){this.router.navigate([".."],{relativeTo:this.route}).catch(L.l)}formatAndJoinValues=I.pk;static \u0275fac=function(Z){return new(Z||G)};static \u0275cmp=v.VBU({type:G,selectors:[["ng-component"]],features:[v.Jv_([g.h])],decls:50,vars:47,consts:[["header","_i18n.AbandonedChats",3,"back","helpUrl"],["header","",3,"exportClicked","disabled","showReportPrint"],["top-bar","",3,"filterChanged","saveReport","filterForm","formGroup","reportType","disabled"],["formControlName","dateRange"],["formControlName","participant"],["formControlName","pbxPeers"],["id","scrollableList",1,"h-100","scrollable-table"],[1,"table-header"],[1,"w-auto"],["colspan","9"],[3,"pageChanged","itemsPerPageChanged","showPageSizes","currentPage","itemsPerPage","totalItems"],[1,"text-lg-nowrap"],["nowrap",""],[3,"click","appEllipsis"],["colspan","12"],[1,"loader"],["colspan","9",1,"text-center"]],template:function(Z,Y){1&Z&&(v.j41(0,"app-page",0),v.bIt("back",function(){return Y.back()}),v.j41(1,"app-report-action-buttons",1),v.bIt("exportClicked",function(){return Y.downloadCsv()}),v.k0s(),v.j41(2,"app-complex-filter",2),v.bIt("filterChanged",function(){return Y.submitFilter()})("saveReport",function(ie){return Y.onSaveReport(ie)}),v.nrm(3,"app-date-range-filter",3)(4,"app-enum-filter",4)(5,"app-multi-peer-filter",5),v.k0s(),v.j41(6,"div",6)(7,"table")(8,"thead")(9,"tr",7)(10,"th"),v.EFF(11),v.nI1(12,"translate"),v.k0s(),v.j41(13,"th"),v.EFF(14),v.nI1(15,"translate"),v.k0s(),v.j41(16,"th"),v.EFF(17),v.nI1(18,"translate"),v.k0s(),v.j41(19,"th"),v.EFF(20),v.nI1(21,"translate"),v.k0s(),v.j41(22,"th"),v.EFF(23),v.nI1(24,"translate"),v.k0s(),v.j41(25,"th"),v.EFF(26),v.nI1(27,"translate"),v.k0s(),v.j41(28,"th"),v.EFF(29),v.nI1(30,"translate"),v.k0s(),v.j41(31,"th"),v.EFF(32),v.nI1(33,"translate"),v.k0s(),v.j41(34,"th",8),v.EFF(35),v.nI1(36,"translate"),v.k0s()()(),v.j41(37,"tbody"),v.Z7z(38,V,28,29,"tr",null,v.fX1),v.nVh(40,W,3,0,"tr"),v.nI1(41,"async"),v.vZN(42,U,4,3,"tr"),v.k0s(),v.j41(43,"tfoot")(44,"tr")(45,"td",9)(46,"app-paging",10),v.nI1(47,"async"),v.nI1(48,"async"),v.nI1(49,"async"),v.bIt("pageChanged",function(ie){return Y.pager.pageChanged(ie)})("itemsPerPageChanged",function(ie){return Y.onPageSizeChange(ie)}),v.k0s()()()()()()()),2&Z&&(v.Y8G("helpUrl","_i18n.ReportsUri"),v.R7$(),v.Y8G("disabled",!Y.canViewReport||!Y.isReportAvailable)("showReportPrint",!0),v.R7$(),v.Y8G("filterForm",Y.filter)("formGroup",Y.filter)("reportType",Y.scheduledReportType)("disabled",!Y.canViewReport||!Y.isReportAvailable),v.R7$(9),v.JRh(v.bMT(12,21,"_i18n.ReportsQueue")),v.R7$(3),v.JRh(v.bMT(15,23,"_i18n.ReportsChannel")),v.R7$(3),v.JRh(v.bMT(18,25,"_i18n.ReportsName")),v.R7$(3),v.JRh(v.bMT(21,27,"_i18n.ReportsNumber")),v.R7$(3),v.JRh(v.bMT(24,29,"_i18n.ReportsEmail")),v.R7$(3),v.JRh(v.bMT(27,31,"_i18n.ReportsDate")),v.R7$(3),v.JRh(v.bMT(30,33,"_i18n.ReportsReason")),v.R7$(3),v.JRh(v.bMT(33,35,"_i18n.ReportsDealWith")),v.R7$(3),v.JRh(v.bMT(36,37,"_i18n.ReportsMessage")),v.R7$(3),v.Dyx(Y.chats),v.R7$(2),v.vxM(Y.chats&&0!==Y.chats.length||!v.bMT(41,39,Y.pager.filterLoading$)||!Y.isReportAvailable?Y.chats&&0===Y.chats.length?42:-1:40),v.R7$(6),v.Y8G("showPageSizes",!0)("currentPage",v.bMT(47,41,Y.pager.currentPage$))("itemsPerPage",v.bMT(48,43,Y.pager.pageSize$))("totalItems",v.bMT(49,45,Y.pager.totalCount$)))},dependencies:[d.H,w.n,T.M,A.X1,A.BC,A.cb,A.j4,A.JD,n.B,u.j,R.J,l.b,$.u4,P.N,f.D9,O.Jj,M.vE],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}']})}return G})()},9836(te,k,t){t.d(k,{h:()=>H});var C=t(25558),y=t(7673),A=t(96354),o=t(97201),g=t(4499),c=t(35547),p=t(85802);let b=(()=>{class S extends g.d{downloadAbandonedChatsStatistics(i,r="body"){const T=i?.queueDnStr;if(null==T)throw new Error("Required parameter queueDnStr was null or undefined when calling downloadAbandonedChatsStatistics.");const n=i?.startDt;if(null==n)throw new Error("Required parameter startDt was null or undefined when calling downloadAbandonedChatsStatistics.");const u=i?.endDt;if(null==u)throw new Error("Required parameter endDt was null or undefined when calling downloadAbandonedChatsStatistics.");const _=i?.participantType;if(null==_)throw new Error("Required parameter participantType was null or undefined when calling downloadAbandonedChatsStatistics.");const d=i?.clientTimeZone;if(null==d)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadAbandonedChatsStatistics.");const $=i?.$top,w=i?.$skip,R=i?.$search,f=i?.$filter,O=i?.$count,M=i?.$select,m=i?.$orderby,P=i?.$expand;let a=new o.rx(this.encoder);a=this.addToHttpParams(a,"$top",$,o.l2.Form,!1),a=this.addToHttpParams(a,"$skip",w,o.l2.Form,!1),a=this.addToHttpParams(a,"$search",R,o.l2.Form,!1),a=this.addToHttpParams(a,"$filter",f,o.l2.Form,!1),a=this.addToHttpParams(a,"$count",O,o.l2.Form,!1),a=this.addToHttpParams(a,"$select",M,o.l2.Form,!1),a=this.addToHttpParams(a,"$orderby",m,o.l2.Form,!1),a=this.addToHttpParams(a,"$expand",P,o.l2.Form,!1);let l=this.defaultHeaders;l=this.configuration.addCredentialToHeaders("Application","Authorization",l,"Bearer ");const e=this.configuration.selectHeaderAccept(["application/json"]);void 0!==e&&(l=l.set("Accept",e));let s="json";e&&(s=e.startsWith("text")?"text":this.configuration.isJsonMime(e)?"json":"blob");let h=`/ReportAbandonedChatsStatistics/Pbx.DownloadAbandonedChatsStatistics(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:T,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},participantType=${this.configuration.encodeParam({name:"participantType",value:_,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:x,withCredentials:E}=this.configuration;return this.httpClient.request("get",`${x}${h}`,{params:a.toHttpParams(),responseType:s,...E?{withCredentials:E}:{},headers:l,observe:r})}downloadAbandonedChatsStatisticsQuery(i,r="body",T=!1,n){const u=i.queueDnStr;if(null==u)throw new Error("Required parameter queueDnStr was null or undefined when calling downloadAbandonedChatsStatistics.");const _=i.startDt;if(null==_)throw new Error("Required parameter startDt was null or undefined when calling downloadAbandonedChatsStatistics.");const d=i.endDt;if(null==d)throw new Error("Required parameter endDt was null or undefined when calling downloadAbandonedChatsStatistics.");const $=i.participantType;if(null==$)throw new Error("Required parameter participantType was null or undefined when calling downloadAbandonedChatsStatistics.");const w=i.clientTimeZone;if(null==w)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadAbandonedChatsStatistics.");const R=i.$top,f=i.$skip,O=i.$search,M=i.$filter,m=i.$count,P=i.$select,a=i.$orderby,l=i.$expand;let e=new o.rx(this.encoder);return e=this.addToHttpParams(e,"$top",R,o.l2.Form,!1),e=this.addToHttpParams(e,"$skip",f,o.l2.Form,!1),e=this.addToHttpParams(e,"$search",O,o.l2.Form,!1),e=this.addToHttpParams(e,"$filter",M,o.l2.Form,!1),e=this.addToHttpParams(e,"$count",m,o.l2.Form,!1),e=this.addToHttpParams(e,"$select",P,o.l2.Form,!1),e=this.addToHttpParams(e,"$orderby",a,o.l2.Form,!1),e=this.addToHttpParams(e,"$expand",l,o.l2.Form,!1),`/ReportAbandonedChatsStatistics/Pbx.DownloadAbandonedChatsStatistics(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},participantType=${this.configuration.encodeParam({name:"participantType",value:$,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+e.toString()}getAbandonedChatsStatisticsData(i,r="body"){const T=i?.queueDnStr;if(null==T)throw new Error("Required parameter queueDnStr was null or undefined when calling getAbandonedChatsStatisticsData.");const n=i?.startDt;if(null==n)throw new Error("Required parameter startDt was null or undefined when calling getAbandonedChatsStatisticsData.");const u=i?.endDt;if(null==u)throw new Error("Required parameter endDt was null or undefined when calling getAbandonedChatsStatisticsData.");const _=i?.participantType;if(null==_)throw new Error("Required parameter participantType was null or undefined when calling getAbandonedChatsStatisticsData.");const d=i?.$top,$=i?.$skip,w=i?.$search,R=i?.$filter,f=i?.$count,O=i?.$select,M=i?.$orderby,m=i?.$expand;let P=new o.rx(this.encoder);P=this.addToHttpParams(P,"$top",d,o.l2.Form,!1),P=this.addToHttpParams(P,"$skip",$,o.l2.Form,!1),P=this.addToHttpParams(P,"$search",w,o.l2.Form,!1),P=this.addToHttpParams(P,"$filter",R,o.l2.Form,!1),P=this.addToHttpParams(P,"$count",f,o.l2.Form,!1),P=this.addToHttpParams(P,"$select",O,o.l2.Form,!1),P=this.addToHttpParams(P,"$orderby",M,o.l2.Form,!1),P=this.addToHttpParams(P,"$expand",m,o.l2.Form,!1);let a=this.defaultHeaders;a=this.configuration.addCredentialToHeaders("Application","Authorization",a,"Bearer ");const l=this.configuration.selectHeaderAccept(["application/json"]);void 0!==l&&(a=a.set("Accept",l));let e="json";l&&(e=l.startsWith("text")?"text":this.configuration.isJsonMime(l)?"json":"blob");let s=`/ReportAbandonedChatsStatistics/Pbx.GetAbandonedChatsStatisticsData(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:T,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},participantType=${this.configuration.encodeParam({name:"participantType",value:_,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:h,withCredentials:x}=this.configuration;return this.httpClient.request("get",`${h}${s}`,{params:P.toHttpParams(),responseType:e,...x?{withCredentials:x}:{},headers:a,observe:r})}getAbandonedChatsStatisticsDataQuery(i,r="body",T=!1,n){const u=i.queueDnStr;if(null==u)throw new Error("Required parameter queueDnStr was null or undefined when calling getAbandonedChatsStatisticsData.");const _=i.startDt;if(null==_)throw new Error("Required parameter startDt was null or undefined when calling getAbandonedChatsStatisticsData.");const d=i.endDt;if(null==d)throw new Error("Required parameter endDt was null or undefined when calling getAbandonedChatsStatisticsData.");const $=i.participantType;if(null==$)throw new Error("Required parameter participantType was null or undefined when calling getAbandonedChatsStatisticsData.");const w=i.$top,R=i.$skip,f=i.$search,O=i.$filter,M=i.$count,m=i.$select,P=i.$orderby,a=i.$expand;let l=new o.rx(this.encoder);return l=this.addToHttpParams(l,"$top",w,o.l2.Form,!1),l=this.addToHttpParams(l,"$skip",R,o.l2.Form,!1),l=this.addToHttpParams(l,"$search",f,o.l2.Form,!1),l=this.addToHttpParams(l,"$filter",O,o.l2.Form,!1),l=this.addToHttpParams(l,"$count",M,o.l2.Form,!1),l=this.addToHttpParams(l,"$select",m,o.l2.Form,!1),l=this.addToHttpParams(l,"$orderby",P,o.l2.Form,!1),l=this.addToHttpParams(l,"$expand",a,o.l2.Form,!1),`/ReportAbandonedChatsStatistics/Pbx.GetAbandonedChatsStatisticsData(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},participantType=${this.configuration.encodeParam({name:"participantType",value:$,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})?`+l.toString()}static \u0275fac=(()=>{let i;return function(T){return(i||(i=c.xGo(S)))(T||S)}})();static \u0275prov=p.jDH({token:S,factory:S.\u0275fac,providedIn:"root"})}return S})();var L=t(96794);let H=(()=>{class S{reportAbandonedChatsStatisticsApiService=(0,p.WQX)(b);dataFetcher=(i,r)=>i.canViewReport?T=>T.pipe((0,C.n)(n=>this.requestAbandonedChatsStatistics(i,n,r)),(0,A.T)(n=>n.value)):T=>T.pipe((0,C.n)(()=>(0,y.of)([])));requestAbandonedChatsStatistics(i,r,T,n){
1return this.reportAbandonedChatsStatisticsApiService.getAbandonedChatsStatisticsData({$skip:n??r*T,$top:T,queueDnStr:i.pbxPeers?.map(u=>u.Number).filter(Boolean).join(" ")??"",...(0,L.lr)(i),participantType:i.participant})}generateReportParams(i){return JSON.stringify({QueueDnStr:i.pbxPeers?.map(r=>r.Number).filter(Boolean).join(" ")??"",StartDt:i.periodFromTo[0],EndDt:i.periodFromTo[1],DateRangeType:i.periodType,FirstDayOfWeek:i.firstWeekDay,ParticipantType:i.participant,ClientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})}generateCSVDownloadLink(i){return this.reportAbandonedChatsStatisticsApiService.downloadAbandonedChatsStatisticsQuery({queueDnStr:i.pbxPeers?.map(r=>r.Number).filter(Boolean).join(" ")??"",...(0,L.lr)(i),participantType:i.participant,clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})}static \u0275fac=function(r){return new(r||S)};static \u0275prov=p.jDH({token:S,factory:S.\u0275fac})}return S})()},47148(te,k,t){t.d(k,{_j:()=>v,bQ:()=>j,lE:()=>B});var C=t(85802),y=t(84412),A=t(89417),o=t(59882),g=t(54316),c=t(96354),p=t(54327),b=t(79997),L=t(71747),H=t(74651),S=t(38601),I=t(48643),i=t(62329),r=t(74005),T=t(76415),n=t(79213),u=t(36715),_=t(83188),d=t(59625),$=t(22429),w=t(68018),R=t(49769),f=t(96704),O=t(78713),M=t(91382),m=t(45764),P=t(62653),a=t(89755),l=t(35547);const e=(Q,V)=>[Q,V];function s(Q,V){if(1&Q&&(l.j41(0,"tr",9)(1,"td"),l.EFF(2),l.k0s(),l.j41(3,"td"),l.EFF(4),l.nI1(5,"appJsDateFormat"),l.nI1(6,"emptyValue"),l.k0s(),l.j41(7,"td",10),l.EFF(8),l.nI1(9,"emptyValue"),l.k0s(),l.j41(10,"td"),l.EFF(11),l.nI1(12,"emptyValue"),l.k0s(),l.j41(13,"td"),l.EFF(14),l.nI1(15,"duration"),l.nI1(16,"emptyValue"),l.k0s(),l.j41(17,"td"),l.EFF(18),l.nI1(19,"emptyValue"),l.k0s(),l.j41(20,"td",10),l.EFF(21),l.k0s()()),2&Q){const W=V.$implicit,U=l.XpG(2);l.R7$(2),l.JRh(U.formatAndJoinValues(l.l_i(22,e,W.QueueDn,W.QueueDisplayName))),l.R7$(2),l.JRh(l.bMT(6,10,l.bMT(5,8,W.CallTime))),l.R7$(4),l.JRh(l.bMT(9,12,W.CallerId)),l.R7$(3),l.Lme("",W.ExtensionDn," ",l.bMT(12,14,W.ExtensionDisplayName)),l.R7$(3),l.JRh(l.bMT(16,18,l.bMT(15,16,W.WaitTime))),l.R7$(4),l.JRh(l.bMT(19,20,W.PollingAttempts)),l.R7$(3),l.JRh(W.IsLoggedIn?"Logged In":"Logged Out")}}function h(Q,V){1&Q&&(l.j41(0,"tr")(1,"td",11),l.nrm(2,"div",12),l.k0s()())}function x(Q,V){if(1&Q&&(l.j41(0,"tr")(1,"td",13),l.EFF(2),l.nI1(3,"translate"),l.k0s()()),2&Q){const W=l.XpG(2);l.R7$(2),l.SpI(" ",l.bMT(3,1,W.noDataMessage(!W.isReportAvailable))," ")}}function E(Q,V){if(1&Q&&(l.j41(0,"table")(1,"thead")(2,"tr",8)(3,"th"),l.EFF(4),l.nI1(5,"translate"),l.k0s(),l.j41(6,"th"),l.EFF(7),l.nI1(8,"translate"),l.k0s(),l.j41(9,"th"),l.EFF(10),l.nI1(11,"translate"),l.k0s(),l.j41(12,"th"),l.EFF(13),l.nI1(14,"translate"),l.k0s(),l.j41(15,"th"),l.EFF(16),l.nI1(17,"translate"),l.k0s(),l.j41(18,"th"),l.EFF(19),l.nI1(20,"translate"),l.k0s(),l.j41(21,"th"),l.EFF(22),l.nI1(23,"translate"),l.k0s()()(),l.j41(24,"tbody"),l.Z7z(25,s,22,25,"tr",9,l.fX1),l.nVh(27,h,3,0,"tr")(28,x,4,3,"tr"),l.k0s()()),2&Q){const W=V;l.R7$(4),l.JRh(l.bMT(5,8,"_i18n.ReportsQueue")),l.R7$(3),l.JRh(l.bMT(8,10,"_i18n.ReportsCallTime")),l.R7$(3),l.JRh(l.bMT(11,12,"_i18n.Caller")),l.R7$(3),l.JRh(l.bMT(14,14,"_i18n.ReportsAgent")),l.R7$(3),l.JRh(l.bMT(17,16,"_i18n.ReportsWaitingTime")),l.R7$(3),l.JRh(l.bMT(20,18,"_i18n.ReportsPollingAttempts")),l.R7$(3),l.JRh(l.bMT(23,20,"_i18n.ReportsAgentState")),l.R7$(3),l.Dyx(W.data),l.R7$(2),l.vxM(W.isLoading?27:W.data.length||W.hasMore?-1:28)}}function B(Q=null){const V=Q?[Q]:null;return new A.gE({dateRange:new A.MJ(new i.J,{nonNullable:!0}),pbxPeers:new A.MJ(new P.X("_i18n.ReportsQueues","queue","pbxPeers",[L.J.Queue],{pbxPeers:V}),{nonNullable:!0}),interval:new A.MJ(new n.V("_i18n.ReportsExcludeCallsDroppedBefore"),{nonNullable:!0})})}function j(Q,V=!0){const{dateRange:W,pbxPeers:U,interval:K}=Q;return{...W.value,...U.value,...K.value,canViewReport:V}}let v=(()=>{class Q{dataSource=(0,C.WQX)(g.o);route=(0,C.WQX)(o.nX);router=(0,C.WQX)(o.Ix);fileDownloadService=(0,C.WQX)(I.y);modalService=(0,C.WQX)(S.B);destroy$=(0,C.WQX)(C.abz);paginator$;hasMoreOrLoading$;parameters$=new y.t(null);nextPage$=new y.t(void 0);reset$=new y.t(void 0);
1firstQueue=this.route.snapshot.data.firstQueue;filter=B(this.firstQueue);scheduledReportType=H.G.QueueAbandonedCalls;get isReportAvailable(){return this.route.snapshot.data.reportsAvailable}get parameters(){return j(this.filter.value,this.isReportAvailable&&this.canViewReport)}canViewReport=null!=this.firstQueue;constructor(){this.paginator$=(0,b.K)(this.modalService,this.destroy$,this.parameters$,this.nextPage$,this.reset$,this.dataSource.callsDataFetcher,100),this.hasMoreOrLoading$=this.paginator$.pipe((0,c.T)(W=>!W.hasMore||W.isLoading))}submitFilter(){this.parameters$.next(this.parameters)}onSaveReport(W){(0,M.J)(this.modalService,this.scheduledReportType,W,this.dataSource.generateReportParams(this.parameters))}downloadCsv(){this.fileDownloadService.download(this.dataSource.generateCSVDownloadLink(this.parameters))}back(){this.router.navigate([".."],{relativeTo:this.route})}noDataMessage=p.Ns;formatAndJoinValues=p.pk;static \u0275fac=function(U){return new(U||Q)};static \u0275cmp=l.VBU({type:Q,selectors:[["ng-component"]],features:[l.Jv_([g.o])],decls:11,vars:15,consts:[["header","_i18n.AbandonedQueueCalls",3,"back","helpUrl"],["header","",3,"exportClicked","disabled","showReportPrint"],["top-bar","",3,"filterChanged","saveReport","filterForm","formGroup","reportType","disabled"],["formControlName","dateRange"],["formControlName","pbxPeers"],["formControlName","interval"],["id","scrollableList",1,"h-100","scrollable-table"],["infiniteScroll","",3,"infiniteScrollCallback","infiniteScrollContainer","infiniteScrollDistance","infiniteScrollDisabled"],[1,"table-header"],[1,"text-md-nowrap"],["nowrap",""],["colspan","6"],[1,"loader"],["colspan","7",1,"text-center"]],template:function(U,K){if(1&U&&(l.j41(0,"app-page",0),l.bIt("back",function(){return K.back()}),l.j41(1,"app-report-action-buttons",1),l.bIt("exportClicked",function(){return K.downloadCsv()}),l.k0s(),l.j41(2,"app-complex-filter",2),l.bIt("filterChanged",function(){return K.submitFilter()})("saveReport",function(q){return K.onSaveReport(q)}),l.nrm(3,"app-date-range-filter",3)(4,"app-multi-peer-filter",4)(5,"app-new-interval-filter",5),l.k0s(),l.j41(6,"div",6)(7,"div",7),l.nI1(8,"async"),l.bIt("infiniteScrollCallback",function(){return K.nextPage$.next()}),l.nVh(9,E,29,22,"table"),l.nI1(10,"async"),l.k0s()()()),2&U){let D;l.Y8G("helpUrl","_i18n.ReportsUri"),l.R7$(),l.Y8G("disabled",!K.canViewReport||!K.isReportAvailable)("showReportPrint",!0),l.R7$(),l.Y8G("filterForm",K.filter)("formGroup",K.filter)("reportType",K.scheduledReportType)("disabled",!K.canViewReport||!K.isReportAvailable),l.R7$(5),l.Y8G("infiniteScrollContainer","#scrollableList")("infiniteScrollDistance",1)("infiniteScrollDisabled",l.bMT(8,11,K.hasMoreOrLoading$)),l.R7$(2),l.vxM((D=l.bMT(10,13,K.paginator$))?9:-1,D)}},dependencies:[_.H,d.n,r.M,A.X1,A.BC,A.cb,A.j4,A.JD,T.B,u.J,$.D,a.b,m.N,w.D9,R.Jj,f.bB,O.vE],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}']})}return Q})()},54316(te,k,t){t.d(k,{o:()=>i});var C=t(25558),y=t(7673),A=t(96354),o=t(2793),g=t(97201),c=t(4499),p=t(35547),b=t(85802);let L=(()=>{class r extends c.d{downloadAbandonedQueueCalls(n,u="body"){const _=n?.periodFrom;
1if(null==_)throw new Error("Required parameter periodFrom was null or undefined when calling downloadAbandonedQueueCalls.");const d=n?.periodTo;if(null==d)throw new Error("Required parameter periodTo was null or undefined when calling downloadAbandonedQueueCalls.");const $=n?.queueDns;if(null==$)throw new Error("Required parameter queueDns was null or undefined when calling downloadAbandonedQueueCalls.");const w=n?.waitInterval;if(null==w)throw new Error("Required parameter waitInterval was null or undefined when calling downloadAbandonedQueueCalls.");const R=n?.clientTimeZone;if(null==R)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadAbandonedQueueCalls.");const f=n?.$top,O=n?.$skip,M=n?.$search,m=n?.$filter,P=n?.$count,a=n?.$select,l=n?.$orderby,e=n?.$expand;let s=new g.rx(this.encoder);s=this.addToHttpParams(s,"$top",f,g.l2.Form,!1),s=this.addToHttpParams(s,"$skip",O,g.l2.Form,!1),s=this.addToHttpParams(s,"$search",M,g.l2.Form,!1),s=this.addToHttpParams(s,"$filter",m,g.l2.Form,!1),s=this.addToHttpParams(s,"$count",P,g.l2.Form,!1),s=this.addToHttpParams(s,"$select",a,g.l2.Form,!1),s=this.addToHttpParams(s,"$orderby",l,g.l2.Form,!1),s=this.addToHttpParams(s,"$expand",e,g.l2.Form,!1);let h=this.defaultHeaders;h=this.configuration.addCredentialToHeaders("Application","Authorization",h,"Bearer ");const x=this.configuration.selectHeaderAccept(["application/json"]);void 0!==x&&(h=h.set("Accept",x));let E="json";x&&(E=x.startsWith("text")?"text":this.configuration.isJsonMime(x)?"json":"blob");let B=`/ReportAbandonedQueueCalls/Pbx.DownloadAbandonedQueueCalls(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},queueDns=${this.configuration.encodeParam({name:"queueDns",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:j,withCredentials:v}=this.configuration;return this.httpClient.request("get",`${j}${B}`,{params:s.toHttpParams(),responseType:E,...v?{withCredentials:v}:{},headers:h,observe:u})}downloadAbandonedQueueCallsQuery(n,u="body",_=!1,d){const $=n.periodFrom;if(null==$)throw new Error("Required parameter periodFrom was null or undefined when calling downloadAbandonedQueueCalls.");const w=n.periodTo;if(null==w)throw new Error("Required parameter periodTo was null or undefined when calling downloadAbandonedQueueCalls.");const R=n.queueDns;if(null==R)throw new Error("Required parameter queueDns was null or undefined when calling downloadAbandonedQueueCalls.");const f=n.waitInterval;if(null==f)throw new Error("Required parameter waitInterval was null or undefined when calling downloadAbandonedQueueCalls.");const O=n.clientTimeZone;if(null==O)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadAbandonedQueueCalls.");const M=n.$top,m=n.$skip,P=n.$search,a=n.$filter,l=n.$count,e=n.$select,s=n.$orderby,h=n.$expand;let x=new g.rx(this.encoder);return x=this.addToHttpParams(x,"$top",M,g.l2.Form,!1),x=this.addToHttpParams(x,"$skip",m,g.l2.Form,!1),x=this.addToHttpParams(x,"$search",P,g.l2.Form,!1),x=this.addToHttpParams(x,"$filter",a,g.l2.Form,!1),x=this.addToHttpParams(x,"$count",l,g.l2.Form,!1),x=this.addToHttpParams(x,"$select",e,g.l2.Form,!1),x=this.addToHttpParams(x,"$orderby",s,g.l2.Form,!1),x=this.addToHttpParams(x,"$expand",h,g.l2.Form,!1),`/ReportAbandonedQueueCalls/Pbx.DownloadAbandonedQueueCalls(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},queueDns=${this.configuration.encodeParam({name:"queueDns",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:O,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+x.toString()}getAbandonedQueueCallsData(n,u="body"){const _=n?.periodFrom;
1if(null==_)throw new Error("Required parameter periodFrom was null or undefined when calling getAbandonedQueueCallsData.");const d=n?.periodTo;if(null==d)throw new Error("Required parameter periodTo was null or undefined when calling getAbandonedQueueCallsData.");const $=n?.queueDns;if(null==$)throw new Error("Required parameter queueDns was null or undefined when calling getAbandonedQueueCallsData.");const w=n?.waitInterval;if(null==w)throw new Error("Required parameter waitInterval was null or undefined when calling getAbandonedQueueCallsData.");const R=n?.$top,f=n?.$skip,O=n?.$search,M=n?.$filter,m=n?.$count,P=n?.$select,a=n?.$orderby,l=n?.$expand;let e=new g.rx(this.encoder);e=this.addToHttpParams(e,"$top",R,g.l2.Form,!1),e=this.addToHttpParams(e,"$skip",f,g.l2.Form,!1),e=this.addToHttpParams(e,"$search",O,g.l2.Form,!1),e=this.addToHttpParams(e,"$filter",M,g.l2.Form,!1),e=this.addToHttpParams(e,"$count",m,g.l2.Form,!1),e=this.addToHttpParams(e,"$select",P,g.l2.Form,!1),e=this.addToHttpParams(e,"$orderby",a,g.l2.Form,!1),e=this.addToHttpParams(e,"$expand",l,g.l2.Form,!1);let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(s=s.set("Accept",h));let x="json";h&&(x=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");let E=`/ReportAbandonedQueueCalls/Pbx.GetAbandonedQueueCallsData(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},queueDns=${this.configuration.encodeParam({name:"queueDns",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:B,withCredentials:j}=this.configuration;return this.httpClient.request("get",`${B}${E}`,{params:e.toHttpParams(),responseType:x,...j?{withCredentials:j}:{},headers:s,observe:u})}getAbandonedQueueCallsDataQuery(n,u="body",_=!1,d){const $=n.periodFrom;if(null==$)throw new Error("Required parameter periodFrom was null or undefined when calling getAbandonedQueueCallsData.");const w=n.periodTo;if(null==w)throw new Error("Required parameter periodTo was null or undefined when calling getAbandonedQueueCallsData.");const R=n.queueDns;if(null==R)throw new Error("Required parameter queueDns was null or undefined when calling getAbandonedQueueCallsData.");const f=n.waitInterval;if(null==f)throw new Error("Required parameter waitInterval was null or undefined when calling getAbandonedQueueCallsData.");const O=n.$top,M=n.$skip,m=n.$search,P=n.$filter,a=n.$count,l=n.$select,e=n.$orderby,s=n.$expand;let h=new g.rx(this.encoder);return h=this.addToHttpParams(h,"$top",O,g.l2.Form,!1),h=this.addToHttpParams(h,"$skip",M,g.l2.Form,!1),h=this.addToHttpParams(h,"$search",m,g.l2.Form,!1),h=this.addToHttpParams(h,"$filter",P,g.l2.Form,!1),h=this.addToHttpParams(h,"$count",a,g.l2.Form,!1),h=this.addToHttpParams(h,"$select",l,g.l2.Form,!1),h=this.addToHttpParams(h,"$orderby",e,g.l2.Form,!1),h=this.addToHttpParams(h,"$expand",s,g.l2.Form,!1),`/ReportAbandonedQueueCalls/Pbx.GetAbandonedQueueCallsData(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},queueDns=${this.configuration.encodeParam({name:"queueDns",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+h.toString()}static \u0275fac=(()=>{let n;return function(_){return(n||(n=p.xGo(r)))(_||r)}})();static \u0275prov=b.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var H=t(67374),S=t.n(H),I=t(96794);let i=(()=>{class r{queuesApiService=(0,b.WQX)(o.S);reportAbandonedQueueCallsApiService=(0,b.WQX)(L);callsDataFetcher=(n,u)=>n.canViewReport?_=>_.pipe((0,C.n)(d=>this.requestCalls(n,d,u)),(0,A.T)(d=>d.value)):_=>_.pipe((0,C.n)(()=>(0,y.of)([])));requestQueues(n,u,_){return this.queuesApiService.listQueue({$skip:u*_,$top:_,$select:["Name","Number"],$orderby:["Name"]})}requestCalls(n,u,_){return this.reportAbandonedQueueCallsApiService.getAbandonedQueueCallsData({$skip:u*_,$top:_,...(0,I.Rx)(n),queueDns:n.pbxPeers?.map(d=>
1d.Number).filter(Boolean).join(" ")??"",waitInterval:S().duration(n.interval??0,"seconds").format("H:mm:s")})}generateCSVDownloadLink(n){return this.reportAbandonedQueueCallsApiService.downloadAbandonedQueueCallsQuery({...(0,I.Rx)(n),queueDns:n.pbxPeers?.map(u=>u.Number).filter(Boolean).join(" ")??"",waitInterval:S().duration(n.interval??0,"seconds").format("H:mm:s"),clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})}generateReportParams(n){return JSON.stringify({PeriodFrom:n.periodFromTo[0],PeriodTo:n.periodFromTo[1],DateRangeType:n.periodType,FirstDayOfWeek:n.firstWeekDay,QueueDns:n.pbxPeers?.map(u=>u.Number).filter(Boolean).join(" ")??"",WaitInterval:S().duration(n.interval??0,"seconds").format("H:mm:s"),ClientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})}static \u0275fac=function(u){return new(u||r)};static \u0275prov=b.jDH({token:r,factory:r.\u0275fac})}return r})()},58500(te,k,t){t.d(k,{KZ:()=>Q,bQ:()=>v,lE:()=>j});var C=t(85802),y=t(84412),A=t(85343),o=t(89417),g=t(59882),c=t(47994),p=t(71747),b=t(74651),L=t(79997),H=t(96354),S=t(38601),I=t(54327),i=t(48643),r=t(62329),T=t(79213),n=t(83188),u=t(59625),_=t(74005),d=t(76415),$=t(36715),w=t(22429),R=t(68018),f=t(49769),O=t(54245),M=t(96704),m=t(78713),P=t(91382),a=t(62653),l=t(89755),e=t(35547);const s=(V,W)=>[V,W];function h(V,W){if(1&V&&(e.j41(0,"tr",9)(1,"td",10),e.EFF(2),e.k0s(),e.j41(3,"td",10),e.EFF(4),e.k0s(),e.j41(5,"td"),e.EFF(6),e.nI1(7,"duration"),e.nI1(8,"emptyValue"),e.k0s(),e.j41(9,"td"),e.EFF(10),e.nI1(11,"emptyValue"),e.k0s(),e.j41(12,"td"),e.EFF(13),e.nI1(14,"percentOf"),e.k0s(),e.j41(15,"td"),e.EFF(16),e.nI1(17,"emptyValue"),e.k0s(),e.j41(18,"td"),e.EFF(19),e.nI1(20,"duration"),e.nI1(21,"emptyValue"),e.k0s(),e.j41(22,"td"),e.EFF(23),e.nI1(24,"duration"),e.nI1(25,"emptyValue"),e.k0s(),e.j41(26,"td"),e.EFF(27),e.nI1(28,"duration"),e.nI1(29,"emptyValue"),e.k0s(),e.j41(30,"td"),e.EFF(31),e.nI1(32,"duration"),e.nI1(33,"emptyValue"),e.k0s()()),2&V){const U=W.$implicit,K=e.XpG(2);e.R7$(2),e.JRh(K.formatAndJoinValues(e.l_i(37,s,U.Queue,U.QueueDisplayName))),e.R7$(2),e.JRh(K.formatAndJoinValues(e.l_i(40,s,U.Dn,U.DnDisplayName))),e.R7$(2),e.JRh(e.bMT(8,12,e.bMT(7,10,U.LoggedInTime))),e.R7$(4),e.JRh(e.bMT(11,14,U.AnsweredCount)),e.R7$(3),e.JRh(e.i5U(14,16,U.AnsweredCount,U.AnsweredCount+U.LostCount)),e.R7$(3),e.JRh(e.bMT(17,19,U.AnsweredPerHourCount)),e.R7$(3),e.JRh(e.bMT(21,23,e.bMT(20,21,U.RingTime))),e.R7$(4),e.JRh(e.bMT(25,27,e.bMT(24,25,U.AvgRingTime))),e.R7$(4),e.JRh(e.bMT(29,31,e.bMT(28,29,U.TalkTime))),e.R7$(4),e.JRh(e.bMT(33,35,e.bMT(32,33,U.AvgTalkTime)))}}function x(V,W){1&V&&(e.j41(0,"tr")(1,"td",11),e.nrm(2,"div",12),e.k0s()())}function E(V,W){if(1&V&&(e.j41(0,"tr")(1,"td",13),e.EFF(2),e.nI1(3,"translate"),e.k0s()()),2&V){const U=e.XpG(2);e.R7$(2),e.SpI(" ",e.bMT(3,1,U.noDataMessage(!U.isReportAvailable,!U.canViewReport))," ")}}function B(V,W){if(1&V&&(e.j41(0,"table")(1,"thead")(2,"tr",8)(3,"th"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"th"),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.j41(9,"th"),e.EFF(10),e.nI1(11,"translate"),e.k0s(),e.j41(12,"th"),e.EFF(13),e.nI1(14,"translate"),e.k0s(),e.j41(15,"th"),e.EFF(16),e.nI1(17,"translate"),e.k0s(),e.j41(18,"th"),e.EFF(19),e.nI1(20,"translate"),e.k0s(),e.j41(21,"th"),e.EFF(22),e.nI1(23,"translate"),e.k0s(),e.j41(24,"th"),e.EFF(25),e.nI1(26,"translate"),e.k0s(),e.j41(27,"th"),e.EFF(28),e.nI1(29,"translate"),e.k0s(),e.j41(30,"th"),e.EFF(31),e.nI1(32,"translate"),e.k0s()()(),e.j41(33,"tbody"),e.Z7z(34,h,34,43,"tr",9,e.fX1),e.nVh(36,x,3,0,"tr")(37,E,4,3,"tr"),e.k0s()()),2&V){const U=W;e.R7$(4),e.JRh(e.bMT(5,11,"_i18n.ReportsQueue")),e.R7$(3),e.JRh(e.bMT(8,13,"_i18n.ReportsAgent")),e.R7$(3),e.JRh(e.bMT(11,15,"_i18n.ReportsTotalLoggedInTime")),e.R7$(3),e.JRh(e.bMT(14,17,"_i18n.ReportsAnswered")),e.R7$(3),e.JRh(e.bMT(17,19,"_i18n.ReportsPercentCallsServiced")),e.R7$(3),e.JRh(e.bMT(20,21,"_i18n.ReportsAnsweredPerHour")),e.R7$(3),e.JRh(e.bMT(23,23,"_i18n.ReportsTotalRinging")),e.R7$(3),e.JRh(e.bMT(26,25,"_i18n.ReportsMeanRinging")),e.R7$(3),e.JRh(e.bMT(29,27,"_i18n.ReportsTotalTalking")),e.R7$(3),e.JRh(e.bMT(32,29,"_i18n.ReportsMeanTalking")),e.R7$(3),e.Dyx(U.data),e.R7$(2),e.vxM(U.hasMore?36:U.isLoading||U.data.length?-1:37)}}function j(V=null){const W=V?[V]:null;return new o.gE({dateRange:new o.MJ(new r.J,{nonNullable:!0}),pbxPeers:new o.MJ(new a.X("_i18n.ReportsQueues","queue","pbxPeers",[p.J.Queue],{pbxPeers:W}),{nonNullable:!0}),interval:new o.MJ(new T.V("_i18n.ReportsExcludeCallsDroppedBefore"),{nonNullable:!0})})}function v(V,W=!0){const{dateRange:U,pbxPeers:K,interval:D}=V;return{...U.value,...K.value,...D.value,canViewReport:W}}let Q=(()=>{class V{dataSource=(0,C.WQX)(c.c);route=(0,C.WQX)(g.nX);router=(0,C.WQX)(g.Ix);destroy$=(0,C.WQX)(C.abz);modalService=(0,C.WQX)(S.B);fileDownloadService=(0,C.WQX)(i.y);paginator$;hasMoreOrLoading$;parameters$=new y.t(null);nextPage$=new y.t(void 0);reset$=new y.t(void 0);
1firstQueue=this.route.snapshot.data.firstQueue;filter=j(this.firstQueue);canViewReport=null!=this.firstQueue;scheduledReportType=b.G.AgentInQueueStatistics;noDataMessage=I.Ns;get isReportAvailable(){return this.route.snapshot.data.reportsAvailable}get parameters(){return v(this.filter.value,this.isReportAvailable&&this.canViewReport)}constructor(){this.paginator$=(0,L.K)(this.modalService,this.destroy$,this.parameters$,this.nextPage$,this.reset$,this.dataSource.dataFetcher,100),this.hasMoreOrLoading$=this.paginator$.pipe((0,H.T)(U=>!U.hasMore||U.isLoading))}submitFilter(){this.parameters$.next(this.parameters)}onSaveReport(U){(0,P.J)(this.modalService,this.scheduledReportType,U,this.dataSource.generateReportParams(this.parameters))}downloadCsv(){this.fileDownloadService.download(this.dataSource.generateCSVDownloadLink(this.parameters))}back(){this.router.navigate([".."],{relativeTo:this.route}).catch(A.l)}formatAndJoinValues=I.pk;static \u0275fac=function(K){return new(K||V)};static \u0275cmp=e.VBU({type:V,selectors:[["ng-component"]],features:[e.Jv_([c.c])],decls:11,vars:15,consts:[["header","_i18n.AgentInQueueStatistics",3,"back","helpUrl"],["header","",3,"exportClicked","showReportPrint","disabled"],["top-bar","",3,"filterChanged","saveReport","filterForm","formGroup","reportType","disabled"],["formControlName","dateRange"],["formControlName","pbxPeers"],["formControlName","interval"],["id","scrollableList",1,"h-100","scrollable-table"],["infiniteScroll","",3,"infiniteScrollCallback","infiniteScrollContainer","infiniteScrollDistance","infiniteScrollDisabled"],[1,"table-header"],[1,"table-group-row"],[1,"text-lg-nowrap"],["colspan","10"],[1,"loader"],["colspan","9",1,"text-center"]],template:function(K,D){if(1&K&&(e.j41(0,"app-page",0),e.bIt("back",function(){return D.back()}),e.j41(1,"app-report-action-buttons",1),e.bIt("exportClicked",function(){return D.downloadCsv()}),e.k0s(),e.j41(2,"app-complex-filter",2),e.bIt("filterChanged",function(){return D.submitFilter()})("saveReport",function(G){return D.onSaveReport(G)}),e.nrm(3,"app-date-range-filter",3)(4,"app-multi-peer-filter",4)(5,"app-new-interval-filter",5),e.k0s(),e.j41(6,"div",6)(7,"div",7),e.nI1(8,"async"),e.bIt("infiniteScrollCallback",function(){return D.nextPage$.next()}),e.nVh(9,B,38,31,"table"),e.nI1(10,"async"),e.k0s()()()),2&K){let q;e.Y8G("helpUrl","_i18n.ReportsUri"),e.R7$(),e.Y8G("showReportPrint",!0)("disabled",!D.canViewReport||!D.isReportAvailable),e.R7$(),e.Y8G("filterForm",D.filter)("formGroup",D.filter)("reportType",D.scheduledReportType)("disabled",!D.canViewReport||!D.isReportAvailable),e.R7$(5),e.Y8G("infiniteScrollContainer","#scrollableList")("infiniteScrollDistance",1)("infiniteScrollDisabled",e.bMT(8,11,D.hasMoreOrLoading$)),e.R7$(2),e.vxM((q=e.bMT(10,13,D.paginator$))?9:-1,q)}},dependencies:[n.H,u.n,_.M,o.X1,o.BC,o.cb,o.j4,o.JD,d.B,$.J,w.D,l.b,R.D9,f.Jj,O.P,M.bB,m.vE],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}']})}return V})()},47994(te,k,t){t.d(k,{c:()=>i});var C=t(25558),y=t(7673),A=t(96354),o=t(2793),g=t(97201),c=t(4499),p=t(35547),b=t(85802);let L=(()=>{class r extends c.d{downloadAgentsInQueueStatistics(n,u="body"){const _=n?.queueDnStr;if(null==_)throw new Error("Required parameter queueDnStr was null or undefined when calling downloadAgentsInQueueStatistics.");const d=n?.startDt;if(null==d)throw new Error("Required parameter startDt was null or undefined when calling downloadAgentsInQueueStatistics.");const $=n?.endDt;if(null==$)throw new Error("Required parameter endDt was null or undefined when calling downloadAgentsInQueueStatistics.");const w=n?.waitInterval;if(null==w)throw new Error("Required parameter waitInterval was null or undefined when calling downloadAgentsInQueueStatistics.");const R=n?.$top,f=n?.$skip,O=n?.$search,M=n?.$filter,m=n?.$count,P=n?.$select,a=n?.$orderby,l=n?.$expand;let e=new g.rx(this.encoder);e=this.addToHttpParams(e,"$top",R,g.l2.Form,!1),e=this.addToHttpParams(e,"$skip",f,g.l2.Form,!1),e=this.addToHttpParams(e,"$search",O,g.l2.Form,!1),e=this.addToHttpParams(e,"$filter",M,g.l2.Form,!1),e=this.addToHttpParams(e,"$count",m,g.l2.Form,!1),e=this.addToHttpParams(e,"$select",P,g.l2.Form,!1),e=this.addToHttpParams(e,"$orderby",a,g.l2.Form,!1),e=this.addToHttpParams(e,"$expand",l,g.l2.Form,!1);let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(s=s.set("Accept",h));let x="json";h&&(x=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");let E=`/ReportAgentsInQueueStatistics/Pbx.DownloadAgentsInQueueStatistics(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:B,withCredentials:j}=this.configuration;return this.httpClient.request("get",`${B}${E}`,{params:e.toHttpParams(),responseType:x,...j?{withCredentials:j}:{},headers:s,observe:u})}downloadAgentsInQueueStatisticsQuery(n,u="body",_=!1,d){const $=n.queueDnStr;if(null==$)throw new Error("Required parameter queueDnStr was null or undefined when calling downloadAgentsInQueueStatistics.");const w=n.startDt;if(null==w)throw new Error("Required parameter startDt was null or undefined when calling downloadAgentsInQueueStatistics.");const R=n.endDt;if(null==R)throw new Error("Required parameter endDt was null or undefined when calling downloadAgentsInQueueStatistics.");const f=n.waitInterval;if(null==f)throw new Error("Required parameter waitInterval was null or undefined when calling downloadAgentsInQueueStatistics.");const O=n.$top,M=n.$skip,m=n.$search,P=n.$filter,a=n.$count,l=n.$select,e=n.$orderby,s=n.$expand;let h=new g.rx(this.encoder);return h=this.addToHttpParams(h,"$top",O,g.l2.Form,!1),h=this.addToHttpParams(h,"$skip",M,g.l2.Form,!1),h=this.addToHttpParams(h,"$search",m,g.l2.Form,!1),h=this.addToHttpParams(h,"$filter",P,g.l2.Form,!1),h=this.addToHttpParams(h,"$count",a,g.l2.Form,!1),h=this.addToHttpParams(h,"$select",l,g.l2.Form,!1),h=this.addToHttpParams(h,"$orderby",e,g.l2.Form,!1),h=this.addToHttpParams(h,"$expand",s,g.l2.Form,!1),`/ReportAgentsInQueueStatistics/Pbx.DownloadAgentsInQueueStatistics(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+h.toString()}getAgentsInQueueStatisticsData(n,u="body"){const _=n?.queueDnStr;if(null==_)throw new Error("Required parameter queueDnStr was null or undefined when calling getAgentsInQueueStatisticsData.");const d=n?.startDt;if(null==d)throw new Error("Required parameter startDt was null or undefined when calling getAgentsInQueueStatisticsData.");const $=n?.endDt;if(null==$)throw new Error("Required parameter endDt was null or undefined when calling getAgentsInQueueStatisticsData.");const w=n?.waitInterval;if(null==w)throw new Error("Required parameter waitInterval was null or undefined when calling getAgentsInQueueStatisticsData.");const R=n?.$top,f=n?.$skip,O=n?.$search,M=n?.$filter,m=n?.$count,P=n?.$select,a=n?.$orderby,l=n?.$expand;let e=new g.rx(this.encoder);e=this.addToHttpParams(e,"$top",R,g.l2.Form,!1),e=this.addToHttpParams(e,"$skip",f,g.l2.Form,!1),e=this.addToHttpParams(e,"$search",O,g.l2.Form,!1),e=this.addToHttpParams(e,"$filter",M,g.l2.Form,!1),e=this.addToHttpParams(e,"$count",m,g.l2.Form,!1),e=this.addToHttpParams(e,"$select",P,g.l2.Form,!1),e=this.addToHttpParams(e,"$orderby",a,g.l2.Form,!1),e=this.addToHttpParams(e,"$expand",l,g.l2.Form,!1);let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(s=s.set("Accept",h));let x="json";h&&(x=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");let E=`/ReportAgentsInQueueStatistics/Pbx.GetAgentsInQueueStatisticsData(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:B,withCredentials:j}=this.configuration;return this.httpClient.request("get",`${B}${E}`,{params:e.toHttpParams(),responseType:x,...j?{withCredentials:j}:{},headers:s,observe:u})}getAgentsInQueueStatisticsDataQuery(n,u="body",_=!1,d){const $=n.queueDnStr;if(null==$)throw new Error("Required parameter queueDnStr was null or undefined when calling getAgentsInQueueStatisticsData.");const w=n.startDt;if(null==w)throw new Error("Required parameter startDt was null or undefined when calling getAgentsInQueueStatisticsData.");const R=n.endDt;if(null==R)throw new Error("Required parameter endDt was null or undefined when calling getAgentsInQueueStatisticsData.");const f=n.waitInterval;if(null==f)throw new Error("Required parameter waitInterval was null or undefined when calling getAgentsInQueueStatisticsData.");const O=n.$top,M=n.$skip,m=n.$search,P=n.$filter,a=n.$count,l=n.$select,e=n.$orderby,s=n.$expand;let h=new g.rx(this.encoder);return h=this.addToHttpParams(h,"$top",O,g.l2.Form,!1),h=this.addToHttpParams(h,"$skip",M,g.l2.Form,!1),h=this.addToHttpParams(h,"$search",m,g.l2.Form,!1),h=this.addToHttpParams(h,"$filter",P,g.l2.Form,!1),h=this.addToHttpParams(h,"$count",a,g.l2.Form,!1),h=this.addToHttpParams(h,"$select",l,g.l2.Form,!1),h=this.addToHttpParams(h,"$orderby",e,g.l2.Form,!1),h=this.addToHttpParams(h,"$expand",s,g.l2.Form,!1),`/ReportAgentsInQueueStatistics/Pbx.GetAgentsInQueueStatisticsData(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+h.toString()}static \u0275fac=(()=>{let n;return function(_){return(n||(n=p.xGo(r)))(_||r)}})();static \u0275prov=b.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var H=t(67374),S=t.n(H),I=t(96794);let i=(()=>{class r{queuesApiService=(0,b.WQX)(o.S);reportAgentsInQueueStatisticsApiService=(0,b.WQX)(L);dataFetcher=(n,u)=>n.canViewReport?_=>_.pipe((0,C.n)(d=>this.requestAgentsStatistic(n,d,u)),(0,A.T)(d=>d.value)):_=>_.pipe((0,C.n)(()=>(0,y.of)([])));requestAgentsStatistic(n,u=1,_=50){return this.reportAgentsInQueueStatisticsApiService.getAgentsInQueueStatisticsData({$skip:u*_,$top:_,...(0,I.lr)(n),queueDnStr:n.pbxPeers?.map(d=>
1d.Number).filter(Boolean).join(" ")??"",waitInterval:S().duration(n.interval??0,"seconds").format("H:mm:s")})}requestQueues(n,u,_){return this.queuesApiService.listQueue({$skip:u*_,$top:_,$select:["Id","Number","Name"],$orderby:["Name"]})}generateCSVDownloadLink(n){return this.reportAgentsInQueueStatisticsApiService.downloadAgentsInQueueStatisticsQuery({...(0,I.lr)(n),queueDnStr:n.pbxPeers?.map(u=>u.Number).filter(Boolean).join(" ")??"",waitInterval:S().duration(n.interval??0,"seconds").format("H:mm:s")})}generateReportParams(n){return JSON.stringify({StartDt:n.periodFromTo[0],EndDt:n.periodFromTo[1],DateRangeType:n.periodType,FirstDayOfWeek:n.firstWeekDay,QueueDnStr:n.pbxPeers?.map(u=>u.Number).filter(Boolean).join(" ")??"",WaitInterval:S().duration(n.interval??0,"seconds").format("H:mm:s")})}static \u0275fac=function(u){return new(u||r)};static \u0275prov=b.jDH({token:r,factory:r.\u0275fac})}return r})()},32573(te,k,t){t.d(k,{G0:()=>N,lE:()=>G,bQ:()=>F});var C=t(85802),y=t(84412),A=t(89417),o=t(59882),g=t(87926),c=t(74651),p=t(79997),b=t(96354),L=t(38601),H=t(54327),S=t(48643),I=t(62329),i=t(74005),r=t(76415),T=t(43748),n=t(61851),u=t(95604),_=t(68018),d=t(35547);let $=(()=>{class Z extends T.F{constructor(){super(new A.MJ(null))}static \u0275fac=function(ie){return new(ie||Z)};static \u0275cmp=d.VBU({type:Z,selectors:[["app-peer-filter"]],features:[d.Jv_([{provide:A.kq,multi:!0,useExisting:Z},{provide:A.cz,multi:!0,useExisting:Z}]),d.Vt3],decls:7,vars:6,consts:[["data-qa","peer-filter",1,"d-flex","gap-3"],[1,"filter-label"],[1,"input-group"],[3,"formControl","searchDnTypes","isReportPeers"]],template:function(ie,J){1&ie&&(d.j41(0,"div",0)(1,"label",1),d.EFF(2),d.nI1(3,"translate"),d.k0s(),d.j41(4,"field-wrapper")(5,"div",2),d.nrm(6,"app-dn-select",3),d.k0s()()()),2&ie&&(d.R7$(2),d.JRh(d.bMT(3,4,J.value.label)),d.R7$(4),d.Y8G("formControl",J.control)("searchDnTypes",J.value.dnTypes)("isReportPeers",!0))},dependencies:[n.A,u.z,A.X1,A.BC,A.l_,_.D9],encapsulation:2,changeDetection:0})}return Z})();var w=t(71747),R=t(7673);class f{label;queryParam;key;dnTypes;emptyDisplayValue;pureValue=null;constructor(Y,z,ie,J,oe,ne=""){this.label=Y,this.queryParam=z,this.key=ie,this.dnTypes=J,this.emptyDisplayValue=ne,oe&&(this.value=oe)}deserialize(Y){return f.updateFromSerializedFilter(new f(this.label,this.queryParam,this.key,this.dnTypes,this.value),Y)}static updateFromSerializedFilter(Y,z){if(Y.queryParam in z&&"object"==typeof z[Y.queryParam]){const ie=z[Y.queryParam];ie?.Number&&(Y.pureValue={Number:ie.Number})}return Y}getDisplayValue(Y){return this.pureValue?.Name??this.emptyDisplayValue}getDisplayValueForPrint(Y){return this.getDisplayValue(Y)}serialize(){return null==this.pureValue?{}:{[this.queryParam]:{Number:this.pureValue.Number}}}validate(){return null}get value(){return{[this.key]:this.pureValue}}set value(Y){this.pureValue=Y[this.key]}refresh(Y){const z=this.pureValue;return z&&z.Number&&!z.Name?Y.getPeer$(z.Number).pipe((0,b.T)(ie=>!(!ie||!Object.assign(z,ie)))):(0,R.of)(!1)}}class O extends f{constructor(Y){super("_i18n.ReportsQueue","queue","pbxQueue",[w.J.Queue],Y)}static deserialize(Y,z){return f.updateFromSerializedFilter(new O(z),Y)}}var M=t(83188),m=t(59625),P=t(22429),a=t(49769),l=t(96704),e=t(78713),s=t(91382),h=t(45764);const x=(Z,Y)=>[Z,Y],E=(Z,Y)=>Y.Number;function B(Z,Y){if(1&Z&&(d.j41(0,"tr",11)(1,"td"),d.EFF(2),d.nI1(3,"appJsDateFormat"),d.nI1(4,"emptyValue"),d.k0s(),d.j41(5,"td",12),d.EFF(6),d.nI1(7,"appJsDateFormat"),d.nI1(8,"emptyValue"),d.k0s(),d.j41(9,"td",12),d.EFF(10),d.nI1(11,"appJsDateFormat"),d.nI1(12,"emptyValue"),d.k0s(),d.j41(13,"td"),d.EFF(14),d.nI1(15,"duration"),d.nI1(16,"emptyValue"),d.k0s(),d.j41(17,"td"),d.EFF(18),d.nI1(19,"duration"),d.nI1(20,"emptyValue"),d.k0s()()),2&Z){const z=Y.$implicit;d.R7$(2),d.JRh(d.bMT(4,8,d.i5U(3,5,z.Day,"L"))),d.R7$(4),d.JRh(d.bMT(8,12,d.bMT(7,10,z.loggedInDt))),d.R7$(4),d.JRh(d.bMT(12,16,d.bMT(11,14,z.LoggedOutDt))),d.R7$(4),d.JRh(d.bMT(16,20,d.bMT(15,18,z.LoggedInDayInterval))),d.R7$(4),d.JRh(d.bMT(20,24,d.bMT(19,22,z.TalkingDayInterval)))}}function j(Z,Y){1&Z&&(d.j41(0,"tr")(1,"td",9),d.nrm(2,"div",13),d.k0s()())}function v(Z,Y){if(1&Z){const z=d.RV6();d.j41(0,"tr")(1,"td",14)(2,"a",15),d.bIt("click",function(){C.eBV(z);const J=d.XpG(2);return C.Njj(J.nextPage$.next())}),d.EFF(3),d.nI1(4,"translate"),d.k0s()()()}2&Z&&(d.R7$(3),d.JRh(d.bMT(4,1,"_i18n.ReportsShowMore")))}function Q(Z,Y){if(1&Z&&(d.j41(0,"tr")(1,"td",14),d.EFF(2),d.nI1(3,"translate"),d.k0s()()),2&Z){const z=d.XpG(5);d.R7$(2),d.SpI(" ",d.bMT(3,1,z.noDataMessage())," ")}}function V(Z,Y){if(1&Z&&(d.Z7z(0,B,21,26,"tr",11,d.fX1),d.nVh(2,j,3,0,"tr")(3,v,5,3,"tr")(4,Q,4,3,"tr")),2&Z){const z=Y;d.Dyx(z.data),d.R7$(2),d.vxM(z.isLoading?2:z.hasMore?3:z.data.length?-1:4)}}function W(Z,Y){if(1&Z&&(d.nVh(0,V,5,1),d.nI1(1,"async")),2&Z){let z;d.vxM((z=d.bMT(1,1,Y.paginator$))?0:-1,z)}}function U(Z,Y){if(1&Z){const z=d.RV6();d.j41(0,"tr",8),d.bIt("click",function(){const J=C.eBV(z).$implicit,oe=d.XpG(2);return C.Njj(oe.onGroupClick(J.Number))}),d.j41(1,"td",9),d.nrm(2,"span",10),d.EFF(3),d.k0s()(),d.nVh(4,W,2,3)}if(2&Z){let z;const ie=Y.$implicit,J=d.XpG(2);d.R7$(2),d.AVh("dropdown-arrow-icon-rotated",!J.expandedGroups.has(ie.Number)),d.R7$(),d.SpI(" ",J.formatAndJoinValues(d.l_i(4,x,ie.Number,ie.Name))," "),d.R7$(),d.vxM((z=J.expandedGroups.get(ie.Number))?4:-1,z)}}function K(Z,Y){1&Z&&(d.j41(0,"tr")(1,"td",9),d.nrm(2,"div",13),d.k0s()())}function D(Z,Y){if(1&Z&&(d.j41(0,"tr")(1,"td",14),d.EFF(2),d.nI1(3,"translate"),d.k0s()()),2&Z){const z=d.XpG(2);d.R7$(2),d.SpI(" ",d.bMT(3,1,z.noDataMessage(!z.isReportAvailable,!z.canViewReport))," ")}}function q(Z,Y){if(1&Z&&(d.j41(0,"table")(1,"thead")(2,"tr",7)(3,"th"),d.EFF(4),d.nI1(5,"translate"),d.k0s(),d.j41(6,"th"),d.EFF(7),d.nI1(8,"translate"),d.k0s(),d.j41(9,"th"),d.EFF(10),d.nI1(11,"translate"),d.k0s(),d.j41(12,"th"),d.EFF(13),d.nI1(14,"translate"),d.k0s(),d.j41(15,"th"),d.EFF(16),d.nI1(17,"translate"),d.k0s()()(),d.j41(18,"tbody"),d.Z7z(19,U,5,7,null,null,E),d.nVh(21,K,3,0,"tr")(22,D,4,3,"tr"),d.k0s()()),2&Z){const z=Y;d.R7$(4),d.JRh(d.bMT(5,6,"_i18n.ReportsAgentDay")),d.R7$(3),d.JRh(d.bMT(8,8,"_i18n.ReportsLoggedIn")),d.R7$(3),d.JRh(d.bMT(11,10,"_i18n.ReportsLoggedOut")),d.R7$(3),d.JRh(d.bMT(14,12,"_i18n.ReportsTotalLoggedInPerDay")),d.R7$(3),d.JRh(d.bMT(17,14,"_i18n.ReportsTotalTalking")),d.R7$(3),d.Dyx(z.data),d.R7$(2),d.vxM(z.hasMore?21:z.isLoading||z.data.length?-1:22)}}function G(Z=null){return new A.gE({dateRange:new A.MJ(new I.J,{nonNullable:!0}),pbxQueue:new A.MJ(new O({pbxQueue:Z}),{nonNullable:!0})})}function F(Z,Y=!0){const{dateRange:z,pbxQueue:ie}=Z;return{...z.value,...ie.value,canViewReport:Y}}let N=(()=>{class Z{dataSource=(0,C.WQX)(g.S);route=(0,C.WQX)(o.nX);router=(0,C.WQX)(o.Ix);destroy$=(0,C.WQX)(C.abz);modalService=(0,C.WQX)(L.B);
1fileDownloadService=(0,C.WQX)(S.y);paginator$;hasMoreOrLoading$;parameters$=new y.t(null);nextPage$=new y.t(void 0);reset$=new y.t(void 0);firstQueue=this.route.snapshot.data.firstQueue;filter=G(this.firstQueue);expandedGroups=new Map;canViewReport=null!=this.firstQueue;scheduledReportType=c.G.AgentLoginHistory;get isReportAvailable(){return this.route.snapshot.data.reportsAvailable}get parameters(){return F(this.filter.value,this.isReportAvailable&&this.canViewReport)}noDataMessage=H.Ns;constructor(){this.paginator$=(0,p.K)(this.modalService,this.destroy$,this.parameters$,this.nextPage$,this.reset$,this.dataSource.agentsDataFetcher,100),this.hasMoreOrLoading$=this.paginator$.pipe((0,b.T)(z=>!z.hasMore||z.isLoading))}onGroupClick(z){if(this.expandedGroups.has(z))this.expandedGroups.delete(z);else{const ie=new y.t(void 0),J=new y.t(void 0),oe={paginator$:(0,p.K)(this.modalService,this.destroy$,this.parameters$,ie,J,this.dataSource.createLoginsDataFetcher(z),100),nextPage$:ie,reset$:J};this.expandedGroups.set(z,oe)}}submitFilter(){this.expandedGroups.clear(),setTimeout(()=>{this.parameters$.next(this.parameters)},100)}onSaveReport(z){(0,s.J)(this.modalService,this.scheduledReportType,z,this.dataSource.generateReportParams(this.parameters))}downloadCsv(){this.fileDownloadService.download(this.dataSource.generateCSVDownloadLink(this.parameters))}back(){this.router.navigate([".."],{relativeTo:this.route})}formatAndJoinValues=H.pk;static \u0275fac=function(ie){return new(ie||Z)};static \u0275cmp=d.VBU({type:Z,selectors:[["ng-component"]],features:[d.Jv_([g.S])],decls:10,vars:15,consts:[["header","_i18n.AgentLoginHistory",3,"back","helpUrl"],["header","",3,"exportClicked","showReportPrint","disabled"],["top-bar","",3,"filterChanged","saveReport","filterForm","formGroup","reportType","disabled"],["formControlName","dateRange"],["formControlName","pbxQueue","data-qa","queue-filter"],["id","scrollableList",1,"h-100","scrollable-table","grouped-table"],["infiniteScroll","",3,"infiniteScrollCallback","infiniteScrollContainer","infiniteScrollDistance","infiniteScrollDisabled"],[1,"table-header"],[1,"table-group-header",3,"click"],["colspan","5"],[1,"dropdown-arrow-icon"],[1,"table-group-row"],["nowrap",""],[1,"loader"],["colspan","5",1,"text-center"],[1,"dashed","link",3,"click"]],template:function(ie,J){if(1&ie&&(d.j41(0,"app-page",0),d.bIt("back",function(){return J.back()}),d.j41(1,"app-report-action-buttons",1),d.bIt("exportClicked",function(){return J.downloadCsv()}),d.k0s(),d.j41(2,"app-complex-filter",2),d.bIt("filterChanged",function(){return J.submitFilter()})("saveReport",function(ne){return J.onSaveReport(ne)}),d.nrm(3,"app-date-range-filter",3)(4,"app-peer-filter",4),d.k0s(),d.j41(5,"div",5)(6,"div",6),d.nI1(7,"async"),d.bIt("infiniteScrollCallback",function(){return J.nextPage$.next()}),d.nVh(8,q,23,16,"table"),d.nI1(9,"async"),d.k0s()()()),2&ie){let oe;d.Y8G("helpUrl","_i18n.ReportsUri"),d.R7$(),d.Y8G("showReportPrint",!0)("disabled",!J.canViewReport||!J.isReportAvailable),d.R7$(),d.Y8G("filterForm",J.filter)("formGroup",J.filter)("reportType",J.scheduledReportType)("disabled",!J.canViewReport||!J.isReportAvailable),d.R7$(4),d.Y8G("infiniteScrollContainer","#scrollableList")("infiniteScrollDistance",1)("infiniteScrollDisabled",d.bMT(7,11,J.hasMoreOrLoading$)),d.R7$(2),d.vxM((oe=d.bMT(9,13,J.paginator$))?8:-1,oe)}},dependencies:[M.H,m.n,i.M,A.X1,A.BC,A.cb,A.j4,A.JD,r.B,P.D,$,_.D9,a.Jj,h.N,l.bB,e.vE],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}']})}return Z})()},87926(te,k,t){t.d(k,{S:()=>I});var C=t(25558),y=t(7673),A=t(96354),o=t(2793),g=t(50942),c=t(97201),p=t(4499),b=t(35547),L=t(85802);let H=(()=>{class i extends p.d{downloadAgentLoginHistory(T,n="body"){const u=T?.clientTimeZone;if(null==u)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadAgentLoginHistory.");const _=T?.startDt;if(null==_)throw new Error("Required parameter startDt was null or undefined when calling downloadAgentLoginHistory.");const d=T?.endDt;if(null==d)throw new Error("Required parameter endDt was null or undefined when calling downloadAgentLoginHistory.");const $=T?.queueDnStr;if(null==$)throw new Error("Required parameter queueDnStr was null or undefined when calling downloadAgentLoginHistory.");const w=T?.agentDnStr;if(null==w)throw new Error("Required parameter agentDnStr was null or undefined when calling downloadAgentLoginHistory.");const R=T?.$top,f=T?.$skip,O=T?.$search,M=T?.$filter,m=T?.$count,P=T?.$select,a=T?.$orderby,l=T?.$expand;let e=new c.rx(this.encoder);e=this.addToHttpParams(e,"$top",R,c.l2.Form,!1),e=this.addToHttpParams(e,"$skip",f,c.l2.Form,!1),e=this.addToHttpParams(e,"$search",O,c.l2.Form,!1),e=this.addToHttpParams(e,"$filter",M,c.l2.Form,!1),e=this.addToHttpParams(e,"$count",m,c.l2.Form,!1),e=this.addToHttpParams(e,"$select",P,c.l2.Form,!1),e=this.addToHttpParams(e,"$orderby",a,c.l2.Form,!1),e=this.addToHttpParams(e,"$expand",l,c.l2.Form,!1);let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(s=s.set("Accept",h));let x="json";h&&(x=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");let E=`/ReportAgentLoginHistory/Pbx.DownloadAgentLoginHistory(clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},agentDnStr=${this.configuration.encodeParam({name:"agentDnStr",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:B,withCredentials:j}=this.configuration;return this.httpClient.request("get",`${B}${E}`,{params:e.toHttpParams(),responseType:x,...j?{withCredentials:j}:{},headers:s,observe:n})}downloadAgentLoginHistoryQuery(T,n="body",u=!1,_){const d=T.clientTimeZone;if(null==d)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadAgentLoginHistory.");const $=T.startDt;if(null==$)throw new Error("Required parameter startDt was null or undefined when calling downloadAgentLoginHistory.");const w=T.endDt;if(null==w)throw new Error("Required parameter endDt was null or undefined when calling downloadAgentLoginHistory.");const R=T.queueDnStr;if(null==R)throw new Error("Required parameter queueDnStr was null or undefined when calling downloadAgentLoginHistory.");const f=T.agentDnStr;if(null==f)throw new Error("Required parameter agentDnStr was null or undefined when calling downloadAgentLoginHistory.");const O=T.$top,M=T.$skip,m=T.$search,P=T.$filter,a=T.$count,l=T.$select,e=T.$orderby,s=T.$expand;let h=new c.rx(this.encoder);return h=this.addToHttpParams(h,"$top",O,c.l2.Form,!1),h=this.addToHttpParams(h,"$skip",M,c.l2.Form,!1),h=this.addToHttpParams(h,"$search",m,c.l2.Form,!1),h=this.addToHttpParams(h,"$filter",P,c.l2.Form,!1),h=this.addToHttpParams(h,"$count",a,c.l2.Form,!1),h=this.addToHttpParams(h,"$select",l,c.l2.Form,!1),h=this.addToHttpParams(h,"$orderby",e,c.l2.Form,!1),h=this.addToHttpParams(h,"$expand",s,c.l2.Form,!1),`/ReportAgentLoginHistory/Pbx.DownloadAgentLoginHistory(clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},agentDnStr=${this.configuration.encodeParam({name:"agentDnStr",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+h.toString()}getAgentLoginHistoryData(T,n="body"){const u=T?.clientTimeZone;if(null==u)throw new Error("Required parameter clientTimeZone was null or undefined when calling getAgentLoginHistoryData.");const _=T?.startDt;if(null==_)throw new Error("Required parameter startDt was null or undefined when calling getAgentLoginHistoryData.");const d=T?.endDt;if(null==d)throw new Error("Required parameter endDt was null or undefined when calling getAgentLoginHistoryData.");const $=T?.queueDnStr;if(null==$)throw new Error("Required parameter queueDnStr was null or undefined when calling getAgentLoginHistoryData.");const w=T?.agentDnStr;if(null==w)throw new Error("Required parameter agentDnStr was null or undefined when calling getAgentLoginHistoryData.");const R=T?.$top,f=T?.$skip,O=T?.$search,M=T?.$filter,m=T?.$count,P=T?.$select,a=T?.$orderby,l=T?.$expand;let e=new c.rx(this.encoder);e=this.addToHttpParams(e,"$top",R,c.l2.Form,!1),e=this.addToHttpParams(e,"$skip",f,c.l2.Form,!1),e=this.addToHttpParams(e,"$search",O,c.l2.Form,!1),e=this.addToHttpParams(e,"$filter",M,c.l2.Form,!1),e=this.addToHttpParams(e,"$count",m,c.l2.Form,!1),e=this.addToHttpParams(e,"$select",P,c.l2.Form,!1),e=this.addToHttpParams(e,"$orderby",a,c.l2.Form,!1),e=this.addToHttpParams(e,"$expand",l,c.l2.Form,!1);let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(s=s.set("Accept",h));let x="json";h&&(x=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");let E=`/ReportAgentLoginHistory/Pbx.GetAgentLoginHistoryData(clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},agentDnStr=${this.configuration.encodeParam({name:"agentDnStr",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:B,withCredentials:j}=this.configuration;return this.httpClient.request("get",`${B}${E}`,{params:e.toHttpParams(),responseType:x,...j?{withCredentials:j}:{},headers:s,observe:n})}getAgentLoginHistoryDataQuery(T,n="body",u=!1,_){const d=T.clientTimeZone;if(null==d)throw new Error("Required parameter clientTimeZone was null or undefined when calling getAgentLoginHistoryData.");const $=T.startDt;if(null==$)throw new Error("Required parameter startDt was null or undefined when calling getAgentLoginHistoryData.");const w=T.endDt;if(null==w)throw new Error("Required parameter endDt was null or undefined when calling getAgentLoginHistoryData.");const R=T.queueDnStr;if(null==R)throw new Error("Required parameter queueDnStr was null or undefined when calling getAgentLoginHistoryData.");const f=T.agentDnStr;if(null==f)throw new Error("Required parameter agentDnStr was null or undefined when calling getAgentLoginHistoryData.");const O=T.$top,M=T.$skip,m=T.$search,P=T.$filter,a=T.$count,l=T.$select,e=T.$orderby,s=T.$expand;let h=new c.rx(this.encoder);return h=this.addToHttpParams(h,"$top",O,c.l2.Form,!1),h=this.addToHttpParams(h,"$skip",M,c.l2.Form,!1),h=this.addToHttpParams(h,"$search",m,c.l2.Form,!1),h=this.addToHttpParams(h,"$filter",P,c.l2.Form,!1),h=this.addToHttpParams(h,"$count",a,c.l2.Form,!1),h=this.addToHttpParams(h,"$select",l,c.l2.Form,!1),h=this.addToHttpParams(h,"$orderby",e,c.l2.Form,!1),h=this.addToHttpParams(h,"$expand",s,c.l2.Form,!1),`/ReportAgentLoginHistory/Pbx.GetAgentLoginHistoryData(clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},agentDnStr=${this.configuration.encodeParam({name:"agentDnStr",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+h.toString()}static \u0275fac=(()=>{let T;return function(u){return(T||(T=b.xGo(i)))(u||i)}})();static \u0275prov=L.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var S=t(96794);let I=(()=>{class i{queuesApiService=(0,L.WQX)(o.S);peersApiService=(0,L.WQX)(g.L);reportAgentLoginHistoryApiService=(0,L.WQX)(H);createLoginsDataFetcher=T=>(n,u)=>_=>_.pipe((0,C.n)(d=>this.requestLogins(n,T,d,u)),(0,A.T)(d=>d.value));agentsDataFetcher=(T,n)=>T.canViewReport?u=>u.pipe((0,C.n)(_=>this.requestAgents(T,_,n)),(0,A.T)(_=>_.value)):u=>u.pipe((0,C.n)(()=>(0,y.of)([])));requestAgents(T,n,u){return this.peersApiService.getPeerByNumber({number:T.pbxQueue.Number}).pipe((0,C.n)(_=>this.queuesApiService.listAgents({$skip:n*u,$top:u,$select:["Name","Number"],$orderby:["Name"],id:_.Id})))}requestLogins(T,n,u,_){return this.reportA
1gentLoginHistoryApiService.getAgentLoginHistoryData({$skip:u*_,$top:_,clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,agentDnStr:n,queueDnStr:T.pbxQueue.Number,...(0,S.lr)(T)})}generateCSVDownloadLink(T){return this.reportAgentLoginHistoryApiService.downloadAgentLoginHistoryQuery({clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,agentDnStr:"",queueDnStr:T.pbxQueue.Number,...(0,S.lr)(T)})}generateReportParams(T){return JSON.stringify({ClientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,AgentDnStr:"",QueueDnStr:T.pbxQueue.Number,StartDt:T.periodFromTo[0],EndDt:T.periodFromTo[1],DateRangeType:T.periodType,FirstDayOfWeek:T.firstWeekDay})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=L.jDH({token:i,factory:i.\u0275fac})}return i})()},70514(te,k,t){t.d(k,{GN:()=>g,YG:()=>A,b$:()=>c,fE:()=>p});var C=t(81753);const A=[{id:void 0,translation:"_i18n.AuditCfgItemAny",searchable:!0},{id:0,translation:"_i18n.AuditCfgItemEmpty",searchable:!1},{id:1,translation:"_i18n.AuditCfgItemWrapper",searchable:!1},{id:2,translation:"_i18n.AuditCfgItemRoot",searchable:!1},{id:3,translation:"_i18n.AuditCfgItemDn",searchable:!0},{id:4,translation:"_i18n.AuditCfgItemSpecialDn",searchable:!0},{id:5,translation:"_i18n.AuditCfgItemConnection",searchable:!1},{id:6,translation:"_i18n.AuditCfgItemExternalAgent",searchable:!1},{id:7,translation:"_i18n.AuditCfgItemExtension",searchable:!0},{id:8,translation:"_i18n.AuditCfgItemHotdesking",searchable:!1},{id:9,translation:"_i18n.AuditCfgItemExtensionForwarding",searchable:!1},{id:10,translation:"_i18n.AuditCfgItemExtensionAwayRule",searchable:!1},{id:11,translation:"_i18n.AuditCfgItemExtensionAvailableRule",searchable:!1},{id:12,translation:"_i18n.AuditCfgItemExtensionExceptionRule",searchable:!1},{id:13,translation:"_i18n.AuditCfgItemEmergencyNotificationsSettings",searchable:!0},{id:14,translation:"_i18n.AuditCfgItemGroup",searchable:!0},{id:15,translation:"_i18n.AuditCfgItemGroupMember",searchable:!1},{id:16,translation:"_i18n.AuditCfgItemQueue",searchable:!0},{id:17,translation:"_i18n.AuditCfgItemRingGroup",searchable:!0},{id:18,translation:"_i18n.AuditCfgItemRoutePoint",searchable:!0},{id:19,translation:"_i18n.AuditCfgItemCodec",searchable:!1},{id:20,translation:"_i18n.AuditCfgItemUserRights",searchable:!1},{id:21,translation:"_i18n.AuditCfgItemDestination",searchable:!1},{id:22,translation:"_i18n.AuditCfgItemPhoneVlan",searchable:!1},{id:23,translation:"_i18n.AuditCfgItemPhoneLldp",searchable:!1},{id:24,translation:"_i18n.AuditCfgItemFax",searchable:!0},{id:25,translation:"_i18n.AuditCfgItemIvr",searchable:!0},{id:26,translation:"_i18n.AuditCfgItemGateway",searchable:!1},{id:27,translation:"_i18n.DectFxsFilter",searchable:!0},{id:28,translation:"_i18n.AuditCfgItemFxsLine",searchable:!1},{id:29,translation:"_i18n.AuditCfgItemVoipProvider",searchable:!1},{id:30,translation:"_i18n.AuditCfgItemTrunk",searchable:!0},{id:32,translation:"_i18n.AuditCfgItemInboundRule",searchable:!0},{id:33,translation:"_i18n.AuditCfgItemOutboundRule",searchable:!0},{id:34,translation:"_i18n.AuditCfgItemResetQueueStatisticsSchedule",searchable:!1},{id:35,translation:"_i18n.AuditCfgItemPhoneDevice",searchable:!1},{id:36,translation:"_i18n.AuditCfgItemPhonebookEntry",searchable:!0},{id:37,translation:"_i18n.AuditCfgItemExtensionEditor",searchable:!1},{id:38,translation:"_i18n.AuditCfgItemExternalAccess",searchable:!1},{id:39,translation:"_i18n.AuditCfgItemIvrEditor",searchable:!1},{id:40,translation:"_i18n.AuditCfgItemBulkExtensionEditor",searchable:!1},{id:41,translation:"_i18n.AuditCfgItemBulkExtensionAwayRule",searchable:!1},{id:42,translation:"_i18n.AuditCfgItemBulkExtensionAvailableRule",searchable:!1},{id:43,translation:"_i18n.AuditCfgItemBulkExtensionForwarding",searchable:!1},{id:44,translation:"_i18n.AuditCfgItemPromptSet",searchable:!0},{id:45,translation:"_i18n.AuditCfgItemPrompt",searchable:!1},{id:46,translation:"_i18n.AuditCfgItemBlacklistEntry",searchable:!0},{id:47,translation:"_i18n.AuditCfgItemInboundParameter",searchable:!1},{id:48,translation:"_i18n.AuditCfgItemOutboundParameter",searchable:!1},{id:49,translation:"_i18n.AuditCfgItemSourceIdParameter",searchable:!1},{id:50,translation:"_i18n.AuditCfgItemSettings",searchable:!0},{id:51,translation:"_i18n.AuditCfgItemGcmSettings",searchable:!0},{id:52,translation:"_i18n.AuditCfgItemNotificationSettings",searchable:!0},{id:53,translation:"_i18n.AuditCfgItemNetworkSettings",searchable:!0},{id:54,translation:"_i18n.AuditCfgItemCdrSettings",searchable:!0},{id:55,translation:"_i18n.AuditCfgItemDirSearchSettings",searchable:!1},{id:56,translation:"_i18n.AuditCfgItemLdapSettings",searchable:!1},{id:57,translation:"_i18n.AuditCfgItemPhoneBookSettings",searchable:!0},{id:58,translation:"_i18n.AuditCfgItemSecuritySettings",searchable:!1},{id:59,translation:"_i18n.AuditCfgItemRecordingSettings",searchable:!0},{id:60,translation:"_i18n.AuditCfgItemRecordingPathSettings",searchable:!0},{id:61,translation:"_i18n.AuditCfgItemE164settings",searchable:!0},{id:62,translation:"_i18n.AuditCfgItemOfficeHoursSettings",searchable:!0},{id:63,translation:"_i18n.AuditCfgItemConferenceSettings",searchable:!0},{id:64,translation:"_i18n.AuditCfgItemMusicOnHoldSettings",searchable:!0},{id:65,translation:"_i18n.AuditCfgItemCallParkingSettings",searchable:!0},{id:66,translation:"_i18n.AuditCfgItemDialSettings",searchable:!0},{id:67,translation:"_i18n.AuditCfgItemVmailSettings",searchable:!0},{id:68,translation:"_i18n.AuditCfgItemStringItem",searchable:!0},{id:69,translation:"_i18n.AuditCfgItemPhoneBlacklistEntry",searchable:!0},{id:70,translation:"_i18n.AuditCfgItemBackupSettings",searchable:!0},{id:71,translation:"_i18n.AuditCfgItemLocationSettings",searchable:!1},{id:72,translation:"_i18n.AuditCfgItemFailoverSettings",searchable:!0}
1,{id:73,translation:"_i18n.AuditCfgItemExternalAccessSettings",searchable:!1},{id:74,translation:"_i18n.AuditCfgItemScheduledRestoreSettings",searchable:!0},{id:75,translation:"_i18n.AuditCfgItemScheduledBackupSettings",searchable:!0},{id:76,translation:"_i18n.AuditCfgItemBlf",searchable:!1},{id:77,translation:"_i18n.AuditCfgItemFaxSettings",searchable:!0},{id:78,translation:"_i18n.AuditCfgItemClickToCallSettings",searchable:!1},{id:79,translation:"_i18n.AuditCfgItemClickToCallDestination",searchable:!1},{id:80,translation:"_i18n.AuditCfgItemCidFormatting",searchable:!1},{id:81,translation:"_i18n.AuditCfgItemHoliday",searchable:!1},{id:82,translation:"_i18n.AuditCfgItemPlaylist",searchable:!0},{id:83,translation:"_i18n.AuditCfgItemRouting",searchable:!1},{id:84,translation:"_i18n.AuditCfgItemGroupMemberRole",searchable:!1},{id:85,translation:"_i18n.AuditCfgItemFixedStringItem",searchable:!1},{id:86,translation:"_i18n.AuditCfgItemAutoUpdate",searchable:!0},{id:87,translation:"_i18n.AuditCfgItemHotelServices",searchable:!0},{id:88,translation:"_i18n.AuditCfgItemCrmIntegration",searchable:!0},{id:89,translation:"_i18n.AuditCfgItemHostingModeSettings",searchable:!1},{id:90,translation:"_i18n.AuditCfgItemQueueAgent",searchable:!1},{id:91,translation:"_i18n.AuditCfgItemIvrForward",searchable:!1},{id:92,translation:"_i18n.AuditCfgItemGoogle",searchable:!0},{id:93,translation:"_i18n.AuditCfgItemAntiHacking",searchable:!0},{id:94,translation:"_i18n.AuditCfgItemAdminCredentials",searchable:!1},{id:95,translation:"_i18n.AuditCfgItemConsoleRestrictions",searchable:!0},{id:96,translation:"_i18n.AuditCfgItemSecureSip",searchable:!0},{id:97,translation:"_i18n.AuditCfgItemAllowedCountryCodes",searchable:!0},{id:98,translation:"_i18n.AuditCfgItemTunnel",searchable:!1},{id:99,translation:"_i18n.AuditCfgItemExtensionRights",searchable:!1},{id:100,translation:"_i18n.AuditCfgItemOptions",searchable:!0},{id:101,translation:"_i18n.AuditCfgItemCodecs",searchable:!0},{id:102,translation:"_i18n.AuditCfgItemTeamsIntegration",searchable:!0},{id:103,translation:"_i18n.AuditCfgItemMessaging",searchable:!1},{id:104,translation:"_i18n.AuditCfgItemMessagingTrunk",searchable:!1},{id:105,translation:"_i18n.ServicePrincipals",searchable:!0},{id:1e3,translation:"_i18n.AuditCfgItemActivityLog",searchable:!0},{id:1001,translation:"_i18n.AuditCfgItemEventLog",searchable:!0},{id:1002,translation:"_i18n.CallHistory",searchable:!0},{id:1003,translation:"_i18n.AuditCfgItemChatMessages",searchable:!0},{id:1004,translation:"_i18n.AuditCfgItemServices",searchable:!0},{id:1005,translation:"_i18n.AuditCfgItemFirewall",searchable:!0},{id:1006,translation:"_i18n.AuditCfgItemLicense",searchable:!0},{id:1007,translation:"_i18n.AuditCfgItemMessaging",searchable:!0},{id:1008,translation:"_i18n.AuditCfgItemReport",searchable:!0},{id:1009,translation:"_i18n.AuditCfgItemParameter",searchable:!0},{id:1010,translation:"_i18n.AuditCfgItemCallLog",searchable:!0},{id:1011,translation:"_i18n.AuditCfgItemWebMeeting",searchable:!1},{id:1012,translation:"_i18n.AuditCfgItemOffice365",searchable:!0},{id:1013,translation:"_i18n.AuditCfgItemInstanceManager",searchable:!1},{id:1014,translation:"_i18n.AuditCfgItemTenantProperty",searchable:!0},{id:1015,translation:"_i18n.AuditCfgItemGlobalParameters",searchable:!1},{id:1016,translation:"_i18n.AuditCfgItemOperatingSystem",searchable:!0},{id:1017,translation:"_i18n.AuditCfgItemPhoneTemplates",searchable:!0},{id:1018,translation:"_i18n.Category.fxs",searchable:!0},{id:1019,translation:"_i18n.AuditCfgItemProviderTemplates",searchable:!0},{id:1020,translation:"_i18n.AuditCfgItemEmailTemplates",searchable:!0},{id:1021,translation:"_i18n.AuditCfgItemCapture",searchable:!0},{id:1022,translation:"_i18n.ScheduledReports",searchable:!0},{id:1023,translation:"_i18n.RemoteStorage",searchable:!0},{id:1024,translation:"_i18n.Firmwares",searchable:!0},{id:1025,translation:"_i18n.AuditAccess",searchable:!0},{id:1026,translation:"_i18n.DataConnectors",searchable:!0},{id:1027,translation:"_i18n.AuditCfgItemAmazon",searchable:!0},{id:1028,translation:"_i18n.AuditCfgItemTranscription",searchable:!0},{id:1029,translation:"_i18n.CallMonitoring",searchable:!0},{id:1030,translation:"_i18n.OpenAIAPIConfiguration",searchable:!0},{id:1031,translation:"_i18n.Syslog",searchable:!0},{id:1e4,translation:"_i18n.AuditCfgItemAuditSettings",searchable:!1}],g=[{id:void 0,translation:"_i18n.AuditActionAny",searchable:!0},{id:0,translation:"_i18n.AuditActionCreate",searchable:!0,details:!0,newDataOnly:!0},{id:1,translation:"_i18n.AuditActionUpdate",searchable:!0,details:!0},{id:2,translation:"_i18n.AuditActionDelete",searchable:!0,details:!0},{id:3,translation:"_i18n.AuditActionPurge",searchable:!0,details:!0,newDataOnly:!0},{id:4,translation:"_i18n.AuditActionStart",searchable:!0},{id:5,translation:"_i18n.AuditActionStop",searchable:!0},{id:6,translation:"_i18n.AuditActionRestart",searchable:!0},{id:7,translation:"_i18n.AuditActionImport",searchable:!0,details:!0,newDataOnly:!0},{id:8,translation:"_i18n.AuditActionEnable",searchable:!0},{id:9,translation:"_i18n.AuditActionDisable",searchable:!0},{id:10,translation:"_i18n.AuditActionRestore",searchable:!0},{id:11,translation:"_i18n.AuditActionLogout",searchable:!0},{id:12,translation:"_i18n.AuditActionArchive",searchable:!0},{id:13,translation:"_i18n.AuditActionWelcome",searchable:!0},{id:14,translation:"_i18n.AuditActionPush",searchable:!0},{id:16,translation:"_i18n.AuditActionExport",searchable:!0},{id:17,translation:"_i18n.AuditActionReset",searchable:!0},{id:18,translation:"_i18n.AuditActionLogin",searchable:!0},{id:19,translation:"_i18n.AuditActionClear",searchable:!0},{id:20,translation:"_i18n.AuditActionAssign",searchable:!0,details:!0},{id:21,translation:"_i18n.AuditActionRegenerate",searchable:!0,details:!0},{id:22,translation:"_i18n.AuditActionToken",searchable:!0},{id:23,translation:"_i18n.AuditActionSupport",searchable:!0},{id:24,translation:"_i18n.RequestHelp",searchable:!0},{id:25,translation:"_i18n.RemoteAccess",searchable:!0},{id:26,translation:"_i18n.Transcribe",searchable:!0},{id:27,translation:"_i18n.ImpersonateUser",searchable:!0}],c=b=>{const L=A.find(H=>H.id===b);return L&&L.translation?L.translation:C.eI},p=b=>{const L=g.find(H=>H.id===b);return L&&L.translation?L.translation:C.eI}},46941(te,k,t){t.d(k,{Gt:()=>f,lE:()=>w,bQ:()=>R});var C=t(84412),y=t(25558),A=t(7673),o=t(96354),g=t(97201),c=t(4499),p=t(35547),b=t(85802);let L=(()=>{class O extends c.d{downloadAuditLog(m,P="body"){const a=m?.clientTimeZone;if(null==a)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadAuditLog.");const l=m?.$top,e=m?.$skip,s=m?.$search,h=m?.$filter,x=m?.$count,E=m?.$select,B=m?.$orderby,j=m?.$expand;let v=new g.rx(this.encoder);v=this.addToHttpParams(v,"$top",l,g.l2.Form,!1),v=this.addToHttpParams(v,"$skip",e,g.l2.Form,!1),v=this.addToHttpParams(v,"$search",s,g.l2.Form,!1),v=this.addToHttpParams(v,"$filter",h,g.l2.Form,!1),v=this.addToHttpParams(v,"$count",x,g.l2.Form,!1),v=this.addToHttpParams(v,"$select",E,g.l2.Form,!1),v=this.addToHttpParams(v,"$orderby",B,g.l2.Form,!1),v=this.addToHttpParams(v,"$expand",j,g.l2.Form,!1);let Q=this.defaultHeaders;Q=this.configuration.addCredentialToHeaders("Application","Authorization",Q,"Bearer ");const V=this.configuration.selectHeaderAccept(["application/json"]);void 0!==V&&(Q=Q.set("Accept",V));let W="json";V&&(W=V.startsWith("text")?"text":this.configuration.isJsonMime(V)?"json":"blob");let U=`/ReportAuditLog/Pbx.DownloadAuditLog(clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:a,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:K,withCredentials:D}=this.configuration;return this.httpClient.request("get",`${K}${U}`,{params:v.toHttpParams(),responseType:W,...D?{withCredentials:D}:{},headers:Q,observe:P})}downloadAuditLogQuery(m,P="body",a=!1,l){const e=m.clientTimeZone;if(null==e)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadAuditLog.");const s=m.$top,h=m.$skip,x=m.$search,E=m.$filter,B=m.$count,j=m.$select,v=m.$orderby,Q=m.$expand;let V=new g.rx(this.encoder);return V=this.addToHttpParams(V,"$top",s,g.l2.Form,!1),V=this.addToHttpParams(V,"$skip",h,g.l2.Form,!1),V=this.addToHttpParams(V,"$search",x,g.l2.Form,!1),V=this.addToHttpParams(V,"$filter",E,g.l2.Form,!1),V=this.addToHttpParams(V,"$count",B,g.l2.Form,!1),V=this.addToHttpParams(V,"$select",j,g.l2.Form,!1),V=this.addToHttpParams(V,"$orderby",v,g.l2.Form,!1),V=this.addToHttpParams(V,"$expand",Q,g.l2.Form,!1),`/ReportAuditLog/Pbx.DownloadAuditLog(clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:e,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+V.toString()}getAuditLogData(m,P="body"){const a=m?.$top,l=m?.$skip,e=m?.$search,s=m?.$filter,h=m?.$count,x=m?.$select,E=m?.$orderby,B=m?.$expand;let j=new g.rx(this.encoder);j=this.addToHttpParams(j,"$top",a,g.l2.Form,!1),j=this.addToHttpParams(j,"$skip",l,g.l2.Form,!1),j=this.addToHttpParams(j,"$search",e,g.l2.Form,!1),j=this.addToHttpParams(j,"$filter",s,g.l2.Form,!1),j=this.addToHttpParams(j,"$count",h,g.l2.Form,!1),j=this.addToHttpParams(j,"$select",x,g.l2.Form,!1),j=this.addToHttpParams(j,"$orderby",E,g.l2.Form,!1),j=this.addToHttpParams(j,"$expand",B,g.l2.Form,!1);let v=this.defaultHeaders;v=this.configuration.addCredentialToHeaders("Application","Authorization",v,"Bearer ");const Q=this.configuration.selectHeaderAccept(["application/json"]);void 0!==Q&&(v=v.set("Accept",Q));let V="json";Q&&(V=Q.startsWith("text")?"text":this.configuration.isJsonMime(Q)?"json":"blob");const{basePath:U,withCredentials:K}=this.configuration;return this.httpClient.request("get",`${U}/ReportAuditLog/Pbx.GetAuditLogData()`,{params:j.toHttpParams(),responseType:V,...K?{withCredentials:K}:{},headers:v,observe:P})}getAuditLogDataQuery(m,P="body",a=!1,l){const e=m.$top,s=m.$skip,h=m.$search,x=m.$filter,E=m.$count,B=m.$select,j=m.$orderby,v=m.$expand;let Q=new g.rx(this.encoder);return Q=this.addToHttpParams(Q,"$top",e,g.l2.Form,!1),Q=this.addToHttpParams(Q,"$skip",s,g.l2.Form,!1),Q=this.addToHttpParams(Q,"$search",h,g.l2.Form,!1),Q=this.addToHttpParams(Q,"$filter",x,g.l2.Form,!1),Q=this.addToHttpParams(Q,"$count",E,g.l2.Form,!1),Q=this.addToHttpParams(Q,"$select",B,g.l2.Form,!1),Q=this.addToHttpParams(Q,"$orderby",j,g.l2.Form,!1),Q=this.addToHttpParams(Q,"$expand",v,g.l2.Form,!1),"/ReportAuditLog/Pbx.GetAuditLogData()?"+Q.toString()}static \u0275fac=(()=>{let m;return function(a){return(m||(m=p.xGo(O)))(a||O)}})();static \u0275prov=b.jDH({token:O,factory:O.\u0275fac,providedIn:"root"})}return O})();var H=t(74651),S=t(38357),I=t(62329),i=t(70514),r=t(75215);class T extends r.L{constructor(){super("_i18n.ReportsAuditAction","auditActionIndex",i.GN.map(M=>({value:M.id??-1,label:M.translation})),"auditActionIndex",!0)}static deserialize(M){return r.L.updateFromSerializedFilter(new T,M)}}class n extends r.L{constructor(){super("_i18n.ReportsAuditObjectType","auditObjTypeIndex",i.YG.filter(M=>M.searchable).map(M=>({value:M.id??-1,label:M.translation,dataQa:`type-${M.id}`})),"auditObjTypeIndex",!0)}static deserialize(M){return r.L.updateFromSerializedFilter(new n,M)}}var u=t(59882),_=t(89417),d=t(91382),$=t(38601);function w(){return new _.gE({dateRange:new _.MJ(new I.J,{nonNullable:!0}),auditActionIndex:new _.MJ(new T,{nonNullable:!0}),auditObjTypeIndex:new _.MJ(new n,{nonNullable:!0})})}function R(O,M,m=!0){const{dateRange:P,auditObjTypeIndex:a,auditActionIndex:l}=O;return{...P.value,...a.value,...l.value,search:M,canViewReport:m}}let f=(()=>{class O{reportAuditLogApiService=(0,b.WQX)(L);route=(0,b.WQX)(u.nX);searchText=new _.MJ("");modalService=(0,b.WQX)($.B);callIds=[];filter=w();scheduledReportType=H.G.AuditLogs;parameters$=new C.t(null);get parameters(){return R(this.filter.value,this.searchText.value,this.isReportAvailable)}
1get isReportAvailable(){return this.route.snapshot.data.reportsAvailable}submitFilter(){this.callIds=[],this.parameters$.next(this.parameters)}onSaveReport(m){(0,d.J)(this.modalService,this.scheduledReportType,m,this.generateReportParams(this.parameters))}dataFetcher=(m,P)=>m.canViewReport?a=>a.pipe((0,y.n)(l=>this.requestAuditLogs(m,l,P)),(0,o.T)(l=>l.value)):a=>a.pipe((0,y.n)(()=>(0,A.of)([])));requestAuditLogs(m,P,a,l){return this.reportAuditLogApiService.getAuditLogData({$skip:l??P*a,$top:a,$filter:this.generateODataFilter(m).join(" and ")})}requestAuditLogById(m){return this.reportAuditLogApiService.getAuditLogData({$skip:0,$top:1,$filter:`(Id eq ${m})`}).pipe((0,o.T)(P=>P.value[0]))}generateCSVDownloadLink(m){return this.reportAuditLogApiService.downloadAuditLogQuery({$filter:this.generateODataFilter(m).join(" and "),clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})}generateReportParams(m){return JSON.stringify({ClientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,PeriodFrom:m.periodFromTo[0],PeriodTo:m.periodFromTo[1],DateRangeType:m.periodType,FirstDayOfWeek:m.firstWeekDay,Action:m.auditActionIndex??void 0,ObjectType:m.auditObjTypeIndex??void 0,Search:(m.search??"").trim().toLowerCase()})}generateODataFilter(m){const P=[],a=(0,S.Y)((m.search??"").trim(),!0);m.search&&a&&P.push(`(contains(tolower(ObjectName), '${a}') or contains(tolower(UserName), '${a}') or contains(tolower(Ip), '${a}'))`);const l=m.periodFromTo;return P.push(`(Timestamp ge ${l[0].toISOString()} and Timestamp lt ${l[1].toISOString()})`),"number"==typeof m.auditActionIndex&&P.push(`(Action eq ${m.auditActionIndex})`),"number"==typeof m.auditObjTypeIndex&&P.push(`(ObjectType eq ${m.auditObjTypeIndex})`),P}static \u0275fac=function(P){return new(P||O)};static \u0275prov=b.jDH({token:O,factory:O.\u0275fac})}return O})()},26346(te,k,t){t.d(k,{bQ:()=>j,f3:()=>v,lE:()=>B});var C=t(85802),y=t(84412),A=t(85343),o=t(89417),g=t(59882),c=t(86982),p=t(71747),b=t(74651),L=t(79997),H=t(96354),S=t(38601),I=t(54327),i=t(48643),r=t(62329),T=t(74005),n=t(76415),u=t(79213),_=t(36715),d=t(83188),$=t(59625),w=t(22429),R=t(68018),f=t(49769),O=t(96704),M=t(78713),m=t(91382),P=t(45764),a=t(62653),l=t(89755),e=t(35547);function s(Q,V){if(1&Q&&(e.j41(0,"tr",9)(1,"td"),e.EFF(2),e.nI1(3,"appJsDateFormat"),e.nI1(4,"emptyValue"),e.k0s(),e.j41(5,"td"),e.EFF(6),e.nI1(7,"emptyValue"),e.k0s(),e.j41(8,"td"),e.EFF(9),e.nI1(10,"emptyValue"),e.k0s(),e.j41(11,"td"),e.EFF(12),e.nI1(13,"duration"),e.nI1(14,"emptyValue"),e.k0s()()),2&Q){const W=V.$implicit;e.R7$(2),e.JRh(e.bMT(4,6,e.bMT(3,4,W.CallTime))),e.R7$(4),e.JRh(e.bMT(7,8,W.Queue)),e.R7$(3),e.JRh(e.bMT(10,10,W.CallerId)),e.R7$(3),e.JRh(e.bMT(14,14,e.bMT(13,12,W.WaitingTime)))}}function h(Q,V){1&Q&&(e.j41(0,"tr")(1,"td",10),e.nrm(2,"div",11),e.k0s()())}function x(Q,V){if(1&Q&&(e.j41(0,"tr")(1,"td",12),e.EFF(2),e.nI1(3,"translate"),e.k0s()()),2&Q){const W=e.XpG(2);e.R7$(2),e.SpI(" ",e.bMT(3,1,W.noDataMessage(!W.isReportAvailable,!W.canViewReport))," ")}}function E(Q,V){if(1&Q&&(e.j41(0,"table")(1,"thead")(2,"tr",8)(3,"th"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"th"),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.j41(9,"th"),e.EFF(10),e.nI1(11,"translate"),e.k0s(),e.j41(12,"th"),e.EFF(13),e.nI1(14,"translate"),e.k0s()()(),e.j41(15,"tbody"),e.Z7z(16,s,15,16,"tr",9,e.fX1),e.nVh(18,h,3,0,"tr")(19,x,4,3,"tr"),e.k0s()()),2&Q){const W=V;e.R7$(4),e.JRh(e.bMT(5,5,"_i18n.ReportsCallTime")),e.R7$(3),e.JRh(e.bMT(8,7,"_i18n.ReportsQueue")),e.R7$(3),e.JRh(e.bMT(11,9,"_i18n.Caller")),e.R7$(3),e.JRh(e.bMT(14,11,"_i18n.ReportsWaitingTime")),e.R7$(3),e.Dyx(W.data),e.R7$(2),e.vxM(W.hasMore?18:W.isLoading||W.data.length?-1:19)}}function B(Q=null){const V=Q?[Q]:null;return new o.gE({dateRange:new o.MJ(new r.J,{nonNullable:!0}),pbxPeers:new o.MJ(new a.X("_i18n.ReportsQueues","queue","pbxPeers",[p.J.Queue],{pbxPeers:V}),{nonNullable:!0}),interval:new o.MJ(new u.V("_i18n.ReportsExcludeCallsDroppedBefore"),{nonNullable:!0})})}function j(Q,V=!0){const{dateRange:W,pbxPeers:U,interval:K}=Q;return{...W.value,...U.value,...K.value,canViewReport:V}}let v=(()=>{class Q{dataSource=(0,C.WQX)(c.j);route=(0,C.WQX)(g.nX);router=(0,C.WQX)(g.Ix);destroy$=(0,C.WQX)(C.abz);fileDownloadService=(0,C.WQX)(i.y);modalService=(0,C.WQX)(S.B);paginator$;hasMoreOrLoading$;parameters$=new y.t(null);nextPage$=new y.t(void 0);reset$=new y.t(void 0);
1firstQueue=this.route.snapshot.data.firstQueue;filter=B(this.firstQueue);canViewReport=null!=this.firstQueue;scheduledReportType=b.G.SlaBreaches;noDataMessage=I.Ns;get isReportAvailable(){return this.route.snapshot.data.reportsAvailable}get parameters(){return j(this.filter.value,this.isReportAvailable&&this.canViewReport)}constructor(){this.paginator$=(0,L.K)(this.modalService,this.destroy$,this.parameters$,this.nextPage$,this.reset$,this.dataSource.dataFetcher,100),this.hasMoreOrLoading$=this.paginator$.pipe((0,H.T)(W=>!W.hasMore||W.isLoading))}submitFilter(){this.parameters$.next(this.parameters)}downloadCsv(){this.fileDownloadService.download(this.dataSource.generateCSVDownloadLink(this.parameters))}onSaveReport(W){(0,m.J)(this.modalService,this.scheduledReportType,W,this.dataSource.generateReportParams(this.parameters))}back(){this.router.navigate([".."],{relativeTo:this.route}).catch(A.l)}static \u0275fac=function(U){return new(U||Q)};static \u0275cmp=e.VBU({type:Q,selectors:[["ng-component"]],features:[e.Jv_([c.j])],decls:11,vars:15,consts:[["header","_i18n.SLABreaches",3,"back","helpUrl"],["header","",3,"exportClicked","showReportPrint","disabled"],["top-bar","",3,"filterChanged","saveReport","filterForm","formGroup","reportType","disabled"],["formControlName","dateRange"],["formControlName","pbxPeers"],["formControlName","interval"],["id","scrollableList",1,"h-100","scrollable-table"],["infiniteScroll","",3,"infiniteScrollCallback","infiniteScrollContainer","infiniteScrollDistance","infiniteScrollDisabled"],[1,"table-header"],[1,"text-md-nowrap"],["colspan","4"],[1,"loader"],["colspan","4",1,"text-center"]],template:function(U,K){if(1&U&&(e.j41(0,"app-page",0),e.bIt("back",function(){return K.back()}),e.j41(1,"app-report-action-buttons",1),e.bIt("exportClicked",function(){return K.downloadCsv()}),e.k0s(),e.j41(2,"app-complex-filter",2),e.bIt("filterChanged",function(){return K.submitFilter()})("saveReport",function(q){return K.onSaveReport(q)}),e.nrm(3,"app-date-range-filter",3)(4,"app-multi-peer-filter",4)(5,"app-new-interval-filter",5),e.k0s(),e.j41(6,"div",6)(7,"div",7),e.nI1(8,"async"),e.bIt("infiniteScrollCallback",function(){return K.nextPage$.next()}),e.nVh(9,E,20,13,"table"),e.nI1(10,"async"),e.k0s()()()),2&U){let D;e.Y8G("helpUrl","_i18n.ReportsUri"),e.R7$(),e.Y8G("showReportPrint",!0)("disabled",!K.canViewReport||!K.isReportAvailable),e.R7$(),e.Y8G("filterForm",K.filter)("formGroup",K.filter)("reportType",K.scheduledReportType)("disabled",!K.canViewReport||!K.isReportAvailable),e.R7$(5),e.Y8G("infiniteScrollContainer","#scrollableList")("infiniteScrollDistance",1)("infiniteScrollDisabled",e.bMT(8,11,K.hasMoreOrLoading$)),e.R7$(2),e.vxM((D=e.bMT(10,13,K.paginator$))?9:-1,D)}},dependencies:[d.H,$.n,T.M,o.X1,o.BC,o.cb,o.j4,o.JD,n.B,_.J,w.D,l.b,R.D9,f.Jj,P.N,O.bB,M.vE],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}']})}return Q})()},86982(te,k,t){t.d(k,{j:()=>i});var C=t(25558),y=t(7673),A=t(96354),o=t(2793),g=t(97201),c=t(4499),p=t(35547),b=t(85802);let L=(()=>{class r extends c.d{downloadBreachesSla(n,u="body"){const _=n?.queueDnStr;if(null==_)throw new Error("Required parameter queueDnStr was null or undefined when calling downloadBreachesSla.");const d=n?.startDt;if(null==d)throw new Error("Required parameter startDt was null or undefined when calling downloadBreachesSla.");const $=n?.endDt;if(null==$)throw new Error("Required parameter endDt was null or undefined when calling downloadBreachesSla.");const w=n?.waitInterval;if(null==w)throw new Error("Required parameter waitInterval was null or undefined when calling downloadBreachesSla.");const R=n?.clientTimeZone;if(null==R)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadBreachesSla.");const f=n?.$top,O=n?.$skip,M=n?.$search,m=n?.$filter,P=n?.$count,a=n?.$select,l=n?.$orderby,e=n?.$expand;let s=new g.rx(this.encoder);s=this.addToHttpParams(s,"$top",f,g.l2.Form,!1),s=this.addToHttpParams(s,"$skip",O,g.l2.Form,!1),s=this.addToHttpParams(s,"$search",M,g.l2.Form,!1),s=this.addToHttpParams(s,"$filter",m,g.l2.Form,!1),s=this.addToHttpParams(s,"$count",P,g.l2.Form,!1),s=this.addToHttpParams(s,"$select",a,g.l2.Form,!1),s=this.addToHttpParams(s,"$orderby",l,g.l2.Form,!1),s=this.addToHttpParams(s,"$expand",e,g.l2.Form,!1);let h=this.defaultHeaders;h=this.configuration.addCredentialToHeaders("Application","Authorization",h,"Bearer ");const x=this.configuration.selectHeaderAccept(["application/json"]);void 0!==x&&(h=h.set("Accept",x));let E="json";x&&(E=x.startsWith("text")?"text":this.configuration.isJsonMime(x)?"json":"blob");let B=`/ReportBreachesSla/Pbx.DownloadBreachesSla(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:j,withCredentials:v}=this.configuration;return this.httpClient.request("get",`${j}${B}`,{params:s.toHttpParams(),responseType:E,...v?{withCredentials:v}:{},headers:h,observe:u})}downloadBreachesSlaQuery(n,u="body",_=!1,d){const $=n.queueDnStr;if(null==$)throw new Error("Required parameter queueDnStr was null or undefined when calling downloadBreachesSla.");const w=n.startDt;if(null==w)throw new Error("Required parameter startDt was null or undefined when calling downloadBreachesSla.");const R=n.endDt;if(null==R)throw new Error("Required parameter endDt was null or undefined when calling downloadBreachesSla.");const f=n.waitInterval;if(null==f)throw new Error("Required parameter waitInterval was null or undefined when calling downloadBreachesSla.");const O=n.clientTimeZone;if(null==O)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadBreachesSla.");
1const M=n.$top,m=n.$skip,P=n.$search,a=n.$filter,l=n.$count,e=n.$select,s=n.$orderby,h=n.$expand;let x=new g.rx(this.encoder);return x=this.addToHttpParams(x,"$top",M,g.l2.Form,!1),x=this.addToHttpParams(x,"$skip",m,g.l2.Form,!1),x=this.addToHttpParams(x,"$search",P,g.l2.Form,!1),x=this.addToHttpParams(x,"$filter",a,g.l2.Form,!1),x=this.addToHttpParams(x,"$count",l,g.l2.Form,!1),x=this.addToHttpParams(x,"$select",e,g.l2.Form,!1),x=this.addToHttpParams(x,"$orderby",s,g.l2.Form,!1),x=this.addToHttpParams(x,"$expand",h,g.l2.Form,!1),`/ReportBreachesSla/Pbx.DownloadBreachesSla(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:O,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+x.toString()}getBreachesSlaData(n,u="body"){const _=n?.queueDnStr;if(null==_)throw new Error("Required parameter queueDnStr was null or undefined when calling getBreachesSlaData.");const d=n?.startDt;if(null==d)throw new Error("Required parameter startDt was null or undefined when calling getBreachesSlaData.");const $=n?.endDt;if(null==$)throw new Error("Required parameter endDt was null or undefined when calling getBreachesSlaData.");const w=n?.waitInterval;if(null==w)throw new Error("Required parameter waitInterval was null or undefined when calling getBreachesSlaData.");const R=n?.$top,f=n?.$skip,O=n?.$search,M=n?.$filter,m=n?.$count,P=n?.$select,a=n?.$orderby,l=n?.$expand;let e=new g.rx(this.encoder);e=this.addToHttpParams(e,"$top",R,g.l2.Form,!1),e=this.addToHttpParams(e,"$skip",f,g.l2.Form,!1),e=this.addToHttpParams(e,"$search",O,g.l2.Form,!1),e=this.addToHttpParams(e,"$filter",M,g.l2.Form,!1),e=this.addToHttpParams(e,"$count",m,g.l2.Form,!1),e=this.addToHttpParams(e,"$select",P,g.l2.Form,!1),e=this.addToHttpParams(e,"$orderby",a,g.l2.Form,!1),e=this.addToHttpParams(e,"$expand",l,g.l2.Form,!1);let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(s=s.set("Accept",h));let x="json";h&&(x=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");let E=`/ReportBreachesSla/Pbx.GetBreachesSlaData(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:B,withCredentials:j}=this.configuration;return this.httpClient.request("get",`${B}${E}`,{params:e.toHttpParams(),responseType:x,...j?{withCredentials:j}:{},headers:s,observe:u})}getBreachesSlaDataQuery(n,u="body",_=!1,d){const $=n.queueDnStr;if(null==$)throw new Error("Required parameter queueDnStr was null or undefined when calling getBreachesSlaData.");const w=n.startDt;if(null==w)throw new Error("Required parameter startDt was null or undefined when calling getBreachesSlaData.");const R=n.endDt;if(null==R)throw new Error("Required parameter endDt was null or undefined when calling getBreachesSlaData.");const f=n.waitInterval;if(null==f)throw new Error("Required parameter waitInterval was null or undefined when calling getBreachesSlaData.");const O=n.$top,M=n.$skip,m=n.$search,P=n.$filter,a=n.$count,l=n.$select,e=n.$orderby,s=n.$expand;let h=new g.rx(this.encoder);return h=this.addToHttpParams(h,"$top",O,g.l2.Form,!1),h=this.addToHttpParams(h,"$skip",M,g.l2.Form,!1),h=this.addToHttpParams(h,"$search",m,g.l2.Form,!1),h=this.addToHttpParams(h,"$filter",P,g.l2.Form,!1),h=this.addToHttpParams(h,"$count",a,g.l2.Form,!1),h=this.addToHttpParams(h,"$select",l,g.l2.Form,!1),h=this.addToHttpParams(h,"$orderby",e,g.l2.Form,!1),h=this.addToHttpParams(h,"$expand",s,g.l2.Form,!1),`/ReportBreachesSla/Pbx.GetBreachesSlaData(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+h.toString()}static \u0275fac=(()=>{let n;return function(_){return(n||(n=p.xGo(r)))(_||r)}})();static \u0275prov=b.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var H=t(67374),S=t.n(H),I=t(96794);let i=(()=>{class r{queuesApiService=(0,b.WQX)(o.S);reportBreachesSlaApiService=(0,b.WQX)(L);dataFetcher=(n,u)=>n.canViewReport?_=>_.pipe((0,C.n)(d=>this.requestQueuesStatistics(n,d,u)),(0,A.T)(d=>d.value)):_=>_.pipe((0,C.n)(()=>(0,y.of)([])));requestQueuesStatistics(n,u=1,_=50){return this.reportBreachesSlaApiService.getBreachesSlaData({$skip:u*_,$top:_,...(0,I.lr)(n),queueDnStr:n.pbxPeers?.map(d=>
1d.Number).filter(Boolean).join(" ")??"",waitInterval:S().duration(n.interval??0,"seconds").format("H:mm:s")})}requestQueues(n,u,_){return this.queuesApiService.listQueue({$skip:u*_,$top:_,$select:["Id","Number","Name"],$orderby:["Name"]})}generateCSVDownloadLink(n){return this.reportBreachesSlaApiService.downloadBreachesSlaQuery({...(0,I.lr)(n),queueDnStr:n.pbxPeers?.map(u=>u.Number).filter(Boolean).join(" ")??"",waitInterval:S().duration(n.interval??0,"seconds").format("H:mm:s"),clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})}generateReportParams(n){return JSON.stringify({StartDt:n.periodFromTo[0],EndDt:n.periodFromTo[1],DateRangeType:n.periodType,FirstDayOfWeek:n.firstWeekDay,QueueDnStr:n.pbxPeers?.map(u=>u.Number).filter(Boolean).join(" ")??"",WaitInterval:S().duration(n.interval??0,"seconds").format("H:mm:s"),ClientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})}static \u0275fac=function(u){return new(u||r)};static \u0275prov=b.jDH({token:r,factory:r.\u0275fac})}return r})()},99100(te,k,t){t.d(k,{W9:()=>h,bQ:()=>s,lE:()=>e});var C=t(85802),y=t(84412),A=t(89417),o=t(59882),g=t(69705),c=t(62329),p=t(79997),b=t(96354),L=t(38601),H=t(54327),S=t(48643),I=t(71747),i=t(74651),r=t(83188),T=t(59625),n=t(74005),u=t(76415),_=t(22429),d=t(68018),$=t(49769),w=t(78713),R=t(91382),f=t(62653),O=t(89755),M=t(35547);function m(x,E){if(1&x&&(M.j41(0,"tr",8)(1,"td"),M.EFF(2),M.nI1(3,"emptyValue"),M.k0s(),M.j41(4,"td"),M.EFF(5),M.nI1(6,"emptyValue"),M.k0s(),M.j41(7,"td"),M.EFF(8),M.nI1(9,"emptyValue"),M.k0s(),M.j41(10,"td"),M.EFF(11),M.nI1(12,"emptyValue"),M.k0s()()),2&x){const B=E.$implicit;M.R7$(2),M.JRh(M.bMT(3,4,B.Dn)),M.R7$(3),M.JRh(M.bMT(6,6,B.ReceivedCount)),M.R7$(3),M.JRh(M.bMT(9,8,B.CallbacksCount)),M.R7$(3),M.JRh(M.bMT(12,10,B.FailCallbacksCount))}}function P(x,E){1&x&&(M.j41(0,"tr")(1,"td",9),M.nrm(2,"div",10),M.k0s()())}function a(x,E){if(1&x&&(M.j41(0,"tr")(1,"td",11),M.EFF(2),M.nI1(3,"translate"),M.k0s()()),2&x){const B=M.XpG(2);M.R7$(2),M.SpI(" ",M.bMT(3,1,B.noDataMessage(!B.isReportAvailable))," ")}}function l(x,E){if(1&x&&(M.j41(0,"table")(1,"thead")(2,"tr",7)(3,"th"),M.EFF(4),M.nI1(5,"translate"),M.k0s(),M.j41(6,"th"),M.EFF(7),M.nI1(8,"translate"),M.k0s(),M.j41(9,"th"),M.EFF(10),M.nI1(11,"translate"),M.k0s(),M.j41(12,"th"),M.EFF(13),M.nI1(14,"translate"),M.k0s()()(),M.j41(15,"tbody"),M.Z7z(16,m,13,12,"tr",8,M.fX1),M.nVh(18,P,3,0,"tr")(19,a,4,3,"tr"),M.k0s()()),2&x){const B=E;M.R7$(4),M.JRh(M.bMT(5,5,"_i18n.ReportsQueue")),M.R7$(3),M.JRh(M.bMT(8,7,"_i18n.ReportsCallsReceived")),M.R7$(3),M.JRh(M.bMT(11,9,"_i18n.ReportsCallBacks")),M.R7$(3),M.JRh(M.bMT(14,11,"_i18n.ReportsFailedCallBacks")),M.R7$(3),M.Dyx(B.data),M.R7$(2),M.vxM(B.hasMore?18:B.isLoading||B.data.length?-1:19)}}function e(){return new A.gE({dateRange:new A.MJ(new c.J,{nonNullable:!0}),pbxPeers:new A.MJ(new f.X("_i18n.ReportsQueues","queue","pbxPeers",[I.J.Queue],{pbxPeers:null},"_i18n.Any",!0),{nonNullable:!0})})}function s(x,E=!0){const{dateRange:B,pbxPeers:j}=x;return{...B.value,...j.value,canViewReport:E}}let h=(()=>{class x{dataSource=(0,C.WQX)(g.Q);route=(0,C.WQX)(o.nX);router=(0,C.WQX)(o.Ix);destroy$=(0,C.WQX)(C.abz);modalService=(0,C.WQX)(L.B);fileDownloadService=(0,C.WQX)(S.y);paginator$;hasMoreOrLoading$;parameters$=new y.t(null);nextPage$=new y.t(void 0);reset$=new y.t(void 0);filter=e();scheduledReportType=i.G.QueueCallbacks;get isReportAvailable(){return this.route.snapshot.data.reportsAvailable}get parameters(){return s(this.filter.value,this.isReportAvailable)}constructor(){this.paginator$=(0,p.K)(this.modalService,this.destroy$,this.parameters$,this.nextPage$,this.reset$,this.dataSource.dataFetcher,100),this.hasMoreOrLoading$=this.paginator$.pipe((0,b.T)(B=>!B.hasMore||B.isLoading))}submitFilter(){this.parameters$.next(this.parameters)}downloadCsv(){this.fileDownloadService.download(this.dataSource.generateCSVDownloadLink(this.parameters))}onSaveReport(B){(0,R.J)(this.modalService,this.scheduledReportType,B,this.dataSource.generateReportParams(this.parameters))}back(){this.router.navigate([".."],{relativeTo:this.route})}noDataMessage=H.Ns;formatAndJoinValues=H.pk;static \u0275fac=function(j){return new(j||x)};static \u0275cmp=M.VBU({type:x,selectors:[["app-call-backs"]],features:[M.Jv_([g.Q])],decls:10,vars:16,consts:[["header","_i18n.QueueCallbacks",3,"back","helpUrl"],["header","",3,"exportClicked","disabled","showReportPrint"],["top-bar","",3,"filterChanged","saveReport","filterForm","formGroup","reportType","disabled"],["formControlName","dateRange"],["formControlName","pbxPeers","placeholder","_i18n.Any",3,"allowEmpty"],["id","scrollableList",1,"h-100","scrollable-table"],["infiniteScroll","",3,"infiniteScrollCallback","infiniteScrollContainer","infiniteScrollDistance","infiniteScrollDisabled"],[1,"table-header"],[1,"text-md-nowrap"],["colspan","5"],[1,"loader"],["colspan","5",1,"text-center"]],template:function(j,v){if(1&j&&(M.j41(0,"app-page",0),M.bIt("back",function(){return v.back()}),M.j41(1,"app-report-action-buttons",1),M.bIt("exportClicked",function(){return v.downloadCsv()}),M.k0s(),M.j41(2,"app-complex-filter",2),M.bIt("filterChanged",function(){return v.submitFilter()})("saveReport",function(V){return v.onSaveReport(V)}),M.nrm(3,"app-date-range-filter",3)(4,"app-multi-peer-filter",4),M.k0s(),M.j41(5,"div",5)(6,"div",6),M.nI1(7,"async"),M.bIt("infiniteScrollCallback",function(){return v.nextPage$.next()}),M.nVh(8,l,20,13,"table"),M.nI1(9,"async"),M.k0s()()()),2&j){let Q;M.Y8G("helpUrl","_i18n.ReportsUri"),M.R7$(),M.Y8G("disabled",!v.isReportAvailable)("showReportPrint",!0),M.R7$(),M.Y8G("filterForm",v.filter)("formGroup",v.filter)("reportType",v.scheduledReportType)("disabled",!v.isReportAvailable),M.R7$(2),M.Y8G("allowEmpty",!0),M.R7$(2),M.Y8G("infiniteScrollContainer","#scrollableList")("infiniteScrollDistance",1)("infiniteScrollDisabled",M.bMT(7,12,v.hasMoreOrLoading$)),M.R7$(2),M.vxM((Q=M.bMT(9,14,v.paginator$))?8:-1,Q)}},dependencies:[r.H,T.n,n.M,A.X1,A.BC,A.cb,A.j4,A.JD,u.B,_.D,O.b,d.D9,$.Jj,w.vE],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}']})}return x})()},69705(te,k,t){t.d(k,{Q:()=>H});var C=t(25558),y=t(7673),A=t(96354),o=t(97201),g=t(4499),c=t(35547),p=t(85802);let b=(()=>{class S extends g.d{downloadQueueCallbacks(i,r="body"){const T=i?.queueDnStr;if(null==T)throw new Error("Required parameter queueDnStr was null or undefined when calling downloadQueueCallbacks.");const n=i?.startDt;if(null==n)throw new Error("Required parameter startDt was null or undefined when calling downloadQueueCallbacks.");const u=i?.endDt;if(null==u)throw new Error("Required parameter endDt was null or undefined when calling downloadQueueCallbacks.");const _=i?.$top,d=i?.$skip,$=i?.$search,w=i?.$filter,R=i?.$count,f=i?.$select,O=i?.$orderby,M=i?.$expand;let m=new o.rx(this.encoder);m=this.addToHttpParams(m,"$top",_,o.l2.Form,!1),m=this.addToHttpParams(m,"$skip",d,o.l2.Form,!1),m=this.addToHttpParams(m,"$search",$,o.l2.Form,!1),m=this.addToHttpParams(m,"$filter",w,o.l2.Form,!1),m=this.addToHttpParams(m,"$count",R,o.l2.Form,!1),m=this.addToHttpParams(m,"$select",f,o.l2.Form,!1),m=this.addToHttpParams(m,"$orderby",O,o.l2.Form,!1),m=this.addToHttpParams(m,"$expand",M,o.l2.Form,!1);let P=this.defaultHeaders;P=this.configuration.addCredentialToHeaders("Application","Authorization",P,"Bearer ");const a=this.configuration.selectHeaderAccept(["application/json"]);void 0!==a&&(P=P.set("Accept",a));let l="json";a&&(l=a.startsWith("text")?"text":this.configuration.isJsonMime(a)?"json":"blob");let e=`/ReportQueueCallbacks/Pbx.DownloadQueueCallbacks(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:T,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})})`;const{basePath:s,withCredentials:h}=this.configuration;return this.httpClient.request("get",`${s}${e}`,{params:m.toHttpParams(),responseType:l,...h?{withCredentials:h}:{},headers:P,observe:r})}downloadQueueCallbacksQuery(i,r="body",T=!1,n){const u=i.queueDnStr;if(null==u)throw new Error("Required parameter queueDnStr was null or undefined when calling downloadQueueCallbacks.");const _=i.startDt;if(null==_)throw new Error("Required parameter startDt was null or undefined when calling downloadQueueCallbacks.");const d=i.endDt;if(null==d)throw new Error("Required parameter endDt was null or undefined when calling downloadQueueCallbacks.");const $=i.$top,w=i.$skip,R=i.$search,f=i.$filter,O=i.$count,M=i.$select,m=i.$orderby,P=i.$expand;let a=new o.rx(this.encoder);return a=this.addToHttpParams(a,"$top",$,o.l2.Form,!1),a=this.addToHttpParams(a,"$skip",w,o.l2.Form,!1),a=this.addToHttpParams(a,"$search",R,o.l2.Form,!1),a=this.addToHttpParams(a,"$filter",f,o.l2.Form,!1),a=this.addToHttpParams(a,"$count",O,o.l2.Form,!1),a=this.addToHttpParams(a,"$select",M,o.l2.Form,!1),a=this.addToHttpParams(a,"$orderby",m,o.l2.Form,!1),a=this.addToHttpParams(a,"$expand",P,o.l2.Form,!1),`/ReportQueueCallbacks/Pbx.DownloadQueueCallbacks(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})})?`+a.toString()}getQueueCallbacksData(i,r="body"){const T=i?.queueDnStr;if(null==T)throw new Error("Required parameter queueDnStr was null or undefined when calling getQueueCallbacksData.");const n=i?.startDt;if(null==n)throw new Error("Required parameter startDt was null or undefined when calling getQueueCallbacksData.");const u=i?.endDt;if(null==u)throw new Error("Required parameter endDt was null or undefined when calling getQueueCallbacksData.");const _=i?.$top,d=i?.$skip,$=i?.$search,w=i?.$filter,R=i?.$count,f=i?.$select,O=i?.$orderby,M=i?.$expand;let m=new o.rx(this.encoder);m=this.addToHttpParams(m,"$top",_,o.l2.Form,!1),m=this.addToHttpParams(m,"$skip",d,o.l2.Form,!1),m=this.addToHttpParams(m,"$search",$,o.l2.Form,!1),m=this.addToHttpParams(m,"$filter",w,o.l2.Form,!1),m=this.addToHttpParams(m,"$count",R,o.l2.Form,!1),m=this.addToHttpParams(m,"$select",f,o.l2.Form,!1),m=this.addToHttpParams(m,"$orderby",O,o.l2.Form,!1),m=this.addToHttpParams(m,"$expand",M,o.l2.Form,!1);let P=this.defaultHeaders;P=this.configuration.addCredentialToHeaders("Application","Authorization",P,"Bearer ");const a=this.configuration.selectHeaderAccept(["application/json"]);void 0!==a&&(P=P.set("Accept",a));let l="json";a&&(l=a.startsWith("text")?"text":this.configuration.isJsonMime(a)?"json":"blob");let e=`/ReportQueueCallbacks/Pbx.GetQueueCallbacksData(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:T,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})})`;const{basePath:s,withCredentials:h}=this.configuration;return this.httpClient.request("get",`${s}${e}`,{params:m.toHttpParams(),responseType:l,...h?{withCredentials:h}:{},headers:P,observe:r})}getQueueCallbacksDataQuery(i,r="body",T=!1,n){const u=i.queueDnStr;if(null==u)throw new Error("Required parameter queueDnStr was null or undefined when calling getQueueCallbacksData.");const _=i.startDt;if(null==_)throw new Error("Required parameter startDt was null or undefined when calling getQueueCallbacksData.");const d=i.endDt;if(null==d)throw new Error("Required parameter endDt was null or undefined when calling getQueueCallbacksData.");const $=i.$top,w=i.$skip,R=i.$search,f=i.$filter,O=i.$count,M=i.$select,m=i.$orderby,P=i.$expand;let a=new o.rx(this.encoder);return a=this.addToHttpParams(a,"$top",$,o.l2.Form,!1),a=this.addToHttpParams(a,"$skip",w,o.l2.Form,!1),a=this.addToHttpParams(a,"$search",R,o.l2.Form,!1),a=this.addToHttpParams(a,"$filter",f,o.l2.Form,!1),a=this.addToHttpParams(a,"$count",O,o.l2.Form,!1),a=this.addToHttpParams(a,"$select",M,o.l2.Form,!1),a=this.addToHttpParams(a,"$orderby",m,o.l2.Form,!1),a=this.addToHttpParams(a,"$expand",P,o.l2.Form,!1),`/ReportQueueCallbacks/Pbx.GetQueueCallbacksData(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})})?`+a.toString()}static \u0275fac=(()=>{let i;return function(T){return(i||(i=c.xGo(S)))(T||S)}})();static \u0275prov=p.jDH({token:S,factory:S.\u0275fac,providedIn:"root"})}return S})();var L=t(96794);let H=(()=>{class S{reportQueueCallbacksApiService=(0,p.WQX)(b);dataFetcher=(i,r)=>i.canViewReport?T=>T.pipe((0,C.n)(n=>this.requestQueuesStatistics(i,n,r)),(0,A.T)(n=>n.value)):T=>T.pipe((0,C.n)(()=>(0,y.of)([])));requestQueuesStatistics(i,r,T){return this.reportQueueCallbacksApiService.getQueueCallbacksData({$skip:r*T,$top:T,...(0,L.lr)(i),queueDnStr:i.pbxPeers?.map(n=>
1n.Number).filter(Boolean).join(" ")??""})}generateCSVDownloadLink(i){return this.reportQueueCallbacksApiService.downloadQueueCallbacksQuery({...(0,L.lr)(i),queueDnStr:i.pbxPeers?.map(r=>r.Number).filter(Boolean).join(" ")??""})}generateReportParams(i){return JSON.stringify({StartDt:i.periodFromTo[0],EndDt:i.periodFromTo[1],DateRangeType:i.periodType,FirstDayOfWeek:i.firstWeekDay,QueueDnStr:i.pbxPeers?.map(r=>r.Number).filter(Boolean).join(" ")??""})}static \u0275fac=function(r){return new(r||S)};static \u0275prov=p.jDH({token:S,factory:S.\u0275fac})}return S})()},1088(te,k,t){t.d(k,{_m:()=>K,lE:()=>W,bQ:()=>U});var C=t(85802),y=t(84412),A=t(85343),o=t(89417),g=t(59882),c=t(76778),p=t(75215),b=function(D){return D[D.All=0]="All",D[D.Local=1]="Local",D[D.National=2]="National",D[D.Mobile=3]="Mobile",D[D.International=4]="International",D}(b||{});const L=[{value:b.All,label:"_i18n.ReportsCallClassTypeAll"},{value:b.Local,label:"_i18n.ReportsCallClassTypeLocal"},{value:b.National,label:"_i18n.ReportsCallClassTypeNational"},{value:b.Mobile,label:"_i18n.ReportsCallClassTypeMobile"},{value:b.International,label:"_i18n.ReportsCallClassTypeInternational"}];var S=t(71747),I=t(74651),i=t(79997),r=t(96354),T=t(38601),n=t(54327),u=t(48643),_=t(62329),d=t(74005),$=t(76415),w=t(47429),R=t(83188),f=t(59625),O=t(22429),M=t(68018),m=t(49769),P=t(96704),a=t(60175),l=t(78713),e=t(91382),s=t(45764),h=t(62653),x=t(89755),E=t(35547);const B=(D,q)=>[D,q];function j(D,q){if(1&D&&(E.j41(0,"tr",9)(1,"td"),E.EFF(2),E.k0s(),E.j41(3,"td",10),E.EFF(4),E.nI1(5,"emptyValue"),E.k0s(),E.j41(6,"td",10),E.EFF(7),E.nI1(8,"appJsDateFormat"),E.nI1(9,"emptyValue"),E.k0s(),E.j41(10,"td"),E.EFF(11),E.k0s(),E.j41(12,"td"),E.EFF(13),E.nI1(14,"duration"),E.nI1(15,"emptyValue"),E.k0s(),E.j41(16,"td"),E.EFF(17),E.nI1(18,"duration"),E.nI1(19,"emptyValue"),E.k0s(),E.j41(20,"td"),E.EFF(21),E.nI1(22,"decimal"),E.k0s()()),2&D){const G=q.$implicit,F=E.XpG(2);E.R7$(2),E.JRh(F.formatAndJoinValues(E.l_i(25,B,G.SrcDn,G.SrcDisplayName))),E.R7$(2),E.JRh(E.bMT(5,7,G.DstDn)),E.R7$(3),E.JRh(E.bMT(9,11,E.bMT(8,9,G.StartTime))),E.R7$(4),E.JRh(G.IsAnswered?"Answered":"Unanswered"),E.R7$(2),E.JRh(E.i5U(15,15,E.bMT(14,13,G.RingingDur),"00:00:00")),E.R7$(4),E.JRh(E.i5U(19,20,E.bMT(18,18,G.TalkingDur),"00:00:00")),E.R7$(4),E.JRh(E.bMT(22,23,G.BillingCost??0))}}function v(D,q){1&D&&(E.j41(0,"tr")(1,"td",11),E.nrm(2,"div",12),E.k0s()())}function Q(D,q){if(1&D&&(E.j41(0,"tr")(1,"td",13),E.EFF(2),E.nI1(3,"translate"),E.k0s()()),2&D){const G=E.XpG(2);E.R7$(2),E.SpI(" ",E.bMT(3,1,G.noDataMessage(!G.isReportAvailable))," ")}}function V(D,q){if(1&D&&(E.j41(0,"table")(1,"thead")(2,"tr",8)(3,"th"),E.EFF(4),E.nI1(5,"translate"),E.k0s(),E.j41(6,"th"),E.EFF(7),E.nI1(8,"translate"),E.k0s(),E.j41(9,"th"),E.EFF(10),E.nI1(11,"translate"),E.k0s(),E.j41(12,"th"),E.EFF(13),E.nI1(14,"translate"),E.k0s(),E.j41(15,"th"),E.EFF(16),E.nI1(17,"translate"),E.k0s(),E.j41(18,"th"),E.EFF(19),E.nI1(20,"translate"),E.k0s(),E.j41(21,"th"),E.EFF(22),E.nI1(23,"translate"),E.k0s()()(),E.j41(24,"tbody"),E.Z7z(25,j,23,28,"tr",9,E.fX1),E.nVh(27,v,3,0,"tr")(28,Q,4,3,"tr"),E.k0s()()),2&D){const G=q;E.R7$(4),E.JRh(E.bMT(5,8,"_i18n.Caller")),E.R7$(3),E.JRh(E.bMT(8,10,"_i18n.Callee")),E.R7$(3),E.JRh(E.bMT(11,12,"_i18n.ReportsCallTime")),E.R7$(3),E.JRh(E.bMT(14,14,"_i18n.ReportsStatus")),E.R7$(3),E.JRh(E.bMT(17,16,"_i18n.ReportsRinging")),E.R7$(3),E.JRh(E.bMT(20,18,"_i18n.ReportsTalking")),E.R7$(3),E.JRh(E.bMT(23,20,"_i18n.ReportsCost")),E.R7$(3),E.Dyx(G.data),E.R7$(2),E.vxM(G.hasMore?27:G.isLoading||G.data.length?-1:28)}}function W(D=null,q=!1){const G=D?[D]:null;return new o.gE({dateRange:new o.MJ(new _.J,{nonNullable:!0}),callClass:new o.MJ(new p.L("_i18n.ReportsCallType","callClass",L),{nonNullable:!0}),pbxPeers:new o.MJ({value:new h.X("_i18n.Groups","pbxGroup","pbxPeers",[S.J.Group],{pbxPeers:G},"none"),disabled:q},{nonNullable:!0})})}function U(D,q=null,G=!0){const{dateRange:F,pbxPeers:N,callClass:Z}=D;return{pbxPeers:N?.value?.pbxPeers??(q?[q]:null),...F.value,callClass:Z.value.selectedValue,canViewReport:G}}let K=(()=>{class D{dataSource=(0,C.WQX)(c.G);route=(0,C.WQX)(g.nX);router=(0,C.WQX)(g.Ix);destroy$=(0,C.WQX)(C.abz);fileDownloadService=(0,C.WQX)(u.y);modalService=(0,C.WQX)(T.B);paginator$;hasMoreOrLoading$;parameters$=new y.t(null);nextPage$=new y.t(void 0);reset$=new y.t(void 0);
1firstGroup=this.route.snapshot.data.firstGroup??null;isMcm=this.route.snapshot.data.mcm??!1;isSystemOwner=this.route.snapshot.data.isSystemOwner??!1;filter=W(this.firstGroup,this.isMcm&&!this.isSystemOwner);scheduledReportType=I.G.CallCostByExtensionDept;get isReportAvailable(){return this.route.snapshot.data.reportsAvailable}get parameters(){return U(this.filter.value,this.firstGroup,this.isReportAvailable)}constructor(){this.paginator$=(0,i.K)(this.modalService,this.destroy$,this.parameters$,this.nextPage$,this.reset$,this.dataSource.dataFetcher,100),this.hasMoreOrLoading$=this.paginator$.pipe((0,r.T)(G=>!G.hasMore||G.isLoading))}submitFilter(){this.parameters$.next(this.parameters)}downloadCsv(){const G=this.parameters;!G.pbxPeers||0===G.pbxPeers.length||this.fileDownloadService.download(this.dataSource.generateCSVDownloadLink(G))}onSaveReport(G){const F=this.parameters;!F.pbxPeers||0===F.pbxPeers.length||(0,e.J)(this.modalService,this.scheduledReportType,G,this.dataSource.generateReportParams(this.parameters))}back(){this.router.navigate([".."],{relativeTo:this.route}).catch(A.l)}noDataMessage=n.Ns;formatAndJoinValues=n.pk;static \u0275fac=function(F){return new(F||D)};static \u0275cmp=E.VBU({type:D,selectors:[["ng-component"]],features:[E.Jv_([c.G])],decls:11,vars:14,consts:[["header","_i18n.CallCostByExtGroup",3,"back","helpUrl"],["header","",3,"exportClicked","disabled","showReportPrint"],["top-bar","",3,"filterChanged","saveReport","filterForm","formGroup","reportType","disabled"],["formControlName","dateRange"],["formControlName","callClass"],["formControlName","pbxPeers"],["id","scrollableList",1,"h-100","scrollable-table"],["infiniteScroll","",3,"infiniteScrollCallback","infiniteScrollContainer","infiniteScrollDisabled"],[1,"table-header"],[1,"text-md-nowrap"],["nowrap",""],["colspan","8"],[1,"loader"],["colspan","8",1,"text-center"]],template:function(F,N){if(1&F&&(E.j41(0,"app-page",0),E.bIt("back",function(){return N.back()}),E.j41(1,"app-report-action-buttons",1),E.bIt("exportClicked",function(){return N.downloadCsv()}),E.k0s(),E.j41(2,"app-complex-filter",2),E.bIt("filterChanged",function(){return N.submitFilter()})("saveReport",function(Y){return N.onSaveReport(Y)}),E.nrm(3,"app-date-range-filter",3)(4,"app-enum-filter",4)(5,"app-multi-peer-filter",5),E.k0s(),E.j41(6,"div",6)(7,"div",7),E.nI1(8,"async"),E.bIt("infiniteScrollCallback",function(){return N.nextPage$.next()}),E.nVh(9,V,29,22,"table"),E.nI1(10,"async"),E.k0s()()()),2&F){let Z;E.Y8G("helpUrl","_i18n.ReportsUri"),E.R7$(),E.Y8G("disabled",!N.isReportAvailable)("showReportPrint",!0),E.R7$(),E.Y8G("filterForm",N.filter)("formGroup",N.filter)("reportType",N.scheduledReportType)("disabled",!N.isReportAvailable),E.R7$(5),E.Y8G("infiniteScrollContainer","#scrollableList")("infiniteScrollDisabled",E.bMT(8,10,N.hasMoreOrLoading$)),E.R7$(2),E.vxM((Z=E.bMT(10,12,N.paginator$))?9:-1,Z)}},dependencies:[R.H,f.n,d.M,o.X1,o.BC,o.cb,o.j4,o.JD,$.B,w.j,O.D,x.b,M.D9,m.Jj,s.N,P.bB,a.Q,l.vE],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}']})}return D})()},76778(te,k,t){t.d(k,{G:()=>H});var C=t(25558),y=t(7673),A=t(96354),o=t(97201),g=t(4499),c=t(35547),p=t(85802);let b=(()=>{class S extends g.d{downloadCallCostByExtensionGroup(i,r="body"){const T=i?.periodFrom;
1if(null==T)throw new Error("Required parameter periodFrom was null or undefined when calling downloadCallCostByExtensionGroup.");const n=i?.periodTo;if(null==n)throw new Error("Required parameter periodTo was null or undefined when calling downloadCallCostByExtensionGroup.");const u=i?.groupFilter;if(null==u)throw new Error("Required parameter groupFilter was null or undefined when calling downloadCallCostByExtensionGroup.");const _=i?.callClass;if(null==_)throw new Error("Required parameter callClass was null or undefined when calling downloadCallCostByExtensionGroup.");const d=i?.clientTimeZone;if(null==d)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadCallCostByExtensionGroup.");const $=i?.$top,w=i?.$skip,R=i?.$search,f=i?.$filter,O=i?.$count,M=i?.$select,m=i?.$orderby,P=i?.$expand;let a=new o.rx(this.encoder);a=this.addToHttpParams(a,"$top",$,o.l2.Form,!1),a=this.addToHttpParams(a,"$skip",w,o.l2.Form,!1),a=this.addToHttpParams(a,"$search",R,o.l2.Form,!1),a=this.addToHttpParams(a,"$filter",f,o.l2.Form,!1),a=this.addToHttpParams(a,"$count",O,o.l2.Form,!1),a=this.addToHttpParams(a,"$select",M,o.l2.Form,!1),a=this.addToHttpParams(a,"$orderby",m,o.l2.Form,!1),a=this.addToHttpParams(a,"$expand",P,o.l2.Form,!1);let l=this.defaultHeaders;l=this.configuration.addCredentialToHeaders("Application","Authorization",l,"Bearer ");const e=this.configuration.selectHeaderAccept(["application/json"]);void 0!==e&&(l=l.set("Accept",e));let s="json";e&&(s=e.startsWith("text")?"text":this.configuration.isJsonMime(e)?"json":"blob");let h=`/ReportCallCostByExtensionGroup/Pbx.DownloadCallCostByExtensionGroup(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:T,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},groupFilter=${this.configuration.encodeParam({name:"groupFilter",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},callClass=${this.configuration.encodeParam({name:"callClass",value:_,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:x,withCredentials:E}=this.configuration;return this.httpClient.request("get",`${x}${h}`,{params:a.toHttpParams(),responseType:s,...E?{withCredentials:E}:{},headers:l,observe:r})}downloadCallCostByExtensionGroupQuery(i,r="body",T=!1,n){const u=i.periodFrom;if(null==u)throw new Error("Required parameter periodFrom was null or undefined when calling downloadCallCostByExtensionGroup.");const _=i.periodTo;if(null==_)throw new Error("Required parameter periodTo was null or undefined when calling downloadCallCostByExtensionGroup.");const d=i.groupFilter;if(null==d)throw new Error("Required parameter groupFilter was null or undefined when calling downloadCallCostByExtensionGroup.");const $=i.callClass;if(null==$)throw new Error("Required parameter callClass was null or undefined when calling downloadCallCostByExtensionGroup.");const w=i.clientTimeZone;if(null==w)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadCallCostByExtensionGroup.");const R=i.$top,f=i.$skip,O=i.$search,M=i.$filter,m=i.$count,P=i.$select,a=i.$orderby,l=i.$expand;let e=new o.rx(this.encoder);return e=this.addToHttpParams(e,"$top",R,o.l2.Form,!1),e=this.addToHttpParams(e,"$skip",f,o.l2.Form,!1),e=this.addToHttpParams(e,"$search",O,o.l2.Form,!1),e=this.addToHttpParams(e,"$filter",M,o.l2.Form,!1),e=this.addToHttpParams(e,"$count",m,o.l2.Form,!1),e=this.addToHttpParams(e,"$select",P,o.l2.Form,!1),e=this.addToHttpParams(e,"$orderby",a,o.l2.Form,!1),e=this.addToHttpParams(e,"$expand",l,o.l2.Form,!1),`/ReportCallCostByExtensionGroup/Pbx.DownloadCallCostByExtensionGroup(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},groupFilter=${this.configuration.encodeParam({name:"groupFilter",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},callClass=${this.configuration.encodeParam({name:"callClass",value:$,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+e.toString()}getCallCostByExtensionGroupData(i,r="body"){const T=i?.periodFrom;
1if(null==T)throw new Error("Required parameter periodFrom was null or undefined when calling getCallCostByExtensionGroupData.");const n=i?.periodTo;if(null==n)throw new Error("Required parameter periodTo was null or undefined when calling getCallCostByExtensionGroupData.");const u=i?.groupFilter;if(null==u)throw new Error("Required parameter groupFilter was null or undefined when calling getCallCostByExtensionGroupData.");const _=i?.callClass;if(null==_)throw new Error("Required parameter callClass was null or undefined when calling getCallCostByExtensionGroupData.");const d=i?.$top,$=i?.$skip,w=i?.$search,R=i?.$filter,f=i?.$count,O=i?.$select,M=i?.$orderby,m=i?.$expand;let P=new o.rx(this.encoder);P=this.addToHttpParams(P,"$top",d,o.l2.Form,!1),P=this.addToHttpParams(P,"$skip",$,o.l2.Form,!1),P=this.addToHttpParams(P,"$search",w,o.l2.Form,!1),P=this.addToHttpParams(P,"$filter",R,o.l2.Form,!1),P=this.addToHttpParams(P,"$count",f,o.l2.Form,!1),P=this.addToHttpParams(P,"$select",O,o.l2.Form,!1),P=this.addToHttpParams(P,"$orderby",M,o.l2.Form,!1),P=this.addToHttpParams(P,"$expand",m,o.l2.Form,!1);let a=this.defaultHeaders;a=this.configuration.addCredentialToHeaders("Application","Authorization",a,"Bearer ");const l=this.configuration.selectHeaderAccept(["application/json"]);void 0!==l&&(a=a.set("Accept",l));let e="json";l&&(e=l.startsWith("text")?"text":this.configuration.isJsonMime(l)?"json":"blob");let s=`/ReportCallCostByExtensionGroup/Pbx.GetCallCostByExtensionGroupData(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:T,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},groupFilter=${this.configuration.encodeParam({name:"groupFilter",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},callClass=${this.configuration.encodeParam({name:"callClass",value:_,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:h,withCredentials:x}=this.configuration;return this.httpClient.request("get",`${h}${s}`,{params:P.toHttpParams(),responseType:e,...x?{withCredentials:x}:{},headers:a,observe:r})}getCallCostByExtensionGroupDataQuery(i,r="body",T=!1,n){const u=i.periodFrom;if(null==u)throw new Error("Required parameter periodFrom was null or undefined when calling getCallCostByExtensionGroupData.");const _=i.periodTo;if(null==_)throw new Error("Required parameter periodTo was null or undefined when calling getCallCostByExtensionGroupData.");const d=i.groupFilter;if(null==d)throw new Error("Required parameter groupFilter was null or undefined when calling getCallCostByExtensionGroupData.");const $=i.callClass;if(null==$)throw new Error("Required parameter callClass was null or undefined when calling getCallCostByExtensionGroupData.");const w=i.$top,R=i.$skip,f=i.$search,O=i.$filter,M=i.$count,m=i.$select,P=i.$orderby,a=i.$expand;let l=new o.rx(this.encoder);return l=this.addToHttpParams(l,"$top",w,o.l2.Form,!1),l=this.addToHttpParams(l,"$skip",R,o.l2.Form,!1),l=this.addToHttpParams(l,"$search",f,o.l2.Form,!1),l=this.addToHttpParams(l,"$filter",O,o.l2.Form,!1),l=this.addToHttpParams(l,"$count",M,o.l2.Form,!1),l=this.addToHttpParams(l,"$select",m,o.l2.Form,!1),l=this.addToHttpParams(l,"$orderby",P,o.l2.Form,!1),l=this.addToHttpParams(l,"$expand",a,o.l2.Form,!1),`/ReportCallCostByExtensionGroup/Pbx.GetCallCostByExtensionGroupData(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},groupFilter=${this.configuration.encodeParam({name:"groupFilter",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},callClass=${this.configuration.encodeParam({name:"callClass",value:$,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})?`+l.toString()}static \u0275fac=(()=>{let i;return function(T){return(i||(i=c.xGo(S)))(T||S)}})();static \u0275prov=p.jDH({token:S,factory:S.\u0275fac,providedIn:"root"})}return S})();var L=t(96794);let H=(()=>{class S{reportCallCostByExtensionGroupApiService=(0,p.WQX)(b);dataFetcher=(i,r)=>i.canViewReport?T=>T.pipe((0,C.n)(n=>this.requestGroupCallCost(i,n,r)),(0,A.T)(n=>n.value)):T=>T.pipe((0,C.n)(()=>(0,y.of)([])));requestGroupCallCost(i,r,T){return this.reportCallCostByExtensionGroupApiService.getCallCostByExtensionGroupData({$skip:r*T,$top:T,...(0,L.Rx)(i),callClass:i.callClass,groupFilter:i.pbxPeers?.map(n=>
1n.Number).filter(Boolean).join(" ")??""})}generateCSVDownloadLink(i){return this.reportCallCostByExtensionGroupApiService.downloadCallCostByExtensionGroupQuery({...(0,L.Rx)(i),callClass:i.callClass,groupFilter:i.pbxPeers?.map(r=>r.Number).filter(Boolean).join(" ")??"",clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})}generateReportParams(i){return JSON.stringify({PeriodFrom:i.periodFromTo[0],PeriodTo:i.periodFromTo[1],DateRangeType:i.periodType,FirstDayOfWeek:i.firstWeekDay,CallClass:i.callClass,GroupFilter:i.pbxPeers?.map(r=>r.Number).filter(Boolean).join(" ")??"",ClientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})}static \u0275fac=function(r){return new(r||S)};static \u0275prov=p.jDH({token:S,factory:S.\u0275fac})}return S})()},1141(te,k,t){t.d(k,{A:()=>u});var C=t(49769),y=t(68018),A=t(54327),o=t(78713),g=t(31226),c=t(60724),p=t(35547);const b=[[["app-report-print-header"]]],L=["app-report-print-header"],H=_=>[_];function S(_,d){1&_&&(p.rj2(0,"tr")(1,"td",3),p.SdG(2),p.eux()())}function I(_,d){if(1&_&&(p.rj2(0,"tr",4)(1,"td"),p.EFF(2),p.nI1(3,"timeScaleRange"),p.nI1(4,"emptyValue"),p.eux(),p.rj2(5,"td"),p.EFF(6),p.nI1(7,"emptyValue"),p.eux(),p.rj2(8,"td"),p.EFF(9),p.nI1(10,"emptyValue"),p.eux()()),2&_){const $=d.$implicit,w=p.XpG(2);p.AVh("print",w.print),p.R7$(2),p.JRh(p.bMT(4,8,p.i5U(3,5,p.eq3(14,H,$.DateTimeInterval),w.timeScale))),p.R7$(4),p.JRh(p.bMT(7,10,$.IncomingCount)),p.R7$(3),p.JRh(p.bMT(10,12,$.OutgoingCount))}}function i(_,d){1&_&&(p.rj2(0,"tr")(1,"td",3),p.Hgh(2,"div",5),p.eux()())}function r(_,d){if(1&_&&(p.rj2(0,"tr")(1,"td",6),p.EFF(2),p.nI1(3,"translate"),p.eux()()),2&_){const $=p.XpG(2);p.AVh("print",$.print),p.R7$(2),p.SpI(" ",p.bMT(3,3,$.noDataMessage($.licenseRestrictions))," ")}}function T(_,d){1&_&&(p.rj2(0,"tfoot")(1,"tr")(2,"td",3),p.EFF(3,"3CX Ltd."),p.eux()()())}function n(_,d){if(1&_&&(p.rj2(0,"table")(1,"thead"),p.nVh(2,S,3,0,"tr"),p.rj2(3,"tr")(4,"th"),p.EFF(5),p.nI1(6,"translate"),p.eux(),p.rj2(7,"th"),p.EFF(8),p.nI1(9,"translate"),p.eux(),p.rj2(10,"th",1),p.EFF(11),p.nI1(12,"translate"),p.eux()()(),p.rj2(13,"tbody"),p.Z7z(14,I,11,16,"tr",2,p.fX1),p.nVh(16,i,3,0,"tr"),p.nVh(17,r,4,5,"tr",0),p.eux(),p.nVh(18,T,4,0,"tfoot"),p.eux()),2&_){const $=p.XpG();p.AVh("print",$.print),p.R7$(2),p.vxM($.print?2:-1),p.R7$(),p.HbH($.print?"print":"table-header"),p.R7$(2),p.JRh(p.bMT(6,11,"_i18n.TimeScale")),p.R7$(3),p.JRh(p.bMT(9,13,"_i18n.ReportsIncomingCalls")),p.R7$(3),p.JRh(p.bMT(12,15,"_i18n.ReportsOutgoingCalls")),p.R7$(3),p.Dyx($.paginator.data),p.R7$(2),p.vxM(!$.print&&$.paginator.hasMore?16:-1),p.R7$(),p.vxM($.paginator.isLoading||$.paginator.data.length||$.paginator.hasMore?-1:17),p.R7$(),p.vxM($.print?18:-1)}}let u=(()=>{class _{paginator;print;licenseRestrictions;timeScale=c.Wx.Hour;noDataMessage=A.Ns;static \u0275fac=function(w){return new(w||_)};static \u0275cmp=p.VBU({type:_,selectors:[["app-call-distribution-table"]],inputs:{paginator:"paginator",print:"print",licenseRestrictions:"licenseRestrictions",timeScale:"timeScale"},ngContentSelectors:L,decls:1,vars:1,consts:[[3,"print"],["nowrap",""],[1,"text-md-nowrap",3,"print"],["colspan","3"],[1,"text-md-nowrap"],[1,"loader"],["colspan","3",1,"text-center"]],template:function(w,R){1&w&&(p.NAR(b),p.nVh(0,n,19,17,"table",0)),2&w&&p.vxM(R.paginator?0:-1)},dependencies:[C.MD,y.h,y.D9,o.vE,g.L],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}'],changeDetection:0})}return _})()},16308(te,k,t){t.d(k,{bQ:()=>B,g8:()=>j,lE:()=>E});var C=t(17705),y=t(85802),A=t(62329),o=t(74005),g=t(41657),c=t(76415),p=t(47429),b=t(89417),L=t(84412),H=t(85343),S=t(96354),I=t(74651),i=t(79997),r=t(91382),T=t(49769),n=t(22429),u=t(83188),_=t(59625),d=t(79213),$=t(36715),w=t(31266),R=t(98280),f=t(97834),O=t(76814),M=t(1141),m=t(59882),P=t(38601),a=t(48643),l=t(60724),e=t(96864),s=t(89079),h=t(56998),x=t(35547);function E(){return new b.gE({dateRange:new b.MJ(new A.J,{nonNullable:!0}),timeScale:new b.MJ((0,l.dE)(),{nonNullable:!0}
1),extensions:new b.MJ(new w.kK("extensions","_i18n.SelectUsers"),{nonNullable:!0}),interval:new b.MJ(new d.V("_i18n.ReportsExcludeCallsDroppedBefore"),{nonNullable:!0}),callArea:new b.MJ((0,e.J)(e.Y.External),{nonNullable:!0}),includeCalls:new b.MJ((0,f.FI)(),{nonNullable:!0})})}function B(v,Q=!0){const{dateRange:V,interval:W,includeCalls:U,extensions:K,callArea:D,timeScale:q}=v;return{...V.value,...W.value,includeQueueCalls:U.value.selectedValues?.includes(f.u3.Queue)??!1,callArea:D.value.selectedValue,timeScale:q.value.selectedValue,extensions:K.value,canViewReport:Q}}let j=(()=>{class v{dataSource=(0,y.WQX)(O.c);route=(0,y.WQX)(m.nX);router=(0,y.WQX)(m.Ix);destroy$=(0,y.WQX)(y.abz);modalService=(0,y.WQX)(P.B);fileDownloadService=(0,y.WQX)(a.y);cd=(0,y.WQX)(C.gRc);scheduledReportType=I.G.CallDistribution;paginator$;hasMoreOrLoading$;parameters$=new L.t(null);nextPage$=new L.t(void 0);reset$=new L.t(void 0);timeScale$;allowedExtensionTypes=[w.V5.Any,w.V5.User,w.V5.Group];filter=E();get parameters(){return B(this.filter.value,this.isReportAvailable)}get isReportAvailable(){return this.route.snapshot.data.reportsAvailable}constructor(){this.paginator$=(0,i.K)(this.modalService,this.destroy$,this.parameters$,this.nextPage$,this.reset$,this.dataSource.dataFetcher,100),this.hasMoreOrLoading$=this.paginator$.pipe((0,S.T)(V=>!V.hasMore||V.isLoading)),this.timeScale$=this.parameters$.pipe((0,S.T)(V=>V?.timeScale??null)),(0,h.XP)(this.filter.controls.dateRange).pipe((0,s.pQ)(this.destroy$)).subscribe(V=>{const W=(0,l.fy)(V.value.periodType);this.filter.controls.timeScale.value.value={selectedValue:W},this.filter.controls.timeScale.setValue(this.filter.controls.timeScale.value),this.cd.markForCheck()})}submitFilter(){this.parameters$.next(this.parameters)}onSaveReport(V){(0,r.J)(this.modalService,this.scheduledReportType,V,this.dataSource.generateReportParams(this.parameters))}downloadCsv(){this.fileDownloadService.download(this.dataSource.generateCSVDownloadLink(this.parameters))}back(){this.router.navigate([".."],{relativeTo:this.route}).catch(H.l)}static \u0275fac=function(W){return new(W||v)};static \u0275cmp=x.VBU({type:v,selectors:[["ng-component"]],features:[x.Jv_([O.c])],decls:15,vars:22,consts:[["header","_i18n.CallDistribution",3,"back","helpUrl"],["header","",3,"exportClicked","disabled","showReportPrint"],["top-bar","",3,"filterChanged","saveReport","filterForm","formGroup","reportType","disabled"],["formControlName","dateRange"],["formControlName","timeScale"],["formControlName","extensions",3,"acceptMultiplePeers","allowedTypes"],["formControlName","interval"],["formControlName","callArea"],["formControlName","includeCalls",3,"inline"],["id","scrollableList",1,"h-100","scrollable-table"],["infiniteScroll","",3,"infiniteScrollCallback","infiniteScrollContainer","infiniteScrollDistance","infiniteScrollDisabled"],[3,"paginator","timeScale","licenseRestrictions"]],template:function(W,U){1&W&&(x.j41(0,"app-page",0),x.bIt("back",function(){return U.back()}),x.j41(1,"app-report-action-buttons",1),x.bIt("exportClicked",function(){return U.downloadCsv()}),x.k0s(),x.j41(2,"app-complex-filter",2),x.bIt("filterChanged",function(){return U.submitFilter()})("saveReport",function(D){return U.onSaveReport(D)}),x.nrm(3,"app-date-range-filter",3)(4,"app-enum-filter",4)(5,"app-source-or-destination-filter",5)(6,"app-new-interval-filter",6)(7,"app-enum-filter",7)(8,"app-checkbox-group-filter",8),x.k0s(),x.j41(9,"div",9)(10,"div",10),x.nI1(11,"async"),x.bIt("infiniteScrollCallback",function(){return U.nextPage$.next()}),x.nrm(12,"app-call-distribution-table",11),x.nI1(13,"async"),x.nI1(14,"async"),x.k0s()()()),2&W&&(x.Y8G("helpUrl","_i18n.ReportsUri"),x.R7$(),x.Y8G("disabled",!U.isReportAvailable)("showReportPrint",!0),x.R7$(),x.Y8G("filterForm",U.filter)("formGroup",U.filter)("reportType",U.scheduledReportType)("disabled",!U.isReportAvailable),x.R7$(3),x.Y8G("acceptMultiplePeers",!0)("allowedTypes",U.allowedExtensionTypes),x.R7$(3),x.Y8G("inline",!0),x.R7$(2),x.Y8G("infiniteScrollContainer","#scrollableList")("infiniteScrollDistance",1)("infiniteScrollDisabled",x.bMT(11,16,U.hasMoreOrLoading$)),x.R7$(2),x.Y8G("paginator",x.bMT(13,18,U.paginator$))("timeScale",x.bMT(14,20,U.timeScale$))("licenseRestrictions",!U.isReportAvailable))},dependencies:[b.YN,b.BC,b.cb,b.X1,b.j4,b.JD,o.M,n.D,u.H,_.n,$.J,g.C,R.C,M.A,c.B,p.j,T.Jj],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}']})}return v})()},76814(te,k,t){t.d(k,{c:()=>i});var C=t(85802),y=t(96354),A=t(7673),o=t(25558),g=t(31266),c=t(96794),p=t(97201),b=t(4499),L=t(35547);let H=(()=>{class r extends b.d{downloadGetGetCallDistribution(n,u="body"){const _=n?.clientTimeZone;if(null==_)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadGetGetCallDistribution.");const d=n?.periodFrom;
1if(null==d)throw new Error("Required parameter periodFrom was null or undefined when calling downloadGetGetCallDistribution.");const $=n?.periodTo;if(null==$)throw new Error("Required parameter periodTo was null or undefined when calling downloadGetGetCallDistribution.");const w=n?.groupNumber;if(null==w)throw new Error("Required parameter groupNumber was null or undefined when calling downloadGetGetCallDistribution.");const R=n?.extensionDns;if(null==R)throw new Error("Required parameter extensionDns was null or undefined when calling downloadGetGetCallDistribution.");const f=n?.waitInterval;if(null==f)throw new Error("Required parameter waitInterval was null or undefined when calling downloadGetGetCallDistribution.");const O=n?.includeQueueCalls;if(null==O)throw new Error("Required parameter includeQueueCalls was null or undefined when calling downloadGetGetCallDistribution.");const M=n?.callArea;if(null==M)throw new Error("Required parameter callArea was null or undefined when calling downloadGetGetCallDistribution.");const m=n?.groupingType;if(null==m)throw new Error("Required parameter groupingType was null or undefined when calling downloadGetGetCallDistribution.");const P=n?.$top,a=n?.$skip,l=n?.$search,e=n?.$filter,s=n?.$count,h=n?.$select,x=n?.$orderby,E=n?.$expand;let B=new p.rx(this.encoder);B=this.addToHttpParams(B,"$top",P,p.l2.Form,!1),B=this.addToHttpParams(B,"$skip",a,p.l2.Form,!1),B=this.addToHttpParams(B,"$search",l,p.l2.Form,!1),B=this.addToHttpParams(B,"$filter",e,p.l2.Form,!1),B=this.addToHttpParams(B,"$count",s,p.l2.Form,!1),B=this.addToHttpParams(B,"$select",h,p.l2.Form,!1),B=this.addToHttpParams(B,"$orderby",x,p.l2.Form,!1),B=this.addToHttpParams(B,"$expand",E,p.l2.Form,!1);let j=this.defaultHeaders;j=this.configuration.addCredentialToHeaders("Application","Authorization",j,"Bearer ");const v=this.configuration.selectHeaderAccept(["application/json"]);void 0!==v&&(j=j.set("Accept",v));let Q="json";v&&(Q=v.startsWith("text")?"text":this.configuration.isJsonMime(v)?"json":"blob");let V=`/ReportCallDistribution/Pbx.DownloadGetGetCallDistribution(clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},groupNumber=${this.configuration.encodeParam({name:"groupNumber",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},extensionDns=${this.configuration.encodeParam({name:"extensionDns",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},includeQueueCalls=${this.configuration.encodeParam({name:"includeQueueCalls",value:O,in:"path",style:"simple",explode:!1,dataType:"boolean",dataFormat:void 0})},callArea=${this.configuration.encodeParam({name:"callArea",value:M,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},groupingType=${this.configuration.encodeParam({name:"groupingType",value:m,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:W,withCredentials:U}=this.configuration;return this.httpClient.request("get",`${W}${V}`,{params:B.toHttpParams(),responseType:Q,...U?{withCredentials:U}:{},headers:j,observe:u})}downloadGetGetCallDistributionQuery(n,u="body",_=!1,d){const $=n.clientTimeZone;if(null==$)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadGetGetCallDistribution.");const w=n.periodFrom;if(null==w)throw new Error("Required parameter periodFrom was null or undefined when calling downloadGetGetCallDistribution.");const R=n.periodTo;if(null==R)throw new Error("Required parameter periodTo was null or undefined when calling downloadGetGetCallDistribution.");const f=n.groupNumber;if(null==f)throw new Error("Required parameter groupNumber was null or undefined when calling downloadGetGetCallDistribution.");const O=n.extensionDns;
1if(null==O)throw new Error("Required parameter extensionDns was null or undefined when calling downloadGetGetCallDistribution.");const M=n.waitInterval;if(null==M)throw new Error("Required parameter waitInterval was null or undefined when calling downloadGetGetCallDistribution.");const m=n.includeQueueCalls;if(null==m)throw new Error("Required parameter includeQueueCalls was null or undefined when calling downloadGetGetCallDistribution.");const P=n.callArea;if(null==P)throw new Error("Required parameter callArea was null or undefined when calling downloadGetGetCallDistribution.");const a=n.groupingType;if(null==a)throw new Error("Required parameter groupingType was null or undefined when calling downloadGetGetCallDistribution.");const l=n.$top,e=n.$skip,s=n.$search,h=n.$filter,x=n.$count,E=n.$select,B=n.$orderby,j=n.$expand;let v=new p.rx(this.encoder);return v=this.addToHttpParams(v,"$top",l,p.l2.Form,!1),v=this.addToHttpParams(v,"$skip",e,p.l2.Form,!1),v=this.addToHttpParams(v,"$search",s,p.l2.Form,!1),v=this.addToHttpParams(v,"$filter",h,p.l2.Form,!1),v=this.addToHttpParams(v,"$count",x,p.l2.Form,!1),v=this.addToHttpParams(v,"$select",E,p.l2.Form,!1),v=this.addToHttpParams(v,"$orderby",B,p.l2.Form,!1),v=this.addToHttpParams(v,"$expand",j,p.l2.Form,!1),`/ReportCallDistribution/Pbx.DownloadGetGetCallDistribution(clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},groupNumber=${this.configuration.encodeParam({name:"groupNumber",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},extensionDns=${this.configuration.encodeParam({name:"extensionDns",value:O,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:M,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},includeQueueCalls=${this.configuration.encodeParam({name:"includeQueueCalls",value:m,in:"path",style:"simple",explode:!1,dataType:"boolean",dataFormat:void 0})},callArea=${this.configuration.encodeParam({name:"callArea",value:P,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},groupingType=${this.configuration.encodeParam({name:"groupingType",value:a,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})?`+v.toString()}getCallDistribution(n,u="body"){const _=n?.clientTimeZone;if(null==_)throw new Error("Required parameter clientTimeZone was null or undefined when calling getCallDistribution.");const d=n?.periodFrom;if(null==d)throw new Error("Required parameter periodFrom was null or undefined when calling getCallDistribution.");const $=n?.periodTo;if(null==$)throw new Error("Required parameter periodTo was null or undefined when calling getCallDistribution.");const w=n?.groupNumber;if(null==w)throw new Error("Required parameter groupNumber was null or undefined when calling getCallDistribution.");const R=n?.extensionDns;if(null==R)throw new Error("Required parameter extensionDns was null or undefined when calling getCallDistribution.");const f=n?.waitInterval;if(null==f)throw new Error("Required parameter waitInterval was null or undefined when calling getCallDistribution.");const O=n?.includeQueueCalls;if(null==O)throw new Error("Required parameter includeQueueCalls was null or undefined when calling getCallDistribution.");const M=n?.callArea;if(null==M)throw new Error("Required parameter callArea was null or undefined when calling getCallDistribution.");const m=n?.groupingType;if(null==m)throw new Error("Required parameter groupingType was null or undefined when calling getCallDistribution.");const P=n?.$top,a=n?.$skip,l=n?.$search,e=n?.$filter,s=n?.$count,h=n?.$select,x=n?.$orderby,E=n?.$expand;let B=new p.rx(this.encoder);B=this.addToHttpParams(B,"$top",P,p.l2.Form,!1),B=this.addToHttpParams(B,"$skip",a,p.l2.Form,!1),B=this.addToHttpParams(B,"$search",l,p.l2.Form,!1),B=this.addToHttpParams(B,"$filter",e,p.l2.Form,!1),B=this.addToHttpParams(B,"$count",s,p.l2.Form,!1),B=this.addToHttpParams(B,"$select",h,p.l2.Form,!1),B=this.addToHttpParams(B,"$orderby",x,p.l2.Form,!1),B=this.addToHttpParams(B,"$expand",E,p.l2.Form,!1);let j=this.defaultHeaders;j=this.configuration.addCredentialToHeaders("Application","Authorization",j,"Bearer ");const v=this.configuration.selectHeaderAccept(["application/json"]);void 0!==v&&(j=j.set("Accept",v));let Q="json";v&&(Q=v.startsWith("text")?"text":this.configuration.isJsonMime(v)?"json":"blob");let V=`/ReportCallDistribution/Pbx.GetCallDistribution(clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},groupNumber=${this.configuration.encodeParam({name:"groupNumber",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},extensionDns=${this.configuration.encodeParam({name:"extensionDns",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},includeQueueCalls=${this.configuration.encodeParam({name:"includeQueueCalls",value:O,in:"path",style:"simple",explode:!1,dataType:"boolean",dataFormat:void 0})},callArea=${this.configuration.encodeParam({name:"callArea",value:M,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},groupingType=${this.configuration.encodeParam({name:"groupingType",value:m,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:W,withCredentials:U}=this.configuration;return this.httpClient.request("get",`${W}${V}`,{params:B.toHttpParams(),responseType:Q,...U?{withCredentials:U}:{},headers:j,observe:u})}getCallDistributionQuery(n,u="body",_=!1,d){const $=n.clientTimeZone;if(null==$)throw new Error("Required parameter clientTimeZone was null or undefined when calling getCallDistribution.");const w=n.periodFrom;
1if(null==w)throw new Error("Required parameter periodFrom was null or undefined when calling getCallDistribution.");const R=n.periodTo;if(null==R)throw new Error("Required parameter periodTo was null or undefined when calling getCallDistribution.");const f=n.groupNumber;if(null==f)throw new Error("Required parameter groupNumber was null or undefined when calling getCallDistribution.");const O=n.extensionDns;if(null==O)throw new Error("Required parameter extensionDns was null or undefined when calling getCallDistribution.");const M=n.waitInterval;if(null==M)throw new Error("Required parameter waitInterval was null or undefined when calling getCallDistribution.");const m=n.includeQueueCalls;if(null==m)throw new Error("Required parameter includeQueueCalls was null or undefined when calling getCallDistribution.");const P=n.callArea;if(null==P)throw new Error("Required parameter callArea was null or undefined when calling getCallDistribution.");const a=n.groupingType;if(null==a)throw new Error("Required parameter groupingType was null or undefined when calling getCallDistribution.");const l=n.$top,e=n.$skip,s=n.$search,h=n.$filter,x=n.$count,E=n.$select,B=n.$orderby,j=n.$expand;let v=new p.rx(this.encoder);return v=this.addToHttpParams(v,"$top",l,p.l2.Form,!1),v=this.addToHttpParams(v,"$skip",e,p.l2.Form,!1),v=this.addToHttpParams(v,"$search",s,p.l2.Form,!1),v=this.addToHttpParams(v,"$filter",h,p.l2.Form,!1),v=this.addToHttpParams(v,"$count",x,p.l2.Form,!1),v=this.addToHttpParams(v,"$select",E,p.l2.Form,!1),v=this.addToHttpParams(v,"$orderby",B,p.l2.Form,!1),v=this.addToHttpParams(v,"$expand",j,p.l2.Form,!1),`/ReportCallDistribution/Pbx.GetCallDistribution(clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},groupNumber=${this.configuration.encodeParam({name:"groupNumber",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},extensionDns=${this.configuration.encodeParam({name:"extensionDns",value:O,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:M,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},includeQueueCalls=${this.configuration.encodeParam({name:"includeQueueCalls",value:m,in:"path",style:"simple",explode:!1,dataType:"boolean",dataFormat:void 0})},callArea=${this.configuration.encodeParam({name:"callArea",value:P,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},groupingType=${this.configuration.encodeParam({name:"groupingType",value:a,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})?`+v.toString()}static \u0275fac=(()=>{let n;return function(_){return(n||(n=L.xGo(r)))(_||r)}})();static \u0275prov=C.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var S=t(67374),I=t.n(S);let i=(()=>{class r{reportCallDistributionApiService=(0,C.WQX)(H);dataFetcher=(n,u)=>n.canViewReport?_=>_.pipe((0,o.n)(d=>this.requestCallDistribution(n,d,u)),(0,y.T)(d=>d.value)):_=>_.pipe((0,o.n)(()=>(0,A.of)([])));requestCallDistribution(n,u,_){return this.reportCallDistributionApiService.getCallDistribution({$skip:u*_,$top:_,...(0,c.Rx)(n),groupingType:n.timeScale,extensionDns:n.extensions.type===g.V5.User?r.getODATAExtensionsForParam(n.extensions):"",groupNumber:n.extensions.type===g.V5.Group?r.getODATAExtensionsForParam(n.extensions):"",waitInterval:I().duration(n.interval??0,"seconds").format("H:mm:s"),callArea:n.callArea,includeQueueCalls:n.includeQueueCalls,clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})}generateCSVDownloadLink(n){return this.reportCallDistributionApiService.downloadGetGetCallDistributionQuery({...(0,c.Rx)(n),groupingType:n.timeScale,extensionDns:n.extensions.type===g.V5.User?r.getODATAExtensionsForParam(n.extensions):"",groupNumber:n.extensions.type===g.V5.Group?r.getODATAExtensionsForParam(n.extensions):"",waitInterval:I().duration(n.interval??0,"seconds").format("H:mm:s"),callArea:n.callArea,includeQueueCalls:n.includeQueueCalls,clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})}generateReportParams(n){return JSON.stringify({PeriodFrom:n.periodFromTo[0],Perio
1dTo:n.periodFromTo[1],DateRangeType:n.periodType,FirstDayOfWeek:n.firstWeekDay,GroupingType:n.timeScale,ExtensionDns:n.extensions.type===g.V5.User?r.getODATAExtensionsForParam(n.extensions):"",GroupNumber:n.extensions.type===g.V5.Group?r.getODATAExtensionsForParam(n.extensions):"",WaitInterval:I().duration(n.interval??0,"seconds").format("H:mm:s"),CallArea:n.callArea,IncludeQueueCalls:n.includeQueueCalls,ClientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})}static getODATAExtensionsForParam(n){return n.extension?.map(u=>u.Number).filter(Boolean).join(" ")??""}static \u0275fac=function(u){return new(u||r)};static \u0275prov=C.jDH({token:r,factory:r.\u0275fac})}return r})()},58368(te,k,t){t.d(k,{Q:()=>H,n:()=>L});var C=t(87019),y=t(84412),A=t(7673),o=t(25558),g=t(96354),c=t(96697),p=t(88141),b=t(54327);const L=C.tn[3];class H{callReportsDataSource;callReportParameters;history$=new y.t(void 0);constructor(I,i){this.callReportsDataSource=I,this.callReportParameters=i}resolveData(I,i,r,T){return this.history$.pipe((0,c.s)(1),(0,o.n)(n=>{if(!this.callReportParameters||!this.callReportParameters.canViewReport)return(0,A.of)({value:{totalItems:0,value:[],hasNext:!1},history:void 0});{const d=i+1;if(n&&I>n.lastCdrPage){const $=I-n.lastCdrPage-1;return this.callReportsDataSource.requestLegacyCalls(this.callReportParameters,$,d,n.oldApiStartOffset,$*i+n.oldApiStartOffset).pipe((0,g.T)(w=>({value:(0,b.ro)(I,i,w.value),history:n})))}{const $=I-1;return this.callReportsDataSource.requestCalls(this.callReportParameters,$,d,$*i).pipe((0,o.n)(w=>{const R=w.value?.length??0;if(R<d){const f=i-R+1;return this.callReportsDataSource.requestLegacyCalls(this.callReportParameters,0,f,0,0).pipe((0,g.T)(O=>({value:(0,b.ro)(I,i,[...w.value??[],...O.value??[]]),history:{lastCdrPage:I,oldApiStartOffset:f}})))}return(0,A.of)({value:(0,b.ro)(I,i,w.value),history:void 0})}))}}}),(0,p.M)(n=>{this.history$.next(n.history)}),(0,g.T)(n=>n.value))}}},28962(te,k,t){t.d(k,{Vo:()=>ie,bQ:()=>oe,lE:()=>J,pZ:()=>ne});var C=t(17705),y=t(85802),A=t(84412),o=t(85343),g=t(89417),c=t(59882),p=t(45048),b=t(48643),L=t(38601),H=t(56132),S=t(74651),I=t(54327),i=t(96354),r=t(96697),T=t(18103),n=t(31266),u=t(62329),_=t(67910),d=t(82207),$=t(83188),w=t(87019),R=t(59625),f=t(74005),O=t(76415),M=t(47429),m=t(98280),P=t(36623),a=t(28791),l=t(32732),e=t(29325),s=t(68018),h=t(49769),x=t(96704),E=t(60175),B=t(78713),j=t(91382),v=t(45764),Q=t(89079),V=t(65562),W=t(534),U=t(4801),K=t(58368),D=t(12426),q=t(42610),G=t(96106),F=t(35547);function N(re,me){return this.identify(me)}function Z(re,me){if(1&re){const ee=F.RV6();F.j41(0,"tr")(1,"td"),F.EFF(2),F.nI1(3,"appJsDateFormat"),F.nI1(4,"emptyValue"),F.k0s(),F.j41(5,"td")(6,"span",16),F.EFF(7),F.k0s()(),F.j41(8,"td")(9,"span",17),F.nI1(10,"emptyValue"),F.EFF(11),F.nI1(12,"emptyValue"),F.k0s()(),F.j41(13,"td")(14,"span",17),F.nI1(15,"emptyValue"),F.EFF(16),F.nI1(17,"emptyValue"),F.k0s()(),F.j41(18,"td"),F.EFF(19),F.nI1(20,"emptyValue"),F.k0s(),F.j41(21,"td"),F.EFF(22),F.nI1(23,"emptyValue"),F.k0s(),F.j41(24,"td"),F.EFF(25),F.nI1(26,"emptyValue"),F.k0s(),F.j41(27,"td"),F.EFF(28),F.nI1(29,"duration"),F.nI1(30,"emptyValue"),F.k0s(),F.j41(31,"td"),F.EFF(32),F.nI1(33,"duration"),F.nI1(34,"emptyValue"),F.k0s(),F.j41(35,"td"),F.EFF(36),F.nI1(37,"decimal"),F.k0s(),F.j41(38,"td"),F.EFF(39),F.nI1(40,"emptyValue"),F.k0s(),F.j41(41,"td",18)(42,"button",19),F.nI1(43,"translate"),F.bIt("click",function(){const de=y.eBV(ee).$implicit,Te=F.XpG();return y.Njj(Te.transcription(de))}),F.k0s(),F.j41(44,"button",20),F.nI1(45,"translate"),F.bIt("click",function(){const de=y.eBV(ee).$implicit,Te=F.XpG();return y.Njj(Te.summary(de))}),F.k0s(),F.j41(46,"button",21),F.nI1(47,"translate"),F.bIt("click",function(){const de=y.eBV(ee).$implicit,Te=F.XpG();return y.Njj(Te.reportsRecordingService.downloadRecordingById(de.SrcRecId||de.DstRecId))}),F.k0s(),F.j41(48,"row-action-button",22)(49,"li",23)(50,"button",24),F.bIt("click",function(){const de=y.eBV(ee).$implicit,Te=F.XpG();return y.Njj(Te.reportsRecordingService.playRecordingById(de.SrcRecId||de.DstRecId))}),F.k0s()(),F.j41(51,"li",23)(52,"button",25),F.bIt("click",function(){const de=y.eBV(ee).$implicit,Te=F.XpG();return y.Njj(Te.requestCallReport(de))}),F.k0s()(),F.j41(53,"li",23)(54,"button",26),F.bIt("click",function(){const de=y.eBV(ee).$implicit,Te=F.XpG();return y.Njj(Te.transcription(de))}),F.k0s()(),F.j41(55,"li",23)(56,"button",27),F.bIt("click",function(){const de=y.eBV(ee).$implicit,Te=F.XpG();return y.Njj(Te.summary(de))}),F.k0s()()()()()}if(2&re){const ee=me.$implicit,ue=F.XpG();F.HbH(ue.isEvenCallId(ee)?"odd":"even"),F.R7$(2),F.JRh(F.bMT(4,42,F.bMT(3,40,ee.StartTime))),F.R7$(4),F.Y8G("tooltip",F.mNQ(ee.MainCallHistoryId)),F.R7$(),F.SpI(" ",ue.getCallIdLabel(ee.MainCallHistoryId)," "),F.R7$(2),F.Y8G("title",F.bMT(10,44,ee.SourceDisplayName)),F.R7$(2),F.JRh(F.bMT(12,46,ee.SourceDisplayName)),F.R7$(3),F.Y8G("title",F.bMT(15,48,ee.DestinationDisplayName)),F.R7$(2),F.JRh(F.bMT(17,50,ee.DestinationDisplayName)),F.R7$(3),F.JRh(F.bMT(20,52,ee.Direction)),F.R7$(3),F.JRh(F.bMT(23,54,ee.Status)),F.R7$(3),F.JRh(F.bMT(26,56,ee.SentimentScore)),F.R7$(3),F.JRh(F.bMT(30,60,F.bMT(29,58,ee.RingingDuration))),F.R7$(4),F.JRh(F.bMT(34,64,F.bMT(33,62,ee.TalkingDuration))),F.R7$(4),F.JRh(F.bMT(37,66,ee.CallCost??0)),F.R7$(3),F.JRh(F.bMT(40,68,ee.Reason)),F.R7$(3),F.Y8G("title",F.bMT(43,70,"_i18n.Transcription"))("disabled",!ee.Transcription),F.R7$(2),F.Y8G("title",F.bMT(45,72,"_i18n.Summary"))("disabled",!(ee.Summary&&!ue.isSummaryNotApplicable(ee))),F.R7$(2),F.Y8G("title",F.bMT(47,74,"_i18n.Download"))("disabled",!ee.SrcRecId&&!ee.DstRecId),F.R7$(2),F.Y8G("isLarge",!0),F.R7$(),F.AVh("disabled",!ee.SrcRecId&&!ee.DstRecId),F.R7$(),F.Y8G("disabled",!ee.SrcRecId&&!ee.DstRecId)("translate","_i18n.PlayRecording"),F.R7$(),F.AVh("disabled",!ee.QualityReport),F.R7$(),F.Y8G("disabled",!ee.QualityReport)("translate","_i18n.CQReportShowTitle"),F.R7$(),F.AVh("disabled",!ee.Transcription),F.R7$(),F.Y8G("disabled",!ee.Transcription)("translate","_i18n.Transcription"),F.R7$(),F.AVh("disabled",!ee.Summary||ue.isSummaryNotApplicable(ee)),F.R7$(),F.Y8G("disabled",!ee.Summary||ue.isSummaryNotApplicable(ee))("translate","_i18n.Summary")}
1}function Y(re,me){1&re&&(F.j41(0,"tr")(1,"td",14),F.nrm(2,"div",28),F.k0s()())}function z(re,me){if(1&re&&(F.j41(0,"tr")(1,"td",29),F.EFF(2),F.nI1(3,"translate"),F.k0s()()),2&re){const ee=F.XpG();F.R7$(2),F.SpI(" ",F.bMT(3,1,ee.noDataMessage(!ee.isReportAvailable))," ")}}function ie(re){const me=[...new Set(re.map(ee=>ee.MainCallHistoryId))];return new Map(me.map((ee,ue)=>[ee,ue%2==0]))}function J(){return new g.gE({dateRange:new g.MJ(new u.J,{nonNullable:!0}),callType:new g.MJ((0,_.E)(),{nonNullable:!0}),from:new g.MJ(new n.kK("from","_i18n.Caller"),{nonNullable:!0}),to:new g.MJ(new n.kK("to","_i18n.Callee"),{nonNullable:!0})})}function oe(re,me,ee=!0){const{dateRange:ue,from:de,to:Te,callType:$e}=re;return{...ue.value,callType:$e.value.selectedValue,from:de.value,to:Te.value,search:me,canViewReport:ee}}let ne=(()=>{class re{cd=(0,y.WQX)(C.gRc);dataSource=(0,y.WQX)(p.v);route=(0,y.WQX)(c.nX);router=(0,y.WQX)(c.Ix);transcrService=(0,y.WQX)(d.I);modalService=(0,y.WQX)(L.B);reportsRecordingService=(0,y.WQX)(T.M);destroy$=(0,y.WQX)(y.abz);fileDownloadService=(0,y.WQX)(b.y);callQualityReportsApiService=(0,y.WQX)(H.Q);localStorageService=(0,y.WQX)(D.sj);callHistoryIdsParity=new Map;scheduledReportType=S.G.CallLogs;parameters$=new A.t(null);pager;cdrs;searchText=new g.MJ("");filter=J();allowedFromTypes=[n.V5.Any,n.V5.User,n.V5.Queue,n.V5.RingGroup,n.V5.NumberContains,n.V5.NumberStartsWith,n.V5.MatchNumber,n.V5.Internal,n.V5.External];allowedToTypes=[n.V5.Any,n.V5.User,n.V5.Queue,n.V5.RingGroup,n.V5.NumberContains,n.V5.NumberStartsWith,n.V5.MatchNumber,n.V5.MatchBillingCode,n.V5.Internal,n.V5.External];get isReportAvailable(){return this.route.snapshot.data.reportsAvailable}get parameters(){return oe(this.filter.value,this.searchText.value,this.isReportAvailable)}constructor(){const ee=this.parameters$.pipe((0,i.T)(ue=>new K.Q(this.dataSource,ue)));
1this.pager=new U.f(this.destroy$,ee,void 0,this.getStoredPageSize()),this.pager.pagedItems$.pipe((0,Q.pQ)(this.destroy$)).subscribe({next:ue=>{this.updateItems(ue)},error:ue=>this.modalService.error(ue)})}updateItems(ee){this.cdrs=ee.value??[],this.callHistoryIdsParity=ie(this.cdrs),this.cd.markForCheck()}identify(ee){return ee.CdrId}getStoredPageSize(){const ee=this.localStorageService.retrieve(q.Hh.ReportPageSize);return ee?+ee:K.n}onPageSizeChange(ee){this.localStorageService.store(q.Hh.ReportPageSize,ee),this.pager.pageSizeChanged(ee)}submitFilter(){this.parameters$.next(this.parameters)}onSaveReport(ee){(0,j.J)(this.modalService,this.scheduledReportType,ee,this.dataSource.generateReportParams(this.parameters))}isEvenCallId(ee){return!!this.callHistoryIdsParity.get(ee.MainCallHistoryId)}requestCallReport(ee){ee.CdrId&&ee.CallHistoryId&&ee.CallId&&ee.DestinationDn&&ee.SourceDn&&(ee.CallHistoryId===ee.CallId.toString()?this.callQualityReportsApiService.getOldCallQualityReport({callId:ee.CallId,dstNumber:ee.DestinationDn,srcNumber:ee.SourceDn,srcCallerId:ee.SourceCallerId??null,dstCallerId:ee.DestinationCallerId??null}):this.callQualityReportsApiService.getCallQualityReport({cdrId:ee.CdrId,dstNumber:ee.DestinationDn,srcNumber:ee.SourceDn,srcCallerId:ee.SourceCallerId??null,dstCallerId:ee.DestinationCallerId??null})).pipe((0,r.s)(1),(0,G.Pr)("_i18n.CallQualityReportNotFoundErrorMessage"),(0,Q.pQ)(this.destroy$)).subscribe({next:de=>{this.modalService.showDialog(V.n,{qualityReport:de})},error:de=>this.modalService.error(de)})}transcription(ee){ee.Transcription&&this.transcrService.showTranscription(ee.Transcription)}isSummaryNotApplicable(ee){return"N/A"===ee.Summary?.trim()}summary(ee){!ee.Summary||this.isSummaryNotApplicable(ee)||this.transcrService.showTranscription(ee.Summary,"_i18n.Summary")}getCallIdLabel(ee){return ee?`${ee.substring(0,3)}-${ee.substring(ee.length-3)}`:""}downloadCsv(){this.fileDownloadService.download(this.dataSource.generateCSVDownloadLink(this.parameters))}back(){this.router.navigate([".."],{relativeTo:this.route}).catch(o.l)}noDataMessage=I.Ns;static \u0275fac=function(ue){return new(ue||re)};static \u0275cmp=F.VBU({type:re,selectors:[["ng-component"]],features:[F.Jv_([p.v])],decls:58,vars:58,consts:[["header","_i18n.CallReports",3,"back","helpUrl"],["header","",3,"exportClicked","disabled","showReportPrint"],["top-bar","",3,"filterChanged","saveReport","search","filterForm","formGroup","reportType","disabled"],["formControlName","dateRange"],["formControlName","from",3,"acceptMultiplePeers","allowedTypes"],["formControlName","to",3,"acceptMultiplePeers","allowedTypes"],["formControlName","callType"],["id","scrollableList",1,"h-100","scrollable-table"],[1,"table-header"],[1,"col-size-75"],[1,"minw-px-100","maxw-px-400"],[1,"w-auto"],[1,"actions"],[3,"class"],["colspan","12"],[3,"pageChanged","itemsPerPageChanged","showPageSizes","currentPage","itemsPerPage","totalItems"],["container","body",3,"tooltip"],[1,"line-clamp-3","text-break",3,"title"],["data-qa","actions","nowrap","",1,"actions"],["data-qa","transcription-button","type","button","app-file-lines-solid-icon","",1,"btn","btn-plain",3,"click","title","disabled"],["data-qa","summary-button","type","button","app-waveform-lines-solid-icon","",1,"btn","btn-plain",3,"click","title","disabled"],["data-qa","download-button","type","button","app-download-solid-icon","",1,"btn","btn-plain",3,"click","title","disabled"],[3,"isLarge"],["role","menuitem"],["type","button","data-qa","play",1,"dropdown-item",3,"click","disabled","translate"],["type","button","data-qa","quality-report",1,"dropdown-item",3,"click","disabled","translate"],["type","button","data-qa","transcription",1,"dropdown-item",3,"click","disabled","translate"],["type","button","data-qa","summary",1,"dropdown-item",3,"click","disabled","translate"],[1,"loader"],["colspan","12",1,"text-center"]],template:function(ue,de){1&ue&&(F.j41(0,"app-page",0),F.bIt("back",function(){return de.back()}),F.j41(1,"app-report-action-buttons",1),F.bIt("exportClicked",function(){return de.downloadCsv()}),F.k0s(),F.j41(2,"app-complex-filter",2),F.bIt("filterChanged",function(){return de.submitFilter()})("saveReport",function($e){return de.onSaveReport($e)}),F.nrm(3,"app-date-range-filter",3)(4,"app-source-or-destination-filter",4)(5,"app-source-or-destination-filter",5)(6,"app-enum-filter",6),F.k0s(),F.j41(7,"div",7)(8,"table")(9,"thead")(10,"tr",8)(11,"th"),F.EFF(12),F.nI1(13,"translate"),F.k0s(),F.j41(14,"th",9),F.EFF(15),F.nI1(16,"translate"),F.k0s(),F.j41(17,"th",10),F.EFF(18),F.nI1(19,"translate"),F.k0s(),F.j41(20,"th",10),F.EFF(21),F.nI1(22,"translate"),F.k0s(),F.j41(23,"th"),F.EFF(24),F.nI1(25,"translate"),F.k0s(),F.j41(26,"th"),F.EFF(27),F.nI1(28,"translate"),F.k0s(),F.j41(29,"th"),F.EFF(30),F.nI1(31,"translate"),F.k0s(),F.j41(32,"th"),F.EFF(33),F.nI1(34,"translate"),F.k0s(),F.j41(35,"th"),F.EFF(36),F.nI1(37,"translate"),F.k0s(),F.j41(38,"th"),F.EFF(39),F.nI1(40,"translate"),F.k0s(),F.j41(41,"th",11),F.EFF(42),F.nI1(43,"translate"),F.k0s(),F.nrm(44,"th",12),F.k0s()(),F.j41(45,"tbody"),F.Z7z(46,Z,57,76,"tr",13,N,!0),F.nVh(48,Y,3,0,"tr"),F.nI1(49,"async"),F.vZN(50,z,4,3,"tr"),F.k0s(),F.j41(51,"tfoot")(52,"tr")(
153,"td",14)(54,"app-paging",15),F.nI1(55,"async"),F.nI1(56,"async"),F.nI1(57,"async"),F.bIt("pageChanged",function($e){return de.pager.pageChanged($e)})("itemsPerPageChanged",function($e){return de.onPageSizeChange($e)}),F.k0s()()()()()()()),2&ue&&(F.Y8G("helpUrl","_i18n.ReportsUri"),F.R7$(),F.Y8G("disabled",!de.isReportAvailable)("showReportPrint",!0),F.R7$(),F.Y8G("search",de.searchText)("filterForm",de.filter)("formGroup",de.filter)("reportType",de.scheduledReportType)("disabled",!de.isReportAvailable),F.R7$(2),F.Y8G("acceptMultiplePeers",!0)("allowedTypes",de.allowedFromTypes),F.R7$(),F.Y8G("acceptMultiplePeers",!0)("allowedTypes",de.allowedToTypes),F.R7$(7),F.JRh(F.bMT(13,28,"_i18n.ReportsCallTime")),F.R7$(3),F.JRh(F.bMT(16,30,"_i18n.ReportsCallID")),F.R7$(3),F.JRh(F.bMT(19,32,"_i18n.Caller")),F.R7$(3),F.JRh(F.bMT(22,34,"_i18n.Callee")),F.R7$(3),F.JRh(F.bMT(25,36,"_i18n.ReportsDirection")),F.R7$(3),F.JRh(F.bMT(28,38,"_i18n.ReportsStatus")),F.R7$(3),F.JRh(F.bMT(31,40,"_i18n.Sentiment")),F.R7$(3),F.JRh(F.bMT(34,42,"_i18n.ReportsRinging")),F.R7$(3),F.JRh(F.bMT(37,44,"_i18n.ReportsTalking")),F.R7$(3),F.JRh(F.bMT(40,46,"_i18n.ReportsCost")),F.R7$(3),F.JRh(F.bMT(43,48,"_i18n.CallActivityDetails")),F.R7$(4),F.Dyx(de.cdrs),F.R7$(2),F.vxM(de.cdrs&&0!==de.cdrs.length||!F.bMT(49,50,de.pager.filterLoading$)||!de.isReportAvailable?de.cdrs&&0===de.cdrs.length?50:-1:48),F.R7$(6),F.Y8G("showPageSizes",!0)("currentPage",F.bMT(55,52,de.pager.currentPage$))("itemsPerPage",F.bMT(56,54,de.pager.pageSize$))("totalItems",F.bMT(57,56,de.pager.totalCount$)))},dependencies:[$.H,R.n,f.M,g.X1,g.BC,g.cb,g.j4,g.JD,O.B,m.C,M.j,e.I,s.Mm,W.dg,a.X,P.e,w.u4,g.YN,l.O,s.D9,h.Jj,v.N,x.bB,E.Q,B.vE],styles:[".odd[_ngcontent-%COMP%]{background:var(--bg-primary-darken)}.even[_ngcontent-%COMP%]{background:var(--bg-primary)}.max-width-200[_ngcontent-%COMP%]{max-width:200px!important}.max-width-300[_ngcontent-%COMP%]{max-width:300px!important}",'@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}']})}return re})()},45048(te,k,t){t.d(k,{v:()=>I});var C=t(7673),y=t(25558),A=t(96354),o=t(56132),g=t(85802),c=t(67374),p=t.n(c),b=t(38357),L=t(31266),H=t(96794),S=function(i){return i[i.Any=0]="Any",i[i.Internal=1]="Internal",i[i.ExtensionOrRangeOfExtensions=2]="ExtensionOrRangeOfExtensions",i[i.Exter
1nal=3]="External",i[i.MatchNumber=4]="MatchNumber",i[i.NumberStartsWith=5]="NumberStartsWith",i[i.NumberContains=6]="NumberContains",i[i.BillingCode=7]="BillingCode",i}(S||{});let I=(()=>{class i{reportCallLogDataApiService=(0,g.WQX)(o.Q);requestMergedCall(T,n,u,_){if(_?.IsLegacy){const d=n-(_?.LastCdrPage??0),$=_?.FirstOffset??0;return this.requestLegacyCalls(T,d,u,$).pipe((0,A.T)(w=>({...w,lastPage:{IsLegacy:!0,LastCdrPage:_.LastCdrPage,FirstOffset:$}})))}return this.requestCalls(T,n,u).pipe((0,y.n)(d=>{const $=u-(d.value?.length??0);return $>0?this.requestLegacyCalls(T,0,$,0).pipe((0,A.T)(w=>({value:[...d.value??[],...w.value??[]],lastPage:{IsLegacy:!0,LastCdrPage:n+1,FirstOffset:w.value?.length??0}}))):(0,C.of)({...d,lastPage:{IsLegacy:!1}})}))}requestCalls(T,n,u,_){return this.reportCallLogDataApiService.getCallLogData({$skip:_??n*u,$top:u,callTimeFilterFrom:p().duration(0,"seconds").format("H:mm:s"),callTimeFilterTo:p().duration(0,"seconds").format("H:mm:s"),callTimeFilterType:0,callsType:T.callType,hidePcalls:!0,...(0,H.Rx)(T),...i.getODATAFilterType(T),$search:(0,b.Bj)(T.search?.toLowerCase())})}requestLegacyCalls(T,n,u,_,d){return this.reportCallLogDataApiService.getOldCallLogData({$skip:d??n*u+_,$top:u,callTimeFilterFrom:p().duration(0,"seconds").format("H:mm:s"),callTimeFilterTo:p().duration(0,"seconds").format("H:mm:s"),callTimeFilterType:0,callsType:T.callType,hidePcalls:!0,...(0,H.Rx)(T),...i.getODATAFilterType(T),$search:(0,b.Bj)(T.search?.toLowerCase())})}generateCSVDownloadLink(T){return this.reportCallLogDataApiService.downloadCallLogQuery({callTimeFilterFrom:p().duration(0,"seconds").format("H:mm:s"),callTimeFilterTo:p().duration(0,"seconds").format("H:mm:s"),callTimeFilterType:0,callsType:T.callType,hidePcalls:!0,...(0,H.Rx)(T),...i.getODATAFilterType(T),clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,$search:(0,b.Bj)(T.search?.toLowerCase())})}generateReportParams(T){const n=i.getODATAFilterForParam(T.to),u=i.getODATAFilterForParam(T.from),_=(T.search??"").trim().toLowerCase();return JSON.stringify({CallTimeFilterFrom:p().duration(0,"seconds").format("H:mm:s"),CallTimeFilterTo:p().duration(0,"seconds").format("H:mm:s"),CallTimeFilterType:0,CallsType:T.callType,HidePcalls:!0,PeriodFrom:T.periodFromTo[0],PeriodTo:T.periodFromTo[1],DateRangeType:T.periodType,FirstDayOfWeek:T.firstWeekDay,SourceType:u.type,SourceFilter:u.filter,DestinationType:n.type,DestinationFilter:n.filter,ClientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,Search:_})}static getODATAFilterType(T){const n=i.getODATAFilterForParam(T.to),u=i.getODATAFilterForParam(T.from);return{sourceType:u.type,sourceFilter:u.filter,destinationType:n.type,destinationFilter:n.filter}}static getODATAFilterForParam(T){const n=(0,b.Y)(T.text??"",!1),u=T.extension?.map(_=>_.Number).filter(Boolean).join(" ")??"";switch(T.type){case L.V5.NumberContains:if(n)return{type:S.NumberContains,filter:n};break;case L.V5.MatchNumber:if(n)return{type:S.MatchNumber,filter:n};break;case L.V5.NumberStartsWith:if(n)return{type:S.NumberStartsWith,filter:n};break;case L.V5.MatchBillingCode:if(n)return{type:S.BillingCode,filter:n};break;case L.V5.Internal:return{type:S.Internal,filter:""};case L.V5.External:return{type:S.External,filter:""};case L.V5.Queue:case L.V5.User:case L.V5.RingGroup:if(u)return{type:S.ExtensionOrRangeOfExtensions,filter:u}}return{type:S.Any,filter:""}}static \u0275fac=function(n){return new(n||i)};static \u0275prov=g.jDH({token:i,factory:i.\u0275fac})}return i})()},82199(te,k,t){t.d(k,{G:()=>p});var C=t(59882),y=t(85802),A=t(54381),o=t(99437),g=t(96354),c=t(7673);const p=()=>{const b=(0,y.WQX)(A.G),L=(0,y.WQX)(C.Ix);return b.getSystemParameters().pipe((0,g.T)(H=>H.IsChatLogEnabled??!1),(0,o.W)(()=>(0,c.of)(!1)),(0,g.T)(H=>H||L.parseUrl("error")))}},53905(te,k,t){t.d(k,{dR:()=>Ae,lE:()=>Ee,bQ:()=>xe});var C=t(85802),y=t(17705),A=t(89417),o=t(84412),g=t(85343),c=t(59882),p=t(93049),b=t(74651),L=t(96354),H=t(23294),S=t(90393),I=t(62329),i=t(74005),r=t(76415),T=t(38601),n=t(54327),u=t(44443),_=t(43748),d=t(82286),$=t(66300),w=t(68018),R=t(89079),f=t(35547);function O(le,_e){if(1&le&&f.nrm(0,"field-select",3),2&le){const X=f.XpG();f.Y8G("formControl",X.f.participantType)("options",X.participantTypeOptions)}}let M=(()=>{class le extends _.F{constructor(){super(new A.gE({chatType:new A.MJ(u.He.All),participantType:new A.MJ(null)}))}ngOnInit(){this.f.chatType.valueChanges.pipe((0,H.F)(),(0,R.pQ)(this.destroy$)).subscribe(X=>{this.control.patchValue({participantType:X===u.He.External?d.yJ.All:null}),this.cd.markForCheck()})}get f(){return this.control.controls}chatTypeOptions=u.td;participantTypeOptions=d.eI;ChatType=u.He;static \u0275fac=function(se){return new(se||le)};static \u0275cmp=f.VBU({type:le,selectors:[["app-chat-participant-type-filter"]],features:[f.Jv_([{provide:A.kq,multi:!0,useExisting:le},{provide:A.cz,multi:!0,useExisting:le}]),f.Vt3],decls:7,vars:6,consts:[["data-qa","chat-participant-type-filter",1,"d-flex","gap-3"],[1,"filter-label"],[1,"d-flex","flex-wrap","col-gap-3"],[3,"formControl","options"]],template:function(se,ae){1&se&&(f.j41(0,"div",0)(1,"label",1),f.EFF(2),f.nI1(3,"translate"),f.k0s(),f.j41(4,"div",2),f.nrm(5,"field-select",3),f.nVh(6,O,1,2,"field-select",3),f.k0s()()),2&se&&(f.R7$(2),f.JRh(f.bMT(3,4,"_i18n.ReportsChannel")),f.R7$(3),f.Y8G("formControl",ae.f.chatType)("options",ae.chatTypeOptions),f.R7$(),f.vxM(ae.f.chatType.value===ae.ChatType.External?6:-1))},dependencies:[A.X1,A.BC,A.l_,$.q,w.D9],encapsulation:2,changeDetection:0})}return le})();
1var m=t(48643),P=t(31266),a=t(98280),l=t(25558),e=t(7673),s=t(97201),h=t(4499);let x=(()=>{class le extends h.d{downloadChatMessagesHistory(X,se="body"){const ae=X?.clientTimeZone;if(null==ae)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadChatMessagesHistory.");const pe=X?.$top,ge=X?.$skip,ye=X?.$search,be=X?.$filter,ve=X?.$count,we=X?.$select,Pe=X?.$orderby,Ce=X?.$expand;let fe=new s.rx(this.encoder);fe=this.addToHttpParams(fe,"$top",pe,s.l2.Form,!1),fe=this.addToHttpParams(fe,"$skip",ge,s.l2.Form,!1),fe=this.addToHttpParams(fe,"$search",ye,s.l2.Form,!1),fe=this.addToHttpParams(fe,"$filter",be,s.l2.Form,!1),fe=this.addToHttpParams(fe,"$count",ve,s.l2.Form,!1),fe=this.addToHttpParams(fe,"$select",we,s.l2.Form,!1),fe=this.addToHttpParams(fe,"$orderby",Pe,s.l2.Form,!1),fe=this.addToHttpParams(fe,"$expand",Ce,s.l2.Form,!1);let ce=this.defaultHeaders;ce=this.configuration.addCredentialToHeaders("Application","Authorization",ce,"Bearer ");const he=this.configuration.selectHeaderAccept(["application/json"]);void 0!==he&&(ce=ce.set("Accept",he));let Me="json";he&&(Me=he.startsWith("text")?"text":this.configuration.isJsonMime(he)?"json":"blob");let Re=`/ChatMessagesHistoryView/Pbx.DownloadChatMessagesHistory(clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:ae,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:De,withCredentials:Fe}=this.configuration;return this.httpClient.request("get",`${De}${Re}`,{params:fe.toHttpParams(),responseType:Me,...Fe?{withCredentials:Fe}:{},headers:ce,observe:se})}downloadChatMessagesHistoryQuery(X,se="body",ae=!1,pe){const ge=X.clientTimeZone;if(null==ge)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadChatMessagesHistory.");const ye=X.$top,be=X.$skip,ve=X.$search,we=X.$filter,Pe=X.$count,Ce=X.$select,fe=X.$orderby,ce=X.$expand;let he=new s.rx(this.encoder);return he=this.addToHttpParams(he,"$top",ye,s.l2.Form,!1),he=this.addToHttpParams(he,"$skip",be,s.l2.Form,!1),he=this.addToHttpParams(he,"$search",ve,s.l2.Form,!1),he=this.addToHttpParams(he,"$filter",we,s.l2.Form,!1),he=this.addToHttpParams(he,"$count",Pe,s.l2.Form,!1),he=this.addToHttpParams(he,"$select",Ce,s.l2.Form,!1),he=this.addToHttpParams(he,"$orderby",fe,s.l2.Form,!1),he=this.addToHttpParams(he,"$expand",ce,s.l2.Form,!1),`/ChatMessagesHistoryView/Pbx.DownloadChatMessagesHistory(clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:ge,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+he.toString()}listChatMessagesHistoryView(X,se="body"){const ae=X?.$top,pe=X?.$skip,ge=X?.$search,ye=X?.$filter,be=X?.$count,ve=X?.$orderby,we=X?.$select,Pe=X?.$expand;let Ce=new s.rx(this.encoder);Ce=this.addToHttpParams(Ce,"$top",ae,s.l2.Form,!1),Ce=this.addToHttpParams(Ce,"$skip",pe,s.l2.Form,!1),Ce=this.addToHttpParams(Ce,"$search",ge,s.l2.Form,!1),Ce=this.addToHttpParams(Ce,"$filter",ye,s.l2.Form,!1),Ce=this.addToHttpParams(Ce,"$count",be,s.l2.Form,!1),Ce=this.addToHttpParams(Ce,"$orderby",ve,s.l2.Form,!1),Ce=this.addToHttpParams(Ce,"$select",we,s.l2.Form,!1),Ce=this.addToHttpParams(Ce,"$expand",Pe,s.l2.Form,!1);let fe=this.defaultHeaders;fe=this.configuration.addCredentialToHeaders("Application","Authorization",fe,"Bearer ");const ce=this.configuration.selectHeaderAccept(["application/json"]);void 0!==ce&&(fe=fe.set("Accept",ce));let he="json";ce&&(he=ce.startsWith("text")?"text":this.configuration.isJsonMime(ce)?"json":"blob");const{basePath:Re,withCredentials:De}=this.configuration;return this.httpClient.request("get",`${Re}/ChatMessagesHistoryView`,{params:Ce.toHttpParams(),responseType:he,...De?{withCredentials:De}:{},headers:fe,observe:se})}listChatMessagesHistoryViewQuery(X,se="body",ae=!1,pe){const ge=X.$top,ye=X.$skip,be=X.$search,ve=X.$filter,we=X.$count,Pe=X.$orderby,Ce=X.$select,fe=X.$expand;let ce=new s.rx(this.encoder);return ce=this.addToHttpParams(ce,"$top",ge,s.l2.Form,!1),ce=this.addToHttpParams(ce,"$skip",ye,s.l2.Form,!1),ce=this.addToHttpParams(ce,"$search",be,s.l2.Form,!1),ce=this.addToHttpParams(ce,"$filter",ve,s.l2.Form,!1),ce=this.addToHttpParams(ce,"$count",we,s.l2.Form,!1),ce=this.addToHttpParams(ce,"$orderby",Pe,s.l2.Form,!1),ce=this.addToHttpParams(ce,"$select",Ce,s.l2.Form,!1),ce=this.addToHttpParams(ce,"$expand",fe,s.l2.Form,!1),"/ChatMessagesHistoryView?"+ce.toString()}static \u0275fac=(()=>{let X;return function(ae){return(X||(X=f.xGo(le)))(ae||le)}})();static \u0275prov=C.jDH({token:le,factory:le.\u0275fac,providedIn:"root"})}return le})();var E=t(38357);let B=(()=>{class le{chatMessagesHistoryViewApiService=(0,C.WQX)(x);dataFetcher=(X,se)=>X.canViewReport?ae=>ae.pipe((0,l.n)(pe=>this.requestChats(X,pe,se)),(0,L.T)(pe=>pe.value)):ae=>ae.pipe((0,l.n)(()=>(0,e.of)([])));requestChats(X,se,ae,pe){return this.chatMessagesHistoryViewApiService.listChatMessagesHistoryView({$skip:pe??se*ae,$top:ae,$filter:this.generateODataFilter(X).join(" and ")})}generateCSVDownloadLink(X){return this.chatMessagesHistoryViewApiService.downloadChatMessagesHistoryQuery({$filter:this.generateODataFilter(X).join(" and "),$search:(0,E.Bj)(X.search?.toLowerCase()),clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})}generateODataFilter(X){const se=[],{search:ae,periodFromTo:pe}=X;if(se.push(`ConversationId eq ${X.chatId}`),ae&&""!==ae){const ge=(0,E.Y)(ae,!0);se.push("("+["Recipients","SenderParticipantName","Message","SenderParticipantEmail"].map(be=>`contains(tolower(${be}), '${ge}')`).join(" or ")+")")}return pe&&2===pe.length&&se.push(`(TimeSent ge ${pe[0].toISOString()} and TimeSent lt ${pe[1].toISOString()})`),se}static \u0275fac=function(se){return new(se||le)};static \u0275prov=C.jDH({token:le,factory:le.\u0275fac})}return le})();var j=t(83188),v=t(59625),Q=t(73370),V=t(62382),W=t(64631),U=t(49769),K=t(4801);class D{dataSource;callsParameters;constructor(_e,X){this.dataSource=_e,this.callsParameters=X}resolveData(_e,X,se,ae){if(!this.callsParameters||!this.callsParameters.canViewReport)return(0,n.BY)();const pe=_e-1;return this.dataSource.requestChats(this.callsParameters,pe,X+1,pe*X).pipe((0,L.T)(ge=>(0,n.ro)(_e,X,ge.value)))}}var q=t(87019),G=t(42610),F=t(58368),N=t(12426);const Z=(le,_e)=>_e.MessageId;function Y(le,_e){if(1&le){const X=f.RV6();f.j41(0,"tr")(1,"td",12),f.EFF(2),f.nI1(3,"amLocal"),f.nI1(4,"amDateFormat"),f.k0s(),f.j41(5,"td",12),f.EFF(6),f.k0s(),f.j41(7,"td",12),f.EFF(8),f.k0s(),f.j41(9,"td")(10,"span",13),f.bIt("click",function(){const ae=C.eBV(X).$implicit,pe=f.XpG(2);return C.Njj(pe.expandedToCells.add(ae))}),f.EFF(11),f.k0s()(),f.j41(12,"td")(13,"span",13),f.bIt("click",function(){const ae=C.eBV(X).$implicit,pe=f.XpG(2);return C.Njj(pe.expandedMsgCells.add(ae))}),f.EFF(14),f.k0s()()()}if(2&le){const X=_e.$implicit,se=f.XpG(2);f.R7$(2),f.JRh(f.i5U(4,9,f.bMT(3,7,X.TimeSent),"L LT")),f.R7$(4),f.JRh(X.SenderParticipantName),f.R7$(2),f.JRh(X.SenderParticipantEmail),f.R7$(2),f.Y8G("appEllipsis",!se.expandedToCells.has(X)),f.R7$(),f.SpI(" ",X.Recipients," "),f.R7$(2),f.Y8G("appEllipsis",!se.expandedMsgCells.has(X)),f.R7$(),f.SpI(" ",X.Message," ")}}function z(le,_e){1&le&&(f.j41(0,"tr")(1,"td",14),f.nrm(2,"div",15),f.k0s()())}function ie(le,_e){if(1&le&&(f.j41(0,"tr")(1,"td",16),f.EFF(2),f.nI1(3,"translate"),f.k0s()()),2&le){const X=f.XpG(2);f.R7$(2),f.SpI(" ",f.bMT(3,1,X.noDataMessage(!X.isReportAvailable))," ")}}function J(le,_e){if(1&le){const X=f.RV6();f.j41(0,"div",4)(1,"table",5)(2,"thead")(3,"tr",6)(4,"th",7),f.EFF(5),f.nI1(6,"translate"),f.k0s(),f.j41(7,"th",7),f.EFF(8),f.nI1(9,"translate"),f.k0s(),f.j41(10,"th",7),f.EFF(11),f.nI1(12,"translate"),f.k0s(),f.j41(13,"th",8),f.EFF(14),f.nI1(15,"translate"),f.k0s(),f.j41(16,"th",9),f.EFF(17),f.nI1(18,"translate"),f.k0s()()(),f.j41(19,"tbody"),f.Z7z(20,Y,15,12,"tr",null,Z),f.nVh(22,z,3,0,"tr"),f.nI1(23,"async"),f.vZN(24,ie,4,3,"tr"),f.k0s(),f.j41(25,"tfoot")(26,"tr")(27,"td",10)(28,"app-paging",11),f.nI1(29,"async"),f.nI1(30,"async"),f.nI1(31,"async"),f.bIt("pageChanged",function(ae){C.eBV(X);const pe=f.XpG();return C.Njj(pe.pager.pageChanged(ae))})("itemsPerPageChanged",function(ae){C.eBV(X);const pe=f.XpG();return C.Njj(pe.onPageSizeChange(ae))}),f.k0s()()()()()()}if(2&le){const X=f.XpG();f.R7$(5),f.JRh(f.bMT(6,10,"_i18n.ReportsDate")),f.R7$(3),f.JRh(f.bMT(9,12,"_i18n.FromWho")),f.R7$(3),f.JRh(f.bMT(12,14,"_i18n.Email")),f.R7$(3),f.JRh(f.bMT(15,16,"_i18n.ToWhom")),f.R7$(3),f.JRh(f.bMT(18,18,"_i18n.ReportsMessage")),f.R7$(3),f.Dyx(X.messages),f.R7$(2),f.vxM(X.messages&&0!==X.messages.length||!f.bMT(23,20,X.pager.filterLoading$)||!X.isReportAvailable?X.messages&&0===X.messages.length?24:-1:22),f.R7$(6),f.Y8G("showPageSizes",!0)("currentPage",f.bMT(29,22,X.pager.currentPage$))("itemsPerPage",f.bMT(30,24,X.pager.pageSize$))("totalItems",f.bMT(31,26,X.pager.totalCount$))}}let oe=(()=>{class le{localStorageService=(0,C.WQX)(N.sj);cd=(0,C.WQX)(y.gRc);dataSource=(0,C.WQX)(B);route=(0,C.WQX)(c.nX);router=(0,C.WQX)(c.Ix);destroy$=(0,C.WQX)(C.abz);fileDownloadService=(0,C.WQX)(m.y);modalService=(0,C.WQX)(T.B);chatId=null;parameters$=new o.t(null);pager;messages;searchText=new A.MJ("");filter=new A.gE({dateRange:new A.MJ(new I.J,{nonNullable:!0})});expandedMsgCells=new Set;expandedToCells=new Set;
1get isReportAvailable(){return this.route.snapshot.data.reportsAvailable}get parameters(){const{dateRange:X}=this.filter.value;return{...X.value,search:this.searchText.value??"",chatId:this.chatId,canViewReport:this.isReportAvailable}}constructor(){const X=this.parameters$.pipe((0,L.T)(se=>new D(this.dataSource,se)));this.pager=new K.f(this.destroy$,X,void 0,this.getStoredPageSize()),this.pager.pagedItems$.pipe((0,R.pQ)(this.destroy$)).subscribe({next:se=>{this.updateItems(se)},error:se=>this.modalService.error(se)}),this.route.queryParams.pipe((0,R.pQ)(this.destroy$)).subscribe(se=>{se.chatId&&(this.chatId=se.chatId)})}updateItems(X){this.messages=X.value??[],this.cd.markForCheck()}getStoredPageSize(){const X=this.localStorageService.retrieve(G.Hh.ReportPageSize);return X?+X:F.n}onPageSizeChange(X){this.localStorageService.store(G.Hh.ReportPageSize,X),this.pager.pageSizeChanged(X)}submitFilter(){this.parameters$.next(this.parameters)}downloadCsv(){this.fileDownloadService.download(this.dataSource.generateCSVDownloadLink(this.parameters))}back(){this.router.navigate([],{queryParams:{messagesFilter:null,chatId:null},queryParamsHandling:"merge"})}noDataMessage=n.Ns;static \u0275fac=function(se){return new(se||le)};static \u0275cmp=f.VBU({type:le,selectors:[["app-messages"]],features:[f.Jv_([B])],decls:5,vars:6,consts:[["header","_i18n.Messages",3,"back","helpUrl"],["header","",3,"exportClicked","disabled"],["top-bar","","queryParameter","messagesFilter",3,"filterChanged","filterForm","search","formGroup"],["formControlName","dateRange"],[1,"h-100","scrollable-table"],["id","scrollableList"],[1,"table-header"],[1,"col-size-200"],[1,"col-size-300"],[1,"w-lg-50"],["colspan","13"],[3,"pageChanged","itemsPerPageChanged","showPageSizes","currentPage","itemsPerPage","totalItems"],[1,"text-lg-nowrap"],[3,"click","appEllipsis"],["colspan","5"],[1,"loader"],["colspan","5",1,"text-center"]],template:function(se,ae){1&se&&(f.j41(0,"app-page",0),f.bIt("back",function(){return ae.back()}),f.j41(1,"app-report-action-buttons",1),f.bIt("exportClicked",function(){return ae.downloadCsv()}),f.k0s(),f.j41(2,"app-complex-filter",2),f.bIt("filterChanged",function(){return ae.submitFilter()}),f.nrm(3,"app-date-range-filter",3),f.k0s(),f.nVh(4,J,32,28,"div",4),f.k0s()),2&se&&(f.Y8G("helpUrl","_i18n.ReportsUri"),f.R7$(),f.Y8G("disabled",!ae.isReportAvailable),f.R7$(),f.Y8G("filterForm",ae.filter)("search",ae.searchText)("formGroup",ae.filter),f.R7$(2),f.vxM(ae.chatId?4:-1))},dependencies:[j.H,v.n,i.M,A.X1,A.BC,A.cb,A.j4,A.JD,r.B,Q.J,q.u4,V.a,W.h,w.D9,U.Jj],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}']})}return le})(),ne=(()=>{class le{static \u0275fac=function(se){return new(se||le)};static \u0275cmp=f.VBU({type:le,selectors:[["app-message-solid-icon"],["","app-message-solid-icon",""]],decls:2,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 512 512"],["d","M64 0C28.7 0 0 28.7 0 64V352c0 35.3 28.7 64 64 64h96v80c0 6.1 3.4 11.6 8.8 14.3s11.9 2.1 16.8-1.5L309.3 416H448c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64H64z"]],template:function(se,ae){1&se&&(C.qSk(),f.rj2(0,"svg",0),f.Hgh(1,"path",1),f.eux())},encapsulation:2})}return le})();var re=t(78713),me=t(91382),ee=t(45764);class ue{dataSource;callsParameters;constructor(_e,X){this.dataSource=_e,this.callsParameters=X}resolveData(_e,X,se,ae){if(!this.callsParameters||!this.callsParameters.canViewReport)return(0,n.BY)();const pe=_e-1;return this.dataSource.requestChatHistory(this.callsParameters,pe,X+1,pe*X).pipe((0,L.T)(ge=>(0,n.ro)(_e,X,ge.value)))}}function de(le,_e){1&le&&f.nrm(0,"app-messages")}function Te(le,_e){if(1&le&&(f.j41(0,"tr")(1,"td",14),f.EFF(2),f.nI1(3,"appJsDateFormat"),f.nI1(4,"emptyValue"),f.k0s(),f.j41(5,"td",14),f.EFF(6),f.nI1(7,"emptyValue"),f.k0s(),f.j41(8,"td"),f.EFF(9),f.nI1(10,"emptyValue"),f.k0s(),f.j41(11,"td"),f.EFF(12),f.nI1(13,"emptyValue"),f.k0s(),f.j41(14,"td",15),f.EFF(15),f.nI1(16,"translate"),f.k0s(),f.j41(17,"td"),f.nrm(18,"button",16),f.k0s()()),2&le){const X=_e.$implicit,se=f.XpG();f.R7$(2),f.JRh(f.bMT(4,8,f.bMT(3,6,X.TimeSent))),f.R7$(4),f.JRh(f.bMT(7,10,X.FromName)),f.R7$(3),f.JRh(f.bMT(10,12,X.ParticipantEmail)),f.R7$(3),f.JRh(f.bMT(13,14,X.ChatName)),f.R7$(3),f.JRh(X.Source??f.bMT(16,16,"_i18n.ReportsCallAreaTypeInternal")),f.R7$(3),f.Y8G("queryParams",se.generateQueryParamsForMessages(X))}}function $e(le,_e){1&le&&(f.j41(0,"tr")(1,"td",12),f.nrm(2,"div",17),f.k0s()())}function Oe(le,_e){if(1&le&&(f.j41(0,"tr")(1,"td",18),f.EFF(2),f.nI1(3,"translate"),f.k0s()()),2&le){const X=f.XpG();f.R7$(2),f.SpI(" ",f.bMT(3,1,X.noDataMessage(!X.isReportAvailable))," ")}}function Ee(){return new A.gE({dateRange:new A.MJ(new I.J,{nonNullable:!0}),from:new A.MJ(new P.kK("from","_i18n.FromWho"),{nonNullable:!0}),to:new A.MJ(new P.kK("to","_i18n.ToWhom"),{nonNullable:!0}),participantType:new A.MJ(new u.vO,{nonNullable:!0})})}function xe(le,_e,X=!0){const{dateRange:se,from:ae,to:pe,participantType:ge}=le;return{...se.value,...ge.value,from:ae.value,to:pe.value,search:_e,canViewReport:X}}let Ae=(()=>{class le{localStorageService=(0,C.WQX)(N.sj);cd=(0,C.WQX)(y.gRc);dataSource=(0,C.WQX)(S.Z);router=(0,C.WQX)(c.Ix);route=(0,C.WQX)(c.nX);modalService=(0,C.WQX)(T.B);destroy$=(0,C.WQX)(C.abz);fileDownloadService=(0,C.WQX)(m.y);chatId$;parameters$=new o.t(null);searchText=new A.MJ(null);filter=Ee();pager;chats;allowedFromTypes=[P.V5.Any,P.V5.User,P.V5.NumberContains];allowedToTypes=[P.V5.Any,P.V5.User,P.V5.Queue,P.V5.RingGroup,P.V5.NumberContains];scheduledReportType=b.G.ChatLogs;appliedFilter;
1get isReportAvailable(){return this.route.snapshot.data.reportsAvailable}get parameters(){return xe(this.filter.value,this.searchText.value,this.isReportAvailable)}constructor(){this.chatId$=this.route.queryParams.pipe((0,L.T)(({chatId:ae})=>"string"==typeof ae?ae:null),(0,H.F)());const se=this.parameters$.pipe((0,L.T)(ae=>new ue(this.dataSource,ae)));this.pager=new K.f(this.destroy$,se,void 0,this.getStoredPageSize()),this.pager.pagedItems$.pipe((0,R.pQ)(this.destroy$)).subscribe({next:ae=>{this.updateItems(ae)},error:ae=>this.modalService.error(ae)})}updateItems(X){this.chats=X.value??[],this.cd.markForCheck()}onPageSizeChange(X){this.localStorageService.store(G.Hh.ReportPageSize,X),this.pager.pageSizeChanged(X)}getStoredPageSize(){const X=this.localStorageService.retrieve(G.Hh.ReportPageSize);return X?+X:F.n}generateQueryParamsForMessages(X){const{periodType:se,periodFromTo:ae}=this.appliedFilter.serializedFilter;return{chatId:X.ConversationId,messagesFilter:JSON.stringify({search:"",periodType:se,periodFromTo:ae})}}submitFilter(X){this.parameters$.next(this.parameters),this.appliedFilter=X}back(){this.router.navigate([".."],{relativeTo:this.route}).catch(g.l)}downloadCsv(){this.fileDownloadService.download(this.dataSource.generateCSVDownloadLink(this.parameters))}onSaveReport(X){(0,me.J)(this.modalService,this.scheduledReportType,X,this.dataSource.generateReportParams(this.parameters))}noDataMessage=n.Ns;static \u0275fac=function(se){return new(se||le)};static \u0275cmp=f.VBU({type:le,selectors:[["ng-component"]],features:[f.Jv_([S.Z])],decls:43,vars:45,consts:[["header","_i18n.ChatLog",3,"back","helpUrl"],["header","",3,"exportClicked","showReportPrint","disabled"],["top-bar","",3,"filterChanged","saveReport","filterForm","search","formGroup","reportType","disabled"],["formControlName","dateRange"],["formControlName","from",3,"allowedTypes"],["formControlName","to",3,"allowedTypes"],["formControlName","participantType"],[1,"h-100","scrollable-table"],["id","scrollableList"],[1,"table-header"],[1,"col-size-150"],[1,"actions"],["colspan","6"],[3,"pageChanged","itemsPerPageChanged","showPageSizes","currentPage","itemsPerPage","totalItems"],[1,"text-md-nowrap"],["nowrap",""],["type","button","routerLink","/office/reports/chats","queryParamsHandling","merge","app-message-solid-icon","",1,"btn","btn-plain",3,"queryParams"],[1,"loader"],["colspan","6",1,"text-center"]],template:function(se,ae){1&se&&(f.nVh(0,de,1,0,"app-messages"),f.nI1(1,"async"),f.j41(2,"app-page",0),f.nI1(3,"async"),f.bIt("back",function(){return ae.back()}),f.j41(4,"app-report-action-buttons",1),f.bIt("exportClicked",function(){return ae.downloadCsv()}),f.k0s(),f.j41(5,"app-complex-filter",2),f.bIt("filterChanged",function(ge){return ae.submitFilter(ge)})("saveReport",function(ge){return ae.onSaveReport(ge)}),f.nrm(6,"app-date-range-filter",3)(7,"app-source-or-destination-filter",4)(8,"app-source-or-destination-filter",5)(9,"app-chat-participant-type-filter",6),f.k0s(),f.j41(10,"div",7)(11,"table",8)(12,"thead")(13,"tr",9)(14,"th"),f.EFF(15),f.nI1(16,"translate"),f.k0s(),f.j41(17,"th"),f.EFF(18),f.nI1(19,"translate"),f.k0s(),f.j41(20,"th"),f.EFF(21),f.nI1(22,"translate"),f.k0s(),f.j41(23,"th"),f.EFF(24),f.nI1(25,"translate"),f.k0s(),f.j41(26,"th",10),f.EFF(27),f.nI1(28,"translate"),f.k0s(),f.nrm(29,"th",11),f.k0s()(),f.j41(30,"tbody"),f.Z7z(31,Te,19,18,"tr",null,f.fX1),f.nVh(33,$e,3,0,"tr"),f.nI1(34,"async"),f.vZN(35,Oe,4,3,"tr"),f.k0s(),f.j41(36,"tfoot")(37,"tr")(38,"td",12)(39,"app-paging",13),f.nI1(40,"async"),f.nI1(41,"async"),f.nI1(42,"async"),f.bIt("pageChanged",function(ge){return ae.pager.pageChanged(ge)})("itemsPerPageChanged",function(ge){return ae.onPageSizeChange(ge)}),f.k0s()()()()()()()),2&se&&(f.vxM(f.bMT(1,23,ae.chatId$)?0:-1),f.R7$(2),f.AVh("hidden",f.bMT(3,25,ae.chatId$)),f.Y8G("helpUrl","_i18n.ReportsUri"),f.R7$(2),f.Y8G("showReportPrint",!0)("disabled",!ae.isReportAvailable),f.R7$(),f.Y8G("filterForm",ae.filter)("search",ae.searchText)("formGroup",ae.filter)("reportType",ae.scheduledReportType)("disabled",!ae.isReportAvailable),f.R7$(2),f.Y8G("allowedTypes",ae.allowedFromTypes),f.R7$(),f.Y8G("allowedTypes",ae.allowedToTypes),f.R7$(7),f.JRh(f.bMT(16,27,"_i18n.ReportsDate")),f.R7$(3),f.JRh(f.bMT(19,29,"_i18n.FromWho")),f.R7$(3),f.JRh(f.bMT(22,31,"_i18n.Email")),f.R7$(3),f.JRh(f.bMT(25,33,"_i18n.ToWhom")),f.R7$(3),f.JRh(f.bMT(28,35,"_i18n.Type")),f.R7$(4),f.Dyx(ae.chats),f.R7$(2),f.vxM(ae.chats&&0!==ae.chats.length||!f.bMT(34,37,ae.pager.filterLoading$)||!ae.isReportAvailable?ae.chats&&0===ae.chats.length?35:-1:33),f.R7$(6),f.Y8G("showPageSizes",!0)("currentPage",f.bMT(40,39,ae.pager.currentPage$))("itemsPerPage",f.bMT(41,41,ae.pager.pageSize$))("totalItems",f.bMT(42,43,ae.pager.totalCount$)))},dependencies:[oe,j.H,v.n,i.M,A.X1,A.BC,A.cb,A.j4,A.JD,r.B,a.C,M,p.Wk,ne,q.u4,w.D9,U.Jj,ee.N,re.vE],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}',"app-page.hidden[_ngcontent-%COMP%]{overflow:hidden;height:0}"]})}return le})()},90393(te,k,t){t.d(k,{Z:()=>r});
1var C=t(25558),y=t(7673),A=t(96354),o=t(97201),g=t(4499),c=t(35547),p=t(85802);let b=(()=>{class T extends g.d{downloadChatLog(u,_="body"){const d=u?.clientTimeZone;if(null==d)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadChatLog.");const $=u?.periodFrom;if(null==$)throw new Error("Required parameter periodFrom was null or undefined when calling downloadChatLog.");const w=u?.periodTo;if(null==w)throw new Error("Required parameter periodTo was null or undefined when calling downloadChatLog.");const R=u?.fromType;if(null==R)throw new Error("Required parameter fromType was null or undefined when calling downloadChatLog.");const f=u?.fromExtension;if(null==f)throw new Error("Required parameter fromExtension was null or undefined when calling downloadChatLog.");const O=u?.fromText;if(null==O)throw new Error("Required parameter fromText was null or undefined when calling downloadChatLog.");const M=u?.toType;if(null==M)throw new Error("Required parameter toType was null or undefined when calling downloadChatLog.");const m=u?.toExtension;if(null==m)throw new Error("Required parameter toExtension was null or undefined when calling downloadChatLog.");const P=u?.toText;if(null==P)throw new Error("Required parameter toText was null or undefined when calling downloadChatLog.");const a=u?.chatType;if(null==a)throw new Error("Required parameter chatType was null or undefined when calling downloadChatLog.");const l=u?.participantType;if(null==l)throw new Error("Required parameter participantType was null or undefined when calling downloadChatLog.");const e=u?.$top,s=u?.$skip,h=u?.$search,x=u?.$filter,E=u?.$count,B=u?.$select,j=u?.$orderby,v=u?.$expand;let Q=new o.rx(this.encoder);Q=this.addToHttpParams(Q,"$top",e,o.l2.Form,!1),Q=this.addToHttpParams(Q,"$skip",s,o.l2.Form,!1),Q=this.addToHttpParams(Q,"$search",h,o.l2.Form,!1),Q=this.addToHttpParams(Q,"$filter",x,o.l2.Form,!1),Q=this.addToHttpParams(Q,"$count",E,o.l2.Form,!1),Q=this.addToHttpParams(Q,"$select",B,o.l2.Form,!1),Q=this.addToHttpParams(Q,"$orderby",j,o.l2.Form,!1),Q=this.addToHttpParams(Q,"$expand",v,o.l2.Form,!1);let V=this.defaultHeaders;V=this.configuration.addCredentialToHeaders("Application","Authorization",V,"Bearer ");const W=this.configuration.selectHeaderAccept(["application/json"]);void 0!==W&&(V=V.set("Accept",W));let U="json";W&&(U=W.startsWith("text")?"text":this.configuration.isJsonMime(W)?"json":"blob");let K=`/ReportChatLog/Pbx.DownloadChatLog(clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},fromType=${this.configuration.encodeParam({name:"fromType",value:R,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},fromExtension=${this.configuration.encodeParam({name:"fromExtension",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},fromText=${this.configuration.encodeParam({name:"fromText",value:O,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},toType=${this.configuration.encodeParam({name:"toType",value:M,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},toExtension=${this.configuration.encodeParam({name:"toExtension",value:m,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},toText=${this.configuration.encodeParam({name:"toText",value:P,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},chatType=${this.configuration.encodeParam({name:"chatType",value:a,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},participantType=${this.configuration.encodeParam({name:"participantType",value:l,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:D,withCredentials:q}=this.configuration;return this.httpClient.request("get",`${D}${K}`,{params:Q.toHttpParams(),responseType:U,...q?{withCredentials:q}:{},headers:V,observe:_})}downloadChatLogQuery(u,_="body",d=!1,$){const w=u.clientTimeZone;if(null==w)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadChatLog.");const R=u.periodFrom;
1if(null==R)throw new Error("Required parameter periodFrom was null or undefined when calling downloadChatLog.");const f=u.periodTo;if(null==f)throw new Error("Required parameter periodTo was null or undefined when calling downloadChatLog.");const O=u.fromType;if(null==O)throw new Error("Required parameter fromType was null or undefined when calling downloadChatLog.");const M=u.fromExtension;if(null==M)throw new Error("Required parameter fromExtension was null or undefined when calling downloadChatLog.");const m=u.fromText;if(null==m)throw new Error("Required parameter fromText was null or undefined when calling downloadChatLog.");const P=u.toType;if(null==P)throw new Error("Required parameter toType was null or undefined when calling downloadChatLog.");const a=u.toExtension;if(null==a)throw new Error("Required parameter toExtension was null or undefined when calling downloadChatLog.");const l=u.toText;if(null==l)throw new Error("Required parameter toText was null or undefined when calling downloadChatLog.");const e=u.chatType;if(null==e)throw new Error("Required parameter chatType was null or undefined when calling downloadChatLog.");const s=u.participantType;if(null==s)throw new Error("Required parameter participantType was null or undefined when calling downloadChatLog.");const h=u.$top,x=u.$skip,E=u.$search,B=u.$filter,j=u.$count,v=u.$select,Q=u.$orderby,V=u.$expand;let W=new o.rx(this.encoder);return W=this.addToHttpParams(W,"$top",h,o.l2.Form,!1),W=this.addToHttpParams(W,"$skip",x,o.l2.Form,!1),W=this.addToHttpParams(W,"$search",E,o.l2.Form,!1),W=this.addToHttpParams(W,"$filter",B,o.l2.Form,!1),W=this.addToHttpParams(W,"$count",j,o.l2.Form,!1),W=this.addToHttpParams(W,"$select",v,o.l2.Form,!1),W=this.addToHttpParams(W,"$orderby",Q,o.l2.Form,!1),W=this.addToHttpParams(W,"$expand",V,o.l2.Form,!1),`/ReportChatLog/Pbx.DownloadChatLog(clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},fromType=${this.configuration.encodeParam({name:"fromType",value:O,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},fromExtension=${this.configuration.encodeParam({name:"fromExtension",value:M,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},fromText=${this.configuration.encodeParam({name:"fromText",value:m,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},toType=${this.configuration.encodeParam({name:"toType",value:P,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},toExtension=${this.configuration.encodeParam({name:"toExtension",value:a,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},toText=${this.configuration.encodeParam({name:"toText",value:l,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},chatType=${this.configuration.encodeParam({name:"chatType",value:e,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},participantType=${this.configuration.encodeParam({name:"participantType",value:s,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})?`+W.toString()}getChatLog(u,_="body"){const d=u?.periodFrom;if(null==d)throw new Error("Required parameter periodFrom was null or undefined when calling getChatLog.");const $=u?.periodTo;if(null==$)throw new Error("Required parameter periodTo was null or undefined when calling getChatLog.");const w=u?.fromType;if(null==w)throw new Error("Required parameter fromType was null or undefined when calling getChatLog.");const R=u?.fromExtension;if(null==R)throw new Error("Required parameter fromExtension was null or undefined when calling getChatLog.");const f=u?.fromText;if(null==f)throw new Error("Required parameter fromText was null or undefined when calling getChatLog.");const O=u?.toType;if(null==O)throw new Error("Required parameter toType was null or undefined when calling getChatLog.");const M=u?.toExtension;if(null==M)throw new Error("Required parameter toExtension was null or undefined when calling getChatLog.");const m=u?.toText;if(null==m)throw new Error("Required parameter toText was null or undefined when calling getChatLog.");const P=u?.chatType;if(null==P)throw new Error("Required parameter chatType was null or undefined when calling getChatLog.");const a=u?.participantType;if(null==a)throw new Error("Required parameter participantType was null or undefined when calling getChatLog.");const l=u?.$top,e=u?.$skip,s=u?.$search,h=u?.$filter,x=u?.$count,E=u?.$select,B=u?.$orderby,j=u?.$expand;let v=new o.rx(this.encoder);v=this.addToHttpParams(v,"$top",l,o.l2.Form,!1),v=this.addToHttpParams(v,"$skip",e,o.l2.Form,!1),v=this.addToHttpParams(v,"$search",s,o.l2.Form,!1),v=this.addToHttpParams(v,"$filter",h,o.l2.Form,!1),v=this.addToHttpParams(v,"$count",x,o.l2.Form,!1),v=this.addToHttpParams(v,"$select",E,o.l2.Form,!1),v=this.addToHttpParams(v,"$orderby",B,o.l2.Form,!1),v=this.addToHttpParams(v,"$expand",j,o.l2.Form,!1);let Q=this.defaultHeaders;Q=this.configuration.addCredentialToHeaders("Application","Authorization",Q,"Bearer ");const V=this.configuration.selectHeaderAccept(["application/json"]);void 0!==V&&(Q=Q.set("Accept",V));let W="json";V&&(W=V.startsWith("text")?"text":this.configuration.isJsonMime(V)?"json":"blob");let U=`/ReportChatLog/Pbx.GetChatLog(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},fromType=${this.configuration.encodeParam({name:"fromType",value:w,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},fromExtension=${this.configuration.encodeParam({name:"fromExtension",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},fromText=${this.configuration.encodeParam({name:"fromText",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},toType=${this.configuration.encodeParam({name:"toType",value:O,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},toExtension=${this.configuration.encodeParam({name:"toExtension",value:M,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},toText=${this.configuration.encodeParam({name:"toText",value:m,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},chatType=${this.configuration.encodeParam({name:"chatType",value:P,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},participantType=${this.configuration.encodeParam({name:"participantType",value:a,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:K,withCredentials:D}=this.configuration;return this.httpClient.request("get",`${K}${U}`,{params:v.toHttpParams(),responseType:W,...D?{withCredentials:D}:{},headers:Q,observe:_})}getChatLogQuery(u,_="body",d=!1,$){const w=u.periodFrom;
1if(null==w)throw new Error("Required parameter periodFrom was null or undefined when calling getChatLog.");const R=u.periodTo;if(null==R)throw new Error("Required parameter periodTo was null or undefined when calling getChatLog.");const f=u.fromType;if(null==f)throw new Error("Required parameter fromType was null or undefined when calling getChatLog.");const O=u.fromExtension;if(null==O)throw new Error("Required parameter fromExtension was null or undefined when calling getChatLog.");const M=u.fromText;if(null==M)throw new Error("Required parameter fromText was null or undefined when calling getChatLog.");const m=u.toType;if(null==m)throw new Error("Required parameter toType was null or undefined when calling getChatLog.");const P=u.toExtension;if(null==P)throw new Error("Required parameter toExtension was null or undefined when calling getChatLog.");const a=u.toText;if(null==a)throw new Error("Required parameter toText was null or undefined when calling getChatLog.");const l=u.chatType;if(null==l)throw new Error("Required parameter chatType was null or undefined when calling getChatLog.");const e=u.participantType;if(null==e)throw new Error("Required parameter participantType was null or undefined when calling getChatLog.");const s=u.$top,h=u.$skip,x=u.$search,E=u.$filter,B=u.$count,j=u.$select,v=u.$orderby,Q=u.$expand;let V=new o.rx(this.encoder);return V=this.addToHttpParams(V,"$top",s,o.l2.Form,!1),V=this.addToHttpParams(V,"$skip",h,o.l2.Form,!1),V=this.addToHttpParams(V,"$search",x,o.l2.Form,!1),V=this.addToHttpParams(V,"$filter",E,o.l2.Form,!1),V=this.addToHttpParams(V,"$count",B,o.l2.Form,!1),V=this.addToHttpParams(V,"$select",j,o.l2.Form,!1),V=this.addToHttpParams(V,"$orderby",v,o.l2.Form,!1),V=this.addToHttpParams(V,"$expand",Q,o.l2.Form,!1),`/ReportChatLog/Pbx.GetChatLog(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},fromType=${this.configuration.encodeParam({name:"fromType",value:f,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},fromExtension=${this.configuration.encodeParam({name:"fromExtension",value:O,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},fromText=${this.configuration.encodeParam({name:"fromText",value:M,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},toType=${this.configuration.encodeParam({name:"toType",value:m,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},toExtension=${this.configuration.encodeParam({name:"toExtension",value:P,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},toText=${this.configuration.encodeParam({name:"toText",value:a,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},chatType=${this.configuration.encodeParam({name:"chatType",value:l,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},participantType=${this.configuration.encodeParam({name:"participantType",value:e,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})?`+V.toString()}static \u0275fac=(()=>{let u;return function(d){return(u||(u=c.xGo(T)))(d||T)}})();static \u0275prov=p.jDH({token:T,factory:T.\u0275fac,providedIn:"root"})}return T})();var L=t(38357),H=t(31266),S=t(82286),I=t(44443),i=t(96794);let r=(()=>{class T{reportChatLogApiService=(0,p.WQX)(b);dataFetcher=(u,_)=>u.canViewReport?d=>d.pipe((0,C.n)($=>this.requestChatHistory(u,$,_)),(0,A.T)($=>$.value)):d=>d.pipe((0,C.n)(()=>(0,y.of)([])));requestChatHistory(u,_,d,$){return this.reportChatLogApiService.getChatLog({$skip:$??_*d,$top:d,...(0,i.Rx)(u),fromType:u.from.type??H.V5.Any,fromExtension:this.extractFirstExtension(u.from)??"",fromText:u.from.text??"",toType:u.to.type??H.V5.Any,toExtension:this.extractFirstExtension(u.to)??"",toText:u.to.text??"",chatType:u.chatType??I.He.All,participantType:u.participantType??S.yJ.All,$search:(0,L.Bj)(u.search?.toLowerCase())})}generateCSVDownloadLink(u){return this.reportChatLogApiService.downloadChatLogQuery({...(0,i.Rx)(u),fromType:u.from.type??H.V5.Any,fromExtension:this.extractFirstExtension(u.from)??"",fromText:u.from.text??"",toType:u.to.type??H.V5.Any,toExtension:this.extractFirstExtension(u.to)??"",toText:u.to.text??"",chatType:u.chatType??I.He.All,participantType:u.participantType??S.yJ.All,$search:(0,L.Bj)(u.search?.toLowerCase()),clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})}generateReportParams(u){return JSON.stringify({ClientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,PeriodFrom:u.periodFromTo[0],Perio
1dTo:u.periodFromTo[1],DateRangeType:u.periodType,FirstDayOfWeek:u.firstWeekDay,FromType:u.from.type??H.V5.Any,FromExtension:this.extractFirstExtension(u.from)??"",FromText:u.from.text??"",ToType:u.to.type??H.V5.Any,ToExtension:this.extractFirstExtension(u.to)??"",ToText:u.to.text??"",ChatType:u.chatType??I.He.All,ParticipantType:u.participantType??S.yJ.All,Search:(u.search??"").trim().toLowerCase()})}extractFirstExtension(u){return u.extension?.[0]?.Number}static \u0275fac=function(_){return new(_||T)};static \u0275prov=p.jDH({token:T,factory:T.\u0275fac})}return T})()},45764(te,k,t){t.d(k,{N:()=>g,Y:()=>o});var C=t(67374),y=t.n(C),A=t(35547);const o=(c,p)=>c?y()(c).tz(y().tz.guess()).format(void 0!==p?p:"L LTS"):"";let g=(()=>{class c{transform(b,L="L LTS"){return o(b,L)}static \u0275fac=function(L){return new(L||c)};static \u0275pipe=A.EJ8({name:"appJsDateFormat",type:c,pure:!0})}return c})()},60175(te,k,t){t.d(k,{Q:()=>A,z:()=>y});var C=t(35547);function y(o){return null==o?"":o.toLocaleString(void 0,{maximumFractionDigits:2,minimumFractionDigits:2})}let A=(()=>{class o{transform(c){return y(c)}static \u0275fac=function(p){return new(p||o)};static \u0275pipe=C.EJ8({name:"decimal",type:o,pure:!0})}return o})()},72937(te,k,t){t.d(k,{Q:()=>T});var C=t(68018),y=t(96704),A=t(54245),o=t(54327),g=t(78713),c=t(35547);const p=[[["app-report-print-header"]]],b=["app-report-print-header"];function L(n,u){1&n&&(c.rj2(0,"tr")(1,"td",1),c.SdG(2),c.eux()())}function H(n,u){if(1&n&&(c.rj2(0,"tr")(1,"td",2),c.EFF(2),c.nI1(3,"emptyValue"),c.eux(),c.rj2(4,"td"),c.EFF(5),c.eux(),c.rj2(6,"td"),c.EFF(7),c.eux(),c.rj2(8,"td"),c.EFF(9),c.eux(),c.rj2(10,"td"),c.EFF(11),c.nI1(12,"percentOf"),c.eux(),c.rj2(13,"td"),c.EFF(14),c.eux(),c.rj2(15,"td"),c.EFF(16),c.nI1(17,"duration"),c.eux(),c.rj2(18,"td"),c.EFF(19),c.nI1(20,"duration"),c.eux()()),2&n){const _=u.$implicit,d=c.XpG(2);c.AVh("print",d.print),c.R7$(2),c.JRh(c.bMT(3,10,_.QueueDn)),c.R7$(3),c.JRh(_.CallsCount??0),c.R7$(2),c.JRh((_.CallsCount??0)-(_.AnsweredCount??0)),c.R7$(2),c.JRh(_.AnsweredCount??0),c.R7$(2),c.JRh(c.i5U(12,12,_.AnsweredCount??0,_.CallsCount??0)),c.R7$(3),c.JRh(_.CallbacksCount??0),c.R7$(2),c.JRh(c.bMT(17,15,_.TalkTime??0)),c.R7$(3),c.JRh(c.bMT(20,17,_.AvgTalkTime??0))}}function S(n,u){1&n&&(c.rj2(0,"tr")(1,"td",1),c.Hgh(2,"div",3),c.eux()())}function I(n,u){if(1&n&&(c.rj2(0,"tr")(1,"td",4),c.EFF(2),c.nI1(3,"translate"),c.eux()()),2&n){const _=c.XpG(2);c.R7$(2),c.SpI(" ",c.bMT(3,1,_.noDataMessage(_.licenseRestrictions))," ")}}function i(n,u){1&n&&(c.rj2(0,"tfoot")(1,"tr")(2,"td",1),c.EFF(3,"3CX Ltd."),c.eux()()())}function r(n,u){if(1&n&&(c.rj2(0,"table")(1,"thead"),c.nVh(2,L,3,0,"tr"),c.rj2(3,"tr")(4,"th"),c.EFF(5),c.nI1(6,"translate"),c.eux(),c.rj2(7,"th"),c.EFF(8),c.nI1(9,"translate"),c.eux(),c.rj2(10,"th"),c.EFF(11),c.nI1(12,"translate"),c.eux(),c.rj2(13,"th"),c.EFF(14),c.nI1(15,"translate"),c.eux(),c.rj2(16,"th"),c.EFF(17),c.nI1(18,"translate"),c.eux(),c.rj2(19,"th"),c.EFF(20),c.nI1(21,"translate"),c.eux(),c.rj2(22,"th"),c.EFF(23),c.nI1(24,"translate"),c.eux(),c.rj2(25,"th"),c.EFF(26),c.nI1(27,"translate"),c.eux()()(),c.rj2(28,"tbody"),c.Z7z(29,H,21,19,"tr",0,c.fX1),c.nVh(31,S,3,0,"tr")(32,I,4,3,"tr"),c.eux(),c.nVh(33,i,4,0,"tfoot"),c.eux()),2&n){const _=c.XpG();c.AVh("print",_.print),c.R7$(2),c.vxM(_.print?2:-1),c.R7$(),c.AVh("table-header",!_.print)("print",_.print),c.R7$(2),c.JRh(c.bMT(6,17,"_i18n.ReportsQueue")),c.R7$(3),c.JRh(c.bMT(9,19,"_i18n.TotalCalls")),c.R7$(3),c.JRh(c.bMT(12,21,"_i18n.AbandonedCalls")),c.R7$(3),c.JRh(c.bMT(15,23,"_i18n.AnsweredCalls")),c.R7$(3),c.JRh(c.bMT(18,25,"_i18n.ReportsPercentCallsServiced")),c.R7$(3),c.JRh(c.bMT(21,27,"_i18n.ServicedCallbacks")),c.R7$(3),c.JRh(c.bMT(24,29,"_i18n.ReportsTotalTalking")),c.R7$(3),c.JRh(c.bMT(27,31,"_i18n.ReportsMeanTalking")),c.R7$(3),c.Dyx(_.paginator.data),c.R7$(2),c.vxM(_.paginator.hasMore?31:_.paginator.isLoading||_.paginator.data.length?-1:32),c.R7$(2),c.vxM(_.print?33:-1)}}let T=(()=>{class n{paginator;print;licenseRestrictions;noDataMessage=o.Ns;formatAndJoinValues=o.pk;static \u0275fac=function(d){return new(d||n)};static \u0275cmp=c.VBU({type:n,selectors:[["app-detailed-queue-statistics-table"]],inputs:{paginator:"paginator",print:"print",licenseRestrictions:"licenseRestrictions"},ngContentSelectors:b,decls:1,vars:1,consts:[[3,"print"],["colspan","8"],[1,"text-md-nowrap"],[1,"loader"],["colspan","8",1,"text-center"]],template:function(d,$){1&d&&(c.NAR(p),c.nVh(0,r,34,33,"table",0)),2&d&&c.vxM($.paginator?0:-1)},dependencies:[C.D9,y.bB,A.P,g.vE],encapsulation:2,changeDetection:0})}return n})()},12168(te,k,t){t.d(k,{Mw:()=>l,bQ:()=>a,lE:()=>P});
1var C=t(85802),y=t(84412),A=t(85343),o=t(89417),g=t(59882),c=t(32663),p=t(79213),b=t(79997),L=t(96354),H=t(38601),S=t(48643),I=t(62329),i=t(71747),r=t(74651),T=t(83188),n=t(59625),u=t(74005),_=t(76415),d=t(36715),$=t(22429),w=t(72937),R=t(49769),f=t(91382),O=t(62653),M=t(89755),m=t(35547);function P(){return new o.gE({dateRange:new o.MJ(new I.J,{nonNullable:!0}),pbxPeers:new o.MJ(new O.X("_i18n.ReportsQueues","queue","pbxPeers",[i.J.Queue],{pbxPeers:null},"_i18n.Any",!0),{nonNullable:!0}),interval:new o.MJ(new p.V("_i18n.ReportsExcludeCallsDroppedBefore"),{nonNullable:!0})})}function a(e,s=!0){const{dateRange:h,pbxPeers:x,interval:E}=e;return{...h.value,...x.value,...E.value,canViewReport:s}}let l=(()=>{class e{dataSource=(0,C.WQX)(c.s);route=(0,C.WQX)(g.nX);router=(0,C.WQX)(g.Ix);destroy$=(0,C.WQX)(C.abz);fileDownloadService=(0,C.WQX)(S.y);modalService=(0,C.WQX)(H.B);paginator$;hasMoreOrLoading$;parameters$=new y.t(null);nextPage$=new y.t(void 0);reset$=new y.t(void 0);filter=P();scheduledReportType=r.G.QueueDetailedStatistics;get isReportAvailable(){return this.route.snapshot.data.reportsAvailable}get parameters(){return a(this.filter.value,this.isReportAvailable)}constructor(){this.paginator$=(0,b.K)(this.modalService,this.destroy$,this.parameters$,this.nextPage$,this.reset$,this.dataSource.dataFetcher,100),this.hasMoreOrLoading$=this.paginator$.pipe((0,L.T)(h=>!h.hasMore||h.isLoading))}submitFilter(){this.parameters$.next(this.parameters)}downloadCsv(){this.fileDownloadService.download(this.dataSource.generateCSVDownloadLink(this.parameters))}onSaveReport(h){(0,f.J)(this.modalService,this.scheduledReportType,h,this.dataSource.generateReportParams(this.parameters))}back(){this.router.navigate([".."],{relativeTo:this.route}).catch(A.l)}static \u0275fac=function(x){return new(x||e)};static \u0275cmp=m.VBU({type:e,selectors:[["ng-component"]],features:[m.Jv_([c.s])],decls:11,vars:17,consts:[["header","_i18n.DetailedQueueStatistics",3,"back","helpUrl"],["header","",3,"exportClicked","showReportPrint","disabled"],["top-bar","",3,"filterChanged","saveReport","filterForm","formGroup","reportType","disabled"],["formControlName","dateRange"],["formControlName","pbxPeers","placeholder","_i18n.Any",3,"allowEmpty"],["formControlName","interval"],["id","scrollableList",1,"h-100","scrollable-table"],["infiniteScroll","",3,"infiniteScrollCallback","infiniteScrollContainer","infiniteScrollDistance","infiniteScrollDisabled"],[3,"paginator","licenseRestrictions"]],template:function(x,E){1&x&&(m.j41(0,"app-page",0),m.bIt("back",function(){return E.back()}),m.j41(1,"app-report-action-buttons",1),m.bIt("exportClicked",function(){return E.downloadCsv()}),m.k0s(),m.j41(2,"app-complex-filter",2),m.bIt("filterChanged",function(){return E.submitFilter()})("saveReport",function(j){return E.onSaveReport(j)}),m.nrm(3,"app-date-range-filter",3)(4,"app-multi-peer-filter",4)(5,"app-new-interval-filter",5),m.k0s(),m.j41(6,"div",6)(7,"div",7),m.nI1(8,"async"),m.bIt("infiniteScrollCallback",function(){return E.nextPage$.next()}),m.nrm(9,"app-detailed-queue-statistics-table",8),m.nI1(10,"async"),m.k0s()()()),2&x&&(m.Y8G("helpUrl","_i18n.ReportsUri"),m.R7$(),m.Y8G("showReportPrint",!0)("disabled",!E.isReportAvailable),m.R7$(),m.Y8G("filterForm",E.filter)("formGroup",E.filter)("reportType",E.scheduledReportType)("disabled",!E.isReportAvailable),m.R7$(2),m.Y8G("allowEmpty",!0),m.R7$(3),m.Y8G("infiniteScrollContainer","#scrollableList")("infiniteScrollDistance",1)("infiniteScrollDisabled",m.bMT(8,13,E.hasMoreOrLoading$)),m.R7$(2),m.Y8G("paginator",m.bMT(10,15,E.paginator$))("licenseRestrictions",!E.isReportAvailable))},dependencies:[T.H,n.n,u.M,o.X1,o.BC,o.cb,o.j4,o.JD,_.B,d.J,$.D,w.Q,M.b,R.Jj],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}']})}return e})()},32663(te,k,t){t.d(k,{s:()=>I});var C=t(25558),y=t(7673),A=t(96354),o=t(97201),g=t(4499),c=t(35547),p=t(85802);let b=(()=>{class i extends g.d{downloadDetailedQueueStatistics(T,n="body"){const u=T?.queueDnStr;if(null==u)throw new Error("Required parameter queueDnStr was null or undefined when calling downloadDetailedQueueStatistics.");const _=T?.startDt;if(null==_)throw new Error("Required parameter startDt was null or undefined when calling downloadDetailedQueueStatistics.");const d=T?.endDt;if(null==d)throw new Error("Required parameter endDt was null or undefined when calling downloadDetailedQueueStatistics.");const $=T?.waitInterval;if(null==$)throw new Error("Required parameter waitInterval was null or undefined when calling downloadDetailedQueueStatistics.");
1const w=T?.$top,R=T?.$skip,f=T?.$search,O=T?.$filter,M=T?.$count,m=T?.$select,P=T?.$orderby,a=T?.$expand;let l=new o.rx(this.encoder);l=this.addToHttpParams(l,"$top",w,o.l2.Form,!1),l=this.addToHttpParams(l,"$skip",R,o.l2.Form,!1),l=this.addToHttpParams(l,"$search",f,o.l2.Form,!1),l=this.addToHttpParams(l,"$filter",O,o.l2.Form,!1),l=this.addToHttpParams(l,"$count",M,o.l2.Form,!1),l=this.addToHttpParams(l,"$select",m,o.l2.Form,!1),l=this.addToHttpParams(l,"$orderby",P,o.l2.Form,!1),l=this.addToHttpParams(l,"$expand",a,o.l2.Form,!1);let e=this.defaultHeaders;e=this.configuration.addCredentialToHeaders("Application","Authorization",e,"Bearer ");const s=this.configuration.selectHeaderAccept(["application/json"]);void 0!==s&&(e=e.set("Accept",s));let h="json";s&&(h=s.startsWith("text")?"text":this.configuration.isJsonMime(s)?"json":"blob");let x=`/ReportDetailedQueueStatistics/Pbx.DownloadDetailedQueueStatistics(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:E,withCredentials:B}=this.configuration;return this.httpClient.request("get",`${E}${x}`,{params:l.toHttpParams(),responseType:h,...B?{withCredentials:B}:{},headers:e,observe:n})}downloadDetailedQueueStatisticsQuery(T,n="body",u=!1,_){const d=T.queueDnStr;if(null==d)throw new Error("Required parameter queueDnStr was null or undefined when calling downloadDetailedQueueStatistics.");const $=T.startDt;if(null==$)throw new Error("Required parameter startDt was null or undefined when calling downloadDetailedQueueStatistics.");const w=T.endDt;if(null==w)throw new Error("Required parameter endDt was null or undefined when calling downloadDetailedQueueStatistics.");const R=T.waitInterval;if(null==R)throw new Error("Required parameter waitInterval was null or undefined when calling downloadDetailedQueueStatistics.");const f=T.$top,O=T.$skip,M=T.$search,m=T.$filter,P=T.$count,a=T.$select,l=T.$orderby,e=T.$expand;let s=new o.rx(this.encoder);return s=this.addToHttpParams(s,"$top",f,o.l2.Form,!1),s=this.addToHttpParams(s,"$skip",O,o.l2.Form,!1),s=this.addToHttpParams(s,"$search",M,o.l2.Form,!1),s=this.addToHttpParams(s,"$filter",m,o.l2.Form,!1),s=this.addToHttpParams(s,"$count",P,o.l2.Form,!1),s=this.addToHttpParams(s,"$select",a,o.l2.Form,!1),s=this.addToHttpParams(s,"$orderby",l,o.l2.Form,!1),s=this.addToHttpParams(s,"$expand",e,o.l2.Form,!1),`/ReportDetailedQueueStatistics/Pbx.DownloadDetailedQueueStatistics(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+s.toString()}getDetailedQueueStatisticsData(T,n="body"){const u=T?.queueDnStr;if(null==u)throw new Error("Required parameter queueDnStr was null or undefined when calling getDetailedQueueStatisticsData.");const _=T?.startDt;if(null==_)throw new Error("Required parameter startDt was null or undefined when calling getDetailedQueueStatisticsData.");const d=T?.endDt;if(null==d)throw new Error("Required parameter endDt was null or undefined when calling getDetailedQueueStatisticsData.");const $=T?.waitInterval;if(null==$)throw new Error("Required parameter waitInterval was null or undefined when calling getDetailedQueueStatisticsData.");
1const w=T?.$top,R=T?.$skip,f=T?.$search,O=T?.$filter,M=T?.$count,m=T?.$select,P=T?.$orderby,a=T?.$expand;let l=new o.rx(this.encoder);l=this.addToHttpParams(l,"$top",w,o.l2.Form,!1),l=this.addToHttpParams(l,"$skip",R,o.l2.Form,!1),l=this.addToHttpParams(l,"$search",f,o.l2.Form,!1),l=this.addToHttpParams(l,"$filter",O,o.l2.Form,!1),l=this.addToHttpParams(l,"$count",M,o.l2.Form,!1),l=this.addToHttpParams(l,"$select",m,o.l2.Form,!1),l=this.addToHttpParams(l,"$orderby",P,o.l2.Form,!1),l=this.addToHttpParams(l,"$expand",a,o.l2.Form,!1);let e=this.defaultHeaders;e=this.configuration.addCredentialToHeaders("Application","Authorization",e,"Bearer ");const s=this.configuration.selectHeaderAccept(["application/json"]);void 0!==s&&(e=e.set("Accept",s));let h="json";s&&(h=s.startsWith("text")?"text":this.configuration.isJsonMime(s)?"json":"blob");let x=`/ReportDetailedQueueStatistics/Pbx.GetDetailedQueueStatisticsData(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:E,withCredentials:B}=this.configuration;return this.httpClient.request("get",`${E}${x}`,{params:l.toHttpParams(),responseType:h,...B?{withCredentials:B}:{},headers:e,observe:n})}getDetailedQueueStatisticsDataQuery(T,n="body",u=!1,_){const d=T.queueDnStr;if(null==d)throw new Error("Required parameter queueDnStr was null or undefined when calling getDetailedQueueStatisticsData.");const $=T.startDt;if(null==$)throw new Error("Required parameter startDt was null or undefined when calling getDetailedQueueStatisticsData.");const w=T.endDt;if(null==w)throw new Error("Required parameter endDt was null or undefined when calling getDetailedQueueStatisticsData.");const R=T.waitInterval;if(null==R)throw new Error("Required parameter waitInterval was null or undefined when calling getDetailedQueueStatisticsData.");const f=T.$top,O=T.$skip,M=T.$search,m=T.$filter,P=T.$count,a=T.$select,l=T.$orderby,e=T.$expand;let s=new o.rx(this.encoder);return s=this.addToHttpParams(s,"$top",f,o.l2.Form,!1),s=this.addToHttpParams(s,"$skip",O,o.l2.Form,!1),s=this.addToHttpParams(s,"$search",M,o.l2.Form,!1),s=this.addToHttpParams(s,"$filter",m,o.l2.Form,!1),s=this.addToHttpParams(s,"$count",P,o.l2.Form,!1),s=this.addToHttpParams(s,"$select",a,o.l2.Form,!1),s=this.addToHttpParams(s,"$orderby",l,o.l2.Form,!1),s=this.addToHttpParams(s,"$expand",e,o.l2.Form,!1),`/ReportDetailedQueueStatistics/Pbx.GetDetailedQueueStatisticsData(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+s.toString()}static \u0275fac=(()=>{let T;return function(u){return(T||(T=c.xGo(i)))(u||i)}})();static \u0275prov=p.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var L=t(67374),H=t.n(L),S=t(96794);let I=(()=>{class i{reportDetailedQueueStatisticsApiService=(0,p.WQX)(b);dataFetcher=(T,n)=>T.canViewReport?u=>u.pipe((0,C.n)(_=>this.requestQueuesStatistics(T,_,n)),(0,A.T)(_=>_.value)):u=>u.pipe((0,C.n)(()=>(0,y.of)([])));requestQueuesStatistics(T,n,u){return this.reportDetailedQueueStatisticsApiService.getDetailedQueueStatisticsData({$skip:n*u,$top:u,...(0,S.lr)(T),queueDnStr:T.pbxPeers?.map(_=>
1_.Number).filter(Boolean).join(" ")??"",waitInterval:H().duration(T.interval??0,"seconds").format("H:mm:s")})}generateCSVDownloadLink(T){return this.reportDetailedQueueStatisticsApiService.downloadDetailedQueueStatisticsQuery({...(0,S.lr)(T),queueDnStr:T.pbxPeers?.map(n=>n.Number).filter(Boolean).join(" ")??"",waitInterval:H().duration(T.interval??0,"seconds").format("H:mm:s")})}generateReportParams(T){return JSON.stringify({StartDt:T.periodFromTo[0],EndDt:T.periodFromTo[1],DateRangeType:T.periodType,FirstDayOfWeek:T.firstWeekDay,QueueDnStr:T.pbxPeers?.map(n=>n.Number).filter(Boolean).join(" ")??"",WaitInterval:H().duration(T.interval??0,"seconds").format("H:mm:s")})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=p.jDH({token:i,factory:i.\u0275fac})}return i})()},96704(te,k,t){t.d(k,{a3:()=>p,bB:()=>L,d:()=>b});var C=t(67374),y=t.n(C),A=t(35547);const o=86400,g=3600,p=H=>{if(null==H)return"";const S=y().duration(H).asSeconds(),I=Math.floor(S/o),i=Math.floor((S-I*o)/g),r=Math.floor((S-(I*o+i*g))/60),T=Math.floor(S-(I*o+i*g+60*r)),n=24*I+i;return`${n<10?`0${n.toString(10)}`:n.toString(10)}:${r<10?`0${r.toString(10)}`:r.toString(10)}:${T<10?`0${T.toString(10)}`:T.toString(10)}`},b=H=>1e3*H.map(S=>S?Math.floor(y().duration(S).asSeconds()):0).reduce((S,I)=>S+I,0);let L=(()=>{class H{transform(I){return p(I)}static \u0275fac=function(i){return new(i||H)};static \u0275pipe=A.EJ8({name:"duration",type:H,pure:!0})}return H})()},78713(te,k,t){t.d(k,{Po:()=>y,iY:()=>A,vE:()=>o});var C=t(35547);function y(g){return"number"==typeof g&&isNaN(g)||Number.POSITIVE_INFINITY===g||Number.NEGATIVE_INFINITY===g||typeof g>"u"||null===g||"string"==typeof g&&""===g}const A=(g,c="")=>y(g)?c:g;let o=(()=>{class g{transform(p,b="-"){return A(p,b)}static \u0275fac=function(b){return new(b||g)};static \u0275pipe=C.EJ8({name:"emptyValue",type:g,pure:!0})}return g})()},7932(te,k,t){t.d(k,{P8:()=>V,bQ:()=>Q,lE:()=>v});var C=t(85802),y=t(47472),A=t(84412),o=t(85343),g=t(89417),c=t(59882),p=t(67374),b=t.n(p),L=t(62329),H=t(96864),S=t(71747),I=t(74651),i=t(79997),r=t(96354),T=t(38601),n=t(54327),u=t(48643),_=t(83188),d=t(59625),$=t(74005),w=t(76415),R=t(47429),f=t(22429),O=t(68018),M=t(49769),m=t(96704),P=t(78713),a=t(91382),l=t(62653),e=t(89755),s=t(35547);const h=(W,U)=>[W,U];function x(W,U){if(1&W&&(s.j41(0,"tr")(1,"td",13),s.EFF(2),s.k0s(),s.j41(3,"td"),s.EFF(4),s.nI1(5,"emptyValue"),s.k0s(),s.j41(6,"td"),s.EFF(7),s.nI1(8,"emptyValue"),s.k0s(),s.j41(9,"td"),s.EFF(10),s.nI1(11,"emptyValue"),s.k0s(),s.j41(12,"td"),s.EFF(13),s.nI1(14,"emptyValue"),s.k0s(),s.j41(15,"td"),s.EFF(16),s.nI1(17,"emptyValue"),s.k0s(),s.j41(18,"td"),s.EFF(19),s.k0s(),s.j41(20,"td"),s.EFF(21),s.k0s(),s.j41(22,"td"),s.EFF(23),s.nI1(24,"duration"),s.nI1(25,"emptyValue"),s.k0s()()),2&W){const K=U.$implicit,D=s.XpG(2);s.R7$(2),s.JRh(D.formatAndJoinValues(s.l_i(28,h,K.Dn,K.DisplayName))),s.R7$(2),s.JRh(s.bMT(5,9,K.SentimentScore)),s.R7$(3),s.JRh(s.i5U(8,11,K.InboundAnsweredCount,"0")),s.R7$(3),s.JRh(s.i5U(11,14,K.InboundUnansweredCount,"0")),s.R7$(3),s.JRh(s.i5U(14,17,K.OutboundAnsweredCount,"0")),s.R7$(3),s.JRh(s.i5U(17,20,K.OutboundUnansweredCount,"0")),s.R7$(3),s.JRh((K.InboundAnsweredCount??0)+(K.OutboundAnsweredCount??0)),s.R7$(2),s.JRh((K.InboundUnansweredCount??0)+(K.OutboundUnansweredCount??0)),s.R7$(2),s.JRh(s.i5U(25,25,s.bMT(24,23,D.dayjs.duration(K.InboundAnsweredTalkingDur).add(D.dayjs.duration(K.OutboundAnsweredTalkingDur)).toJSON()),"00:00:00"))}}function E(W,U){1&W&&(s.j41(0,"tr")(1,"td",14),s.nrm(2,"div",15),s.k0s()())}function B(W,U){if(1&W&&(s.j41(0,"tr")(1,"td",16),s.EFF(2),s.nI1(3,"translate"),s.k0s()()),2&W){const K=s.XpG(2);s.R7$(2),s.SpI(" ",s.bMT(3,1,K.noDataMessage(!K.isReportAvailable))," ")}}function j(W,U){if(1&W&&(s.j41(0,"table")(1,"thead")(2,"tr",8)(3,"th",9),s.EFF(4),s.nI1(5,"translate"),s.k0s(),s.j41(6,"th",9),s.EFF(7),s.nI1(8,"translate"),s.k0s(),s.j41(9,"th",10),s.EFF(10),s.nI1(11,"translate"),s.k0s(),s.j41(12,"th",10),s.EFF(13),s.nI1(14,"translate"),s.k0s(),s.j41(15,"th",10),s.EFF(16),s.nI1(17,"translate"),s.k0s(),s.j41(18,"th",9),s.EFF(19),s.nI1(20,"translate"),s.k0s()(),s.j41(21,"tr",8)(22,"th",11),s.EFF(23),s.nI1(24,"translate"),s.k0s(),s.j41(25,"th"),s.EFF(26),s.nI1(27,"translate"),s.k0s(),s.j41(28,"th"),s.EFF(29),s.nI1(30,"translate"),s.k0s(),s.j41(31,"th"),s.EFF(32),s.nI1(33,"translate"),s.k0s(),s.j41(34,"th"),s.EFF(35),s.nI1(36,"translate"),s.k0s(),s.j41(37,"th",12),s.EFF(38),s.nI1(39,"translate"),s.k0s()()(),s.j41(40,"tbody"),s.Z7z(41,x,26,31,"tr",null,s.fX1),s.nVh(43,E,3,0,"tr")(44,B,4,3,"tr"),s.k0s()()),2&W){const K=U;s.R7$(4),s.JRh(s.bMT(5,13,"_i18n.ReportsAgentExt")),s.R7$(3),s.JRh(s.bMT(8,15,"_i18n.Sentiment")),s.R7$(3),s.JRh(s.bMT(11,17,"_i18n.ReportsInbound")),s.R7$(3),s.JRh(s.bMT(14,19,"_i18n.ReportsOutbound")),s.R7$(3),s.JRh(s.bMT(17,21,"_i18n.ReportsTotal")),s.R7$(3),s.JRh(s.bMT(20,23,"_i18n.ReportsTotalTalking")),s.R7$(4),s.JRh(s.bMT(24,25,"_i18n.ReportsAnswered")),s.R7$(3),s.JRh(s.bMT(27,27,"_i18n.ReportsUnanswered")),s.R7$(3),s.JRh(s.bMT(30,29,"_i18n.ReportsAnswered")),s.R7$(3),s.JRh(s.bMT(33,31,"_i18n.ReportsUnanswered")),s.R7$(3),s.JRh(s.bMT(36,33,"_i18n.ReportsAnswered")),s.R7$(3),s.JRh(s.bMT(39,35,"_i18n.ReportsUnanswered")),s.R7$(3),s.Dyx(K.data),s.R7$(2),s.vxM(K.hasMore?43:K.isLoading||K.data.length?-1:44)}}function v(W=null,U=!1){const K=W?[W]:null;return new g.gE({dateRange:new g.MJ(new L.J,{nonNullable:!0}),callArea:new g.MJ((0,H.J)(),{nonNullable:!0}),pbxPeers:new g.MJ({value:new l.X("_i18n.Groups","pbxGroup","pbxPeers",[S.J.Group],{pbxPeers:K},"none"),disabled:U},{nonNullable:!0})})}function Q(W,U=null,K=!0){const{dateRange:D,pbxPeers:q,callArea:G}=W;return{pbxPeers:q?.value?.pbxPeers??(U?[U]:null),...D.value,callArea:G.value.selectedValue,canViewReport:K}}let V=(()=>{class W{dataSource=(0,C.WQX)(y.d);route=(0,C.WQX)(c.nX);router=(0,C.WQX)(c.Ix);destroy$=(0,C.WQX)(C.abz);modalService=(0,C.WQX)(T.B);fileDownloadService=(0,C.WQX)(u.y);paginator$;hasMoreOrLoading$;parameters$=new A.t(null);nextPage$=new A.t(void 0);reset$=new A.t(void 0);
1firstGroup=this.route.snapshot.data.firstGroup??null;isMcm=this.route.snapshot.data.mcm??!1;isSystemOwner=this.route.snapshot.data.isSystemOwner??!1;filter=v(this.firstGroup,this.isMcm&&!this.isSystemOwner);scheduledReportType=I.G.ExtensionStatistics;get isReportAvailable(){return this.route.snapshot.data.reportsAvailable}get parameters(){return Q(this.filter.value,this.firstGroup,this.isReportAvailable)}constructor(){this.paginator$=(0,i.K)(this.modalService,this.destroy$,this.parameters$,this.nextPage$,this.reset$,this.dataSource.dataFetcher,100),this.hasMoreOrLoading$=this.paginator$.pipe((0,r.T)(K=>!K.hasMore||K.isLoading))}get dayjs(){return b()}submitFilter(){this.parameters$.next(this.parameters)}downloadCsv(){this.fileDownloadService.download(this.dataSource.generateCSVDownloadLink(this.parameters))}onSaveReport(K){(0,a.J)(this.modalService,this.scheduledReportType,K,this.dataSource.generateReportParams(this.parameters))}back(){this.router.navigate([".."],{relativeTo:this.route}).catch(o.l)}noDataMessage=n.Ns;formatAndJoinValues=n.pk;static \u0275fac=function(D){return new(D||W)};static \u0275cmp=s.VBU({type:W,selectors:[["ng-component"]],features:[s.Jv_([y.d])],decls:11,vars:15,consts:[["header","_i18n.ExtStatistics",3,"back","helpUrl"],["header","",3,"exportClicked","disabled","showReportPrint"],["top-bar","",3,"filterChanged","saveReport","filterForm","formGroup","reportType","disabled"],["formControlName","dateRange"],["formControlName","callArea"],["formControlName","pbxPeers"],["id","scrollableList",1,"h-100","scrollable-table"],["infiniteScroll","",3,"infiniteScrollCallback","infiniteScrollContainer","infiniteScrollDistance","infiniteScrollDisabled"],[1,"table-header"],["rowspan","2"],["colspan","2"],[1,"ps-2"],[1,"w-auto"],[1,"text-md-nowrap"],["colspan","9"],[1,"loader"],["colspan","9",1,"text-center"]],template:function(D,q){if(1&D&&(s.j41(0,"app-page",0),s.bIt("back",function(){return q.back()}),s.j41(1,"app-report-action-buttons",1),s.bIt("exportClicked",function(){return q.downloadCsv()}),s.k0s(),s.j41(2,"app-complex-filter",2),s.bIt("filterChanged",function(){return q.submitFilter()})("saveReport",function(F){return q.onSaveReport(F)}),s.nrm(3,"app-date-range-filter",3)(4,"app-enum-filter",4)(5,"app-multi-peer-filter",5),s.k0s(),s.j41(6,"div",6)(7,"div",7),s.nI1(8,"async"),s.bIt("infiniteScrollCallback",function(){return q.nextPage$.next()}),s.nVh(9,j,45,37,"table"),s.nI1(10,"async"),s.k0s()()()),2&D){let G;s.Y8G("helpUrl","_i18n.ReportsUri"),s.R7$(),s.Y8G("disabled",!q.isReportAvailable)("showReportPrint",!0),s.R7$(),s.Y8G("filterForm",q.filter)("formGroup",q.filter)("reportType",q.scheduledReportType)("disabled",!q.isReportAvailable),s.R7$(5),s.Y8G("infiniteScrollContainer","#scrollableList")("infiniteScrollDistance",1)("infiniteScrollDisabled",s.bMT(8,11,q.hasMoreOrLoading$)),s.R7$(2),s.vxM((G=s.bMT(10,13,q.paginator$))?9:-1,G)}},dependencies:[_.H,d.n,$.M,g.X1,g.BC,g.cb,g.j4,g.JD,w.B,R.j,f.D,e.b,O.D9,M.Jj,m.bB,P.vE],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}']})}return W})()},47472(te,k,t){t.d(k,{d:()=>H});var C=t(25558),y=t(7673),A=t(96354),o=t(97201),g=t(4499),c=t(35547),p=t(85802);let b=(()=>{class S extends g.d{downloadExtensionStatisticsByGroup(i,r="body"){const T=i?.groupNumber;if(null==T)throw new Error("Required parameter groupNumber was null or undefined when calling downloadExtensionStatisticsByGroup.");const n=i?.periodFrom;
1if(null==n)throw new Error("Required parameter periodFrom was null or undefined when calling downloadExtensionStatisticsByGroup.");const u=i?.periodTo;if(null==u)throw new Error("Required parameter periodTo was null or undefined when calling downloadExtensionStatisticsByGroup.");const _=i?.callArea;if(null==_)throw new Error("Required parameter callArea was null or undefined when calling downloadExtensionStatisticsByGroup.");const d=i?.$top,$=i?.$skip,w=i?.$search,R=i?.$filter,f=i?.$count,O=i?.$select,M=i?.$orderby,m=i?.$expand;let P=new o.rx(this.encoder);P=this.addToHttpParams(P,"$top",d,o.l2.Form,!1),P=this.addToHttpParams(P,"$skip",$,o.l2.Form,!1),P=this.addToHttpParams(P,"$search",w,o.l2.Form,!1),P=this.addToHttpParams(P,"$filter",R,o.l2.Form,!1),P=this.addToHttpParams(P,"$count",f,o.l2.Form,!1),P=this.addToHttpParams(P,"$select",O,o.l2.Form,!1),P=this.addToHttpParams(P,"$orderby",M,o.l2.Form,!1),P=this.addToHttpParams(P,"$expand",m,o.l2.Form,!1);let a=this.defaultHeaders;a=this.configuration.addCredentialToHeaders("Application","Authorization",a,"Bearer ");const l=this.configuration.selectHeaderAccept(["application/json"]);void 0!==l&&(a=a.set("Accept",l));let e="json";l&&(e=l.startsWith("text")?"text":this.configuration.isJsonMime(l)?"json":"blob");let s=`/ReportExtensionStatisticsByGroup/Pbx.DownloadExtensionStatisticsByGroup(groupNumber=${this.configuration.encodeParam({name:"groupNumber",value:T,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},callArea=${this.configuration.encodeParam({name:"callArea",value:_,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:h,withCredentials:x}=this.configuration;return this.httpClient.request("get",`${h}${s}`,{params:P.toHttpParams(),responseType:e,...x?{withCredentials:x}:{},headers:a,observe:r})}downloadExtensionStatisticsByGroupQuery(i,r="body",T=!1,n){const u=i.groupNumber;if(null==u)throw new Error("Required parameter groupNumber was null or undefined when calling downloadExtensionStatisticsByGroup.");const _=i.periodFrom;if(null==_)throw new Error("Required parameter periodFrom was null or undefined when calling downloadExtensionStatisticsByGroup.");const d=i.periodTo;if(null==d)throw new Error("Required parameter periodTo was null or undefined when calling downloadExtensionStatisticsByGroup.");const $=i.callArea;if(null==$)throw new Error("Required parameter callArea was null or undefined when calling downloadExtensionStatisticsByGroup.");const w=i.$top,R=i.$skip,f=i.$search,O=i.$filter,M=i.$count,m=i.$select,P=i.$orderby,a=i.$expand;let l=new o.rx(this.encoder);return l=this.addToHttpParams(l,"$top",w,o.l2.Form,!1),l=this.addToHttpParams(l,"$skip",R,o.l2.Form,!1),l=this.addToHttpParams(l,"$search",f,o.l2.Form,!1),l=this.addToHttpParams(l,"$filter",O,o.l2.Form,!1),l=this.addToHttpParams(l,"$count",M,o.l2.Form,!1),l=this.addToHttpParams(l,"$select",m,o.l2.Form,!1),l=this.addToHttpParams(l,"$orderby",P,o.l2.Form,!1),l=this.addToHttpParams(l,"$expand",a,o.l2.Form,!1),`/ReportExtensionStatisticsByGroup/Pbx.DownloadExtensionStatisticsByGroup(groupNumber=${this.configuration.encodeParam({name:"groupNumber",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},callArea=${this.configuration.encodeParam({name:"callArea",value:$,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})?`+l.toString()}getExtensionStatisticsByGroupData(i,r="body"){const T=i?.groupNumber;if(null==T)throw new Error("Required parameter groupNumber was null or undefined when calling getExtensionStatisticsByGroupData.");const n=i?.periodFrom;
1if(null==n)throw new Error("Required parameter periodFrom was null or undefined when calling getExtensionStatisticsByGroupData.");const u=i?.periodTo;if(null==u)throw new Error("Required parameter periodTo was null or undefined when calling getExtensionStatisticsByGroupData.");const _=i?.callArea;if(null==_)throw new Error("Required parameter callArea was null or undefined when calling getExtensionStatisticsByGroupData.");const d=i?.$top,$=i?.$skip,w=i?.$search,R=i?.$filter,f=i?.$count,O=i?.$select,M=i?.$orderby,m=i?.$expand;let P=new o.rx(this.encoder);P=this.addToHttpParams(P,"$top",d,o.l2.Form,!1),P=this.addToHttpParams(P,"$skip",$,o.l2.Form,!1),P=this.addToHttpParams(P,"$search",w,o.l2.Form,!1),P=this.addToHttpParams(P,"$filter",R,o.l2.Form,!1),P=this.addToHttpParams(P,"$count",f,o.l2.Form,!1),P=this.addToHttpParams(P,"$select",O,o.l2.Form,!1),P=this.addToHttpParams(P,"$orderby",M,o.l2.Form,!1),P=this.addToHttpParams(P,"$expand",m,o.l2.Form,!1);let a=this.defaultHeaders;a=this.configuration.addCredentialToHeaders("Application","Authorization",a,"Bearer ");const l=this.configuration.selectHeaderAccept(["application/json"]);void 0!==l&&(a=a.set("Accept",l));let e="json";l&&(e=l.startsWith("text")?"text":this.configuration.isJsonMime(l)?"json":"blob");let s=`/ReportExtensionStatisticsByGroup/Pbx.GetExtensionStatisticsByGroupData(groupNumber=${this.configuration.encodeParam({name:"groupNumber",value:T,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},callArea=${this.configuration.encodeParam({name:"callArea",value:_,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:h,withCredentials:x}=this.configuration;return this.httpClient.request("get",`${h}${s}`,{params:P.toHttpParams(),responseType:e,...x?{withCredentials:x}:{},headers:a,observe:r})}getExtensionStatisticsByGroupDataQuery(i,r="body",T=!1,n){const u=i.groupNumber;if(null==u)throw new Error("Required parameter groupNumber was null or undefined when calling getExtensionStatisticsByGroupData.");const _=i.periodFrom;if(null==_)throw new Error("Required parameter periodFrom was null or undefined when calling getExtensionStatisticsByGroupData.");const d=i.periodTo;if(null==d)throw new Error("Required parameter periodTo was null or undefined when calling getExtensionStatisticsByGroupData.");const $=i.callArea;if(null==$)throw new Error("Required parameter callArea was null or undefined when calling getExtensionStatisticsByGroupData.");const w=i.$top,R=i.$skip,f=i.$search,O=i.$filter,M=i.$count,m=i.$select,P=i.$orderby,a=i.$expand;let l=new o.rx(this.encoder);return l=this.addToHttpParams(l,"$top",w,o.l2.Form,!1),l=this.addToHttpParams(l,"$skip",R,o.l2.Form,!1),l=this.addToHttpParams(l,"$search",f,o.l2.Form,!1),l=this.addToHttpParams(l,"$filter",O,o.l2.Form,!1),l=this.addToHttpParams(l,"$count",M,o.l2.Form,!1),l=this.addToHttpParams(l,"$select",m,o.l2.Form,!1),l=this.addToHttpParams(l,"$orderby",P,o.l2.Form,!1),l=this.addToHttpParams(l,"$expand",a,o.l2.Form,!1),`/ReportExtensionStatisticsByGroup/Pbx.GetExtensionStatisticsByGroupData(groupNumber=${this.configuration.encodeParam({name:"groupNumber",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},callArea=${this.configuration.encodeParam({name:"callArea",value:$,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})?`+l.toString()}static \u0275fac=(()=>{let i;return function(T){return(i||(i=c.xGo(S)))(T||S)}})();static \u0275prov=p.jDH({token:S,factory:S.\u0275fac,providedIn:"root"})}return S})();var L=t(96794);let H=(()=>{class S{reportExtensionStatisticsByGroupApiService=(0,p.WQX)(b);dataFetcher=(i,r)=>i.canViewReport?T=>T.pipe((0,C.n)(n=>this.requestExtensionStatistics(i,n,r)),(0,A.T)(n=>n.value)):T=>T.pipe((0,C.n)(()=>(0,y.of)([])));requestExtensionStatistics(i,r,T){return this.reportExtensionStatisticsByGroupApiService.getExtensionStatisticsByGroupData({$skip:r*T,$top:T,...(0,L.Rx)(i),callArea:i.callArea,groupNumber:i.pbxPeers?.map(n=>
1n.Number).filter(Boolean).join(" ")??""})}generateCSVDownloadLink(i){return this.reportExtensionStatisticsByGroupApiService.downloadExtensionStatisticsByGroupQuery({...(0,L.Rx)(i),callArea:i.callArea,groupNumber:i.pbxPeers?.map(r=>r.Number).filter(Boolean).join(" ")??""})}generateReportParams(i){return JSON.stringify({PeriodFrom:i.periodFromTo[0],PeriodTo:i.periodFromTo[1],DateRangeType:i.periodType,FirstDayOfWeek:i.firstWeekDay,CallArea:i.callArea,GroupNumber:i.pbxPeers?.map(r=>r.Number).filter(Boolean).join(" ")??""})}static \u0275fac=function(r){return new(r||S)};static \u0275prov=p.jDH({token:S,factory:S.\u0275fac,providedIn:"root"})}return S})()},96864(te,k,t){t.d(k,{J:()=>o,Y:()=>y});var C=t(75215),y=function(g){return g[g.All=0]="All",g[g.Internal=1]="Internal",g[g.External=2]="External",g}(y||{});const A=[{value:y.All,label:"_i18n.ReportsCallAreaTypeAll"},{value:y.Internal,label:"_i18n.ReportsCallAreaTypeInternal"},{value:y.External,label:"_i18n.ReportsCallAreaTypeExternal"}];function o(g){return new C.L("_i18n.ReportsCallDirection","callArea",A,"selectedValue",!1,g)}},67910(te,k,t){t.d(k,{E:()=>o});var C=t(75215),y=function(g){return g[g.All=0]="All",g[g.OnlyAnswered=1]="OnlyAnswered",g[g.OnlyUnanswered=2]="OnlyUnanswered",g}(y||{});const A=[{value:y.All,label:"_i18n.ReportsCallTypeAll"},{value:y.OnlyAnswered,label:"_i18n.ReportsCallTypeOnlyAnswered"},{value:y.OnlyUnanswered,label:"_i18n.ReportsCallTypeOnlyUnanswered"}];function o(){return new C.L("_i18n.ReportsCallStatus","callType",A)}},44443(te,k,t){t.d(k,{He:()=>y,td:()=>A,vO:()=>b});var C=t(82286),y=function(L){return L[L.All=0]="All",L[L.Internal=1]="Internal",L[L.External=2]="External",L}(y||{});const A=[{value:y.All,label:"_i18n.ReportsCallAreaTypeAll"},{value:y.External,label:"_i18n.ReportsCallAreaTypeExternal"},{value:y.Internal,label:"_i18n.ReportsCallAreaTypeInternal"}];function o(L){return A.find(H=>H.value===L)?.label??""}const c="chatType",p="participantType";class b{chatType=y.All;participantType=null;label="_i18n.ReportsChannel";get value(){return{chatType:this.chatType,participantType:this.participantType}}set value(H){this.chatType=H.chatType??y.All,this.participantType=H.chatType===y.External?H.participantType??C.yJ.All:null}get pureValue(){return{chatType:this.chatType,participantType:this.participantType}}set pureValue(H){this.chatType=H.chatType,this.participantType=H.participantType}deserialize(H){return b.deserialize(H,this.value)}getDisplayValue(H){const{chatType:S,participantType:I}=this.value;switch(S){case y.External:return`${H.instant(o(S))} - ${H.instant((0,C.Y0)(I))}`;case y.Internal:return H.instant(o(S));default:return""}}getDisplayValueForPrint(H){return this.getDisplayValue(H)||H.instant(o(y.All))}serialize(){const H=this.value;return H.chatType===y.All?{}:{[c]:H.chatType,[p]:H.participantType}}validate(){return null}static deserialize(H,S){const I=new b;return S&&(I.value=S),c in H&&function g(L){return null!=L&&"number"==typeof L&&Object.values(y).includes(L)}(H[c])&&(I.chatType=H[c]),p in H&&(0,C.iJ)(H[p])&&(I.participantType=H[p]),I.chatType===y.External&&(I.participantType=I.participantType??C.yJ.All),I}}},97834(te,k,t){t.d(k,{FI:()=>o,kl:()=>A,u3:()=>y});var C=t(96827);const y={Queue:"Queue"},A=[{label:"_i18n.QueueCalls",value:y.Queue}];function o(){return new C.M("_i18n.ReportsInclude","includeCalls",A,{selectedValues:[y.Queue]})}},36715(te,k,t){t.d(k,{J:()=>b});var C=t(89417),y=t(79213),A=t(43748),o=t(72788),g=t(24708),c=t(68018),p=t(35547);let b=(()=>{class L extends A.F{constructor(){super(new C.MJ(null))}INTERVAL_MAX_VALUE=y.n;static \u0275fac=function(I){return new(I||L)};static \u0275cmp=p.VBU({type:L,selectors:[["app-new-interval-filter"]],features:[p.Jv_([{provide:C.kq,multi:!0,useExisting:L},{provide:C.cz,multi:!0,useExisting:L}]),p.Vt3],decls:7,vars:9,consts:[["data-qa","interval-filter",1,"d-flex","gap-3"],[1,"filter-label"],[1,"d-flex","flex-column"],[1,"set-max-width",3,"formControl","integer","units","min","max"],[3,"control"]],template:function(I,i){1&I&&(p.j41(0,"div",0)(1,"label",1),p.EFF(2),p.nI1(3,"translate"),p.k0s(),p.j41(4,"div",2)(5,"f
1ield-input-number",3),p.nrm(6,"val-errors",4),p.k0s()()()),2&I&&(p.R7$(2),p.JRh(p.bMT(3,7,i.value.label)),p.R7$(3),p.Y8G("formControl",i.control)("integer",!0)("units",i.value.units)("min",0)("max",i.INTERVAL_MAX_VALUE),p.R7$(),p.Y8G("control",i.control))},dependencies:[o.B,C.X1,C.BC,C.l_,g.IH,c.D9],styles:[".set-max-width[_ngcontent-%COMP%]     input[type=number]{max-width:unset!important;min-width:unset!important}"],changeDetection:0})}return L})()},79213(te,k,t){t.d(k,{V:()=>y,n:()=>C});const C=86400;class y{label;pureValue=null;units="_i18n.ReportsSeconds";constructor(o,g){this.label=o,g&&(this.value=g)}getDisplayValue(o){return y.getDisplayValue(o,this.pureValue,this.units)}getDisplayValueForPrint(o){return y.getDisplayValue(o,this.pureValue??0,this.units)}get value(){return{interval:this.pureValue}}set value(o){this.pureValue=o.interval}deserialize(o){return y.deserialize(o,this.label,this.value)}serialize(){return null==this.pureValue?{}:{interval:this.pureValue}}validate(){return(this.pureValue??0)>C?{interval:{max:!0}}:null}static deserialize(o,g,c){const p=new y(g);return c&&(p.value=c),"interval"in o&&"number"==typeof o.interval&&(p.pureValue=o.interval),p}static getDisplayValue(o,g,c){return null!=g?`${g} ${o.instant(c).toLowerCase()}`:""}}},82286(te,k,t){t.d(k,{HX:()=>c,Y0:()=>g,eI:()=>A,iJ:()=>o,yJ:()=>y});var C=t(75215),y=function(p){return p[p.All=0]="All",p[p.Facebook=1]="Facebook",p[p.SmsMms=2]="SmsMms",p[p.LiveChat=3]="LiveChat",p[p.WhatsApp=4]="WhatsApp",p}(y||{});const A=[{value:y.All,label:"_i18n.ReportsParticipantTypeAll"},{value:y.Facebook,label:"_i18n.ReportsParticipantTypeFacebook"},{value:y.SmsMms,label:"_i18n.ReportsParticipantTypeSmsMms"},{value:y.LiveChat,label:"_i18n.ReportsParticipantTypeLiveChat"},{value:y.WhatsApp,label:"_i18n.ReportsParticipantTypeWhatsApp"}];function o(p){return A.some(b=>b.value===p)}function g(p){return A.find(b=>b.value===p)?.label||""}function c(){return new C.L("_i18n.ReportsChannel","participant",A)}},98280(te,k,t){t.d(k,{C:()=>_});var C=t(43748),y=t(31266),A=t(89417),o=t(71747),g=t(23294),c=t(56998),p=t(89079),b=t(66300),L=t(84460),H=t(95604),S=t(68018),I=t(81711),i=t(35547);function r(d,$){if(1&d&&i.nrm(0,"field-input",4),2&d){const w=i.XpG();i.Y8G("formControl",w.f.text)("maxlength",50)}}function T(d,$){if(1&d&&(i.j41(0,"field-wrapper")(1,"div",5),i.nrm(2,"app-peer-number-select",6),i.k0s()()),2&d){const w=i.XpG();i.R7$(2),i.Y8G("formControl",w.f.extension)("searchDnTypes",w.searchDnTypes)("multiple",w.acceptMultiplePeers)("clearable",w.acceptMultiplePeers)("isReportPeers",!0)}}const n={[y.V5.User]:[o.J.Extension],[y.V5.Queue]:[o.J.Queue],[y.V5.RingGroup]:[o.J.RingGroup],[y.V5.Group]:[o.J.Group]},u=[];let _=(()=>{class d extends C.F{allowedTypes;acceptMultiplePeers=!1;typeOptions;constructor(){super(new A.gE({type:new A.MJ(y.V5.Any),extension:new A.MJ(null,A.k0.required),text:new A.MJ(null,A.k0.required)}))}get f(){return this.control.controls}get searchDnTypes(){return n[this.f.type.value]??u}get showExtension(){return this.isExtensionEnabled(this.f.type.value)}isExtensionEnabled(w){switch(w){case y.V5.User:case y.V5.Queue:case y.V5.RingGroup:case y.V5.Group:return!0}return!1}get showText(){return this.isTextEnabled(this.f.type.value)}isTextEnabled(w){switch(w){case y.V5.NumberContains:case y.V5.MatchBillingCode:case y.V5.MatchNumber:case y.V5.NumberStartsWith:return!0}return!1}ngOnInit(){this.f.type.valueChanges.pipe((0,g.F)(),(0,p.pQ)(this.destroy$)).subscribe(w=>{this.control.patchValue({extension:null,text:null}),(0,c.TZ)(this.f.extension,this.isExtensionEnabled(w)),(0,c.TZ)(this.f.text,this.isTextEnabled(w)),this.cd.markForCheck()}),this.syncControlState(this.control)}ngOnChanges(w){w.allowedTypes&&(this.typeOptions=(this.allowedTypes||[]).map(R=>({value:R,label:(0,y.lx)(R)})).filter(R=>R.label))}static \u0275fac=function(R){return new(R||d)};static \u0275cmp=i.VBU({type:d,selectors:[["app-source-or-destination-filter"]],inputs:{allowedTypes:"allowedTypes",acceptMultiplePeers:"acceptMultiplePeers"},features:[i.Jv_([{provide:A.kq,multi:!0,useExisting:d},{provide:A.cz,multi:!0,useExisting:d}]),i.Vt3,i.OA$],decls:8,vars:7,consts:[["data-qa","source-or-destination-filter",1,"d-flex","gap-3"],[1,"filter-label"],[1,"d-flex","flex-wrap","col-gap-3"],[3,"formControl","options"],[3,"formControl","maxlength"],[1,"input-group","h-auto"],[3,"formControl","searchDnTypes","multiple","clearable","isReportPeers"]],template:function(R,f){1&R&&(i.j41(0,"div",0)(1,"label",1),i.EFF(2),i.nI1(3,"translate"),i.k0s(),i.j41(4,"div",2),i.nrm(5,"field-select",3),i.nVh(6,r,1,2,"field-input",4),i.nVh(7,T,3,5,"field-wrapper"),i.k0s()()),2&R&&(i.R7$(2),i.JRh(i.bMT(3,5,f.value.label)),i.R7$(3),i.Y8G("formControl",f.f.type)("options",f.typeOptions),i.R7$(),i.vxM(f.showText?6:-1),i.R7$(),i.vxM(f.showExtension?7:-1))},dependencies:[b.q,A.X1,A.BC,A.tU,A.l_,L.m,H.z,I.$,S.D9],encapsulation:2,changeDetection:0})}return d})()},31266(te,k,t){t.d(k,{V5:()=>A,kK:()=>c,lx:()=>g});
1var C=t(7673),y=t(96354),A=function(p){return p[p.Any=0]="Any",p[p.User=1]="User",p[p.Queue=2]="Queue",p[p.RingGroup=3]="RingGroup",p[p.NumberContains=4]="NumberContains",p[p.MatchBillingCode=5]="MatchBillingCode",p[p.MatchNumber=6]="MatchNumber",p[p.NumberStartsWith=7]="NumberStartsWith",p[p.Internal=8]="Internal",p[p.External=9]="External",p[p.Group=10]="Group",p}(A||{});const o={[A.Any]:"_i18n.ReportsFilterAny",[A.User]:"_i18n.Users",[A.Queue]:"_i18n.ReportsQueues",[A.RingGroup]:"_i18n.RingGroups",[A.NumberContains]:"_i18n.ReportsFilterContains",[A.MatchBillingCode]:"_i18n.ReportsFilterMatchBillingCode",[A.MatchNumber]:"_i18n.ReportsMatchNumber",[A.NumberStartsWith]:"_i18n.ReportsNumberStartsWith",[A.Internal]:"_i18n.ReportsInternal",[A.External]:"_i18n.ReportsExternal",[A.Group]:"_i18n.Groups"};function g(p){return null!=p?o[p]:""}class c{queryParamName;label;type=A.Any;extension=null;text=null;constructor(b,L){this.queryParamName=b,this.label=L}get pureValue(){return{type:this.type,extension:this.extension,text:this.text}}set pureValue(b){this.type=b.type,this.extension=b.extension,this.text=b.text}get value(){return c.getCleanValue(this.pureValue,!0)}set value(b){this.pureValue=c.getCleanValue(b)}deserialize(b){return c.deserialize(b,this.queryParamName,this.label,this.value)}serialize(){const{type:b,text:L,extension:H}=this.value;return b===A.Any?{}:{[this.queryParamName]:{type:b,...L&&{text:L},...H&&{extension:(this.extension?.map(S=>S.Number).filter(Boolean)??[]).join(",")}}}}extractExtensionNames(b=!1){const L=(this.pureValue.extension?.map(H=>H.Name??H.Number??"")??[]).filter(Boolean);return b?L.join(","):L.slice(0,4).join(",")+(L.length>4?"...":"")}constructDisplayValue(b,L=!1){const H=this.value;switch(H.type){case A.User:case A.RingGroup:case A.Queue:case A.Group:return`${b.instant(g(H.type))} ${this.extractExtensionNames(L)}`;case A.Internal:case A.External:return`${b.instant(g(H.type))}`;case A.NumberContains:case A.MatchBillingCode:case A.NumberStartsWith:case A.MatchNumber:return`${b.instant(g(H.type))} ${this.text}`}return""}getDisplayValue(b){return this.constructDisplayValue(b)}getDisplayValueForPrint(b){return this.constructDisplayValue(b,!0)||b.instant(g(A.Any))}validate(){switch(this.type){case null:case A.Any:case A.Internal:case A.External:return null;case A.User:case A.Queue:case A.RingGroup:case A.Group:return this.extension?.length?null:{extension:{required:!0}};case A.NumberContains:case A.MatchBillingCode:case A.NumberStartsWith:case A.MatchNumber:return this.text?null:{text:{required:!0}};default:return{type:{notSupported:!0}}}}static deserialize(b,L,H,S){const I=new c(L,H),i=L in b&&"object"==typeof b[L]?{...b[L],extension:c.deserializePeers(b[L])}:null;return S&&(I.value=S),i&&(I.value=i),I}static deserializePeers(b){if(!b||!("extension"in b))return null;if("object"==typeof b.extension){const L=b.extension;if(L?.Number)return[{Number:L.Number}]}if("string"==typeof b.extension){const L=b.extension;if(L)return L.split(",").filter(H=>!!H).map(H=>({Number:H}))}return null}static getCleanValue(b,L=!1){if(b)switch(b.type){case A.User:case A.Queue:case A.RingGroup:case A.Group:if(b.extension||!L)return{type:b.type,extension:b.extension,text:null};break;case A.Internal:case A.External:return{type:b.type,extension:null,text:""};case A.NumberContains:case A.MatchBillingCode:case A.NumberStartsWith:case A.MatchNumber:if(b.text||!L)return{type:b.type,extension:null,text:b.text}}return{type:A.Any,extension:null,text:null}}refresh(b){const L=this.extension?.filter(H=>H.Number&&!H.Name)??[];return L.length>0?b.getPeers$(L.map(H=>H.Number)).pipe((0,y.T)(H=>{const S=new Map(H.map(I=>[I.Number,I]));return L.forEach(I=>{S.has(I.Number)&&Object.assign(I,S.get(I.Number))}),!0})):(0,C.of)(!1)}}},60724(te,k,t){t.d(k,{Wx:()=>A,dE:()=>g,fy:()=>c});var C=t(75215),y=t(45678),A=function(p){return p[p.Hour=0]="Hour",p[p.Day=1]="Day",p[p.Week=2]="Week",p[p.Month=3]="Month",p[p.Year=4]="Year",p}(A||{});const o=[{value:A.Hour,label:"_i18n.ReportTimeScaleHour"},{value:A.Day,label:"_i18n.ReportTimeScaleDay"},{value:A.Week,label:"_i18n.ReportTimeScaleWeek"},{value:A.Month,label:"_i18n.ReportTimeScaleHourMonth"},{value:A.Year,label:"_i18n.ReportTimeScaleYear"}];function g(){return new C.L("_i18n.TimeScale","timeScale",o)}function c(p){switch(p){case y.ci.Today:case y.ci.Yesterday:case y.ci.Last12Hours:case y.ci.Last24Hours:return A.Hour;case y.ci.LastWeek:case y.ci.Last7Days:case y.ci.Last30Days:case y.ci.ThisMonth:case y.ci.LastMonth:return A.Day;case y.ci.ThisYear:case y.ci.LastYear:return A.Month;case y.ci.Custom:return A.Day;default:return A.Hour}}},54327(te,k,t){t.d(k,{$o:()=>i,BY:()=>n,Ns:()=>r,ii:()=>I,pk:()=>T,ro:()=>u});var C=t(71985),y=t(27468),A=t(7673),o=t(983),g=t(88141),c=t(81546),p=t(67018),b=t(65245),L=t(2105),H=t(81753),S=t(78713);const I=(_,d,$=2e4)=>new C.c(w=>{(0,A.of)([{data:[],nextPage:0,hasNextPage:!0,itemsPerPage:_},[]]).pipe((0,c.f)(([R])=>R.hasNextPage&&R.data.length<$?(0,y.p)([(0,A.of)(R),d(R.nextPage,R.itemsPerPage)]):o.w),(0,b.i)(1),(0,g.M)(([R,f])=>{f.length<R.itemsPerPage&&(R.hasNextPage=!1),R.nextPage+=1,R.data=R.data.concat(f)}
1),(0,p.H)()).subscribe({next:([R])=>{w.next(R.data),w.complete()},error:R=>w.error(R)})});function i(_){switch(_){case L.o.Daily:return"_i18n.Daily";case L.o.Weekly:return"_i18n.WeeklyFirstDay";case L.o.Monthly:return"_i18n.MonthlyFirstDay";case L.o.NotScheduled:return"_i18n.SaveToMyReportsNoSchedule";default:return H.eI}}function r(_,d){return _?"_i18n.ReportsLicenseRestrictions":d?"_i18n.AgentLoginHistoryRequiresQueue":"_i18n.ReportsNoData"}function T(_,d=" ",$="-"){return _.filter(w=>!(0,S.Po)(w)).map(w=>(0,S.iY)(w)).join(d)||$}function n(){return(0,A.of)({totalItems:0,value:[],hasNext:!1})}function u(_,d,$){const w=$??[],R=d+1,f=w.length===R;return{value:w.length===R?w.slice(0,-1):w,totalItems:f?_*d+1:(_-1)*d+w.length}}},87949(te,k,t){t.d(k,{J:()=>o});var C=t(68018),y=t(35547);function A(g,c){1&g&&y.Hgh(0,"th",1)}let o=(()=>{class g{print;static \u0275fac=function(b){return new(b||g)};static \u0275cmp=y.VBU({type:g,selectors:[["app-inbound-calls-table-header"],["thead","app-inbound-calls-table-header",""]],inputs:{print:"print"},decls:38,vars:39,consts:[[1,"w-auto"],[1,"actions"]],template:function(b,L){1&b&&(y.rj2(0,"tr")(1,"th"),y.EFF(2),y.nI1(3,"translate"),y.eux(),y.rj2(4,"th"),y.EFF(5),y.nI1(6,"translate"),y.eux(),y.rj2(7,"th"),y.EFF(8),y.nI1(9,"translate"),y.eux(),y.rj2(10,"th"),y.EFF(11),y.nI1(12,"translate"),y.eux(),y.rj2(13,"th"),y.EFF(14),y.nI1(15,"translate"),y.eux(),y.rj2(16,"th"),y.EFF(17),y.nI1(18,"translate"),y.eux(),y.rj2(19,"th"),y.EFF(20),y.nI1(21,"translate"),y.eux(),y.rj2(22,"th"),y.EFF(23),y.nI1(24,"translate"),y.eux(),y.rj2(25,"th"),y.EFF(26),y.nI1(27,"translate"),y.eux(),y.rj2(28,"th"),y.EFF(29),y.nI1(30,"translate"),y.eux(),y.rj2(31,"th"),y.EFF(32),y.nI1(33,"translate"),y.eux(),y.rj2(34,"th",0),y.EFF(35),y.nI1(36,"translate"),y.eux(),y.nVh(37,A,1,0,"th",1),y.eux()),2&b&&(y.HbH(L.print?"print":"table-header"),y.R7$(2),y.JRh(y.bMT(3,15,"_i18n.ReportsCallTime")),y.R7$(3),y.JRh(y.bMT(6,17,"_i18n.Caller")),y.R7$(3),y.JRh(y.bMT(9,19,"_i18n.Callee")),y.R7$(3),y.JRh(y.bMT(12,21,"_i18n.ReportsTrunk")),y.R7$(3),y.JRh(y.bMT(15,23,"_i18n.ReportsDID")),y.R7$(3),y.JRh(y.bMT(18,25,"_i18n.ReportsStatus")),y.R7$(3),y.JRh(y.bMT(21,27,"_i18n.ReportsRinging")),y.R7$(3),y.JRh(y.bMT(24,29,"_i18n.ReportsTalking")),y.R7$(3),y.JRh(y.bMT(27,31,"_i18n.ReportsTotalDuration")),y.R7$(3),y.JRh(y.bMT(30,33,"_i18n.ReportsCallType")),y.R7$(3),y.JRh(y.bMT(33,35,"_i18n.Sentiment")),y.R7$(3),y.JRh(y.bMT(36,37,"_i18n.Transcription")),y.R7$(2),y.vxM(L.print?-1:37))},dependencies:[C.D9],styles:["[_nghost-%COMP%]{display:contents}"],changeDetection:0})}return g})()},35828(te,k,t){t.d(k,{y:()=>L});var C=t(85802),y=t(96704),A=t(78713),o=t(45764),g=t(82207),c=t(35547);const p=["*"];function b(H,S){if(1&H){const I=c.RV6();c.rj2(0,"tr")(1,"td"),c.EFF(2),c.nI1(3,"appJsDateFormat"),c.nI1(4,"emptyValue"),c.eux(),c.rj2(5,"td"),c.EFF(6),c.nI1(7,"emptyValue"),c.eux(),c.rj2(8,"td"),c.EFF(9),c.nI1(10,"emptyValue"),c.eux(),c.rj2(11,"td"),c.EFF(12),c.nI1(13,"emptyValue"),c.eux(),c.rj2(14,"td"),c.EFF(15),c.nI1(16,"emptyValue"),c.eux(),c.rj2(17,"td"),c.EFF(18),c.nI1(19,"emptyValue"),c.eux(),c.rj2(20,"td"),c.EFF(21),c.nI1(22,"duration"),c.nI1(23,"emptyValue"),c.eux(),c.rj2(24,"td"),c.EFF(25),c.nI1(26,"duration"),c.nI1(27,"emptyValue"),c.eux(),c.rj2(28,"td"),c.EFF(29),c.nI1(30,"duration"),c.nI1(31,"emptyValue"),c.eux(),c.rj2(32,"td"),c.EFF(33),c.nI1(34,"emptyValue"),c.eux(),c.rj2(35,"td"),c.EFF(36),c.nI1(37,"emptyValue"),c.eux(),c.rj2(38,"td",1),c.VwU("click",function(){C.eBV(I);const r=c.XpG();return C.Njj(r.transcription(r.row))}),c.rj2(39,"span",2),c.EFF(40),c.nI1(41,"emptyValue"),c.eux()(),c.SdG(42),c.eux()}if(2&H){const I=c.XpG();c.AVh("print",I.print),c.R7$(2),c.JRh(c.bMT(4,16,c.bMT(3,14,I.row.StartTime))),c.R7$(4),c.JRh(c.bMT(7,18,I.row.SourceDisplayName)),c.R7$(3),c.JRh(c.bMT(10,20,I.row.DestinationDisplayName)),c.R7$(3),c.JRh(c.bMT(13,22,I.row.TrunkName)),c.R7$(3),c.JRh(c.bMT(16,24,I.row.Did)),c.R7$(3),c.JRh(c.bMT(19,26,I.row.Status)),c.R7$(3),c.JRh(c.bMT(23,30,c.bMT(22,28,I.row.RingingDuration))),c.R7$(4),c.JRh(c.bMT(27,34,c.bMT(26,32,I.row.TalkingDuration))),c.R7$(4),c.JRh(c.bMT(31,38,c.bMT(30,36,I.totalCallDurationSumInMilliseconds))),c.R7$(4),c.JRh(c.bMT(34,40,I.row.RuleName)),c.R7$(3),c.JRh(c.bMT(37,42,I.row.SentimentScore)),c.R7$(4),c.JRh(c.bMT(41,44,I.row.Transcription))}}let L=(()=>{class H{row;print;transcriptionService=(0,C.WQX)(g.I);get totalCallDurationSumInMilliseconds(){return(0,y.d)([this.row?.RingingDuration,this.row?.TalkingDuration])}transcription(I){I.Transcription&&this.transcriptionService.showTranscription(I.Transcription)}static \u0275fac=function(i){return new(i||H)};static \u0275cmp=c.VBU({type:H,selectors:[["app-inbound-calls-table-row"]],inputs:{row:"row",print:"print"},ngContentSelectors:p,decls:1,vars:1,consts:[[3,"print"],[1,"pointer",3,"click"],[1,"line-clamp-2"]],template:function(i,r){1&i&&(c.NAR(),c.nVh(0,b,43,46,"tr",0)),2&i&&c.vxM(r.row?0:-1)},dependencies:[y.bB,A.vE,o.N],styles:["[_nghost-%COMP%]{display:contents}"],changeDetection:0})}return H})()},75957(te,k,t){t.d(k,{EM:()=>Y,lE:()=>N,bQ:()=>Z});var C=t(85802),y=t(17705),A=t(62329),o=t(74005),g=t(76415),c=t(47429),p=t(89417),b=t(62653),L=t(89755),H=t(83188),S=t(87019),I=t(59625),i=t(59882),r=t(84412),T=t(96354),n=t(85343),u=t(71747),_=t(56132),d=t(74651),$=t(39763),w=t(67910),R=t(49769),f=t(38601),O=t(91382),M=t(48643),m=t(58368),P=t(54327);class a{dataSource;callsParameters;constructor(ie,J){this.dataSource=ie,this.callsParameters=J}resolveData(ie,J,oe,ne){if(!this.callsParameters||!this.callsParameters.canViewReport)return(0,P.BY)();const re=ie-1;return this.dataSource.requestCalls(this.callsParameters,re,J+1,re*J).pipe((0,T.T)(me=>(0,P.ro)(ie,J,me.value)))}}var l=t(4801),e=t(42610),s=t(12426),h=t(89079),x=t(29325),E=t(68018),B=t(32732),j=t(35828),v=t(87949),Q=t(18103),V=t(96697),W=t(65562),U=t(82207),K=t(96106),D=t(35547);function q(z,ie){if(1&z){const J=D.RV6();D.j41(0,"app-inbound-calls-table-row",9)(1,"td",12)(2,"button",13),D.nI1(3,"translate"),D.bIt("click",function(ne){const re=C.eBV(J).$implicit;return D.XpG().summary(re),ne.stopPropagation(),C.Njj(ne.preventDefault())}),D.k0s(),D.j41(4,"row-action-button",14)(5,"li",15)(6,"button",16),D.bIt("click",function(){const ne=C.eBV(J).$implicit,re=D.XpG();return C.Njj(re.reportsRecordingService.downloadRecordingById(ne.RecordingId))}),D.k0s()(),D.j41(7,"li",15)(8,"button",17),D.bIt("click",function(){const ne=C.eBV(J).$implicit,re=D.XpG();return C.Njj(re.reportsRecordingService.playRecordingById(ne.RecordingId))}),D.k0s()(),D.j41(9,"li",15)(10,"button",18),D.bIt("click",function(){const ne=C.eBV(J).$implicit,re=D.XpG();return C.Njj(re.requestCallReport(ne))}),D.k0s()(),D.j41(11,"li",15)(12,"button",19),D.bIt("click",function(){const ne=C.eBV(J).$implicit,re=D.XpG();return C.Njj(re.transcription(ne))}),D.k0s()(),D.j41(13,"li",15)(14,"button",20),D.bIt("click",function(){const ne=C.eBV(J).$implicit,re=D.XpG();return C.Njj(re.summary(ne))}),D.k0s()()()()()}if(2&z){const J=ie.$implicit,oe=D.XpG();D.Y8G("row",J),D.R7$(2),D.Y8G("disabled",!(J.Summary&&!oe.isSummaryNotApplicable(J)))("title",D.bMT(3,24,"_i18n.Summary")),D.R7$(2),D.Y8G("isLarge",!0),D.R7$(),D.AVh("disabled",!J.RecordingId),D.R7$(),D.Y8G("disabled",!J.RecordingId)("translate","_i18n.Download"),D.R7$(),D.AVh("disabled",!J.RecordingId),D.R7$(),D.Y8G("disabled",!J.RecordingId)("translate","_i18n.PlayRecording"),D.R7$(),D.AVh("disabled",!J.QualityReport),D.R7$(),D.Y8G("disabled",!J.QualityReport)("translate","_i18n.CQReportShowTitle"),D.R7$(),D.AVh("disabled",!J.Transcription),D.R7$(),D.Y8G("disabled",!J.Transcription)("translate","_i18n.Transcription"),D.R7$(),D.AVh("disabled",!J.Summary||oe.isSummaryNotApplicable(J)),D.R7$(),D.Y8G("disabled",!J.Summary||oe.isSummaryNotApplicable(J))("translate","_i18n.Summary")}
1}function G(z,ie){1&z&&(D.j41(0,"tr")(1,"td",10),D.nrm(2,"div",21),D.k0s()())}function F(z,ie){if(1&z&&(D.j41(0,"tr")(1,"td",22),D.EFF(2),D.nI1(3,"translate"),D.k0s()()),2&z){const J=D.XpG();D.R7$(2),D.SpI(" ",D.bMT(3,1,J.noDataMessage(!J.isReportAvailable))," ")}}function N(){return new p.gE({dateRange:new p.MJ(new A.J,{nonNullable:!0}),callType:new p.MJ((0,w.E)(),{nonNullable:!0}),pbxPeers:new p.MJ(new b.X("_i18n.Trunks","trunks","pbxPeers",[u.J.ExternalLine],{pbxPeers:null},"_i18n.Any",!0),{nonNullable:!0})})}function Z(z,ie,J=!0){const{dateRange:oe,callType:ne,pbxPeers:re}=z;return{...oe.value,...re.value,callType:ne.value.selectedValue,search:ie,canViewReport:J}}let Y=(()=>{class z{route=(0,C.WQX)(i.nX);cd=(0,C.WQX)(y.gRc);router=(0,C.WQX)(i.Ix);destroy$=(0,C.WQX)(C.abz);modalService=(0,C.WQX)(f.B);fileDownloadService=(0,C.WQX)(M.y);localStorageService=(0,C.WQX)(s.sj);dataSource=(0,C.WQX)($.I);transcriptionService=(0,C.WQX)(U.I);callLogDataApiService=(0,C.WQX)(_.Q);reportsRecordingService=(0,C.WQX)(Q.M);scheduledReportType=d.G.InboundCalls;parameters$=new r.t(null);pager;calls;firstTrunk=this.route.snapshot.data.firstTrunk;canViewReport=null!=this.firstTrunk;searchText=new p.MJ("");filter=N();get parameters(){return Z(this.filter.value,this.searchText.value,this.isReportAvailable)}get isReportAvailable(){return this.route.snapshot.data.reportsAvailable}constructor(){const J=this.parameters$.pipe((0,T.T)(oe=>new a(this.dataSource,oe)));
1this.pager=new l.f(this.destroy$,J,void 0,this.getStoredPageSize()),this.pager.pagedItems$.pipe((0,h.pQ)(this.destroy$)).subscribe({next:oe=>{this.updateItems(oe)},error:oe=>this.modalService.error(oe)})}identify(J,oe){return J+(oe.CdrId??"")}updateItems(J){this.calls=J.value??[],this.cd.markForCheck()}getStoredPageSize(){const J=this.localStorageService.retrieve(e.Hh.ReportPageSize);return J?+J:m.n}onPageSizeChange(J){this.localStorageService.store(e.Hh.ReportPageSize,J),this.pager.pageSizeChanged(J)}transcription(J){J.Transcription&&this.transcriptionService.showTranscription(J.Transcription)}isSummaryNotApplicable(J){return"N/A"===J.Summary?.trim()}summary(J){!J.Summary||this.isSummaryNotApplicable(J)||this.transcriptionService.showTranscription(J.Summary,"_i18n.Summary")}requestCallReport(J){!J.CdrId||!J.DestinationDn||!J.SourceDn||this.callLogDataApiService.getCallQualityReport({cdrId:J.CdrId,dstNumber:J.DestinationDn,srcNumber:J.SourceDn,srcCallerId:J.SourceCallerId??null,dstCallerId:J.DestinationCallerId??null}).pipe((0,V.s)(1),(0,K.Pr)("_i18n.CallQualityReportNotFoundErrorMessage"),(0,h.pQ)(this.destroy$)).subscribe({next:oe=>{this.modalService.showDialog(W.n,{qualityReport:oe})},error:oe=>this.modalService.error(oe)})}submitFilter(){this.parameters$.next(this.parameters)}onSaveReport(J){(0,O.J)(this.modalService,this.scheduledReportType,J,this.dataSource.generateReportParams(this.parameters))}downloadCsv(){this.fileDownloadService.download(this.dataSource.generateCSVDownloadLink(this.parameters))}back(){this.router.navigate([".."],{relativeTo:this.route}).catch(n.l)}noDataMessage=P.Ns;static \u0275fac=function(oe){return new(oe||z)};static \u0275cmp=D.VBU({type:z,selectors:[["ng-component"]],features:[D.Jv_([$.I])],decls:22,vars:22,consts:[["header","_i18n.InboundCalls",3,"back","helpUrl"],["header","",3,"exportClicked","disabled","showReportPrint"],["top-bar","",3,"filterChanged","saveReport","search","filterForm","formGroup","reportType","disabled"],["formControlName","dateRange"],["formControlName","pbxPeers","placeholder","_i18n.Any",3,"allowEmpty"],["formControlName","callType"],[1,"h-100","scrollable-table"],["id","scrollableList"],["app-inbound-calls-table-header",""],[3,"row"],["colspan","13"],[3,"pageChanged","itemsPerPageChanged","showPageSizes","currentPage","itemsPerPage","totalItems"],["data-qa","actions","nowrap","",1,"actions"],["data-qa","transcription","type","button","app-waveform-lines-solid-icon","",1,"btn","btn-plain",3,"click","disabled","title"],[3,"isLarge"],["role","menuitem"],["type","button","data-qa","download",1,"dropdown-item",3,"click","disabled","translate"],["type","button","data-qa","play",1,"dropdown-item",3,"click","disabled","translate"],["type","button","data-qa","quality-report",1,"dropdown-item",3,"click","disabled","translate"],["type","button","data-qa","transcription",1,"dropdown-item",3,"click","disabled","translate"],["type","button","data-qa","summary",1,"dropdown-item",3,"click","disabled","translate"],[1,"loader"],["colspan","13",1,"text-center"]],template:function(oe,ne){1&oe&&(D.j41(0,"app-page",0),D.bIt("back",function(){return ne.back()}),D.j41(1,"app-report-action-buttons",1),D.bIt("exportClicked",function(){return ne.downloadCsv()}),D.k0s(),D.j41(2,"app-complex-filter",2),D.bIt("filterChanged",function(){return ne.submitFilter()})("saveReport",function(me){return ne.onSaveReport(me)}),D.nrm(3,"app-date-range-filter",3)(4,"app-multi-peer-filter",4)(5,"app-enum-filter",5),D.k0s(),D.j41(6,"div",6)(7,"table",7),D.nrm(8,"thead",8),D.j41(9,"tbody"),D.Z7z(10,q,15,26,"app-inbound-calls-table-row",9,ne.identify,!0),D.nVh(12,G,3,0,"tr"),D.nI1(13,"async"),D.vZN(14,F,4,3,"tr"),D.k0s(),D.j41(15,"tfoot")(16,"tr")(17,"td",10)(18,"app-paging",11),D.nI1(19,"async"),D.nI1(20,"async"),D.nI1(21,"async"),D.bIt("pageChanged",function(me){return ne.pager.pageChanged(me)})("itemsPerPageChanged",function(me){return ne.onPageSizeChange(me)}),D.k0s()()()()()()()),2&oe&&(D.Y8G("helpUrl","_i18n.ReportsUri"),D.R7$(),D.Y8G("disabled",!ne.canViewReport||!ne.isReportAvailable)("showReportPrint",!0),D.R7$(),D.Y8G("search",ne.searchText)("filterForm",ne.filter)("formGroup",ne.filter)("reportType",ne.scheduledReportType)("disabled",!ne.isReportAvailable),D.R7$(2),D.Y8G("allowEmpty",!0),D.R7$(6),D.Dyx(ne.calls),D.R7$(2),D.vxM(ne.calls&&0!==ne.calls.length||!D.bMT(13,14,ne.pager.filterLoading$)||!ne.isReportAvailable?ne.calls&&0===ne.calls.length?14:-1:12),D.R7$(6),D.Y8G("showPageSizes",!0)("currentPage",D.bMT(19,16,ne.pager.currentPage$))("itemsPerPage",D.bMT(20,18,ne.pager.pageSize$))("totalItems",D.bMT(21,20,ne.pager.totalCount$)))},dependencies:[o.M,g.B,p.YN,p.BC,p.cb,L.b,H.H,p.X1,p.j4,p.JD,I.n,c.j,x.I,E.h,E.Mm,B.O,j.y,v.J,S.u4,R.Jj,E.D9],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}']})}return z})()},39763(te,k,t){t.d(k,{I:()=>S});var C=t(85802),y=t(96794),A=t(38357),o=t(96354),g=t(7673),c=t(25558),p=t(97201),b=t(4499),L=t(35547);let H=(()=>{class I extends b.d{downloadGetInboundCalls(r,T="body"){const n=r?.periodFrom;
1if(null==n)throw new Error("Required parameter periodFrom was null or undefined when calling downloadGetInboundCalls.");const u=r?.periodTo;if(null==u)throw new Error("Required parameter periodTo was null or undefined when calling downloadGetInboundCalls.");const _=r?.trunkDns;if(null==_)throw new Error("Required parameter trunkDns was null or undefined when calling downloadGetInboundCalls.");const d=r?.callsType;if(null==d)throw new Error("Required parameter callsType was null or undefined when calling downloadGetInboundCalls.");const $=r?.clientTimeZone;if(null==$)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadGetInboundCalls.");const w=r?.$top,R=r?.$skip,f=r?.$search,O=r?.$filter,M=r?.$count,m=r?.$select,P=r?.$orderby,a=r?.$expand;let l=new p.rx(this.encoder);l=this.addToHttpParams(l,"$top",w,p.l2.Form,!1),l=this.addToHttpParams(l,"$skip",R,p.l2.Form,!1),l=this.addToHttpParams(l,"$search",f,p.l2.Form,!1),l=this.addToHttpParams(l,"$filter",O,p.l2.Form,!1),l=this.addToHttpParams(l,"$count",M,p.l2.Form,!1),l=this.addToHttpParams(l,"$select",m,p.l2.Form,!1),l=this.addToHttpParams(l,"$orderby",P,p.l2.Form,!1),l=this.addToHttpParams(l,"$expand",a,p.l2.Form,!1);let e=this.defaultHeaders;e=this.configuration.addCredentialToHeaders("Application","Authorization",e,"Bearer ");const s=this.configuration.selectHeaderAccept(["application/json"]);void 0!==s&&(e=e.set("Accept",s));let h="json";s&&(h=s.startsWith("text")?"text":this.configuration.isJsonMime(s)?"json":"blob");let x=`/ReportInboundCalls/Pbx.DownloadGetInboundCalls(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},trunkDns=${this.configuration.encodeParam({name:"trunkDns",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},callsType=${this.configuration.encodeParam({name:"callsType",value:d,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:E,withCredentials:B}=this.configuration;return this.httpClient.request("get",`${E}${x}`,{params:l.toHttpParams(),responseType:h,...B?{withCredentials:B}:{},headers:e,observe:T})}downloadGetInboundCallsQuery(r,T="body",n=!1,u){const _=r.periodFrom;if(null==_)throw new Error("Required parameter periodFrom was null or undefined when calling downloadGetInboundCalls.");const d=r.periodTo;if(null==d)throw new Error("Required parameter periodTo was null or undefined when calling downloadGetInboundCalls.");const $=r.trunkDns;if(null==$)throw new Error("Required parameter trunkDns was null or undefined when calling downloadGetInboundCalls.");const w=r.callsType;if(null==w)throw new Error("Required parameter callsType was null or undefined when calling downloadGetInboundCalls.");const R=r.clientTimeZone;if(null==R)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadGetInboundCalls.");const f=r.$top,O=r.$skip,M=r.$search,m=r.$filter,P=r.$count,a=r.$select,l=r.$orderby,e=r.$expand;let s=new p.rx(this.encoder);return s=this.addToHttpParams(s,"$top",f,p.l2.Form,!1),s=this.addToHttpParams(s,"$skip",O,p.l2.Form,!1),s=this.addToHttpParams(s,"$search",M,p.l2.Form,!1),s=this.addToHttpParams(s,"$filter",m,p.l2.Form,!1),s=this.addToHttpParams(s,"$count",P,p.l2.Form,!1),s=this.addToHttpParams(s,"$select",a,p.l2.Form,!1),s=this.addToHttpParams(s,"$orderby",l,p.l2.Form,!1),s=this.addToHttpParams(s,"$expand",e,p.l2.Form,!1),`/ReportInboundCalls/Pbx.DownloadGetInboundCalls(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},trunkDns=${this.configuration.encodeParam({name:"trunkDns",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},callsType=${this.configuration.encodeParam({name:"callsType",value:w,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+s.toString()}getInboundCalls(r,T="body"){const n=r?.periodFrom;
1if(null==n)throw new Error("Required parameter periodFrom was null or undefined when calling getInboundCalls.");const u=r?.periodTo;if(null==u)throw new Error("Required parameter periodTo was null or undefined when calling getInboundCalls.");const _=r?.trunkDns;if(null==_)throw new Error("Required parameter trunkDns was null or undefined when calling getInboundCalls.");const d=r?.callsType;if(null==d)throw new Error("Required parameter callsType was null or undefined when calling getInboundCalls.");const $=r?.$top,w=r?.$skip,R=r?.$search,f=r?.$filter,O=r?.$count,M=r?.$select,m=r?.$orderby,P=r?.$expand;let a=new p.rx(this.encoder);a=this.addToHttpParams(a,"$top",$,p.l2.Form,!1),a=this.addToHttpParams(a,"$skip",w,p.l2.Form,!1),a=this.addToHttpParams(a,"$search",R,p.l2.Form,!1),a=this.addToHttpParams(a,"$filter",f,p.l2.Form,!1),a=this.addToHttpParams(a,"$count",O,p.l2.Form,!1),a=this.addToHttpParams(a,"$select",M,p.l2.Form,!1),a=this.addToHttpParams(a,"$orderby",m,p.l2.Form,!1),a=this.addToHttpParams(a,"$expand",P,p.l2.Form,!1);let l=this.defaultHeaders;l=this.configuration.addCredentialToHeaders("Application","Authorization",l,"Bearer ");const e=this.configuration.selectHeaderAccept(["application/json"]);void 0!==e&&(l=l.set("Accept",e));let s="json";e&&(s=e.startsWith("text")?"text":this.configuration.isJsonMime(e)?"json":"blob");let h=`/ReportInboundCalls/Pbx.GetInboundCalls(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},trunkDns=${this.configuration.encodeParam({name:"trunkDns",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},callsType=${this.configuration.encodeParam({name:"callsType",value:d,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:x,withCredentials:E}=this.configuration;return this.httpClient.request("get",`${x}${h}`,{params:a.toHttpParams(),responseType:s,...E?{withCredentials:E}:{},headers:l,observe:T})}getInboundCallsQuery(r,T="body",n=!1,u){const _=r.periodFrom;if(null==_)throw new Error("Required parameter periodFrom was null or undefined when calling getInboundCalls.");const d=r.periodTo;if(null==d)throw new Error("Required parameter periodTo was null or undefined when calling getInboundCalls.");const $=r.trunkDns;if(null==$)throw new Error("Required parameter trunkDns was null or undefined when calling getInboundCalls.");const w=r.callsType;if(null==w)throw new Error("Required parameter callsType was null or undefined when calling getInboundCalls.");const R=r.$top,f=r.$skip,O=r.$search,M=r.$filter,m=r.$count,P=r.$select,a=r.$orderby,l=r.$expand;let e=new p.rx(this.encoder);return e=this.addToHttpParams(e,"$top",R,p.l2.Form,!1),e=this.addToHttpParams(e,"$skip",f,p.l2.Form,!1),e=this.addToHttpParams(e,"$search",O,p.l2.Form,!1),e=this.addToHttpParams(e,"$filter",M,p.l2.Form,!1),e=this.addToHttpParams(e,"$count",m,p.l2.Form,!1),e=this.addToHttpParams(e,"$select",P,p.l2.Form,!1),e=this.addToHttpParams(e,"$orderby",a,p.l2.Form,!1),e=this.addToHttpParams(e,"$expand",l,p.l2.Form,!1),`/ReportInboundCalls/Pbx.GetInboundCalls(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},trunkDns=${this.configuration.encodeParam({name:"trunkDns",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},callsType=${this.configuration.encodeParam({name:"callsType",value:w,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})?`+e.toString()}static \u0275fac=(()=>{let r;return function(n){return(r||(r=L.xGo(I)))(n||I)}})();static \u0275prov=C.jDH({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})(),S=(()=>{class I{reportInboundCallsApiService=(0,C.WQX)(H);dataFetcher=(r,T)=>r.canViewReport?n=>n.pipe((0,c.n)(u=>this.requestCalls(r,u,T)),(0,o.T)(u=>u.value)):n=>n.pipe((0,c.n)(()=>(0,g.of)([])));requestCalls(r,T,n,u){return this.reportInboundCallsApiService.getInboundCalls({$skip:u??T*n,$top:n,...(0,y.Rx)(r),trunkDns:r.pbxPeers?.map(_=>
1_.Number).filter(Boolean).join(" ")??"",callsType:r.callType,$search:(0,A.Bj)(r.search?.toLowerCase())})}generateCSVDownloadLink(r){return this.reportInboundCallsApiService.downloadGetInboundCallsQuery({...(0,y.Rx)(r),trunkDns:r.pbxPeers?.map(T=>T.Number).filter(Boolean).join(" ")??"",callsType:r.callType,clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,$search:(0,A.Bj)(r.search?.toLowerCase())})}generateReportParams(r){return JSON.stringify({PeriodFrom:r.periodFromTo[0],PeriodTo:r.periodFromTo[1],DateRangeType:r.periodType,FirstDayOfWeek:r.firstWeekDay,TrunksDns:r.pbxPeers?.map(T=>T.Number).filter(Boolean).join(" ")??"",CallsType:r.callType,Search:(r.search??"").trim().toLowerCase()})}static \u0275fac=function(T){return new(T||I)};static \u0275prov=C.jDH({token:I,factory:I.\u0275fac})}return I})()},19060(te,k,t){t.d(k,{b:()=>x,i:()=>E});var C=t(85802),y=t(84412),A=t(85343),o=t(25558),g=t(59882),c=t(38601),p=t(16444),b=t(54327),L=t(79997),H=t(23294),S=t(96354),I=t(77490),i=t(48643),r=t(83185),T=t(92996),n=t(81783),u=t(52808),_=t(89079),d=t(83188),$=t(59625),w=t(68845),R=t(89417),f=t(22429),O=t(3817),M=t(68018),m=t(49769),P=t(78713),a=t(35547);function l(B,j){if(1&B&&(a.j41(0,"tr")(1,"td",6),a.EFF(2),a.nI1(3,"emptyValue"),a.k0s(),a.j41(4,"td",7),a.EFF(5),a.nI1(6,"emptyValue"),a.k0s(),a.j41(7,"td",6),a.EFF(8),a.nI1(9,"emptyValue"),a.k0s(),a.j41(10,"td"),a.nrm(11,"app-route-dest",8),a.k0s()()),2&B){const v=j.$implicit,Q=a.XpG(2);a.R7$(2),a.JRh(a.bMT(3,4,v.Trunk)),a.R7$(3),a.JRh(a.bMT(6,6,v.DID)),a.R7$(3),a.JRh(a.bMT(9,8,v.RuleName)),a.R7$(3),a.Y8G("dest",Q.convertToRouteDest(v.InOfficeRouting))}}function e(B,j){1&B&&(a.j41(0,"tr")(1,"td",9),a.nrm(2,"div",10),a.k0s()())}function s(B,j){if(1&B&&(a.j41(0,"tr")(1,"td",11),a.EFF(2),a.nI1(3,"translate"),a.k0s()()),2&B){const v=a.XpG(2);a.R7$(2),a.SpI(" ",a.bMT(3,1,v.noDataMessage(!v.isReportAvailable))," ")}}function h(B,j){if(1&B&&(a.j41(0,"table")(1,"thead")(2,"tr",5)(3,"th"),a.EFF(4),a.nI1(5,"translate"),a.k0s(),a.j41(6,"th"),a.EFF(7),a.nI1(8,"translate"),a.k0s(),a.j41(9,"th"),a.EFF(10),a.nI1(11,"translate"),a.k0s(),a.j41(12,"th"),a.EFF(13),a.nI1(14,"translate"),a.k0s()()(),a.j41(15,"tbody"),a.Z7z(16,l,12,10,"tr",null,a.fX1),a.nVh(18,e,3,0,"tr")(19,s,4,3,"tr"),a.k0s()()),2&B){const v=j;a.R7$(4),a.JRh(a.bMT(5,5,"_i18n.ReportsTrunk")),a.R7$(3),a.JRh(a.bMT(8,7,"_i18n.ReportsDID")),a.R7$(3),a.JRh(a.bMT(11,9,"_i18n.Name")),a.R7$(3),a.JRh(a.bMT(14,11,"_i18n.Destination")),a.R7$(3),a.Dyx(v.data),a.R7$(2),a.vxM(v.hasMore?18:v.isLoading||v.data.length?-1:19)}}function x(B,j=!0){return{search:B,canViewReport:j}}let E=(()=>{class B{myPhoneService=(0,C.WQX)(p.gx);dataSource=(0,C.WQX)(I.i);route=(0,C.WQX)(g.nX);router=(0,C.WQX)(g.Ix);modalService=(0,C.WQX)(c.B);destroy$=(0,C.WQX)(C.abz);fileDownloadService=(0,C.WQX)(i.y);tokenInfo=(0,C.WQX)(T.Z);baseUrl;paginator$;hasMoreOrLoading$;parameters$=new y.t(null);nextPage$=new y.t(void 0);reset$=new y.t(void 0);trunkGroups=(0,n.Pw)(this.route);searchText="";get isReportAvailable(){return this.route.snapshot.data.reportsAvailable}get parameters(){return x(this.searchText,this.isReportAvailable)}constructor(){const v=this.myPhoneService;this.paginator$=(0,L.K)(this.modalService,this.destroy$,this.parameters$,this.nextPage$,this.reset$,this.dataSource.dataFetcher,100),this.hasMoreOrLoading$=this.paginator$.pipe((0,S.T)(Q=>!Q.hasMore||Q.isLoading)),v.myPhoneSession.pipe((0,S.T)(Q=>
1Q.domainUrl),(0,_.pQ)(this.destroy$)).subscribe(Q=>{this.baseUrl=Q})}ngOnInit(){this.route.queryParams.pipe((0,S.T)(v=>v?.filter||""),(0,H.F)(),(0,_.pQ)(this.destroy$)).subscribe(v=>{this.searchText=(0,r.Bl)(v,{}).search||"",this.parameters$.next(this.parameters)})}convertToRouteDest(v){return(0,u.bx)(v,this.trunkGroups)}updateQuery(){this.router.navigate([],{replaceUrl:!0,queryParamsHandling:"merge",queryParams:{filter:JSON.stringify({search:this.searchText||""})}}).catch(A.l)}downloadCsv(){this.fileDownloadService.download(this.dataSource.generateCSVDownloadLink(this.parameters))}back(){this.tokenInfo.getMyToken$().pipe((0,S.T)(v=>v.reports?["office","reports"]:["office"]),(0,o.n)(v=>this.router.navigate(v))).subscribe()}noDataMessage=b.Ns;static \u0275fac=function(Q){return new(Q||B)};static \u0275cmp=a.VBU({type:B,selectors:[["ng-component"]],features:[a.Jv_([I.i])],decls:8,vars:12,consts:[["header","_i18n.InboundRules",3,"back","helpUrl"],["header","",3,"exportClicked","disabled","showReportPrint"],["top-bar","",3,"ngModelChange","ngModel"],["id","scrollableList",1,"h-100","scrollable-table"],["infiniteScroll","",3,"infiniteScrollCallback","infiniteScrollContainer","infiniteScrollDistance","infiniteScrollDisabled"],[1,"table-header"],[1,"text-md-nowrap"],["nowrap",""],["hideLink","true",3,"dest"],["colspan","8"],[1,"loader"],["colspan","4",1,"text-center"]],template:function(Q,V){if(1&Q&&(a.j41(0,"app-page",0),a.bIt("back",function(){return V.back()}),a.j41(1,"app-report-action-buttons",1),a.bIt("exportClicked",function(){return V.downloadCsv()}),a.k0s(),a.j41(2,"search-bar",2),a.mxI("ngModelChange",function(U){return a.DH7(V.searchText,U)||(V.searchText=U),U}),a.bIt("ngModelChange",function(){return V.updateQuery()}),a.k0s(),a.j41(3,"div",3)(4,"div",4),a.nI1(5,"async"),a.bIt("infiniteScrollCallback",function(){return V.nextPage$.next()}),a.nVh(6,h,20,13,"table"),a.nI1(7,"async"),a.k0s()()()),2&Q){let W;a.Y8G("helpUrl","_i18n.ReportsUri"),a.R7$(),a.Y8G("disabled",!V.isReportAvailable)("showReportPrint",!0),a.R7$(),a.R50("ngModel",V.searchText),a.R7$(2),a.Y8G("infiniteScrollContainer","#scrollableList")("infiniteScrollDistance",1)("infiniteScrollDisabled",a.bMT(5,8,V.hasMoreOrLoading$)),a.R7$(2),a.vxM((W=a.bMT(7,10,V.paginator$))?6:-1,W)}},dependencies:[d.H,$.n,w.L,R.X1,R.BC,R.YN,R.vS,f.D,O.F,M.D9,m.Jj,P.vE],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}']})}return B})()}
1,77490(te,k,t){t.d(k,{i:()=>H});var C=t(25558),y=t(7673),A=t(96354),o=t(97201),g=t(4499),c=t(35547),p=t(85802);let b=(()=>{class S extends g.d{downloadInboundRules(i,r="body"){const T=i?.$top,n=i?.$skip,u=i?.$search,_=i?.$filter,d=i?.$count,$=i?.$select,w=i?.$orderby,R=i?.$expand;let f=new o.rx(this.encoder);f=this.addToHttpParams(f,"$top",T,o.l2.Form,!1),f=this.addToHttpParams(f,"$skip",n,o.l2.Form,!1),f=this.addToHttpParams(f,"$search",u,o.l2.Form,!1),f=this.addToHttpParams(f,"$filter",_,o.l2.Form,!1),f=this.addToHttpParams(f,"$count",d,o.l2.Form,!1),f=this.addToHttpParams(f,"$select",$,o.l2.Form,!1),f=this.addToHttpParams(f,"$orderby",w,o.l2.Form,!1),f=this.addToHttpParams(f,"$expand",R,o.l2.Form,!1);let O=this.defaultHeaders;O=this.configuration.addCredentialToHeaders("Application","Authorization",O,"Bearer ");const M=this.configuration.selectHeaderAccept(["application/json"]);void 0!==M&&(O=O.set("Accept",M));let m="json";M&&(m=M.startsWith("text")?"text":this.configuration.isJsonMime(M)?"json":"blob");const{basePath:a,withCredentials:l}=this.configuration;return this.httpClient.request("get",`${a}/ReportInboundRules/Pbx.DownloadInboundRules()`,{params:f.toHttpParams(),responseType:m,...l?{withCredentials:l}:{},headers:O,observe:r})}downloadInboundRulesQuery(i,r="body",T=!1,n){const u=i.$top,_=i.$skip,d=i.$search,$=i.$filter,w=i.$count,R=i.$select,f=i.$orderby,O=i.$expand;let M=new o.rx(this.encoder);return M=this.addToHttpParams(M,"$top",u,o.l2.Form,!1),M=this.addToHttpParams(M,"$skip",_,o.l2.Form,!1),M=this.addToHttpParams(M,"$search",d,o.l2.Form,!1),M=this.addToHttpParams(M,"$filter",$,o.l2.Form,!1),M=this.addToHttpParams(M,"$count",w,o.l2.Form,!1),M=this.addToHttpParams(M,"$select",R,o.l2.Form,!1),M=this.addToHttpParams(M,"$orderby",f,o.l2.Form,!1),M=this.addToHttpParams(M,"$expand",O,o.l2.Form,!1),"/ReportInboundRules/Pbx.DownloadInboundRules()?"+M.toString()}getInboundRulesData(i,r="body"){const T=i?.$top,n=i?.$skip,u=i?.$search,_=i?.$filter,d=i?.$count,$=i?.$select,w=i?.$orderby,R=i?.$expand;let f=new o.rx(this.encoder);f=this.addToHttpParams(f,"$top",T,o.l2.Form,!1),f=this.addToHttpParams(f,"$skip",n,o.l2.Form,!1),f=this.addToHttpParams(f,"$search",u,o.l2.Form,!1),f=this.addToHttpParams(f,"$filter",_,o.l2.Form,!1),f=this.addToHttpParams(f,"$count",d,o.l2.Form,!1),f=this.addToHttpParams(f,"$select",$,o.l2.Form,!1),f=this.addToHttpParams(f,"$orderby",w,o.l2.Form,!1),f=this.addToHttpParams(f,"$expand",R,o.l2.Form,!1);let O=this.defaultHeaders;O=this.configuration.addCredentialToHeaders("Application","Authorization",O,"Bearer ");const M=this.configuration.selectHeaderAccept(["application/json"]);void 0!==M&&(O=O.set("Accept",M));let m="json";M&&(m=M.startsWith("text")?"text":this.configuration.isJsonMime(M)?"json":"blob");const{basePath:a,withCredentials:l}=this.configuration;return this.httpClient.request("get",`${a}/ReportInboundRules/Pbx.GetInboundRulesData()`,{params:f.toHttpParams(),responseType:m,...l?{withCredentials:l}:{},headers:O,observe:r})}getInboundRulesDataQuery(i,r="body",T=!1,n){const u=i.$top,_=i.$skip,d=i.$search,$=i.$filter,w=i.$count,R=i.$select,f=i.$orderby,O=i.$expand;let M=new o.rx(this.encoder);return M=this.addToHttpParams(M,"$top",u,o.l2.Form,!1),M=this.addToHttpParams(M,"$skip",_,o.l2.Form,!1),M=this.addToHttpParams(M,"$search",d,o.l2.Form,!1),M=this.addToHttpParams(M,"$filter",$,o.l2.Form,!1),M=this.addToHttpParams(M,"$count",w,o.l2.Form,!1),M=this.addToHttpParams(M,"$select",R,o.l2.Form,!1),M=this.addToHttpParams(M,"$orderby",f,o.l2.Form,!1),M=this.addToHttpParams(M,"$expand",O,o.l2.Form,!1),"/ReportInboundRules/Pbx.GetInboundRulesData()?"+M.toString()}static \u0275fac=(()=>{let i;return function(T){return(i||(i=c.xGo(S)))(T||S)}})();static \u0275prov=p.jDH({token:S,factory:S.\u0275fac,providedIn:"root"})}return S})();var L=t(38357);let H=(()=>{class S{reportInboundRulesApiService=(0,p.WQX)(b);dataFetcher=(i,r)=>i.canViewReport?T=>T.pipe((0,C.n)(n=>this.requestInboundRules(i,n,r)),(0,A.T)(n=>n.value)):T=>T.pipe((0,C.n)(()=>(0,y.of)([])));requestInboundRules(i,r,T){const n=this.generateODataFilter(i).join(" and ");return this.reportInboundRulesApiService.getInboundRulesData({$skip:r*T,$top:T,...n?{$filter:n}:{}})}generateCSVDownloadLink(i){const r=this.generateODataFilter(i).join(" and ");return this.reportInboundRulesApiService.downloadInboundRulesQuery({...r?{$filter:r}:{}})}generateODataFilter(i){const r=[],T=(0,L.Y)((i.search??"").trim(),!0);return i.search&&T&&r.push(`contains(tolower(RuleName), '${T}') or contains(tolower(Trunk), '${T}') or contains(tolower(DID), '${T}') or contains(tolower(InOfficeRouting/Name), '${T}') or contains(tolower(OutOfficeRouting/Name), '${T}') or contains(tolower(InOfficeRouting/Number), '${T}') or contains(tolower(OutOfficeRouting/Number), '${T}')`),r}static \u0275fac=function(r){return new(r||S)};static \u0275prov=p.jDH({token:S,factory:S.\u0275fac})}return S})()},7259(te,k,t){t.d(k,{o:()=>o});var C=t(68018),y=t(35547);function A(g,c){1&g&&y.Hgh(0,"th",1)}let o=(()=>{class g{print;static \u0275fac=function(b){return new(b||g)};
1static \u0275cmp=y.VBU({type:g,selectors:[["app-outbound-calls-table-header"],["thead","app-outbound-calls-table-header",""]],inputs:{print:"print"},decls:38,vars:39,consts:[[1,"w-auto"],[1,"actions"]],template:function(b,L){1&b&&(y.rj2(0,"tr")(1,"th"),y.EFF(2),y.nI1(3,"translate"),y.eux(),y.rj2(4,"th"),y.EFF(5),y.nI1(6,"translate"),y.eux(),y.rj2(7,"th"),y.EFF(8),y.nI1(9,"translate"),y.eux(),y.rj2(10,"th"),y.EFF(11),y.nI1(12,"translate"),y.eux(),y.rj2(13,"th"),y.EFF(14),y.nI1(15,"translate"),y.eux(),y.rj2(16,"th"),y.EFF(17),y.nI1(18,"translate"),y.eux(),y.rj2(19,"th"),y.EFF(20),y.nI1(21,"translate"),y.eux(),y.rj2(22,"th"),y.EFF(23),y.nI1(24,"translate"),y.eux(),y.rj2(25,"th"),y.EFF(26),y.nI1(27,"translate"),y.eux(),y.rj2(28,"th"),y.EFF(29),y.nI1(30,"translate"),y.eux(),y.rj2(31,"th"),y.EFF(32),y.nI1(33,"translate"),y.eux(),y.rj2(34,"th",0),y.EFF(35),y.nI1(36,"translate"),y.eux(),y.nVh(37,A,1,0,"th",1),y.eux()),2&b&&(y.HbH(L.print?"print":"table-header"),y.R7$(2),y.JRh(y.bMT(3,15,"_i18n.ReportsCallTime")),y.R7$(3),y.JRh(y.bMT(6,17,"_i18n.Caller")),y.R7$(3),y.JRh(y.bMT(9,19,"_i18n.Callee")),y.R7$(3),y.JRh(y.bMT(12,21,"_i18n.ReportsTrunk")),y.R7$(3),y.JRh(y.bMT(15,23,"_i18n.ReportsStatus")),y.R7$(3),y.JRh(y.bMT(18,25,"_i18n.ReportsRinging")),y.R7$(3),y.JRh(y.bMT(21,27,"_i18n.ReportsTalking")),y.R7$(3),y.JRh(y.bMT(24,29,"_i18n.ReportsTotalDuration")),y.R7$(3),y.JRh(y.bMT(27,31,"_i18n.ReportsCost")),y.R7$(3),y.JRh(y.bMT(30,33,"_i18n.ReportsCallType")),y.R7$(3),y.JRh(y.bMT(33,35,"_i18n.Sentiment")),y.R7$(3),y.JRh(y.bMT(36,37,"_i18n.Transcription")),y.R7$(2),y.vxM(L.print?-1:37))},dependencies:[C.D9],styles:["[_nghost-%COMP%]{display:contents}"],changeDetection:0})}return g})()},87646(te,k,t){t.d(k,{r:()=>H});var C=t(85802),y=t(96704),A=t(78713),o=t(45764),g=t(60175),c=t(82207),p=t(35547);const b=["*"];function L(S,I){if(1&S){const i=p.RV6();p.rj2(0,"tr")(1,"td"),p.EFF(2),p.nI1(3,"appJsDateFormat"),p.nI1(4,"emptyValue"),p.eux(),p.rj2(5,"td"),p.EFF(6),p.nI1(7,"emptyValue"),p.eux(),p.rj2(8,"td"),p.EFF(9),p.nI1(10,"emptyValue"),p.eux(),p.rj2(11,"td"),p.EFF(12),p.nI1(13,"emptyValue"),p.eux(),p.rj2(14,"td"),p.EFF(15),p.nI1(16,"emptyValue"),p.eux(),p.rj2(17,"td"),p.EFF(18),p.nI1(19,"duration"),p.nI1(20,"emptyValue"),p.eux(),p.rj2(21,"td"),p.EFF(22),p.nI1(23,"duration"),p.nI1(24,"emptyValue"),p.eux(),p.rj2(25,"td"),p.EFF(26),p.nI1(27,"duration"),p.nI1(28,"emptyValue"),p.eux(),p.rj2(29,"td"),p.EFF(30),p.nI1(31,"decimal"),p.eux(),p.rj2(32,"td"),p.EFF(33),p.nI1(34,"emptyValue"),p.eux(),p.rj2(35,"td"),p.EFF(36),p.nI1(37,"emptyValue"),p.eux(),p.rj2(38,"td",1),p.VwU("click",function(){C.eBV(i);const T=p.XpG();return C.Njj(T.transcription(T.row))}),p.rj2(39,"span",2),p.EFF(40),p.nI1(41,"emptyValue"),p.eux()(),p.SdG(42),p.eux()}if(2&S){const i=p.XpG();p.AVh("print",i.print),p.R7$(2),p.JRh(p.bMT(4,16,p.bMT(3,14,i.row.StartTime))),p.R7$(4),p.JRh(p.bMT(7,18,i.row.SourceDisplayName)),p.R7$(3),p.JRh(p.bMT(10,20,i.row.DestinationDisplayName)),p.R7$(3),p.JRh(p.bMT(13,22,i.row.TrunkName)),p.R7$(3),p.JRh(p.bMT(16,24,i.row.Status)),p.R7$(3),p.JRh(p.bMT(20,28,p.bMT(19,26,i.row.RingingDuration))),p.R7$(4),p.JRh(p.bMT(24,32,p.bMT(23,30,i.row.TalkingDuration))),p.R7$(4),p.JRh(p.bMT(28,36,p.bMT(27,34,i.totalCallDurationSumInMilliseconds))),p.R7$(4),p.JRh(p.bMT(31,38,i.row.CallCost??0)),p.R7$(3),p.JRh(p.bMT(34,40,i.row.RuleName)),p.R7$(3),p.JRh(p.bMT(37,42,i.row.SentimentScore)),p.R7$(4),p.JRh(p.bMT(41,44,i.row.Transcription))}}let H=(()=>{class S{row;print;transcriptionService=(0,C.WQX)(c.I);get totalCallDurationSumInMilliseconds(){return(0,y.d)([this.row?.RingingDuration,this.row?.TalkingDuration])}transcription(i){i.Transcription&&this.transcriptionService.showTranscription(i.Transcription)}static \u0275fac=function(r){return new(r||S)};static \u0275cmp=p.VBU({type:S,selectors:[["app-outbound-calls-table-row"]],inputs:{row:"row",print:"print"},ngContentSelectors:b,decls:1,vars:1,consts:[[3,"print"],[1,"pointer",3,"click"],[1,"line-clamp-2"]],template:function(r,T){1&r&&(p.NAR(),p.nVh(0,L,43,46,"tr",0)),2&r&&p.vxM(T.row?0:-1)},dependencies:[y.bB,A.vE,o.N,g.Q],styles:["[_nghost-%COMP%]{display:contents}"],changeDetection:0})}return S})()},15518(te,k,t){t.d(k,{PH:()=>Y,lE:()=>N,bQ:()=>Z});var C=t(85802),y=t(17705),A=t(62329),o=t(74005),g=t(76415),c=t(47429),p=t(89417),b=t(62653),L=t(89755),H=t(83188),S=t(87019),I=t(59625),i=t(59882),r=t(84412),T=t(96354),n=t(85343),u=t(71747),_=t(56132),d=t(74651),$=t(6
17910),w=t(46179),R=t(38601),f=t(48643),O=t(91382),M=t(42610),m=t(58368),P=t(12426),a=t(4801),l=t(89079),e=t(54327);class s{dataSource;callsParameters;constructor(ie,J){this.dataSource=ie,this.callsParameters=J}resolveData(ie,J,oe,ne){if(!this.callsParameters||!this.callsParameters.canViewReport)return(0,e.BY)();const re=ie-1;return this.dataSource.requestCalls(this.callsParameters,re,J+1,re*J).pipe((0,T.T)(me=>(0,e.ro)(ie,J,me.value)))}}var h=t(7259),x=t(87646),E=t(29325),B=t(68018),j=t(32732),v=t(96697),Q=t(65562),V=t(18103),W=t(82207),U=t(49769),K=t(96106),D=t(35547);function q(z,ie){if(1&z){const J=D.RV6();D.j41(0,"app-outbound-calls-table-row",9)(1,"td",12)(2,"button",13),D.nI1(3,"translate"),D.bIt("click",function(ne){const re=C.eBV(J).$implicit;return D.XpG().summary(re),ne.stopPropagation(),C.Njj(ne.preventDefault())}),D.k0s(),D.j41(4,"row-action-button",14)(5,"li",15)(6,"button",16),D.bIt("click",function(){const ne=C.eBV(J).$implicit,re=D.XpG();return C.Njj(re.reportsRecordingService.downloadRecordingById(ne.RecordingId))}),D.k0s()(),D.j41(7,"li",15)(8,"button",17),D.bIt("click",function(){const ne=C.eBV(J).$implicit,re=D.XpG();return C.Njj(re.reportsRecordingService.playRecordingById(ne.RecordingId))}),D.k0s()(),D.j41(9,"li",15)(10,"button",18),D.bIt("click",function(){const ne=C.eBV(J).$implicit,re=D.XpG();return C.Njj(re.requestCallReport(ne))}),D.k0s()(),D.j41(11,"li",15)(12,"button",19),D.bIt("click",function(){const ne=C.eBV(J).$implicit,re=D.XpG();return C.Njj(re.transcription(ne))}),D.k0s()(),D.j41(13,"li",15)(14,"button",20),D.bIt("click",function(){const ne=C.eBV(J).$implicit,re=D.XpG();return C.Njj(re.summary(ne))}),D.k0s()()()()()}if(2&z){const J=ie.$implicit,oe=D.XpG();D.Y8G("row",J),D.R7$(2),D.Y8G("disabled",!(J.Summary&&!oe.isSummaryNotApplicable(J)))("title",D.bMT(3,24,"_i18n.Summary")),D.R7$(2),D.Y8G("isLarge",!0),D.R7$(),D.AVh("disabled",!J.RecordingId),D.R7$(),D.Y8G("disabled",!J.RecordingId)("translate","_i18n.Download"),D.R7$(),D.AVh("disabled",!J.RecordingId),D.R7$(),D.Y8G("disabled",!J.RecordingId)("translate","_i18n.PlayRecording"),D.R7$(),D.AVh("disabled",!J.QualityReport),D.R7$(),D.Y8G("disabled",!J.QualityReport)("translate","_i18n.CQReportShowTitle"),D.R7$(),D.AVh("disabled",!J.Transcription),D.R7$(),D.Y8G("disabled",!J.Transcription)("translate","_i18n.Transcription"),D.R7$(),D.AVh("disabled",!J.Summary||oe.isSummaryNotApplicable(J)),D.R7$(),D.Y8G("disabled",!J.Summary||oe.isSummaryNotApplicable(J))("translate","_i18n.Summary")}}function G(z,ie){1&z&&(D.j41(0,"tr")(1,"td",10),D.nrm(2,"div",21),D.k0s()())}function F(z,ie){if(1&z&&(D.j41(0,"tr")(1,"td",22),D.EFF(2),D.nI1(3,"translate"),D.k0s()()),2&z){const J=D.XpG();D.R7$(2),D.SpI(" ",D.bMT(3,1,J.noDataMessage(!J.isReportAvailable))," ")}}function N(){return new p.gE({dateRange:new p.MJ(new A.J,{nonNullable:!0}),callType:new p.MJ((0,$.E)(),{nonNullable:!0}),pbxPeers:new p.MJ(new b.X("_i18n.Trunks","trunks","pbxPeers",[u.J.ExternalLine],{pbxPeers:null},"_i18n.Any",!0),{nonNullable:!0})})}function Z(z,ie,J=!0){const{dateRange:oe,callType:ne,pbxPeers:re}=z;return{...oe.value,...re.value,callType:ne.value.selectedValue,search:ie,canViewReport:J}}let Y=(()=>{class z{localStorageService=(0,C.WQX)(P.sj);cd=(0,C.WQX)(y.gRc);dataSource=(0,C.WQX)(w.T);route=(0,C.WQX)(i.nX);router=(0,C.WQX)(i.Ix);destroy$=(0,C.WQX)(C.abz);modalService=(0,C.WQX)(R.B);fileDownloadService=(0,C.WQX)(f.y);transcriptionService=(0,C.WQX)(W.I);callLogDataApiService=(0,C.WQX)(_.Q);reportsRecordingService=(0,C.WQX)(V.M);scheduledReportType=d.G.OutBoundCalls;parameters$=new r.t(null);firstTrunk=this.route.snapshot.data.firstTrunk;canViewReport=null!=this.firstTrunk;searchText=new p.MJ("");filter=N();pager;calls;get parameters(){return Z(this.filter.value,this.searchText.value,this.isReportAvailable)}get isReportAvailable(){return this.route.snapshot.data.reportsAvailable}constructor(){const J=this.parameters$.pipe((0,T.T)(oe=>new s(this.dataSource,oe)));
1this.pager=new a.f(this.destroy$,J,void 0,this.getStoredPageSize()),this.pager.pagedItems$.pipe((0,l.pQ)(this.destroy$)).subscribe({next:oe=>{this.updateItems(oe)},error:oe=>this.modalService.error(oe)})}identify(J,oe){return J+(oe.CdrId??"")}updateItems(J){this.calls=J.value??[],this.cd.markForCheck()}getStoredPageSize(){const J=this.localStorageService.retrieve(M.Hh.ReportPageSize);return J?+J:m.n}onPageSizeChange(J){this.localStorageService.store(M.Hh.ReportPageSize,J),this.pager.pageSizeChanged(J)}noDataMessage=e.Ns;transcription(J){J.Transcription&&this.transcriptionService.showTranscription(J.Transcription)}isSummaryNotApplicable(J){return"N/A"===J.Summary?.trim()}summary(J){!J.Summary||this.isSummaryNotApplicable(J)||this.transcriptionService.showTranscription(J.Summary,"_i18n.Summary")}requestCallReport(J){!J.CdrId||!J.DestinationDn||!J.SourceDn||this.callLogDataApiService.getCallQualityReport({cdrId:J.CdrId,dstNumber:J.DestinationDn,srcNumber:J.SourceDn,srcCallerId:J.SourceCallerId??null,dstCallerId:J.De
1stinationCalleeId??null}).pipe((0,v.s)(1),(0,K.Pr)("_i18n.CallQualityReportNotFoundErrorMessage"),(0,l.pQ)(this.destroy$)).subscribe({next:oe=>{this.modalService.showDialog(Q.n,{qualityReport:oe})},error:oe=>this.modalService.error(oe)})}submitFilter(){this.parameters$.next(this.parameters)}onSaveReport(J){(0,O.J)(this.modalService,this.scheduledReportType,J,this.dataSource.generateReportParams(this.parameters))}downloadCsv(){this.fileDownloadService.download(this.dataSource.generateCSVDownloadLink(this.parameters))}back(){this.router.navigate([".."],{relativeTo:this.route}).catch(n.l)}static \u0275fac=function(oe){return new(oe||z)};static \u0275cmp=D.VBU({type:z,selectors:[["ng-component"]],features:[D.Jv_([w.T])],decls:22,vars:22,consts:[["header","_i18n.OutboundCalls",3,"back","helpUrl"],["header","",3,"exportClicked","disabled","showReportPrint"],["top-bar","",3,"filterChanged","saveReport","search","filterForm","formGroup","reportType","disabled"],["formControlName","dateRange"],["formControlName","pbxPeers","placeholder","_i18n.Any",3,"allowEmpty"],["formControlName","callType"],[1,"h-100","scrollable-table"],["id","scrollableList"],["app-outbound-calls-table-header",""],[3,"row"],["colspan","13"],[3,"pageChanged","itemsPerPageChanged","showPageSizes","currentPage","itemsPerPage","totalItems"],["data-qa","actions","nowrap","",1,"actions"],["data-qa","transcription","type","button","app-waveform-lines-solid-icon","",1,"btn","btn-plain",3,"click","disabled","title"],[3,"isLarge"],["role","menuitem"],["type","button","data-qa","download",1,"dropdown-item",3,"click","disabled","translate"],["type","button","data-qa","play",1,"dropdown-item",3,"click","disabled","translate"],["type","button","data-qa","quality-report",1,"dropdown-item",3,"click","disabled","translate"],["type","button","data-qa","transcription",1,"dropdown-item",3,"click","disabled","translate"],["type","button","data-qa","summary",1,"dropdown-item",3,"click","disabled","translate"],[1,"loader"],["colspan","13",1,"text-center"]],template:function(oe,ne){1&oe&&(D.j41(0,"app-page",0),D.bIt("back",function(){return ne.back()}),D.j41(1,"app-report-action-buttons",1),D.bIt("exportClicked",function(){return ne.downloadCsv()}),D.k0s(),D.j41(2,"app-complex-filter",2),D.bIt("filterChanged",function(){return ne.submitFilter()})("saveReport",function(me){return ne.onSaveReport(me)}),D.nrm(3,"app-date-range-filter",3)(4,"app-multi-peer-filter",4)(5,"app-enum-filter",5),D.k0s(),D.j41(6,"div",6)(7,"table",7),D.nrm(8,"thead",8),D.j41(9,"tbody"),D.Z7z(10,q,15,26,"app-outbound-calls-table-row",9,ne.identify,!0),D.nVh(12,G,3,0,"tr"),D.nI1(13,"async"),D.vZN(14,F,4,3,"tr"),D.k0s(),D.j41(15,"tfoot")(16,"tr")(17,"td",10)(18,"app-paging",11),D.nI1(19,"async"),D.nI1(20,"async"),D.nI1(21,"async"),D.bIt("pageChanged",function(me){return ne.pager.pageChanged(me)})("itemsPerPageChanged",function(me){return ne.onPageSizeChange(me)}),D.k0s()()()()()()()),2&oe&&(D.Y8G("helpUrl","_i18n.ReportsUri"),D.R7$(),D.Y8G("disabled",!ne.canViewReport||!ne.isReportAvailable)("showReportPrint",!0),D.R7$(),D.Y8G("search",ne.searchText)("filterForm",ne.filter)("formGroup",ne.filter)("reportType",ne.scheduledReportType)("disabled",!ne.isReportAvailable),D.R7$(2),D.Y8G("allowEmpty",!0),D.R7$(6),D.Dyx(ne.calls),D.R7$(2),D.vxM(ne.calls&&0!==ne.calls.length||!D.bMT(13,14,ne.pager.filterLoading$)||!ne.isReportAvailable?ne.calls&&0===ne.calls.length?14:-1:12),D.R7$(6),D.Y8G("showPageSizes",!0)("currentPage",D.bMT(19,16,ne.pager.currentPage$))("itemsPerPage",D.bMT(20,18,ne.pager.pageSize$))("totalItems",D.bMT(21,20,ne.pager.totalCount$)))},dependencies:[o.M,g.B,p.YN,p.BC,p.cb,L.b,H.H,p.X1,p.j4,p.JD,I.n,c.j,h.o,x.r,E.I,B.h,B.Mm,j.O,S.u4,B.D9,U.Jj],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}']})}return z})()},46179(te,k,t){t.d(k,{T:()=>S});var C=t(85802),y=t(96794),A=t(38357),o=t(25558),g=t(96354),c=t(7673),p=t(97201),b=t(4499),L=t(35547);let H=(()=>{class I extends b.d{downloadGetOutboundCalls(r,T="body"){const n=r?.periodFrom;
1if(null==n)throw new Error("Required parameter periodFrom was null or undefined when calling downloadGetOutboundCalls.");const u=r?.periodTo;if(null==u)throw new Error("Required parameter periodTo was null or undefined when calling downloadGetOutboundCalls.");const _=r?.trunkDns;if(null==_)throw new Error("Required parameter trunkDns was null or undefined when calling downloadGetOutboundCalls.");const d=r?.callsType;if(null==d)throw new Error("Required parameter callsType was null or undefined when calling downloadGetOutboundCalls.");const $=r?.clientTimeZone;if(null==$)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadGetOutboundCalls.");const w=r?.$top,R=r?.$skip,f=r?.$search,O=r?.$filter,M=r?.$count,m=r?.$select,P=r?.$orderby,a=r?.$expand;let l=new p.rx(this.encoder);l=this.addToHttpParams(l,"$top",w,p.l2.Form,!1),l=this.addToHttpParams(l,"$skip",R,p.l2.Form,!1),l=this.addToHttpParams(l,"$search",f,p.l2.Form,!1),l=this.addToHttpParams(l,"$filter",O,p.l2.Form,!1),l=this.addToHttpParams(l,"$count",M,p.l2.Form,!1),l=this.addToHttpParams(l,"$select",m,p.l2.Form,!1),l=this.addToHttpParams(l,"$orderby",P,p.l2.Form,!1),l=this.addToHttpParams(l,"$expand",a,p.l2.Form,!1);let e=this.defaultHeaders;e=this.configuration.addCredentialToHeaders("Application","Authorization",e,"Bearer ");const s=this.configuration.selectHeaderAccept(["application/json"]);void 0!==s&&(e=e.set("Accept",s));let h="json";s&&(h=s.startsWith("text")?"text":this.configuration.isJsonMime(s)?"json":"blob");let x=`/ReportOutboundCalls/Pbx.DownloadGetOutboundCalls(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},trunkDns=${this.configuration.encodeParam({name:"trunkDns",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},callsType=${this.configuration.encodeParam({name:"callsType",value:d,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:E,withCredentials:B}=this.configuration;return this.httpClient.request("get",`${E}${x}`,{params:l.toHttpParams(),responseType:h,...B?{withCredentials:B}:{},headers:e,observe:T})}downloadGetOutboundCallsQuery(r,T="body",n=!1,u){const _=r.periodFrom;if(null==_)throw new Error("Required parameter periodFrom was null or undefined when calling downloadGetOutboundCalls.");const d=r.periodTo;if(null==d)throw new Error("Required parameter periodTo was null or undefined when calling downloadGetOutboundCalls.");const $=r.trunkDns;if(null==$)throw new Error("Required parameter trunkDns was null or undefined when calling downloadGetOutboundCalls.");const w=r.callsType;if(null==w)throw new Error("Required parameter callsType was null or undefined when calling downloadGetOutboundCalls.");const R=r.clientTimeZone;if(null==R)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadGetOutboundCalls.");const f=r.$top,O=r.$skip,M=r.$search,m=r.$filter,P=r.$count,a=r.$select,l=r.$orderby,e=r.$expand;let s=new p.rx(this.encoder);return s=this.addToHttpParams(s,"$top",f,p.l2.Form,!1),s=this.addToHttpParams(s,"$skip",O,p.l2.Form,!1),s=this.addToHttpParams(s,"$search",M,p.l2.Form,!1),s=this.addToHttpParams(s,"$filter",m,p.l2.Form,!1),s=this.addToHttpParams(s,"$count",P,p.l2.Form,!1),s=this.addToHttpParams(s,"$select",a,p.l2.Form,!1),s=this.addToHttpParams(s,"$orderby",l,p.l2.Form,!1),s=this.addToHttpParams(s,"$expand",e,p.l2.Form,!1),`/ReportOutboundCalls/Pbx.DownloadGetOutboundCalls(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},trunkDns=${this.configuration.encodeParam({name:"trunkDns",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},callsType=${this.configuration.encodeParam({name:"callsType",value:w,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+s.toString()}getOutboundCalls(r,T="body"){const n=r?.periodFrom;
1if(null==n)throw new Error("Required parameter periodFrom was null or undefined when calling getOutboundCalls.");const u=r?.periodTo;if(null==u)throw new Error("Required parameter periodTo was null or undefined when calling getOutboundCalls.");const _=r?.trunkDns;if(null==_)throw new Error("Required parameter trunkDns was null or undefined when calling getOutboundCalls.");const d=r?.callsType;if(null==d)throw new Error("Required parameter callsType was null or undefined when calling getOutboundCalls.");const $=r?.$top,w=r?.$skip,R=r?.$search,f=r?.$filter,O=r?.$count,M=r?.$select,m=r?.$orderby,P=r?.$expand;let a=new p.rx(this.encoder);a=this.addToHttpParams(a,"$top",$,p.l2.Form,!1),a=this.addToHttpParams(a,"$skip",w,p.l2.Form,!1),a=this.addToHttpParams(a,"$search",R,p.l2.Form,!1),a=this.addToHttpParams(a,"$filter",f,p.l2.Form,!1),a=this.addToHttpParams(a,"$count",O,p.l2.Form,!1),a=this.addToHttpParams(a,"$select",M,p.l2.Form,!1),a=this.addToHttpParams(a,"$orderby",m,p.l2.Form,!1),a=this.addToHttpParams(a,"$expand",P,p.l2.Form,!1);let l=this.defaultHeaders;l=this.configuration.addCredentialToHeaders("Application","Authorization",l,"Bearer ");const e=this.configuration.selectHeaderAccept(["application/json"]);void 0!==e&&(l=l.set("Accept",e));let s="json";e&&(s=e.startsWith("text")?"text":this.configuration.isJsonMime(e)?"json":"blob");let h=`/ReportOutboundCalls/Pbx.GetOutboundCalls(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},trunkDns=${this.configuration.encodeParam({name:"trunkDns",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},callsType=${this.configuration.encodeParam({name:"callsType",value:d,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:x,withCredentials:E}=this.configuration;return this.httpClient.request("get",`${x}${h}`,{params:a.toHttpParams(),responseType:s,...E?{withCredentials:E}:{},headers:l,observe:T})}getOutboundCallsQuery(r,T="body",n=!1,u){const _=r.periodFrom;if(null==_)throw new Error("Required parameter periodFrom was null or undefined when calling getOutboundCalls.");const d=r.periodTo;if(null==d)throw new Error("Required parameter periodTo was null or undefined when calling getOutboundCalls.");const $=r.trunkDns;if(null==$)throw new Error("Required parameter trunkDns was null or undefined when calling getOutboundCalls.");const w=r.callsType;if(null==w)throw new Error("Required parameter callsType was null or undefined when calling getOutboundCalls.");const R=r.$top,f=r.$skip,O=r.$search,M=r.$filter,m=r.$count,P=r.$select,a=r.$orderby,l=r.$expand;let e=new p.rx(this.encoder);return e=this.addToHttpParams(e,"$top",R,p.l2.Form,!1),e=this.addToHttpParams(e,"$skip",f,p.l2.Form,!1),e=this.addToHttpParams(e,"$search",O,p.l2.Form,!1),e=this.addToHttpParams(e,"$filter",M,p.l2.Form,!1),e=this.addToHttpParams(e,"$count",m,p.l2.Form,!1),e=this.addToHttpParams(e,"$select",P,p.l2.Form,!1),e=this.addToHttpParams(e,"$orderby",a,p.l2.Form,!1),e=this.addToHttpParams(e,"$expand",l,p.l2.Form,!1),`/ReportOutboundCalls/Pbx.GetOutboundCalls(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},trunkDns=${this.configuration.encodeParam({name:"trunkDns",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},callsType=${this.configuration.encodeParam({name:"callsType",value:w,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})?`+e.toString()}static \u0275fac=(()=>{let r;return function(n){return(r||(r=L.xGo(I)))(n||I)}})();static \u0275prov=C.jDH({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})(),S=(()=>{class I{reportOutboundCallsApiService=(0,C.WQX)(H);dataFetcher=(r,T)=>r.canViewReport?n=>n.pipe((0,o.n)(u=>this.requestCalls(r,u,T)),(0,g.T)(u=>u.value)):n=>n.pipe((0,o.n)(()=>(0,c.of)([])));requestCalls(r,T,n,u){return this.reportOutboundCallsApiService.getOutboundCalls({$skip:u??T*n,$top:n,...(0,y.Rx)(r),trunkDns:r.pbxPeers?.map(_=>
1_.Number).filter(Boolean).join(" ")??"",callsType:r.callType,$search:(0,A.Bj)(r.search?.toLowerCase())})}generateCSVDownloadLink(r){return this.reportOutboundCallsApiService.downloadGetOutboundCallsQuery({...(0,y.Rx)(r),trunkDns:r.pbxPeers?.map(T=>T.Number).filter(Boolean).join(" ")??"",callsType:r.callType,clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,$search:(0,A.Bj)(r.search?.toLowerCase())})}generateReportParams(r){return JSON.stringify({PeriodFrom:r.periodFromTo[0],PeriodTo:r.periodFromTo[1],DateRangeType:r.periodType,FirstDayOfWeek:r.firstWeekDay,TrunksDns:r.pbxPeers?.map(T=>T.Number).filter(Boolean).join(" ")??"",CallsType:r.callType,Search:(r.search??"").trim().toLowerCase()})}static \u0275fac=function(T){return new(T||I)};static \u0275prov=C.jDH({token:I,factory:I.\u0275fac})}return I})()},4164(te,k,t){t.d(k,{bQ:()=>U,lE:()=>W,xb:()=>K});var C=t(85802),y=t(84412),A=t(85343),o=t(89417),g=t(59882),c=t(18676),p=t(71747),b=t(74651),L=t(79997),H=t(96354),S=t(38601),I=t(54327),i=t(48643),r=t(62329),T=t(82286),n=t(83188),u=t(59625),_=t(74005),d=t(76415),$=t(47429),w=t(22429),R=t(68018),f=t(49769),O=t(78713),M=t(91382),m=t(62653),P=t(89755),a=t(35547);const l=(D,q)=>[D,q];function e(D,q){if(1&D&&(a.j41(0,"tr",13)(1,"td"),a.EFF(2),a.k0s(),a.j41(3,"td"),a.EFF(4),a.nI1(5,"emptyValue"),a.k0s(),a.j41(6,"td"),a.EFF(7),a.nI1(8,"emptyValue"),a.k0s()()),2&D){const G=q.$implicit,F=a.XpG(5);a.R7$(2),a.SpI("",F.formatAndJoinValues(a.l_i(7,l,G.Dn,G.DnDisplayName))," "),a.R7$(2),a.JRh(a.bMT(5,3,null==G?null:G.AnsweredCount)),a.R7$(3),a.JRh(a.bMT(8,5,null==G?null:G.DealtWithCount))}}function s(D,q){1&D&&(a.j41(0,"tr")(1,"td",14),a.nrm(2,"div",15),a.k0s()())}function h(D,q){if(1&D){const G=a.RV6();a.j41(0,"tr")(1,"td",14)(2,"a",16),a.bIt("click",function(){C.eBV(G);const N=a.XpG(2);return C.Njj(N.nextPage$.next())}),a.EFF(3),a.nI1(4,"translate"),a.k0s()()()}2&D&&(a.R7$(3),a.SpI(" ",a.bMT(4,1,"_i18n.ReportsShowMore")," "))}function x(D,q){if(1&D&&(a.j41(0,"tr")(1,"td",14),a.EFF(2),a.nI1(3,"translate"),a.k0s()()),2&D){const G=a.XpG(5);a.R7$(2),a.SpI(" ",a.bMT(3,1,G.noDataMessage())," ")}}function E(D,q){if(1&D&&(a.Z7z(0,e,9,10,"tr",13,a.fX1),a.nVh(2,s,3,0,"tr")(3,h,5,3,"tr")(4,x,4,3,"tr")),2&D){const G=q;a.Dyx(G.data),a.R7$(2),a.vxM(G.isLoading?2:G.hasMore?3:G.data.length?-1:4)}}function B(D,q){if(1&D&&(a.nVh(0,E,5,1),a.nI1(1,"async")),2&D){let G;a.vxM((G=a.bMT(1,1,q.paginator$))?0:-1,G)}}function j(D,q){if(1&D){const G=a.RV6();a.j41(0,"tr",10),a.bIt("click",function(){const N=C.eBV(G).$implicit,Z=a.XpG(2);return C.Njj(Z.onGroupClick(N.queue.Number))}),a.j41(1,"td",11),a.nrm(2,"span",12),a.EFF(3),a.k0s(),a.j41(4,"td"),a.EFF(5),a.nI1(6,"emptyValue"),a.k0s(),a.j41(7,"td"),a.EFF(8),a.nI1(9,"emptyValue"),a.k0s()(),a.nVh(10,B,2,3)}if(2&D){let G;const F=q.$implicit,N=a.XpG(2);a.R7$(2),a.AVh("dropdown-arrow-icon-rotated",!N.expandedGroups.has(F.queue.Number)),a.R7$(),a.SpI(" ",N.formatAndJoinValues(a.l_i(10,l,F.queue.Number,F.queue.Name))," "),a.R7$(2),a.JRh(a.bMT(6,6,null==F.statistics?null:F.statistics.AnsweredCount)),a.R7$(3),a.JRh(a.bMT(9,8,null==F.statistics?null:F.statistics.DealtWithCount)),a.R7$(2),a.vxM((G=N.expandedGroups.get(F.queue.Number))?10:-1,G)}}function v(D,q){1&D&&(a.j41(0,"tr")(1,"td",17),a.nrm(2,"div",15),a.k0s()())}function Q(D,q){if(1&D&&(a.j41(0,"tr")(1,"td",14),a.EFF(2),a.nI1(3,"translate"),a.k0s()()),2&D){const G=a.XpG(2);a.R7$(2),a.SpI(" ",a.bMT(3,1,G.noDataMessage(!G.isReportAvailable))," ")}}function V(D,q){if(1&D){const G=a.RV6();a.j41(0,"div",8),a.bIt("infiniteScrollCallback",function(){C.eBV(G);const N=a.XpG();return C.Njj(N.nextPage$.next())}),a.j41(1,"table")(2,"thead")(3,"tr",9)(4,"th"),a.EFF(5),a.nI1(6,"translate"),a.k0s(),a.j41(7,"th"),a.EFF(8),a.nI1(9,"translate"),a.k0s(),a.j41(10,"th"),a.EFF(11),a.nI1(12,"translate"),a.k0s()()(),a.j41(13,"tbody"),a.Z7z(14,j,11,13,null,null,a.fX1),a.nVh(16,v,3,0,"tr")(17,Q,4,3,"tr"),a.k0s()()()}if(2&D){const G=q;a.Y8G("infiniteScrollContainer","#scrollableList")("infiniteScrollDistance",1)("infiniteScrollDisabled",!G.hasMore||G.isLoading),a.R7$(5),a.JRh(a.bMT(6,7,"_i18n.ReportsQueue")),a.R7$(3),a.JRh(a.bMT(9,9,"_i18n.ReportsAnswered")),a.R7$(3),a.JRh(a.bMT(12,11,"_i18n.ReportsDealWith")),a.R7$(3),a.Dyx(G.data),a.R7$(2),a.vxM(G.hasMore?16:G.isLoading||G.data.length?-1:17)}}function W(){return new o.gE({dateRange:new o.MJ(new r.J,{nonNullable:!0}),participant:new o.MJ((0,T.HX)(),{nonNullable:!0}),pbxPeers:new o.MJ(new m.X("_i18n.ReportsQueues","queue","pbxPeers",[p.J.Queue],{pbxPeers:null},"_i18n.Any",!0),{nonNullable:!0})})}function U(D,q=!0){const{dateRange:G,pbxPeers:F,participant:N}=D;return{...G.value,participant:N.value.selectedValue,...F.value,canViewReport:q}}let K=(()=>{class D{dataSource=(0,C.WQX)(c.v);route=(0,C.WQX)(g.nX);router=(0,C.WQX)(g.Ix);destroy$=(0,C.WQX)(C.abz);fileDownloadService=(0,C.WQX)(i.y);modalService=(0,C.WQX)(S.B);paginator$;hasMoreOrLoading$;parameters$=new y.t(null);nextPage$=new y.t(void 0);reset$=new y.t(void 0);filter=W();expandedGroups=new Map;scheduledReportType=b.G.QueueAgentsChat;
1get isReportAvailable(){return this.route.snapshot.data.reportsAvailable}get parameters(){return U(this.filter.value,this.isReportAvailable)}constructor(){this.paginator$=(0,L.K)(this.modalService,this.destroy$,this.parameters$,this.nextPage$,this.reset$,this.dataSource.queuesDataFetcher,100),this.hasMoreOrLoading$=this.paginator$.pipe((0,H.T)(G=>!G.hasMore||G.isLoading))}onGroupClick(G){if(this.expandedGroups.has(G))this.expandedGroups.delete(G);else{const F=new y.t(void 0),N=new y.t(void 0),Z=(0,L.K)(this.modalService,this.destroy$,this.parameters$,this.nextPage$,this.reset$,this.dataSource.createQueueAgentsDataFetcher(G),100);this.expandedGroups.set(G,{nextPage$:F,reset$:N,paginator$:Z})}}submitFilter(){this.expandedGroups.clear(),setTimeout(()=>{this.parameters$.next(this.parameters)},100)}downloadCsv(){this.fileDownloadService.download(this.dataSource.generateCSVDownloadLink(this.parameters))}onSaveReport(G){(0,M.J)(this.modalService,this.scheduledReportType,G,this.dataSource.generateReportParams(this.parameters))}back(){this.router.navigate([".."],{relativeTo:this.route}).catch(A.l)}noDataMessage=I.Ns;formatAndJoinValues=I.pk;static \u0275fac=function(F){return new(F||D)};static \u0275cmp=a.VBU({type:D,selectors:[["ng-component"]],features:[a.Jv_([c.v])],decls:9,vars:11,consts:[["header","_i18n.QueueAgentsChat",3,"back","helpUrl"],["header","",3,"exportClicked","disabled","showReportPrint"],["top-bar","",3,"filterChanged","saveReport","filterForm","formGroup","reportType","disabled"],["formControlName","dateRange"],["formControlName","participant"],["formControlName","pbxPeers","placeholder","_i18n.Any",3,"allowEmpty"],["id","scrollableList",1,"h-100","scrollable-table","grouped-table"],["infiniteScroll","",3,"infiniteScrollContainer","infiniteScrollDistance","infiniteScrollDisabled"],["infiniteScroll","",3,"infiniteScrollCallback","infiniteScrollContainer","infiniteScrollDistance","infiniteScrollDisabled"],["id","tableHeader",1,"table-header"],[1,"table-group-header",3,"click"],["nowrap",""],[1,"dropdown-arrow-icon"],[1,"table-group-row","text-md-nowrap"],["colspan","3",1,"text-center"],[1,"loader"],[1,"dashed","link",3,"click"],["colspan","4",1,"text-center"]],template:function(F,N){if(1&F&&(a.j41(0,"app-page",0),a.bIt("back",function(){return N.back()}),a.j41(1,"app-report-action-buttons",1),a.bIt("exportClicked",function(){return N.downloadCsv()}),a.k0s(),a.j41(2,"app-complex-filter",2),a.bIt("filterChanged",function(){return N.submitFilter()})("saveReport",function(Y){return N.onSaveReport(Y)}),a.nrm(3,"app-date-range-filter",3)(4,"app-enum-filter",4)(5,"app-multi-peer-filter",5),a.k0s(),a.j41(6,"div",6),a.nVh(7,V,18,13,"div",7),a.nI1(8,"async"),a.k0s()()),2&F){let Z;a.Y8G("helpUrl","_i18n.ReportsUri"),a.R7$(),a.Y8G("disabled",!N.isReportAvailable)("showReportPrint",!0),a.R7$(),a.Y8G("filterForm",N.filter)("formGroup",N.filter)("reportType",N.scheduledReportType)("disabled",!N.isReportAvailable),a.R7$(3),a.Y8G("allowEmpty",!0),a.R7$(2),a.vxM((Z=a.bMT(8,9,N.paginator$))?7:-1,Z)}},dependencies:[n.H,u.n,_.M,o.X1,o.BC,o.cb,o.j4,o.JD,d.B,$.j,w.D,P.b,R.D9,f.Jj,O.vE],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}']})}return D})()},18676(te,k,t){t.d(k,{v:()=>i});var C=t(25558),y=t(27468),A=t(7673),o=t(96354),g=t(2793),c=t(97201),p=t(4499),b=t(35547),L=t(85802);let H=(()=>{class r extends p.d{downloadQueueAgentsChatStatistics(n,u="body"){const _=n?.queueDnStr;if(null==_)throw new Error("Required parameter queueDnStr was null or undefined when calling downloadQueueAgentsChatStatistics.");const d=n?.startDt;if(null==d)throw new Error("Required parameter startDt was null or undefined when calling downloadQueueAgentsChatStatistics.");const $=n?.endDt;if(null==$)throw new Error("Required parameter endDt was null or undefined when calling downloadQueueAgentsChatStatistics.");const w=n?.participantType;if(null==w)throw new Error("Required parameter participantType was null or undefined when calling downloadQueueAgentsChatStatistics.");const R=n?.$top,f=n?.$skip,O=n?.$search,M=n?.$filter,m=n?.$count,P=n?.$select,a=n?.$orderby,l=n?.$expand;let e=new c.rx(this.encoder);e=this.addToHttpParams(e,"$top",R,c.l2.Form,!1),e=this.addToHttpParams(e,"$skip",f,c.l2.Form,!1),e=this.addToHttpParams(e,"$search",O,c.l2.Form,!1),e=this.addToHttpParams(e,"$filter",M,c.l2.Form,!1),e=this.addToHttpParams(e,"$count",m,c.l2.Form,!1),e=this.addToHttpParams(e,"$select",P,c.l2.Form,!1),e=this.addToHttpParams(e,"$orderby",a,c.l2.Form,!1),e=this.addToHttpParams(e,"$expand",l,c.l2.Form,!1);let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(s=s.set("Accept",h));let x="json";h&&(x=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");let E=`/ReportQueueAgentsChatStatistics/Pbx.DownloadQueueAgentsChatStatistics(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},participantType=${this.configuration.encodeParam({name:"participantType",value:w,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:B,withCredentials:j}=this.configuration;return this.httpClient.request("get",`${B}${E}`,{params:e.toHttpParams(),responseType:x,...j?{withCredentials:j}:{},headers:s,observe:u})}downloadQueueAgentsChatStatisticsQuery(n,u="body",_=!1,d){const $=n.queueDnStr;if(null==$)throw new Error("Required parameter queueDnStr was null or undefined when calling downloadQueueAgentsChatStatistics.");const w=n.startDt;if(null==w)throw new Error("Required parameter startDt was null or undefined when calling downloadQueueAgentsChatStatistics.");const R=n.endDt;if(null==R)throw new Error("Required parameter endDt was null or undefined when calling downloadQueueAgentsChatStatistics.");const f=n.participantType;if(null==f)throw new Error("Required parameter participantType was null or undefined when calling downloadQueueAgentsChatStatistics.");const O=n.$top,M=n.$skip,m=n.$search,P=n.$filter,a=n.$count,l=n.$select,e=n.$orderby,s=n.$expand;let h=new c.rx(this.encoder);return h=this.addToHttpParams(h,"$top",O,c.l2.Form,!1),h=this.addToHttpParams(h,"$skip",M,c.l2.Form,!1),h=this.addToHttpParams(h,"$search",m,c.l2.Form,!1),h=this.addToHttpParams(h,"$filter",P,c.l2.Form,!1),h=this.addToHttpParams(h,"$count",a,c.l2.Form,!1),h=this.addToHttpParams(h,"$select",l,c.l2.Form,!1),h=this.addToHttpParams(h,"$orderby",e,c.l2.Form,!1),h=this.addToHttpParams(h,"$expand",s,c.l2.Form,!1),`/ReportQueueAgentsChatStatistics/Pbx.DownloadQueueAgentsChatStatistics(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},participantType=${this.configuration.encodeParam({name:"participantType",value:f,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})?`+h.toString()}getQueueAgentsChatStatisticsData(n,u="body"){const _=n?.queueDnStr;if(null==_)throw new Error("Required parameter queueDnStr was null or undefined when calling getQueueAgentsChatStatisticsData.");const d=n?.startDt;if(null==d)throw new Error("Required parameter startDt was null or undefined when calling getQueueAgentsChatStatisticsData.");const $=n?.endDt;if(null==$)throw new Error("Required parameter endDt was null or undefined when calling getQueueAgentsChatStatisticsData.");const w=n?.participantType;if(null==w)throw new Error("Required parameter participantType was null or undefined when calling getQueueAgentsChatStatisticsData.");const R=n?.$top,f=n?.$skip,O=n?.$search,M=n?.$filter,m=n?.$count,P=n?.$select,a=n?.$orderby,l=n?.$expand;let e=new c.rx(this.encoder);e=this.addToHttpParams(e,"$top",R,c.l2.Form,!1),e=this.addToHttpParams(e,"$skip",f,c.l2.Form,!1),e=this.addToHttpParams(e,"$search",O,c.l2.Form,!1),e=this.addToHttpParams(e,"$filter",M,c.l2.Form,!1),e=this.addToHttpParams(e,"$count",m,c.l2.Form,!1),e=this.addToHttpParams(e,"$select",P,c.l2.Form,!1),e=this.addToHttpParams(e,"$orderby",a,c.l2.Form,!1),e=this.addToHttpParams(e,"$expand",l,c.l2.Form,!1);let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(s=s.set("Accept",h));let x="json";h&&(x=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");let E=`/ReportQueueAgentsChatStatistics/Pbx.GetQueueAgentsChatStatisticsData(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},participantType=${this.configuration.encodeParam({name:"participantType",value:w,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:B,withCredentials:j}=this.configuration;return this.httpClient.request("get",`${B}${E}`,{params:e.toHttpParams(),responseType:x,...j?{withCredentials:j}:{},headers:s,observe:u})}getQueueAgentsChatStatisticsDataQuery(n,u="body",_=!1,d){const $=n.queueDnStr;if(null==$)throw new Error("Required parameter queueDnStr was null or undefined when calling getQueueAgentsChatStatisticsData.");const w=n.startDt;if(null==w)throw new Error("Required parameter startDt was null or undefined when calling getQueueAgentsChatStatisticsData.");const R=n.endDt;if(null==R)throw new Error("Required parameter endDt was null or undefined when calling getQueueAgentsChatStatisticsData.");const f=n.participantType;if(null==f)throw new Error("Required parameter participantType was null or undefined when calling getQueueAgentsChatStatisticsData.");const O=n.$top,M=n.$skip,m=n.$search,P=n.$filter,a=n.$count,l=n.$select,e=n.$orderby,s=n.$expand;let h=new c.rx(this.encoder);return h=this.addToHttpParams(h,"$top",O,c.l2.Form,!1),h=this.addToHttpParams(h,"$skip",M,c.l2.Form,!1),h=this.addToHttpParams(h,"$search",m,c.l2.Form,!1),h=this.addToHttpParams(h,"$filter",P,c.l2.Form,!1),h=this.addToHttpParams(h,"$count",a,c.l2.Form,!1),h=this.addToHttpParams(h,"$select",l,c.l2.Form,!1),h=this.addToHttpParams(h,"$orderby",e,c.l2.Form,!1),h=this.addToHttpParams(h,"$expand",s,c.l2.Form,!1),`/ReportQueueAgentsChatStatistics/Pbx.GetQueueAgentsChatStatisticsData(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},participantType=${this.configuration.encodeParam({name:"participantType",value:f,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})?`+h.toString()}static \u0275fac=(()=>{let n;return function(_){return(n||(n=b.xGo(r)))(_||r)}})();static \u0275prov=L.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})(),S=(()=>{class r extends p.d{downloadQueueAgentsChatStatisticsTotals(n,u="body"){const _=n?.queueDnStr;if(null==_)throw new Error("Required parameter queueDnStr was null or undefined when calling downloadQueueAgentsChatStatisticsTotals.");const d=n?.startDt;if(null==d)throw new Error("Required parameter startDt was null or undefined when calling downloadQueueAgentsChatStatisticsTotals.");const $=n?.endDt;if(null==$)throw new Error("Required parameter endDt was null or undefined when calling downloadQueueAgentsChatStatisticsTotals.");const w=n?.participantType;if(null==w)throw new Error("Required parameter participantType was null or undefined when calling downloadQueueAgentsChatStatisticsTotals.");const R=n?.$top,f=n?.$skip,O=n?.$search,M=n?.$filter,m=n?.$count,P=n?.$select,a=n?.$orderby,l=n?.$expand;let e=new c.rx(this.encoder);e=this.addToHttpParams(e,"$top",R,c.l2.Form,!1),e=this.addToHttpParams(e,"$skip",f,c.l2.Form,!1),e=this.addToHttpParams(e,"$search",O,c.l2.Form,!1),e=this.addToHttpParams(e,"$filter",M,c.l2.Form,!1),e=this.addToHttpParams(e,"$count",m,c.l2.Form,!1),e=this.addToHttpParams(e,"$select",P,c.l2.Form,!1),e=this.addToHttpParams(e,"$orderby",a,c.l2.Form,!1),e=this.addToHttpParams(e,"$expand",l,c.l2.Form,!1);let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(s=s.set("Accept",h));let x="json";h&&(x=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");let E=`/ReportQueueAgentsChatStatisticsTotals/Pbx.DownloadQueueAgentsChatStatisticsTotals(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:d,in:"path",style:"simple",explode:!1,dataType:"st
1ring",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},participantType=${this.configuration.encodeParam({name:"participantType",value:w,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:B,withCredentials:j}=this.configuration;return this.httpClient.request("get",`${B}${E}`,{params:e.toHttpParams(),responseType:x,...j?{withCredentials:j}:{},headers:s,observe:u})}downloadQueueAgentsChatStatisticsTotalsQuery(n,u="body",_=!1,d){const $=n.queueDnStr;if(null==$)throw new Error("Required parameter queueDnStr was null or undefined when calling downloadQueueAgentsChatStatisticsTotals.");const w=n.startDt;if(null==w)throw new Error("Required parameter startDt was null or undefined when calling downloadQueueAgentsChatStatisticsTotals.");const R=n.endDt;if(null==R)throw new Error("Required parameter endDt was null or undefined when calling downloadQueueAgentsChatStatisticsTotals.");const f=n.participantType;if(null==f)throw new Error("Required parameter participantType was null or undefined when calling downloadQueueAgentsChatStatisticsTotals.");const O=n.$top,M=n.$skip,m=n.$search,P=n.$filter,a=n.$count,l=n.$select,e=n.$orderby,s=n.$expand;let h=new c.rx(this.encoder);return h=this.addToHttpParams(h,"$top",O,c.l2.Form,!1),h=this.addToHttpParams(h,"$skip",M,c.l2.Form,!1),h=this.addToHttpParams(h,"$search",m,c.l2.Form,!1),h=this.addToHttpParams(h,"$filter",P,c.l2.Form,!1),h=this.addToHttpParams(h,"$count",a,c.l2.Form,!1),h=this.addToHttpParams(h,"$select",l,c.l2.Form,!1),h=this.addToHttpParams(h,"$orderby",e,c.l2.Form,!1),h=this.addToHttpParams(h,"$expand",s,c.l2.Form,!1),`/ReportQueueAgentsChatStatisticsTotals/Pbx.DownloadQueueAgentsChatStatisticsTotals(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},participantType=${this.configuration.encodeParam({name:"participantType",value:f,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})?`+h.toString()}getQueueAgentsChatStatisticsTotalsData(n,u="body"){const _=n?.queueDnStr;if(null==_)throw new Error("Required parameter queueDnStr was null or undefined when calling getQueueAgentsChatStatisticsTotalsData.");const d=n?.startDt;if(null==d)throw new Error("Required parameter startDt was null or undefined when calling getQueueAgentsChatStatisticsTotalsData.");const $=n?.endDt;if(null==$)throw new Error("Required parameter endDt was null or undefined when calling getQueueAgentsChatStatisticsTotalsData.");const w=n?.participantType;if(null==w)throw new Error("Required parameter participantType was null or undefined when calling getQueueAgentsChatStatisticsTotalsData.");const R=n?.$top,f=n?.$skip,O=n?.$search,M=n?.$filter,m=n?.$count,P=n?.$select,a=n?.$orderby,l=n?.$expand;let e=new c.rx(this.encoder);e=this.addToHttpParams(e,"$top",R,c.l2.Form,!1),e=this.addToHttpParams(e,"$skip",f,c.l2.Form,!1),e=this.addToHttpParams(e,"$search",O,c.l2.Form,!1),e=this.addToHttpParams(e,"$filter",M,c.l2.Form,!1),e=this.addToHttpParams(e,"$count",m,c.l2.Form,!1),e=this.addToHttpParams(e,"$select",P,c.l2.Form,!1),e=this.addToHttpParams(e,"$orderby",a,c.l2.Form,!1),e=this.addToHttpParams(e,"$expand",l,c.l2.Form,!1);let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(s=s.set("Accept",h));let x="json";h&&(x=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");let E=`/ReportQueueAgentsChatStatisticsTotals/Pbx.GetQueueAgentsChatStatisticsTotalsData(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},participantType=${this.configuration.encodeParam({name:"participantType",value:w,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:B,withCredentials:j}=this.configuration;return this.httpClient.request("get",`${B}${E}`,{params:e.toHttpParams(),responseType:x,...j?{withCredentials:j}:{},headers:s,observe:u})}getQueueAgentsChatStatisticsTotalsDataQuery(n,u="body",_=!1,d){const $=n.queueDnStr;if(null==$)throw new Error("Required parameter queueDnStr was null or undefined when calling getQueueAgentsChatStatisticsTotalsData.");const w=n.startDt;if(null==w)throw new Error("Required parameter startDt was null or undefined when calling getQueueAgentsChatStatisticsTotalsData.");const R=n.endDt;if(null==R)throw new Error("Required parameter endDt was null or undefined when calling getQueueAgentsChatStatisticsTotalsData.");const f=n.participantType;if(null==f)throw new Error("Required parameter participantType was null or undefined when calling getQueueAgentsChatStatisticsTotalsData.");const O=n.$top,M=n.$skip,m=n.$search,P=n.$filter,a=n.$count,l=n.$select,e=n.$orderby,s=n.$expand;let h=new c.rx(this.encoder);return h=this.addToHttpParams(h,"$top",O,c.l2.Form,!1),h=this.addToHttpParams(h,"$skip",M,c.l2.Form,!1),h=this.addToHttpParams(h,"$search",m,c.l2.Form,!1),h=this.addToHttpParams(h,"$filter",P,c.l2.Form,!1),h=this.addToHttpParams(h,"$count",a,c.l2.Form,!1),h=this.addToHttpParams(h,"$select",l,c.l2.Form,!1),h=this.addToHttpParams(h,"$orderby",e,c.l2.Form,!1),h=this.addToHttpParams(h,"$expand",s,c.l2.Form,!1),`/ReportQueueAgentsChatStatisticsTotals/Pbx.GetQueueAgentsChatStatisticsTotalsData(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},participantType=${this.configuration.encodeParam({name:"participantType",value:f,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})?`+h.toString()}static \u0275fac=(()=>{let n;return function(_){return(n||(n=b.xGo(r)))(_||r)}})();static \u0275prov=L.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var I=t(96794);let i=(()=>{class r{queuesApiService=(0,L.WQX)(g.S);reportQueueAgentsChatStatisticsApiService=(0,L.WQX)(H);reportQueueAgentsChatStatisticsTotals=(0,L.WQX)(S);queuesDataFetcher=(n,u)=>n.canViewReport?_=>_.pipe((0,C.n)(d=>this.requestQueues(n,d,u)),(0,o.T)(d=>d.value),(0,C.n)(d=>(0,y.p)([(0,A.of)(d),this.requestQueueStatistics(n,d.map($=>$.Number))])),(0,o.T)(([d,$])=>d.map(w=>({queue:w,statistics:$.value.find(R=>R.Queue===w.Number)})))):_=>_.pipe((0,C.n)(()=>(0,A.of)([])));createQueueAgentsDataFetcher=n=>(u,_)=>
1d=>d.pipe((0,C.n)($=>this.requestAgentsStatistics(u,n,$,_)),(0,o.T)($=>$.value));requestQueueStatistics(n,u){return this.reportQueueAgentsChatStatisticsTotals.getQueueAgentsChatStatisticsTotalsData({$skip:0,$top:u.length,...(0,I.lr)(n),queueDnStr:u.join(" "),participantType:n.participant})}requestQueues(n,u,_){const d=(n.pbxPeers??[]).map($=>$.Number??"").filter(Boolean);return this.queuesApiService.listQueue({$skip:u*_,$top:_,$select:["Name","Number"],$filter:d.length?`Number in (${d.map($=>`'${$}'`).join(", ")})`:void 0,$orderby:["Number"]})}requestAgentsStatistics(n,u,_,d){return this.reportQueueAgentsChatStatisticsApiService.getQueueAgentsChatStatisticsData({$skip:_*d,$top:d,...(0,I.lr)(n),participantType:n.participant,queueDnStr:u})}generateCSVDownloadLink(n){return this.reportQueueAgentsChatStatisticsApiService.downloadQueueAgentsChatStatisticsQuery({...(0,I.lr)(n),participantType:n.participant,queueDnStr:n.pbxPeers?.map(u=>u.Number).filter(Boolean).join(" ")??""})}generateReportParams(n){return JSON.stringify({StartDt:n.periodFromTo[0],EndDt:n.periodFromTo[1],DateRangeType:n.periodType,FirstDayOfWeek:n.firstWeekDay,ParticipantType:n.participant,QueueDnStr:n.pbxPeers?.map(u=>u.Number).filter(Boolean).join(" ")??""})}static \u0275fac=function(u){return new(u||r)};static \u0275prov=L.jDH({token:r,factory:r.\u0275fac})}return r})()},80492(te,k,t){t.d(k,{Ce:()=>v,bQ:()=>j,lE:()=>B});var C=t(85802),y=t(84412),A=t(85343),o=t(89417),g=t(59882),c=t(16582),p=t(71747),b=t(74651),L=t(79997),H=t(38601),S=t(96354),I=t(54327),i=t(48643),r=t(62329),T=t(74005),n=t(76415),u=t(79213),_=t(36715),d=t(83188),$=t(59625),w=t(22429),R=t(68018),f=t(49769),O=t(96704),M=t(78713),m=t(91382),P=t(45764),a=t(62653),l=t(89755),e=t(35547);function s(Q,V){if(1&Q&&(e.j41(0,"tr",9)(1,"td"),e.EFF(2),e.nI1(3,"emptyValue"),e.k0s(),e.j41(4,"td"),e.EFF(5),e.nI1(6,"appJsDateFormat"),e.nI1(7,"emptyValue"),e.k0s(),e.j41(8,"td"),e.EFF(9),e.nI1(10,"emptyValue"),e.k0s(),e.j41(11,"td",10),e.EFF(12),e.nI1(13,"emptyValue"),e.k0s(),e.j41(14,"td"),e.EFF(15),e.nI1(16,"emptyValue"),e.k0s(),e.j41(17,"td"),e.EFF(18),e.nI1(19,"duration"),e.nI1(20,"emptyValue"),e.k0s(),e.j41(21,"td"),e.EFF(22),e.nI1(23,"appJsDateFormat"),e.nI1(24,"emptyValue"),e.k0s()()),2&Q){const W=V.$implicit;e.R7$(2),e.JRh(e.bMT(3,7,W.Dn)),e.R7$(3),e.JRh(e.bMT(7,11,e.bMT(6,9,W.CallTime))),e.R7$(4),e.JRh(e.bMT(10,13,W.Destination)),e.R7$(3),e.JRh(e.bMT(13,15,W.Source)),e.R7$(3),e.JRh(e.bMT(16,17,W.SentimentScore)),e.R7$(3),e.JRh(e.bMT(20,21,e.bMT(19,19,W.RingTime))),e.R7$(4),e.JRh(e.bMT(24,25,e.bMT(23,23,W.AnsweredTime)))}}function h(Q,V){1&Q&&(e.j41(0,"tr")(1,"td",11),e.nrm(2,"div",12),e.k0s()())}function x(Q,V){if(1&Q&&(e.j41(0,"tr")(1,"td",13),e.EFF(2),e.nI1(3,"translate"),e.k0s()()),2&Q){const W=e.XpG(2);e.R7$(2),e.SpI(" ",e.bMT(3,1,W.noDataMessage(!W.isReportAvailable,!W.canViewReport))," ")}}function E(Q,V){if(1&Q&&(e.j41(0,"table")(1,"thead")(2,"tr",8)(3,"th"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"th"),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.j41(9,"th"),e.EFF(10),e.nI1(11,"translate"),e.k0s(),e.j41(12,"th"),e.EFF(13),e.nI1(14,"translate"),e.k0s(),e.j41(15,"th"),e.EFF(16),e.nI1(17,"translate"),e.k0s(),e.j41(18,"th"),e.EFF(19),e.nI1(20,"translate"),e.k0s(),e.j41(21,"th"),e.EFF(22),e.nI1(23,"translate"),e.k0s()()(),e.j41(24,"tbody"),e.Z7z(25,s,25,27,"tr",9,e.fX1),e.nVh(27,h,3,0,"tr")(28,x,4,3,"tr"),e.k0s()()),2&Q){const W=V;e.R7$(4),e.JRh(e.bMT(5,8,"_i18n.ReportsQueue")),e.R7$(3),e.JRh(e.bMT(8,10,"_i18n.ReportsCallTime")),e.R7$(3),e.JRh(e.bMT(11,12,"_i18n.Callee")),e.R7$(3),e.JRh(e.bMT(14,14,"_i18n.Caller")),e.R7$(3),e.JRh(e.bMT(17,16,"_i18n.Sentiment")),e.R7$(3),e.JRh(e.bMT(20,18,"_i18n.ReportsRinging")),e.R7$(3),e.JRh(e.bMT(23,20,"_i18n.ReportsAnswerTime")),e.R7$(3),e.Dyx(W.data),e.R7$(2),e.vxM(W.hasMore?27:W.isLoading||W.data.length?-1:28)}}function B(Q=null){const V=Q?[Q]:null;return new o.gE({dateRange:new o.MJ(new r.J,{nonNullable:!0}),pbxPeers:new o.MJ(new a.X("_i18n.ReportsQueues","queue","pbxPeers",[p.J.Queue],{pbxPeers:V}),{nonNullable:!0}),interval:new o.MJ(new u.V("_i18n.ReportsServicedAfter"),{nonNullable:!0})})}function j(Q,V=!0){const{dateRange:W,pbxPeers:U,interval:K}=Q;return{...W.value,...U.value,...K.value,canViewReport:V}}let v=(()=>{class Q{dataSource=(0,C.WQX)(c.Q);route=(0,C.WQX)(g.nX);router=(0,C.WQX)(g.Ix);destroy$=(0,C.WQX)(C.abz);modalService=(0,C.WQX)(H.B);fileDownloadService=(0,C.WQX)(i.y);paginator$;hasMoreOrLoading$;parameters$=new y.t(null);nextPage$=new y.t(void 0);reset$=new y.t(void 0);
1firstQueue=this.route.snapshot.data.firstQueue;filter=B(this.firstQueue);scheduledReportType=b.G.QueueAnsweredCallsByWaitingTime;get isReportAvailable(){return this.route.snapshot.data.reportsAvailable}get parameters(){return j(this.filter.value,this.isReportAvailable&&this.canViewReport)}canViewReport=null!=this.firstQueue;constructor(){this.paginator$=(0,L.K)(this.modalService,this.destroy$,this.parameters$,this.nextPage$,this.reset$,this.dataSource.dataFetcher,100),this.hasMoreOrLoading$=this.paginator$.pipe((0,S.T)(W=>!W.hasMore||W.isLoading))}submitFilter(){this.parameters$.next(this.parameters)}downloadCsv(){this.fileDownloadService.download(this.dataSource.generateCSVDownloadLink(this.parameters))}onSaveReport(W){(0,m.J)(this.modalService,this.scheduledReportType,W,this.dataSource.generateReportParams(this.parameters))}back(){this.router.navigate([".."],{relativeTo:this.route}).catch(A.l)}noDataMessage=I.Ns;static \u0275fac=function(U){return new(U||Q)};static \u0275cmp=e.VBU({type:Q,selectors:[["ng-component"]],features:[e.Jv_([c.Q])],decls:11,vars:15,consts:[["header","_i18n.AnsweredQueueCalls",3,"back","helpUrl"],["header","",3,"exportClicked","disabled","showReportPrint"],["top-bar","",3,"filterChanged","saveReport","filterForm","formGroup","reportType","disabled"],["formControlName","dateRange"],["formControlName","pbxPeers"],["formControlName","interval"],["id","scrollableList",1,"h-100","scrollable-table"],["infiniteScroll","",3,"infiniteScrollCallback","infiniteScrollContainer","infiniteScrollDistance","infiniteScrollDisabled"],[1,"table-header"],[1,"text-md-nowrap"],["nowrap",""],["colspan","7"],[1,"loader"],["colspan","7",1,"text-center"]],template:function(U,K){if(1&U&&(e.j41(0,"app-page",0),e.bIt("back",function(){return K.back()}),e.j41(1,"app-report-action-buttons",1),e.bIt("exportClicked",function(){return K.downloadCsv()}),e.k0s(),e.j41(2,"app-complex-filter",2),e.bIt("filterChanged",function(){return K.submitFilter()})("saveReport",function(q){return K.onSaveReport(q)}),e.nrm(3,"app-date-range-filter",3)(4,"app-multi-peer-filter",4)(5,"app-new-interval-filter",5),e.k0s(),e.j41(6,"div",6)(7,"div",7),e.nI1(8,"async"),e.bIt("infiniteScrollCallback",function(){return K.nextPage$.next()}),e.nVh(9,E,29,22,"table"),e.nI1(10,"async"),e.k0s()()()),2&U){let D;e.Y8G("helpUrl","_i18n.ReportsUri"),e.R7$(),e.Y8G("disabled",!K.canViewReport||!K.isReportAvailable)("showReportPrint",!0),e.R7$(),e.Y8G("filterForm",K.filter)("formGroup",K.filter)("reportType",K.scheduledReportType)("disabled",!K.canViewReport||!K.isReportAvailable),e.R7$(5),e.Y8G("infiniteScrollContainer","#scrollableList")("infiniteScrollDistance",1)("infiniteScrollDisabled",e.bMT(8,11,K.hasMoreOrLoading$)),e.R7$(2),e.vxM((D=e.bMT(10,13,K.paginator$))?9:-1,D)}},dependencies:[d.H,$.n,T.M,o.X1,o.BC,o.cb,o.j4,o.JD,n.B,_.J,w.D,l.b,R.D9,f.Jj,P.N,O.bB,M.vE],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}']})}return Q})()},16582(te,k,t){t.d(k,{Q:()=>I});var C=t(25558),y=t(7673),A=t(96354),o=t(97201),g=t(4499),c=t(35547),p=t(85802);let b=(()=>{class i extends g.d{downloadQueueAnsweredCallsByWaitTime(T,n="body"){const u=T?.queueDnStr;if(null==u)throw new Error("Required parameter queueDnStr was null or undefined when calling downloadQueueAnsweredCallsByWaitTime.");const _=T?.startDt;if(null==_)throw new Error("Required parameter startDt was null or undefined when calling downloadQueueAnsweredCallsByWaitTime.");const d=T?.endDt;if(null==d)throw new Error("Required parameter endDt was null or undefined when calling downloadQueueAnsweredCallsByWaitTime.");const $=T?.answerInterval;if(null==$)throw new Error("Required parameter answerInterval was null or undefined when calling downloadQueueAnsweredCallsByWaitTime.");const w=T?.clientTimeZone;if(null==w)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadQueueAnsweredCallsByWaitTime.");const R=T?.$top,f=T?.$skip,O=T?.$search,M=T?.$filter,m=T?.$count,P=T?.$select,a=T?.$orderby,l=T?.$expand;let e=new o.rx(this.encoder);e=this.addToHttpParams(e,"$top",R,o.l2.Form,!1),e=this.addToHttpParams(e,"$skip",f,o.l2.Form,!1),e=this.addToHttpParams(e,"$search",O,o.l2.Form,!1),e=this.addToHttpParams(e,"$filter",M,o.l2.Form,!1),e=this.addToHttpParams(e,"$count",m,o.l2.Form,!1),e=this.addToHttpParams(e,"$select",P,o.l2.Form,!1),e=this.addToHttpParams(e,"$orderby",a,o.l2.Form,!1),e=this.addToHttpParams(e,"$expand",l,o.l2.Form,!1);let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(s=s.set("Accept",h));let x="json";h&&(x=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");let E=`/ReportQueueAnsweredCallsByWaitTime/Pbx.DownloadQueueAnsweredCallsByWaitTime(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},answerInterval=${this.configuration.encodeParam({name:"answerInterval",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:B,withCredentials:j}=this.configuration;return this.httpClient.request("get",`${B}${E}`,{params:e.toHttpParams(),responseType:x,...j?{withCredentials:j}:{},headers:s,observe:n})}downloadQueueAnsweredCallsByWaitTimeQuery(T,n="body",u=!1,_){const d=T.queueDnStr;if(null==d)throw new Error("Required parameter queueDnStr was null or undefined when calling downloadQueueAnsweredCallsByWaitTime.");const $=T.startDt;if(null==$)throw new Error("Required parameter startDt was null or undefined when calling downloadQueueAnsweredCallsByWaitTime.");const w=T.endDt;if(null==w)throw new Error("Required parameter endDt was null or undefined when calling downloadQueueAnsweredCallsByWaitTime.");const R=T.answerInterval;if(null==R)throw new Error("Required parameter answerInterval was null or undefined when calling downloadQueueAnsweredCallsByWaitTime.");const f=T.clientTimeZone;if(null==f)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadQueueAnsweredCallsByWaitTime.");const O=T.$top,M=T.$skip,m=T.$search,P=T.$filter,a=T.$count,l=T.$select,e=T.$orderby,s=T.$expand;let h=new o.rx(this.encoder);return h=this.addToHttpParams(h,"$top",O,o.l2.Form,!1),h=this.addToHttpParams(h,"$skip",M,o.l2.Form,!1),h=this.addToHttpParams(h,"$search",m,o.l2.Form,!1),h=this.addToHttpParams(h,"$filter",P,o.l2.Form,!1),h=this.addToHttpParams(h,"$count",a,o.l2.Form,!1),h=this.addToHttpParams(h,"$select",l,o.l2.Form,!1),h=this.addToHttpParams(h,"$orderby",e,o.l2.Form,!1),h=this.addToHttpParams(h,"$expand",s,o.l2.Form,!1),`/ReportQueueAnsweredCallsByWaitTime/Pbx.DownloadQueueAnsweredCallsByWaitTime(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},answerInterval=${this.configuration.encodeParam({name:"answerInterval",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+h.toString()}getQueueAnsweredCallsByWaitTimeData(T,n="body"){const u=T?.queueDnStr;if(null==u)throw new Error("Required parameter queueDnStr was null or undefined when calling getQueueAnsweredCallsByWaitTimeData.");const _=T?.startDt;if(null==_)throw new Error("Required parameter startDt was null or undefined when calling getQueueAnsweredCallsByWaitTimeData.");const d=T?.endDt;if(null==d)throw new Error("Required parameter endDt was null or undefined when calling getQueueAnsweredCallsByWaitTimeData.");const $=T?.answerInterval;if(null==$)throw new Error("Required parameter answerInterval was null or undefined when calling getQueueAnsweredCallsByWaitTimeData.");
1const w=T?.$top,R=T?.$skip,f=T?.$search,O=T?.$filter,M=T?.$count,m=T?.$select,P=T?.$orderby,a=T?.$expand;let l=new o.rx(this.encoder);l=this.addToHttpParams(l,"$top",w,o.l2.Form,!1),l=this.addToHttpParams(l,"$skip",R,o.l2.Form,!1),l=this.addToHttpParams(l,"$search",f,o.l2.Form,!1),l=this.addToHttpParams(l,"$filter",O,o.l2.Form,!1),l=this.addToHttpParams(l,"$count",M,o.l2.Form,!1),l=this.addToHttpParams(l,"$select",m,o.l2.Form,!1),l=this.addToHttpParams(l,"$orderby",P,o.l2.Form,!1),l=this.addToHttpParams(l,"$expand",a,o.l2.Form,!1);let e=this.defaultHeaders;e=this.configuration.addCredentialToHeaders("Application","Authorization",e,"Bearer ");const s=this.configuration.selectHeaderAccept(["application/json"]);void 0!==s&&(e=e.set("Accept",s));let h="json";s&&(h=s.startsWith("text")?"text":this.configuration.isJsonMime(s)?"json":"blob");let x=`/ReportQueueAnsweredCallsByWaitTime/Pbx.GetQueueAnsweredCallsByWaitTimeData(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},answerInterval=${this.configuration.encodeParam({name:"answerInterval",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:E,withCredentials:B}=this.configuration;return this.httpClient.request("get",`${E}${x}`,{params:l.toHttpParams(),responseType:h,...B?{withCredentials:B}:{},headers:e,observe:n})}getQueueAnsweredCallsByWaitTimeDataQuery(T,n="body",u=!1,_){const d=T.queueDnStr;if(null==d)throw new Error("Required parameter queueDnStr was null or undefined when calling getQueueAnsweredCallsByWaitTimeData.");const $=T.startDt;if(null==$)throw new Error("Required parameter startDt was null or undefined when calling getQueueAnsweredCallsByWaitTimeData.");const w=T.endDt;if(null==w)throw new Error("Required parameter endDt was null or undefined when calling getQueueAnsweredCallsByWaitTimeData.");const R=T.answerInterval;if(null==R)throw new Error("Required parameter answerInterval was null or undefined when calling getQueueAnsweredCallsByWaitTimeData.");const f=T.$top,O=T.$skip,M=T.$search,m=T.$filter,P=T.$count,a=T.$select,l=T.$orderby,e=T.$expand;let s=new o.rx(this.encoder);return s=this.addToHttpParams(s,"$top",f,o.l2.Form,!1),s=this.addToHttpParams(s,"$skip",O,o.l2.Form,!1),s=this.addToHttpParams(s,"$search",M,o.l2.Form,!1),s=this.addToHttpParams(s,"$filter",m,o.l2.Form,!1),s=this.addToHttpParams(s,"$count",P,o.l2.Form,!1),s=this.addToHttpParams(s,"$select",a,o.l2.Form,!1),s=this.addToHttpParams(s,"$orderby",l,o.l2.Form,!1),s=this.addToHttpParams(s,"$expand",e,o.l2.Form,!1),`/ReportQueueAnsweredCallsByWaitTime/Pbx.GetQueueAnsweredCallsByWaitTimeData(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},answerInterval=${this.configuration.encodeParam({name:"answerInterval",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+s.toString()}static \u0275fac=(()=>{let T;return function(u){return(T||(T=c.xGo(i)))(u||i)}})();static \u0275prov=p.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var L=t(67374),H=t.n(L),S=t(96794);let I=(()=>{class i{reportQueueAnsweredCallsByWaitTimeApiService=(0,p.WQX)(b);dataFetcher=(T,n)=>T.canViewReport?u=>u.pipe((0,C.n)(_=>this.requestQueuesStatistics(T,_,n)),(0,A.T)(_=>_.value)):u=>u.pipe((0,C.n)(()=>(0,y.of)([])));requestQueuesStatistics(T,n,u){return this.reportQueueAnsweredCallsByWaitTimeApiService.getQueueAnsweredCallsByWaitTimeData({$skip:u*n,$top:u,...(0,S.lr)(T),queueDnStr:T.pbxPeers?.map(_=>
1_.Number).filter(Boolean).join(" ")??"",answerInterval:H().duration(T.interval??0,"seconds").format("H:mm:s")})}generateCSVDownloadLink(T){return this.reportQueueAnsweredCallsByWaitTimeApiService.downloadQueueAnsweredCallsByWaitTimeQuery({...(0,S.lr)(T),queueDnStr:T.pbxPeers?.map(n=>n.Number).filter(Boolean).join(" ")??"",answerInterval:H().duration(T.interval??0,"seconds").format("H:mm:s"),clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})}generateReportParams(T){return JSON.stringify({StartDt:T.periodFromTo[0],EndDt:T.periodFromTo[1],DateRangeType:T.periodType,FirstDayOfWeek:T.firstWeekDay,QueueDnStr:T.pbxPeers?.map(n=>n.Number).filter(Boolean).join(" ")??"",AnswerInterval:H().duration(T.interval??0,"seconds").format("H:mm:s"),ClientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=p.jDH({token:i,factory:i.\u0275fac})}return i})()},94588(te,k,t){t.d(k,{Xw:()=>j,bQ:()=>B,lE:()=>E});var C=t(85802),y=t(84412),A=t(85343),o=t(89417),g=t(59882),c=t(34051),p=t(62329),b=t(82286),L=t(79997),H=t(96354),S=t(38601),I=t(54327),i=t(48643),r=t(71747),T=t(74651),n=t(83188),u=t(59625),_=t(74005),d=t(76415),$=t(47429),w=t(22429),R=t(68018),f=t(49769),O=t(78713),M=t(91382),m=t(62653),P=t(89755),a=t(35547);const l=(v,Q)=>[v,Q];function e(v,Q){if(1&v&&(a.j41(0,"tr",9)(1,"td"),a.EFF(2),a.k0s(),a.j41(3,"td"),a.EFF(4),a.nI1(5,"emptyValue"),a.k0s(),a.j41(6,"td"),a.EFF(7),a.nI1(8,"emptyValue"),a.k0s(),a.j41(9,"td"),a.EFF(10),a.nI1(11,"emptyValue"),a.k0s(),a.j41(12,"td"),a.EFF(13),a.nI1(14,"emptyValue"),a.k0s()()),2&v){const V=Q.$implicit,W=a.XpG(2);a.R7$(2),a.JRh(W.formatAndJoinValues(a.l_i(13,l,V.Queue,V.QueueDisplayName))),a.R7$(2),a.JRh(a.bMT(5,5,V.QuantityAgents)),a.R7$(3),a.JRh(a.bMT(8,7,V.IncomingCount)),a.R7$(3),a.JRh(a.bMT(11,9,V.AnsweredCount)),a.R7$(3),a.JRh(a.bMT(14,11,V.AbandonedCount))}}function s(v,Q){1&v&&(a.j41(0,"tr")(1,"td",10),a.nrm(2,"div",11),a.k0s()())}function h(v,Q){if(1&v&&(a.j41(0,"tr")(1,"td",12),a.EFF(2),a.nI1(3,"translate"),a.k0s()()),2&v){const V=a.XpG(2);a.R7$(2),a.SpI(" ",a.bMT(3,1,V.noDataMessage(!V.isReportAvailable))," ")}}function x(v,Q){if(1&v&&(a.j41(0,"table")(1,"thead")(2,"tr",8)(3,"th"),a.EFF(4),a.nI1(5,"translate"),a.k0s(),a.j41(6,"th"),a.EFF(7),a.nI1(8,"translate"),a.k0s(),a.j41(9,"th"),a.EFF(10),a.nI1(11,"translate"),a.k0s(),a.j41(12,"th"),a.EFF(13),a.nI1(14,"translate"),a.k0s(),a.j41(15,"th"),a.EFF(16),a.nI1(17,"translate"),a.k0s()()(),a.j41(18,"tbody"),a.Z7z(19,e,15,16,"tr",9,a.fX1),a.nVh(21,s,3,0,"tr")(22,h,4,3,"tr"),a.k0s()()),2&v){const V=Q;a.R7$(4),a.JRh(a.bMT(5,6,"_i18n.ReportsQueue")),a.R7$(3),a.JRh(a.bMT(8,8,"_i18n.ReportsAgentsInTeam")),a.R7$(3),a.JRh(a.bMT(11,10,"_i18n.ReportsIncoming")),a.R7$(3),a.JRh(a.bMT(14,12,"_i18n.ReportsAnswered")),a.R7$(3),a.JRh(a.bMT(17,14,"_i18n.ReportsAbandoned")),a.R7$(3),a.Dyx(V.data),a.R7$(2),a.vxM(V.hasMore?21:V.isLoading||V.data.length?-1:22)}}function E(){return new o.gE({dateRange:new o.MJ(new p.J,{nonNullable:!0}),pbxPeers:new o.MJ(new m.X("_i18n.ReportsQueues","queue","pbxPeers",[r.J.Queue],{pbxPeers:null},"_i18n.Any",!0),{nonNullable:!0}),participant:new o.MJ((0,b.HX)(),{nonNullable:!0})})}function B(v,Q=!0){const{dateRange:V,pbxPeers:W,participant:U}=v;return{...V.value,participant:U.value.selectedValue,...W.value,canViewReport:Q}}let j=(()=>{class v{dataSource=(0,C.WQX)(c.r);route=(0,C.WQX)(g.nX);router=(0,C.WQX)(g.Ix);destroy$=(0,C.WQX)(C.abz);modalService=(0,C.WQX)(S.B);fileDownloadService=(0,C.WQX)(i.y);paginator$;hasMoreOrLoading$;parameters$=new y.t(null);nextPage$=new y.t(void 0);reset$=new y.t(void 0);filter=E();scheduledReportType=T.G.QueueChatPerformance;get isReportAvailable(){return this.route.snapshot.data.reportsAvailable}get parameters(){return B(this.filter.value,this.isReportAvailable)}constructor(){this.paginator$=(0,L.K)(this.modalService,this.destroy$,this.parameters$,this.nextPage$,this.reset$,this.dataSource.dataFetcher,100),this.hasMoreOrLoading$=this.paginator$.pipe((0,H.T)(V=>!V.hasMore||V.isLoading))}submitFilter(){this.parameters$.next(this.parameters)}downloadCsv(){this.fileDownloadService.download(this.dataSource.generateCSVDownloadLink(this.parameters))}onSaveReport(V){(0,M.J)(this.modalService,this.scheduledReportType,V,this.dataSource.generateReportParams(this.parameters))}back(){this.router.navigate([".."],{relativeTo:this.route}).catch(A.l)}
1noDataMessage=I.Ns;formatAndJoinValues=I.pk;static \u0275fac=function(W){return new(W||v)};static \u0275cmp=a.VBU({type:v,selectors:[["ng-component"]],features:[a.Jv_([c.r])],decls:11,vars:16,consts:[["header","_i18n.QueueChatPerformance",3,"back","helpUrl"],["header","",3,"exportClicked","disabled","showReportPrint"],["top-bar","",3,"filterChanged","saveReport","filterForm","formGroup","reportType","disabled"],["formControlName","dateRange"],["formControlName","pbxPeers","placeholder","_i18n.Any",3,"allowEmpty"],["formControlName","participant"],["id","scrollableList",1,"h-100","overflow-auto","scrollable-table"],["infiniteScroll","",3,"infiniteScrollCallback","infiniteScrollContainer","infiniteScrollDistance","infiniteScrollDisabled"],[1,"table-header"],[1,"text-md-nowrap"],["colspan","5"],[1,"loader"],["colspan","5",1,"text-center"]],template:function(W,U){if(1&W&&(a.j41(0,"app-page",0),a.bIt("back",function(){return U.back()}),a.j41(1,"app-report-action-buttons",1),a.bIt("exportClicked",function(){return U.downloadCsv()}),a.k0s(),a.j41(2,"app-complex-filter",2),a.bIt("filterChanged",function(){return U.submitFilter()})("saveReport",function(D){return U.onSaveReport(D)}),a.nrm(3,"app-date-range-filter",3)(4,"app-multi-peer-filter",4)(5,"app-enum-filter",5),a.k0s(),a.j41(6,"div",6)(7,"div",7),a.nI1(8,"async"),a.bIt("infiniteScrollCallback",function(){return U.nextPage$.next()}),a.nVh(9,x,23,16,"table"),a.nI1(10,"async"),a.k0s()()()),2&W){let K;a.Y8G("helpUrl","_i18n.ReportsUri"),a.R7$(),a.Y8G("disabled",!U.isReportAvailable)("showReportPrint",!0),a.R7$(),a.Y8G("filterForm",U.filter)("formGroup",U.filter)("reportType",U.scheduledReportType)("disabled",!U.isReportAvailable),a.R7$(2),a.Y8G("allowEmpty",!0),a.R7$(3),a.Y8G("infiniteScrollContainer","#scrollableList")("infiniteScrollDistance",1)("infiniteScrollDisabled",a.bMT(8,12,U.hasMoreOrLoading$)),a.R7$(2),a.vxM((K=a.bMT(10,14,U.paginator$))?9:-1,K)}},dependencies:[n.H,u.n,_.M,o.X1,o.BC,o.cb,o.j4,o.JD,d.B,$.j,w.D,P.b,R.D9,f.Jj,O.vE],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}']})}return v})()},34051(te,k,t){t.d(k,{r:()=>S});var C=t(25558),y=t(7673),A=t(96354),o=t(2793),g=t(97201),c=t(4499),p=t(35547),b=t(85802);let L=(()=>{class I extends c.d{downloadQueueChatPerformance(r,T="body"){const n=r?.queueDnStr;if(null==n)throw new Error("Required parameter queueDnStr was null or undefined when calling downloadQueueChatPerformance.");const u=r?.startDt;if(null==u)throw new Error("Required parameter startDt was null or undefined when calling downloadQueueChatPerformance.");const _=r?.endDt;if(null==_)throw new Error("Required parameter endDt was null or undefined when calling downloadQueueChatPerformance.");const d=r?.participantType;if(null==d)throw new Error("Required parameter participantType was null or undefined when calling downloadQueueChatPerformance.");const $=r?.$top,w=r?.$skip,R=r?.$search,f=r?.$filter,O=r?.$count,M=r?.$select,m=r?.$orderby,P=r?.$expand;let a=new g.rx(this.encoder);a=this.addToHttpParams(a,"$top",$,g.l2.Form,!1),a=this.addToHttpParams(a,"$skip",w,g.l2.Form,!1),a=this.addToHttpParams(a,"$search",R,g.l2.Form,!1),a=this.addToHttpParams(a,"$filter",f,g.l2.Form,!1),a=this.addToHttpParams(a,"$count",O,g.l2.Form,!1),a=this.addToHttpParams(a,"$select",M,g.l2.Form,!1),a=this.addToHttpParams(a,"$orderby",m,g.l2.Form,!1),a=this.addToHttpParams(a,"$expand",P,g.l2.Form,!1);let l=this.defaultHeaders;l=this.configuration.addCredentialToHeaders("Application","Authorization",l,"Bearer ");const e=this.configuration.selectHeaderAccept(["application/json"]);void 0!==e&&(l=l.set("Accept",e));let s="json";e&&(s=e.startsWith("text")?"text":this.configuration.isJsonMime(e)?"json":"blob");let h=`/ReportQueueChatPerformance/Pbx.DownloadQueueChatPerformance(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},participantType=${this.configuration.encodeParam({name:"participantType",value:d,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:x,withCredentials:E}=this.configuration;return this.httpClient.request("get",`${x}${h}`,{params:a.toHttpParams(),responseType:s,...E?{withCredentials:E}:{},headers:l,observe:T})}downloadQueueChatPerformanceQuery(r,T="body",n=!1,u){const _=r.queueDnStr;if(null==_)throw new Error("Required parameter queueDnStr was null or undefined when calling downloadQueueChatPerformance.");const d=r.startDt;if(null==d)throw new Error("Required parameter startDt was null or undefined when calling downloadQueueChatPerformance.");const $=r.endDt;if(null==$)throw new Error("Required parameter endDt was null or undefined when calling downloadQueueChatPerformance.");const w=r.participantType;if(null==w)throw new Error("Required parameter participantType was null or undefined when calling downloadQueueChatPerformance.");
1const R=r.$top,f=r.$skip,O=r.$search,M=r.$filter,m=r.$count,P=r.$select,a=r.$orderby,l=r.$expand;let e=new g.rx(this.encoder);return e=this.addToHttpParams(e,"$top",R,g.l2.Form,!1),e=this.addToHttpParams(e,"$skip",f,g.l2.Form,!1),e=this.addToHttpParams(e,"$search",O,g.l2.Form,!1),e=this.addToHttpParams(e,"$filter",M,g.l2.Form,!1),e=this.addToHttpParams(e,"$count",m,g.l2.Form,!1),e=this.addToHttpParams(e,"$select",P,g.l2.Form,!1),e=this.addToHttpParams(e,"$orderby",a,g.l2.Form,!1),e=this.addToHttpParams(e,"$expand",l,g.l2.Form,!1),`/ReportQueueChatPerformance/Pbx.DownloadQueueChatPerformance(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},participantType=${this.configuration.encodeParam({name:"participantType",value:w,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})?`+e.toString()}getQueueChatPerformanceData(r,T="body"){const n=r?.queueDnStr;if(null==n)throw new Error("Required parameter queueDnStr was null or undefined when calling getQueueChatPerformanceData.");const u=r?.startDt;if(null==u)throw new Error("Required parameter startDt was null or undefined when calling getQueueChatPerformanceData.");const _=r?.endDt;if(null==_)throw new Error("Required parameter endDt was null or undefined when calling getQueueChatPerformanceData.");const d=r?.participantType;if(null==d)throw new Error("Required parameter participantType was null or undefined when calling getQueueChatPerformanceData.");const $=r?.$top,w=r?.$skip,R=r?.$search,f=r?.$filter,O=r?.$count,M=r?.$select,m=r?.$orderby,P=r?.$expand;let a=new g.rx(this.encoder);a=this.addToHttpParams(a,"$top",$,g.l2.Form,!1),a=this.addToHttpParams(a,"$skip",w,g.l2.Form,!1),a=this.addToHttpParams(a,"$search",R,g.l2.Form,!1),a=this.addToHttpParams(a,"$filter",f,g.l2.Form,!1),a=this.addToHttpParams(a,"$count",O,g.l2.Form,!1),a=this.addToHttpParams(a,"$select",M,g.l2.Form,!1),a=this.addToHttpParams(a,"$orderby",m,g.l2.Form,!1),a=this.addToHttpParams(a,"$expand",P,g.l2.Form,!1);let l=this.defaultHeaders;l=this.configuration.addCredentialToHeaders("Application","Authorization",l,"Bearer ");const e=this.configuration.selectHeaderAccept(["application/json"]);void 0!==e&&(l=l.set("Accept",e));let s="json";e&&(s=e.startsWith("text")?"text":this.configuration.isJsonMime(e)?"json":"blob");let h=`/ReportQueueChatPerformance/Pbx.GetQueueChatPerformanceData(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},participantType=${this.configuration.encodeParam({name:"participantType",value:d,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:x,withCredentials:E}=this.configuration;return this.httpClient.request("get",`${x}${h}`,{params:a.toHttpParams(),responseType:s,...E?{withCredentials:E}:{},headers:l,observe:T})}getQueueChatPerformanceDataQuery(r,T="body",n=!1,u){const _=r.queueDnStr;if(null==_)throw new Error("Required parameter queueDnStr was null or undefined when calling getQueueChatPerformanceData.");const d=r.startDt;if(null==d)throw new Error("Required parameter startDt was null or undefined when calling getQueueChatPerformanceData.");const $=r.endDt;if(null==$)throw new Error("Required parameter endDt was null or undefined when calling getQueueChatPerformanceData.");const w=r.participantType;if(null==w)throw new Error("Required parameter participantType was null or undefined when calling getQueueChatPerformanceData.");
1const R=r.$top,f=r.$skip,O=r.$search,M=r.$filter,m=r.$count,P=r.$select,a=r.$orderby,l=r.$expand;let e=new g.rx(this.encoder);return e=this.addToHttpParams(e,"$top",R,g.l2.Form,!1),e=this.addToHttpParams(e,"$skip",f,g.l2.Form,!1),e=this.addToHttpParams(e,"$search",O,g.l2.Form,!1),e=this.addToHttpParams(e,"$filter",M,g.l2.Form,!1),e=this.addToHttpParams(e,"$count",m,g.l2.Form,!1),e=this.addToHttpParams(e,"$select",P,g.l2.Form,!1),e=this.addToHttpParams(e,"$orderby",a,g.l2.Form,!1),e=this.addToHttpParams(e,"$expand",l,g.l2.Form,!1),`/ReportQueueChatPerformance/Pbx.GetQueueChatPerformanceData(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},participantType=${this.configuration.encodeParam({name:"participantType",value:w,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})?`+e.toString()}static \u0275fac=(()=>{let r;return function(n){return(r||(r=p.xGo(I)))(n||I)}})();static \u0275prov=b.jDH({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})();var H=t(96794);let S=(()=>{class I{queuesApiService=(0,b.WQX)(o.S);reportQueueChatPerformanceApiService=(0,b.WQX)(L);dataFetcher=(r,T)=>r.canViewReport?n=>n.pipe((0,C.n)(u=>this.requestQueuesStatistics(r,u,T)),(0,A.T)(u=>u.value)):n=>n.pipe((0,C.n)(()=>(0,y.of)([])));requestQueuesStatistics(r,T,n){return this.reportQueueChatPerformanceApiService.getQueueChatPerformanceData({$skip:T*n,$top:n,...(0,H.lr)(r),queueDnStr:r.pbxPeers?.map(u=>u.Number).filter(Boolean).join(" ")??"",participantType:r.participant})}generateCSVDownloadLink(r){return this.reportQueueChatPerformanceApiService.downloadQueueChatPerformanceQuery({...(0,H.lr)(r),queueDnStr:r.pbxPeers?.map(T=>T.Number).filter(Boolean).join(" ")??"",participantType:r.participant})}generateReportParams(r){return JSON.stringify({StartDt:r.periodFromTo[0],EndDt:r.periodFromTo[1],DateRangeType:r.periodType,FirstDayOfWeek:r.firstWeekDay,QueueDnStr:r.pbxPeers?.map(T=>T.Number).filter(Boolean).join(" ")??"",ParticipantType:r.participant})}static \u0275fac=function(T){return new(T||I)};static \u0275prov=b.jDH({token:I,factory:I.\u0275fac})}return I})()},76626(te,k,t){t.d(k,{bQ:()=>E,ed:()=>B,lE:()=>x});var C=t(85802),y=t(84412),A=t(85343),o=t(89417),g=t(59882),c=t(21465),p=t(71747),b=t(74651),L=t(79997),H=t(96354),S=t(38601),I=t(54327),i=t(48643),r=t(62329),T=t(74005),n=t(76415),u=t(83188),_=t(59625),d=t(22429),$=t(68018),w=t(49769),R=t(96704),f=t(78713),O=t(91382),M=t(45764),m=t(62653),P=t(89755),a=t(35547);function l(j,v){if(1&j&&(a.j41(0,"tr",8)(1,"td"),a.EFF(2),a.nI1(3,"appJsDateFormat"),a.nI1(4,"emptyValue"),a.k0s(),a.j41(5,"td"),a.EFF(6),a.nI1(7,"emptyValue"),a.k0s(),a.j41(8,"td"),a.EFF(9),a.nI1(10,"emptyValue"),a.k0s(),a.j41(11,"td"),a.EFF(12),a.nI1(13,"duration"),a.nI1(14,"emptyValue"),a.k0s()()),2&j){const Q=v.$implicit;a.R7$(2),a.JRh(a.bMT(4,6,a.bMT(3,4,Q.CallTime))),a.R7$(4),a.JRh(a.bMT(7,8,Q.Dn)),a.R7$(3),a.JRh(a.bMT(10,10,Q.CallbackNo)),a.R7$(3),a.JRh(a.bMT(14,14,a.bMT(13,12,Q.RingTime)))}}function e(j,v){1&j&&(a.j41(0,"tr")(1,"td",9),a.nrm(2,"div",10),a.k0s()())}function s(j,v){if(1&j&&(a.j41(0,"tr")(1,"td",11),a.EFF(2),a.nI1(3,"translate"),a.k0s()()),2&j){const Q=a.XpG(2);a.R7$(2),a.SpI(" ",a.bMT(3,1,Q.noDataMessage(!Q.isReportAvailable,!Q.hasReport))," ")}}function h(j,v){if(1&j&&(a.j41(0,"table")(1,"thead")(2,"tr",7)(3,"th"),a.EFF(4),a.nI1(5,"translate"),a.k0s(),a.j41(6,"th"),a.EFF(7),a.nI1(8,"translate"),a.k0s(),a.j41(9,"th"),a.EFF(10),a.nI1(11,"translate"),a.k0s(),a.j41(12,"th"),a.EFF(13),a.nI1(14,"translate"),a.k0s()()(),a.j41(15,"tbody"),a.Z7z(16,l,15,16,"tr",8,a.fX1),a.nVh(18,e,3,0,"tr")(19,s,4,3,"tr"),a.k0s()()),2&j){const Q=v;a.R7$(4),a.JRh(a.bMT(5,5,"_i18n.ReportsCallTime")),a.R7$(3),a.JRh(a.bMT(8,7,"_i18n.ReportsQueue")),a.R7$(3),a.JRh(a.bMT(11,9,"_i18n.ReportsCallbackNumber")),a.R7$(3),a.JRh(a.bMT(14,11,"_i18n.ReportsRingingTime")),a.R7$(3),a.Dyx(Q.data),a.R7$(2),a.vxM(Q.hasMore?18:Q.isLoading||Q.data.length?-1:19)}}function x(j=null){const v=j?[j]:null;return new o.gE({dateRange:new o.MJ(new r.J,{nonNullable:!0}),pbxPeers:new o.MJ(new m.X("_i18n.ReportsQueues","queue","pbxPeers",[p.J.Queue],{pbxPeers:v}),{nonNullable:!0})})}function E(j,v=!0){const{dateRange:Q,pbxPeers:V}=j;return{...Q.value,...V.value,canViewReport:v}}let B=(()=>{class j{dataSource=(0,C.WQX)(c.m);route=(0,C.WQX)(g.nX);router=(0,C.WQX)(g.Ix);destroy$=(0,C.WQX)(C.abz);modalService=(0,C.WQX)(S.B);fileDownloadService=(0,C.WQX)(i.y);
1firstQueue=this.route.snapshot.data.firstQueue;paginator$;hasMoreOrLoading$;parameters$=new y.t(null);nextPage$=new y.t(void 0);reset$=new y.t(void 0);filter=x(this.firstQueue);scheduledReportType=b.G.QueueFailedCallbacks;hasReport=null!=this.firstQueue;get isReportAvailable(){return this.route.snapshot.data.reportsAvailable}get parameters(){return E(this.filter.value,this.isReportAvailable&&this.hasReport)}constructor(){this.paginator$=(0,L.K)(this.modalService,this.destroy$,this.parameters$,this.nextPage$,this.reset$,this.dataSource.dataFetcher,100),this.hasMoreOrLoading$=this.paginator$.pipe((0,H.T)(Q=>!Q.hasMore||Q.isLoading))}submitFilter(){this.parameters$.next(this.parameters)}downloadCsv(){this.fileDownloadService.download(this.dataSource.generateCSVDownloadLink(this.parameters))}onSaveReport(Q){(0,O.J)(this.modalService,this.scheduledReportType,Q,this.dataSource.generateReportParams(this.parameters))}back(){this.router.navigate([".."],{relativeTo:this.route}).catch(A.l)}noDataMessage=I.Ns;static \u0275fac=function(V){return new(V||j)};static \u0275cmp=a.VBU({type:j,selectors:[["ng-component"]],features:[a.Jv_([c.m])],decls:10,vars:15,consts:[["header","_i18n.QueueFailedCallbacks",3,"back","helpUrl"],["header","",3,"exportClicked","disabled","showReportPrint"],["top-bar","",3,"filterChanged","saveReport","filterForm","formGroup","reportType","disabled"],["formControlName","dateRange"],["formControlName","pbxPeers"],["id","scrollableList",1,"h-100","scrollable-table"],["infiniteScroll","",3,"infiniteScrollCallback","infiniteScrollContainer","infiniteScrollDistance","infiniteScrollDisabled"],[1,"table-header"],[1,"table-group-row","text-md-nowrap"],["colspan","5"],[1,"loader"],["colspan","5",1,"text-center"]],template:function(V,W){if(1&V&&(a.j41(0,"app-page",0),a.bIt("back",function(){return W.back()}),a.j41(1,"app-report-action-buttons",1),a.bIt("exportClicked",function(){return W.downloadCsv()}),a.k0s(),a.j41(2,"app-complex-filter",2),a.bIt("filterChanged",function(){return W.submitFilter()})("saveReport",function(K){return W.onSaveReport(K)}),a.nrm(3,"app-date-range-filter",3)(4,"app-multi-peer-filter",4),a.k0s(),a.j41(5,"div",5)(6,"div",6),a.nI1(7,"async"),a.bIt("infiniteScrollCallback",function(){return W.nextPage$.next()}),a.nVh(8,h,20,13,"table"),a.nI1(9,"async"),a.k0s()()()),2&V){let U;a.Y8G("helpUrl","_i18n.ReportsUri"),a.R7$(),a.Y8G("disabled",!W.hasReport||!W.isReportAvailable)("showReportPrint",!0),a.R7$(),a.Y8G("filterForm",W.filter)("formGroup",W.filter)("reportType",W.scheduledReportType)("disabled",!W.hasReport||!W.isReportAvailable),a.R7$(4),a.Y8G("infiniteScrollContainer","#scrollableList")("infiniteScrollDistance",1)("infiniteScrollDisabled",a.bMT(7,11,W.hasMoreOrLoading$)),a.R7$(2),a.vxM((U=a.bMT(9,13,W.paginator$))?8:-1,U)}},dependencies:[u.H,_.n,T.M,o.X1,o.BC,o.cb,o.j4,o.JD,n.B,d.D,P.b,$.D9,w.Jj,M.N,R.bB,f.vE],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}']})}return j})()},21465(te,k,t){t.d(k,{m:()=>H});var C=t(25558),y=t(7673),A=t(96354),o=t(97201),g=t(4499),c=t(35547),p=t(85802);let b=(()=>{class S extends g.d{downloadQueueFailedCallbacks(i,r="body"){const T=i?.queueDnStr;if(null==T)throw new Error("Required parameter queueDnStr was null or undefined when calling downloadQueueFailedCallbacks.");const n=i?.startDt;if(null==n)throw new Error("Required parameter startDt was null or undefined when calling downloadQueueFailedCallbacks.");const u=i?.endDt;if(null==u)throw new Error("Required parameter endDt was null or undefined when calling downloadQueueFailedCallbacks.");const _=i?.clientTimeZone;if(null==_)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadQueueFailedCallbacks.");const d=i?.$top,$=i?.$skip,w=i?.$search,R=i?.$filter,f=i?.$count,O=i?.$select,M=i?.$orderby,m=i?.$expand;let P=new o.rx(this.encoder);P=this.addToHttpParams(P,"$top",d,o.l2.Form,!1),P=this.addToHttpParams(P,"$skip",$,o.l2.Form,!1),P=this.addToHttpParams(P,"$search",w,o.l2.Form,!1),P=this.addToHttpParams(P,"$filter",R,o.l2.Form,!1),P=this.addToHttpParams(P,"$count",f,o.l2.Form,!1),P=this.addToHttpParams(P,"$select",O,o.l2.Form,!1),P=this.addToHttpParams(P,"$orderby",M,o.l2.Form,!1),P=this.addToHttpParams(P,"$expand",m,o.l2.Form,!1);let a=this.defaultHeaders;a=this.configuration.addCredentialToHeaders("Application","Authorization",a,"Bearer ");const l=this.configuration.selectHeaderAccept(["application/json"]);void 0!==l&&(a=a.set("Accept",l));let e="json";l&&(e=l.startsWith("text")?"text":this.configuration.isJsonMime(l)?"json":"blob");let s=`/ReportQueueFailedCallbacks/Pbx.DownloadQueueFailedCallbacks(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:T,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:h,withCredentials:x}=this.configuration;return this.httpClient.request("get",`${h}${s}`,{params:P.toHttpParams(),responseType:e,...x?{withCredentials:x}:{},headers:a,observe:r})}downloadQueueFailedCallbacksQuery(i,r="body",T=!1,n){const u=i.queueDnStr;if(null==u)throw new Error("Required parameter queueDnStr was null or undefined when calling downloadQueueFailedCallbacks.");const _=i.startDt;if(null==_)throw new Error("Required parameter startDt was null or undefined when calling downloadQueueFailedCallbacks.");const d=i.endDt;if(null==d)throw new Error("Required parameter endDt was null or undefined when calling downloadQueueFailedCallbacks.");const $=i.clientTimeZone;if(null==$)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadQueueFailedCallbacks.");const w=i.$top,R=i.$skip,f=i.$search,O=i.$filter,M=i.$count,m=i.$select,P=i.$orderby,a=i.$expand;let l=new o.rx(this.encoder);return l=this.addToHttpParams(l,"$top",w,o.l2.Form,!1),l=this.addToHttpParams(l,"$skip",R,o.l2.Form,!1),l=this.addToHttpParams(l,"$search",f,o.l2.Form,!1),l=this.addToHttpParams(l,"$filter",O,o.l2.Form,!1),l=this.addToHttpParams(l,"$count",M,o.l2.Form,!1),l=this.addToHttpParams(l,"$select",m,o.l2.Form,!1),l=this.addToHttpParams(l,"$orderby",P,o.l2.Form,!1),l=this.addToHttpParams(l,"$expand",a,o.l2.Form,!1),`/ReportQueueFailedCallbacks/Pbx.DownloadQueueFailedCallbacks(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+l.toString()}getQueueFailedCallbacksData(i,r="body"){const T=i?.queueDnStr;if(null==T)throw new Error("Required parameter queueDnStr was null or undefined when calling getQueueFailedCallbacksData.");const n=i?.startDt;if(null==n)throw new Error("Required parameter startDt was null or undefined when calling getQueueFailedCallbacksData.");const u=i?.endDt;if(null==u)throw new Error("Required parameter endDt was null or undefined when calling getQueueFailedCallbacksData.");const _=i?.$top,d=i?.$skip,$=i?.$search,w=i?.$filter,R=i?.$count,f=i?.$select,O=i?.$orderby,M=i?.$expand;let m=new o.rx(this.encoder);m=this.addToHttpParams(m,"$top",_,o.l2.Form,!1),m=this.addToHttpParams(m,"$skip",d,o.l2.Form,!1),m=this.addToHttpParams(m,"$search",$,o.l2.Form,!1),m=this.addToHttpParams(m,"$filter",w,o.l2.Form,!1),m=this.addToHttpParams(m,"$count",R,o.l2.Form,!1),m=this.addToHttpParams(m,"$select",f,o.l2.Form,!1),m=this.addToHttpParams(m,"$orderby",O,o.l2.Form,!1),m=this.addToHttpParams(m,"$expand",M,o.l2.Form,!1);let P=this.defaultHeaders;P=this.configuration.addCredentialToHeaders("Application","Authorization",P,"Bearer ");const a=this.configuration.selectHeaderAccept(["application/json"]);void 0!==a&&(P=P.set("Accept",a));let l="json";a&&(l=a.startsWith("text")?"text":this.configuration.isJsonMime(a)?"json":"blob");let e=`/ReportQueueFailedCallbacks/Pbx.GetQueueFailedCallbacksData(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:T,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})})`;const{basePath:s,withCredentials:h}=this.configuration;return this.httpClient.request("get",`${s}${e}`,{params:m.toHttpParams(),responseType:l,...h?{withCredentials:h}:{},headers:P,observe:r})}getQueueFailedCallbacksDataQuery(i,r="body",T=!1,n){const u=i.queueDnStr;if(null==u)throw new Error("Required parameter queueDnStr was null or undefined when calling getQueueFailedCallbacksData.");const _=i.startDt;if(null==_)throw new Error("Required parameter startDt was null or undefined when calling getQueueFailedCallbacksData.");const d=i.endDt;if(null==d)throw new Error("Required parameter endDt was null or undefined when calling getQueueFailedCallbacksData.");const $=i.$top,w=i.$skip,R=i.$search,f=i.$filter,O=i.$count,M=i.$select,m=i.$orderby,P=i.$expand;let a=new o.rx(this.encoder);return a=this.addToHttpParams(a,"$top",$,o.l2.Form,!1),a=this.addToHttpParams(a,"$skip",w,o.l2.Form,!1),a=this.addToHttpParams(a,"$search",R,o.l2.Form,!1),a=this.addToHttpParams(a,"$filter",f,o.l2.Form,!1),a=this.addToHttpParams(a,"$count",O,o.l2.Form,!1),a=this.addToHttpParams(a,"$select",M,o.l2.Form,!1),a=this.addToHttpParams(a,"$orderby",m,o.l2.Form,!1),a=this.addToHttpParams(a,"$expand",P,o.l2.Form,!1),`/ReportQueueFailedCallbacks/Pbx.GetQueueFailedCallbacksData(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})})?`+a.toString()}static \u0275fac=(()=>{let i;return function(T){return(i||(i=c.xGo(S)))(T||S)}})();static \u0275prov=p.jDH({token:S,factory:S.\u0275fac,providedIn:"root"})}return S})();var L=t(96794);let H=(()=>{class S{reportQueueFailedCallbacksApiService=(0,p.WQX)(b);dataFetcher=(i,r)=>i.canViewReport?T=>T.pipe((0,C.n)(n=>this.requestQueueCallbacks(i,n,r)),(0,A.T)(n=>n.value)):T=>T.pipe((0,C.n)(()=>(0,y.of)([])));requestQueueCallbacks(i,r,T){return this.reportQueueFailedCallbacksApiService.getQueueFailedCallbacksData({$skip:T*r,$top:T,...(0,L.lr)(i),queueDnStr:i.pbxPeers?.map(n=>
1n.Number).filter(Boolean).join(" ")??""})}generateCSVDownloadLink(i){return this.reportQueueFailedCallbacksApiService.downloadQueueFailedCallbacksQuery({...(0,L.lr)(i),queueDnStr:i.pbxPeers?.map(r=>r.Number).filter(Boolean).join(" ")??"",clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})}generateReportParams(i){return JSON.stringify({StartDt:i.periodFromTo[0],EndDt:i.periodFromTo[1],DateRangeType:i.periodType,FirstDayOfWeek:i.firstWeekDay,QueueDnStr:i.pbxPeers?.map(r=>r.Number).filter(Boolean).join(" ")??"",ClientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})}static \u0275fac=function(r){return new(r||S)};static \u0275prov=p.jDH({token:S,factory:S.\u0275fac})}return S})()},37402(te,k,t){t.d(k,{_2:()=>q,bQ:()=>D,lE:()=>K});var C=t(85802),y=t(84412),A=t(89417),o=t(59882),g=t(67374),c=t.n(g),p=t(79306),b=t(96354),L=t(54327),H=t(71747),S=t(74651),I=t(79997),i=t(38601),r=t(48643),T=t(62329),n=t(79213),u=t(83188),_=t(59625),d=t(74005),$=t(76415),w=t(36715),R=t(22429),f=t(68018),O=t(49769),M=t(96704),m=t(78713),P=t(91382),a=t(62653),l=t(89755),e=t(35547);const s=(G,F)=>[G,F];function h(G,F){if(1&G&&(e.j41(0,"tr",11)(1,"td"),e.EFF(2),e.k0s(),e.nrm(3,"td"),e.j41(4,"td"),e.EFF(5),e.nI1(6,"emptyValue"),e.k0s(),e.j41(7,"td"),e.EFF(8),e.nI1(9,"emptyValue"),e.nI1(10,"translate"),e.k0s(),e.j41(11,"td"),e.EFF(12),e.nI1(13,"duration"),e.nI1(14,"emptyValue"),e.k0s(),e.j41(15,"td"),e.EFF(16),e.nI1(17,"duration"),e.nI1(18,"emptyValue"),e.k0s()()),2&G){const N=F.$implicit,Z=e.XpG(5);e.R7$(2),e.JRh(Z.formatAndJoinValues(e.l_i(24,s,N.ExtensionDn,N.ExtensionDisplayName))),e.R7$(3),e.JRh(e.i5U(6,6,null==N?null:N.ExtensionAnsweredCount,"0")),e.R7$(3),e.Lme("",e.i5U(9,9,null==N?null:N.ExtensionDroppedCount,"0")," - ",e.bMT(10,12,"_i18n.ReportsPolls")),e.R7$(4),e.JRh(e.i5U(14,16,e.bMT(13,14,null==N?null:N.TalkTime),"00:00:00")),e.R7$(4),e.JRh(e.i5U(18,21,e.bMT(17,19,Z.getAvgTalkDuration(null==N?null:N.TalkTime,null==N?null:N.ExtensionAnsweredCount)),"00:00:00"))}}function x(G,F){1&G&&(e.j41(0,"tr")(1,"td",12),e.nrm(2,"div",13),e.k0s()())}function E(G,F){if(1&G){const N=e.RV6();e.j41(0,"tr")(1,"td",14)(2,"a",15),e.bIt("click",function(){C.eBV(N);const Y=e.XpG(2);return C.Njj(Y.nextPage$.next())}),e.EFF(3),e.nI1(4,"translate"),e.k0s()()()}2&G&&(e.R7$(3),e.JRh(e.bMT(4,1,"_i18n.ReportsShowMore")))}function B(G,F){if(1&G&&(e.j41(0,"tr")(1,"td",14),e.EFF(2),e.nI1(3,"translate"),e.k0s()()),2&G){const N=e.XpG(5);e.R7$(2),e.SpI(" ",e.bMT(3,1,N.noDataMessage())," ")}}function j(G,F){if(1&G&&(e.Z7z(0,h,19,27,"tr",11,e.fX1),e.nVh(2,x,3,0,"tr")(3,E,5,3,"tr")(4,B,4,3,"tr")),2&G){const N=F;e.Dyx(N.data),e.R7$(2),e.vxM(N.isLoading?2:N.hasMore?3:N.data.length?-1:4)}}function v(G,F){if(1&G&&(e.nVh(0,j,5,1),e.nI1(1,"async")),2&G){let N;e.vxM((N=e.bMT(1,1,F.paginator$))?0:-1,N)}}function Q(G,F){if(1&G){const N=e.RV6();e.j41(0,"tr",9),e.bIt("click",function(){const Y=C.eBV(N).$implicit,z=e.XpG(2);return C.Njj(z.onGroupClick(Y.QueueDn))}),e.j41(1,"td"),e.nrm(2,"span",10),e.EFF(3),e.k0s(),e.j41(4,"td"),e.EFF(5),e.nI1(6,"emptyValue"),e.k0s(),e.j41(7,"td"),e.EFF(8),e.nI1(9,"emptyValue"),e.k0s(),e.j41(10,"td"),e.EFF(11),e.k0s(),e.nrm(12,"td")(13,"td"),e.k0s(),e.nVh(14,v,2,3)}if(2&G){let N;const Z=F.$implicit,Y=e.XpG(2);e.R7$(2),e.AVh("dropdown-arrow-icon-rotated",!Y.expandedGroups.has(Z.QueueDn)),e.R7$(),e.SpI(" ",Y.formatAndJoinValues(e.l_i(13,s,Z.QueueDn,Z.QueueDisplayName))," "),e.R7$(2),e.JRh(e.i5U(6,7,Z.QueueReceivedCount,"0")),e.R7$(3),e.JRh(e.i5U(9,10,Z.ExtensionAnsweredCount,"0")),e.R7$(3),e.JRh((Z.QueueReceivedCount??0)-(Z.ExtensionAnsweredCount??0)),e.R7$(3),e.vxM((N=Y.expandedGroups.get(Z.QueueDn))?14:-1,N)}}function V(G,F){1&G&&(e.j41(0,"tr")(1,"td",12),e.nrm(2,"div",13),e.k0s()())}function W(G,F){if(1&G&&(e.j41(0,"tr")(1,"td",14),e.EFF(2),e.nI1(3,"translate"),e.k0s()()),2&G){const N=e.XpG(2);e.R7$(2),e.SpI(" ",e.bMT(3,1,N.noDataMessage(!N.isReportAvailable))," ")}}function U(G,F){if(1&G&&(e.j41(0,"table")(1,"thead")(2,"tr",8)(3,"th"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"th"),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.j41(9,"th"),e.EFF(10),e.nI1(11,"translate"),e.k0s(),e.j41(12,"th"),e.EFF(13),e.nI1(14,"translate"),e.k0s(),e.j41(15,"th"),e.EFF(16),e.nI1(17,"translate"),e.k0s(),e.j41(18,"th"),e.EFF(19),e.nI1(20,"translate"),e.k0s()()(),e.j41(21,"tbody"),e.Z7z(22,Q,15,16,null,null,e.fX1),e.nVh(24,V,3,0,"tr")(25,W,4,3,"tr"),e.k0s()()),2&G){const N=F;e.R7$(4),e.JRh(e.bMT(5,7,"_i18n.ReportsQueue")),e.R7$(3),e.JRh(e.bMT(8,9,"_i18n.ReportsReceived")),e.R7$(3),e.JRh(e.bMT(11,11,"_i18n.ReportsServiced")),e.R7$(3),e.JRh(e.bMT(14,13,"_i18n.ReportsUnanswered")),e.R7$(3),e.JRh(e.bMT(17,15,"_i18n.ReportsTalkTime")),e.R7$(3),e.JRh(e.bMT(20,17,"_i18n.ReportsAverageTalkTime")),e.R7$(3),e.Dyx(N.data),e.R7$(2),e.vxM(N.hasMore?24:N.isLoading||N.data.length?-1:25)}}function K(){return new A.gE({dateRange:new A.MJ(new T.J,{nonNullable:!0}),pbxPeers:new A.MJ(new a.X("_i18n.ReportsQueues","queue","pbxPeers",[H.J.Queue],{pbxPeers:null},"_i18n.Any",!0),{nonNullable:!0}),interval:new A.MJ(new n.V("_i18n.ReportsExcludeCallsDroppedBefore"),{nonNullable:!0})})}function D(G,F=!0){const{dateRange:N,pbxPeers:Z,interval:Y}=G;return{...N.value,...Y.value,...Z.value,canViewReport:F}}let q=(()=>{class G{dataSource=(0,C.WQX)(p.o);route=(0,C.WQX)(o.nX);router=(0,C.WQX)(o.Ix);destroy$=(0,C.WQX)(C.abz);modalService=(0,C.WQX)(i.B);
1fileDownloadService=(0,C.WQX)(r.y);paginator$;hasMoreOrLoading$;parameters$=new y.t(null);nextPage$=new y.t(void 0);reset$=new y.t(void 0);filter=K();expandedGroups=new Map;scheduledReportType=S.G.QueuePerformanceOverview;get isReportAvailable(){return this.route.snapshot.data.reportsAvailable}get parameters(){return D(this.filter.value,this.isReportAvailable)}constructor(){this.paginator$=(0,I.K)(this.modalService,this.destroy$,this.parameters$,this.nextPage$,this.reset$,this.dataSource.groupsDataFetcher,100),this.hasMoreOrLoading$=this.paginator$.pipe((0,b.T)(N=>!N.hasMore||N.isLoading))}onGroupClick(N){if(this.expandedGroups.has(N))this.expandedGroups.delete(N);else{const Z=new y.t(void 0),Y=new y.t(void 0),z={paginator$:(0,I.K)(this.modalService,this.destroy$,this.parameters$,Z,Y,this.dataSource.createQueuePerformanceDataFetcher(N),100),nextPage$:Z,reset$:Y};this.expandedGroups.set(N,z)}}submitFilter(){this.expandedGroups.clear(),setTimeout(()=>{this.parameters$.next(this.parameters)},100)}static getAvgTalkDuration(N,Z){const Y=N??null,z=Z??null;if(null===Y||null===z)return null;const ie=c().duration(Y).asSeconds();return c().duration(Math.round(ie/z),"seconds").toISOString()}getAvgTalkDuration(N,Z){return G.getAvgTalkDuration(N,Z)}downloadCsv(){this.fileDownloadService.download(this.dataSource.generateCSVDownloadLink(this.parameters))}onSaveReport(N){(0,P.J)(this.modalService,this.scheduledReportType,N,this.dataSource.generateReportParams(this.parameters))}back(){this.router.navigate([".."],{relativeTo:this.route})}noDataMessage=L.Ns;formatAndJoinValues=L.pk;static \u0275fac=function(Z){return new(Z||G)};static \u0275cmp=e.VBU({type:G,selectors:[["ng-component"]],features:[e.Jv_([p.o])],decls:11,vars:16,consts:[["header","_i18n.QueuePerformanceOverview",3,"back","helpUrl"],["header","",3,"exportClicked","disabled","showReportPrint"],["top-bar","",3,"filterChanged","saveReport","filterForm","formGroup","reportType","disabled"],["formControlName","dateRange"],["formControlName","pbxPeers","placeholder","_i18n.Any",3,"allowEmpty"],["formControlName","interval"],["id","scrollableList",1,"h-100","scrollable-table","grouped-table"],["infiniteScroll","",3,"infiniteScrollCallback","infiniteScrollContainer","infiniteScrollDistance","infiniteScrollDisabled"],[1,"table-header"],[1,"table-group-header","text-md-nowrap",3,"click"],[1,"dropdown-arrow-icon"],[1,"table-group-row","text-md-nowrap"],["colspan","6"],[1,"loader"],["colspan","6",1,"text-center"],[1,"dashed","link",3,"click"]],template:function(Z,Y){if(1&Z&&(e.j41(0,"app-page",0),e.bIt("back",function(){return Y.back()}),e.j41(1,"app-report-action-buttons",1),e.bIt("exportClicked",function(){return Y.downloadCsv()}),e.k0s(),e.j41(2,"app-complex-filter",2),e.bIt("filterChanged",function(){return Y.submitFilter()})("saveReport",function(ie){return Y.onSaveReport(ie)}),e.nrm(3,"app-date-range-filter",3)(4,"app-multi-peer-filter",4)(5,"app-new-interval-filter",5),e.k0s(),e.j41(6,"div",6)(7,"div",7),e.nI1(8,"async"),e.bIt("infiniteScrollCallback",function(){return Y.nextPage$.next()}),e.nVh(9,U,26,19,"table"),e.nI1(10,"async"),e.k0s()()()),2&Z){let z;e.Y8G("helpUrl","_i18n.ReportsUri"),e.R7$(),e.Y8G("disabled",!Y.isReportAvailable)("showReportPrint",!0),e.R7$(),e.Y8G("filterForm",Y.filter)("formGroup",Y.filter)("reportType",Y.scheduledReportType)("disabled",!Y.isReportAvailable),e.R7$(2),e.Y8G("allowEmpty",!0),e.R7$(3),e.Y8G("infiniteScrollContainer","#scrollableList")("infiniteScrollDistance",1)("infiniteScrollDisabled",e.bMT(8,12,Y.hasMoreOrLoading$)),e.R7$(2),e.vxM((z=e.bMT(10,14,Y.paginator$))?9:-1,z)}},dependencies:[u.H,_.n,d.M,A.X1,A.BC,A.cb,A.j4,A.JD,$.B,w.J,R.D,l.b,f.D9,O.Jj,M.bB,m.vE],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}']})}return G})()},79306(te,k,t){t.d(k,{o:()=>i});var C=t(25558),y=t(7673),A=t(96354),o=t(97201),g=t(4499),c=t(35547),p=t(85802);let b=(()=>{class r extends g.d{downloadQueuePerformanceTotals(n,u="body"){const _=n?.periodFrom;
1if(null==_)throw new Error("Required parameter periodFrom was null or undefined when calling downloadQueuePerformanceTotals.");const d=n?.periodTo;if(null==d)throw new Error("Required parameter periodTo was null or undefined when calling downloadQueuePerformanceTotals.");const $=n?.queueDns;if(null==$)throw new Error("Required parameter queueDns was null or undefined when calling downloadQueuePerformanceTotals.");const w=n?.waitInterval;if(null==w)throw new Error("Required parameter waitInterval was null or undefined when calling downloadQueuePerformanceTotals.");const R=n?.$top,f=n?.$skip,O=n?.$search,M=n?.$filter,m=n?.$count,P=n?.$select,a=n?.$orderby,l=n?.$expand;let e=new o.rx(this.encoder);e=this.addToHttpParams(e,"$top",R,o.l2.Form,!1),e=this.addToHttpParams(e,"$skip",f,o.l2.Form,!1),e=this.addToHttpParams(e,"$search",O,o.l2.Form,!1),e=this.addToHttpParams(e,"$filter",M,o.l2.Form,!1),e=this.addToHttpParams(e,"$count",m,o.l2.Form,!1),e=this.addToHttpParams(e,"$select",P,o.l2.Form,!1),e=this.addToHttpParams(e,"$orderby",a,o.l2.Form,!1),e=this.addToHttpParams(e,"$expand",l,o.l2.Form,!1);let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(s=s.set("Accept",h));let x="json";h&&(x=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");let E=`/ReportQueuePerformanceTotals/Pbx.DownloadQueuePerformanceTotals(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},queueDns=${this.configuration.encodeParam({name:"queueDns",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:B,withCredentials:j}=this.configuration;return this.httpClient.request("get",`${B}${E}`,{params:e.toHttpParams(),responseType:x,...j?{withCredentials:j}:{},headers:s,observe:u})}downloadQueuePerformanceTotalsQuery(n,u="body",_=!1,d){const $=n.periodFrom;if(null==$)throw new Error("Required parameter periodFrom was null or undefined when calling downloadQueuePerformanceTotals.");const w=n.periodTo;if(null==w)throw new Error("Required parameter periodTo was null or undefined when calling downloadQueuePerformanceTotals.");const R=n.queueDns;if(null==R)throw new Error("Required parameter queueDns was null or undefined when calling downloadQueuePerformanceTotals.");const f=n.waitInterval;if(null==f)throw new Error("Required parameter waitInterval was null or undefined when calling downloadQueuePerformanceTotals.");const O=n.$top,M=n.$skip,m=n.$search,P=n.$filter,a=n.$count,l=n.$select,e=n.$orderby,s=n.$expand;let h=new o.rx(this.encoder);return h=this.addToHttpParams(h,"$top",O,o.l2.Form,!1),h=this.addToHttpParams(h,"$skip",M,o.l2.Form,!1),h=this.addToHttpParams(h,"$search",m,o.l2.Form,!1),h=this.addToHttpParams(h,"$filter",P,o.l2.Form,!1),h=this.addToHttpParams(h,"$count",a,o.l2.Form,!1),h=this.addToHttpParams(h,"$select",l,o.l2.Form,!1),h=this.addToHttpParams(h,"$orderby",e,o.l2.Form,!1),h=this.addToHttpParams(h,"$expand",s,o.l2.Form,!1),`/ReportQueuePerformanceTotals/Pbx.DownloadQueuePerformanceTotals(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},queueDns=${this.configuration.encodeParam({name:"queueDns",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+h.toString()}getQueuePerformanceTotalsData(n,u="body"){const _=n?.periodFrom;
1if(null==_)throw new Error("Required parameter periodFrom was null or undefined when calling getQueuePerformanceTotalsData.");const d=n?.periodTo;if(null==d)throw new Error("Required parameter periodTo was null or undefined when calling getQueuePerformanceTotalsData.");const $=n?.queueDns;if(null==$)throw new Error("Required parameter queueDns was null or undefined when calling getQueuePerformanceTotalsData.");const w=n?.waitInterval;if(null==w)throw new Error("Required parameter waitInterval was null or undefined when calling getQueuePerformanceTotalsData.");const R=n?.$top,f=n?.$skip,O=n?.$search,M=n?.$filter,m=n?.$count,P=n?.$select,a=n?.$orderby,l=n?.$expand;let e=new o.rx(this.encoder);e=this.addToHttpParams(e,"$top",R,o.l2.Form,!1),e=this.addToHttpParams(e,"$skip",f,o.l2.Form,!1),e=this.addToHttpParams(e,"$search",O,o.l2.Form,!1),e=this.addToHttpParams(e,"$filter",M,o.l2.Form,!1),e=this.addToHttpParams(e,"$count",m,o.l2.Form,!1),e=this.addToHttpParams(e,"$select",P,o.l2.Form,!1),e=this.addToHttpParams(e,"$orderby",a,o.l2.Form,!1),e=this.addToHttpParams(e,"$expand",l,o.l2.Form,!1);let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(s=s.set("Accept",h));let x="json";h&&(x=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");let E=`/ReportQueuePerformanceTotals/Pbx.GetQueuePerformanceTotalsData(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},queueDns=${this.configuration.encodeParam({name:"queueDns",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:B,withCredentials:j}=this.configuration;return this.httpClient.request("get",`${B}${E}`,{params:e.toHttpParams(),responseType:x,...j?{withCredentials:j}:{},headers:s,observe:u})}getQueuePerformanceTotalsDataQuery(n,u="body",_=!1,d){const $=n.periodFrom;if(null==$)throw new Error("Required parameter periodFrom was null or undefined when calling getQueuePerformanceTotalsData.");const w=n.periodTo;if(null==w)throw new Error("Required parameter periodTo was null or undefined when calling getQueuePerformanceTotalsData.");const R=n.queueDns;if(null==R)throw new Error("Required parameter queueDns was null or undefined when calling getQueuePerformanceTotalsData.");const f=n.waitInterval;if(null==f)throw new Error("Required parameter waitInterval was null or undefined when calling getQueuePerformanceTotalsData.");const O=n.$top,M=n.$skip,m=n.$search,P=n.$filter,a=n.$count,l=n.$select,e=n.$orderby,s=n.$expand;let h=new o.rx(this.encoder);return h=this.addToHttpParams(h,"$top",O,o.l2.Form,!1),h=this.addToHttpParams(h,"$skip",M,o.l2.Form,!1),h=this.addToHttpParams(h,"$search",m,o.l2.Form,!1),h=this.addToHttpParams(h,"$filter",P,o.l2.Form,!1),h=this.addToHttpParams(h,"$count",a,o.l2.Form,!1),h=this.addToHttpParams(h,"$select",l,o.l2.Form,!1),h=this.addToHttpParams(h,"$orderby",e,o.l2.Form,!1),h=this.addToHttpParams(h,"$expand",s,o.l2.Form,!1),`/ReportQueuePerformanceTotals/Pbx.GetQueuePerformanceTotalsData(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},queueDns=${this.configuration.encodeParam({name:"queueDns",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+h.toString()}static \u0275fac=(()=>{let n;return function(_){return(n||(n=c.xGo(r)))(_||r)}})();static \u0275prov=p.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})(),L=(()=>{class r extends g.d{downloadQueuePerformanceOverview(n,u="body"){const _=n?.periodFrom;
1if(null==_)throw new Error("Required parameter periodFrom was null or undefined when calling downloadQueuePerformanceOverview.");const d=n?.periodTo;if(null==d)throw new Error("Required parameter periodTo was null or undefined when calling downloadQueuePerformanceOverview.");const $=n?.queueDns;if(null==$)throw new Error("Required parameter queueDns was null or undefined when calling downloadQueuePerformanceOverview.");const w=n?.waitInterval;if(null==w)throw new Error("Required parameter waitInterval was null or undefined when calling downloadQueuePerformanceOverview.");const R=n?.$top,f=n?.$skip,O=n?.$search,M=n?.$filter,m=n?.$count,P=n?.$select,a=n?.$orderby,l=n?.$expand;let e=new o.rx(this.encoder);e=this.addToHttpParams(e,"$top",R,o.l2.Form,!1),e=this.addToHttpParams(e,"$skip",f,o.l2.Form,!1),e=this.addToHttpParams(e,"$search",O,o.l2.Form,!1),e=this.addToHttpParams(e,"$filter",M,o.l2.Form,!1),e=this.addToHttpParams(e,"$count",m,o.l2.Form,!1),e=this.addToHttpParams(e,"$select",P,o.l2.Form,!1),e=this.addToHttpParams(e,"$orderby",a,o.l2.Form,!1),e=this.addToHttpParams(e,"$expand",l,o.l2.Form,!1);let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(s=s.set("Accept",h));let x="json";h&&(x=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");let E=`/ReportQueuePerformanceOverview/Pbx.DownloadQueuePerformanceOverview(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},queueDns=${this.configuration.encodeParam({name:"queueDns",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:B,withCredentials:j}=this.configuration;return this.httpClient.request("get",`${B}${E}`,{params:e.toHttpParams(),responseType:x,...j?{withCredentials:j}:{},headers:s,observe:u})}downloadQueuePerformanceOverviewQuery(n,u="body",_=!1,d){const $=n.periodFrom;if(null==$)throw new Error("Required parameter periodFrom was null or undefined when calling downloadQueuePerformanceOverview.");const w=n.periodTo;if(null==w)throw new Error("Required parameter periodTo was null or undefined when calling downloadQueuePerformanceOverview.");const R=n.queueDns;if(null==R)throw new Error("Required parameter queueDns was null or undefined when calling downloadQueuePerformanceOverview.");const f=n.waitInterval;if(null==f)throw new Error("Required parameter waitInterval was null or undefined when calling downloadQueuePerformanceOverview.");const O=n.$top,M=n.$skip,m=n.$search,P=n.$filter,a=n.$count,l=n.$select,e=n.$orderby,s=n.$expand;let h=new o.rx(this.encoder);return h=this.addToHttpParams(h,"$top",O,o.l2.Form,!1),h=this.addToHttpParams(h,"$skip",M,o.l2.Form,!1),h=this.addToHttpParams(h,"$search",m,o.l2.Form,!1),h=this.addToHttpParams(h,"$filter",P,o.l2.Form,!1),h=this.addToHttpParams(h,"$count",a,o.l2.Form,!1),h=this.addToHttpParams(h,"$select",l,o.l2.Form,!1),h=this.addToHttpParams(h,"$orderby",e,o.l2.Form,!1),h=this.addToHttpParams(h,"$expand",s,o.l2.Form,!1),`/ReportQueuePerformanceOverview/Pbx.DownloadQueuePerformanceOverview(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},queueDns=${this.configuration.encodeParam({name:"queueDns",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+h.toString()}getQueuePerformanceOverviewData(n,u="body"){const _=n?.periodFrom;
1if(null==_)throw new Error("Required parameter periodFrom was null or undefined when calling getQueuePerformanceOverviewData.");const d=n?.periodTo;if(null==d)throw new Error("Required parameter periodTo was null or undefined when calling getQueuePerformanceOverviewData.");const $=n?.queueDns;if(null==$)throw new Error("Required parameter queueDns was null or undefined when calling getQueuePerformanceOverviewData.");const w=n?.waitInterval;if(null==w)throw new Error("Required parameter waitInterval was null or undefined when calling getQueuePerformanceOverviewData.");const R=n?.$top,f=n?.$skip,O=n?.$search,M=n?.$filter,m=n?.$count,P=n?.$select,a=n?.$orderby,l=n?.$expand;let e=new o.rx(this.encoder);e=this.addToHttpParams(e,"$top",R,o.l2.Form,!1),e=this.addToHttpParams(e,"$skip",f,o.l2.Form,!1),e=this.addToHttpParams(e,"$search",O,o.l2.Form,!1),e=this.addToHttpParams(e,"$filter",M,o.l2.Form,!1),e=this.addToHttpParams(e,"$count",m,o.l2.Form,!1),e=this.addToHttpParams(e,"$select",P,o.l2.Form,!1),e=this.addToHttpParams(e,"$orderby",a,o.l2.Form,!1),e=this.addToHttpParams(e,"$expand",l,o.l2.Form,!1);let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(s=s.set("Accept",h));let x="json";h&&(x=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");let E=`/ReportQueuePerformanceOverview/Pbx.GetQueuePerformanceOverviewData(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},queueDns=${this.configuration.encodeParam({name:"queueDns",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:B,withCredentials:j}=this.configuration;return this.httpClient.request("get",`${B}${E}`,{params:e.toHttpParams(),responseType:x,...j?{withCredentials:j}:{},headers:s,observe:u})}getQueuePerformanceOverviewDataQuery(n,u="body",_=!1,d){const $=n.periodFrom;if(null==$)throw new Error("Required parameter periodFrom was null or undefined when calling getQueuePerformanceOverviewData.");const w=n.periodTo;if(null==w)throw new Error("Required parameter periodTo was null or undefined when calling getQueuePerformanceOverviewData.");const R=n.queueDns;if(null==R)throw new Error("Required parameter queueDns was null or undefined when calling getQueuePerformanceOverviewData.");const f=n.waitInterval;if(null==f)throw new Error("Required parameter waitInterval was null or undefined when calling getQueuePerformanceOverviewData.");const O=n.$top,M=n.$skip,m=n.$search,P=n.$filter,a=n.$count,l=n.$select,e=n.$orderby,s=n.$expand;let h=new o.rx(this.encoder);return h=this.addToHttpParams(h,"$top",O,o.l2.Form,!1),h=this.addToHttpParams(h,"$skip",M,o.l2.Form,!1),h=this.addToHttpParams(h,"$search",m,o.l2.Form,!1),h=this.addToHttpParams(h,"$filter",P,o.l2.Form,!1),h=this.addToHttpParams(h,"$count",a,o.l2.Form,!1),h=this.addToHttpParams(h,"$select",l,o.l2.Form,!1),h=this.addToHttpParams(h,"$orderby",e,o.l2.Form,!1),h=this.addToHttpParams(h,"$expand",s,o.l2.Form,!1),`/ReportQueuePerformanceOverview/Pbx.GetQueuePerformanceOverviewData(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},queueDns=${this.configuration.encodeParam({name:"queueDns",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+h.toString()}static \u0275fac=(()=>{let n;return function(_){return(n||(n=c.xGo(r)))(_||r)}})();static \u0275prov=p.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var H=t(67374),S=t.n(H),I=t(96794);let i=(()=>{class r{reportQueuePerformanceTotalsApiService=(0,p.WQX)(b);reportQueuePerformanceOverviewApiService=(0,p.WQX)(L);
1groupsDataFetcher=(n,u)=>n.canViewReport?_=>_.pipe((0,C.n)(d=>this.requestQueueTotals(n,d,u)),(0,A.T)(d=>d.value??[])):_=>_.pipe((0,C.n)(()=>(0,y.of)([])));createQueuePerformanceDataFetcher=n=>(u,_)=>d=>d.pipe((0,C.n)($=>this.requestQueuePerformance(u,n,$,_)),(0,A.T)($=>$.value));requestQueueTotals(n,u,_){return this.reportQueuePerformanceTotalsApiService.getQueuePerformanceTotalsData({$skip:u*_,$top:_,...(0,I.Rx)(n),queueDns:n.pbxPeers?.map(d=>d.Number).filter(Boolean).join(" ")??"",waitInterval:S().duration(n.interval??0,"seconds").format("H:mm:s")})}requestQueuePerformance(n,u,_,d){return this.reportQueuePerformanceOverviewApiService.getQueuePerformanceOverviewData({$skip:_*d,$top:d,...(0,I.Rx)(n),queueDns:u,waitInterval:S().duration(n.interval??0,"seconds").format("H:mm:s")})}generateCSVDownloadLink(n){return this.reportQueuePerformanceOverviewApiService.downloadQueuePerformanceOverviewQuery({...(0,I.Rx)(n),queueDns:n.pbxPeers?.map(u=>u.Number).filter(Boolean).join(" ")??"",waitInterval:S().duration(n.interval??0,"seconds").format("H:mm:s")})}generateReportParams(n){return JSON.stringify({PeriodFrom:n.periodFromTo[0],PeriodTo:n.periodFromTo[1],DateRangeType:n.periodType,FirstDayOfWeek:n.firstWeekDay,QueueDns:n.pbxPeers?.map(u=>u.Number).filter(Boolean).join(" ")??"",WaitInterval:S().duration(n.interval??0,"seconds").format("H:mm:s")})}static \u0275fac=function(u){return new(u||r)};static \u0275prov=p.jDH({token:r,factory:r.\u0275fac})}return r})()},59625(te,k,t){t.d(k,{n:()=>I});var C=t(85802),y=t(17705),A=t(59882),o=t(93049),g=t(36623),c=t(35547);let p=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275cmp=c.VBU({type:i,selectors:[["app-print-solid-icon"],["","app-print-solid-icon",""]],decls:2,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 512 512"],["d","M128 0C92.7 0 64 28.7 64 64v96h64V64H354.7L384 93.3V160h64V93.3c0-17-6.7-33.3-18.7-45.3L400 18.7C388 6.7 371.7 0 354.7 0H128zM384 352v32 64H128V384 368 352H384zm64 32h32c17.7 0 32-14.3 32-32V256c0-35.3-28.7-64-64-64H64c-35.3 0-64 28.7-64 64v96c0 17.7 14.3 32 32 32H64v64c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V384zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"]],template:function(n,u){1&n&&(C.qSk(),c.rj2(0,"svg",0),c.Hgh(1,"path",1),c.eux())},encapsulation:2})}return i})();var b=t(68018);const L=i=>["/reports",i];function H(i,r){if(1&i&&(c.j41(0,"a",3),c.nrm(1,"app-print-solid-icon"),c.j41(2,"span"),c.EFF(3),c.nI1(4,"translate"),c.k0s()()),2&i){const T=c.XpG();c.AVh("disabled",T.disabled),c.Y8G("href",T.url,c.B4B),c.R7$(3),c.JRh(c.bMT(4,4,"_i18n.ReportsPrint"))}}function S(i,r){if(1&i&&(c.j41(0,"a",4),c.nrm(1,"app-print-solid-icon"),c.j41(2,"span"),c.EFF(3),c.nI1(4,"translate"),c.k0s()()),2&i){const T=c.XpG();c.AVh("disabled",T.disabled),c.Y8G("routerLink",c.eq3(6,L,T.reportLink)),c.R7$(3),c.JRh(c.bMT(4,4,"_i18n.ReportsPrint"))}}let I=(()=>{class i{route=(0,C.WQX)(A.nX);disabled;url;showReportPrint;exportClicked=(0,y.CGW)();containerClass="d-flex gap-2";get reportLink(){return this.route.snapshot.routeConfig?.path||this.route.parent?.snapshot?.routeConfig?.path||""}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=c.VBU({type:i,selectors:[["app-report-action-buttons"]],hostVars:2,hostBindings:function(n,u){2&n&&c.HbH(u.containerClass)},inputs:{disabled:"disabled",url:"url",showReportPrint:"showReportPrint"},outputs:{exportClicked:"exportClicked"},decls:7,vars:5,consts:[["data-qa","export-report","type","button",1,"btn","btn-primary",3,"click","disabled"],["data-qa","print-report","target","_blank",1,"btn","btn-primary",3,"disabled","href"],["data-qa","print-report","target","_blank","queryParamsHandling","merge",1,"btn","btn-primary",3,"disabled","routerLink"],["data-qa","print-report","target","_blank",1,"btn","btn-primary",3,"href"],["data-qa","print-report","target","_blank","queryParamsHandling","merge",1,"btn","btn-primary",3,"routerLink"]],template:function(n,u){1&n&&(c.j41(0,"button",0),c.bIt("click",function(){return u.exportClicked.emit()}),c.nrm(1,"app-download-solid-icon"),c.j41(2,"span"),c.EFF(3),c.nI1(4,"translate"),c.k0s()(),c.nVh(5,H,5,6,"a",1)(6,S,5,8,"a",2)),2&n&&(c.Y8G("disabled",u.disabled),c.R7$(3),c.JRh(c.bMT(4,3,"_i18n.ReportsExportCSV")),c.R7$(2),c.vxM(u.url?5:u.showReportPrint?6:-1))},dependencies:[g.e,p,o.Wk,b.D9],styles:["[header][_nghost-%COMP%]{flex-grow:1;justify-content:flex-end}"]})}return i})()},18103(te,k,t){t.d(k,{M:()=>H});var C=t(85802),y=t(6205),A=t(22972),o=t(40953),g=t(74569),c=t(35547);let p=(()=>{class S extends A.m{src;header="_i18n.RecordMediaPromptFile";download;static \u0275fac=(()=>{let i;return function(T){return(i||(i=c.xGo(S)))(T||S)}})();static \u0275cmp=c.VBU({type:S,selectors:[["ng-component"]],inputs:{src:"src",header:"header",download:"download"},features:[c.Vt3],decls:2,vars:3,consts:[[3,"header","buttons"],[3,"download","src"]],template:function(r,T){1&r&&(c.j41(0,"app-modal-dialog",0)(1,"app-audio-player",1),c.bIt("download",function(){return T.download&&T.download()}),c.k0s()()),2&r&&(c.Y8G("header",T.header)("buttons",null),c.R7$(),c.Y8G("src",T.src))},dependencies:[o.p,g.N],encapsulation:2,changeDetection:0})}return S})();var b=t(38601),L=t(48643);let H=(()=>{class S{modalService=(0,C.WQX)(b.B);fileDownloadService=(0,C.WQX)(L.y);recordingsApiService=(0,C.WQX)(y.Y);playRecordingById(i){if(!i)return;const r=()=>this.downloadRecordingById(i);this.fileDownloadService.getDownloadLink$(this.generateRecordingUrl(i),{dryRun:!0}).subscribe(T=>{this.modalService.showComponent(p,{initialState:{src:T,header:"_i18n.ReportsCallRecordPlayerTitle",download:r}})})}generateRecordingUrl(i){return this.recordingsApiService.downloadRecordingQuery({recId:i})}downloadRecordingById(i){i&&this.fileDownloadService.download(this.generateRecordingUrl(i),{dryRun:!0})}static \u0275fac=function(r){return new(r||S)};static \u0275prov=C.jDH({token:S,factory:S.\u0275fac,providedIn:"root"})}return S})()},51656(te,k,t){t.d(k,{K:()=>p});
1var C=t(85802),y=t(50942),A=t(19037),o=t(99437),g=t(96354),c=t(96697);const p=()=>{const b=(0,C.WQX)(y.L),L=(0,C.WQX)(A.s);return b.getReportPeers({$filter:"not (Number eq 'HOL') and Type in ('Group')",$select:["Number","Name","Type","Id"],$orderby:["Number, Name"],$top:1,$skip:0}).pipe((0,c.s)(1),(0,g.T)(H=>H.value?.[0]??void 0),(0,o.W)(H=>L.handleError(H)))}},43676(te,k,t){t.d(k,{q:()=>p});var C=t(85802),y=t(50942),A=t(19037),o=t(99437),g=t(96354),c=t(96697);const p=()=>{const b=(0,C.WQX)(y.L),L=(0,C.WQX)(A.s);return b.getReportPeers({$filter:"Type in ('Queue')",$select:["Number","Name","Id"],$orderby:["Number, Name"],$top:1,$skip:0}).pipe((0,c.s)(1),(0,g.T)(H=>H.value?.[0]??void 0),(0,o.W)(H=>L.handleError(H)))}},30670(te,k,t){t.d(k,{Fw:()=>W,bQ:()=>V,lE:()=>Q});var C=t(85802),y=t(38948),A=t(59882),o=t(84412),g=t(85343),c=t(89417),p=t(96354),b=t(54327),L=t(71747),H=t(74651),S=t(79997),I=t(38601),i=t(48643),r=t(62329),T=t(83188),n=t(59625),u=t(74005),_=t(76415),d=t(22429),$=t(68018),w=t(49769),R=t(78713),f=t(91382),O=t(62653),M=t(89755),m=t(35547);const P=(U,K)=>[U,K];function a(U,K){if(1&U&&(m.j41(0,"tr",10)(1,"td"),m.EFF(2),m.nI1(3,"emptyValue"),m.nI1(4,"emptyValue"),m.k0s(),m.j41(5,"td"),m.EFF(6),m.nI1(7,"emptyValue"),m.k0s(),m.j41(8,"td"),m.EFF(9),m.nI1(10,"emptyValue"),m.k0s(),m.nrm(11,"td")(12,"td"),m.k0s()),2&U){const D=K.$implicit;m.R7$(2),m.Lme("",m.i5U(3,4,D.ExtensionDn,"")," ",m.bMT(4,7,D.ExtensionDisplayName)),m.R7$(4),m.JRh(m.bMT(7,9,D.SentimentScore)),m.R7$(3),m.JRh(m.bMT(10,11,D.ExtensionAnsweredCount))}}function l(U,K){1&U&&(m.j41(0,"tr")(1,"td",11),m.nrm(2,"div",12),m.k0s()())}function e(U,K){if(1&U){const D=m.RV6();m.j41(0,"tr")(1,"td",13)(2,"a",14),m.bIt("click",function(){C.eBV(D);const G=m.XpG(2);return C.Njj(G.nextPage$.next())}),m.EFF(3),m.nI1(4,"translate"),m.k0s()()()}2&U&&(m.R7$(3),m.JRh(m.bMT(4,1,"_i18n.ReportsShowMore")))}function s(U,K){if(1&U&&(m.j41(0,"tr")(1,"td",13),m.EFF(2),m.nI1(3,"translate"),m.k0s()()),2&U){const D=m.XpG(5);m.R7$(2),m.SpI(" ",m.bMT(3,1,D.noDataMessage())," ")}}function h(U,K){if(1&U&&(m.Z7z(0,a,13,13,"tr",10,m.fX1),m.nVh(2,l,3,0,"tr")(3,e,5,3,"tr")(4,s,4,3,"tr")),2&U){const D=K;m.Dyx(D.data),m.R7$(2),m.vxM(D.isLoading?2:D.hasMore?3:D.data.length?-1:4)}}function x(U,K){if(1&U&&(m.nVh(0,h,5,1),m.nI1(1,"async")),2&U){let D;m.vxM((D=m.bMT(1,1,K.paginator$))?0:-1,D)}}function E(U,K){if(1&U){const D=m.RV6();m.j41(0,"tr",8),m.bIt("click",function(){const G=C.eBV(D).$implicit,F=m.XpG(2);return C.Njj(F.onGroupClick(G.RingGroupDn))}),m.j41(1,"td"),m.nrm(2,"span",9),m.EFF(3),m.k0s(),m.j41(4,"td"),m.EFF(5),m.nI1(6,"emptyValue"),m.k0s(),m.j41(7,"td"),m.EFF(8),m.nI1(9,"emptyValue"),m.k0s(),m.j41(10,"td"),m.EFF(11),m.nI1(12,"emptyValue"),m.k0s(),m.j41(13,"td"),m.EFF(14),m.nI1(15,"emptyValue"),m.k0s()(),m.nVh(16,x,2,3)}if(2&U){let D;const q=K.$implicit,G=m.XpG(2);m.R7$(2),m.AVh("dropdown-arrow-icon-rotated",!G.expandedGroups.has(q.RingGroupDn)),m.R7$(),m.SpI(" ",G.formatAndJoinValues(m.l_i(16,P,q.RingGroupDn,q.RingGroupDisplayName))," "),m.R7$(2),m.JRh(m.bMT(6,8,q.RingGroupSentimentScore)),m.R7$(3),m.JRh(m.bMT(9,10,q.RingGroupAnsweredCount)),m.R7$(3),m.JRh(m.bMT(12,12,q.RingGroupReceivedCount)),m.R7$(3),m.JRh(m.bMT(15,14,q.RingGroupReceivedCount-q.RingGroupAnsweredCount)),m.R7$(2),m.vxM((D=G.expandedGroups.get(q.RingGroupDn))?16:-1,D)}}function B(U,K){1&U&&(m.j41(0,"tr")(1,"td",11),m.nrm(2,"div",12),m.k0s()())}function j(U,K){if(1&U&&(m.j41(0,"tr")(1,"td",13),m.EFF(2),m.nI1(3,"translate"),m.k0s()()),2&U){const D=m.XpG(2);m.R7$(2),m.SpI(" ",m.bMT(3,1,D.noDataMessage(!D.isReportAvailable))," ")}}function v(U,K){if(1&U&&(m.j41(0,"table")(1,"thead")(2,"tr",7)(3,"th"),m.EFF(4),m.nI1(5,"translate"),m.k0s(),m.j41(6,"th"),m.EFF(7),m.nI1(8,"translate"),m.k0s(),m.j41(9,"th"),m.EFF(10),m.nI1(11,"translate"),m.k0s(),m.j41(12,"th"),m.EFF(13),m.nI1(14,"translate"),m.k0s(),m.j41(15,"th"),m.EFF(16),m.nI1(17,"translate"),m.k0s()()(),m.j41(18,"tbody"),m.Z7z(19,E,17,19,null,null,m.fX1),m.nVh(21,B,3,0,"tr")(22,j,4,3,"tr"),m.k0s()()),2&U){const D=K;m.R7$(4),m.JRh(m.bMT(5,6,"_i18n.ReportsRG")),m.R7$(3),m.JRh(m.bMT(8,8,"_i18n.Sentiment")),m.R7$(3),m.JRh(m.bMT(11,10,"_i18n.ReportsTotalAnswered")),m.R7$(3),m.JRh(m.bMT(14,12,"_i18n.ReportsTotalReceived")),m.R7$(3),m.JRh(m.bMT(17,14,"_i18n.ReportsTotalUnanswered")),m.R7$(3),m.Dyx(D.data),m.R7$(2),m.vxM(D.hasMore?21:D.isLoading||D.data.length?-1:22)}}function Q(){return new c.gE({dateRange:new c.MJ(new r.J,{nonNullable:!0}),pbxPeers:new c.MJ(new O.X("_i18n.ReportsRingGroups","ringgroup","pbxPeers",[L.J.RingGroup],{pbxPeers:null},"_i18n.Any",!0),{nonNullable:!0})})}function V(U,K=!0){const{dateRange:D,pbxPeers:q}=U;return{...D.value,...q.value,canViewReport:K}}let W=(()=>{class U{dataSource=(0,C.WQX)(y.H);route=(0,C.WQX)(A.nX);router=(0,C.WQX)(A.Ix);destroy$=(0,C.WQX)(C.abz);modalService=(0,C.WQX)(I.B);fileDownloadService=(0,C.WQX)(i.y);paginator$;hasMoreOrLoading$;parameters$=new o.t(null);nextPage$=new o.t(void 0);reset$=new o.t(void 0);filter=Q();expandedGroups=new Map;scheduledReportType=H.G.ExtensionsStatisticsByRingGroups;
1get isReportAvailable(){return this.route.snapshot.data.reportsAvailable}get parameters(){return V(this.filter.value,this.isReportAvailable)}constructor(){this.paginator$=(0,S.K)(this.modalService,this.destroy$,this.parameters$,this.nextPage$,this.reset$,this.dataSource.groupsDataFetcher,100),this.hasMoreOrLoading$=this.paginator$.pipe((0,p.T)(D=>!D.hasMore||D.isLoading))}onGroupClick(D){if(this.expandedGroups.has(D))this.expandedGroups.delete(D);else{const q=new o.t(void 0),G=new o.t(void 0),F={paginator$:(0,S.K)(this.modalService,this.destroy$,this.parameters$,q,G,this.dataSource.createExtensionsDataFetcher(D),100),nextPage$:q,reset$:G};this.expandedGroups.set(D,F)}}submitFilter(){this.expandedGroups.clear(),setTimeout(()=>{this.parameters$.next(this.parameters)},100)}downloadCsv(){const{canViewReport:D,...q}=this.parameters;this.fileDownloadService.download(this.dataSource.generateCSVDownloadLink(q))}onSaveReport(D){const{canViewReport:q,...G}=this.parameters;(0,f.J)(this.modalService,this.scheduledReportType,D,this.dataSource.generateReportParams(G))}back(){this.router.navigate([".."],{relativeTo:this.route}).catch(g.l)}noDataMessage=b.Ns;Boolean=Boolean;formatAndJoinValues=b.pk;static \u0275fac=function(q){return new(q||U)};static \u0275cmp=m.VBU({type:U,selectors:[["app-ring-group"]],features:[m.Jv_([y.H])],decls:10,vars:16,consts:[["header","_i18n.RGStatistics",3,"back","helpUrl"],["header","",3,"exportClicked","disabled","showReportPrint"],["top-bar","",3,"filterChanged","saveReport","filterForm","formGroup","reportType","disabled"],["formControlName","dateRange"],["formControlName","pbxPeers","placeholder","_i18n.Any",3,"allowEmpty"],["id","scrollableList",1,"h-100","scrollable-table","grouped-table"],["infiniteScroll","",3,"infiniteScrollCallback","infiniteScrollContainer","infiniteScrollDistance","infiniteScrollDisabled"],[1,"table-header"],[1,"table-group-header","text-md-nowrap",3,"click"],[1,"dropdown-arrow-icon"],[1,"table-group-row","text-md-nowrap"],["colspan","5"],[1,"loader"],["colspan","5",1,"text-center"],[1,"dashed","link",3,"click"]],template:function(q,G){if(1&q&&(m.j41(0,"app-page",0),m.bIt("back",function(){return G.back()}),m.j41(1,"app-report-action-buttons",1),m.bIt("exportClicked",function(){return G.downloadCsv()}),m.k0s(),m.j41(2,"app-complex-filter",2),m.bIt("filterChanged",function(){return G.submitFilter()})("saveReport",function(N){return G.onSaveReport(N)}),m.nrm(3,"app-date-range-filter",3)(4,"app-multi-peer-filter",4),m.k0s(),m.j41(5,"div",5)(6,"div",6),m.nI1(7,"async"),m.bIt("infiniteScrollCallback",function(){return G.nextPage$.next()}),m.nVh(8,v,23,16,"table"),m.nI1(9,"async"),m.k0s()()()),2&q){let F;m.Y8G("helpUrl","_i18n.ReportsUri"),m.R7$(),m.Y8G("disabled",!G.isReportAvailable)("showReportPrint",!0),m.R7$(),m.Y8G("filterForm",G.filter)("formGroup",G.filter)("reportType",G.scheduledReportType)("disabled",!G.isReportAvailable),m.R7$(2),m.Y8G("allowEmpty",!0),m.R7$(2),m.Y8G("infiniteScrollContainer","#scrollableList")("infiniteScrollDistance",1)("infiniteScrollDisabled",m.bMT(7,12,G.hasMoreOrLoading$)),m.R7$(2),m.vxM((F=m.bMT(9,14,G.paginator$))?8:-1,F)}},dependencies:[T.H,n.n,u.M,c.X1,c.BC,c.cb,c.j4,c.JD,_.B,d.D,M.b,$.D9,w.Jj,R.vE],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}']})}return U})()},38948(te,k,t){t.d(k,{H:()=>S});var C=t(25558),y=t(7673),A=t(96354),o=t(97201),g=t(4499),c=t(35547),p=t(85802);let b=(()=>{class I extends g.d{downloadRingGroupStatistics(r,T="body"){const n=r?.periodFrom;
1if(null==n)throw new Error("Required parameter periodFrom was null or undefined when calling downloadRingGroupStatistics.");const u=r?.periodTo;if(null==u)throw new Error("Required parameter periodTo was null or undefined when calling downloadRingGroupStatistics.");const _=r?.ringGroupDns;if(null==_)throw new Error("Required parameter ringGroupDns was null or undefined when calling downloadRingGroupStatistics.");const d=r?.$top,$=r?.$skip,w=r?.$search,R=r?.$filter,f=r?.$count,O=r?.$select,M=r?.$orderby,m=r?.$expand;let P=new o.rx(this.encoder);P=this.addToHttpParams(P,"$top",d,o.l2.Form,!1),P=this.addToHttpParams(P,"$skip",$,o.l2.Form,!1),P=this.addToHttpParams(P,"$search",w,o.l2.Form,!1),P=this.addToHttpParams(P,"$filter",R,o.l2.Form,!1),P=this.addToHttpParams(P,"$count",f,o.l2.Form,!1),P=this.addToHttpParams(P,"$select",O,o.l2.Form,!1),P=this.addToHttpParams(P,"$orderby",M,o.l2.Form,!1),P=this.addToHttpParams(P,"$expand",m,o.l2.Form,!1);let a=this.defaultHeaders;a=this.configuration.addCredentialToHeaders("Application","Authorization",a,"Bearer ");const l=this.configuration.selectHeaderAccept(["application/json"]);void 0!==l&&(a=a.set("Accept",l));let e="json";l&&(e=l.startsWith("text")?"text":this.configuration.isJsonMime(l)?"json":"blob");let s=`/ReportRingGroupStatistics/Pbx.DownloadRingGroupStatistics(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},ringGroupDns=${this.configuration.encodeParam({name:"ringGroupDns",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:h,withCredentials:x}=this.configuration;return this.httpClient.request("get",`${h}${s}`,{params:P.toHttpParams(),responseType:e,...x?{withCredentials:x}:{},headers:a,observe:T})}downloadRingGroupStatisticsQuery(r,T="body",n=!1,u){const _=r.periodFrom;if(null==_)throw new Error("Required parameter periodFrom was null or undefined when calling downloadRingGroupStatistics.");const d=r.periodTo;if(null==d)throw new Error("Required parameter periodTo was null or undefined when calling downloadRingGroupStatistics.");const $=r.ringGroupDns;if(null==$)throw new Error("Required parameter ringGroupDns was null or undefined when calling downloadRingGroupStatistics.");const w=r.$top,R=r.$skip,f=r.$search,O=r.$filter,M=r.$count,m=r.$select,P=r.$orderby,a=r.$expand;let l=new o.rx(this.encoder);return l=this.addToHttpParams(l,"$top",w,o.l2.Form,!1),l=this.addToHttpParams(l,"$skip",R,o.l2.Form,!1),l=this.addToHttpParams(l,"$search",f,o.l2.Form,!1),l=this.addToHttpParams(l,"$filter",O,o.l2.Form,!1),l=this.addToHttpParams(l,"$count",M,o.l2.Form,!1),l=this.addToHttpParams(l,"$select",m,o.l2.Form,!1),l=this.addToHttpParams(l,"$orderby",P,o.l2.Form,!1),l=this.addToHttpParams(l,"$expand",a,o.l2.Form,!1),`/ReportRingGroupStatistics/Pbx.DownloadRingGroupStatistics(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},ringGroupDns=${this.configuration.encodeParam({name:"ringGroupDns",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+l.toString()}getRingGroupStatisticsData(r,T="body"){const n=r?.periodFrom;if(null==n)throw new Error("Required parameter periodFrom was null or undefined when calling getRingGroupStatisticsData.");const u=r?.periodTo;if(null==u)throw new Error("Required parameter periodTo was null or undefined when calling getRingGroupStatisticsData.");const _=r?.ringGroupDns;if(null==_)throw new Error("Required parameter ringGroupDns was null or undefined when calling getRingGroupStatisticsData.");const d=r?.$top,$=r?.$skip,w=r?.$search,R=r?.$filter,f=r?.$count,O=r?.$select,M=r?.$orderby,m=r?.$expand;let P=new o.rx(this.encoder);P=this.addToHttpParams(P,"$top",d,o.l2.Form,!1),P=this.addToHttpParams(P,"$skip",$,o.l2.Form,!1),P=this.addToHttpParams(P,"$search",w,o.l2.Form,!1),P=this.addToHttpParams(P,"$filter",R,o.l2.Form,!1),P=this.addToHttpParams(P,"$count",f,o.l2.Form,!1),P=this.addToHttpParams(P,"$select",O,o.l2.Form,!1),P=this.addToHttpParams(P,"$orderby",M,o.l2.Form,!1),P=this.addToHttpParams(P,"$expand",m,o.l2.Form,!1);let a=this.defaultHeaders;a=this.configuration.addCredentialToHeaders("Application","Authorization",a,"Bearer ");const l=this.configuration.selectHeaderAccept(["application/json"]);void 0!==l&&(a=a.set("Accept",l));let e="json";l&&(e=l.startsWith("text")?"text":this.configuration.isJsonMime(l)?"json":"blob");let s=`/ReportRingGroupStatistics/Pbx.GetRingGroupStatisticsData(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},ringGroupDns=${this.configuration.encodeParam({name:"ringGroupDns",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:h,withCredentials:x}=this.configuration;return this.httpClient.request("get",`${h}${s}`,{params:P.toHttpParams(),responseType:e,...x?{withCredentials:x}:{},headers:a,observe:T})}getRingGroupStatisticsDataQuery(r,T="body",n=!1,u){const _=r.periodFrom;
1if(null==_)throw new Error("Required parameter periodFrom was null or undefined when calling getRingGroupStatisticsData.");const d=r.periodTo;if(null==d)throw new Error("Required parameter periodTo was null or undefined when calling getRingGroupStatisticsData.");const $=r.ringGroupDns;if(null==$)throw new Error("Required parameter ringGroupDns was null or undefined when calling getRingGroupStatisticsData.");const w=r.$top,R=r.$skip,f=r.$search,O=r.$filter,M=r.$count,m=r.$select,P=r.$orderby,a=r.$expand;let l=new o.rx(this.encoder);return l=this.addToHttpParams(l,"$top",w,o.l2.Form,!1),l=this.addToHttpParams(l,"$skip",R,o.l2.Form,!1),l=this.addToHttpParams(l,"$search",f,o.l2.Form,!1),l=this.addToHttpParams(l,"$filter",O,o.l2.Form,!1),l=this.addToHttpParams(l,"$count",M,o.l2.Form,!1),l=this.addToHttpParams(l,"$select",m,o.l2.Form,!1),l=this.addToHttpParams(l,"$orderby",P,o.l2.Form,!1),l=this.addToHttpParams(l,"$expand",a,o.l2.Form,!1),`/ReportRingGroupStatistics/Pbx.GetRingGroupStatisticsData(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},ringGroupDns=${this.configuration.encodeParam({name:"ringGroupDns",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+l.toString()}static \u0275fac=(()=>{let r;return function(n){return(r||(r=c.xGo(I)))(n||I)}})();static \u0275prov=p.jDH({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})(),L=(()=>{class I extends g.d{downloadExtensionsStatisticsByRingGroups(r,T="body"){const n=r?.periodFrom;if(null==n)throw new Error("Required parameter periodFrom was null or undefined when calling downloadExtensionsStatisticsByRingGroups.");const u=r?.periodTo;if(null==u)throw new Error("Required parameter periodTo was null or undefined when calling downloadExtensionsStatisticsByRingGroups.");const _=r?.ringGroupDns;if(null==_)throw new Error("Required parameter ringGroupDns was null or undefined when calling downloadExtensionsStatisticsByRingGroups.");const d=r?.$top,$=r?.$skip,w=r?.$search,R=r?.$filter,f=r?.$count,O=r?.$select,M=r?.$orderby,m=r?.$expand;let P=new o.rx(this.encoder);P=this.addToHttpParams(P,"$top",d,o.l2.Form,!1),P=this.addToHttpParams(P,"$skip",$,o.l2.Form,!1),P=this.addToHttpParams(P,"$search",w,o.l2.Form,!1),P=this.addToHttpParams(P,"$filter",R,o.l2.Form,!1),P=this.addToHttpParams(P,"$count",f,o.l2.Form,!1),P=this.addToHttpParams(P,"$select",O,o.l2.Form,!1),P=this.addToHttpParams(P,"$orderby",M,o.l2.Form,!1),P=this.addToHttpParams(P,"$expand",m,o.l2.Form,!1);let a=this.defaultHeaders;a=this.configuration.addCredentialToHeaders("Application","Authorization",a,"Bearer ");const l=this.configuration.selectHeaderAccept(["application/json"]);void 0!==l&&(a=a.set("Accept",l));let e="json";l&&(e=l.startsWith("text")?"text":this.configuration.isJsonMime(l)?"json":"blob");let s=`/ReportExtensionsStatisticsByRingGroups/Pbx.DownloadExtensionsStatisticsByRingGroups(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},ringGroupDns=${this.configuration.encodeParam({name:"ringGroupDns",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:h,withCredentials:x}=this.configuration;return this.httpClient.request("get",`${h}${s}`,{params:P.toHttpParams(),responseType:e,...x?{withCredentials:x}:{},headers:a,observe:T})}downloadExtensionsStatisticsByRingGroupsQuery(r,T="body",n=!1,u){const _=r.periodFrom;if(null==_)throw new Error("Required parameter periodFrom was null or undefined when calling downloadExtensionsStatisticsByRingGroups.");const d=r.periodTo;if(null==d)throw new Error("Required parameter periodTo was null or undefined when calling downloadExtensionsStatisticsByRingGroups.");const $=r.ringGroupDns;
1if(null==$)throw new Error("Required parameter ringGroupDns was null or undefined when calling downloadExtensionsStatisticsByRingGroups.");const w=r.$top,R=r.$skip,f=r.$search,O=r.$filter,M=r.$count,m=r.$select,P=r.$orderby,a=r.$expand;let l=new o.rx(this.encoder);return l=this.addToHttpParams(l,"$top",w,o.l2.Form,!1),l=this.addToHttpParams(l,"$skip",R,o.l2.Form,!1),l=this.addToHttpParams(l,"$search",f,o.l2.Form,!1),l=this.addToHttpParams(l,"$filter",O,o.l2.Form,!1),l=this.addToHttpParams(l,"$count",M,o.l2.Form,!1),l=this.addToHttpParams(l,"$select",m,o.l2.Form,!1),l=this.addToHttpParams(l,"$orderby",P,o.l2.Form,!1),l=this.addToHttpParams(l,"$expand",a,o.l2.Form,!1),`/ReportExtensionsStatisticsByRingGroups/Pbx.DownloadExtensionsStatisticsByRingGroups(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},ringGroupDns=${this.configuration.encodeParam({name:"ringGroupDns",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+l.toString()}getExtensionsStatisticsByRingGroupsData(r,T="body"){const n=r?.periodFrom;if(null==n)throw new Error("Required parameter periodFrom was null or undefined when calling getExtensionsStatisticsByRingGroupsData.");const u=r?.periodTo;if(null==u)throw new Error("Required parameter periodTo was null or undefined when calling getExtensionsStatisticsByRingGroupsData.");const _=r?.ringGroupDns;if(null==_)throw new Error("Required parameter ringGroupDns was null or undefined when calling getExtensionsStatisticsByRingGroupsData.");const d=r?.$top,$=r?.$skip,w=r?.$search,R=r?.$filter,f=r?.$count,O=r?.$select,M=r?.$orderby,m=r?.$expand;let P=new o.rx(this.encoder);P=this.addToHttpParams(P,"$top",d,o.l2.Form,!1),P=this.addToHttpParams(P,"$skip",$,o.l2.Form,!1),P=this.addToHttpParams(P,"$search",w,o.l2.Form,!1),P=this.addToHttpParams(P,"$filter",R,o.l2.Form,!1),P=this.addToHttpParams(P,"$count",f,o.l2.Form,!1),P=this.addToHttpParams(P,"$select",O,o.l2.Form,!1),P=this.addToHttpParams(P,"$orderby",M,o.l2.Form,!1),P=this.addToHttpParams(P,"$expand",m,o.l2.Form,!1);let a=this.defaultHeaders;a=this.configuration.addCredentialToHeaders("Application","Authorization",a,"Bearer ");const l=this.configuration.selectHeaderAccept(["application/json"]);void 0!==l&&(a=a.set("Accept",l));let e="json";l&&(e=l.startsWith("text")?"text":this.configuration.isJsonMime(l)?"json":"blob");let s=`/ReportExtensionsStatisticsByRingGroups/Pbx.GetExtensionsStatisticsByRingGroupsData(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},ringGroupDns=${this.configuration.encodeParam({name:"ringGroupDns",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:h,withCredentials:x}=this.configuration;return this.httpClient.request("get",`${h}${s}`,{params:P.toHttpParams(),responseType:e,...x?{withCredentials:x}:{},headers:a,observe:T})}getExtensionsStatisticsByRingGroupsDataQuery(r,T="body",n=!1,u){const _=r.periodFrom;if(null==_)throw new Error("Required parameter periodFrom was null or undefined when calling getExtensionsStatisticsByRingGroupsData.");const d=r.periodTo;if(null==d)throw new Error("Required parameter periodTo was null or undefined when calling getExtensionsStatisticsByRingGroupsData.");const $=r.ringGroupDns;if(null==$)throw new Error("Required parameter ringGroupDns was null or undefined when calling getExtensionsStatisticsByRingGroupsData.");const w=r.$top,R=r.$skip,f=r.$search,O=r.$filter,M=r.$count,m=r.$select,P=r.$orderby,a=r.$expand;let l=new o.rx(this.encoder);return l=this.addToHttpParams(l,"$top",w,o.l2.Form,!1),l=this.addToHttpParams(l,"$skip",R,o.l2.Form,!1),l=this.addToHttpParams(l,"$search",f,o.l2.Form,!1),l=this.addToHttpParams(l,"$filter",O,o.l2.Form,!1),l=this.addToHttpParams(l,"$count",M,o.l2.Form,!1),l=this.addToHttpParams(l,"$select",m,o.l2.Form,!1),l=this.addToHttpParams(l,"$orderby",P,o.l2.Form,!1),l=this.addToHttpParams(l,"$expand",a,o.l2.Form,!1),`/ReportExtensionsStatisticsByRingGroups/Pbx.GetExtensionsStatisticsByRingGroupsData(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},ringGroupDns=${this.configuration.encodeParam({name:"ringGroupDns",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+l.toString()}static \u0275fac=(()=>{let r;return function(n){return(r||(r=c.xGo(I)))(n||I)}})();static \u0275prov=p.jDH({token:I,factory:I.\u0275fac,providedIn:"root"})}return I})();var H=t(96794);let S=(()=>{class I{reportRingGroupStatisticsApiService=(0,p.WQX)(b);reportExtensionsStatisticsByRingGroupsApiService=(0,p.WQX)(L);
1groupsDataFetcher=(r,T)=>r.canViewReport?n=>n.pipe((0,C.n)(u=>this.requestRingGroupStatistics(r,u,T)),(0,A.T)(u=>u.value??[])):n=>n.pipe((0,C.n)(()=>(0,y.of)([])));createExtensionsDataFetcher=r=>(T,n)=>u=>u.pipe((0,C.n)(_=>this.requestRingGroupExtensions(T,r,_,n)),(0,A.T)(_=>_.value));requestRingGroupStatistics(r,T,n){return this.reportRingGroupStatisticsApiService.getRingGroupStatisticsData({$skip:T*n,$top:n,...(0,H.Rx)(r),ringGroupDns:r.pbxPeers?.map(u=>u.Number).filter(Boolean).join(" ")??""})}requestRingGroupExtensions(r,T,n,u){return this.reportExtensionsStatisticsByRingGroupsApiService.getExtensionsStatisticsByRingGroupsData({$skip:n*u,$top:u,...(0,H.Rx)(r),ringGroupDns:T})}generateCSVDownloadLink(r){return this.reportExtensionsStatisticsByRingGroupsApiService.downloadExtensionsStatisticsByRingGroupsQuery({...(0,H.Rx)(r),ringGroupDns:r.pbxPeers?.map(T=>T.Number).filter(Boolean).join(" ")??""})}generateReportParams(r){return JSON.stringify({PeriodFrom:r.periodFromTo[0],PeriodTo:r.periodFromTo[1],DateRangeType:r.periodType,FirstDayOfWeek:r.firstWeekDay,RingGroupDns:r.pbxPeers?.map(T=>T.Number).filter(Boolean).join(" ")??""})}static \u0275fac=function(T){return new(T||I)};static \u0275prov=p.jDH({token:I,factory:I.\u0275fac})}return I})()},15708(te,k,t){t.d(k,{B:()=>P});var C=t(17705),y=t(85802),A=t(22972),o=t(68018),g=t(54999),c=t(7673),p=t(89417),b=t(50733),L=t(64438),H=t(2105),S=t(54327),I=t(99437),i=t(23294),r=t(96354),T=t(56998),n=t(41029),u=t(59053),_=t(89079),d=t(40953),$=t(84460),w=t(24708),R=t(66300),f=t(96106),O=t(35547);function M(a,l){1&a&&(O.EFF(0),O.nI1(1,"translate")),2&a&&O.JRh(O.bMT(1,1,"_i18n.SchedulerReportsNoEmailAddressWarning"))}function m(a,l){1&a&&(O.nrm(0,"div",6),O.nI1(1,"translate"),O.j41(2,"field-input",7),O.nrm(3,"val-errors",8),O.k0s()),2&a&&O.Y8G("translate",O.bMT(1,1,"_i18n.ScheduledReportEmailAddresses"))}let P=(()=>{class a extends A.m{translate=(0,y.WQX)(o.c$);cd=(0,y.WQX)(C.gRc);api=(0,y.WQX)(L.u);myUserApiService=(0,y.WQX)(b.b);xapiErrorService=(0,y.WQX)(n.Ko);destroy$=(0,y.WQX)(y.abz);buttons=g.P.OkCancel;report;reportFilterQueryParameter="filter";reportFilter;reportParams=JSON.stringify({});reportType;scheduleTypeOptions=[H.o.NotScheduled,H.o.Monthly,H.o.Weekly,H.o.Daily].map(e=>({value:e,label:(0,S.$o)(e)}));form=new p.gE({Name:new p.MJ("",{nonNullable:!0,validators:[p.k0.required]}),ScheduleType:new p.MJ(H.o.NotScheduled,{nonNullable:!0}),EmailAddresses:new p.MJ({value:"",disabled:!0},{nonNullable:!0,validators:u.Xm})});scheduleReportsEmailValidator(e){return s=>{const x=[H.o.Daily,H.o.Weekly,H.o.Monthly].includes(s.value);return s.value&&!e&&x?{scheduledReportsNoEmail:!0}:null}}ngOnInit(){this.form.controls.ScheduleType.valueChanges.pipe((0,i.F)(),(0,_.pQ)(this.destroy$)).subscribe(e=>{(0,T.TZ)(this.f.EmailAddresses,this.isScheduledType(e))}),this.myUserApiService.getMyUser({$select:["EmailAddress"]}).pipe((0,r.T)(e=>!!e.EmailAddress),(0,I.W)(()=>(0,c.of)(!1))).subscribe(e=>{this.form.controls.ScheduleType.addValidators(this.scheduleReportsEmailValidator(e)),this.report&&(this.form.patchValue({Name:this.report.Name,ScheduleType:this.report.ScheduleType,EmailAddresses:this.report.EmailAddresses}),this.form.markAllAsTouched()),this.form.updateValueAndValidity(),this.cd.markForCheck()})}get f(){return this.form.controls}get isSchedulingEnabled(){return this.isScheduledType(this.f.ScheduleType.value)}isScheduledType(e){return[H.o.Daily,H.o.Weekly,H.o.Monthly].includes(e)}validateBeforeSubmit=this.createDialogValidate(this.form,this.cd);submit$=()=>{const{Name:e,ScheduleType:s,EmailAddresses:h}=this.form.value,x={Name:e,ScheduleType:s,EmailAddresses:h??""};if(this.report)return this.api.updateScheduledReport({id:this.report.Id,pbxScheduledReport:x}).pipe((0,f.Pr)("_i18n.ScheduledReportNotFoundEditErrorMessage"),this.handleError(this.xapiErrorService,this.cd,this.form));const E=this.reportFilterQueryParameter+"="+encodeURIComponent(JSON.stringify(this.reportFilter.serializedFilter)),B="/"+location.hash.split("?")[0]+"?"+E,j=this.reportFilter.labels.map(v=>`${this.translate.instant(v.label)}: ${v.value}`).join(",\n");return this.api.createScheduledReport({pbxScheduledReport:{...x,ReportType:this.reportType,ReportLink:B,FilterDescription:j,ReportParams:this.reportParams}}).pipe(this.handleError(this.xapiErrorService,this.cd,this.form))};static \u0275fac=(()=>{let e;return function(h){return(e||(e=O.xGo(a)))(h||a)}})();static \u0275cmp=O.VBU({type:a,selectors:[["app-schedule-report-dialog"]],inputs:{report:"report",reportFilterQueryParameter:"reportFilterQueryParameter",reportFilter:"reportFilter",reportParams:"reportParams",reportType:"reportType"},features:[O.Vt3],decls:7,vars:8,consts:[[3,"submitted","header","validateBeforeSubmit","submit$","buttons","formGroup"],["formControlName","Name","label","_i18n.Name","placeholder","_i18n.ScheduledReportNamePlaceholder",3,"maxlength"],["controlName","Name"],["data-qa","scheduleType","formControlName","ScheduleType",3,"options"],["controlName","ScheduleType"],["valError","scheduledReportsNoEmail"],[3,"translate"],["data-qa","emails-list","formControlName","EmailAddresses","description","_i18n.EmailInputExample"],["controlName","EmailAddresses"]],template:function(s,h){1&s&&(O.j41(0,"app-modal-dialog",0),O.bIt("submitted",function(){return h.onSubmit()}),O.j41(1,"field-input",1),O.nrm(2,"val-errors",2),O.k0s(),O.j41(3,"field-select",3)(4,"val-errors",4),O.DNE(5,M,2,3,"ng-template",5),O.k0s()(),O.nVh(6,m,4,3),O.k0s()),2&s&&(O.Y8G("header",(null==h.report?null:h.report.Name)||"_i18n.SaveReport")("val
1idateBeforeSubmit",h.validateBeforeSubmit)("submit$",h.submit$)("buttons",h.buttons)("formGroup",h.form),O.R7$(),O.Y8G("maxlength",50),O.R7$(2),O.Y8G("options",h.scheduleTypeOptions),O.R7$(3),O.vxM(h.isSchedulingEnabled?6:-1))},dependencies:[d.p,p.X1,p.BC,p.cb,p.tU,p.j4,p.JD,$.m,w.IH,R.q,w.VI,o.Mm,o.D9],encapsulation:2,changeDetection:0})}return a})()},91382(te,k,t){t.d(k,{J:()=>A});var C=t(15708),y=t(96106);function A(o,g,c,p){o.showComponent(C.B,{initialState:{reportType:g,reportFilter:c,reportParams:p}}).pipe(y.nx).subscribe(()=>{o.information("_i18n.ReportScheduledMessage",{link:"/#/office/reports/my-reports"})})}},49382(te,k,t){t.d(k,{HO:()=>B,bQ:()=>E,lE:()=>x});var C=t(85802),y=t(84412),A=t(89417),o=t(59882),g=t(36576),c=t(62329),p=t(79997),b=t(38601),L=t(96354),H=t(54327),S=t(48643),I=t(79213),i=t(71747),r=t(74651),T=t(83188),n=t(59625),u=t(74005),_=t(76415),d=t(36715),$=t(22429),w=t(68018),R=t(49769),f=t(91382),O=t(54245),M=t(62653),m=t(89755),P=t(78713),a=t(35547);function l(j,v){if(1&j&&(a.j41(0,"tr",9)(1,"td"),a.EFF(2),a.nI1(3,"emptyValue"),a.k0s(),a.j41(4,"td"),a.EFF(5),a.nI1(6,"emptyValue"),a.k0s(),a.j41(7,"td"),a.EFF(8),a.nI1(9,"emptyValue"),a.k0s(),a.j41(10,"td"),a.EFF(11),a.nI1(12,"percentOf"),a.k0s()()),2&j){const Q=v.$implicit;a.R7$(2),a.JRh(a.bMT(3,4,Q.Dn)),a.R7$(3),a.JRh(a.bMT(6,6,Q.ReceivedCount)),a.R7$(3),a.JRh(a.bMT(9,8,Q.BadSlaCallsCount)),a.R7$(3),a.JRh(a.i5U(12,10,Q.BadSlaCallsCount,Q.ReceivedCount))}}function e(j,v){1&j&&(a.j41(0,"tr")(1,"td",10),a.nrm(2,"div",11),a.k0s()())}function s(j,v){if(1&j&&(a.j41(0,"tr")(1,"td",12),a.EFF(2),a.nI1(3,"translate"),a.k0s()()),2&j){const Q=a.XpG(2);a.R7$(2),a.SpI(" ",a.bMT(3,1,Q.noDataMessage(!Q.isReportAvailable))," ")}}function h(j,v){if(1&j&&(a.j41(0,"table")(1,"thead")(2,"tr",8)(3,"th"),a.EFF(4),a.nI1(5,"translate"),a.k0s(),a.j41(6,"th"),a.EFF(7),a.nI1(8,"translate"),a.k0s(),a.j41(9,"th"),a.EFF(10),a.nI1(11,"translate"),a.k0s(),a.j41(12,"th"),a.EFF(13),a.nI1(14,"translate"),a.k0s()()(),a.j41(15,"tbody"),a.Z7z(16,l,13,13,"tr",9,a.fX1),a.nVh(18,e,3,0,"tr")(19,s,4,3,"tr"),a.k0s()()),2&j){const Q=v;a.R7$(4),a.JRh(a.bMT(5,5,"_i18n.ReportsQueue")),a.R7$(3),a.JRh(a.bMT(8,7,"_i18n.ReportsTotalReceived")),a.R7$(3),a.JRh(a.bMT(11,9,"_i18n.CallsThatBreachedSLATime")),a.R7$(3),a.JRh(a.bMT(14,11,"_i18n.PercentCallsThatBreachedSLATime")),a.R7$(3),a.Dyx(Q.data),a.R7$(2),a.vxM(Q.hasMore?18:Q.isLoading||Q.data.length?-1:19)}}function x(){return new A.gE({dateRange:new A.MJ(new c.J,{nonNullable:!0}),pbxPeers:new A.MJ(new M.X("_i18n.ReportsQueues","queue","pbxPeers",[i.J.Queue],{pbxPeers:null},"_i18n.Any",!0),{nonNullable:!0}),interval:new A.MJ(new I.V("_i18n.ReportsExcludeCallsDroppedBefore"),{nonNullable:!0})})}function E(j,v=!0){const{dateRange:Q,pbxPeers:V,interval:W}=j;return{...Q.value,...V.value,...W.value,canViewReport:v}}let B=(()=>{class j{dataSource=(0,C.WQX)(g.p);route=(0,C.WQX)(o.nX);router=(0,C.WQX)(o.Ix);destroy$=(0,C.WQX)(C.abz);modalService=(0,C.WQX)(b.B);fileDownloadService=(0,C.WQX)(S.y);paginator$;hasMoreOrLoading$;parameters$=new y.t(null);nextPage$=new y.t(void 0);reset$=new y.t(void 0);filter=x();scheduledReportType=r.G.SlaStatistics;get isReportAvailable(){return this.route.snapshot.data.reportsAvailable}get parameters(){return E(this.filter.value,this.isReportAvailable)}constructor(){this.paginator$=(0,p.K)(this.modalService,this.destroy$,this.parameters$,this.nextPage$,this.reset$,this.dataSource.dataFetcher,100),this.hasMoreOrLoading$=this.paginator$.pipe((0,L.T)(Q=>!Q.hasMore||Q.isLoading))}submitFilter(){this.parameters$.next(this.parameters)}downloadCsv(){this.fileDownloadService.download(this.dataSource.generateCSVDownloadLink(this.parameters))}onSaveReport(Q){(0,f.J)(this.modalService,this.scheduledReportType,Q,this.dataSource.generateReportParams(this.parameters))}back(){this.router.navigate([".."],{relativeTo:this.route})}noDataMessage=H.Ns;formatAndJoinValues=H.pk;static \u0275fac=function(V){return new(V||j)};static \u0275cmp=a.VBU({type:j,selectors:[["ng-component"]],features:[a.Jv_([g.p])],decls:11,vars:16,consts:[["header","_i18n.SLAStatistics",3,"back","helpUrl"],["header","",3,"exportClicked","disabled","showReportPrint"],["top-bar","",3,"filterChanged","saveReport","filterForm","formGroup","reportType","disabled"],["formControlName","dateRange"],["formControlName","pbxPeers","placeholder","_i18n.Any",3,"allowEmpty"],["formControlName","interval"],["id","scrollableList",1,"h-100","scrollable-table"],["infiniteScroll","",3,"infiniteScrollCallback","infiniteScrollContainer","infiniteScrollDistance","infiniteScrollDisabled"],[1,"table-header"],[1,"text-md-nowrap"],["colspan","5"],[1,"loader"],["colspan","5",1,"text-center"]],template:function(V,W){if(1&V&&(a.j41(0,"app-page",0),a.bIt("back",function(){return W.back()}),a.j41(1,"app-report-action-buttons",1),a.bIt("exportClicked",function(){return W.downloadCsv()}),a.k0s(),a.j41(2,"app-complex-filter",2),a.bIt("filterChanged",function(){return W.submitFilter()})("saveReport",function(K){return W.onSaveReport(K)}),a.nrm(3,"app-date-range-filter",3)(4,"app-multi-peer-filter",4)(5,"app-new-interval-filter",5),a.k0s(),a.j41(6,"div",6)(7,"div",7),a.nI1(8,"async"),a.bIt("infiniteScrollCallback",function(){return W.nextPage$.next()}),a.nVh(9,h,20,13,"table"),a.nI1(10,"async"),a.k0s()()()),2&V){let U;a.Y8G("helpUrl","_i18n.ReportsUri"),a.R7$(),a.Y8G("disabled",!W.isReportAvailable)("showReportPrint",!0),a.R7$(),a.Y8G("filterForm",W.filter)("formGroup",W.filter)("reportType",W.scheduledReportType)("disabled",!W.isReportAvailable),a.R7$(2),a.Y8G("allowEmpty",!0),a.R7$(3),a.Y8G("infiniteScrollContainer","#scrollableList")("infiniteScrollDistance",1)("infiniteScrollDisabled",a.bMT(8,12,W.hasMoreOrLoading$)),a.R7$(2),a.vxM((U=a.bMT(10,14,W.paginator$))?9:-1,U)}},dependencies:[T.H,n.n,u.M,A.X1,A.BC,A.cb,A.j4,A.JD,_.B,d.J,$.D,m.b,w.D9,R.Jj,O.P,P.vE],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}']})}return j})()},36576(te,k,t){t.d(k,{p:()=>i});var C=t(25558),y=t(7673),A=t(96354),o=t(2793),g=t(97201),c=t(4499),p=t(35547),b=t(85802);let L=(()=>{class r extends c.d{downloadStatisticSla(n,u="body"){const _=n?.queueDnStr;if(null==_)throw new Error("Required parameter queueDnStr was null or undefined when calling downloadStatisticSla.");const d=n?.startDt;if(null==d)throw new Error("Required parameter startDt was null or undefined when calling downloadStatisticSla.");const $=n?.endDt;if(null==$)throw new Error("Required parameter endDt was null or undefined when calling downloadStatisticSla.");const w=n?.waitInterval;if(null==w)throw new Error("Required parameter waitInterval was null or undefined when calling downloadStatisticSla.");const R=n?.$top,f=n?.$skip,O=n?.$search,M=n?.$filter,m=n?.$count,P=n?.$select,a=n?.$orderby,l=n?.$expand;let e=new g.rx(this.encoder);e=this.addToHttpParams(e,"$top",R,g.l2.Form,!1),e=this.addToHttpParams(e,"$skip",f,g.l2.Form,!1),e=this.addToHttpParams(e,"$search",O,g.l2.Form,!1),e=this.addToHttpParams(e,"$filter",M,g.l2.Form,!1),e=this.addToHttpParams(e,"$count",m,g.l2.Form,!1),e=this.addToHttpParams(e,"$select",P,g.l2.Form,!1),e=this.addToHttpParams(e,"$orderby",a,g.l2.Form,!1),e=this.addToHttpParams(e,"$expand",l,g.l2.Form,!1);let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(s=s.set("Accept",h));let x="json";h&&(x=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");let E=`/ReportStatisticSla/Pbx.DownloadStatisticSla(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:B,withCredentials:j}=this.configuration;return this.httpClient.request("get",`${B}${E}`,{params:e.toHttpParams(),responseType:x,...j?{withCredentials:j}:{},headers:s,observe:u})}downloadStatisticSlaQuery(n,u="body",_=!1,d){const $=n.queueDnStr;if(null==$)throw new Error("Required parameter queueDnStr was null or undefined when calling downloadStatisticSla.");const w=n.startDt;if(null==w)throw new Error("Required parameter startDt was null or undefined when calling downloadStatisticSla.");const R=n.endDt;if(null==R)throw new Error("Required parameter endDt was null or undefined when calling downloadStatisticSla.");const f=n.waitInterval;if(null==f)throw new Error("Required parameter waitInterval was null or undefined when calling downloadStatisticSla.");const O=n.$top,M=n.$skip,m=n.$search,P=n.$filter,a=n.$count,l=n.$select,e=n.$orderby,s=n.$expand;let h=new g.rx(this.encoder);return h=this.addToHttpParams(h,"$top",O,g.l2.Form,!1),h=this.addToHttpParams(h,"$skip",M,g.l2.Form,!1),h=this.addToHttpParams(h,"$search",m,g.l2.Form,!1),h=this.addToHttpParams(h,"$filter",P,g.l2.Form,!1),h=this.addToHttpParams(h,"$count",a,g.l2.Form,!1),h=this.addToHttpParams(h,"$select",l,g.l2.Form,!1),h=this.addToHttpParams(h,"$orderby",e,g.l2.Form,!1),h=this.addToHttpParams(h,"$expand",s,g.l2.Form,!1),`/ReportStatisticSla/Pbx.DownloadStatisticSla(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+h.toString()}getStatisticSlaData(n,u="body"){const _=n?.queueDnStr;if(null==_)throw new Error("Required parameter queueDnStr was null or undefined when calling getStatisticSlaData.");const d=n?.startDt;if(null==d)throw new Error("Required parameter startDt was null or undefined when calling getStatisticSlaData.");const $=n?.endDt;if(null==$)throw new Error("Required parameter endDt was null or undefined when calling getStatisticSlaData.");const w=n?.waitInterval;if(null==w)throw new Error("Required parameter waitInterval was null or undefined when calling getStatisticSlaData.");const R=n?.$top,f=n?.$skip,O=n?.$search,M=n?.$filter,m=n?.$count,P=n?.$select,a=n?.$orderby,l=n?.$expand;let e=new g.rx(this.encoder);e=this.addToHttpParams(e,"$top",R,g.l2.Form,!1),e=this.addToHttpParams(e,"$skip",f,g.l2.Form,!1),e=this.addToHttpParams(e,"$search",O,g.l2.Form,!1),e=this.addToHttpParams(e,"$filter",M,g.l2.Form,!1),e=this.addToHttpParams(e,"$count",m,g.l2.Form,!1),e=this.addToHttpParams(e,"$select",P,g.l2.Form,!1),e=this.addToHttpParams(e,"$orderby",a,g.l2.Form,!1),e=this.addToHttpParams(e,"$expand",l,g.l2.Form,!1);let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(s=s.set("Accept",h));let x="json";h&&(x=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");let E=`/ReportStatisticSla/Pbx.GetStatisticSlaData(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:B,withCredentials:j}=this.configuration;return this.httpClient.request("get",`${B}${E}`,{params:e.toHttpParams(),responseType:x,...j?{withCredentials:j}:{},headers:s,observe:u})}getStatisticSlaDataQuery(n,u="body",_=!1,d){const $=n.queueDnStr;if(null==$)throw new Error("Required parameter queueDnStr was null or undefined when calling getStatisticSlaData.");const w=n.startDt;if(null==w)throw new Error("Required parameter startDt was null or undefined when calling getStatisticSlaData.");const R=n.endDt;if(null==R)throw new Error("Required parameter endDt was null or undefined when calling getStatisticSlaData.");const f=n.waitInterval;if(null==f)throw new Error("Required parameter waitInterval was null or undefined when calling getStatisticSlaData.");const O=n.$top,M=n.$skip,m=n.$search,P=n.$filter,a=n.$count,l=n.$select,e=n.$orderby,s=n.$expand;let h=new g.rx(this.encoder);return h=this.addToHttpParams(h,"$top",O,g.l2.Form,!1),h=this.addToHttpParams(h,"$skip",M,g.l2.Form,!1),h=this.addToHttpParams(h,"$search",m,g.l2.Form,!1),h=this.addToHttpParams(h,"$filter",P,g.l2.Form,!1),h=this.addToHttpParams(h,"$count",a,g.l2.Form,!1),h=this.addToHttpParams(h,"$select",l,g.l2.Form,!1),h=this.addToHttpParams(h,"$orderby",e,g.l2.Form,!1),h=this.addToHttpParams(h,"$expand",s,g.l2.Form,!1),`/ReportStatisticSla/Pbx.GetStatisticSlaData(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt
1",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+h.toString()}static \u0275fac=(()=>{let n;return function(_){return(n||(n=p.xGo(r)))(_||r)}})();static \u0275prov=b.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var H=t(67374),S=t.n(H),I=t(96794);let i=(()=>{class r{queuesApiService=(0,b.WQX)(o.S);reportStatisticSlaApiService=(0,b.WQX)(L);dataFetcher=(n,u)=>n.canViewReport?_=>_.pipe((0,C.n)(d=>this.requestQueuesStatistics(n,d,u)),(0,A.T)(d=>d.value)):_=>_.pipe((0,C.n)(()=>(0,y.of)([])));requestQueuesStatistics(n,u,_){return this.reportStatisticSlaApiService.getStatisticSlaData({$skip:u*_,$top:_,...(0,I.lr)(n),queueDnStr:n.pbxPeers?.map(d=>d.Number).filter(Boolean).join(" ")??"",waitInterval:S().duration(n.interval,"seconds").format("H:mm:s")})}generateCSVDownloadLink(n){return this.reportStatisticSlaApiService.downloadStatisticSlaQuery({...(0,I.lr)(n),queueDnStr:n.pbxPeers?.map(u=>u.Number).filter(Boolean).join(" ")??"",waitInterval:S().duration(n.interval,"seconds").format("H:mm:s")})}generateReportParams(n){return JSON.stringify({StartDt:n.periodFromTo[0],EndDt:n.periodFromTo[1],DateRangeType:n.periodType,FirstDayOfWeek:n.firstWeekDay,QueueDnStr:n.pbxPeers?.map(u=>u.Number).filter(Boolean).join(" ")??"",WaitInterval:S().duration(n.interval,"seconds").format("H:mm:s")})}static \u0275fac=function(u){return new(u||r)};static \u0275prov=b.jDH({token:r,factory:r.\u0275fac})}return r})()},77533(te,k,t){t.d(k,{v:()=>r});var C=t(68018),y=t(96704),A=t(54327),o=t(78713),g=t(35547);const c=[[["app-report-print-header"]]],p=["app-report-print-header"];function b(T,n){1&T&&(g.rj2(0,"tr")(1,"td",2),g.SdG(2),g.eux()())}function L(T,n){if(1&T&&(g.rj2(0,"tr",3)(1,"td",4),g.EFF(2),g.nI1(3,"emptyValue"),g.eux(),g.rj2(4,"td"),g.EFF(5),g.eux(),g.rj2(6,"td"),g.EFF(7),g.eux(),g.rj2(8,"td"),g.EFF(9),g.eux(),g.rj2(10,"td"),g.EFF(11),g.eux(),g.rj2(12,"td"),g.EFF(13),g.nI1(14,"duration"),g.eux(),g.rj2(15,"td"),g.EFF(16),g.nI1(17,"duration"),g.eux()()),2&T){const u=n.$implicit,_=g.XpG(2);g.AVh("print",_.print),g.R7$(2),g.JRh(g.bMT(3,9,u.Dn)),g.R7$(3),g.JRh(u.AgentsInQueueCount??0),g.R7$(2),g.JRh(u.ReceivedCount??0),g.R7$(2),g.JRh(u.AnsweredCount??0),g.R7$(2),g.JRh((u.ReceivedCount??0)-(u.AnsweredCount??0)),g.R7$(2),g.JRh(g.bMT(14,11,u.TotalTalkTime??0)),g.R7$(3),g.JRh(g.bMT(17,13,u.AvgTalkTime??0))}}function H(T,n){1&T&&(g.rj2(0,"tr")(1,"td",2),g.Hgh(2,"div",5),g.eux()())}function S(T,n){if(1&T&&(g.rj2(0,"tr")(1,"td",6),g.EFF(2),g.nI1(3,"translate"),g.eux()()),2&T){const u=g.XpG(2);g.AVh("print",u.print),g.R7$(2),g.SpI(" ",g.bMT(3,3,u.noDataMessage(u.licenseRestrictions))," ")}}function I(T,n){1&T&&(g.rj2(0,"tfoot")(1,"tr")(2,"td",2),g.EFF(3,"3CX Ltd."),g.eux()()())}function i(T,n){if(1&T&&(g.rj2(0,"table")(1,"thead"),g.nVh(2,b,3,0,"tr"),g.rj2(3,"tr")(4,"th"),g.EFF(5),g.nI1(6,"translate"),g.eux(),g.rj2(7,"th"),g.EFF(8),g.nI1(9,"translate"),g.eux(),g.rj2(10,"th"),g.EFF(11),g.nI1(12,"translate"),g.eux(),g.rj2(13,"th"),g.EFF(14),g.nI1(15,"translate"),g.eux(),g.rj2(16,"th"),g.EFF(17),g.nI1(18,"translate"),g.eux(),g.rj2(19,"th"),g.EFF(20),g.nI1(21,"translate"),g.eux(),g.rj2(22,"th"),g.EFF(23),g.nI1(24,"translate"),g.eux()()(),g.rj2(25,"tbody"),g.Z7z(26,L,18,15,"tr",1,g.fX1),g.nVh(28,H,3,0,"tr"),g.nVh(29,S,4,5,"tr",0),g.eux(),g.nVh(30,I,4,0,"tfoot"),g.eux()),2&T){const u=g.XpG();g.AVh("print",u.print),g.R7$(2),g.vxM(u.print?2:-1),g.R7$(),g.HbH(u.print?"print":"table-header"),g.R7$(2),g.JRh(g.bMT(6,15,"_i18n.ReportsQueue")),g.R7$(3),g.JRh(g.bMT(9,17,"_i18n.ReportsAgentsInTeam")),g.R7$(3),g.JRh(g.bMT(12,19,"_i18n.ReceivedCalls")),g.R7$(3),g.JRh(g.bMT(15,21,"_i18n.ServicedCalls")),g.R7$(3),g.JRh(g.bMT(18,23,"_i18n.UnansweredCalls")),g.R7$(3),g.JRh(g.bMT(21,25,"_i18n.ReportsTotalTalking")),g.R7$(3),g.JRh(g.bMT(24,27,"_i18n.ReportsAverageTalking")),g.R7$(3),g.Dyx(u.paginator.data),g.R7$(2),g.vxM(!u.print&&u.paginator.hasMore?28:-1),g.R7$(),g.vxM(u.paginator.isLoading||u.paginator.data.length||u.paginator.hasMore?-1:29),g.R7$(),g.vxM(u.print?30:-1)}}let r=(()=>{class T{paginator;print;licenseRestrictions;noDataMessage=A.Ns;formatAndJoinValues=A.pk;static \u0275fac=function(_){return new(_||T)};static \u0275cmp=g.VBU({type:T,selectors:[["app-team-queue-general-statistics-table"]],inputs:{paginator:"paginator",print:"print",licenseRestrictions:"licenseRestrictions"},ngContentSelectors:p,decls:1,vars:1,consts:[[3,"print"],[1,"text-lg-nowrap",3,"print"],["colspan","7"],[1,"text-lg-nowrap"],[1,"text-md-nowrap"],[1,"loader"],["colspan","7",1,"text-center"]],template:function(_,d){1&_&&(g.NAR(c),g.nVh(0,i,31,29,"table",0)),2&_&&g.vxM(d.paginator?0:-1)},dependencies:[C.D9,y.bB,o.vE],encapsulation:2,changeDetection:0})}return T})()},41308(te,k,t){t.d(k,{bQ:()=>a,lE:()=>P,tY:()=>l});var C=t(85802),y=t(84412),A=t(85343),o=t(89417),g=t(59882),c=t(10674),p=t(62329),b=t(79997),L=t(96354),H=t(38601),S=t(48643),I=t(79213),i=t(71747),r=t(74651),T=t(83188),n=t(59625),u=t(74005),_=t(76415),d=t(36715),$=t(22429),w=t(77533),R=t(49769),f=t(91382),O=t(62653),M=t(89755),m=t(35547);function P(){return new o.gE({dateRange:new o.MJ(new p.J,{nonNullable:!0}),pbxPeers:new o.MJ(new O.X("_i18n.ReportsQueues","queue","pbxPeers",[i.J.Queue],{pbxPeers:null},"_i18n.Any",!0),{nonNullable:!0}),interval:new o.MJ(new I.V("_i18n.ReportsExcludeCallsDroppedBefore"),{nonNullable:!0})})}function a(e,s=!0){const{dateRange:h,pbxPeers:x,interval:E}=e;return{...h.value,...x.value,...E.value,canViewReport:s}}let l=(()=>{class e{dataSource=(0,C.WQX)(c.E);route=(0,C.WQX)(g.nX);router=(0,C.WQX)(g.Ix);destroy$=(0,C.WQX)(C.abz);modalService=(0,C.WQX)(H.B);fileDownloadService=(0,C.WQX)(S.y);paginator$;hasMoreOrLoading$;parameters$=new y.t(null);nextPage$=new y.t(void 0);reset$=new y.t(void 0);filter=P();scheduledReportType=r.G.QueueTeamGeneralStatistics;
1get isReportAvailable(){return this.route.snapshot.data.reportsAvailable}get parameters(){return a(this.filter.value,this.isReportAvailable)}constructor(){this.paginator$=(0,b.K)(this.modalService,this.destroy$,this.parameters$,this.nextPage$,this.reset$,this.dataSource.dataFetcher,100),this.hasMoreOrLoading$=this.paginator$.pipe((0,L.T)(h=>!h.hasMore||h.isLoading))}submitFilter(){this.parameters$.next(this.parameters)}downloadCsv(){this.fileDownloadService.download(this.dataSource.generateCSVDownloadLink(this.parameters))}onSaveReport(h){(0,f.J)(this.modalService,this.scheduledReportType,h,this.dataSource.generateReportParams(this.parameters))}back(){this.router.navigate([".."],{relativeTo:this.route}).catch(A.l)}static \u0275fac=function(x){return new(x||e)};static \u0275cmp=m.VBU({type:e,selectors:[["ng-component"]],features:[m.Jv_([c.E])],decls:11,vars:17,consts:[["header","_i18n.TeamQueueGeneralStatistics",3,"back","helpUrl"],["header","",3,"exportClicked","disabled","showReportPrint"],["top-bar","",3,"filterChanged","saveReport","filterForm","formGroup","reportType","disabled"],["formControlName","dateRange"],["formControlName","pbxPeers","placeholder","_i18n.Any",3,"allowEmpty"],["formControlName","interval"],["id","scrollableList",1,"h-100","scrollable-table"],["infiniteScroll","",3,"infiniteScrollCallback","infiniteScrollContainer","infiniteScrollDistance","infiniteScrollDisabled"],[3,"paginator","licenseRestrictions"]],template:function(x,E){1&x&&(m.j41(0,"app-page",0),m.bIt("back",function(){return E.back()}),m.j41(1,"app-report-action-buttons",1),m.bIt("exportClicked",function(){return E.downloadCsv()}),m.k0s(),m.j41(2,"app-complex-filter",2),m.bIt("filterChanged",function(){return E.submitFilter()})("saveReport",function(j){return E.onSaveReport(j)}),m.nrm(3,"app-date-range-filter",3)(4,"app-multi-peer-filter",4)(5,"app-new-interval-filter",5),m.k0s(),m.j41(6,"div",6)(7,"div",7),m.nI1(8,"async"),m.bIt("infiniteScrollCallback",function(){return E.nextPage$.next()}),m.nrm(9,"app-team-queue-general-statistics-table",8),m.nI1(10,"async"),m.k0s()()()),2&x&&(m.Y8G("helpUrl","_i18n.ReportsUri"),m.R7$(),m.Y8G("disabled",!E.isReportAvailable)("showReportPrint",!0),m.R7$(),m.Y8G("filterForm",E.filter)("formGroup",E.filter)("reportType",E.scheduledReportType)("disabled",!E.isReportAvailable),m.R7$(2),m.Y8G("allowEmpty",!0),m.R7$(3),m.Y8G("infiniteScrollContainer","#scrollableList")("infiniteScrollDistance",1)("infiniteScrollDisabled",m.bMT(8,13,E.hasMoreOrLoading$)),m.R7$(2),m.Y8G("paginator",m.bMT(10,15,E.paginator$))("licenseRestrictions",!E.isReportAvailable))},dependencies:[T.H,n.n,u.M,o.X1,o.BC,o.cb,o.j4,o.JD,_.B,d.J,$.D,w.v,M.b,R.Jj],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}']})}return e})()},10674(te,k,t){t.d(k,{E:()=>i});var C=t(25558),y=t(7673),A=t(96354),o=t(2793),g=t(97201),c=t(4499),p=t(35547),b=t(85802);let L=(()=>{class r extends c.d{downloadTeamQueueGeneralStatistics(n,u="body"){const _=n?.queueDnStr;if(null==_)throw new Error("Required parameter queueDnStr was null or undefined when calling downloadTeamQueueGeneralStatistics.");const d=n?.startDt;if(null==d)throw new Error("Required parameter startDt was null or undefined when calling downloadTeamQueueGeneralStatistics.");const $=n?.endDt;if(null==$)throw new Error("Required parameter endDt was null or undefined when calling downloadTeamQueueGeneralStatistics.");const w=n?.waitInterval;if(null==w)throw new Error("Required parameter waitInterval was null or undefined when calling downloadTeamQueueGeneralStatistics.");const R=n?.$top,f=n?.$skip,O=n?.$search,M=n?.$filter,m=n?.$count,P=n?.$select,a=n?.$orderby,l=n?.$expand;let e=new g.rx(this.encoder);e=this.addToHttpParams(e,"$top",R,g.l2.Form,!1),e=this.addToHttpParams(e,"$skip",f,g.l2.Form,!1),e=this.addToHttpParams(e,"$search",O,g.l2.Form,!1),e=this.addToHttpParams(e,"$filter",M,g.l2.Form,!1),e=this.addToHttpParams(e,"$count",m,g.l2.Form,!1),e=this.addToHttpParams(e,"$select",P,g.l2.Form,!1),e=this.addToHttpParams(e,"$orderby",a,g.l2.Form,!1),e=this.addToHttpParams(e,"$expand",l,g.l2.Form,!1);let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(s=s.set("Accept",h));let x="json";h&&(x=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");let E=`/ReportTeamQueueGeneralStatistics/Pbx.DownloadTeamQueueGeneralStatistics(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:B,withCredentials:j}=this.configuration;return this.httpClient.request("get",`${B}${E}`,{params:e.toHttpParams(),responseType:x,...j?{withCredentials:j}:{},headers:s,observe:u})}downloadTeamQueueGeneralStatisticsQuery(n,u="body",_=!1,d){const $=n.queueDnStr;if(null==$)throw new Error("Required parameter queueDnStr was null or undefined when calling downloadTeamQueueGeneralStatistics.");const w=n.startDt;if(null==w)throw new Error("Required parameter startDt was null or undefined when calling downloadTeamQueueGeneralStatistics.");const R=n.endDt;if(null==R)throw new Error("Required parameter endDt was null or undefined when calling downloadTeamQueueGeneralStatistics.");const f=n.waitInterval;if(null==f)throw new Error("Required parameter waitInterval was null or undefined when calling downloadTeamQueueGeneralStatistics.");const O=n.$top,M=n.$skip,m=n.$search,P=n.$filter,a=n.$count,l=n.$select,e=n.$orderby,s=n.$expand;let h=new g.rx(this.encoder);return h=this.addToHttpParams(h,"$top",O,g.l2.Form,!1),h=this.addToHttpParams(h,"$skip",M,g.l2.Form,!1),h=this.addToHttpParams(h,"$search",m,g.l2.Form,!1),h=this.addToHttpParams(h,"$filter",P,g.l2.Form,!1),h=this.addToHttpParams(h,"$count",a,g.l2.Form,!1),h=this.addToHttpParams(h,"$select",l,g.l2.Form,!1),h=this.addToHttpParams(h,"$orderby",e,g.l2.Form,!1),h=this.addToHttpParams(h,"$expand",s,g.l2.Form,!1),`/ReportTeamQueueGeneralStatistics/Pbx.DownloadTeamQueueGeneralStatistics(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+h.toString()}getTeamQueueGeneralStatisticsData(n,u="body"){const _=n?.queueDnStr;if(null==_)throw new Error("Required parameter queueDnStr was null or undefined when calling getTeamQueueGeneralStatisticsData.");const d=n?.startDt;if(null==d)throw new Error("Required parameter startDt was null or undefined when calling getTeamQueueGeneralStatisticsData.");const $=n?.endDt;if(null==$)throw new Error("Required parameter endDt was null or undefined when calling getTeamQueueGeneralStatisticsData.");const w=n?.waitInterval;if(null==w)throw new Error("Required parameter waitInterval was null or undefined when calling getTeamQueueGeneralStatisticsData.");const R=n?.$top,f=n?.$skip,O=n?.$search,M=n?.$filter,m=n?.$count,P=n?.$select,a=n?.$orderby,l=n?.$expand;let e=new g.rx(this.encoder);e=this.addToHttpParams(e,"$top",R,g.l2.Form,!1),e=this.addToHttpParams(e,"$skip",f,g.l2.Form,!1),e=this.addToHttpParams(e,"$search",O,g.l2.Form,!1),e=this.addToHttpParams(e,"$filter",M,g.l2.Form,!1),e=this.addToHttpParams(e,"$count",m,g.l2.Form,!1),e=this.addToHttpParams(e,"$select",P,g.l2.Form,!1),e=this.addToHttpParams(e,"$orderby",a,g.l2.Form,!1),e=this.addToHttpParams(e,"$expand",l,g.l2.Form,!1);let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(s=s.set("Accept",h));let x="json";h&&(x=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");let E=`/ReportTeamQueueGeneralStatistics/Pbx.GetTeamQueueGeneralStatisticsData(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:B,withCredentials:j}=this.configuration;return this.httpClient.request("get",`${B}${E}`,{params:e.toHttpParams(),responseType:x,...j?{withCredentials:j}:{},headers:s,observe:u})}getTeamQueueGeneralStatisticsDataQuery(n,u="body",_=!1,d){const $=n.queueDnStr;if(null==$)throw new Error("Required parameter queueDnStr was null or undefined when calling getTeamQueueGeneralStatisticsData.");const w=n.startDt;if(null==w)throw new Error("Required parameter startDt was null or undefined when calling getTeamQueueGeneralStatisticsData.");const R=n.endDt;if(null==R)throw new Error("Required parameter endDt was null or undefined when calling getTeamQueueGeneralStatisticsData.");const f=n.waitInterval;if(null==f)throw new Error("Required parameter waitInterval was null or undefined when calling getTeamQueueGeneralStatisticsData.");const O=n.$top,M=n.$skip,m=n.$search,P=n.$filter,a=n.$count,l=n.$select,e=n.$orderby,s=n.$expand;let h=new g.rx(this.encoder);return h=this.addToHttpParams(h,"$top",O,g.l2.Form,!1),h=this.addToHttpParams(h,"$skip",M,g.l2.Form,!1),h=this.addToHttpParams(h,"$search",m,g.l2.Form,!1),h=this.addToHttpParams(h,"$filter",P,g.l2.Form,!1),h=this.addToHttpParams(h,"$count",a,g.l2.Form,!1),h=this.addToHttpParams(h,"$select",l,g.l2.Form,!1),h=this.addToHttpParams(h,"$orderby",e,g.l2.Form,!1),h=this.addToHttpParams(h,"$expand",s,g.l2.Form,!1),`/ReportTeamQueueGeneralStatistics/Pbx.GetTeamQueueGeneralStatisticsData(queueDnStr=${this.configuration.encodeParam({name:"queueDnStr",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},startDt=${this.configuration.encodeParam({name:"startDt",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},endDt=${this.configuration.encodeParam({name:"endDt",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+h.toString()}static \u0275fac=(()=>{let n;return function(_){return(n||(n=p.xGo(r)))(_||r)}})();static \u0275prov=b.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var H=t(67374),S=t.n(H),I=t(96794);let i=(()=>{class r{queuesApiService=(0,b.WQX)(o.S);reportTeamQueueGeneralStatisticsApiService=(0,b.WQX)(L);dataFetcher=(n,u)=>n.canViewReport?_=>_.pipe((0,C.n)(d=>this.requestQueuesStatistics(n,d,u)),(0,A.T)(d=>d.value)):_=>_.pipe((0,C.n)(()=>(0,y.of)([])));requestQueuesStatistics(n,u,_){return this.reportTeamQueueGeneralStatisticsApiService.getTeamQueueGeneralStatisticsData({$skip:u*_,$top:_,...(0,I.lr)(n),queueDnStr:n.pbxPeers?.map(d=>
1d.Number).filter(Boolean).join(" ")??"",waitInterval:S().duration(n.interval??0,"seconds").format("H:mm:s")})}generateCSVDownloadLink(n){return this.reportTeamQueueGeneralStatisticsApiService.downloadTeamQueueGeneralStatisticsQuery({...(0,I.lr)(n),queueDnStr:n.pbxPeers?.map(u=>u.Number).filter(Boolean).join(" ")??"",waitInterval:S().duration(n.interval??0,"seconds").format("H:mm:s")})}generateReportParams(n){return JSON.stringify({StartDt:n.periodFromTo[0],EndDt:n.periodFromTo[1],DateRangeType:n.periodType,QueueDnStr:n.pbxPeers?.map(u=>u.Number).filter(Boolean).join(" ")??"",WaitInterval:S().duration(n.interval??0,"seconds").format("H:mm:s")})}static \u0275fac=function(u){return new(u||r)};static \u0275prov=b.jDH({token:r,factory:r.\u0275fac})}return r})()},31226(te,k,t){t.d(k,{L:()=>g});var C=t(60724),y=t(45764),A=t(35547);const o={[C.Wx.Hour]:"L LT",[C.Wx.Day]:"L",[C.Wx.Week]:"L",[C.Wx.Month]:"MMM YYYY",[C.Wx.Year]:"YYYY"};let g=(()=>{class c{transform(b,L=C.Wx.Hour){if(b){const H=o[L??C.Wx.Hour];return[b[0],b[1]].filter(S=>!!S).map(S=>(0,y.Y)(S,H)).join(" - ")}return""}static \u0275fac=function(L){return new(L||c)};static \u0275pipe=A.EJ8({name:"timeScaleRange",type:c,pure:!0})}return c})()},84573(te,k,t){t.d(k,{m:()=>u});var C=t(49769),y=t(68018),A=t(54327),o=t(78713),g=t(60724),c=t(31226),p=t(35547);const b=[[["app-report-print-header"]]],L=["app-report-print-header"],H=_=>[_];function S(_,d){1&_&&(p.rj2(0,"tr")(1,"td",3),p.SdG(2),p.eux()())}function I(_,d){if(1&_&&(p.rj2(0,"tr",4)(1,"td"),p.EFF(2),p.nI1(3,"timeScaleRange"),p.nI1(4,"emptyValue"),p.eux(),p.rj2(5,"td"),p.EFF(6),p.nI1(7,"emptyValue"),p.eux(),p.rj2(8,"td"),p.EFF(9),p.nI1(10,"emptyValue"),p.eux()()),2&_){const $=d.$implicit,w=p.XpG(2);p.AVh("print",w.print),p.R7$(2),p.JRh(p.bMT(4,8,p.i5U(3,5,p.eq3(14,H,$.DateTimeInterval),w.timeScale))),p.R7$(4),p.JRh(p.bMT(7,10,$.AnsweredCount)),p.R7$(3),p.JRh(p.bMT(10,12,$.UnansweredCount))}}function i(_,d){1&_&&(p.rj2(0,"tr")(1,"td",3),p.Hgh(2,"div",5),p.eux()())}function r(_,d){if(1&_&&(p.rj2(0,"tr")(1,"td",6),p.EFF(2),p.nI1(3,"translate"),p.eux()()),2&_){const $=p.XpG(2);p.AVh("print",$.print),p.R7$(2),p.SpI(" ",p.bMT(3,3,$.noDataMessage($.licenseRestrictions))," ")}}function T(_,d){1&_&&(p.rj2(0,"tfoot")(1,"tr")(2,"td",3),p.EFF(3,"3CX Ltd."),p.eux()()())}function n(_,d){if(1&_&&(p.rj2(0,"table")(1,"thead"),p.nVh(2,S,3,0,"tr"),p.rj2(3,"tr")(4,"th"),p.EFF(5),p.nI1(6,"translate"),p.eux(),p.rj2(7,"th"),p.EFF(8),p.nI1(9,"translate"),p.eux(),p.rj2(10,"th",1),p.EFF(11),p.nI1(12,"translate"),p.eux()()(),p.rj2(13,"tbody"),p.Z7z(14,I,11,16,"tr",2,p.fX1),p.nVh(16,i,3,0,"tr"),p.nVh(17,r,4,5,"tr",0),p.eux(),p.nVh(18,T,4,0,"tfoot"),p.eux()),2&_){const $=p.XpG();p.AVh("print",$.print),p.R7$(2),p.vxM($.print?2:-1),p.R7$(),p.HbH($.print?"print":"table-header"),p.R7$(2),p.JRh(p.bMT(6,11,"_i18n.TimeScale")),p.R7$(3),p.JRh(p.bMT(9,13,"_i18n.AnsweredCalls")),p.R7$(3),p.JRh(p.bMT(12,15,"_i18n.UnansweredCalls")),p.R7$(3),p.Dyx($.paginator.data),p.R7$(2),p.vxM(!$.print&&$.paginator.hasMore?16:-1),p.R7$(),p.vxM($.paginator.isLoading||$.paginator.data.length||$.paginator.hasMore?-1:17),p.R7$(),p.vxM($.print?18:-1)}}let u=(()=>{class _{paginator;print;licenseRestrictions;timeScale=g.Wx.Hour;noDataMessage=A.Ns;static \u0275fac=function(w){return new(w||_)};static \u0275cmp=p.VBU({type:_,selectors:[["app-user-activity-table"]],inputs:{paginator:"paginator",print:"print",licenseRestrictions:"licenseRestrictions",timeScale:"timeScale"},ngContentSelectors:L,decls:1,vars:1,consts:[[3,"print"],["nowrap",""],[1,"text-md-nowrap",3,"print"],["colspan","3"],[1,"text-md-nowrap"],[1,"loader"],["colspan","3",1,"text-center"]],template:function(w,R){1&w&&(p.NAR(b),p.nVh(0,n,19,17,"table",0)),2&w&&p.vxM(R.paginator?0:-1)},dependencies:[C.MD,y.h,y.D9,o.vE,c.L],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}'],changeDetection:0})}return _})()},73724(te,k,t){t.d(k,{bQ:()=>B,cY:()=>j,lE:()=>E});var C=t(17705),y=t(85802),A=t(62329),o=t(74005),g=t(41657),c=t(47429),p=t(76415),b=t(89417),L=t(84412),H=t(85343),S=t(96354),I=t(74651),i=t(79997),r=t(45359),T=t(91382),n=t(49769),u=t(22429),_=t(83188),d=t(59625),$=t(79213),w=t(36715),R=t(31266),f=t(98280),O=t(97834),M=t(84573),m=t(59882),P=t(38601),a=t(48643),l=t(96864),e=t(60724),s=t(56998),h=t(89079),x=t(35547);function E(){return new b.gE({dateRange:new b.MJ(new A.J,{nonNullable:!0}),timeScale:new b.MJ((0,e.dE)(),{nonNullable:!0}),extensions:new b.MJ(new R.kK("extensions","_i18n.SelectUsers"),{nonNullable:!0}),interval:new b.MJ(new $.V("_i18n.ReportsExcludeCallsDroppedBefore"),{nonNullable:!0}),callArea:new b.MJ((0,l.J)(l.Y.External),{nonNullable:!0}),includeCalls:new b.MJ((0,O.FI)(),{nonNullable:!0})})}function B(v,Q=!0){const{dateRange:V,interval:W,includeCalls:U,extensions:K,callArea:D,timeScale:q}=v;return{...V.value,...W.value,includeQueueCalls:U.value.selectedValues?.includes(O.u3.Queue)??!1,callArea:D.value.selectedValue,timeScale:q.value.selectedValue,extensions:K.value,canViewReport:Q}}let j=(()=>{class v{dataSource=(0,y.WQX)(r.u);route=(0,y.WQX)(m.nX);router=(0,y.WQX)(m.Ix);destroy$=(0,y.WQX)(y.abz);modalService=(0,y.WQX)(P.B);fileDownloadService=(0,y.WQX)(a.y);cd=(0,y.WQX)(C.gRc);scheduledReportType=I.G.UserActivity;paginator$;hasMoreOrLoading$;parameters$=new L.t(null);nextPage$=new L.t(void 0);reset$=new L.t(void 0);timeScale$;includedCallsOptions=O.kl;allowedExtensionTypes=[R.V5.Any,R.V5.User,R.V5.Group];filter=E();get parameters(){return B(this.filter.value,this.isReportAvailable)}
1get isReportAvailable(){return this.route.snapshot.data.reportsAvailable}constructor(){this.paginator$=(0,i.K)(this.modalService,this.destroy$,this.parameters$,this.nextPage$,this.reset$,this.dataSource.dataFetcher,100),this.hasMoreOrLoading$=this.paginator$.pipe((0,S.T)(V=>!V.hasMore||V.isLoading)),this.timeScale$=this.parameters$.pipe((0,S.T)(V=>V?.timeScale??null)),(0,s.XP)(this.filter.controls.dateRange).pipe((0,h.pQ)(this.destroy$)).subscribe(V=>{const W=(0,e.fy)(V.value.periodType);this.filter.controls.timeScale.value.value={selectedValue:W},this.filter.controls.timeScale.setValue(this.filter.controls.timeScale.value),this.cd.markForCheck()})}submitFilter(){this.parameters$.next(this.parameters)}onSaveReport(V){(0,T.J)(this.modalService,this.scheduledReportType,V,this.dataSource.generateReportParams(this.parameters))}downloadCsv(){this.fileDownloadService.download(this.dataSource.generateCSVDownloadLink(this.parameters))}back(){this.router.navigate([".."],{relativeTo:this.route}).catch(H.l)}static \u0275fac=function(W){return new(W||v)};static \u0275cmp=x.VBU({type:v,selectors:[["ng-component"]],features:[x.Jv_([r.u])],decls:15,vars:22,consts:[["header","_i18n.UserActivity",3,"back","helpUrl"],["header","",3,"exportClicked","disabled","showReportPrint"],["top-bar","",3,"filterChanged","saveReport","filterForm","formGroup","reportType","disabled"],["formControlName","dateRange"],["formControlName","timeScale"],["formControlName","extensions",3,"acceptMultiplePeers","allowedTypes"],["formControlName","interval"],["formControlName","callArea"],["formControlName","includeCalls",3,"inline"],["id","scrollableList",1,"h-100","scrollable-table"],["infiniteScroll","",3,"infiniteScrollCallback","infiniteScrollContainer","infiniteScrollDistance","infiniteScrollDisabled"],[3,"paginator","timeScale","licenseRestrictions"]],template:function(W,U){1&W&&(x.j41(0,"app-page",0),x.bIt("back",function(){return U.back()}),x.j41(1,"app-report-action-buttons",1),x.bIt("exportClicked",function(){return U.downloadCsv()}),x.k0s(),x.j41(2,"app-complex-filter",2),x.bIt("filterChanged",function(){return U.submitFilter()})("saveReport",function(D){return U.onSaveReport(D)}),x.nrm(3,"app-date-range-filter",3)(4,"app-enum-filter",4)(5,"app-source-or-destination-filter",5)(6,"app-new-interval-filter",6)(7,"app-enum-filter",7)(8,"app-checkbox-group-filter",8),x.k0s(),x.j41(9,"div",9)(10,"div",10),x.nI1(11,"async"),x.bIt("infiniteScrollCallback",function(){return U.nextPage$.next()}),x.nrm(12,"app-user-activity-table",11),x.nI1(13,"async"),x.nI1(14,"async"),x.k0s()()()),2&W&&(x.Y8G("helpUrl","_i18n.ReportsUri"),x.R7$(),x.Y8G("disabled",!U.isReportAvailable)("showReportPrint",!0),x.R7$(),x.Y8G("filterForm",U.filter)("formGroup",U.filter)("reportType",U.scheduledReportType)("disabled",!U.isReportAvailable),x.R7$(3),x.Y8G("acceptMultiplePeers",!0)("allowedTypes",U.allowedExtensionTypes),x.R7$(3),x.Y8G("inline",!0),x.R7$(2),x.Y8G("infiniteScrollContainer","#scrollableList")("infiniteScrollDistance",1)("infiniteScrollDisabled",x.bMT(11,16,U.hasMoreOrLoading$)),x.R7$(2),x.Y8G("paginator",x.bMT(13,18,U.paginator$))("timeScale",x.bMT(14,20,U.timeScale$))("licenseRestrictions",!U.isReportAvailable))},dependencies:[b.YN,b.BC,b.cb,b.X1,b.j4,b.JD,o.M,u.D,_.H,d.n,w.J,g.C,f.C,M.m,c.j,p.B,n.Jj],styles:['@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none!important}}@media(max-width:575.98px){.d-sm-down-none[_ngcontent-%COMP%], .sm-visible[_ngcontent-%COMP%]{display:none!important}}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]{min-height:auto;display:inline-flex;flex:none;background-color:var(--background);padding:0}.page-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{margin-right:10px}.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%], table.scrollable-table[_ngcontent-%COMP%]{min-width:700px;overflow-x:auto}@media(min-width:768px){.scrollable-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)), table.scrollable-table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]:nth-last-child(1 of:not(.actions):not(.icon)){width:100%}}.grouped-table[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]:first-child{position:sticky;top:0;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%], .grouped-table[_ngcontent-%COMP%]   tr.table-group-header[_ngcontent-%COMP%]{cursor:pointer;background:var(--bg-table-group);position:sticky;top:30px;z-index:1}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{font-weight:400}.grouped-table[_ngcontent-%COMP%]   .table-group-header[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]:first-child{white-space:nowrap}.grouped-table[_ngcontent-%COMP%]   .table-group-row[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:first-child{padding-left:40px}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon[_ngcontent-%COMP%]{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent;transition:.3s transform;transform:rotate(0)}.grouped-table[_ngcontent-%COMP%]   .dropdown-arrow-icon.dropdown-arrow-icon-rotated[_ngcontent-%COMP%]{transform:rotate(-90deg)}']})}return v})()},45359(te,k,t){t.d(k,{u:()=>i});var C=t(85802),y=t(96354),A=t(7673),o=t(25558),g=t(31266),c=t(97201),p=t(4499),b=t(35547);let L=(()=>{class r extends p.d{downloadGetUserActivity(n,u="body"){const _=n?.clientTimeZone;if(null==_)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadGetUserActivity.");const d=n?.periodFrom;
1if(null==d)throw new Error("Required parameter periodFrom was null or undefined when calling downloadGetUserActivity.");const $=n?.periodTo;if(null==$)throw new Error("Required parameter periodTo was null or undefined when calling downloadGetUserActivity.");const w=n?.groupNumber;if(null==w)throw new Error("Required parameter groupNumber was null or undefined when calling downloadGetUserActivity.");const R=n?.extensionDns;if(null==R)throw new Error("Required parameter extensionDns was null or undefined when calling downloadGetUserActivity.");const f=n?.waitInterval;if(null==f)throw new Error("Required parameter waitInterval was null or undefined when calling downloadGetUserActivity.");const O=n?.includeQueueCalls;if(null==O)throw new Error("Required parameter includeQueueCalls was null or undefined when calling downloadGetUserActivity.");const M=n?.callArea;if(null==M)throw new Error("Required parameter callArea was null or undefined when calling downloadGetUserActivity.");const m=n?.groupingType;if(null==m)throw new Error("Required parameter groupingType was null or undefined when calling downloadGetUserActivity.");const P=n?.$top,a=n?.$skip,l=n?.$search,e=n?.$filter,s=n?.$count,h=n?.$select,x=n?.$orderby,E=n?.$expand;let B=new c.rx(this.encoder);B=this.addToHttpParams(B,"$top",P,c.l2.Form,!1),B=this.addToHttpParams(B,"$skip",a,c.l2.Form,!1),B=this.addToHttpParams(B,"$search",l,c.l2.Form,!1),B=this.addToHttpParams(B,"$filter",e,c.l2.Form,!1),B=this.addToHttpParams(B,"$count",s,c.l2.Form,!1),B=this.addToHttpParams(B,"$select",h,c.l2.Form,!1),B=this.addToHttpParams(B,"$orderby",x,c.l2.Form,!1),B=this.addToHttpParams(B,"$expand",E,c.l2.Form,!1);let j=this.defaultHeaders;j=this.configuration.addCredentialToHeaders("Application","Authorization",j,"Bearer ");const v=this.configuration.selectHeaderAccept(["application/json"]);void 0!==v&&(j=j.set("Accept",v));let Q="json";v&&(Q=v.startsWith("text")?"text":this.configuration.isJsonMime(v)?"json":"blob");let V=`/ReportUserActivity/Pbx.DownloadGetUserActivity(clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},groupNumber=${this.configuration.encodeParam({name:"groupNumber",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},extensionDns=${this.configuration.encodeParam({name:"extensionDns",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},includeQueueCalls=${this.configuration.encodeParam({name:"includeQueueCalls",value:O,in:"path",style:"simple",explode:!1,dataType:"boolean",dataFormat:void 0})},callArea=${this.configuration.encodeParam({name:"callArea",value:M,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},groupingType=${this.configuration.encodeParam({name:"groupingType",value:m,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:W,withCredentials:U}=this.configuration;return this.httpClient.request("get",`${W}${V}`,{params:B.toHttpParams(),responseType:Q,...U?{withCredentials:U}:{},headers:j,observe:u})}downloadGetUserActivityQuery(n,u="body",_=!1,d){const $=n.clientTimeZone;if(null==$)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadGetUserActivity.");const w=n.periodFrom;if(null==w)throw new Error("Required parameter periodFrom was null or undefined when calling downloadGetUserActivity.");const R=n.periodTo;if(null==R)throw new Error("Required parameter periodTo was null or undefined when calling downloadGetUserActivity.");const f=n.groupNumber;if(null==f)throw new Error("Required parameter groupNumber was null or undefined when calling downloadGetUserActivity.");const O=n.extensionDns;
1if(null==O)throw new Error("Required parameter extensionDns was null or undefined when calling downloadGetUserActivity.");const M=n.waitInterval;if(null==M)throw new Error("Required parameter waitInterval was null or undefined when calling downloadGetUserActivity.");const m=n.includeQueueCalls;if(null==m)throw new Error("Required parameter includeQueueCalls was null or undefined when calling downloadGetUserActivity.");const P=n.callArea;if(null==P)throw new Error("Required parameter callArea was null or undefined when calling downloadGetUserActivity.");const a=n.groupingType;if(null==a)throw new Error("Required parameter groupingType was null or undefined when calling downloadGetUserActivity.");const l=n.$top,e=n.$skip,s=n.$search,h=n.$filter,x=n.$count,E=n.$select,B=n.$orderby,j=n.$expand;let v=new c.rx(this.encoder);return v=this.addToHttpParams(v,"$top",l,c.l2.Form,!1),v=this.addToHttpParams(v,"$skip",e,c.l2.Form,!1),v=this.addToHttpParams(v,"$search",s,c.l2.Form,!1),v=this.addToHttpParams(v,"$filter",h,c.l2.Form,!1),v=this.addToHttpParams(v,"$count",x,c.l2.Form,!1),v=this.addToHttpParams(v,"$select",E,c.l2.Form,!1),v=this.addToHttpParams(v,"$orderby",B,c.l2.Form,!1),v=this.addToHttpParams(v,"$expand",j,c.l2.Form,!1),`/ReportUserActivity/Pbx.DownloadGetUserActivity(clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},groupNumber=${this.configuration.encodeParam({name:"groupNumber",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},extensionDns=${this.configuration.encodeParam({name:"extensionDns",value:O,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:M,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},includeQueueCalls=${this.configuration.encodeParam({name:"includeQueueCalls",value:m,in:"path",style:"simple",explode:!1,dataType:"boolean",dataFormat:void 0})},callArea=${this.configuration.encodeParam({name:"callArea",value:P,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},groupingType=${this.configuration.encodeParam({name:"groupingType",value:a,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})?`+v.toString()}getUserActivity(n,u="body"){const _=n?.clientTimeZone;if(null==_)throw new Error("Required parameter clientTimeZone was null or undefined when calling getUserActivity.");const d=n?.periodFrom;if(null==d)throw new Error("Required parameter periodFrom was null or undefined when calling getUserActivity.");const $=n?.periodTo;if(null==$)throw new Error("Required parameter periodTo was null or undefined when calling getUserActivity.");const w=n?.groupNumber;if(null==w)throw new Error("Required parameter groupNumber was null or undefined when calling getUserActivity.");const R=n?.extensionDns;if(null==R)throw new Error("Required parameter extensionDns was null or undefined when calling getUserActivity.");const f=n?.waitInterval;if(null==f)throw new Error("Required parameter waitInterval was null or undefined when calling getUserActivity.");const O=n?.includeQueueCalls;if(null==O)throw new Error("Required parameter includeQueueCalls was null or undefined when calling getUserActivity.");const M=n?.callArea;if(null==M)throw new Error("Required parameter callArea was null or undefined when calling getUserActivity.");const m=n?.groupingType;if(null==m)throw new Error("Required parameter groupingType was null or undefined when calling getUserActivity.");const P=n?.$top,a=n?.$skip,l=n?.$search,e=n?.$filter,s=n?.$count,h=n?.$select,x=n?.$orderby,E=n?.$expand;let B=new c.rx(this.encoder);B=this.addToHttpParams(B,"$top",P,c.l2.Form,!1),B=this.addToHttpParams(B,"$skip",a,c.l2.Form,!1),B=this.addToHttpParams(B,"$search",l,c.l2.Form,!1),B=this.addToHttpParams(B,"$filter",e,c.l2.Form,!1),B=this.addToHttpParams(B,"$count",s,c.l2.Form,!1),B=this.addToHttpParams(B,"$select",h,c.l2.Form,!1),B=this.addToHttpParams(B,"$orderby",x,c.l2.Form,!1),B=this.addToHttpParams(B,"$expand",E,c.l2.Form,!1);let j=this.defaultHeaders;j=this.configuration.addCredentialToHeaders("Application","Authorization",j,"Bearer ");const v=this.configuration.selectHeaderAccept(["application/json"]);void 0!==v&&(j=j.set("Accept",v));let Q="json";v&&(Q=v.startsWith("text")?"text":this.configuration.isJsonMime(v)?"json":"blob");let V=`/ReportUserActivity/Pbx.GetUserActivity(clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},groupNumber=${this.configuration.encodeParam({name:"groupNumber",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},extensionDns=${this.configuration.encodeParam({name:"extensionDns",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},includeQueueCalls=${this.configuration.encodeParam({name:"includeQueueCalls",value:O,in:"path",style:"simple",explode:!1,dataType:"boolean",dataFormat:void 0})},callArea=${this.configuration.encodeParam({name:"callArea",value:M,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},groupingType=${this.configuration.encodeParam({name:"groupingType",value:m,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:W,withCredentials:U}=this.configuration;return this.httpClient.request("get",`${W}${V}`,{params:B.toHttpParams(),responseType:Q,...U?{withCredentials:U}:{},headers:j,observe:u})}getUserActivityQuery(n,u="body",_=!1,d){const $=n.clientTimeZone;if(null==$)throw new Error("Required parameter clientTimeZone was null or undefined when calling getUserActivity.");const w=n.periodFrom;
1if(null==w)throw new Error("Required parameter periodFrom was null or undefined when calling getUserActivity.");const R=n.periodTo;if(null==R)throw new Error("Required parameter periodTo was null or undefined when calling getUserActivity.");const f=n.groupNumber;if(null==f)throw new Error("Required parameter groupNumber was null or undefined when calling getUserActivity.");const O=n.extensionDns;if(null==O)throw new Error("Required parameter extensionDns was null or undefined when calling getUserActivity.");const M=n.waitInterval;if(null==M)throw new Error("Required parameter waitInterval was null or undefined when calling getUserActivity.");const m=n.includeQueueCalls;if(null==m)throw new Error("Required parameter includeQueueCalls was null or undefined when calling getUserActivity.");const P=n.callArea;if(null==P)throw new Error("Required parameter callArea was null or undefined when calling getUserActivity.");const a=n.groupingType;if(null==a)throw new Error("Required parameter groupingType was null or undefined when calling getUserActivity.");const l=n.$top,e=n.$skip,s=n.$search,h=n.$filter,x=n.$count,E=n.$select,B=n.$orderby,j=n.$expand;let v=new c.rx(this.encoder);return v=this.addToHttpParams(v,"$top",l,c.l2.Form,!1),v=this.addToHttpParams(v,"$skip",e,c.l2.Form,!1),v=this.addToHttpParams(v,"$search",s,c.l2.Form,!1),v=this.addToHttpParams(v,"$filter",h,c.l2.Form,!1),v=this.addToHttpParams(v,"$count",x,c.l2.Form,!1),v=this.addToHttpParams(v,"$select",E,c.l2.Form,!1),v=this.addToHttpParams(v,"$orderby",B,c.l2.Form,!1),v=this.addToHttpParams(v,"$expand",j,c.l2.Form,!1),`/ReportUserActivity/Pbx.GetUserActivity(clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:R,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},groupNumber=${this.configuration.encodeParam({name:"groupNumber",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},extensionDns=${this.configuration.encodeParam({name:"extensionDns",value:O,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},waitInterval=${this.configuration.encodeParam({name:"waitInterval",value:M,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},includeQueueCalls=${this.configuration.encodeParam({name:"includeQueueCalls",value:m,in:"path",style:"simple",explode:!1,dataType:"boolean",dataFormat:void 0})},callArea=${this.configuration.encodeParam({name:"callArea",value:P,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},groupingType=${this.configuration.encodeParam({name:"groupingType",value:a,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})?`+v.toString()}static \u0275fac=(()=>{let n;return function(_){return(n||(n=b.xGo(r)))(_||r)}})();static \u0275prov=C.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var H=t(96794),S=t(67374),I=t.n(S);let i=(()=>{class r{reportUserActivityApiService=(0,C.WQX)(L);dataFetcher=(n,u)=>n.canViewReport?_=>_.pipe((0,o.n)(d=>this.requestUserActivity(n,d,u)),(0,y.T)(d=>d.value)):_=>_.pipe((0,o.n)(()=>(0,A.of)([])));requestUserActivity(n,u,_){return this.reportUserActivityApiService.getUserActivity({$skip:u*_,$top:_,...(0,H.Rx)(n),groupingType:n.timeScale,extensionDns:n.extensions.type===g.V5.User?r.getODATAExtensionsForParam(n.extensions):"",groupNumber:n.extensions.type===g.V5.Group?r.getODATAExtensionsForParam(n.extensions):"",waitInterval:I().duration(n.interval??0,"seconds").format("H:mm:s"),callArea:n.callArea,includeQueueCalls:n.includeQueueCalls,clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})}generateCSVDownloadLink(n){return this.reportUserActivityApiService.downloadGetUserActivityQuery({...(0,H.Rx)(n),groupingType:n.timeScale,extensionDns:n.extensions.type===g.V5.User?r.getODATAExtensionsForParam(n.extensions):"",groupNumber:n.extensions.type===g.V5.Group?r.getODATAExtensionsForParam(n.extensions):"",waitInterval:I().duration(n.interval??0,"seconds").format("H:mm:s"),callArea:n.callArea,includeQueueCalls:n.includeQueueCalls,clientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})}generateReportParams(n){return JSON.stringify({PeriodFrom:n.periodFromTo[0],Perio
1dTo:n.periodFromTo[1],DateRangeType:n.periodType,FirstDayOfWeek:n.firstWeekDay,GroupingType:n.timeScale,ExtensionDns:n.extensions.type===g.V5.User?r.getODATAExtensionsForParam(n.extensions):"",GroupNumber:n.extensions.type===g.V5.Group?r.getODATAExtensionsForParam(n.extensions):"",WaitInterval:I().duration(n.interval??0,"seconds").format("H:mm:s"),CallArea:n.callArea,IncludeQueueCalls:n.includeQueueCalls,ClientTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone})}static getODATAExtensionsForParam(n){return n.extension?.map(u=>u.Number).filter(Boolean).join(" ")??""}static \u0275fac=function(u){return new(u||r)};static \u0275prov=C.jDH({token:r,factory:r.\u0275fac})}return r})()},81783(te,k,t){t.d(k,{IU:()=>c,Pw:()=>L,oF:()=>b});var C=t(85802),y=t(99437),A=t(96354),o=t(67469),g=t(19037);function c(H){return H.listGroup({$select:["Id","IsDefault","Number","OfficeRoute","Name","TranscriptionMode"],$orderby:["Name"],$filter:"not startsWith(Name, '___FAVORITES___')"}).pipe((0,A.T)(({value:S})=>S?.map(I=>I)||[]))}const b={trunksGroups:()=>{const H=(0,C.WQX)(o.G),S=(0,C.WQX)(g.s);return c(H).pipe((0,y.W)(I=>S.handleError(I)))}};function L(H){return H.snapshot.data?.trunksGroups||[]}},89755(te,k,t){t.d(k,{b:()=>p});var C=t(89417),y=t(43748),A=t(95604),o=t(68018),g=t(81711),c=t(35547);let p=(()=>{class b extends y.F{placeholder="";allowEmpty=!1;constructor(){super(new C.MJ(null))}ngOnInit(){this.control.setValidators(this.allowEmpty?null:[C.k0.required]),this.syncControlState(this.control)}static \u0275fac=function(S){return new(S||b)};static \u0275cmp=c.VBU({type:b,selectors:[["app-multi-peer-filter"]],inputs:{placeholder:"placeholder",allowEmpty:"allowEmpty"},features:[c.Jv_([{provide:C.kq,multi:!0,useExisting:b},{provide:C.cz,multi:!0,useExisting:b}]),c.Vt3],decls:7,vars:8,consts:[["data-qa","peer-filter",1,"d-flex","gap-3"],[1,"filter-label"],[1,"input-group","h-auto"],[3,"formControl","searchDnTypes","multiple","isReportPeers","placeholder"]],template:function(S,I){1&S&&(c.j41(0,"div",0)(1,"label",1),c.EFF(2),c.nI1(3,"translate"),c.k0s(),c.j41(4,"field-wrapper")(5,"div",2),c.nrm(6,"app-peer-number-select",3),c.k0s()()()),2&S&&(c.R7$(2),c.JRh(c.bMT(3,6,I.value.label)),c.R7$(4),c.Y8G("formControl",I.control)("searchDnTypes",I.value.dnTypes)("multiple",!0)("isReportPeers",!0)("placeholder",I.placeholder))},dependencies:[A.z,C.X1,C.BC,C.l_,g.$,o.D9],encapsulation:2,changeDetection:0})}return b})()},62653(te,k,t){t.d(k,{X:()=>A});var C=t(7673),y=t(96354);class A{label;queryParam;key;dnTypes;emptyDisplayValue;allowEmpty;pureValue=null;constructor(g,c,p,b,L,H="",S=!1){this.label=g,this.queryParam=c,this.key=p,this.dnTypes=b,this.emptyDisplayValue=H,this.allowEmpty=S,L&&(this.value=L)}deserialize(g){return A.updateFromSerializedFilter(new A(this.label,this.queryParam,this.key,this.dnTypes,this.value,this.emptyDisplayValue,this.allowEmpty),g)}static updateFromSerializedFilter(g,c){if(g.queryParam in c){if("object"==typeof c[g.queryParam]){const p=c[g.queryParam];p?.Number&&(g.pureValue=[{Number:p.Number}])}if("string"==typeof c[g.queryParam]){const p=c[g.queryParam];p&&(g.pureValue=p.split(",").filter(b=>!!b).map(b=>({Number:b})))}}return g}extractNames(){return(this.pureValue?.map(g=>g.Name??g.Number??"")??[]).filter(Boolean)}getDisplayEmptyValue(g){return this.emptyDisplayValue?g.instant(this.emptyDisplayValue):""}getDisplayValue(g){const c=this.extractNames();return(c.slice(0,4).join(",")||this.getDisplayEmptyValue(g))+(c.length>4?"...":"")}getDisplayValueForPrint(g){return this.extractNames().join(",")||this.getDisplayEmptyValue(g)}serialize(){return null==this.pureValue?{}:{[this.queryParam]:(this.pureValue.map(g=>g.Number).filter(Boolean)??[]).join(",")}}validate(){return this.allowEmpty||this.pureValue?.length?null:{required:!0}}get value(){return{[this.key]:this.pureValue}}set value(g){this.pureValue=g[this.key]}refresh(g){const c=this.pureValue?.filter(p=>p.Number&&!p.Name)??[];return c.length>0?g.getPeers$(c.map(p=>p.Number)).pipe((0,y.T)(p=>{const b=new Map(p.map(L=>[L.Number,L]));return c.forEach(L=>{b.has(L.Number)&&Object.assign(L,b.get(L.Number))}),!0})):(0,C.of)(!1)}}},81711(te,k,t){t.d(k,{$:()=>s});var C=t(85802),y=t(89417),A=t(92996),o=t(56998),g=t(98352),c=t(50942),p=t(71747),b=t(84412),L=t(84572),H=t(7673),S=t(96354),I=t(25558),i=t(94979),r=t(96106),T=t(99437),n=t(23294),u=t(28492),_=t(96697),d=t(88141),$=t(38357),w=t(72510),R=t(49769),f=t(68018),O=t(50644),M=t(48981),m=t(35547);function P(h,x){1&h&&(m.j41(0,"span",5),m.EFF(1),m.k0s()),2&h&&(m.R7$(),m.JRh(x))}function a(h,x){1&h&&(m.j41(0,"span",6),m.EFF(1),m.k0s()),2&h&&(m.R7$(),m.JRh(x))}function l(h,x){if(1&h){const E=m.RV6();m.j41(0,"span",3),m.bIt("click",function(){const j=C.eBV(E);return C.Njj((0,j.clear)(j.item))}),m.EFF(1,"\xd7"),m.k0s(),m.j41(2,"span",4),m.nVh(3,P,2,1,"span",5),m.nVh(4,a,2,1,"span",6),m.k0s()}if(2&h){let E,B;const j=x.item,v=m.XpG();m.R7$(3),m.vxM((E=v.getDisplayNumber(j))?3:-1,E),m.R7$(),m.vxM((B=v.getDisplayName(j))?4:-1,B)}}function e(h,x){if(1&h){const E=m.RV6();m.j41(0,"app-peer",7),m.bIt("click",function(j){const v=C.eBV(E),Q=v.item$,V=v.index,W=m.XpG();return C.Njj(W.onItemClick(V,Q.selected,j))}),m.k0s()}if(2&h){const E=x.item,B=x.index,j=m.XpG();m.Y8G("id",m.VkB("item-",B))("peer",E)("hideGroupType",j.hideGroupType)}}let s=(()=>{class h extends g.z{tokenInfoService=(0,C.WQX)(A.Z);peersApiService=(0,C.WQX)(c.L);id=(0,o.bn)("peer-select");multiple=!1;clearable=!0;isReportPeers=!1;hideHotdesking=!0;hideGroupType=!1;placeholder="";peerFilter;searchDnTypes=[];extendPeer;loading=!1;itemsPerPage=50;peers$;requestMore$=new b.t(!0);hasBeenTouched$=new b.t(!1);searchSubject$=new b.t("");searchDnTypesSubject;lastSelectedIndex=null;
1ngOnInit(){this.searchDnTypesSubject=new b.t(this.searchDnTypes);const E=this.searchDnTypesSubject.asObservable().pipe((0,n.F)((v,Q)=>v.join("")===Q.join(""))),B=this.searchSubject$.pipe((0,r.Or)(),(0,S.T)(v=>v.trim()),(0,n.F)()),j=this.hasBeenTouched$.pipe((0,u.j)(v=>!v),(0,I.n)(()=>(0,L.z)([B,E])));this.peers$=j.pipe((0,I.n)(([v,Q])=>this.requestMore$.pipe((0,d.M)(()=>this.loading=!0),(0,i.m)((V,W)=>{if(-1===V.total)return this.getPagedResponse(v,Q,0).pipe((0,S.T)(U=>({peerList:V.peerList.concat(U.value||[]),total:U.totalItems,page:0})));if(V.peerList.length<V.total){const U=V.page+1;return this.getPagedResponse(v,Q,U).pipe((0,S.T)(K=>({peerList:V.peerList.concat(K.value||[]),total:K.totalItems,page:U})))}return(0,H.of)(V)},{peerList:[],total:-1,page:-1}),(0,d.M)(()=>this.loading=!1),(0,S.T)(V=>V.peerList))),(0,O.H9)())}ngOnChanges(E){E.searchDnTypes&&!E.searchDnTypes.firstChange&&(this.searchDnTypesSubject.next(this.searchDnTypes),this.lastSelectedIndex=null)}valueChanged(E,B){Array.isArray(E)&&super.valueChanged(E,B)}getPagedResponse(E,B,j){const v={$filter:"not (Number eq 'HOL')",$select:["Number","Name","Type","Id","Tags",...this.extendPeer??[]],...this.extendPeer?.includes("MemberOf")?{$expand:["MemberOf($select=Name)"]}:{},$count:!0,$top:this.itemsPerPage,$skip:j*this.itemsPerPage};return E&&(v.$search=(0,$.Bj)(E)),B&&B.length&&(v.$filter+=" and ("+B.map(Q=>this.explicitFilterPerType(Q)).join(" or ")+")"),B&&1===B.length&&B[0]===p.J.Group&&(v.$orderby=["Name"]),this.peerFilter&&(v.$filter+=" and "+this.peerFilter),this.hideHotdesking&&(v.$filter+=" and not startsWith(Number,'HD')"),(this.isReportPeers?this.peersApiService.getReportPeers(v):this.peersApiService.listPeer(v)).pipe((0,S.T)(Q=>({value:Q.value||[],totalItems:Q["@odata.count"]})),(0,S.T)(Q=>(B&&B.includes(p.J.Parking)&&B.length>1&&Q.value.sort((V,W)=>V.Number&&W.Number&&V.Number.startsWith("SP")&&W.Number.startsWith("SP")?+V.Number.replace("SP","")-+W.Number.replace("SP",""):0),Q)),(0,T.W)(()=>(0,H.of)({value:[],totalItems:0})))}explicitFilterPerType(E){return E===p.J.Parking?`(Type eq '${E}' and startsWith(Number,'SP'))`:`(Type eq '${E}')`}customSearchFn(){return!0}open(){this.hasBeenTouched$.next(!0)}onScrollToEnd(){this.requestMore$.next(!0)}clearSearch(){this.searchSubject$.next("")}close(){this.clearSearch(),this.markAsTouched()}searching(E){this.searchSubject$.next(E.term)}compareFn(E,B){return E.Id===B.Id}writeValue(E){super.writeValue(E||[])}getDisplayName(E){return(this.findInValue(E)??E).Name}getDisplayNumber(E){return E.Type===p.J.Group?this.hideGroupType?"":M.Y:E.Number}findInValue(E){return this.value.find(B=>this.compareFn(E,B))}onItemClick(E,B,j){this.multiple&&(j.shiftKey&&(j.stopPropagation(),null!==this.lastSelectedIndex&&this.selectRange(this.lastSelectedIndex,E,!B)),this.lastSelectedIndex=E)}selectRange(E,B,j){if(E<0||B<0)return void(this.lastSelectedIndex=null);const v=Math.min(E,B),Q=Math.max(E,B);this.peers$.pipe((0,_.s)(1),(0,S.T)(V=>V?.filter((W,U)=>U>=v&&U<=Q)??[])).subscribe(V=>{const W=j?[...new Map(this.value.concat(V).map(U=>[U.Id,U])).values()]:this.value.filter(U=>V.findIndex(K=>K.Id===U.Id)<0);this.valueChanged(W),this.cd.markForCheck()})}static \u0275fac=(()=>{let E;return function(j){return(E||(E=m.xGo(h)))(j||h)}})();static \u0275cmp=m.VBU({type:h,selectors:[["app-peer-number-select"]],inputs:{multiple:"multiple",clearable:"clearable",isReportPeers:"isReportPeers",hideHotdesking:"hideHotdesking",hideGroupType:"hideGroupType",placeholder:"placeholder",peerFilter:"peerFilter",searchDnTypes:"searchDnTypes",extendPeer:"extendPeer"},features:[m.Jv_([{provide:y.kq,useExisting:h,multi:!0}]),m.Vt3,m.OA$],decls:5,vars:17,consts:[["bindLabel","Number","data-qa","select",3,"change","search","open","close","scrollToEnd","id","compareWith","items","placeholder","closeOnSelect","multiple","ngModel","disabled","searchFn","searchable","clearable","loading","virtualScroll"],["ng-label-tmp",""],["ng-option-tmp",""],["data-qa","remove-choice","aria-hidden","true",1,"ng-value-icon","left",3,"click"],[1,"ng-value-label"],["data-qa","peer-number"],[1,"ng-secondary-text","ps-1"],[3,"click","id","peer","hideGroupType"]],template:function(B,j){1&B&&(m.j41(0,"ng-select",0),m.nI1(1,"async"),m.nI1(2,"translate"),m.bIt("change",function(Q){return j.valueChanged(j.multiple?Q:Q?[Q]:[])})("search",function(Q){return j.searching(Q)})("open",function(){return j.open()})("close",function(){return j.close()})("scrollToEnd",function(){return j.onScrollToEnd()}),m.DNE(3,l,5,2,"ng-template",1)(4,e,1,4,"ng-template",2),m.k0s()),2&B&&m.Y8G("id",j.id)("compareWith",j.compareFn)("items",m.bMT(1,13,j.peers$))("placeholder",j.value.length?"":m.bMT(2,15,j.placeholder))("closeOnSelect",!j.multiple)("multiple",j.multiple)("ngModel",j.multiple?j.value:j.value[0]??null)("disabled",j.disabled)("searchFn",j.customSearchFn)("searchable",!0)("clearable",j.clearable)("loading",j.loading)("virtualScroll",!0)}
1,dependencies:[w.vr,w.ZZ,w.Uq,y.YN,y.BC,y.vS,M.M,R.Jj,f.D9],encapsulation:2,changeDetection:0})}return h})()},32732(te,k,t){t.d(k,{O:()=>A});var C=t(35547),y=t(85802);let A=(()=>{class o{static \u0275fac=function(p){return new(p||o)};static \u0275cmp=C.VBU({type:o,selectors:[["app-waveform-lines-solid-icon"],["","app-waveform-lines-solid-icon",""]],decls:2,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 640 512"],["d","M352 32c0-17.7-14.3-32-32-32s-32 14.3-32 32V480c0 17.7 14.3 32 32 32s32-14.3 32-32V32zM544 96c0-17.7-14.3-32-32-32s-32 14.3-32 32V416c0 17.7 14.3 32 32 32s32-14.3 32-32V96zM256 128c0-17.7-14.3-32-32-32s-32 14.3-32 32V384c0 17.7 14.3 32 32 32s32-14.3 32-32V128zm192 32c0-17.7-14.3-32-32-32s-32 14.3-32 32V352c0 17.7 14.3 32 32 32s32-14.3 32-32V160zM160 224c0-17.7-14.3-32-32-32s-32 14.3-32 32v64c0 17.7 14.3 32 32 32s32-14.3 32-32V224zM0 256a32 32 0 1 0 64 0A32 32 0 1 0 0 256zm576 0a32 32 0 1 0 64 0 32 32 0 1 0 -64 0z"]],template:function(p,b){1&p&&(y.qSk(),C.rj2(0,"svg",0),C.Hgh(1,"path",1),C.eux())},encapsulation:2})}return o})()},73370(te,k,t){t.d(k,{J:()=>A});var C=t(35547),y=t(85802);let A=(()=>{class o{el=(0,y.WQX)(C.aKT);appEllipsis;onResize(){this.updateView()}ngOnInit(){this.el.nativeElement.classList.add("line-clamp-1")}ngOnChanges(){this.updateView()}updateView(){setTimeout(()=>{this.appEllipsis&&this.el.nativeElement.clientHeight<this.el.nativeElement.scrollHeight?this.el.nativeElement.classList.add("app-ellipsis-active"):(this.el.nativeElement.classList.remove("app-ellipsis-active"),this.appEllipsis||this.el.nativeElement.classList.remove("line-clamp-1"))})}static \u0275fac=function(p){return new(p||o)};static \u0275dir=C.FsC({type:o,selectors:[["","appEllipsis",""]],hostBindings:function(p,b){1&p&&C.bIt("resize",function(){return b.onResize()},C.tSv)},inputs:{appEllipsis:"appEllipsis"},features:[C.OA$]})}return o})()},54245(te,k,t){t.d(k,{P:()=>A,l:()=>y});var C=t(35547);const y=o=>"number"!=typeof o||isNaN(o)?"":`${o.toFixed()}%`;let A=(()=>{class o{transform(c,p){return y(100*(c||0)/(p||1))}static \u0275fac=function(p){return new(p||o)};static \u0275pipe=C.EJ8({name:"percentOf",type:o,pure:!0})}return o})()},82207(te,k,t){t.d(k,{I:()=>L});var C=t(85802),y=t(50779),A=t(68018),o=t(35547);let g=(()=>{class H{bsModalRef=(0,C.WQX)(y.Y$);header="_i18n.Transcription";text;static \u0275fac=function(i){return new(i||H)};static \u0275cmp=o.VBU({type:H,selectors:[["app-transcription-modal"]],inputs:{header:"header",text:"text"},decls:10,vars:5,consts:[[1,"modal-header"],["data-qa","modal-title",1,"modal-title",3,"translate"],["type","button","aria-label","Close",1,"btn-close",3,"click"],[1,"modal-body","text-keep-lines",2,"max-height","400px","overflow-y","auto"],[1,"modal-footer"],["id","btnOk","type","button",1,"btn","btn-primary",3,"click"]],template:function(i,r){1&i&&(o.j41(0,"div",0)(1,"h4",1),o.EFF(2,"Transcription"),o.k0s(),o.j41(3,"button",2),o.bIt("click",function(){return r.bsModalRef.hide()}),o.k0s()(),o.j41(4,"div",3),o.EFF(5),o.k0s(),o.j41(6,"div",4)(7,"button",5),o.bIt("click",function(){return r.bsModalRef.hide()}),o.EFF(8),o.nI1(9,"translate"),o.k0s()()),2&i&&(o.R7$(),o.Y8G("translate",r.header),o.R7$(4),o.SpI(" ",r.text," "),o.R7$(3),o.SpI("",o.bMT(9,3,"_i18n.OK")," "))},dependencies:[A.Mm,A.D9],encapsulation:2})}return H})();var c=t(16444),p=t(1211),b=t(38601);let L=(()=>{class H{myPhoneService=(0,C.WQX)(c.gx);modalService=(0,C.WQX)(b.B);bsModalService=(0,C.WQX)(y.I8);showTranscription(I,i="_i18n.Transcription"){this.bsModalService.show(g,{initialState:{header:i,text:I}})}requestRecordingTranscription(I){this.myPhoneService.get(new p.Kt_({Id:I})).subscribe({next:i=>{this.showTranscription(i.Transcription)},error:i=>this.modalService.error(i)})}static \u0275fac=function(i){return new(i||H)};static \u0275prov=C.jDH({token:H,factory:H.\u0275fac,providedIn:"root"})}return H})()},56132(te,k,t){t.d(k,{Q:()=>g});
1var C=t(97201),y=t(4499),A=t(35547),o=t(85802);let g=(()=>{class c extends y.d{downloadCallLog(b,L="body"){const H=b?.periodFrom;if(null==H)throw new Error("Required parameter periodFrom was null or undefined when calling downloadCallLog.");const S=b?.periodTo;if(null==S)throw new Error("Required parameter periodTo was null or undefined when calling downloadCallLog.");const I=b?.sourceType;if(null==I)throw new Error("Required parameter sourceType was null or undefined when calling downloadCallLog.");const i=b?.sourceFilter;if(null==i)throw new Error("Required parameter sourceFilter was null or undefined when calling downloadCallLog.");const r=b?.destinationType;if(null==r)throw new Error("Required parameter destinationType was null or undefined when calling downloadCallLog.");const T=b?.destinationFilter;if(null==T)throw new Error("Required parameter destinationFilter was null or undefined when calling downloadCallLog.");const n=b?.callsType;if(null==n)throw new Error("Required parameter callsType was null or undefined when calling downloadCallLog.");const u=b?.callTimeFilterType;if(null==u)throw new Error("Required parameter callTimeFilterType was null or undefined when calling downloadCallLog.");const _=b?.callTimeFilterFrom;if(null==_)throw new Error("Required parameter callTimeFilterFrom was null or undefined when calling downloadCallLog.");const d=b?.callTimeFilterTo;if(null==d)throw new Error("Required parameter callTimeFilterTo was null or undefined when calling downloadCallLog.");const $=b?.hidePcalls;if(null==$)throw new Error("Required parameter hidePcalls was null or undefined when calling downloadCallLog.");const w=b?.clientTimeZone;if(null==w)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadCallLog.");const R=b?.$top,f=b?.$skip,O=b?.$search,M=b?.$filter,m=b?.$count,P=b?.$select,a=b?.$orderby,l=b?.$expand;let e=new C.rx(this.encoder);e=this.addToHttpParams(e,"$top",R,C.l2.Form,!1),e=this.addToHttpParams(e,"$skip",f,C.l2.Form,!1),e=this.addToHttpParams(e,"$search",O,C.l2.Form,!1),e=this.addToHttpParams(e,"$filter",M,C.l2.Form,!1),e=this.addToHttpParams(e,"$count",m,C.l2.Form,!1),e=this.addToHttpParams(e,"$select",P,C.l2.Form,!1),e=this.addToHttpParams(e,"$orderby",a,C.l2.Form,!1),e=this.addToHttpParams(e,"$expand",l,C.l2.Form,!1);let s=this.defaultHeaders;s=this.configuration.addCredentialToHeaders("Application","Authorization",s,"Bearer ");const h=this.configuration.selectHeaderAccept(["application/json"]);void 0!==h&&(s=s.set("Accept",h));let x="json";h&&(x=h.startsWith("text")?"text":this.configuration.isJsonMime(h)?"json":"blob");let E=`/ReportCallLogData/Pbx.DownloadCallLog(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:H,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:S,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},sourceType=${this.configuration.encodeParam({name:"sourceType",value:I,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},sourceFilter=${this.configuration.encodeParam({name:"sourceFilter",value:i,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},destinationType=${this.configuration.encodeParam({name:"destinationType",value:r,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},destinationFilter=${this.configuration.encodeParam({name:"destinationFilter",value:T,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},callsType=${this.configuration.encodeParam({name:"callsType",value:n,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},callTimeFilterType=${this.configuration.encodeParam({name:"callTimeFilterType",value:u,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},callTimeFilterFrom=${this.configuration.encodeParam({name:"callTimeFilterFrom",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},callTimeFilterTo=${this.configuration.encodeParam({name:"callTimeFilterTo",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},hidePcalls=${this.configuration.encodeParam({name:"hidePcalls",value:$,in:"path",style:"simple",explode:!1,dataType:"boolean",dataFormat:void 0})},clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:B,withCredentials:j}=this.configuration;return this.httpClient.request("get",`${B}${E}`,{params:e.toHttpParams(),responseType:x,...j?{withCredentials:j}:{},headers:s,observe:L})}downloadCallLogQuery(b,L="body",H=!1,S){const I=b.periodFrom;
1if(null==I)throw new Error("Required parameter periodFrom was null or undefined when calling downloadCallLog.");const i=b.periodTo;if(null==i)throw new Error("Required parameter periodTo was null or undefined when calling downloadCallLog.");const r=b.sourceType;if(null==r)throw new Error("Required parameter sourceType was null or undefined when calling downloadCallLog.");const T=b.sourceFilter;if(null==T)throw new Error("Required parameter sourceFilter was null or undefined when calling downloadCallLog.");const n=b.destinationType;if(null==n)throw new Error("Required parameter destinationType was null or undefined when calling downloadCallLog.");const u=b.destinationFilter;if(null==u)throw new Error("Required parameter destinationFilter was null or undefined when calling downloadCallLog.");const _=b.callsType;if(null==_)throw new Error("Required parameter callsType was null or undefined when calling downloadCallLog.");const d=b.callTimeFilterType;if(null==d)throw new Error("Required parameter callTimeFilterType was null or undefined when calling downloadCallLog.");const $=b.callTimeFilterFrom;if(null==$)throw new Error("Required parameter callTimeFilterFrom was null or undefined when calling downloadCallLog.");const w=b.callTimeFilterTo;if(null==w)throw new Error("Required parameter callTimeFilterTo was null or undefined when calling downloadCallLog.");const R=b.hidePcalls;if(null==R)throw new Error("Required parameter hidePcalls was null or undefined when calling downloadCallLog.");const f=b.clientTimeZone;if(null==f)throw new Error("Required parameter clientTimeZone was null or undefined when calling downloadCallLog.");const O=b.$top,M=b.$skip,m=b.$search,P=b.$filter,a=b.$count,l=b.$select,e=b.$orderby,s=b.$expand;let h=new C.rx(this.encoder);return h=this.addToHttpParams(h,"$top",O,C.l2.Form,!1),h=this.addToHttpParams(h,"$skip",M,C.l2.Form,!1),h=this.addToHttpParams(h,"$search",m,C.l2.Form,!1),h=this.addToHttpParams(h,"$filter",P,C.l2.Form,!1),h=this.addToHttpParams(h,"$count",a,C.l2.Form,!1),h=this.addToHttpParams(h,"$select",l,C.l2.Form,!1),h=this.addToHttpParams(h,"$orderby",e,C.l2.Form,!1),h=this.addToHttpParams(h,"$expand",s,C.l2.Form,!1),`/ReportCallLogData/Pbx.DownloadCallLog(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:I,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:i,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},sourceType=${this.configuration.encodeParam({name:"sourceType",value:r,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},sourceFilter=${this.configuration.encodeParam({name:"sourceFilter",value:T,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},destinationType=${this.configuration.encodeParam({name:"destinationType",value:n,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},destinationFilter=${this.configuration.encodeParam({name:"destinationFilter",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},callsType=${this.configuration.encodeParam({name:"callsType",value:_,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},callTimeFilterType=${this.configuration.encodeParam({name:"callTimeFilterType",value:d,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},callTimeFilterFrom=${this.configuration.encodeParam({name:"callTimeFilterFrom",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},callTimeFilterTo=${this.configuration.encodeParam({name:"callTimeFilterTo",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},hidePcalls=${this.configuration.encodeParam({name:"hidePcalls",value:R,in:"path",style:"simple",explode:!1,dataType:"boolean",dataFormat:void 0})},clientTimeZone=${this.configuration.encodeParam({name:"clientTimeZone",value:f,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})?`+h.toString()}getCallLogData(b,L="body"){const H=b?.periodFrom;
1if(null==H)throw new Error("Required parameter periodFrom was null or undefined when calling getCallLogData.");const S=b?.periodTo;if(null==S)throw new Error("Required parameter periodTo was null or undefined when calling getCallLogData.");const I=b?.sourceType;if(null==I)throw new Error("Required parameter sourceType was null or undefined when calling getCallLogData.");const i=b?.sourceFilter;if(null==i)throw new Error("Required parameter sourceFilter was null or undefined when calling getCallLogData.");const r=b?.destinationType;if(null==r)throw new Error("Required parameter destinationType was null or undefined when calling getCallLogData.");const T=b?.destinationFilter;if(null==T)throw new Error("Required parameter destinationFilter was null or undefined when calling getCallLogData.");const n=b?.callsType;if(null==n)throw new Error("Required parameter callsType was null or undefined when calling getCallLogData.");const u=b?.callTimeFilterType;if(null==u)throw new Error("Required parameter callTimeFilterType was null or undefined when calling getCallLogData.");const _=b?.callTimeFilterFrom;if(null==_)throw new Error("Required parameter callTimeFilterFrom was null or undefined when calling getCallLogData.");const d=b?.callTimeFilterTo;if(null==d)throw new Error("Required parameter callTimeFilterTo was null or undefined when calling getCallLogData.");const $=b?.hidePcalls;if(null==$)throw new Error("Required parameter hidePcalls was null or undefined when calling getCallLogData.");const w=b?.$top,R=b?.$skip,f=b?.$search,O=b?.$filter,M=b?.$count,m=b?.$select,P=b?.$orderby,a=b?.$expand;let l=new C.rx(this.encoder);l=this.addToHttpParams(l,"$top",w,C.l2.Form,!1),l=this.addToHttpParams(l,"$skip",R,C.l2.Form,!1),l=this.addToHttpParams(l,"$search",f,C.l2.Form,!1),l=this.addToHttpParams(l,"$filter",O,C.l2.Form,!1),l=this.addToHttpParams(l,"$count",M,C.l2.Form,!1),l=this.addToHttpParams(l,"$select",m,C.l2.Form,!1),l=this.addToHttpParams(l,"$orderby",P,C.l2.Form,!1),l=this.addToHttpParams(l,"$expand",a,C.l2.Form,!1);let e=this.defaultHeaders;e=this.configuration.addCredentialToHeaders("Application","Authorization",e,"Bearer ");const s=this.configuration.selectHeaderAccept(["application/json"]);void 0!==s&&(e=e.set("Accept",s));let h="json";s&&(h=s.startsWith("text")?"text":this.configuration.isJsonMime(s)?"json":"blob");let x=`/ReportCallLogData/Pbx.GetCallLogData(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:H,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:S,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},sourceType=${this.configuration.encodeParam({name:"sourceType",value:I,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},sourceFilter=${this.configuration.encodeParam({name:"sourceFilter",value:i,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},destinationType=${this.configuration.encodeParam({name:"destinationType",value:r,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},destinationFilter=${this.configuration.encodeParam({name:"destinationFilter",value:T,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},callsType=${this.configuration.encodeParam({name:"callsType",value:n,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},callTimeFilterType=${this.configuration.encodeParam({name:"callTimeFilterType",value:u,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},callTimeFilterFrom=${this.configuration.encodeParam({name:"callTimeFilterFrom",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},callTimeFilterTo=${this.configuration.encodeParam({name:"callTimeFilterTo",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},hidePcalls=${this.configuration.encodeParam({name:"hidePcalls",value:$,in:"path",style:"simple",explode:!1,dataType:"boolean",dataFormat:void 0})})`;const{basePath:E,withCredentials:B}=this.configuration;return this.httpClient.request("get",`${E}${x}`,{params:l.toHttpParams(),responseType:h,...B?{withCredentials:B}:{},headers:e,observe:L})}getCallLogDataQuery(b,L="body",H=!1,S){const I=b.periodFrom;
1if(null==I)throw new Error("Required parameter periodFrom was null or undefined when calling getCallLogData.");const i=b.periodTo;if(null==i)throw new Error("Required parameter periodTo was null or undefined when calling getCallLogData.");const r=b.sourceType;if(null==r)throw new Error("Required parameter sourceType was null or undefined when calling getCallLogData.");const T=b.sourceFilter;if(null==T)throw new Error("Required parameter sourceFilter was null or undefined when calling getCallLogData.");const n=b.destinationType;if(null==n)throw new Error("Required parameter destinationType was null or undefined when calling getCallLogData.");const u=b.destinationFilter;if(null==u)throw new Error("Required parameter destinationFilter was null or undefined when calling getCallLogData.");const _=b.callsType;if(null==_)throw new Error("Required parameter callsType was null or undefined when calling getCallLogData.");const d=b.callTimeFilterType;if(null==d)throw new Error("Required parameter callTimeFilterType was null or undefined when calling getCallLogData.");const $=b.callTimeFilterFrom;if(null==$)throw new Error("Required parameter callTimeFilterFrom was null or undefined when calling getCallLogData.");const w=b.callTimeFilterTo;if(null==w)throw new Error("Required parameter callTimeFilterTo was null or undefined when calling getCallLogData.");const R=b.hidePcalls;if(null==R)throw new Error("Required parameter hidePcalls was null or undefined when calling getCallLogData.");const f=b.$top,O=b.$skip,M=b.$search,m=b.$filter,P=b.$count,a=b.$select,l=b.$orderby,e=b.$expand;let s=new C.rx(this.encoder);return s=this.addToHttpParams(s,"$top",f,C.l2.Form,!1),s=this.addToHttpParams(s,"$skip",O,C.l2.Form,!1),s=this.addToHttpParams(s,"$search",M,C.l2.Form,!1),s=this.addToHttpParams(s,"$filter",m,C.l2.Form,!1),s=this.addToHttpParams(s,"$count",P,C.l2.Form,!1),s=this.addToHttpParams(s,"$select",a,C.l2.Form,!1),s=this.addToHttpParams(s,"$orderby",l,C.l2.Form,!1),s=this.addToHttpParams(s,"$expand",e,C.l2.Form,!1),`/ReportCallLogData/Pbx.GetCallLogData(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:I,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:i,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},sourceType=${this.configuration.encodeParam({name:"sourceType",value:r,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},sourceFilter=${this.configuration.encodeParam({name:"sourceFilter",value:T,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},destinationType=${this.configuration.encodeParam({name:"destinationType",value:n,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},destinationFilter=${this.configuration.encodeParam({name:"destinationFilter",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},callsType=${this.configuration.encodeParam({name:"callsType",value:_,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},callTimeFilterType=${this.configuration.encodeParam({name:"callTimeFilterType",value:d,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},callTimeFilterFrom=${this.configuration.encodeParam({name:"callTimeFilterFrom",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},callTimeFilterTo=${this.configuration.encodeParam({name:"callTimeFilterTo",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},hidePcalls=${this.configuration.encodeParam({name:"hidePcalls",value:R,in:"path",style:"simple",explode:!1,dataType:"boolean",dataFormat:void 0})})?`+s.toString()}getCallQualityReport(b,L="body"){const H=b?.cdrId;if(null==H)throw new Error("Required parameter cdrId was null or undefined when calling getCallQualityReport.");const S=b?.srcNumber;if(null==S)throw new Error("Required parameter srcNumber was null or undefined when calling getCallQualityReport.");const I=b?.dstNumber;if(null==I)throw new Error("Required parameter dstNumber was null or undefined when calling getCallQualityReport.");const i=b?.srcCallerId;if(null==i)throw new Error("Required parameter srcCallerId was null or undefined when calling getCallQualityReport.");const r=b?.dstCallerId;if(null==r)throw new Error("Required parameter dstCallerId was null or undefined when calling getCallQualityReport.");let T=this.defaultHeaders;T=this.configuration.addCredentialToHeaders("Application","Authorization",T,"Bearer ");const n=this.configuration.selectHeaderAccept(["application/json"]);void 0!==n&&(T=T.set("Accept",n));let u="json";n&&(u=n.startsWith("text")?"text":this.configuration.isJsonMime(n)?"json":"blob");let _=`/ReportCallLogData/Pbx.GetCallQualityReport(cdrId=${this.configuration.encodeParam({name:"cdrId",value:H,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},srcNumber=${this.configuration.encodeParam({name:"srcNumber",value:S,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},dstNumber=${this.configuration.encodeParam({name:"dstNumber",value:I,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},srcCallerId=${this.configuration.encodeParam({name:"srcCallerId",value:i,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},dstCallerId=${this.configuration.encodeParam({name:"dstCallerId",value:r,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:d,withCredentials:$}=this.configuration;return this.httpClient.request("get",`${d}${_}`,{responseType:u,...$?{withCredentials:$}:{},headers:T,observe:L})}getCallQualityReportQuery(b,L="body",H=!1,S){const I=b.cdrId;if(null==I)throw new Error("Required parameter cdrId was null or undefined when calling getCallQualityReport.");const i=b.srcNumber;if(null==i)throw new Error("Required parameter srcNumber was null or undefined when calling getCallQualityReport.");const r=b.dstNumber;if(null==r)throw new Error("Required parameter dstNumber was null or undefined when calling getCallQualityReport.");const T=b.srcCallerId;if(null==T)throw new Error("Required parameter srcCallerId was null or undefined when calling getCallQualityReport.");const n=b.dstCallerId;if(null==n)throw new Error("Required parameter dstCallerId was null or undefined when calling getCallQualityReport.");return`/ReportCallLogData/Pbx.GetCallQualityReport(cdrId=${this.configuration.encodeParam({name:"cdrId",value:I,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},srcNumber=${this.configuration.encodeParam({name:"srcNumber",value:i,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},dstNumber=${this.configuration.encodeParam({name:"dstNumber",value:r,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},srcCallerId=${this.configuration.encodeParam({name:"srcCallerId",value:T,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},dstCallerId=${this.configuration.encodeParam({name:"dstCallerId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`}getOldCallLogData(b,L="body"){const H=b?.periodFrom;
1if(null==H)throw new Error("Required parameter periodFrom was null or undefined when calling getOldCallLogData.");const S=b?.periodTo;if(null==S)throw new Error("Required parameter periodTo was null or undefined when calling getOldCallLogData.");const I=b?.sourceType;if(null==I)throw new Error("Required parameter sourceType was null or undefined when calling getOldCallLogData.");const i=b?.sourceFilter;if(null==i)throw new Error("Required parameter sourceFilter was null or undefined when calling getOldCallLogData.");const r=b?.destinationType;if(null==r)throw new Error("Required parameter destinationType was null or undefined when calling getOldCallLogData.");const T=b?.destinationFilter;if(null==T)throw new Error("Required parameter destinationFilter was null or undefined when calling getOldCallLogData.");const n=b?.callsType;if(null==n)throw new Error("Required parameter callsType was null or undefined when calling getOldCallLogData.");const u=b?.callTimeFilterType;if(null==u)throw new Error("Required parameter callTimeFilterType was null or undefined when calling getOldCallLogData.");const _=b?.callTimeFilterFrom;if(null==_)throw new Error("Required parameter callTimeFilterFrom was null or undefined when calling getOldCallLogData.");const d=b?.callTimeFilterTo;if(null==d)throw new Error("Required parameter callTimeFilterTo was null or undefined when calling getOldCallLogData.");const $=b?.hidePcalls;if(null==$)throw new Error("Required parameter hidePcalls was null or undefined when calling getOldCallLogData.");const w=b?.$top,R=b?.$skip,f=b?.$search,O=b?.$filter,M=b?.$count,m=b?.$select,P=b?.$orderby,a=b?.$expand;let l=new C.rx(this.encoder);l=this.addToHttpParams(l,"$top",w,C.l2.Form,!1),l=this.addToHttpParams(l,"$skip",R,C.l2.Form,!1),l=this.addToHttpParams(l,"$search",f,C.l2.Form,!1),l=this.addToHttpParams(l,"$filter",O,C.l2.Form,!1),l=this.addToHttpParams(l,"$count",M,C.l2.Form,!1),l=this.addToHttpParams(l,"$select",m,C.l2.Form,!1),l=this.addToHttpParams(l,"$orderby",P,C.l2.Form,!1),l=this.addToHttpParams(l,"$expand",a,C.l2.Form,!1);let e=this.defaultHeaders;e=this.configuration.addCredentialToHeaders("Application","Authorization",e,"Bearer ");const s=this.configuration.selectHeaderAccept(["application/json"]);void 0!==s&&(e=e.set("Accept",s));let h="json";s&&(h=s.startsWith("text")?"text":this.configuration.isJsonMime(s)?"json":"blob");let x=`/ReportCallLogData/Pbx.GetOldCallLogData(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:H,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:S,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},sourceType=${this.configuration.encodeParam({name:"sourceType",value:I,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},sourceFilter=${this.configuration.encodeParam({name:"sourceFilter",value:i,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},destinationType=${this.configuration.encodeParam({name:"destinationType",value:r,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},destinationFilter=${this.configuration.encodeParam({name:"destinationFilter",value:T,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},callsType=${this.configuration.encodeParam({name:"callsType",value:n,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},callTimeFilterType=${this.configuration.encodeParam({name:"callTimeFilterType",value:u,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},callTimeFilterFrom=${this.configuration.encodeParam({name:"callTimeFilterFrom",value:_,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},callTimeFilterTo=${this.configuration.encodeParam({name:"callTimeFilterTo",value:d,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},hidePcalls=${this.configuration.encodeParam({name:"hidePcalls",value:$,in:"path",style:"simple",explode:!1,dataType:"boolean",dataFormat:void 0})})`;const{basePath:E,withCredentials:B}=this.configuration;return this.httpClient.request("get",`${E}${x}`,{params:l.toHttpParams(),responseType:h,...B?{withCredentials:B}:{},headers:e,observe:L})}getOldCallLogDataQuery(b,L="body",H=!1,S){const I=b.periodFrom;
1if(null==I)throw new Error("Required parameter periodFrom was null or undefined when calling getOldCallLogData.");const i=b.periodTo;if(null==i)throw new Error("Required parameter periodTo was null or undefined when calling getOldCallLogData.");const r=b.sourceType;if(null==r)throw new Error("Required parameter sourceType was null or undefined when calling getOldCallLogData.");const T=b.sourceFilter;if(null==T)throw new Error("Required parameter sourceFilter was null or undefined when calling getOldCallLogData.");const n=b.destinationType;if(null==n)throw new Error("Required parameter destinationType was null or undefined when calling getOldCallLogData.");const u=b.destinationFilter;if(null==u)throw new Error("Required parameter destinationFilter was null or undefined when calling getOldCallLogData.");const _=b.callsType;if(null==_)throw new Error("Required parameter callsType was null or undefined when calling getOldCallLogData.");const d=b.callTimeFilterType;if(null==d)throw new Error("Required parameter callTimeFilterType was null or undefined when calling getOldCallLogData.");const $=b.callTimeFilterFrom;if(null==$)throw new Error("Required parameter callTimeFilterFrom was null or undefined when calling getOldCallLogData.");const w=b.callTimeFilterTo;if(null==w)throw new Error("Required parameter callTimeFilterTo was null or undefined when calling getOldCallLogData.");const R=b.hidePcalls;if(null==R)throw new Error("Required parameter hidePcalls was null or undefined when calling getOldCallLogData.");const f=b.$top,O=b.$skip,M=b.$search,m=b.$filter,P=b.$count,a=b.$select,l=b.$orderby,e=b.$expand;let s=new C.rx(this.encoder);return s=this.addToHttpParams(s,"$top",f,C.l2.Form,!1),s=this.addToHttpParams(s,"$skip",O,C.l2.Form,!1),s=this.addToHttpParams(s,"$search",M,C.l2.Form,!1),s=this.addToHttpParams(s,"$filter",m,C.l2.Form,!1),s=this.addToHttpParams(s,"$count",P,C.l2.Form,!1),s=this.addToHttpParams(s,"$select",a,C.l2.Form,!1),s=this.addToHttpParams(s,"$orderby",l,C.l2.Form,!1),s=this.addToHttpParams(s,"$expand",e,C.l2.Form,!1),`/ReportCallLogData/Pbx.GetOldCallLogData(periodFrom=${this.configuration.encodeParam({name:"periodFrom",value:I,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},periodTo=${this.configuration.encodeParam({name:"periodTo",value:i,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"date-time"})},sourceType=${this.configuration.encodeParam({name:"sourceType",value:r,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},sourceFilter=${this.configuration.encodeParam({name:"sourceFilter",value:T,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},destinationType=${this.configuration.encodeParam({name:"destinationType",value:n,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},destinationFilter=${this.configuration.encodeParam({name:"destinationFilter",value:u,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},callsType=${this.configuration.encodeParam({name:"callsType",value:_,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},callTimeFilterType=${this.configuration.encodeParam({name:"callTimeFilterType",value:d,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},callTimeFilterFrom=${this.configuration.encodeParam({name:"callTimeFilterFrom",value:$,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},callTimeFilterTo=${this.configuration.encodeParam({name:"callTimeFilterTo",value:w,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},hidePcalls=${this.configuration.encodeParam({name:"hidePcalls",value:R,in:"path",style:"simple",explode:!1,dataType:"boolean",dataFormat:void 0})})?`+s.toString()}getOldCallQualityReport(b,L="body"){const H=b?.callId;if(null==H)throw new Error("Required parameter callId was null or undefined when calling getOldCallQualityReport.");const S=b?.srcNumber;if(null==S)throw new Error("Required parameter srcNumber was null or undefined when calling getOldCallQualityReport.");const I=b?.dstNumber;if(null==I)throw new Error("Required parameter dstNumber was null or undefined when calling getOldCallQualityReport.");const i=b?.srcCallerId;if(null==i)throw new Error("Required parameter srcCallerId was null or undefined when calling getOldCallQualityReport.");const r=b?.dstCallerId;if(null==r)throw new Error("Required parameter dstCallerId was null or undefined when calling getOldCallQualityReport.");let T=this.defaultHeaders;T=this.configuration.addCredentialToHeaders("Application","Authorization",T,"Bearer ");const n=this.configuration.selectHeaderAccept(["application/json"]);void 0!==n&&(T=T.set("Accept",n));let u="json";n&&(u=n.startsWith("text")?"text":this.configuration.isJsonMime(n)?"json":"blob");let _=`/ReportCallLogData/Pbx.GetOldCallQualityReport(call_id=${this.configuration.encodeParam({name:"callId",value:H,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},srcNumber=${this.configuration.encodeParam({name:"srcNumber",value:S,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},dstNumber=${this.configuration.encodeParam({name:"dstNumber",value:I,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},srcCallerId=${this.configuration.encodeParam({name:"srcCallerId",value:i,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},dstCallerId=${this.configuration.encodeParam({name:"dstCallerId",value:r,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`;const{basePath:d,withCredentials:$}=this.configuration;return this.httpClient.request("get",`${d}${_}`,{responseType:u,...$?{withCredentials:$}:{},headers:T,observe:L})}getOldCallQualityReportQuery(b,L="body",H=!1,S){const I=b.callId;if(null==I)throw new Error("Required parameter callId was null or undefined when calling getOldCallQualityReport.");const i=b.srcNumber;if(null==i)throw new Error("Required parameter srcNumber was null or undefined when calling getOldCallQualityReport.");const r=b.dstNumber;if(null==r)throw new Error("Required parameter dstNumber was null or undefined when calling getOldCallQualityReport.");const T=b.srcCallerId;if(null==T)throw new Error("Required parameter srcCallerId was null or undefined when calling getOldCallQualityReport.");const n=b.dstCallerId;if(null==n)throw new Error("Required parameter dstCallerId was null or undefined when calling getOldCallQualityReport.");return`/ReportCallLogData/Pbx.GetOldCallQualityReport(call_id=${this.configuration.encodeParam({name:"callId",value:I,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})},srcNumber=${this.configuration.encodeParam({name:"srcNumber",value:i,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},dstNumber=${this.configuration.encodeParam({name:"dstNumber",value:r,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},srcCallerId=${this.configuration.encodeParam({name:"srcCallerId",value:T,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})},dstCallerId=${this.configuration.encodeParam({name:"dstCallerId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})})`}static \u0275fac=(()=>{let b;return function(H){return(b||(b=A.xGo(c)))(H||c)}})();static \u0275prov=o.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})()},64438(te,k,t){t.d(k,{u:()=>g});
1var C=t(97201),y=t(4499),A=t(35547),o=t(85802);let g=(()=>{class c extends y.d{createScheduledReport(b,L="body"){const H=b?.pbxScheduledReport;if(null==H)throw new Error("Required parameter pbxScheduledReport was null or undefined when calling createScheduledReport.");let S=this.defaultHeaders;S=this.configuration.addCredentialToHeaders("Application","Authorization",S,"Bearer ");const I=this.configuration.selectHeaderAccept(["application/json"]);void 0!==I&&(S=S.set("Accept",I));const r=this.configuration.selectHeaderContentType(["application/json"]);void 0!==r&&(S=S.set("Content-Type",r));let T="json";I&&(T=I.startsWith("text")?"text":this.configuration.isJsonMime(I)?"json":"blob");const{basePath:u,withCredentials:_}=this.configuration;return this.httpClient.request("post",`${u}/ScheduledReports`,{body:H,responseType:T,..._?{withCredentials:_}:{},headers:S,observe:L})}createScheduledReportQuery(b,L="body",H=!1,S){if(null==b.pbxScheduledReport)throw new Error("Required parameter pbxScheduledReport was null or undefined when calling createScheduledReport.");return"/ScheduledReports"}deleteScheduledReport(b,L="body"){const H=b?.id;if(null==H)throw new Error("Required parameter id was null or undefined when calling deleteScheduledReport.");const S=b?.ifMatch;let I=this.defaultHeaders;null!=S&&(I=I.set("If-Match",String(S))),I=this.configuration.addCredentialToHeaders("Application","Authorization",I,"Bearer ");const i=this.configuration.selectHeaderAccept(["application/json"]);void 0!==i&&(I=I.set("Accept",i));let r="json";i&&(r=i.startsWith("text")?"text":this.configuration.isJsonMime(i)?"json":"blob");let T=`/ScheduledReports(${this.configuration.encodeParam({name:"id",value:H,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:n,withCredentials:u}=this.configuration;return this.httpClient.request("delete",`${n}${T}`,{responseType:r,...u?{withCredentials:u}:{},headers:I,observe:L})}deleteScheduledReportQuery(b,L="body",H=!1,S){const I=b.id;if(null==I)throw new Error("Required parameter id was null or undefined when calling deleteScheduledReport.");return`/ScheduledReports(${this.configuration.encodeParam({name:"id",value:I,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`}getScheduledReport(b,L="body"){const H=b?.id;if(null==H)throw new Error("Required parameter id was null or undefined when calling getScheduledReport.");const S=b?.$select,I=b?.$expand;let i=new C.rx(this.encoder);i=this.addToHttpParams(i,"$select",S,C.l2.Form,!1),i=this.addToHttpParams(i,"$expand",I,C.l2.Form,!1);let r=this.defaultHeaders;r=this.configuration.addCredentialToHeaders("Application","Authorization",r,"Bearer ");const T=this.configuration.selectHeaderAccept(["application/json"]);void 0!==T&&(r=r.set("Accept",T));let n="json";T&&(n=T.startsWith("text")?"text":this.configuration.isJsonMime(T)?"json":"blob");let u=`/ScheduledReports(${this.configuration.encodeParam({name:"id",value:H,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:_,withCredentials:d}=this.configuration;return this.httpClient.request("get",`${_}${u}`,{params:i.toHttpParams(),responseType:n,...d?{withCredentials:d}:{},headers:r,observe:L})}getScheduledReportQuery(b,L="body",H=!1,S){const I=b.id;if(null==I)throw new Error("Required parameter id was null or undefined when calling getScheduledReport.");const i=b.$select,r=b.$expand;let T=new C.rx(this.encoder);return T=this.addToHttpParams(T,"$select",i,C.l2.Form,!1),T=this.addToHttpParams(T,"$expand",r,C.l2.Form,!1),`/ScheduledReports(${this.configuration.encodeParam({name:"id",value:I,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})?`+T.toString()}listScheduledReport(b,L="body"){const H=b?.$top,S=b?.$skip,I=b?.$search,i=b?.$filter,r=b?.$count,T=b?.$orderby,n=b?.$select,u=b?.$expand;let _=new C.rx(this.encoder);_=this.addToHttpParams(_,"$top",H,C.l2.Form,!1),_=this.addToHttpParams(_,"$skip",S,C.l2.Form,!1),_=this.addToHttpParams(_,"$search",I,C.l2.Form,!1),_=this.addToHttpParams(_,"$filter",i,C.l2.Form,!1),_=this.addToHttpParams(_,"$count",r,C.l2.Form,!1),_=this.addToHttpParams(_,"$orderby",T,C.l2.Form,!1),_=this.addToHttpParams(_,"$select",n,C.l2.Form,!1),_=this.addToHttpParams(_,"$expand",u,C.l2.Form,!1);let d=this.defaultHeaders;d=this.configuration.addCredentialToHeaders("Application","Authorization",d,"Bearer ");const $=this.configuration.selectHeaderAccept(["application/json"]);void 0!==$&&(d=d.set("Accept",$));let w="json";$&&(w=$.startsWith("text")?"text":this.configuration.isJsonMime($)?"json":"blob");const{basePath:f,withCredentials:O}=this.configuration;return this.httpClient.request("get",`${f}/ScheduledReports`,{params:_.toHttpParams(),responseType:w,...O?{withCredentials:O}:{},headers:d,observe:L})}listScheduledReportQuery(b,L="body",H=!1,S){const I=b.$top,i=b.$skip,r=b.$search,T=b.$filter,n=b.$count,u=b.$orderby,_=b.$select,d=b.$expand;let $=new C.rx(this.encoder);return $=this.addToHttpParams($,"$top",I,C.l2.Form,!1),$=this.addToHttpParams($,"$skip",i,C.l2.Form,!1),$=this.addToHttpParams($,"$search",r,C.l2.Form,!1),$=this.addToHttpParams($,"$filter",T,C.l2.Form,!1),$=this.addToHttpParams($,"$count",n,C.l2.Form,!1),$=this.addToHttpParams($,"$orderby",u,C.l2.Form,!1),$=this.addToHttpParams($,"$select",_,C.l2.Form,!1),$=this.addToHttpParams($,"$expand",d,C.l2.Form,!1),"/ScheduledReports?"+$.toString()}updateScheduledReport(b,L="body"){const H=b?.id;if(null==H)throw new Error("Required parameter id was null or undefined when calling updateScheduledReport.");const S=b?.pbxScheduledReport;if(null==S)throw new Error("Required parameter pbxScheduledReport was null or undefined when calling updateScheduledReport.");let I=this.defaultHeaders;I=this.configuration.addCredentialToHeaders("Application","Authorization",I,"Bearer ");const i=this.configuration.selectHeaderAccept(["application/json"]);
1void 0!==i&&(I=I.set("Accept",i));const T=this.configuration.selectHeaderContentType(["application/json"]);void 0!==T&&(I=I.set("Content-Type",T));let n="json";i&&(n=i.startsWith("text")?"text":this.configuration.isJsonMime(i)?"json":"blob");let u=`/ScheduledReports(${this.configuration.encodeParam({name:"id",value:H,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`;const{basePath:_,withCredentials:d}=this.configuration;return this.httpClient.request("patch",`${_}${u}`,{body:S,responseType:n,...d?{withCredentials:d}:{},headers:I,observe:L})}updateScheduledReportQuery(b,L="body",H=!1,S){const I=b.id;if(null==I)throw new Error("Required parameter id was null or undefined when calling updateScheduledReport.");if(null==b.pbxScheduledReport)throw new Error("Required parameter pbxScheduledReport was null or undefined when calling updateScheduledReport.");return`/ScheduledReports(${this.configuration.encodeParam({name:"id",value:I,in:"path",style:"simple",explode:!1,dataType:"number",dataFormat:"int32"})})`}static \u0275fac=(()=>{let b;return function(H){return(b||(b=A.xGo(c)))(H||c)}})();static \u0275prov=o.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})()},2105(te,k,t){t.d(k,{o:()=>C});const C={Daily:"Daily",Weekly:"Weekly",Monthly:"Monthly",Hourly:"Hourly",NotScheduled:"NotScheduled"}},74651(te,k,t){t.d(k,{G:()=>C});const C={None:"None",CallLogs:"CallLogs",ChatLogs:"ChatLogs",AuditLogs:"AuditLogs",InboundRules:"InboundRules",QueueAbandonedCalls:"QueueAbandonedCalls",QueueAnsweredCallsByWaitingTime:"QueueAnsweredCallsByWaitingTime",QueueCallbacks:"QueueCallbacks",QueueFailedCallbacks:"QueueFailedCallbacks",QueuePerformanceOverview:"QueuePerformanceOverview",QueueDetailedStatistics:"QueueDetailedStatistics",QueueTeamGeneralStatistics:"QueueTeamGeneralStatistics",SlaStatistics:"SlaStatistics",SlaBreaches:"SlaBreaches",AgentInQueueStatistics:"AgentInQueueStatistics",AgentLoginHistory:"AgentLoginHistory",ExtensionsStatisticsByRingGroups:"ExtensionsStatisticsByRingGroups",ExtensionStatistics:"ExtensionStatistics",CallCostByExtensionDept:"CallCostByExtensionDept",QueueChatPerformance:"QueueChatPerformance",QueueAgentsChat:"QueueAgentsChat",AbandonedChats:"AbandonedChats",RingGroups:"RingGroups",InboundCalls:"InboundCalls",OutBoundCalls:"OutBoundCalls",UserActivity:"UserActivity",CallDistribution:"CallDistribution"}},81546(te,k,t){t.d(k,{f:()=>A});var C=t(39974),y=t(85412);function A(o,g=1/0,c){return g=(g||0)<1?1/0:g,(0,C.N)((p,b)=>(0,y.h)(p,b,o,g,void 0,!0,c))}},67018(te,k,t){t.d(k,{H:()=>p});var C=t(9350),y=t(5964),A=t(55109),o=t(93774),g=t(39901),c=t(33669);function p(b,L){const H=arguments.length>=2;return S=>S.pipe(b?(0,y.p)((I,i)=>b(I,i,S)):c.D,(0,A.o)(1),H?(0,g.U)(L):(0,o.v)(()=>new C.G))}}}]);

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.