PageSourceSearch

https://app.beesweb.com.br/8197.af1378b8122bf92e.js

js beesweb.com.br collected 2026-10-01 15:13:07 UTC 113,999 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[8197],{98197:(Kn,J,u)=>{u.r(J),u.d(J,{CustomerOfflineModule:()=>Yn});var h=u(60177),C=u(89417),Z=u(32381),ve=u(54348),q=u(75130),H=u(52748),ee=u(37886),t=u(17705),te=u(21413),D=u(33726),xe=u(84412),E=u(56977),Te=u(31635);const X=["*"],De=["cellTemplate"];function Re(o,r){if(1&o){const e=t.RV6();t.j41(0,"label",4)(1,"input",5),t.bIt("click",function(i){t.eBV(e);const s=t.XpG();return t.Njj(s.onCheckboxChange(i))}),t.k0s()()}if(2&o){const e=t.XpG();t.R7$(1),t.Y8G("checked",e.isSelected)}}function ke(o,r){1&o&&t.nrm(0,"i",11)}function Ie(o,r){1&o&&t.nrm(0,"i",12)}function Se(o,r){1&o&&t.nrm(0,"i",13)}function He(o,r){if(1&o){const e=t.RV6();t.j41(0,"button",7),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.onTreeAction())}),t.j41(1,"span"),t.DNE(2,ke,1,0,"i",8),t.DNE(3,Ie,1,0,"i",9),t.DNE(4,Se,1,0,"i",10),t.k0s()()}if(2&o){const e=t.XpG(2);t.Y8G("disabled","disabled"===e.treeStatus),t.R7$(2),t.Y8G("ngIf","loading"===e.treeStatus),t.R7$(1),t.Y8G("ngIf","collapsed"===e.treeStatus),t.R7$(1),t.Y8G("ngIf","expanded"===e.treeStatus||"disabled"===e.treeStatus)}}function Be(o,r){}const Fe=function(o){return{cellContext:o}};function Ge(o,r){if(1&o&&t.DNE(0,Be,0,0,"ng-template",14),2&o){const e=t.XpG(2);t.Y8G("ngTemplateOutlet",e.column.treeToggleTemplate)("ngTemplateOutletContext",t.eq3(2,Fe,e.cellContext))}}function Pe(o,r){if(1&o&&(t.qex(0),t.DNE(1,He,5,4,"button",6),t.DNE(2,Ge,1,4,null,2),t.bVm()),2&o){const e=t.XpG();t.R7$(1),t.Y8G("ngIf",!e.column.treeToggleTemplate),t.R7$(1),t.Y8G("ngIf",e.column.treeToggleTemplate)}}function Me(o,r){if(1&o&&t.nrm(0,"span",15),2&o){const e=t.XpG();t.Y8G("title",e.sanitizedValue)("innerHTML",e.value,t.npT)}}function Ee(o,r){}function Xe(o,r){if(1&o&&t.DNE(0,Ee,0,0,"ng-template",14,16,t.C5r),2&o){const e=t.XpG();t.Y8G("ngTemplateOutlet",e.column.cellTemplate)("ngTemplateOutletContext",e.cellContext)}}function ze(o,r){if(1&o){const e=t.RV6();t.j41(0,"datatable-body-cell",3),t.bIt("activate",function(i){const a=t.eBV(e).index,l=t.XpG(2);return t.Njj(l.onActivate(i,a))})("treeAction",function(){t.eBV(e);const i=t.XpG(2);return t.Njj(i.onTreeAction())}),t.k0s()}if(2&o){const e=r.$implicit,n=t.XpG(2);t.Y8G("row",n.row)("group",n.group)("expanded",n.expanded)("isSelected",n.isSelected)("rowIndex",n.rowIndex)("column",e)("rowHeight",n.rowHeight)("displayCheck",n.displayCheck)("treeStatus",n.treeStatus)}}function We(o,r){if(1&o&&(t.j41(0,"div",1),t.DNE(1,ze,1,9,"datatable-body-cell",2),t.k0s()),2&o){const e=r.$implicit,n=t.XpG();t.ZvI("datatable-row-",e.type," datatable-row-group"),t.Y8G("ngStyle",n._groupStyles[e.type]),t.R7$(1),t.Y8G("ngForOf",e.columns)("ngForTrackBy",n.columnTrackingFn)}}function Ae(o,r){if(1&o&&t.nrm(0,"datatable-body-row",1),2&o){const e=t.XpG();t.Y8G("innerWidth",e.innerWidth)("offsetX",e.offsetX)("columns",e._internalColumns)("rowHeight",e.rowHeight)("row",e.summaryRow)("rowIndex",-1)}}function $e(o,r){}function Oe(o,r){if(1&o&&t.DNE(0,$e,0,0,"ng-template",4),2&o){const e=t.XpG(2);t.Y8G("ngTemplateOutlet",e.groupHeader.template)("ngTemplateOutletContext",e.groupContext)}}function Ve(o,r){if(1&o&&(t.j41(0,"div",3),t.DNE(1,Oe,1,2,null,1),t.k0s()),2&o){const e=t.XpG();t.Y8G("ngStyle",e.getGroupHeaderStyle()),t.R7$(1),t.Y8G("ngIf",e.groupHeader&&e.groupHeader.template)}}function je(o,r){1&o&&t.SdG(0,0,["*ngIf","(groupHeader && groupHeader.template && expanded) || !groupHeader || !groupHeader.template"])}function Ne(o,r){}function Le(o,r){if(1&o&&t.DNE(0,Ne,0,0,"ng-template",4),2&o){const e=t.XpG(2);t.Y8G("ngTemplateOutlet",e.rowDetail.template)("ngTemplateOutletContext",e.rowContext)}}function Ye(o,r){if(1&o&&(t.j41(0,"div",5),t.DNE(1,Le,1,2,null,1),t.k0s()),2&o){const e=t.XpG();t.xc7("height",e.detailRowHeight,"px"),t.R7$(1),t.Y8G("ngIf",e.rowDetail&&e.rowDetail.template)}}function Ue(o,r){1&o&&t.nrm(0,"datatable-progress")}function Qe(o,r){if(1&o&&t.nrm(0,"datatable-summary-row",9),2&o){const e=t.XpG(2);t.Y8G("rowHeight",e.summaryHeight)("offsetX",e.offsetX)("innerWidth",e.innerWidth)("rows",e.rows)("columns",e.columns)}}function Ke(o,r){if(1&o){const e=t.RV6();t.j41(0,"datatable-body-row",13),t.bIt("treeAction",function(){t.eBV(e);const i=t.XpG().$implicit,s=t.XpG(2);return t.Njj(s.onTreeAction(i))})("activate",function(i){t.eBV(e);const s=t.XpG().index,a=t.XpG(2),l=t.sdS(2);return t.Njj(l.onActivate(i,a.indexes.first+s))}),t.k0s()}if(2&o){const e=t.XpG().$implicit,n=t.XpG(2),i=t.sdS(2);t.Y8G("isSelected",i.getRowSelected(e))("innerWidth",n.innerWidth)("offsetX",n.offsetX)("columns",n.columns)("rowHeight",n.getRowHeight(e))("row",e)("rowIndex",n.getRowIndex(e))("expanded",n.getRowExpanded(e))("rowClass",n.rowClass)("displayCheck",n.displayCheck)("treeStatus",e&&e.treeStatus)}}function Je(o,r){if(1&o){const e=t.RV6();t.j41(0,"datatable-body-row",15),t.bIt("activate",function(i){const a=t.eBV(e).index;t.XpG(4);const l=t.sdS(2);return t.Njj(l.onActivate(i,a))}),t.k0s()}if(2&o){const e=r.$implicit,n=t.XpG(2).$implicit,i=t.XpG(2),s=t.sdS(2);t.Y8G("isSelected",s.getRowSelected(e))("innerWidth",i.innerWidth)("offsetX",i.offsetX)("columns",i.columns)("rowHeight",i.getRowHeight(e))("row",e)("group",n.value)("rowIndex",i.getRowIndex(e))("expanded",i.getRowExpanded(e))("rowClass",i.rowClass)}}function Ze(o,r){if(1&o&&t.DNE(0,Je,1,10,"datatable-body-row",14),2&o){const e=t.XpG().$implicit,n=t.XpG(2);t.Y8G("ngForOf",e.value)("ngForTrackBy",n.rowTrackingFn)}}function qe(o,r){if(1&o){const e=t.RV6();t.j41(0,"datatable-row-wrapper",10),t.bIt("rowContextmenu",function(i){t.eBV(e);const s=t.XpG(2);return t.Njj(s.rowContextmenu.emit(i))}),t.DNE(1,Ke,1,11,"datatable-body-row",11),t.DNE(2,Ze,1,2,"ng-template",null,12,t.C5r),t.k0s()}if(2&o){const e=r.$implicit,n=r.index,i=t.sdS(3),s=t.XpG(2);t.Y8G("groupedRows",s.groupedRows)("innerWidth",s.innerWidth)("ngStyle",s.getRowsStyles(e))("rowDetail",s.rowDetail)("groupHeader",s.groupHeader)("offsetX",s.offsetX)("detailRowHeight",s.getDetailRowHeight(e&&e[n],n))("row",e)("expanded",s.getRowExpanded(e))("rowIndex",s.getRowIndex(e&&e[n])),t.R7$(1),t.Y8G("ngIf",!s.groupedRows)("ngIfElse",i)}}function et(o,r){if(1&o&&t.nrm(0,"datatable-summary-row",16),2&o){const e=t.XpG(2);t.Y8G("ngStyle",e.getBottomSummaryRowStyles())("rowHeight",e.summaryHeight)("offsetX",e.offsetX)("innerWidth",e.innerWidth)("rows",e.rows)("columns",e.columns)}}function tt(o,r){if(1&o){const e=t.RV6();t.j41(0,"datatable-scroller",5),t.bIt("scroll",function(i){t.eBV(e);const s=t.XpG();return t.Njj(s.onBodyScroll(i))}),t.DNE(1,Qe,1,5,"datatable-summary-row",6),t.DNE(2,qe,4,12,"datatable-row-wrapper",7),t.DNE(3,et,1,6,"datatable-summary-row",8),t.k0s()}if(2&o){const e=t.XpG();t.Y8G("scrollbarV",e.scrollbarV)("scrollbarH",e.scrollbarH)("scrollHeight",e.scrollHeight)("scrollWidth",null==e.columnGroupWidths?null:e.columnGroupWidths.total),t.R7$(1),t.Y8G("ngIf",e.summaryRow&&"top"===e.summaryPosition),t.R7$(1),t.Y8G("ngForOf",e.temp)("ngForTrackBy",e.rowTrackingFn),t.R7$(1),t.Y8G("ngIf",e.summaryRow&&"bottom"===e.summaryPosition)}}function nt(o,r){if(1&o&&t.nrm(0,"div",17),2&o){const e=t.XpG();t.Y8G("innerHTML",e.emptyMessage,t.npT)}}function ot(o,r){}function it(o,r){if(1&o&&t.DNE(0,ot,0,0,"ng-template",5),2&o){const e=t.XpG();t.Y8G("ngTemplateOutlet",e.targetMarkerTemplate)("ngTemplateOutletContext",e.targetMarkerContext)}}function st(o,r){if(1&o){const e=t.RV6();t.j41(0,"label",6)(1,"input",7),t.bIt("change",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.select.emit(!i.allRowsSelected))}),t.k0s()()}if(2&o){const e=t.XpG();t.R7$(1),t.Y8G("checked",e.allRowsSelected)}}function rt(o,r){if(1&o){const e=t.RV6();t.j41(0,"span",8)(1,"span",9),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.onSort())}),t.k0s()()}if(2&o){const e=t.XpG();t.R7$(1),t.Y8G("innerHTML",e.name,t.npT)}}function at(o,r){}function lt(o,r){if(1&o&&t.DNE(0,at,0,0,"ng-template",5),2&o){const e=t.XpG();t.Y8G("ngTemplateOutlet",e.column.headerTemplate)("ngTemplateOutletContext",e.cellContext)}}function ct(o,r){if(1&o){const e=t.RV6();t.j41(0,"datatable-header-cell",4),t.bIt("resize",function(i){const a=t.eBV(e).$implicit,l=t.XpG(2);return t.Njj(l.onColumnResized(i,a))})("longPressStart",function(i){t.eBV(e);const s=t.XpG(2);return t.Njj(s.onLongPressStart(i))})("longPressEnd",function(i){t.eBV(e);const s=t.XpG(2);return t.Njj(s.onLongPressEnd(i))})("sort",function(i){t.eBV(e);const s=t.XpG(2);return t.Njj(s.onSort(i))})("select",function(i){t.eBV(e);const s=t.XpG(2);return t.Njj(s.select.emit(i))})("columnContextmenu",function(i){t.eBV(e);const s=t.XpG(2);return t.Njj(s.columnContextmenu.emit(i))}),t.k0s()}if(2&o){const e=r.$implicit,n=t.XpG(2);t.Y8G("resizeEnabled",e.resizeable)("pressModel",e)("pressEnabled",n.reorderable&&e.draggable)("dragX",n.reorderable&&e.draggable&&e.dragging)("dragY",!1)("dragModel",e)("dragEventTarget",n.dragEventTarget)("headerHeight",n.headerHeight)("isTarget",e.isTarget)("targetMarkerTemplate",n.targetMarkerTemplate)("targetMarkerContext",e.targetMarkerContext)("column",e)("sortType",n.sortType)("sorts",n.sorts)("selectionType",n.selectionType)("sortAscendingIcon",n.sortAscendingIcon)("sortDescendingIcon",n.sortDescendingIcon)("sortUnsetIcon",n.sortUnsetIcon)("allRowsSelected",n.allRowsSelected)}}function dt(o,r){if(1&o&&(t.j41(0,"div",2),t.DNE(1,ct,1,19,"datatable-header-cell",3),t.k0s()),2&o){const e=r.$implicit,n=t.XpG();t.HbH("datatable-row-"+e.type),t.Y8G("ngStyle",n._styleByGroup[e.type]),t.R7$(1),t.Y8G("ngForOf",e.columns)("ngForTrackBy",n.columnTrackingFn)}}function ut(o,r){if(1&o){const e=t.RV6();t.j41(0,"li",6)(1,"a",7),t.bIt("click",function(){const s=t.eBV(e).$implicit,a=t.XpG();return t.Njj(a.selectPage(s.number))}),t.EFF(2),t.k0s()()}if(2&o){const e=r.$implicit,n=t.XpG();t.AVh("active",e.number===n.page),t.BMQ("aria-label","page "+e.number),t.R7$(2),t.SpI(" ",e.text," ")}}function ht(o,r){}const pt=function(o,r,e,n,i){return{rowCount:o,pageSize:r,selectedCount:e,curPage:n,offset:i}};function gt(o,r){if(1&o&&t.DNE(0,ht,0,0,"ng-template",4),2&o){const e=t.XpG();t.Y8G("ngTemplateOutlet",e.footerTemplate.template)("ngTemplateOutletContext",t.s1E(2,pt,e.rowCount,e.pageSize,e.selectedCount,e.curPage,e.offset))}}function ft(o,r){if(1&o&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&o){const e=t.XpG(2);t.R7$(1),t.Lme(" ",null==e.selectedCount?null:e.selectedCount.toLocaleStr
1ing()," ",e.selectedMessage," / ")}}function mt(o,r){if(1&o&&(t.j41(0,"div",5),t.DNE(1,ft,2,2,"span",1),t.EFF(2),t.k0s()),2&o){const e=t.XpG();t.R7$(1),t.Y8G("ngIf",e.selectedMessage),t.R7$(1),t.Lme(" ",null==e.rowCount?null:e.rowCount.toLocaleString()," ",e.totalMessage," ")}}function bt(o,r){if(1&o){const e=t.RV6();t.j41(0,"datatable-pager",6),t.bIt("change",function(i){t.eBV(e);const s=t.XpG();return t.Njj(s.page.emit(i))}),t.k0s()}if(2&o){const e=t.XpG();t.Y8G("pagerLeftArrowIcon",e.pagerLeftArrowIcon)("pagerRightArrowIcon",e.pagerRightArrowIcon)("pagerPreviousIcon",e.pagerPreviousIcon)("pagerNextIcon",e.pagerNextIcon)("page",e.curPage)("size",e.pageSize)("count",e.rowCount)("hidden",!e.isVisible)}}const _t=function(o){return{"selected-count":o}};function wt(o,r){if(1&o){const e=t.RV6();t.j41(0,"datatable-header",4),t.bIt("sort",function(i){t.eBV(e);const s=t.XpG();return t.Njj(s.onColumnSort(i))})("resize",function(i){t.eBV(e);const s=t.XpG();return t.Njj(s.onColumnResize(i))})("reorder",function(i){t.eBV(e);const s=t.XpG();return t.Njj(s.onColumnReorder(i))})("select",function(i){t.eBV(e);const s=t.XpG();return t.Njj(s.onHeaderSelect(i))})("columnContextmenu",function(i){t.eBV(e);const s=t.XpG();return t.Njj(s.onColumnContextmenu(i))}),t.nI1(1,"async"),t.k0s()}if(2&o){const e=t.XpG();t.Y8G("sorts",e.sorts)("sortType",e.sortType)("scrollbarH",e.scrollbarH)("innerWidth",e._innerWidth)("offsetX",t.bMT(1,15,e._offsetX))("dealsWithGroup",void 0!==e.groupedRows)("columns",e._internalColumns)("headerHeight",e.headerHeight)("reorderable",e.reorderable)("targetMarkerTemplate",e.targetMarkerTemplate)("sortAscendingIcon",e.cssClasses.sortAscending)("sortDescendingIcon",e.cssClasses.sortDescending)("sortUnsetIcon",e.cssClasses.sortUnset)("allRowsSelected",e.allRowsSelected)("selectionType",e.selectionType)}}function Ct(o,r){if(1&o){const e=t.RV6();t.j41(0,"datatable-footer",5),t.bIt("page",function(i){t.eBV(e);const s=t.XpG();return t.Njj(s.onFooterPage(i))}),t.k0s()}if(2&o){const e=t.XpG();t.Y8G("rowCount",e.rowCount)("pageSize",e.pageSize)("offset",e.offset)("footerHeight",e.footerHeight)("footerTemplate",e.footer)("totalMessage",e.messages.totalMessage)("pagerLeftArrowIcon",e.cssClasses.pagerLeftArrow)("pagerRightArrowIcon",e.cssClasses.pagerRightArrow)("pagerPreviousIcon",e.cssClasses.pagerPrevious)("selectedCount",e.selected.length)("selectedMessage",!!e.selectionType&&e.messages.selectedMessage)("pagerNextIcon",e.cssClasses.pagerNext)}}let z=(()=>{class o{constructor(e){this.document=e,this.width=this.getWidth()}getWidth(){const e=this.document.createElement("div");e.style.visibility="hidden",e.style.width="100px",e.style.msOverflowStyle="scrollbar",this.document.body.appendChild(e);const n=e.offsetWidth;e.style.overflow="scroll";const i=this.document.createElement("div");i.style.width="100%",e.appendChild(i);const s=i.offsetWidth;return e.parentNode.removeChild(e),n-s}}return o.\u0275fac=function(e){return new(e||o)(t.KVO(h.qQ))},o.\u0275prov=t.jDH({token:o,factory:o.\u0275fac}),o})(),ne=(()=>{class o{getDimensions(e){return e.getBoundingClientRect()}}return o.\u0275fac=function(e){return new(e||o)},o.\u0275prov=t.jDH({token:o,factory:o.\u0275fac}),o})(),W=(()=>{class o{constructor(){this.columnInputChanges=new te.B}get columnInputChanges$(){return this.columnInputChanges.asObservable()}onInputChange(){this.columnInputChanges.next()}}return o.\u0275fac=function(e){return new(e||o)},o.\u0275prov=t.jDH({token:o,factory:o.\u0275fac}),o})(),yt=(()=>{class o{constructor(e){this.template=e}}return o.\u0275fac=function(e){return new(e||o)(t.rXU(t.C4Q))},o.\u0275dir=t.FsC({type:o,selectors:[["","ngx-datatable-footer-template",""]]}),o})(),vt=(()=>{class o{constructor(e,n){this.element=e,this.zone=n,this.isVisible=!1,this.visible=new t.bkB}ngOnInit(){this.runCheck()}ngOnDestroy(){clearTimeout(this.timeout)}onVisibilityChange(){this.zone.run(()=>{this.isVisible=!0,this.visible.emit(!0)})}runCheck(){const e=()=>{const{offsetHeight:n,offsetWidth:i}=this.element.nativeElement;n&&i?(clearTimeout(this.timeout),this.onVisibilityChange()):(clearTimeout(this.timeout),this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>e(),50)}))};this.timeout=setTimeout(()=>e())}}return o.\u0275fac=function(e){return new(e||o)(t.rXU(t.aKT),t.rXU(t.SKi))},o.\u0275dir=t.FsC({type:o,selectors:[["","visibilityObserver",""]],hostVars:2,hostBindings:function(e,n){2&e&&t.AVh("visible",n.isVisible)},outputs:{visible:"visible"}}),o})(),oe=(()=>{class o{constructor(e){this.dragX=!0,this.dragY=!0,this.dragStart=new t.bkB,this.dragging=new t.bkB,this.dragEnd=new t.bkB,this.isDragging=!1,this.element=e.nativeElement}ngOnChanges(e){e.dragEventTarget&&e.dragEventTarget.currentValue&&this.dragModel.dragging&&this.onMousedown(e.dragEventTarget.currentValue)}ngOnDestroy(){this._destroySubscription()}onMouseup(e){this.isDragging&&(this.isDragging=!1,this.element.classList.remove("dragging"),this.subscription&&(this._destroySubscription(),this.dragEnd.emit({event:e,element:this.element,model:this.dragModel})))}onMousedown(e){if(e.target.classList.contains("draggable")&&(this.dragX||this.dragY)){e.preventDefault(),this.isDragging=!0;const i={x:e.clientX,y:e.clientY},s=(0,D.R)(document,"mouseup");this.subscription=s.subscribe(l=>this.onMouseup(l));const a=(0,D.R)(document,"mousemove").pipe((0,E.Q)(s)).subscribe(l=>this.move(l,i));this.subscription.add(a),this.dragStart.emit({event:e,element:this.element,model:this.dragModel})}}move(e,n){if(!this.isDragging)return;const s=e.clientY-n.y;this.dragX&&(this.element.style.left=e.clientX-n.x+"px"),this.dragY&&(this.element.style.top=`${s}px`),this.element.classList.add("dragging"),this.dragging.emit({event:e,element:this.element,model:this.dragModel})}_destroySubscription(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)}}return o.\u0275fac=function(e){return new(e||o)(t.rXU(t.aKT))}
1,o.\u0275dir=t.FsC({type:o,selectors:[["","draggable",""]],inputs:{dragEventTarget:"dragEventTarget",dragModel:"dragModel",dragX:"dragX",dragY:"dragY"},outputs:{dragStart:"dragStart",dragging:"dragging",dragEnd:"dragEnd"},features:[t.OA$]}),o})(),xt=(()=>{class o{constructor(e,n){this.renderer=n,this.resizeEnabled=!0,this.resize=new t.bkB,this.resizing=!1,this.element=e.nativeElement}ngAfterViewInit(){const e=this.renderer;this.resizeHandle=e.createElement("span"),e.addClass(this.resizeHandle,this.resizeEnabled?"resize-handle":"resize-handle--not-resizable"),e.appendChild(this.element,this.resizeHandle)}ngOnDestroy(){this._destroySubscription(),this.renderer.destroyNode?this.renderer.destroyNode(this.resizeHandle):this.resizeHandle&&this.renderer.removeChild(this.renderer.parentNode(this.resizeHandle),this.resizeHandle)}onMouseup(){this.resizing=!1,this.subscription&&!this.subscription.closed&&(this._destroySubscription(),this.resize.emit(this.element.clientWidth))}onMousedown(e){const n=e.target.classList.contains("resize-handle"),i=this.element.clientWidth,s=e.screenX;if(n){e.stopPropagation(),this.resizing=!0;const a=(0,D.R)(document,"mouseup");this.subscription=a.subscribe(c=>this.onMouseup());const l=(0,D.R)(document,"mousemove").pipe((0,E.Q)(a)).subscribe(c=>this.move(c,i,s));this.subscription.add(l)}}move(e,n,i){const a=n+(e.screenX-i);(!this.minWidth||a>=this.minWidth)&&(!this.maxWidth||a<=this.maxWidth)&&(this.element.style.width=`${a}px`)}_destroySubscription(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)}}return o.\u0275fac=function(e){return new(e||o)(t.rXU(t.aKT),t.rXU(t.sFG))},o.\u0275dir=t.FsC({type:o,selectors:[["","resizeable",""]],hostVars:2,hostBindings:function(e,n){1&e&&t.bIt("mousedown",function(s){return n.onMousedown(s)}),2&e&&t.AVh("resizeable",n.resizeEnabled)},inputs:{resizeEnabled:"resizeEnabled",minWidth:"minWidth",maxWidth:"maxWidth"},outputs:{resize:"resize"}}),o})(),Tt=(()=>{class o{constructor(e,n){this.document=n,this.reorder=new t.bkB,this.targetChanged=new t.bkB,this.differ=e.find({}).create()}ngAfterContentInit(){this.updateSubscriptions(),this.draggables.changes.subscribe(this.updateSubscriptions.bind(this))}ngOnDestroy(){this.draggables.forEach(e=>{e.dragStart.unsubscribe(),e.dragging.unsubscribe(),e.dragEnd.unsubscribe()})}updateSubscriptions(){const e=this.differ.diff(this.createMapDiffs());if(e){const n=({currentValue:s,previousValue:a})=>{i({previousValue:a}),s&&(s.dragStart.subscribe(this.onDragStart.bind(this)),s.dragging.subscribe(this.onDragging.bind(this)),s.dragEnd.subscribe(this.onDragEnd.bind(this)))},i=({previousValue:s})=>{s&&(s.dragStart.unsubscribe(),s.dragging.unsubscribe(),s.dragEnd.unsubscribe())};e.forEachAddedItem(n),e.forEachRemovedItem(i)}}onDragStart(){this.positions={};let e=0;for(const n of this.draggables.toArray()){const i=n.element,s=parseInt(i.offsetLeft.toString(),0);this.positions[n.dragModel.prop]={left:s,right:s+parseInt(i.offsetWidth.toString(),0),index:e++,element:i}}}onDragging({model:n,event:i}){const s=this.positions[n.prop],a=this.isTarget(n,i);a?this.lastDraggingIndex!==a.i&&(this.targetChanged.emit({prevIndex:this.lastDraggingIndex,newIndex:a.i,initialIndex:s.index}),this.lastDraggingIndex=a.i):this.lastDraggingIndex!==s.index&&(this.targetChanged.emit({prevIndex:this.lastDraggingIndex,initialIndex:s.index}),this.lastDraggingIndex=s.index)}onDragEnd({element:e,model:n,event:i}){const s=this.positions[n.prop],a=this.isTarget(n,i);a&&this.reorder.emit({prevIndex:s.index,newIndex:a.i,model:n}),this.lastDraggingIndex=void 0,e.style.left="auto"}isTarget(e,n){let i=0;const l=this.document.elementsFromPoint(n.x||n.clientX,n.y||n.clientY);for(const c in this.positions){const d=this.positions[c];if(e.prop!==c&&l.find(g=>g===d.element))return{pos:d,i};i++}}createMapDiffs(){return this.draggables.toArray().reduce((e,n)=>(e[n.dragModel.$$id]=n,e),{})}}return o.\u0275fac=function(e){return new(e||o)(t.rXU(t.MKu),t.rXU(h.qQ))},o.\u0275dir=t.FsC({type:o,selectors:[["","orderable",""]],contentQueries:function(e,n,i){if(1&e&&t.wni(i,oe,5),2&e){let s;t.mGM(s=t.lsd())&&(n.draggables=s)}},outputs:{reorder:"reorder",targetChanged:"targetChanged"}}),o})(),Dt=(()=>{class o{constructor(){this.pressEnabled=!0,this.duration=500,this.longPressStart=new t.bkB,this.longPressing=new t.bkB,this.longPressEnd=new t.bkB,this.mouseX=0,this.mouseY=0}get press(){return this.pressing}get isLongPress(){return this.isLongPressing}onMouseDown(e){if(1!==e.which||!this.pressEnabled||e.target.classList.contains("resize-handle"))return;this.mouseX=e.clientX,this.mouseY=e.clientY,this.pressing=!0,this.isLongPressing=!1;const i=(0,D.R)(document,"mouseup");this.subscription=i.subscribe(s=>this.onMouseup()),this.timeout=setTimeout(()=>{this.isLongPressing=!0,this.longPressStart.emit({event:e,model:this.pressModel}),this.subscription.add((0,D.R)(document,"mousemove").pipe((0,E.Q)(i)).subscribe(s=>this.onMouseMove(s))),this.loop(e)},this.duration),this.loop(e)}onMouseMove(e){if(this.pressing&&!this.isLongPressing){const n=Math.abs(e.clientX-this.mouseX)>10,i=Math.abs(e.clientY-this.mouseY)>10;(n||i)&&this.endPress()}}loop(e){this.isLongPressing&&(this.timeout=setTimeout(()=>{this.longPressing.emit({event:e,model:this.pressModel}),this.loop(e)},50))}endPress(){clearTimeout(this.timeout),this.isLongPressing=!1,this.pressing=!1,this._destroySubscription(),this.longPressEnd.emit({model:this.pressModel})}onMouseup(){this.endPress()}ngOnDestroy(){this._destroySubscription()}_destroySubscription(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)}}return o.\u0275fac=function(e){return new(e||o)}
1,o.\u0275dir=t.FsC({type:o,selectors:[["","long-press",""]],hostVars:4,hostBindings:function(e,n){1&e&&t.bIt("mousedown",function(s){return n.onMouseDown(s)}),2&e&&t.AVh("press",n.press)("longpress",n.isLongPress)},inputs:{pressEnabled:"pressEnabled",pressModel:"pressModel",duration:"duration"},outputs:{longPressStart:"longPressStart",longPressing:"longPressing",longPressEnd:"longPressEnd"}}),o})(),ie=(()=>{class o{constructor(e,n,i){this.ngZone=e,this.renderer=i,this.scrollbarV=!1,this.scrollbarH=!1,this.scroll=new t.bkB,this.scrollYPos=0,this.scrollXPos=0,this.prevScrollYPos=0,this.prevScrollXPos=0,this._scrollEventListener=null,this.element=n.nativeElement}ngOnInit(){if(this.scrollbarV||this.scrollbarH){const e=this.renderer;this.parentElement=e.parentNode(e.parentNode(this.element)),this._scrollEventListener=this.onScrolled.bind(this),this.parentElement.addEventListener("scroll",this._scrollEventListener)}}ngOnDestroy(){this._scrollEventListener&&(this.parentElement.removeEventListener("scroll",this._scrollEventListener),this._scrollEventListener=null)}setOffset(e){this.parentElement&&(this.parentElement.scrollTop=e)}onScrolled(e){const n=e.currentTarget;requestAnimationFrame(()=>{this.scrollYPos=n.scrollTop,this.scrollXPos=n.scrollLeft,this.updateOffset()})}updateOffset(){let e;this.scrollYPos<this.prevScrollYPos?e="down":this.scrollYPos>this.prevScrollYPos&&(e="up"),this.scroll.emit({direction:e,scrollYPos:this.scrollYPos,scrollXPos:this.scrollXPos}),this.prevScrollYPos=this.scrollYPos,this.prevScrollXPos=this.scrollXPos}}return o.\u0275fac=function(e){return new(e||o)(t.rXU(t.SKi),t.rXU(t.aKT),t.rXU(t.sFG))},o.\u0275cmp=t.VBU({type:o,selectors:[["datatable-scroller"]],hostAttrs:[1,"datatable-scroll"],hostVars:4,hostBindings:function(e,n){2&e&&t.xc7("height",n.scrollHeight,"px")("width",n.scrollWidth,"px")},inputs:{scrollbarV:"scrollbarV",scrollbarH:"scrollbarH",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth"},outputs:{scroll:"scroll"},ngContentSelectors:X,decls:1,vars:0,template:function(e,n){1&e&&(t.NAR(),t.SdG(0))},encapsulation:2,changeDetection:0}),o})(),Rt=(()=>{class o{constructor(e){this.template=e}}return o.\u0275fac=function(e){return new(e||o)(t.rXU(t.C4Q))},o.\u0275dir=t.FsC({type:o,selectors:[["","ngx-datatable-group-header-template",""]]}),o})(),kt=(()=>{class o{constructor(){this.rowHeight=0,this.toggle=new t.bkB}get template(){return this._templateInput||this._templateQuery}toggleExpandGroup(e){this.toggle.emit({type:"group",value:e})}expandAllGroups(){this.toggle.emit({type:"all",value:!0})}collapseAllGroups(){this.toggle.emit({type:"all",value:!1})}}return o.\u0275fac=function(e){return new(e||o)},o.\u0275dir=t.FsC({type:o,selectors:[["ngx-datatable-group-header"]],contentQueries:function(e,n,i){if(1&e&&t.wni(i,Rt,7,t.C4Q),2&e){let s;t.mGM(s=t.lsd())&&(n._templateQuery=s.first)}},inputs:{rowHeight:"rowHeight",_templateInput:["template","_templateInput"]},outputs:{toggle:"toggle"}}),o})();function It(){return""}function A(o){return null==o?It:"number"==typeof o?St:-1!==o.indexOf(".")?Bt:Ht}function St(o,r){return null==o?"":o&&null!=r?o[r]??"":o}function Ht(o,r){return null==o?"":o&&r?o[r]??"":o}function Bt(o,r){if(null==o)return"";if(!o||!r)return o;let e=o[r];if(void 0!==e)return e;e=o;const n=r.split(".");if(n.length)for(let i=0;i<n.length;i++)if(e=e[n[i]],null==e)return"";return e}function R(o){return o&&(r=>A(o)(r,o))}function $(o,r,e){if(r&&e){const n={},i=o.length;let s=null;n[0]=new se;const a=o.reduce((c,d)=>{const g=e(d);return-1===c.indexOf(g)&&c.push(g),c},[]);for(let c=0;c<i;c++)n[e(o[c])]=new se(o[c]);for(let c=0;c<i;c++){s=n[e(o[c])];let d=0;const g=r(s.row);g&&a.indexOf(g)>-1&&(d=g),s.parent=n[d],s.row.level=s.parent.row.level+1,s.parent.children.push(s)}let l=[];return n[0].flatten(function(){l=[...l,this.row]},!0),l}return o}class se{constructor(r=null){r||(r={level:-1,treeStatus:"expanded"}),this.row=r,this.parent=null,this.children=[]}flatten(r,e){if("expanded"===this.row.treeStatus)for(let n=0,i=this.children.length;n<i;n++){const s=this.children[n];r.apply(s,Array.prototype.slice.call(arguments,2)),e&&s.flatten.apply(s,arguments)}}}function O(o){return(o=(o=(o=o.replace(/[^a-zA-Z0-9 ]/g," ")).replace(/([a-z](?=[A-Z]))/g,"$1 ")).replace(/([^a-zA-Z0-9 ])|^[0-9]+/g,"").trim().toLowerCase()).replace(/([ 0-9]+)([a-zA-Z])/g,function(r,e,n){return e.trim()+n.toUpperCase()})}function Ft(o){return o.replace(/([A-Z])/g,r=>` ${r}`).replace(/^./,r=>r.toUpperCase())}function re(o){if(!o)return;let r=!1;for(const e of o)e.$$id||(e.$$id=("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)),I(e.prop)&&e.name&&(e.prop=O(e.name)),e.$$valueGetter||(e.$$valueGetter=A(e.prop)),!I(e.prop)&&I(e.name)&&(e.name=Ft(String(e.prop))),I(e.prop)&&I(e.name)&&(e.name=""),e.hasOwnProperty("resizeable")||(e.resizeable=!0),e.hasOwnProperty("sortable")||(e.sortable=!0),e.hasOwnProperty("draggable")||(e.draggable=!0),e.hasOwnProperty("canAutoResize")||(e.canAutoResize=!0),e.hasOwnProperty("width")||(e.width=150),e.hasOwnProperty("isTreeColumn")&&e.isTreeColumn&&!r?r=!0:e.isTreeColumn=!1}function I(o){return null==o}var B=function(o){return o.standard="standard",o.flex="flex",o.force="force",o}(B||{}),b=function(o){return o.single="single",o.multi="multi",o.multiClick="multiClick",o.cell="cell",o.checkbox="checkbox",o}(b||{}),F=function(o){return o.single="single",o.multi="multi",o}(F||{}),V=function(o){return o.header="header",o.body="body",o}(V||{});let ae=(()=>{class o{constructor(e){this.template=e}}return o.\u0275fac=function(e){return new(e||o)(t.rXU(t.C4Q))},o.\u0275dir=t.FsC({type:o,selectors:[["","ngx-datatable-header-template",""]]}),o})(),le=(()=>{class o{constructor(e){this.template=e}}return o.\u0275fac=function(e){return new(e||o)(t.rXU(t.C4Q))},o.\u0275dir=t.FsC({type:o,selectors:[["","ngx-datatable-cell-template",""]]}),o})(),Mt=(()=>{class o{constructor(e){this.template=e}}return o.\u0275fac=function(e){return new(e||o)(t.rXU(t.C4Q))},o.\u0275dir=t.FsC({type:o,selectors:[["","ngx-datatable-tree-toggle",""]]}),o})(),ce=(()=>{class o{constructor(e){this.columnChangesService=e,this.isFirstChange=!0}get cellTemplate(){return this._cellTemplateInput||this._cellTemplateQuery}get headerTemplate(){return this._headerTemplateInput||this._headerTemplateQuery}get treeToggleTemplate(){return this._treeToggleTemplateInput||this._treeToggleTemplateQuery}ngOnChanges(){this.isFirstChange?this.isFirstChange=!1:this.columnChangesService.onInputChange()}}return o.\u0275fac=function(e){return new(e||o)(t.rXU(W))}
1,o.\u0275dir=t.FsC({type:o,selectors:[["ngx-datatable-column"]],contentQueries:function(e,n,i){if(1&e&&(t.wni(i,le,7,t.C4Q),t.wni(i,ae,7,t.C4Q),t.wni(i,Mt,7,t.C4Q)),2&e){let s;t.mGM(s=t.lsd())&&(n._cellTemplateQuery=s.first),t.mGM(s=t.lsd())&&(n._headerTemplateQuery=s.first),t.mGM(s=t.lsd())&&(n._treeToggleTemplateQuery=s.first)}},inputs:{name:"name",prop:"prop",frozenLeft:"frozenLeft",frozenRight:"frozenRight",flexGrow:"flexGrow",resizeable:"resizeable",comparator:"comparator",pipe:"pipe",sortable:"sortable",draggable:"draggable",canAutoResize:"canAutoResize",minWidth:"minWidth",width:"width",maxWidth:"maxWidth",checkboxable:"checkboxable",headerCheckboxable:"headerCheckboxable",headerClass:"headerClass",cellClass:"cellClass",isTreeColumn:"isTreeColumn",treeLevelIndent:"treeLevelIndent",summaryFunc:"summaryFunc",summaryTemplate:"summaryTemplate",_cellTemplateInput:["cellTemplate","_cellTemplateInput"],_headerTemplateInput:["headerTemplate","_headerTemplateInput"],_treeToggleTemplateInput:["treeToggleTemplate","_treeToggleTemplateInput"]},features:[t.OA$]}),o})(),Et=(()=>{class o{constructor(e){this.template=e}}return o.\u0275fac=function(e){return new(e||o)(t.rXU(t.C4Q))},o.\u0275dir=t.FsC({type:o,selectors:[["","ngx-datatable-row-detail-template",""]]}),o})(),Xt=(()=>{class o{constructor(){this.rowHeight=0,this.toggle=new t.bkB}get template(){return this._templateInput||this._templateQuery}toggleExpandRow(e){this.toggle.emit({type:"row",value:e})}expandAllRows(){this.toggle.emit({type:"all",value:!0})}collapseAllRows(){this.toggle.emit({type:"all",value:!1})}}return o.\u0275fac=function(e){return new(e||o)},o.\u0275dir=t.FsC({type:o,selectors:[["ngx-datatable-row-detail"]],contentQueries:function(e,n,i){if(1&e&&t.wni(i,Et,7,t.C4Q),2&e){let s;t.mGM(s=t.lsd())&&(n._templateQuery=s.first)}},inputs:{rowHeight:"rowHeight",_templateInput:["template","_templateInput"]},outputs:{toggle:"toggle"}}),o})(),zt=(()=>{class o{get template(){return this._templateInput||this._templateQuery}}return o.\u0275fac=function(e){return new(e||o)},o.\u0275dir=t.FsC({type:o,selectors:[["ngx-datatable-footer"]],contentQueries:function(e,n,i){if(1&e&&t.wni(i,yt,5,t.C4Q),2&e){let s;t.mGM(s=t.lsd())&&(n._templateQuery=s.first)}},inputs:{footerHeight:"footerHeight",totalMessage:"totalMessage",selectedMessage:"selectedMessage",pagerLeftArrowIcon:"pagerLeftArrowIcon",pagerRightArrowIcon:"pagerRightArrowIcon",pagerPreviousIcon:"pagerPreviousIcon",pagerNextIcon:"pagerNextIcon",_templateInput:["template","_templateInput"]}}),o})();function x(o){const r={left:[],center:[],right:[]};if(o)for(const e of o)e.frozenLeft?r.left.push(e):e.frozenRight?r.right.push(e):r.center.push(e);return r}function S(o,r){return{left:G(o.left),center:G(o.center),right:G(o.right),total:Math.floor(G(r))}}function G(o,r){let e=0;if(o)for(const n of o)e+=parseFloat(r&&n[r]?n[r]:n.width);return e}function de(o){const r=[],e=x(o);return r.push({type:"left",columns:e.left}),r.push({type:"center",columns:e.center}),r.push({type:"right",columns:e.right}),r}class At{constructor(){this.treeArray=[]}clearCache(){this.treeArray=[]}initCache(r){const{rows:e,rowHeight:n,detailRowHeight:i,externalVirtual:s,rowCount:a,rowIndexes:l,rowExpansions:c}=r,d="function"==typeof n,g="function"==typeof i;if(!d&&isNaN(n))throw new Error(`Row Height cache initialization failed. Please ensure that 'rowHeight' is a\n        valid number or function value: (${n}) when 'scrollbarV' is enabled.`);if(!g&&isNaN(i))throw new Error(`Row Height cache initialization failed. Please ensure that 'detailRowHeight' is a\n        valid number or function value: (${i}) when 'scrollbarV' is enabled.`);const w=s?a:e.length;this.treeArray=new Array(w);for(let p=0;p<w;++p)this.treeArray[p]=0;for(let p=0;p<w;++p){const _=e[p];let T=n;d&&(T=n(_));const Un=c.has(_);_&&Un&&(T+=g?i(_,l.get(_)):i),this.update(p,T)}}getRowIndex(r){return 0===r?0:this.calcRowIndex(r)}update(r,e){if(!this.treeArray.length)throw new Error(`Update at index ${r} with value ${e} failed:\n        Row Height cache not initialized.`);const n=this.treeArray.length;for(r|=0;r<n;)this.treeArray[r]+=e,r|=r+1}query(r){if(!this.treeArray.length)throw new Error(`query at index ${r} failed: Fenwick tree array not initialized.`);let e=0;for(r|=0;r>=0;)e+=this.treeArray[r],r=(r&r+1)-1;return e}queryBetween(r,e){return this.query(e)-this.query(r-1)}calcRowIndex(r){if(!this.treeArray.length)return 0;let e=-1;const n=this.treeArray.length;for(let s=Math.pow(2,n.toString(2).length-1);0!==s;s>>=1){const a=e+s;a<n&&r>
1=this.treeArray[a]&&(r-=this.treeArray[a],e=a)}return e+1}}const P={},ue=typeof document<"u"?document.createElement("div").style:void 0,j=function(){const o=typeof window<"u"?window.getComputedStyle(document.documentElement,""):void 0,r=typeof o<"u"?Array.prototype.slice.call(o).join("").match(/-(moz|webkit|ms)-/):null,e=null!==r?r[1]:void 0,n=typeof e<"u"?"WebKit|Moz|MS|O".match(new RegExp("("+e+")","i"))[1]:void 0;return n?{dom:n,lowercase:e,css:`-${e}-`,js:e[0].toUpperCase()+e.substr(1)}:void 0}();function M(o){const r=O(o);return P[r]||(void 0!==j&&void 0!==ue[j.css+o]?P[r]=j.css+o:void 0!==ue[o]&&(P[r]=o)),P[r]}const N=typeof window<"u"?M("transform"):void 0,$t=typeof window<"u"?M("backfaceVisibility"):void 0,Ot=typeof window<"u"?!!M("transform"):void 0,Vt=typeof window<"u"?!!M("perspective"):void 0,he=typeof window<"u"?window.navigator.userAgent:"Chrome",jt=/Safari\//.test(he)&&!/Chrome\//.test(he);function y(o,r,e){typeof N<"u"&&Ot?!jt&&Vt?(o[N]=`translate3d(${r}px, ${e}px, 0)`,o[$t]="hidden"):o[O(N)]=`translate(${r}px, ${e}px)`:(o.top=`${e}px`,o.left=`${r}px`)}let Nt=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275cmp=t.VBU({type:o,selectors:[["datatable-progress"]],decls:3,vars:0,consts:[["role","progressbar",1,"progress-linear"],[1,"container"],[1,"bar"]],template:function(e,n){1&e&&(t.j41(0,"div",0)(1,"div",1),t.nrm(2,"div",2),t.k0s()())},encapsulation:2,changeDetection:0}),o})();function L(o,r,e){const n=e(r,o);return n>-1?o.splice(n,1):o.push(r),o}var f=function(o){return o[o.up=38]="up",o[o.down=40]="down",o[o.return=13]="return",o[o.escape=27]="escape",o[o.left=37]="left",o[o.right=39]="right",o}(f||{});let Yt=(()=>{class o{constructor(){this.activate=new t.bkB,this.select=new t.bkB}selectRow(e,n,i){if(!this.selectEnabled)return;const s=this.selectionType===b.checkbox,l=this.selectionType===b.multiClick;let c=[];c=this.selectionType===b.multi||s||l?e.shiftKey?function Lt(o,r,e,n,i){const s=e<n;for(let a=0;a<r.length;a++){let g={start:0,end:0};g=s?{start:e,end:n}:{start:n,end:e+1},(s&&a<=n&&a>=e||!s&&a>=n&&a<=e)&&a>=g.start&&a<=g.end&&o.push(r[a])}return o}([],this.rows,n,this.prevIndex,this.getRowSelectedIdx.bind(this)):L(e.ctrlKey||e.metaKey||l||s?[...this.selected]:[],i,this.getRowSelectedIdx.bind(this)):L([],i,this.getRowSelectedIdx.bind(this)),"function"==typeof this.selectCheck&&(c=c.filter(this.selectCheck.bind(this))),this.selected.splice(0,this.selected.length),this.selected.push(...c),this.prevIndex=n,this.select.emit({selected:c})}onActivate(e,n){const{type:i,event:s,row:a}=e,l=this.selectionType===b.checkbox;!l&&("click"===i||"dblclick"===i)||l&&"checkbox"===i?this.selectRow(s,n,a):"keydown"===i&&(s.keyCode===f.return?this.selectRow(s,n,a):this.onKeyboardFocus(e)),this.activate.emit(e)}onKeyboardFocus(e){const{keyCode:n}=e.event;if(n===f.up||n===f.down||n===f.right||n===f.left){const s=this.selectionType===b.cell;e.cellElement&&s?s&&this.focusCell(e.cellElement,e.rowElement,n,e.cellIndex):this.focusRow(e.rowElement,n)}}focusRow(e,n){const i=this.getPrevNextRow(e,n);i&&i.focus()}getPrevNextRow(e,n){const i=e.parentElement;if(i){let s;if(n===f.up?s=i.previousElementSibling:n===f.down&&(s=i.nextElementSibling),s&&s.children.length)return s.children[0]}}focusCell(e,n,i,s){let a;if(i===f.left)a=e.previousElementSibling;else if(i===f.right)a=e.nextElementSibling;else if(i===f.up||i===f.down){const l=this.getPrevNextRow(n,i);if(l){const c=l.getElementsByClassName("datatable-body-cell");c.length&&(a=c[s])}}a&&a.focus()}getRowSelected(e){return this.getRowSelectedIdx(e,this.selected)>-1}getRowSelectedIdx(e,n){if(!n||!n.length)return-1;const i=this.rowIdentity(e);return n.findIndex(s=>this.rowIdentity(s)===i)}}return o.\u0275fac=function(e){return new(e||o)},o.\u0275cmp=t.VBU({type:o,selectors:[["datatable-selection"]],inputs:{rows:"rows",selected:"selected",selectEnabled:"selectEnabled",selectionType:"selectionType",rowIdentity:"rowIdentity",selectCheck:"selectCheck"},outputs:{activate:"activate",select:"select"},ngContentSelectors:X,decls:1,vars:0,template:function(e,n){1&e&&(t.NAR(),t.SdG(0))},encapsulation:2,changeDetection:0}),o})();var m=function(o){return o.asc="asc",o.desc="desc",o}(m||{});let Ut=(()=>{class o{constructor(e,n){this.cd=n,this.activate=new t.bkB,this.treeAction=new t.bkB,this.isFocused=!1,this.onCheckboxChangeFn=this.onCheckboxChange.bind(this),this.activateFn=this.activate.emit.bind(this.activate),this.cellContext={onCheckboxChangeFn:this.onCheckboxChangeFn,activateFn:this.activateFn,row:this.row,group:this.group,value:this.value,column:this.column,rowHeight:this.rowHeight,isSelected:this.isSelected,rowIndex:this.rowIndex,treeStatus:this.treeStatus,onTreeAction:this.onTreeAction.bind(this)},this._element=e.nativeElement}set group(e){this._group=e,this.cellContext.group=e,this.checkValueUpdates(),this.cd.markForCheck()}get group(){return this._group}set rowHeight(e){this._rowHeight=e,this.cellContext.rowHeight=e,this.checkValueUpdates(),this.cd.markForCheck()}get rowHeight(){return this._rowHeight}
1set isSelected(e){this._isSelected=e,this.cellContext.isSelected=e,this.cd.markForCheck()}get isSelected(){return this._isSelected}set expanded(e){this._expanded=e,this.cellContext.expanded=e,this.cd.markForCheck()}get expanded(){return this._expanded}set rowIndex(e){this._rowIndex=e,this.cellContext.rowIndex=e,this.checkValueUpdates(),this.cd.markForCheck()}get rowIndex(){return this._rowIndex}set column(e){this._column=e,this.cellContext.column=e,this.checkValueUpdates(),this.cd.markForCheck()}get column(){return this._column}set row(e){this._row=e,this.cellContext.row=e,this.checkValueUpdates(),this.cd.markForCheck()}get row(){return this._row}set sorts(e){this._sorts=e,this.calcSortDir=this.calcSortDir(e)}get sorts(){return this._sorts}set treeStatus(e){this._treeStatus="collapsed"!==e&&"expanded"!==e&&"loading"!==e&&"disabled"!==e?"collapsed":e,this.cellContext.treeStatus=this._treeStatus,this.checkValueUpdates(),this.cd.markForCheck()}get treeStatus(){return this._treeStatus}get columnCssClasses(){let e="datatable-body-cell";if(this.column.cellClass)if("string"==typeof this.column.cellClass)e+=" "+this.column.cellClass;else if("function"==typeof this.column.cellClass){const n=this.column.cellClass({row:this.row,group:this.group,column:this.column,value:this.value,rowHeight:this.rowHeight});if("string"==typeof n)e+=" "+n;else if("object"==typeof n){const i=Object.keys(n);for(const s of i)!0===n[s]&&(e+=` ${s}`)}}return this.sortDir||(e+=" sort-active"),this.isFocused&&(e+=" active"),this.sortDir===m.asc&&(e+=" sort-asc"),this.sortDir===m.desc&&(e+=" sort-desc"),e}get width(){return this.column.width}get minWidth(){return this.column.minWidth}get maxWidth(){return this.column.maxWidth}get height(){const e=this.rowHeight;return isNaN(e)?e:e+"px"}ngDoCheck(){this.checkValueUpdates()}ngOnDestroy(){this.cellTemplate&&this.cellTemplate.clear()}checkValueUpdates(){let e="";if(this.row&&this.column){const n=this.column.$$valueGetter(this.row,this.column.prop),i=this.column.pipe;i?e=i.transform(n):void 0!==e&&(e=n)}else e="";this.value!==e&&(this.value=e,this.cellContext.value=e,this.sanitizedValue=null!=e?this.stripHtml(e):e,this.cd.markForCheck())}onFocus(){this.isFocused=!0}onBlur(){this.isFocused=!1}onClick(e){this.activate.emit({type:"click",event:e,row:this.row,group:this.group,rowHeight:this.rowHeight,column:this.column,value:this.value,cellElement:this._element})}onDblClick(e){this.activate.emit({type:"dblclick",event:e,row:this.row,group:this.group,rowHeight:this.rowHeight,column:this.column,value:this.value,cellElement:this._element})}onKeyDown(e){const n=e.keyCode;(n===f.return||n===f.down||n===f.up||n===f.left||n===f.right)&&e.target===this._element&&(e.preventDefault(),e.stopPropagation(),this.activate.emit({type:"keydown",event:e,row:this.row,group:this.group,rowHeight:this.rowHeight,column:this.column,value:this.value,cellElement:this._element}))}onCheckboxChange(e){this.activate.emit({type:"checkbox",event:e,row:this.row,group:this.group,rowHeight:this.rowHeight,column:this.column,value:this.value,cellElement:this._element,treeStatus:"collapsed"})}calcSortDir(e){if(!e)return;const n=e.find(i=>i.prop===this.column.prop);return n?n.dir:void 0}stripHtml(e){return e.replace?e.replace(/<\/?[^>]+(>|$)/g,""):e}onTreeAction(){this.treeAction.emit(this.row)}calcLeftMargin(e,n){return e.isTreeColumn?n.level*(null!=e.treeLevelIndent?e.treeLevelIndent:50):0}}return o.\u0275fac=function(e){return new(e||o)(t.rXU(t.aKT),t.rXU(t.gRc))},o.\u0275cmp=t.VBU({type:o,selectors:[["datatable-body-cell"]],viewQuery:function(e,n){if(1&e&&t.GBs(De,7,t.c1b),2&e){let i;t.mGM(i=t.lsd())&&(n.cellTemplate=i.first)}},hostVars:10,hostBindings:function(e,n){1&e&&t.bIt("focus",function(){return n.onFocus()})("blur",function(){return n.onBlur()})("click",function(s){return n.onClick(s)})("dblclick",function(s){return n.onDblClick(s)})("keydown",function(s){return n.onKeyDown(s)}),2&e&&(t.HbH(n.columnCssClasses),t.xc7("width",n.width,"px")("min-width",n.minWidth,"px")("max-width",n.maxWidth,"px")("height",n.height))},inputs:{displayCheck:"displayCheck",group:"group",rowHeight:"rowHeight",isSelected:"isSelected",expanded:"expanded",rowIndex:"rowIndex",column:"column",row:"row",sorts:"sorts",treeStatus:"treeStatus"},outputs:{activate:"activate",treeAction:"treeAction"},decls:5,vars:6,consts:[[1,"datatable-body-cell-label"],["class","datatable-checkbox",4,"ngIf"],[4,"ngIf"],[3,"title","innerHTML",4,"ngIf"],[1,"datatable-checkbox"],["type","checkbox",3,"checked","click"],["class","datatable-tree-button",3,"disabled","click",4,"ngIf"],[1,"datatable-tree-button",3,"disabled","click"],["class","icon datatable-icon-collapse",4,"ngIf"],["class","icon datatable-icon-up",4,"ngIf"],["class","icon datatable-icon-down",4,"ngIf"],[1,"icon","datatable-icon-collapse"],[1,"icon","datatable-icon-up"],[1,"icon","datatable-icon-down"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"title","innerHTML"],["cellTemplate",""]],template:function(e,n){1&e&&(t.j41(0,"div",0),t.DNE(1,Re,2,1,"label",1),t.DNE(2,Pe,3,2,"ng-container",2),t.DNE(3,Me,1,2,"span",3),t.DNE(4,Xe,2,2,null,2),t.k0s()),2&e&&(t.xc7("margin-left",n.calcLeftMargin(n.column,n.row),"px"),t.R7$(1),t.Y8G("ngIf",n.column.checkboxable&&(!n.displayCheck||n.displayCheck(n.row,n.column,n.value))),t.R7$(1),t.Y8G("ngIf",n.column.isTreeColumn),t.R7$(1),t.Y8G("ngIf",!n.column.cellTemplate),t.R7$(1),t.Y8G("ngIf",n.column.cellTemplate))},dependencies:[h.bT,h.T3],encapsulation:2,changeDetection:0}),o})(),pe=(()=>{class o{constructor(e,n,i,s){this.differs=e,this.scrollbarHelper=n,this.cd=i,this.treeStatus="collapsed",this.activate=new t.bkB,this.treeAction=new t.bkB,this._groupStyles={left:{},center:{},right:{}},this._element=s.nativeElement,this._rowDiffer=e.find({}).create()}set columns(e){this._columns=e,this.recalculateColumns(e),this.buildStylesByGroup()}get columns(){return this._columns}set innerWidth(e){if(this._columns){const n=x(this._columns);this._columnGroupWidths=S(n,this._columns)}this._innerWidth=e,this.recalculateColumns(),this.buildStylesByGroup()}get innerWidth(){return this._innerWidth}set offsetX(e){this._offsetX=e,this.buildStylesByGroup()}get offsetX(){return this._offsetX}get cssClass(){let e="datatable-body-row";if(this.isSelected&&(e+=" active"),this.rowIndex%2!=0&&(e+=" datatable-row-odd"),this.rowIndex%2==0&&(e+=" datatable-row-even"),this.rowClass){const n=this.rowClass(this.row);if("string"==typeof n)e+=` ${n}`;else if("object"==typeof n){const i=Object.keys(n);for(const s of i)!0===n[s]&&(e+=` ${s}`)}}return e}get columnsTotalWidths(){return this._columnGroupWidths.total}ngDoCheck(){this._rowDiffer.diff(this.row)&&this.cd.markForCheck()}trackByGroups(e,n){return n.type}columnTrackingFn(e,n){return n.$$id}buildStylesByGroup(){this._groupStyles.left=this.calcStylesByGroup("left"),this._groupStyles.center=this.calcStylesByGroup("center"),this._groupStyles.right=this.calcStylesByGroup("right"),this.cd.markForCheck()}calcStylesByGroup(e){const n=this._columnGroupWidths,i=this.offsetX,s={width:`${n[e]}px`};if("left"===e)y(s,i,0);else if("right"===e){const a=parseInt(this.innerWidth+"",0);y(s,-1*(n.total-a-i+this.scrollbarHelper.width),0)}return s}onActivate(e,n){e.cellIndex=n,e.rowElement=this._element,this.activate.emit(e)}onKeyDown(e){const n=e.keyCode;(n===f.return||n===f.down||n===f.up||n===f.left||n===f.right)&&e.target===this._element&&(e.preventDefault(),e.stopPropagation(),this.activate.emit({type:"keydown",event:e,row:this.row,rowElement:this._element}))}onMouseenter(e){this.activate.emit({type:"mouseenter",event:e,row:this.row,rowElement:this._element})}
1recalculateColumns(e=this.columns){this._columns=e;const n=x(this._columns);this._columnsByPin=de(this._columns),this._columnGroupWidths=S(n,this._columns)}onTreeAction(){this.treeAction.emit()}}return o.\u0275fac=function(e){return new(e||o)(t.rXU(t.MKu),t.rXU(z,4),t.rXU(t.gRc),t.rXU(t.aKT))},o.\u0275cmp=t.VBU({type:o,selectors:[["datatable-body-row"]],hostVars:6,hostBindings:function(e,n){1&e&&t.bIt("keydown",function(s){return n.onKeyDown(s)})("mouseenter",function(s){return n.onMouseenter(s)}),2&e&&(t.HbH(n.cssClass),t.xc7("height",n.rowHeight,"px")("width",n.columnsTotalWidths,"px"))},inputs:{columns:"columns",innerWidth:"innerWidth",expanded:"expanded",rowClass:"rowClass",row:"row",group:"group",isSelected:"isSelected",rowIndex:"rowIndex",displayCheck:"displayCheck",treeStatus:"treeStatus",offsetX:"offsetX",rowHeight:"rowHeight"},outputs:{activate:"activate",treeAction:"treeAction"},decls:1,vars:2,consts:[[3,"class","ngStyle",4,"ngFor","ngForOf","ngForTrackBy"],[3,"ngStyle"],["role","cell","tabindex","-1",3,"row","group","expanded","isSelected","rowIndex","column","rowHeight","displayCheck","treeStatus","activate","treeAction",4,"ngFor","ngForOf","ngForTrackBy"],["role","cell","tabindex","-1",3,"row","group","expanded","isSelected","rowIndex","column","rowHeight","displayCheck","treeStatus","activate","treeAction"]],template:function(e,n){1&e&&t.DNE(0,We,2,6,"div",0),2&e&&t.Y8G("ngForOf",n._columnsByPin)("ngForTrackBy",n.trackByGroups)},dependencies:[Ut,h.Sq,h.B3],encapsulation:2,changeDetection:0}),o})();function Qt(o){const r=o.filter(e=>!!e);return!r.length||r.some(e=>"number"!=typeof e)?null:r.reduce((e,n)=>e+n)}function Kt(o){return null}let Jt=(()=>{class o{constructor(){this.summaryRow={}}ngOnChanges(){!this.columns||!this.rows||(this.updateInternalColumns(),this.updateValues())}updateInternalColumns(){this._internalColumns=this.columns.map(e=>({...e,cellTemplate:e.summaryTemplate}))}updateValues(){this.summaryRow={},this.columns.filter(e=>!e.summaryTemplate).forEach(e=>{const n=this.rows.map(s=>s[e.prop]),i=this.getSummaryFunction(e);this.summaryRow[e.prop]=e.pipe?e.pipe.transform(i(n)):i(n)})}getSummaryFunction(e){return void 0===e.summaryFunc?Qt:null===e.summaryFunc?Kt:e.summaryFunc}}return o.\u0275fac=function(e){return new(e||o)},o.\u0275cmp=t.VBU({type:o,selectors:[["datatable-summary-row"]],hostAttrs:[1,"datatable-summary-row"],inputs:{rows:"rows",columns:"columns",rowHeight:"rowHeight",offsetX:"offsetX",innerWidth:"innerWidth"},features:[t.OA$],decls:1,vars:1,consts:[["tabindex","-1",3,"innerWidth","offsetX","columns","rowHeight","row","rowIndex",4,"ngIf"],["tabindex","-1",3,"innerWidth","offsetX","columns","rowHeight","row","rowIndex"]],template:function(e,n){1&e&&t.DNE(0,Ae,1,6,"datatable-body-row",0),2&e&&t.Y8G("ngIf",n.summaryRow&&n._internalColumns)},dependencies:[pe,h.bT],encapsulation:2}),o})(),Zt=(()=>{class o{constructor(e,n){this.cd=e,this.differs=n,this.rowContextmenu=new t.bkB(!1),this._expanded=!1,this.groupContext={group:this.row,expanded:this.expanded,rowIndex:this.rowIndex},this.rowContext={row:this.row,expanded:this.expanded,rowIndex:this.rowIndex},this.rowDiffer=n.find({}).create()}set rowIndex(e){this._rowIndex=e,this.rowContext.rowIndex=e,this.groupContext.rowIndex=e,this.cd.markForCheck()}get rowIndex(){return this._rowIndex}set expanded(e){this._expanded=e,this.groupContext.expanded=e,this.rowContext.expanded=e,this.cd.markForCheck()}get expanded(){return this._expanded}ngDoCheck(){this.rowDiffer.diff(this.row)&&(this.rowContext.row=this.row,this.groupContext.group=this.row,this.cd.markForCheck())}onContextmenu(e){this.rowContextmenu.emit({event:e,row:this.row})}getGroupHeaderStyle(){const e={};return e.transform="translate3d("+this.offsetX+"px, 0px, 0px)",e["backface-visibility"]="hidden",e.width=this.innerWidth,e}}return o.\u0275fac=function(e){return new(e||o)(t.rXU(t.gRc),t.rXU(t.MKu))},o.\u0275cmp=t.VBU({type:o,selectors:[["datatable-row-wrapper"]],hostAttrs:[1,"datatable-row-wrapper"],hostBindings:function(e,n){1&e&&t.bIt("contextmenu",function(s){return n.onContextmenu(s)})},inputs:{innerWidth:"innerWidth",rowDetail:"rowDetail",groupHeader:"groupHeader",offsetX:"offsetX",detailRowHeight:"detailRowHeight",row:"row",groupedRows:"groupedRows",rowIndex:"rowIndex",expanded:"expanded"},outputs:{rowContextmenu:"rowContextmenu"},ngContentSelectors:X,decls:3,vars:3,consts:[["class","datatable-group-header",3,"ngStyle",4,"ngIf"],[4,"ngIf"],["class","datatable-row-detail",3,"height",4,"ngIf"],[1,"datatable-group-header",3,"ngStyle"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"datatable-row-detail"]],template:function(e,n){1&e&&(t.NAR(),t.DNE(0,Ve,2,2,"div",0),t.DNE(1,je,1,0,"ng-content",1),t.DNE(2,Ye,2,3,"div",2)),2&e&&(t.Y8G("ngIf",n.groupHeader&&n.groupHeader.template),t.R7$(1),t.Y8G("ngIf",n.groupHeader&&n.groupHeader.template&&n.expanded||!n.groupHeader||!n.groupHeader.template),t.R7$(1),t.Y8G("ngIf",n.rowDetail&&n.rowDetail.template&&n.expanded))},dependencies:[h.bT,h.B3,h.T3],encapsulation:2,changeDetection:0}),o})(),ge=(()=>{class o{constructor(e){this.cd=e,this.selected=[],this.scroll=ne
1w t.bkB,this.page=new t.bkB,this.activate=new t.bkB,this.select=new t.bkB,this.detailToggle=new t.bkB,this.rowContextmenu=new t.bkB(!1),this.treeAction=new t.bkB,this.rowHeightsCache=new At,this.temp=[],this.offsetY=0,this.indexes={},this.rowIndexes=new WeakMap,this.rowExpansions=[],this.getDetailRowHeight=(n,i)=>{if(!this.rowDetail)return 0;const s=this.rowDetail.rowHeight;return"function"==typeof s?s(n,i):s},this.rowTrackingFn=(n,i)=>{const s=this.getRowIndex(i);return this.trackByProp?i[this.trackByProp]:s}}set pageSize(e){this._pageSize=e,this.recalcLayout()}get pageSize(){return this._pageSize}set rows(e){this._rows=e,this.recalcLayout()}get rows(){return this._rows}set columns(e){this._columns=e;const n=x(e);this.columnGroupWidths=S(n,e)}get columns(){return this._columns}set offset(e){this._offset=e,(!this.scrollbarV||this.scrollbarV&&!this.virtualization)&&this.recalcLayout()}get offset(){return this._offset}set rowCount(e){this._rowCount=e,this.recalcLayout()}get rowCount(){return this._rowCount}get bodyWidth(){return this.scrollbarH?this.innerWidth+"px":"100%"}set bodyHeight(e){this._bodyHeight=this.scrollbarV?e+"px":"auto",this.recalcLayout()}get bodyHeight(){return this._bodyHeight}get selectEnabled(){return!!this.selectionType}get scrollHeight(){if(this.scrollbarV&&this.virtualization&&this.rowCount)return this.rowHeightsCache.query(this.rowCount-1)}ngOnInit(){this.rowDetail&&(this.listener=this.rowDetail.toggle.subscribe(({type:e,value:n})=>{"row"===e&&this.toggleRowExpansion(n),"all"===e&&this.toggleAllRows(n),this.updateIndexes(),this.updateRows(),this.cd.markForCheck()})),this.groupHeader&&(this.listener=this.groupHeader.toggle.subscribe(({type:e,value:n})=>{"group"===e&&this.toggleRowExpansion(n),"all"===e&&this.toggleAllRows(n),this.updateIndexes(),this.updateRows(),this.cd.markForCheck()}))}ngOnDestroy(){(this.rowDetail||this.groupHeader)&&this.listener.unsubscribe()}updateOffsetY(e){this.scroller&&(this.scrollbarV&&this.virtualization&&e?e=this.rowHeightsCache.query(this.pageSize*e-1):this.scrollbarV&&!this.virtualization&&(e=0),this.scroller.setOffset(e||0))}onBodyScroll(e){const n=e.scrollYPos,i=e.scrollXPos;(this.offsetY!==n||this.offsetX!==i)&&this.scroll.emit({offsetY:n,offsetX:i}),this.offsetY=n,this.offsetX=i,this.updateIndexes(),this.updatePage(e.direction),this.updateRows()}updatePage(e){let n=this.indexes.first/this.pageSize;"up"===e?n=Math.ceil(n):"down"===e&&(n=Math.floor(n)),void 0!==e&&!isNaN(n)&&this.page.emit({offset:n})}updateRows(){const{first:e,last:n}=this.indexes;let i=e,s=0;const a=[];if(this.groupedRows){let l=3;for(1===this.groupedRows.length&&(l=this.groupedRows[0].value.length);i<n&&i<this.groupedRows.length;){const c=this.groupedRows[i];this.rowIndexes.set(c,i),c.value&&c.value.forEach((d,g)=>{this.rowIndexes.set(d,`${i}-${g}`)}),a[s]=c,s++,i++}}else for(;i<n&&i<this.rowCount;){const l=this.rows[i];l&&(this.rowIndexes.set(l,i),a[s]=l),s++,i++}this.temp=a}getRowHeight(e){return"function"==typeof this.rowHeight?this.rowHeight(e):this.rowHeight}getGroupHeight(e){let n=0;if(e.value)for(let i=0;i<e.value.length;i++)n+=this.getRowAndDetailHeight(e.value[i]);return n}getRowAndDetailHeight(e){let n=this.getRowHeight(e);return this.getRowExpanded(e)&&(n+=this.getDetailRowHeight(e)),n}getRowsStyles(e){const n={};if(this.groupedRows&&(n.width=this.columnGroupWidths.total),this.scrollbarV&&this.virtualization){let i=0;if(this.groupedRows){const a=e[e.length-1];i=a?this.getRowIndex(a):0}else i=this.getRowIndex(e);y(n,0,this.rowHeightsCache.query(i-1))}return n}getBottomSummaryRowStyles(){if(!this.scrollbarV||!this.rows||!this.rows.length)return null;const e={position:"absolute"};return y(e,0,this.rowHeightsCache.query(this.rows.length-1)),e}hideIndicator(){setTimeout(()=>this.loadingIndicator=!1,500)}updateIndexes(){let e=0,n=0;if(this.scrollbarV)if(this.virtualization){const i=parseInt(this.bodyHeight,0);e=this.rowHeightsCache.getRowIndex(this.offsetY),n=this.rowHeightsCache.getRowIndex(i+this.offsetY)+1}else e=0,n=this.rowCount;else this.externalPaging||(e=Math.max(this.offset*this.pageSize,0)),n=Math.min(e+this.pageSize,this.rowCount);this.indexes={first:e,last:n}}
1refreshRowHeightCache(){if(this.scrollbarV&&(!this.scrollbarV||this.virtualization)&&(this.rowHeightsCache.clearCache(),this.rows&&this.rows.length)){const e=new Set;for(const n of this.rows)this.getRowExpanded(n)&&e.add(n);this.rowHeightsCache.initCache({rows:this.rows,rowHeight:this.rowHeight,detailRowHeight:this.getDetailRowHeight,externalVirtual:this.scrollbarV&&this.externalPaging,rowCount:this.rowCount,rowIndexes:this.rowIndexes,rowExpansions:e})}}getAdjustedViewPortIndex(){const e=this.indexes.first;return this.scrollbarV&&this.virtualization&&this.rowHeightsCache.query(e-1)<=this.offsetY?e-1:e}toggleRowExpansion(e){const n=this.getAdjustedViewPortIndex(),i=this.getRowExpandedIdx(e,this.rowExpansions),s=i>-1;if(this.scrollbarV&&this.virtualization){const a=this.getDetailRowHeight(e)*(s?-1:1),l=this.getRowIndex(e);this.rowHeightsCache.update(l,a)}s?this.rowExpansions.splice(i,1):this.rowExpansions.push(e),this.detailToggle.emit({rows:[e],currentIndex:n})}toggleAllRows(e){this.rowExpansions=[];const n=this.getAdjustedViewPortIndex();if(e)for(const i of this.rows)this.rowExpansions.push(i);this.scrollbarV&&this.recalcLayout(),this.detailToggle.emit({rows:this.rows,currentIndex:n})}recalcLayout(){this.refreshRowHeightCache(),this.updateIndexes(),this.updateRows()}columnTrackingFn(e,n){return n.$$id}stylesByGroup(e){const n=this.columnGroupWidths,i=this.offsetX,s={width:`${n[e]}px`};if("left"===e)y(s,i,0);else if("right"===e){const a=parseInt(this.innerWidth+"",0);y(s,-1*(n.total-a-i),0)}return s}getRowExpanded(e){if(0===this.rowExpansions.length&&this.groupExpansionDefault)for(const n of this.groupedRows)this.rowExpansions.push(n);return this.getRowExpandedIdx(e,this.rowExpansions)>-1}getRowExpandedIdx(e,n){if(!n||!n.length)return-1;const i=this.rowIdentity(e);return n.findIndex(s=>this.rowIdentity(s)===i)}getRowIndex(e){return this.rowIndexes.get(e)||0}onTreeAction(e){this.treeAction.emit({row:e})}}return o.\u0275fac=function(e){return new(e||o)(t.rXU(t.gRc))},o.\u0275cmp=t.VBU({type:o,selectors:[["datatable-body"]],viewQuery:function(e,n){if(1&e&&t.GBs(ie,5),2&e){let i;t.mGM(i=t.lsd())&&(n.scroller=i.first)}},hostAttrs:[1,"datatable-body"],hostVars:4,hostBindings:function(e,n){2&e&&t.xc7("width",n.bodyWidth)("height",n.bodyHeight)},inputs:{scrollbarV:"scrollbarV",scrollbarH:"scrollbarH",loadingIndicator:"loadingIndicator",externalPaging:"externalPaging",rowHeight:"rowHeight",offsetX:"offsetX",emptyMessage:"emptyMessage",selectionType:"selectionType",selected:"selected",rowIdentity:"rowIdentity",rowDetail:"rowDetail",groupHeader:"groupHeader",selectCheck:"selectCheck",displayCheck:"displayCheck",trackByProp:"trackByProp",rowClass:"rowClass",groupedRows:"groupedRows",groupExpansionDefault:"groupExpansionDefault",innerWidth:"innerWidth",groupRowsBy:"groupRowsBy",virtualization:"virtualization",summaryRow:"summaryRow",summaryPosition:"summaryPosition",summaryHeight:"summaryHeight",pageSize:"pageSize",rows:"rows",columns:"columns",offset:"offset",rowCount:"rowCount",bodyHeight:"bodyHeight"},outputs:{scroll:"scroll",page:"page",activate:"activate",select:"select",detailToggle:"detailToggle",rowContextmenu:"rowContextmenu",treeAction:"treeAction"},decls:5,vars:9,consts:[[4,"ngIf"],[3,"selected","rows","selectCheck","selectEnabled","selectionType","rowIdentity","select","activate"],["selector",""],[3,"scrollbarV","scrollbarH","scrollHeight","scrollWidth","scroll",4,"ngIf"],["class","empty-row",3,"innerHTML",4,"ngIf"],[3,"scrollbarV","scrollbarH","scrollHeight","scrollWidth","scroll"],[3,"rowHeight","offsetX","innerWidth","rows","columns",4,"ngIf"],[3,"groupedRows","innerWidth","ngStyle","rowDetail","groupHeader","offsetX","detailRowHeight","row","expanded","rowIndex","rowContextmenu",4,"ngFor","ngForOf","ngForTrackBy"],["role","row",3,"ngStyle","rowHeight","offsetX","innerWidth","rows","columns",4,"ngIf"],[3,"rowHeight","offsetX","innerWidth","rows","columns"],[3,"groupedRows","innerWidth","ngStyle","rowDetail","groupHeader","offsetX","detailRowHeight","row","expanded","rowIndex","rowContextmenu"],["role","row","tabindex","-1",3,"isSelected","innerWidth","offsetX","columns","rowHeight","row","rowIndex","expanded","rowClass","displayCheck","treeStatus","treeAction","activate",4,"ngIf","ngIfElse"],["groupedRowsTemplate",""],["role","row","tabindex","-1",3,"isSelected","innerWidth","offsetX","columns","rowHeight","row","rowIndex","expanded","rowClass","displayCheck","treeStatus","treeAction","activate"],["role","row","tabindex","-1",3,"isSelected","innerWidth","offsetX","columns","rowHeight","row","group","rowIndex","expanded","rowClass","activate",4,"ngFor","ngForOf","ngForTrackBy"],["role","row","tabindex","-1",3,"isSelected","innerWidth","offsetX","columns","rowHeight","row","group","rowIndex","expanded","rowClass","activate"],["role","row",3,"ngStyle","rowHeight","offsetX","innerWidth","rows","columns"],[1,"empty-row",3,"innerHTML"]],template:function(e,n){1&e&&(t.DNE(0,Ue,1,0,"datatable-progress",0),t.j41(1,"datatable-selection",1,2),t.bIt("select",function(s){return n.select.emit(s)})("activate",function(s){return n.activate.emit(s)}),t.DNE(3,tt,4,8,"datatable-scroller",3),t.DNE(4,nt,1,1,"div",4),t.k0s()),2&e&&(t.Y8G("ngIf",n.loadingIndicator),t.R7$(1),t.Y8G("selected",n.selected)("rows",n.rows)("selectCheck",n.selectCheck)("selectEnabled",n.selectEnabled)("selectionType",n.selectionType)("rowIdentity",n.rowIdentity),t.R7$(2),t.Y8G("ngIf",null==n.rows?null:n.rows.length),t.R7$(1),t.Y8G("ngIf",!(null!=n.rows&&n.rows.length||n.loadingIndicator)))},dependencies:[Nt,Yt,ie,Jt,Zt,pe,h.bT,h.Sq,h.B3],encapsulation:2,changeDetection:0}),o})();function en(o,r){if((null===o||typeof o>"u")&&(o=0),(null===r||typeof r>"u")&&(r=0),o instanceof Date&&r instanceof Date){if(o<r)return-1;if(o>r)return 1}else if(isNaN(parseFloat(o))||!isFinite(o)||isNaN(parseFloat(r))||!isFinite(r)){if(o=String(o),r=String(r),o.toLowerCase()<r.toLowerCase())return-1;if(o.toLowerCase()>r.toLowerCase())return 1}else{if(parseFloat(o)<parseFloat(r))return-1;if(parseFloat(o)>parseFloat(r))return 1}return 0}let nn=(()=>{class o{constructor(e){this.cd=e,this.sort=new t.bkB,this.select=new t.bkB,this.columnContextmenu=new t.bkB(!1),this.sortFn=this.onSort.bind(this),this.selectFn=this.select.emit.bind(this.select),this.cellContext={column:this.column,sortDir:this.sortDir,sortFn:this.sortFn,allRowsSelected:this.allRowsSelected,selectFn:this.selectFn}}set allRowsSelected(e){this._allRowsSelected=e,this.cellContext.allRowsSelected=e}get allRowsSelected(){return this._allRowsSelected}set column(e){this._column=e,this.cellContext.column=e,this.cd.markForCheck()}get column(){return this._column}set sorts(e){this._sorts=e,this.sortDir=this.calcSortDir(e),this.cellContext.sortDir=this.sortDir,this.sortClass=this.calcSortClass(this.sortDir),this.cd.markForCheck()}get sorts(){return this._sorts}
1get columnCssClasses(){let e="datatable-header-cell";if(this.column.sortable&&(e+=" sortable"),this.column.resizeable&&(e+=" resizeable"),this.column.headerClass)if("string"==typeof this.column.headerClass)e+=" "+this.column.headerClass;else if("function"==typeof this.column.headerClass){const i=this.column.headerClass({column:this.column});if("string"==typeof i)e+=i;else if("object"==typeof i){const s=Object.keys(i);for(const a of s)!0===i[a]&&(e+=` ${a}`)}}const n=this.sortDir;return n&&(e+=` sort-active sort-${n}`),e}get name(){return void 0===this.column.headerTemplate?this.column.name:void 0}get minWidth(){return this.column.minWidth}get maxWidth(){return this.column.maxWidth}get width(){return this.column.width}get isCheckboxable(){return this.column.checkboxable&&this.column.headerCheckboxable&&this.selectionType===b.checkbox}onContextmenu(e){this.columnContextmenu.emit({event:e,column:this.column})}ngOnInit(){this.sortClass=this.calcSortClass(this.sortDir)}calcSortDir(e){if(e&&this.column){const n=e.find(i=>i.prop===this.column.prop);if(n)return n.dir}}onSort(){if(!this.column.sortable)return;const e=function qt(o,r){return o===F.single?r===m.asc?m.desc:m.asc:r?r===m.asc?m.desc:void 0:m.asc}(this.sortType,this.sortDir);this.sort.emit({column:this.column,prevValue:this.sortDir,newValue:e})}calcSortClass(e){if(this.cellContext.column.sortable)return e===m.asc?`sort-btn sort-asc ${this.sortAscendingIcon}`:e===m.desc?`sort-btn sort-desc ${this.sortDescendingIcon}`:`sort-btn ${this.sortUnsetIcon}`}}return o.\u0275fac=function(e){return new(e||o)(t.rXU(t.gRc))},o.\u0275cmp=t.VBU({type:o,selectors:[["datatable-header-cell"]],hostAttrs:[1,"datatable-header-cell"],hostVars:11,hostBindings:function(e,n){1&e&&t.bIt("contextmenu",function(s){return n.onContextmenu(s)}),2&e&&(t.BMQ("title",n.name),t.HbH(n.columnCssClasses),t.xc7("height",n.headerHeight,"px")("min-width",n.minWidth,"px")("max-width",n.maxWidth,"px")("width",n.width,"px"))},inputs:{sortType:"sortType",sortAscendingIcon:"sortAscendingIcon",sortDescendingIcon:"sortDescendingIcon",sortUnsetIcon:"sortUnsetIcon",isTarget:"isTarget",targetMarkerTemplate:"targetMarkerTemplate",targetMarkerContext:"targetMarkerContext",allRowsSelected:"allRowsSelected",selectionType:"selectionType",column:"column",headerHeight:"headerHeight",sorts:"sorts"},outputs:{sort:"sort",select:"select",columnContextmenu:"columnContextmenu"},decls:6,vars:6,consts:[[1,"datatable-header-cell-template-wrap"],[4,"ngIf"],["class","datatable-checkbox",4,"ngIf"],["class","datatable-header-cell-wrapper",4,"ngIf"],[3,"click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"datatable-checkbox"],["type","checkbox",3,"checked","change"],[1,"datatable-header-cell-wrapper"],[1,"datatable-header-cell-label","draggable",3,"innerHTML","click"]],template:function(e,n){1&e&&(t.j41(0,"div",0),t.DNE(1,it,1,2,null,1),t.DNE(2,st,2,1,"label",2),t.DNE(3,rt,2,1,"span",3),t.DNE(4,lt,1,2,null,1),t.j41(5,"span",4),t.bIt("click",function(){return n.onSort()}),t.k0s()()),2&e&&(t.R7$(1),t.Y8G("ngIf",n.isTarget),t.R7$(1),t.Y8G("ngIf",n.isCheckboxable),t.R7$(1),t.Y8G("ngIf",!n.column.headerTemplate),t.R7$(1),t.Y8G("ngIf",n.column.headerTemplate),t.R7$(1),t.HbH(n.sortClass))},dependencies:[h.bT,h.T3],encapsulation:2,changeDetection:0}),o})(),fe=(()=>{class o{constructor(e){this.cd=e,this.sort=new t.bkB,this.reorder=new t.bkB,this.resize=new t.bkB,this.select=new t.bkB,this.columnContextmenu=new t.bkB(!1),this._columnGroupWidths={total:100},this._styleByGroup={left:{},center:{},right:{}},this.destroyed=!1}set innerWidth(e){this._innerWidth=e,setTimeout(()=>{if(this._columns){const n=x(this._columns);this._columnGroupWidths=S(n,this._columns),this.setStylesByGroup()}})}get innerWidth(){return this._innerWidth}set headerHeight(e){this._headerHeight="auto"!==e?`${e}px`:e}get headerHeight(){return this._headerHeight}set columns(e){this._columns=e;const n=x(e);this._columnsByPin=de(e),setTimeout(()=>{this._columnGroupWidths=S(n,e),this.setStylesByGroup()})}get columns(){return this._columns}set offsetX(e){this._offsetX=e,this.setStylesByGroup()}get offsetX(){return this._offsetX}ngOnDestroy(){this.destroyed=!0}onLongPressStart({event:e,model:n}){n.dragging=!0,this.dragEventTarget=e}onLongPressEnd({event:e,model:n}){this.dragEventTarget=e,setTimeout(()=>{const i=this._columns.find(s=>
1s.$$id===n.$$id);i&&(i.dragging=!1)},5)}get headerWidth(){return this.scrollbarH?this.innerWidth+"px":"100%"}trackByGroups(e,n){return n.type}columnTrackingFn(e,n){return n.$$id}onColumnResized(e,n){e<=n.minWidth?e=n.minWidth:e>=n.maxWidth&&(e=n.maxWidth),this.resize.emit({column:n,prevValue:n.width,newValue:e})}onColumnReordered({prevIndex:e,newIndex:n,model:i}){const s=this.getColumn(n);s.isTarget=!1,s.targetMarkerContext=void 0,this.reorder.emit({column:i,prevValue:e,newValue:n})}onTargetChanged({prevIndex:e,newIndex:n,initialIndex:i}){if(e||0===e){const s=this.getColumn(e);s.isTarget=!1,s.targetMarkerContext=void 0}if(n||0===n){const s=this.getColumn(n);s.isTarget=!0,i!==n&&(s.targetMarkerContext={class:"targetMarker ".concat(i>n?"dragFromRight":"dragFromLeft")})}}getColumn(e){const n=this._columnsByPin[0].columns.length;if(e<n)return this._columnsByPin[0].columns[e];const i=this._columnsByPin[1].columns.length;return e<n+i?this._columnsByPin[1].columns[e-n]:this._columnsByPin[2].columns[e-n-i]}onSort({column:e,prevValue:n,newValue:i}){if(e.dragging)return;const s=this.calcNewSorts(e,n,i);this.sort.emit({sorts:s,column:e,prevValue:n,newValue:i})}calcNewSorts(e,n,i){let s=0;this.sorts||(this.sorts=[]);const a=this.sorts.map((l,c)=>((l={...l}).prop===e.prop&&(s=c),l));return void 0===i?a.splice(s,1):n?a[s].dir=i:(this.sortType===F.single&&a.splice(0,this.sorts.length),a.push({dir:i,prop:e.prop})),a}setStylesByGroup(){this._styleByGroup.left=this.calcStylesByGroup("left"),this._styleByGroup.center=this.calcStylesByGroup("center"),this._styleByGroup.right=this.calcStylesByGroup("right"),this.destroyed||this.cd.detectChanges()}calcStylesByGroup(e){const n=this._columnGroupWidths,s={width:`${n[e]}px`};return"center"===e?y(s,-1*this.offsetX,0):"right"===e&&y(s,-1*(n.total-this.innerWidth),0),s}}return o.\u0275fac=function(e){return new(e||o)(t.rXU(t.gRc))},o.\u0275cmp=t.VBU({type:o,selectors:[["datatable-header"]],hostAttrs:[1,"datatable-header"],hostVars:4,hostBindings:function(e,n){2&e&&t.xc7("height",n.headerHeight)("width",n.headerWidth)},inputs:{sortAscendingIcon:"sortAscendingIcon",sortDescendingIcon:"sortDescendingIcon",sortUnsetIcon:"sortUnsetIcon",scrollbarH:"scrollbarH",dealsWithGroup:"dealsWithGroup",targetMarkerTemplate:"targetMarkerTemplate",innerWidth:"innerWidth",sorts:"sorts",sortType:"sortType",allRowsSelected:"allRowsSelected",selectionType:"selectionType",reorderable:"reorderable",headerHeight:"headerHeight",columns:"columns",offsetX:"offsetX"},outputs:{sort:"sort",reorder:"reorder",resize:"resize",select:"select",columnContextmenu:"columnContextmenu"},decls:2,vars:4,consts:[["role","row","orderable","",1,"datatable-header-inner",3,"reorder","targetChanged"],[3,"class","ngStyle",4,"ngFor","ngForOf","ngForTrackBy"],[3,"ngStyle"],["role","columnheader","resizeable","","long-press","","draggable","",3,"resizeEnabled","pressModel","pressEnabled","dragX","dragY","dragModel","dragEventTarget","headerHeight","isTarget","targetMarkerTemplate","targetMarkerContext","column","sortType","sorts","selectionType","sortAscendingIcon","sortDescendingIcon","sortUnsetIcon","allRowsSelected","resize","longPressStart","longPressEnd","sort","select","columnContextmenu",4,"ngFor","ngForOf","ngForTrackBy"],["role","columnheader","resizeable","","long-press","","draggable","",3,"resizeEnabled","pressModel","pressEnabled","dragX","dragY","dragModel","dragEventTarget","headerHeight","isTarget","targetMarkerTemplate","targetMarkerContext","column","sortType","sorts","selectionType","sortAscendingIcon","sortDescendingIcon","sortUnsetIcon","allRowsSelected","resize","longPressStart","longPressEnd","sort","select","columnContextmenu"]],template:function(e,n){1&e&&(t.j41(0,"div",0),t.bIt("reorder",function(s){return n.onColumnReordered(s)})("targetChanged",function(s){return n.onTargetChanged(s)}),t.DNE(1,dt,2,5,"div",1),t.k0s()),2&e&&(t.xc7("width",n._columnGroupWidths.total,"px"),t.R7$(1),t.Y8G("ngForOf",n._columnsByPin)("ngForTrackBy",n.trackByGroups))},dependencies:[nn,Tt,h.Sq,h.B3,xt,Dt,oe],encapsulation:2,changeDetection:0}),o})();function on(o,r,e){e=e||{};let n,i,s,a=null,l=0;function c(){l=!1===e.leading?0:+new Date,a=null,s=o.apply(n,i)}return function(){const d=+new Date;!l&&!1===e.leading&&(l=d);const g=r-(d-l);return n=this,i=arguments,g<=0?(clearTimeout(a),a=null,l=d,s=o.apply(n,i)):!a&&
1!1!==e.trailing&&(a=setTimeout(c,g)),s}}function sn(o,r){return function(n,i,s){return{configurable:!0,enumerable:s.enumerable,get:function(){return Object.defineProperty(this,i,{configurable:!0,enumerable:s.enumerable,value:on(s.value,o,r)}),this[i]}}}}function dn(o,r){for(const e of r){const n=o.indexOf(e);o.splice(n,1)}}function me(o,r=300){let e=0;for(const n of o)e+=n.width||r;return e}let un=(()=>{class o{constructor(){this.change=new t.bkB,this._count=0,this._page=1,this._size=0}set size(e){this._size=e,this.pages=this.calcPages()}get size(){return this._size}set count(e){this._count=e,this.pages=this.calcPages()}get count(){return this._count}set page(e){this._page=e,this.pages=this.calcPages()}get page(){return this._page}get totalPages(){const e=this.size<1?1:Math.ceil(this.count/this.size);return Math.max(e||0,1)}canPrevious(){return this.page>1}canNext(){return this.page<this.totalPages}prevPage(){this.selectPage(this.page-1)}nextPage(){this.selectPage(this.page+1)}selectPage(e){e>0&&e<=this.totalPages&&e!==this.page&&(this.page=e,this.change.emit({page:e}))}calcPages(e){const n=[];let i=1,s=this.totalPages;e=e||this.page,5<this.totalPages&&(i=e-Math.floor(2.5),s=e+Math.floor(2.5),i<1?(i=1,s=Math.min(i+5-1,this.totalPages)):s>this.totalPages&&(i=Math.max(this.totalPages-5+1,1),s=this.totalPages));for(let c=i;c<=s;c++)n.push({number:c,text:c});return n}}return o.\u0275fac=function(e){return new(e||o)},o.\u0275cmp=t.VBU({type:o,selectors:[["datatable-pager"]],hostAttrs:[1,"datatable-pager"],inputs:{pagerLeftArrowIcon:"pagerLeftArrowIcon",pagerRightArrowIcon:"pagerRightArrowIcon",pagerPreviousIcon:"pagerPreviousIcon",pagerNextIcon:"pagerNextIcon",size:"size",count:"count",page:"page"},outputs:{change:"change"},decls:14,vars:21,consts:[[1,"pager"],["role","button","aria-label","go to first page","href","javascript:void(0)",3,"click"],["role","button","aria-label","go to previous page","href","javascript:void(0)",3,"click"],["role","button","class","pages",3,"active",4,"ngFor","ngForOf"],["role","button","aria-label","go to next page","href","javascript:void(0)",3,"click"],["role","button","aria-label","go to last page","href","javascript:void(0)",3,"click"],["role","button",1,"pages"],["href","javascript:void(0)",3,"click"]],template:function(e,n){1&e&&(t.j41(0,"ul",0)(1,"li")(2,"a",1),t.bIt("click",function(){return n.selectPage(1)}),t.nrm(3,"i"),t.k0s()(),t.j41(4,"li")(5,"a",2),t.bIt("click",function(){return n.prevPage()}),t.nrm(6,"i"),t.k0s()(),t.DNE(7,ut,3,4,"li",3),t.j41(8,"li")(9,"a",4),t.bIt("click",function(){return n.nextPage()}),t.nrm(10,"i"),t.k0s()(),t.j41(11,"li")(12,"a",5),t.bIt("click",function(){return n.selectPage(n.totalPages)}),t.nrm(13,"i"),t.k0s()()()),2&e&&(t.R7$(1),t.AVh("disabled",!n.canPrevious()),t.R7$(2),t.HbH(n.pagerPreviousIcon),t.R7$(1),t.AVh("disabled",!n.canPrevious()),t.R7$(2),t.HbH(n.pagerLeftArrowIcon),t.R7$(1),t.Y8G("ngForOf",n.pages),t.R7$(1),t.AVh("disabled",!n.canNext()),t.R7$(2),t.HbH(n.pagerRightArrowIcon),t.R7$(1),t.AVh("disabled",!n.canNext()),t.R7$(2),t.HbH(n.pagerNextIcon))},dependencies:[h.Sq],encapsulation:2,changeDetection:0}),o})(),hn=(()=>{class o{constructor(){this.selectedCount=0,this.page=new t.bkB}get isVisible(){return this.rowCount/this.pageSize>1}get curPage(){return this.offset+1}}return o.\u0275fac=function(e){return new(e||o)},o.\u0275cmp=t.VBU({type:o,selectors:[["datatable-footer"]],hostAttrs:[1,"datatable-footer"],inputs:{footerHeight:"footerHeight",rowCount:"rowCount",pageSize:"pageSize",offset:"offset",pagerLeftArrowIcon:"pagerLeftArrowIcon",pagerRightArrowIcon:"pagerRightArrowIcon",pagerPreviousIcon:"pagerPreviousIcon",pagerNextIcon:"pagerNextIcon",totalMessage:"totalMessage",footerTemplate:"footerTemplate",selectedCount:"selectedCount",selectedMessage:"selectedMessage"},outputs:{page:"page"},decls:4,vars:8,consts:[[1,"datatable-footer-inner",3,"ngClass"],[4,"ngIf"],["class","page-count",4,"ngIf"],[3,"pagerLeftArrowIcon","pagerRightArrowIcon","pagerPreviousIcon","pagerNextIcon","page","size","count","hidden","change",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"page-count"],[3,"pagerLeftArrowIcon","pagerRightArrowIcon","pagerPreviousIcon","pagerNextIcon","page","size","count","hidden","change"]],template:function(e,n){1&e&&(t.j41(0,"div",0),t.DNE(1,gt,1,8,null,1),t.DNE(2,mt,3,3,"div",2),t.DNE(3,bt,1,8,"datatable-pager",3),t.k0s()),2&e&&(t.xc7("height",n.footerHeight,"px"),t.Y8G("ngClass",t.eq3(6,_t,n.selectedMessage)),t.R7$(1),t.Y8G("ngIf",n.footerTemplate),t.R7$(1),t.Y8G("ngIf",!n.footerTemplate),t.R7$(1),t.Y8G("ngIf",!n.footerTemplate))},dependencies:[un,h.YU,h.bT,h.T3],encapsulation:2,changeDetection:0}),o})(),pn=(()=>{class o{constructor(e,n,i,s,a,l,c){this.scrollbarHelper=e,this.dimensionsHelper=n,this.cd=i,this.columnChangesService=l,this.configuration=c,this.selected=[],this.scrollbarV=!1,this.scrollbarH=!1,this.rowHeight=30,this.columnMode=B.standard,this.headerHeight=30,this.footerHeight=0,this.externalPaging=!1,this.externalSorting=!1,this.loadingIndicator=!1,this.reorderable=!0,this.swapColumns=!0,this.sortType=F.single,this.sorts=[],this.cssClasse
1s={sortAscending:"datatable-icon-up",sortDescending:"datatable-icon-down",sortUnset:"datatable-icon-sort-unset",pagerLeftArrow:"datatable-icon-left",pagerRightArrow:"datatable-icon-right",pagerPrevious:"datatable-icon-prev",pagerNext:"datatable-icon-skip"},this.messages={emptyMessage:"No data to display",totalMessage:"total",selectedMessage:"selected"},this.groupExpansionDefault=!1,this.selectAllRowsOnPage=!1,this.virtualization=!0,this.summaryRow=!1,this.summaryHeight=30,this.summaryPosition="top",this.scroll=new t.bkB,this.activate=new t.bkB,this.select=new t.bkB,this.sort=new t.bkB,this.page=new t.bkB,this.reorder=new t.bkB,this.resize=new t.bkB,this.tableContextmenu=new t.bkB(!1),this.treeAction=new t.bkB,this.rowCount=0,this._offsetX=new xe.t(0),this._count=0,this._offset=0,this._subscriptions=[],this.rowIdentity=d=>this._groupRowsBy?d.key:d,this.element=s.nativeElement,this.rowDiffer=a.find({}).create(),this.configuration&&this.configuration.messages&&(this.messages={...this.configuration.messages})}set rows(e){this._rows=e,e&&(this._internalRows=[...e]),this.externalSorting||this.sortInternalRows(),this._internalRows=$(this._internalRows,R(this.treeFromRelation),R(this.treeToRelation)),this.recalculate(),this._rows&&this._groupRowsBy&&(this.groupedRows=this.groupArrayBy(this._rows,this._groupRowsBy)),this.cd.markForCheck()}get rows(){return this._rows}set groupRowsBy(e){e&&(this._groupRowsBy=e,this._rows&&this._groupRowsBy&&(this.groupedRows=this.groupArrayBy(this._rows,this._groupRowsBy)))}get groupRowsBy(){return this._groupRowsBy}set columns(e){e&&(this._internalColumns=[...e],re(this._internalColumns),this.recalculateColumns()),this._columns=e}get columns(){return this._columns}set limit(e){this._limit=e,this.recalculate()}get limit(){return this._limit}set count(e){this._count=e,this.recalculate()}get count(){return this._count}set offset(e){this._offset=e}get offset(){return Math.max(Math.min(this._offset,Math.ceil(this.rowCount/this.pageSize)-1),0)}get isFixedHeader(){const e=this.headerHeight;return"string"!=typeof e||"auto"!==e}get isFixedRow(){return"auto"!==this.rowHeight}get isVertScroll(){return this.scrollbarV}get isVirtualized(){return this.virtualization}get isHorScroll(){return this.scrollbarH}get isSelectable(){return void 0!==this.selectionType}get isCheckboxSelection(){return this.selectionType===b.checkbox}get isCellSelection(){return this.selectionType===b.cell}get isSingleSelection(){return this.selectionType===b.single}get isMultiSelection(){return this.selectionType===b.multi}get isMultiClickSelection(){return this.selectionType===b.multiClick}set columnTemplates(e){this._columnTemplates=e,this.translateColumns(e)}get columnTemplates(){return this._columnTemplates}get allRowsSelected(){let e=this.rows&&this.selected&&this.selected.length===this.rows.length;if(this.bodyComponent&&this.selectAllRowsOnPage){const n=this.bodyComponent.indexes;e=this.selected.length===n.last-n.first}return this.selected&&this.rows&&0!==this.rows.length&&e}ngOnInit(){this.recalculate()}ngAfterViewInit(){this.externalSorting||this.sortInternalRows(),!(typeof requestAnimationFrame>"u")&&requestAnimationFrame(()=>{this.recalculate(),this.externalPaging&&this.scrollbarV&&this.page.emit({count:this.count,pageSize:this.pageSize,limit:this.limit,offset:0})})}ngAfterContentInit(){this.columnTemplates.changes.subscribe(e=>this.translateColumns(e)),this.listenForColumnInputChanges()}translateColumns(e){if(e){const n=e.toArray();n.length&&(this._internalColumns=function Pt(o){const r=[];for(const e of o){const n={},i=Object.getOwnPropertyNames(e);for(const s of i)n[s]=e[s];e.headerTemplate&&(n.headerTemplate=e.headerTemplate),e.cellTemplate&&(n.cellTemplate=e.cellTemplate),e.summaryFunc&&(n.summaryFunc=e.summaryFunc),e.summaryTemplate&&(n.summaryTemplate=e.summaryTemplate),r.push(n)}return r}(n),re(this._internalColumns),this.recalculateColumns(),this.sortInternalRows(),this.cd.markForCheck())}}groupArrayBy(e,n){const i=new Map;return e.forEach(l=>{const c=l[n];i.has(c)?i.get(c).push(l):i.set(c,[l])}),Array.from(i,l=>((l,c)=>({key:l,value:c}))(l[0],l[1]))}ngDoCheck(){this.rowDiffer.diff(this.rows)&&(this.externalSorting?this._internalRows=[...this.rows]:this.sortInternalRows(),this._internalRows=$(this._internalRows,R(this.treeFromRelation),R(this.treeToRelation)),this.recalculatePages(),this.cd.markForCheck())}recalculate(){this.recalculateDims(),this.recalculateColumns(),this.cd.markForCheck()}onWindowResize(){this.recalculate()}recalculateColumns(e=this._internalColumns,n=-1,i=this.scrollbarH){if(!e)return;let s=this._innerWidth;return this.scrollbarV&&(s-=this.scrollbarHelper.width),this.columnMode===B.force?function cn(o,r,e,n,i=300){const s=o.slice(e+1,o.length).filter(p=>!1!==p.canAutoResize);for(const p of s)p.$$oldWidth||(p.$$oldWidth=p.width);
1let a=0,l=!1,c=me(o,i),d=r-c;const g=[];do{a=d/s.length,l=c>=r;for(const p of s){if(l&&n)p.width=p.$$oldWidth||p.width||i;else{const _=(p.width||i)+a;p.minWidth&&_<p.minWidth?(p.width=p.minWidth,g.push(p)):p.maxWidth&&_>p.maxWidth?(p.width=p.maxWidth,g.push(p)):p.width=_}p.width=Math.max(0,p.width)}c=me(o),d=r-c,dn(s,g)}while(d>1&&0!==s.length)}(e,s,n,i):this.columnMode===B.flex&&function an(o,r){const e=function Wt(o,r){let e=0;for(const n of o)e+=r&&n[r]?n[r]:n.width;return e}(o),n=function rn(o){let r=0;for(const e of o)r+=e.flexGrow||0;return r}(o),i=x(o);e!==r&&function ln(o,r,e){for(const s in o)for(const a of o[s])a.canAutoResize?a.width=0:(r-=a.width,e-=a.flexGrow?a.flexGrow:0);const n={};let i=r;do{const s=i/e;i=0;for(const a in o)for(const l of o[a])if(l.canAutoResize&&!n[l.prop]){const c=l.width+l.flexGrow*s;void 0!==l.minWidth&&c<l.minWidth?(i+=c-l.minWidth,l.width=l.minWidth,n[l.prop]=!0):l.width=c}}while(0!==i)}(i,r,n)}(e,s),e}recalculateDims(){const e=this.dimensionsHelper.getDimensions(this.element);if(this._innerWidth=Math.floor(e.width),this.scrollbarV){let n=e.height;this.headerHeight&&(n-=this.headerHeight),this.footerHeight&&(n-=this.footerHeight),this.bodyHeight=n}this.recalculatePages()}recalculatePages(){this.pageSize=this.calcPageSize(),this.rowCount=this.calcRowCount()}onBodyPage({offset:e}){this.externalPaging&&!this.virtualization||(this.offset=e,this.page.emit({count:this.count,pageSize:this.pageSize,limit:this.limit,offset:this.offset}))}onBodyScroll(e){this._offsetX.next(e.offsetX),this.scroll.emit(e),this.cd.detectChanges()}onFooterPage(e){this.offset=e.page-1,this.bodyComponent.updateOffsetY(this.offset),this.page.emit({count:this.count,pageSize:this.pageSize,limit:this.limit,offset:this.offset}),this.selectAllRowsOnPage&&(this.selected=[],this.select.emit({selected:this.selected}))}calcPageSize(e=this.rows){if(this.scrollbarV&&this.virtualization){const n=Math.ceil(this.bodyHeight/this.rowHeight);return Math.max(n,0)}return void 0!==this.limit?this.limit:e?e.length:0}calcRowCount(e=this.rows){return this.externalPaging?this.count:e?this.groupedRows?this.groupedRows.length:null!=this.treeFromRelation&&null!=this.treeToRelation?this._internalRows.length:e.length:0}onColumnContextmenu({event:e,column:n}){this.tableContextmenu.emit({event:e,type:V.header,content:n})}onRowContextmenu({event:e,row:n}){this.tableContextmenu.emit({event:e,type:V.body,content:n})}onColumnResize({column:e,newValue:n}){if(void 0===e)return;let i;const s=this._internalColumns.map((a,l)=>((a={...a}).$$id===e.$$id&&(i=l,a.width=n,a.$$oldWidth=n),a));this.recalculateColumns(s,i),this._internalColumns=s,this.resize.emit({column:e,newValue:n})}onColumnReorder({column:e,newValue:n,prevValue:i}){const s=this._internalColumns.map(a=>({...a}));if(this.swapColumns){const a=s[n];s[n]=e,s[i]=a}else if(n>i){const a=s[i];for(let l=i;l<n;l++)s[l]=s[l+1];s[n]=a}else{const a=s[i];for(let l=i;l>n;l--)s[l]=s[l-1];s[n]=a}this._internalColumns=s,this.reorder.emit({column:e,newValue:n,prevValue:i})}onColumnSort(e){this.selectAllRowsOnPage&&(this.selected=[],this.select.emit({selected:this.selected})),this.sorts=e.sorts,!1===this.externalSorting&&this.sortInternalRows(),this._internalRows=$(this._internalRows,R(this.treeFromRelation),R(this.treeToRelation)),this.offset=0,this.bodyComponent.updateOffsetY(this.offset),this.sort.emit(e)}onHeaderSelect(e){if(this.bodyComponent&&this.selectAllRowsOnPage){const n=this.bodyComponent.indexes.first,
1i=this.bodyComponent.indexes.last,s=this.selected.length===i-n;this.selected=[],s||this.selected.push(...this._internalRows.slice(n,i))}else{const n=this.selected.length===this.rows.length;this.selected=[],n||this.selected.push(...this.rows)}this.select.emit({selected:this.selected})}onBodySelect(e){this.select.emit(e)}onTreeAction(e){const n=e.row,i=this._rows.findIndex(s=>s[this.treeToRelation]===e.row[this.treeToRelation]);this.treeAction.emit({row:n,rowIndex:i})}ngOnDestroy(){this._subscriptions.forEach(e=>e.unsubscribe())}listenForColumnInputChanges(){this._subscriptions.push(this.columnChangesService.columnInputChanges$.subscribe(()=>{this.columnTemplates&&this.columnTemplates.notifyOnChanges()}))}sortInternalRows(){this._internalRows=function tn(o,r,e){if(!o)return[];if(!e||!e.length||!r)return[...o];const n=new Map;o.forEach((l,c)=>n.set(l,c));const i=[...o],s=r.reduce((l,c)=>(c.comparator&&"function"==typeof c.comparator&&(l[c.prop]=c.comparator),l),{}),a=e.map(l=>{const c=l.prop;return{prop:c,dir:l.dir,valueGetter:A(c),compareFn:s[c]||en}});return i.sort(function(l,c){for(const d of a){const{prop:g,valueGetter:w}=d,p=w(l,g),_=w(c,g),T=d.dir!==m.desc?d.compareFn(p,_,l,c,d.dir):-d.compareFn(p,_,l,c,d.dir);if(0!==T)return T}return n.has(l)&&n.has(c)?n.get(l)<n.get(c)?-1:1:0})}(this._internalRows,this._internalColumns,this.sorts)}}return o.\u0275fac=function(e){return new(e||o)(t.rXU(z,4),t.rXU(ne,4),t.rXU(t.gRc),t.rXU(t.aKT),t.rXU(t.MKu),t.rXU(W),t.rXU("configuration",8))},o.\u0275cmp=t.VBU({type:o,selectors:[["ngx-datatable"]],contentQueries:function(e,n,i){if(1&e&&(t.wni(i,Xt,5),t.wni(i,kt,5),t.wni(i,zt,5),t.wni(i,ce,4)),2&e){let s;t.mGM(s=t.lsd())&&(n.rowDetail=s.first),t.mGM(s=t.lsd())&&(n.groupHeader=s.first),t.mGM(s=t.lsd())&&(n.footer=s.first),t.mGM(s=t.lsd())&&(n.columnTemplates=s)}},viewQuery:function(e,n){if(1&e&&(t.GBs(ge,5),t.GBs(fe,5)),2&e){let i;t.mGM(i=t.lsd())&&(n.bodyComponent=i.first),t.mGM(i=t.lsd())&&(n.headerComponent=i.first)}},hostAttrs:[1,"ngx-datatable"],hostVars:22,hostBindings:function(e,n){1&e&&t.bIt("resize",function(){return n.onWindowResize()},!1,t.tSv),2&e&&t.AVh("fixed-header",n.isFixedHeader)("fixed-row",n.isFixedRow)("scroll-vertical",n.isVertScroll)("virtualized",n.isVirtualized)("scroll-horz",n.isHorScroll)("selectable",n.isSelectable)("checkbox-selection",n.isCheckboxSelection)("cell-selection",n.isCellSelection)("single-selection",n.isSingleSelection)("multi-selection",n.isMultiSelection)("multi-click-selection",n.isMultiClickSelection)},inputs:{targetMarkerTemplate:"targetMarkerTemplate",rows:"rows",groupRowsBy:"groupRowsBy",groupedRows:"groupedRows",columns:"columns",selected:"selected",scrollbarV:"scrollbarV",scrollbarH:"scrollbarH",rowHeight:"rowHeight",columnMode:"columnMode",headerHeight:"headerHeight",footerHeight:"footerHeight",externalPaging:"externalPaging",externalSorting:"externalSorting",limit:"limit",count:"count",offset:"offset",loadingIndicator:"loadingIndicator",selectionType:"selectionType",reorderable:"reorderable",swapColumns:"swapColumns",sortType:"sortType",sorts:"sorts",cssClasses:"cssClasse
1s",messages:"messages",rowClass:"rowClass",selectCheck:"selectCheck",displayCheck:"displayCheck",groupExpansionDefault:"groupExpansionDefault",trackByProp:"trackByProp",selectAllRowsOnPage:"selectAllRowsOnPage",virtualization:"virtualization",treeFromRelation:"treeFromRelation",treeToRelation:"treeToRelation",summaryRow:"summaryRow",summaryHeight:"summaryHeight",summaryPosition:"summaryPosition",rowIdentity:"rowIdentity"},outputs:{scroll:"scroll",activate:"activate",select:"select",sort:"sort",page:"page",reorder:"reorder",resize:"resize",tableContextmenu:"tableContextmenu",treeAction:"treeAction"},decls:5,vars:34,consts:[["role","table","visibilityObserver","",3,"visible"],["role","rowgroup",3,"sorts","sortType","scrollbarH","innerWidth","offsetX","dealsWithGroup","columns","headerHeight","reorderable","targetMarkerTemplate","sortAscendingIcon","sortDescendingIcon","sortUnsetIcon","allRowsSelected","selectionType","sort","resize","reorder","select","columnContextmenu",4,"ngIf"],["role","rowgroup",3,"groupRowsBy","groupedRows","rows","groupExpansionDefault","scrollbarV","scrollbarH","virtualization","loadingIndicator","externalPaging","rowHeight","rowCount","offset","trackByProp","columns","pageSize","offsetX","rowDetail","groupHeader","selected","innerWidth","bodyHeight","selectionType","emptyMessage","rowIdentity","rowClass","selectCheck","displayCheck","summaryRow","summaryHeight","summaryPosition","page","activate","rowContextmenu","select","scroll","treeAction"],[3,"rowCount","pageSize","offset","footerHeight","footerTemplate","totalMessage","pagerLeftArrowIcon","pagerRightArrowIcon","pagerPreviousIcon","selectedCount","selectedMessage","pagerNextIcon","page",4,"ngIf"],["role","rowgroup",3,"sorts","sortType","scrollbarH","innerWidth","offsetX","dealsWithGroup","columns","headerHeight","reorderable","targetMarkerTemplate","sortAscendingIcon","sortDescendingIcon","sortUnsetIcon","allRowsSelected","selectionType","sort","resize","reorder","select","columnContextmenu"],[3,"rowCount","pageSize","offset","footerHeight","footerTemplate","totalMessage","pagerLeftArrowIcon","pagerRightArrowIcon","pagerPreviousIcon","selectedCount","selectedMessage","pagerNextIcon","page"]],template:function(e,n){1&e&&(t.j41(0,"div",0),t.bIt("visible",function(){return n.recalculate()}),t.DNE(1,wt,2,17,"datatable-header",1),t.j41(2,"datatable-body",2),t.bIt("page",function(s){return n.onBodyPage(s)})("activate",function(s){return n.activate.emit(s)})("rowContextmenu",function(s){return n.onRowContextmenu(s)})("select",function(s){return n.onBodySelect(s)})("scroll",function(s){return n.onBodyScroll(s)})("treeAction",function(s){return n.onTreeAction(s)}),t.nI1(3,"async"),t.k0s(),t.DNE(4,Ct,1,12,"datatable-footer",3),t.k0s()),2&e&&(t.R7$(1),t.Y8G("ngIf",n.headerHeight),t.R7$(1),t.Y8G("groupRowsBy",n.groupRowsBy)("groupedRows",n.groupedRows)("rows",n._internalRows)("groupExpansionDefault",n.groupExpansionDefault)("scrollbarV",n.scrollbarV)("scrollbarH",n.scrollbarH)("virtualization",n.virtualization)("loadingIndicator",n.loadingIndicator)("externalPaging",n.externalPaging)("rowHeight",n.rowHeight)("rowCount",n.rowCount)("offset",n.offset)("trackByProp",n.trackByProp)("columns",n._internalColumns)("pageSize",n.pageSize)("offsetX",t.bMT(3,32,n._offsetX))("rowDetail",n.rowDetail)("groupHeader",n.groupHeader)("selected",n.selected)("innerWidth",n._innerWidth)("bodyHeight",n.bodyHeight)("selectionType",n.selectionType)("emptyMessage",n.messages.emptyMessage)("rowIdentity",n.rowIdentity)("rowClass",n.rowClass)("selectCheck",n.selectCheck)("displayCheck",n.displayCheck)("summaryRow",n.summaryRow)("summaryHeight",n.summaryHeight)("summaryPosition",n.summaryPosition),t.R7$(2),t.Y8G("ngIf",n.footerHeight))},dependencies:[fe,ge,hn,vt,h.bT,h.Jj],styles:[".ngx-datatable{display:block;overflow:hidden;justify-content:center;position:relative;transform:translate(0)}.ngx-datatable [hidden]{display:none!important}.ngx-datatable *,.ngx-datatable *:before,.ngx-datatable *:after{box-sizing:border-box}.ngx-datatable.scroll-vertical .datatable-body{overflow-y:auto}.ngx-datatable.scroll-vertical.virtualized .datatable-body .datatable-row-wrapper{position:absolute}.ngx-datatable.scroll-horz .datatable-body{overflow-x:auto;-webkit-overflow-scrolling:touch}.ngx-datatable.fixed-header .datatable-header .datatable-header-inner{white-space:nowrap}.ngx-datatable.fixed-header .datatable-header .datatable-header-inner .datatable-header-cell{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ngx-datatable.fixed-row .datatable-scroll,.ngx-datatable.fixed-row .datatable-scroll .datatable-body-row{white-space:nowrap}.ngx-datatable.fixed-row .datatable-scroll .datatable-body-row .datatable-body-cell,.ngx-datatable.fixed-row .datatable-scroll .datatable-body-row .datatable-body-group-cell{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ngx-datatable .datatable-body-row,.ngx-datatable .datatable-row-center,.ngx-datatable .datatable-header-inner{display:flex;flex-direction:row;-o-flex-flow:row;flex-flow:row}.ngx-datatable .datatable-body-cell,.ngx-datatable .datatable-header-cell{overflow-x:hidden;vertical-align:top;display:inline-block;line-height:1.625}.ngx-datatable .datatable-body-cell:focus,.ngx-datatable .datatable-header-cell:focus{outline:none}.ngx-datatable .datatable-row-left,.ngx-datatable .datatable-row-right{z-index:9}.ngx-datatable .datatable-row-left,.ngx-datatable .datatable-row-center,.ngx-datatable .datatable-row-group,.ngx-datatable .datatable-row-right{position:relative}.ngx-datatable .datatable-header{display:block;overflow:hidden}.ngx-datatable .datatable-header .datatable-header-inner{align-items:stretch;-webkit-align-items:stretch}.ngx-datatable .datatable-header .datatable-header-cell{position:relative;display:inline-block}.ngx-datatable .datatable-header .datatable-header-cell.sortable .datatable-header-cell-wrapper{cursor:pointer}.ngx-datatable .datatable-header .datatable-header-cell.longpress .datatable-header-cell-wrapper{cursor:move}.ngx-datatable .datatable-header .datatable-header-cell .sort-btn{line-height:100%;vertical-align:middle;display:inline-block;cursor:pointer}.ngx-datatable .datatable-header .datatable-header-cell .resize-handle,.ngx-datatable .datatable-header .datatable-header-cell .resize-handle--not-resizable{display:inline-block;position:absolute;right:0;top:0;bottom:0;width:5px;padding:0 4px;visibility:hidden}.ngx-datatable .datatable-header .datatable-header-cell .resize-handle{cursor:ew-resize}.ngx-datatable .datatable-header .datatable-header-cell.resizeable:hover .resize-handle,.ngx-datatable .datatable-header .datatable-header-cell:hover .resize-handle--not-resizable{visibility:visible}.ngx-datatable .datatable-header .datatable-header-cell .targetMarker{position:absolute;top:0;bottom:0}.ngx-datatable .datatable-header .datatable-header-cell .targetMarker.dragFromLeft{right:0}.ngx-datatable .datatable-header .datatable-header-cell .targetMarker.dragFromRight{left:0}.ngx-datatable .datatable-header .datatable-header-cell .datatable-header-cell-template-wrap{height:inherit}.ngx-datatable .datatable-body{position:relative;z-index:10;display:block}.ngx-datatable .datatable-body .datatable-scroll{display:inline-block}.ngx-datatable .datatable-body .datatable-row-detail{overflow-y:hidden}.ngx-datatable .datatable-body .datatable-row-wrapper{display:flex;flex-direction:column}.ngx-datatable .datatable-body .datatable-body-row{outline:none}.ngx-datatable .datatable-body .datatable-body-row>div{display:flex}.ngx-datatable .datatable-footer{display:block;width:100%;overflow:auto}.ngx-datatable .datatable-footer .datatable-footer-inner{display:flex;align-items:center;width:100%}.ngx-datatable .datatable-footer .selected-count .page-count{flex:1 1 40%}.ngx-datatable .datatable-footer .selected-count .datatable-pager{flex:1 1 60%}.ngx-datatable .datatable-footer .page-count{flex:1 1 20%}.ngx-datatable .datatable-footer .datatable-pager{flex:1 1 80%;text-align:right}.ngx-datatable .datatable-footer .datatable-pager .pager,.ngx-datatable .datatable-footer .datatable-pager .pager li{padding:0;margin:0;display:inline-block;list-style:none}.ngx-datatable .datatable-footer .datatable-pager .pager li,.ngx-datatable .datatable-footer .datatable-pager .pager li a{outline:none}.ngx-datatable .datatable-footer .datatable-pager .pager li a{cursor:pointer;display:inline-block}.ngx-datatable .datatable-footer .datatable-pager .pager li.disabled a{curs
1or:not-allowed}\n"],encapsulation:2,changeDetection:0}),(0,Te.Cg)([sn(5)],o.prototype,"onWindowResize",null),o})(),gn=(()=>{class o{static forRoot(e){return{ngModule:o,providers:[{provide:"configuration",useValue:e}]}}}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=t.$C({type:o}),o.\u0275inj=t.G2t({providers:[z,ne,W],imports:[[h.MD]]}),o})();typeof document<"u"&&!document.elementsFromPoint&&(document.elementsFromPoint=function mn(o,r){const e=[],n=[];let i,s,a;for(;(i=document.elementFromPoint(o,r))&&-1===e.indexOf(i)&&null!=i;)e.push(i),n.push({value:i.style.getPropertyValue("pointer-events"),priority:i.style.getPropertyPriority("pointer-events")}),i.style.setProperty("pointer-events","none","important");for(s=n.length;a=n[--s];)e[s].style.setProperty("pointer-events",a.value?a.value:"",a.priority);return e});var bn=u(75155),v=u(51188),_n=u(99887),wn=u(45312),Y=u(84106),Cn=u(67376),U=u(7673),be=u(96354),k=u(25558),yn=u(70152),Q=u(88141),vn=u(18696),xn=u(97586),_e=u(74854);class Tn{constructor(r){this.logged=!1,Object.assign(this,r)}}var Dn=u(21626);let K=(()=>{class o{constructor(e){this.http=e}get(e){return this.http.get("adm/customers_offline",e).pipe((0,be.T)(n=>(n.data=n.data.map(i=>new Tn(i)),new H.lr(n))))}disconnect(e,n){return this.http.put(`adm/authentications/${e.id}/disconnect`,n)}getServers(){return this.http.get("adm/customers_offline/servers")}getServerId(e){return this.http.get(`adm/customers_offline/servers/${e}`)}getTags(e){return this.http.get("adm/tags",e)}getHuaweiConnections(e){return this.http.get(`adm/customers_offline/servers/${e.id}/connections`)}static{this.\u0275fac=function(n){return new(n||o)(t.KVO(Dn.Qq))}}static{this.\u0275prov=t.jDH({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();var we=u(17996),Ce=u(85956);function Rn(o,r){if(1&o){const e=t.RV6();t.j41(0,"div",13)(1,"input",14),t.bIt("change",function(i){const a=t.eBV(e).$implicit,l=t.XpG();return t.Njj(l.changeTag(i,a))}),t.k0s(),t.j41(2,"label",15),t.EFF(3),t.k0s()()}if(2&o){const e=r.$implicit,n=t.XpG();t.R7$(1),t.Mz_("id","op-",e.id,""),t.Y8G("checked",n.isChecked(e.id))("value",e.id),t.R7$(1),t.Mz_("for","op-",e.id,""),t.R7$(1),t.JRh(e.name)}}let kn=(()=>{class o{constructor(e,n,i){this.matDialogRef=e,this.customerOfflineService=n,this.auxRouter=i,this.filterTag=[];const s=this.auxRouter.activatedRoute.snapshot.queryParams.tags_id;if(s){const a=Array.isArray(s)?s:[s];this.filterTag=a.map(l=>({id:Number(l)}))}}ngOnInit(){this.customerOfflineService.getTags({params:{model:"authentications"}}).subscribe(e=>this.tags=e)}isChecked(e){return this.filterTag.some(n=>n.id===e)}changeTag(e,n){if(e.target.checked)this.isChecked(n.id)||this.filterTag.push(n);else{const i=this.filterTag.findIndex(s=>s.id===n.id);i>-1&&this.filterTag.splice(i,1)}}clean(){this.auxRouter.queryParams({tags_id:null}),this.matDialogRef.close()}submit(){const e=this.filterTag.map(n=>n.id);this.auxRouter.queryParams({tags_id:e.length?e:null}),this.matDialogRef.close()}static{this.\u0275fac=function(n){return new(n||o)(t.rXU(_e.RN),t.rXU(K),t.rXU(we.g))}}static{this.\u0275cmp=t.VBU({type:o,selectors:[["app-customer-offline-search"]],decls:20,vars:1,consts:[[1,"modal-header"],[1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"form-group"],[1,"block"],["class","custom-control custom-checkbox mb-2",4,"ngFor","ngForOf"],[1,"modal-footer","d-flex"],["mat-button","","type","button",1,"mr-auto",3,"click"],[1,"mbri-close"],["mat-button","","color","primary",3,"click"],[1,"mbri-success"],[1,"custom-control","custom-checkbox","mb-2"],["type","checkbox","name","tag",1,"custom-control-input",3,"checked","value","id","change"],[1,"custom-control-label",3,"for"]],template:function(n,i){1&n&&(t.j41(0,"div",0)(1,"h4",1),t.EFF(2,"Filtros"),t.k0s(),t.j41(3,"button",2),t.bIt("click",function(){return i.matDialogRef.close()}),t.j41(4,"span",3),t.EFF(5,"\xd7"),t.k0s()()(),t.j41(6,"div",4)(7,"form")(8,"div",5)(9,"label"),t.EFF(10,"Tags"),t.k0s(),t.j41(11,"div",6),t.DNE(12,Rn,4,5,"div",7),t.k0s()()()(),t.j41(13,"div",8)(14,"button",9),t.bIt("click",function(){return i.clean()}),t.nrm(15,"i",10),t.EFF(16," Limpar "),t.k0s(),t.j41(17,"button",11),t.bIt("click",function(){return i.submit()}),t.nrm(18,"i",12),t.EFF(19," Filtrar "),t.k0s()()),2&n&&(t.R7$(12),t.Y8G("ngForOf",i.tags))},dependencies:[h.Sq,C.qT,C.cb,C.cV,Ce.iV],encapsulation:2})}}return o}
1)();var ye=u(23294),In=u(57918),Sn=u(36617),Hn=u(42042);const Bn=function(){return[]};function Fn(o,r){if(1&o){const e=t.RV6();t.j41(0,"div",15),t.nrm(1,"span",16),t.j41(2,"button",17),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.changeFilterLogged(null))}),t.EFF(3),t.k0s(),t.j41(4,"button",18),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.changeFilterLogged(!0))}),t.EFF(5),t.k0s(),t.j41(6,"button",19),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.changeFilterLogged(!1))}),t.EFF(7),t.k0s()()}if(2&o){const e=t.XpG();t.R7$(2),t.AVh("active",null==e.filterLogged),t.R7$(1),t.SpI("",((null==e.laravel?null:e.laravel.data)||t.lJ4(9,Bn)).length," todos "),t.R7$(1),t.AVh("active",1==e.filterLogged),t.R7$(1),t.SpI("",e.on||0," online "),t.R7$(1),t.AVh("active",0==e.filterLogged),t.R7$(1),t.SpI("",e.off||0," offline ")}}function Gn(o,r){}function Pn(o,r){if(1&o){const e=t.RV6();t.j41(0,"div",20),t.bIt("click",function(){const s=t.eBV(e).row,a=t.XpG();return t.Njj(a.disconnect(s))}),t.k0s()}2&o&&t.Y8G("ngClass",r.row.logged?"on":"off")}function Mn(o,r){if(1&o){const e=t.RV6();t.j41(0,"div",26),t.bIt("click",function(){t.eBV(e);const i=t.XpG().row,s=t.XpG(2);return t.Njj(s.openCustomerModal(i.customer))}),t.nrm(1,"i",27),t.EFF(2),t.k0s()}if(2&o){const e=t.XpG().value;t.R7$(2),t.SpI(" ",e," ")}}function En(o,r){if(1&o&&(t.j41(0,"div")(1,"a",28),t.EFF(2),t.k0s()()),2&o){const e=t.XpG().row;t.R7$(1),t.Y8G("href","http://"+e.address,t.B4B),t.R7$(1),t.JRh(e.address)}}function Xn(o,r){if(1&o&&(t.qex(0),t.j41(1,"span",31),t.EFF(2),t.nI1(3,"number"),t.k0s(),t.bVm()),2&o){const e=r.ngIf,n=t.XpG(4);t.R7$(1),t.FCK("matTooltip","ONU ",e.index,"",e.serial?" - "+e.serial:"",""),t.Y8G("ngClass",n.signalClass(e)),t.R7$(1),t.SpI(" ",e.online?null!=e.rx_dbm?t.i5U(3,4,e.rx_dbm,"1.1-1")+" dBm":"on":"offline"," ")}}function zn(o,r){if(1&o&&(t.j41(0,"div")(1,"span",29),t.nI1(2,"timeAgoMk"),t.EFF(3),t.k0s(),t.DNE(4,Xn,4,7,"ng-container",30),t.k0s()),2&o){const e=t.XpG().row,n=t.XpG(2);t.R7$(1),t.FS9("matTooltip",t.bMT(2,3,e.uptime)),t.R7$(2),t.JRh(e.uptime),t.R7$(1),t.Y8G("ngIf",n.onuFor(e))}}function Wn(o,r){if(1&o){const e=t.RV6();t.j41(0,"div")(1,"span",26),t.bIt("click",function(){t.eBV(e);const i=t.XpG().row,s=t.XpG(2);return t.Njj(s.openCustomerModal(i.customer))}),t.nrm(2,"i",27),t.EFF(3),t.k0s()()}if(2&o){const e=t.XpG().value;t.R7$(3),t.SpI(" ",e," ")}}function An(o,r){if(1&o&&(t.j41(0,"div"),t.EFF(1),t.k0s()),2&o){const e=t.XpG().value;t.R7$(1),t.JRh(e)}}function $n(o,r){if(1&o&&(t.j41(0,"div",22),t.DNE(1,Mn,3,1,"div",23),t.DNE(2,En,3,2,"div",24),t.DNE(3,zn,5,5,"div",24),t.DNE(4,Wn,4,1,"div",24),t.DNE(5,An,2,1,"div",25),t.k0s()),2&o){const e=t.XpG().$implicit;t.Y8G("ngSwitch",e.prop),t.R7$(1),t.Y8G("ngSwitchCase","customer.name"),t.R7$(1),t.Y8G("ngSwitchCase","addressconvert"),t.R7$(1),t.Y8G("ngSwitchCase","uptimeconvert"),t.R7$(1),t.Y8G("ngSwitchCase","customer.name")}}function On(o,r){if(1&o&&(t.j41(0,"ngx-datatable-column",21),t.DNE(1,$n,6,5,"ng-template",13),t.k0s()),2&o){const e=r.$implicit;t.Y8G("name",e.name)("prop",e.prop)("width",e.width)}}let Vn=(()=>{class o{constructor(e,n,i,s,a,l,c,d){this.auxRouter=e,this.customerOfflineService=n,this.activatedRoute=i,this.router=s,this.ngbModal=a,this.matDialog=l,this.snackBar=c,this.metricsWs=d,this.laravel=new H.lr,this.data=new te.B,this.onuSignals=new Map,this.activeByLogin=new Map,this.searcheable$=new C.hs,this.filterTag=[],this.displayedColumns=[{prop:"customer.name",name:"cliente",width:360},{prop:"login",name:"login",width:180},{prop:"kind_authentication",name:"autentica\xe7\xe3o",width:150},{prop:"uptimeconvert",name:"uptime",width:160},{prop:"addressconvert",name:"ip",width:180}],this.activeKey=g=>this.loginExact(g),this.searcheable$.setValue(this.activatedRoute.snapshot.queryParams.search)}ngOnInit(){this.activatedRoute.params.pipe((0,be.T)(e=>e.id),(0,ye.F)(),(0,k.n)(e=>e?(this.teardownRealtime(),this.server={id:e},this.activatedRoute.queryParams.pipe((0,k.n)(n=>(this.server&&this.server.hash?(0,U.of)(this.server):this.customerOfflineService.getServerId(e)).pipe((0,k.n)(s=>{(!this.server.hash||this.server.hash!==s.hash)&&(this.server=s,this.connectionWsIo());const a={...n,server_id:e};return this.customerOfflineService.get({params:a})}))))):(0,U.of)(null))).subscribe(e=>{e&&(this.laravel=e,this.emitRows())}),this.searcheable$.valueChanges.pipe((0,yn.B)(600),(0,ye.F)()).subscribe(e=>{this.auxRouter.queryParams({search:e||null,page:1})})}openFilter(){this.matDialog.open(kn,{...Y.Qs,width:"400px"})}open(e){this.customerOfflineService.getTags({params:{model:"authentications"}}).subscribe(n=>this.tags=n),this.ngbModal.open(e).result.then(n=>{"clean"===n&&(this.filterTag=[],this.auxRouter.queryParams({tags_id:null}),this.loadCustomersFilter().subscribe())})}
1openCustomerModal(e){this.matDialog.open(_n.R,{...Y._h,data:e})}loadServer(e){return this.customerOfflineService.getServerId(e).pipe((0,Q.M)(n=>this.server=n),(0,k.n)(()=>this.loadCustomersOffline(e)))}loadCustomersOffline(e){return this.customerOfflineService.get({params:{server_id:e}}).pipe((0,Q.M)(n=>{this.laravel=n,this.emitRows(),this.connectionWsIo()}),(0,k.n)(()=>{const n=this.searcheable$.value;return null!=n&&""!==String(n).trim()?this.loadCustomersFilter({search:n}):(0,U.of)(null)}))}loadCustomersFilter(e){return(e=Object.assign({},this.activatedRoute.snapshot.queryParams,e)).server_id=this.server?.id,this.customerOfflineService.get({params:e}).pipe((0,Q.M)(i=>{this.laravel=i,this.emitRows()}))}connectionWsIo(){"huawei"===(this.connectOnuSignals(),String(this.server.vendor||"").toLowerCase())?this.connectPppoeSessions():(this.socketIo&&(this.socketIo.close(),this.socketIo=null),this.socketIo=(0,vn.io)(`${wn.c.hostWsio}/active_connections`,{transports:["websocket"],forceNew:!0,query:{server_hash:this.server.hash}}),this.socketIo.on("update",e=>{const n=new Map;this.activeKey=i=>this.loginExact(i),(e||[]).forEach(i=>{n.set(this.loginExact(i.name),{...i,logged:!0,uptimeconvert:this.uptime(i.uptime),addressconvert:this.ipSort(i.address)})}),this.activeByLogin=n,this.emitRows()}))}loginExact(e){return String(e||"").trim()}loginWithoutDomain(e){const n=this.loginExact(e),i=n.lastIndexOf("@");return i>0?n.slice(0,i):n}changeFilterLogged(e){this.filterLogged=e,this.emitRows()}ipSort(e){return String(e||"").split(".").map(n=>n.padStart(3,"0")).join("")}emitRows(){if(!this.laravel)return;let e=(0,Cn.cloneDeep)(this.laravel.data);e.forEach(n=>{const i=this.activeByLogin.get(this.activeKey(n.login));i&&Object.assign(n,i)}),this.on=e.filter(n=>n.logged).length,this.off=e.filter(n=>0==n.logged).length,1==this.filterLogged?e=e.filter(n=>n.logged):0==this.filterLogged&&(e=e.filter(n=>!n.logged)),this.data.next([...e])}connectOnuSignals(){this.onuChannel||!this.server.hash||(this.subscribedOnuHash=this.server.hash,this.onuChannel=this.metricsWs.subscribeOnuSignals(this.server.hash),this.onuChannel.bind("update",e=>this.mergeOnuSignals(e)))}mergeOnuSignals(e){(e&&e.onus||[]).forEach(n=>{n.authentication_id&&this.onuSignals.set(n.authentication_id,n)}),this.emitRows()}onuFor(e){return this.onuSignals.get(e.id)}signalClass(e){return e&&e.online&&null!=e.rx_dbm?e.rx_dbm>-25?"text-success":e.rx_dbm>=-28?"text-warning":"text-danger":"text-muted"}connectPppoeSessions(){this.pppoeChannel||!this.server.hash||(this.subscribedPppoeHash=this.server.hash,this.pppoeChannel=this.metricsWs.subscribePppoeSessions(this.server.hash),this.pppoeChannel.bind("update",e=>this.mergePppoeSessions(e)))}mergePppoeSessions(e){const n=new Map;this.activeKey=i=>this.loginWithoutDomain(i),(e&&e.sessions||[]).forEach(i=>{const s=null!=i.uptime_s;n.set(this.loginWithoutDomain(i.login),{...i,logged:!0,uptime:s?xn().subtract(i.uptime_s,"seconds").fromNow():"\u2014",address:i.ip,uptimeconvert:s?i.uptime_s:-1,addressconvert:this.ipSort(i.ip)})}),this.activeByLogin=n,this.emitRows()}disconnect(e){e.logged&&this.snackBar.open("confirmar - reiniciar conex\xe3o?","sim",Y.Wm).onAction().pipe((0,k.n)(()=>this.customerOfflineService.disconnect(e))).subscribe()}ngOnDestroy(){this.teardownRealtime()}teardownRealtime(){this.socketIo&&(this.socketIo.close(),this.socketIo=null),this.subscribedOnuHash&&(this.metricsWs.unsubscribeOnuSignals(this.subscribedOnuHash),this.subscribedOnuHash=null),this.subscribedPppoeHash&&(this.metricsWs.unsubscribePppoeSessions(this.subscribedPppoeHash),this.subscribedPppoeHash=null),this.onuChannel=null,this.pppoeChannel=null,this.onuSignals.clear(),this.activeByLogin.clear(),this.activeKey=e=>this.loginExact(e),this.laravel=null,this.data.next([]),this.on=0,this.off=0}changeTag(e,n){let i=this.filterTag.findIndex(s=>s.id==n.id);i>=0?this.filterTag.splice(i,1):this.filterTag.push(n),this.auxRouter.queryParams({tags_id:this.filterTag.map(s=>s.id)}),this.loadCustomersFilter().subscribe()}isChecked(e){return!!this.filterTag.find(n=>n.id==e)}uptime(e){if("string"!=typeof e||""===e.trim())return null;if(e.match(/[:]/))return e;const n=e.split(/(w|d|h|m|s)/),i=n.filter((c,d)=>d%2),s=n.filter((c,d)=>c&&!(d%2)),a={w:604800,d:86400,h:3600,m:60,s:1},l=i.map((c,d)=>
1a[c]?+s[d]*a[c]:NaN).filter(c=>!isNaN(c));return l.length?l.reduce((c,d)=>c+d,0):null}static{this.\u0275fac=function(n){return new(n||o)(t.rXU(we.g),t.rXU(K),t.rXU(v.nX),t.rXU(v.Ix),t.rXU(ee.Bq),t.rXU(_e.ef),t.rXU(Z.nf),t.rXU(In.Bn))}}static{this.\u0275cmp=t.VBU({type:o,selectors:[["app-customer-offline-list-detail"]],decls:19,vars:16,consts:[[1,"card","mb-4"],[1,"card-body","p-2"],[1,"row"],[1,"col-md-8"],[1,"input-group"],["type","text","placeholder","Pesquise pelo nome e login",1,"form-control",3,"formControl"],[1,"input-group-append","cursor-pointer",3,"click"],[1,"input-group-text"],[1,"mbri-search","mr-2"],["class","col-md-4 mt-2 mt-lg-0 d-flex filters",4,"ngIf"],[1,"material","shadow-none",2,"height","calc(100vh - 200px)",3,"rows","headerHeight","footerHeight","rowHeight","scrollbarH","scrollbarV"],["name","Op\xe7\xf5es","prop","logged","frozenLeft","1",3,"width"],["ngx-datatable-header-template",""],["ngx-datatable-cell-template",""],[3,"name","prop","width",4,"ngFor","ngForOf"],[1,"col-md-4","mt-2","mt-lg-0","d-flex","filters"],[1,"mr-auto"],[1,"btn","btn-sm","mr-2",3,"click"],[1,"btn","btn-sm","text-success","mr-2",3,"click"],[1,"btn","btn-sm","text-danger",3,"click"],["matTooltip","Desconectar",2,"margin-top","2px",3,"ngClass","click"],[3,"name","prop","width"],[3,"ngSwitch"],["class","cursor-pointer",3,"click",4,"ngSwitchCase"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"cursor-pointer",3,"click"],[1,"mbri-paperclip",2,"font-size","10px"],["target","_blank",3,"href"],["matTooltipPosition","left",3,"matTooltip"],[4,"ngIf"],["matTooltipPosition","left",1,"ml-2",3,"ngClass","matTooltip"]],template:function(n,i){1&n&&(t.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),t.nrm(5,"input",5),t.j41(6,"div",6),t.bIt("click",function(){return i.openFilter()}),t.j41(7,"div",7),t.nrm(8,"i",8),t.EFF(9," Filtros "),t.k0s()()()(),t.DNE(10,Fn,8,10,"div",9),t.nI1(11,"async"),t.nI1(12,"checkPermission"),t.k0s()(),t.j41(13,"ngx-datatable",10),t.nI1(14,"async"),t.j41(15,"ngx-datatable-column",11),t.DNE(16,Gn,0,0,"ng-template",12),t.DNE(17,Pn,1,1,"ng-template",13),t.k0s(),t.DNE(18,On,2,3,"ngx-datatable-column",14),t.k0s()()),2&n&&(t.R7$(5),t.Y8G("formControl",i.searcheable$),t.R7$(5),t.Y8G("ngIf",t.bMT(11,10,t.bMT(12,12,"customers_offline.statistics"))),t.R7$(3),t.Y8G("rows",t.bMT(14,14,i.data))("headerHeight",40)("footerHeight",0)("rowHeight",30)("scrollbarH",!0)("scrollbarV",!0),t.R7$(2),t.Y8G("width",55),t.R7$(3),t.Y8G("ngForOf",i.displayedColumns))},dependencies:[h.YU,h.Sq,h.bT,h.ux,h.e1,h.fG,C.me,C.BC,C.l_,q.PD,pn,ce,ae,le,h.Jj,h.QX,Sn.D,Hn.y2],styles:[".filters .btn.active{font-weight:600}.ngx-datatable.material .datatable-header .datatable-header-cell{padding:.6rem 1.2rem!important}.ngx-datatable.material .datatable-body .datatable-body-row .datatable-body-cell,.ngx-datatable.material .datatable-body .datatable-body-row .datatable-body-group-cell{padding:.25rem 1.2rem!important}.ngx-datatable.material .datatable-body .datatable-body-row .datatable-body-cell{font-size:13px!important}\n"],encapsulation:2})}}return o})();function jn(o,r){if(1&o&&(t.j41(0,"li",4)(1,"a",5),t.EFF(2),t.k0s()()),2&o){const e=r.$implicit;t.R7$(1),t.Y8G("routerLink",e.id),t.R7$(1),t.JRh(e.name)}}const Nn=[{path:"",component:(()=>{class o{constructor(e,n){this.customerOfflineService=e,this.router=n}ngOnInit(){this.customerOfflineService.getServers().subscribe(e=>{this.servers=e.data,0!=this.servers.length&&this.router.navigate(["clientes_on_off",this.servers[0].id])})}static{this.\u0275fac=function(n){return new(n||o)(t.rXU(K),t.rXU(v.Ix))}}static{this.\u0275cmp=t.VBU({type:o,selectors:[["app-customer-offline-list"]],decls:5,vars:1,consts:[[1,"container-fluid","mt-3"],[1,"mb-2"],[1,"nav","nav-pills"],["class","nav-item",4,"ngFor","ngForOf"],[1,"nav-item"],["routerLinkActive","active",1,"nav-link",3,"routerLink"]],template:function(n,i){1&n&&(t.j41(0,"div",0)(1,"div",1)(2,"ul",2),t.DNE(3,jn,3,2,"li",3),t.k0s()(),t.nrm(4,"router-outlet"),t.k0s()),2&n&&(t.R7$(3),t.Y8G("ngForOf",i.servers))},dependencies:[h.Sq,v.n3,v.Wk,v.wQ],encapsulation:2})}}return o}
1)(),data:{heading:"Clientes On/Off"},children:[{path:":id",component:Vn,data:{heading:"Servidor"}}]}];let Ln=(()=>{class o{static{this.\u0275fac=function(n){return new(n||o)}}static{this.\u0275mod=t.$C({type:o})}static{this.\u0275inj=t.G2t({imports:[v.iI.forChild(Nn),v.iI]})}}return o})(),Yn=(()=>{class o{static{this.\u0275fac=function(n){return new(n||o)}}static{this.\u0275mod=t.$C({type:o})}static{this.\u0275inj=t.G2t({imports:[h.MD,Ln,H.gy,C.X1,q.T7,Z.$D,ve.qh,bn.A,ee.XZ,H.gp,gn,Ce.wG]})}}return o})()}}]);

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.