text: (window.webpackJsonp=window.webpackJsonp||[]).push([[1],{lDzL:function(e,t,n){"use strict";n.d(t,"a",(function(){return ce})),n.d(t,"b",(function(){return Pe})),n.d(t,"c",(function(){return ze})),n.d(t,"d",(function(){return _e})),n.d(t,"e",(function(){return st})),n.d(t,"f",(function(){return le})),n.d(t,"g",(function(){return yt})),n.d(t,"h",(function(){return ae}));var r=n("fXoL"),o=n("ofXK"),s=n("XNiG"),i=n("xgIS"),a=n("2Vo4"),l=n("1G5W"),c=n("mrSG");const h=["*"];function d(e,t){1&e&&r["\u0275\u0275element"](0,"datatable-progress")}function u(e,t){if(1&e&&r["\u0275\u0275element"](0,"datatable-summary-row",9),2&e){const e=r["\u0275\u0275nextContext"](2);r["\u0275\u0275property"]("rowHeight",e.summaryHeight)("offsetX",e.offsetX)("innerWidth",e.innerWidth)("rows",e.rows)("columns",e.columns)}}function g(e,t){if(1&e){const e=r["\u0275\u0275getCurrentView"]();r["\u0275\u0275elementStart"](0,"datatable-body-row",13),r["\u0275\u0275listener"]("treeAction",(function(){r["\u0275\u0275restoreView"](e);const t=r["\u0275\u0275nextContext"]().$implicit;return r["\u0275\u0275nextContext"](2).onTreeAction(t)}))("activate",(function(t){r["\u0275\u0275restoreView"](e);const n=r["\u0275\u0275nextContext"]().index,o=r["\u0275\u0275nextContext"](2);return r["\u0275\u0275reference"](1).onActivate(t,o.indexes.first+n)})),r["\u0275\u0275elementEnd"]()}if(2&e){const e=r["\u0275\u0275nextContext"]().$implicit,t=r["\u0275\u0275nextContext"](2),n=r["\u0275\u0275reference"](1);r["\u0275\u0275property"]("isSelected",n.getRowSelected(e))("innerWidth",t.innerWidth)("offsetX",t.offsetX)("columns",t.columns)("rowHeight",t.getRowHeight(e))("row",e)("rowIndex",t.getRowIndex(e))("expanded",t.getRowExpanded(e))("rowClass",t.rowClass)("displayCheck",t.displayCheck)("treeStatus",e.treeStatus)}}function p(e,t){if(1&e){const e=r["\u0275\u0275getCurrentView"]();r["\u0275\u0275elementStart"](0,"datatable-body-row",15),r["\u0275\u0275listener"]("activate",(function(n){r["\u0275\u0275restoreView"](e);const o=t.index;return r["\u0275\u0275nextContext"](4),r["\u0275\u0275reference"](1).onActivate(n,o)})),r["\u0275\u0275elementEnd"]()}if(2&e){const e=t.$implicit,n=r["\u0275\u0275nextContext"](2).$implicit,o=r["\u0275\u0275nextContext"](2),s=r["\u0275\u0275reference"](1);r["\u0275\u0275property"]("isSelected",s.getRowSelected(e))("innerWidth",o.innerWidth)("offsetX",o.offsetX)("columns",o.columns)("rowHeight",o.getRowHeight(e))("row",e)("group",n.value)("rowIndex",o.getRowIndex(e))("expanded",o.getRowExpanded(e))("rowClass",o.rowClass)}}function m(e,t){if(1&e&&r["\u0275\u0275template"](0,p,1,10,"datatable-body-row",14),2&e){const e=r["\u0275\u0275nextContext"]().$implicit,t=r["\u0275\u0275nextContext"](2);r["\u0275\u0275property"]("ngForOf",e.value)("ngForTrackBy",t.rowTrackingFn)}}function f(e,t){if(1&e){const e=r["\u0275\u0275getCurrentView"]();r["\u0275\u0275elementStart"](0,"datatable-row-wrapper",10),r["\u0275\u0275listener"]("rowContextmenu",(function(t){return r["\u0275\u0275restoreView"](e),r["\u0275\u0275nextContext"](2).rowContextmenu.emit(t)})),r["\u0275\u0275template"](1,g,1,11,"datatable-body-row",11),r["\u0275\u0275template"](2,m,1,2,"ng-template",null,12,r["\u0275\u0275templateRefExtractor"]),r["\u0275\u0275elementEnd"]()}if(2&e){const e=t.$implicit,n=t.index,o=r["\u0275\u0275reference"](3),s=r["\u0275\u0275nextContext"](2);r["\u0275\u0275property"]("groupedRows",s.groupedRows)("innerWidth",s.innerWidth)("ngStyle",s.getRowsStyles(e))("rowDetail",s.rowDetail)("groupHeader",s.groupHeader)("offsetX",s.offsetX)("detailRowHeight",s.getDetailRowHeight(e[n],n))("row",e)("expanded",s.getRowExpanded(e))("rowIndex",s.getRowIndex(e[n])),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngIf",!s.groupedRows)("ngIfElse",o)}}function w(e,t){if(1&e&&r["\u0275\u0275element"](0,"datatable-summary-row",16),2&e){const e=r["\u0275\u0275nextContext"](2);r["\u0275\u0275property"]("ngStyle",e.getBottomSummaryRowStyles())("rowHeight",e.summaryHeight)("offsetX",e.offsetX)("innerWidth",e.innerWidth)("rows",e.rows)("columns",e.columns)}}function b(e,t){if(1&e){const e=r["\u0275\u0275getCurrentView"]();r["\u0275\u0275elementStart"](0,"datatable-scroller",5),r["\u0275\u0275listener"]("scroll",(function(t){return r["\u0275\u0275restoreView"](e),r["\u0275\u0275nextContext"]().onBodyScroll(t)})),r["\u0275\u0275template"](1,u,1,5,"datatable-summary-row",6),r["\u0275\u0275template"](2,f,4,12,"datatable-row-wrapper",7),r["\u0275\u0275template"](3,w,1,6,"datatable-summary-row",8),r["\u0275\u0275elementEnd"]()}if(2&e){const e=r["\u0275\u0275nextContext"]();r["\u0275\u0275property"]("scrollbarV",e.scrollbarV)("scrollbarH",e.scrollbarH)("scrollHeight",e.scrollHeight)("scrollWidth",null==e.columnGroupWidths?null:e.columnGroupWidths.total),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngIf",e.summaryRow&&"top"===e.summaryPosition),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngForOf",e.temp)("ngForTrackBy",e.rowTrackingFn),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngIf",e.summaryRow&&"bottom"===e.summaryPosition)}}function y(e,t){if(1&e&&r["\u0275\u0275element"](0,"div",17),2&e){const e=r["\u0275\u0275nextContext"]();r["\u0275\u0275property"]("innerHTML",e.emptyMessage,r["\u0275\u0275sanitizeHtml"])}}function x(e,t){if(1&e){const e=r["\u0275\u0275getCurrentView"]();r["\u0275\u0275elementStart"](0,"datatable-header-cell",4),r["\u0275\u0275listener"]("resize",(function(n){r["\u0275\u0275restoreView"](e);const o=t.$implicit;return r["\u0275\u0275nextContext"](2).onColumnResized(n,o)}))("longPressStart",(function(t){return r["\u0275\u0275restoreView"](e),r["\u0275\u0275nextContext"](2).onLongPressStart(t)}))("longPressEnd",(function(t){return r["\u0275\u0275restoreView"](e),r["\u0275\u0275nextContext"](2).onLongPressEnd(t)}))("sort",(function(t){return r["\u0275\u0275restoreView"](e),r["\u0275\u0275nextContext"](2).onSort(t)}))("select",(function(t){return r["\u0275\u0275restoreView"](e),r["\u0275\u0275nextContext"](2).select.emit(t)}))("columnContextmenu",(function(t){return r["\u0275\u0275restoreView"](e),r["\u0275\u0275nextContext"](2).columnContextmenu.emit(t)})),r["\u0275\u0275elementEnd"]()}if(2&e){const e=t.$implicit,n=r["\u0275\u0275nextContext"](2);r["\u0275\u0275property"]("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)("allRowsSelected",n.allRowsSelected)}}function v(e,t){if(1&e&&(r["\u0275\u0275elementStart"](0,"div",2),r["\u0275\u0275template"](1,x,1,18,"datatable-header-cell",3),r["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit,n=r["\u0275\u0275nextContext"]();r["\u0275\u0275classMap"]("datatable-row-"+e.type),r["\u0275\u0275property"]("ngStyle",n._styleByGroup[e.type]),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngForOf",e.columns)("ngForTrackBy",n.columnTrackingFn)}}function C(e,t){if(1&e){const e=r["\u0275\u0275getCurrentView"]();r["\u0275\u0275elementStart"](0,"datatable-header",4),r["\u0275\u0275listener"]("sort",(function(t){return r["\u0275\u0275restoreView"](e),r["\u0275\u0275nextContext"]().onColumnSort(t)}))("resize",(function(t){return r["\u0275\u0275restoreView"](e),r["\u0275\u0275nextContext"]().onColumnResize(t)}))("reorder",(function(t){return r["\u0275\u0275restoreView"](e),r["\u0275\u0275nextContext"]().onColumnReorder(t)}))("select",(function(t){return r["\u0275\u0275restoreView"](e),r["\u0275\u0275nextContext"]().onHeaderSelect(t)}))("columnContextmenu",(function(t){return r["\u0275\u0275restoreView"](e),r["\u0275\u0275nextContext"]().onColumnContextmenu(t)})),r["\u0275\u0275pipe"](1,"async"),r["\u0275\u0275elementEnd"]()}if(2&e){const e=r["\u0275\u0275nextContext"]();r["\u0275\u0275property"]("sorts",e.sorts)("sortType",e.sortType)("scrollbarH",e.scrollbarH)("innerWidth",e._innerWidth)("offsetX",r["\u0275\u0275pipeBind1"](1,14,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)("allRowsSelected",e.allRowsSelected)("selectionType",e.selectionType)}}function I(e,t){if(1&e){const e=r["\u0275\u0275getCurrentView"]();r["\u0275\u0275elementStart"](0,"datatable-footer",5),r["\u0275\u0275listener"]("page",(function(t){return r["\u0275\u0275restoreView"](e),r["\u0275\u0275nextContext"]().onFooterPage(t)})),r["\u0275\u0275elementEnd"]()}if(2&e){const e=r["\u0275\u0275nextContext"]();r["\u0275\u0275property"]("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)}}function S(e,t){}function R(e,t){if(1&e&&r["\u0275\u0275template"](0,S,0,0,"ng-template",5),2&e){const e=r["\u0275\u0275nextContext"]();r["\u0275\u0275property"]("ngTemplateOutlet",e.targetMarkerTemplate)("ngTemplateOutletContext",e.targetMarkerContext)}}function T(e,t){if(1&e){const e=r["\u0275\u0275getCurrentView"]();r["\u0275\u0275elementStart"](0,"label",6),r["\u0275\u0275elementStart"](1,"input",7),r["\u0275\u0275listener"]("change",(function(){r["\u0275\u0275restoreView"](e);const t=r["\u0275\u0275nextContext"]();return t.select.emit(!t.allRowsSelected)})),r["\u0275\u0275elementEnd"](),r["\u0275\u0275elementEnd"]()}if(2&e){const e=r["\u0275\u0275nextContext"]();r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("checked",e.allRowsSelected)}}function E(e,t){if(1&e){const e=r["\u0275\u0275getCurrentView"]();r["\u0275\u0275elementStart"](0,"span",8),r["\u0275\u0275elementStart"](1,"span",9),r["\u0275\u0275listener"]("click",(function(){return r["\u0275\u0275restoreView"](e),r["\u0275\u0275nextContext"]().onSort()})),r["\u0275\u0275elementEnd"](),r["\u0275\u0275elementEnd"]()}if(2&e){const e=r["\u0275\u0275nextContext"]();r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("innerHTML",e.name,r["\u0275\u0275sanitizeHtml"])}}function H(e,t){}function k(e,t){if(1&e&&r["\u0275\u0275template"](0,H,0,0,"ng-template",5),2&e){const e=r["\u0275\u0275nextContext"]();r["\u0275\u0275property"]("ngTemplateOutlet",e.column.headerTemplate)("ngTemplateOutletContext",e.cellContext)}}function _(e,t){}const P=function(e,t,n,r,o){return{rowCount:e,pageSize:t,selectedCount:n,curPage:r,offset:o}};function D(e,t){if(1&e&&r["\u0275\u0275template"](0,_,0,0,"ng-template",4),2&e){const e=r["\u0275\u0275nextContext"]();r["\u0275\u0275property"]("ngTemplateOutlet",e.footerTemplate.template)("ngTemplateOutletContext",r["\u0275\u0275pureFunction5"](2,P,e.rowCount,e.pageSize,e.selectedCount,e.curPage,e.offset))}}function z(e,t){if(1&e&&(r["\u0275\u0275elementStart"](0,"span"),r["\u0275\u0275text"](1),r["\u0275\u0275elementEnd"]()),2&e){const e=r["\u0275\u0275nextContext"](2);r["\u0275\u0275advance"](1),r["\u0275\u0275textInterpolate2"](" ",null==e.selectedCount?null:e.selectedCount.toLocaleString()," ",e.selectedMessage," / ")}}function M(e,t){if(1&e&&(r["\u0275\u0275elementStart"](0,"div",5),r["\u0275\u0275template"](1,z,2,2,"span",1),r["\u0275\u0275text"](2),r["\u0275\u0275elementEnd"]()),2&e){const e=r["\u0275\u0275nextContext"]();r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngIf",e.selectedMessage),r["\u0275\u0275advance"](1),r["\u0275\u0275textInterpolate2"](" ",null==e.rowCount?null:e.rowCount.toLocaleString()," ",e.totalMessage," ")}}function A(e,t){if(1&e){const e=r["\u0275\u0275getCurrentView"]();r["\u0275\u0275elementStart"](0,"datatable-pager",6),r["\u0275\u0275listener"]("change",(function(t){return r["\u0275\u0275restoreView"](e),r["\u0275\u0275nextContext"]().page.emit(t)})),r["\u0275\u0275elementEnd"]()}if(2&e){const e=r["\u0275\u0275nextContext"]();r["\u0275\u0275property"]("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 V=function(e){return{"selected-count":e}};function F(e,t){if(1&e){const e=r["\u0275\u0275getCurrentView"]();r["\u0275\u0275elementStart"](0,"li",6),r["\u0275\u0275elementStart"](1,"a",7),r["\u0275\u0275listener"]("click",(function(){r["\u0275\u0275restoreView"](e);const n=t.$implicit;return r["\u0275\u0275nextContext"]().selectPage(n.number)})),r["\u0275\u0275text"](2),r["\u0275\u0275elementEnd"](),r["\u0275\u0275elementEnd"]()}if(2&e){const e=t.$implicit,n=r["\u0275\u0275nextContext"]();r["\u0275\u0275classProp"]("active",e.number===n.page),r["\u0275\u0275attribute"]("aria-label","page "+e.number),r["\u0275\u0275advance"](2),r["\u0275\u0275textInterpolate1"](" ",e.text," ")}}function W(e,t){if(1&e){const e=r["\u0275\u0275getCurrentView"]();r["\u0275\u0275elementStart"](0,"datatable-body-cell",3),r["\u0275\u0275listener"]("activate",(function(n){r["\u0275\u0275restoreView"](e);const o=t.index;return r["\u0275\u0275nextContext"](2).onActivate(n,o)}))("treeAction",(function(){return r["\u0275\u0275restoreView"](e),r["\u0275\u0275nextContext"](2).onTreeAction()})),r["\u0275\u0275elementEnd"]()}if(2&e){const e=t.$implicit,n=r["\u0275\u0275nextContext"](2);r["\u0275\u0275property"]("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 O(e,t){if(1&e&&(r["\u0275\u0275elementStart"](0,"div",1),r["\u0275\u0275template"](1,W,1,9,"datatable-body-cell",2),r["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit,n=r["\u0275\u0275nextContext"]();r["\u0275\u0275classMapInterpolate1"]("datatable-row-",e.type," datatable-row-group"),r["\u0275\u0275property"]("ngStyle",n._groupStyles[e.type]),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngForOf",e.columns)("ngForTrackBy",n.columnTrackingFn)}}function B(e,t){}function X(e,t){if(1&e&&r["\u0275\u0275template"](0,B,0,0,"ng-template",4),2&e){const e=r["\u0275\u0275nextContext"](2);r["\u0275\u0275property"]("ngTemplateOutlet",e.groupHeader.template)("ngTemplateOutletContext",e.groupContext)}}function j(e,t){if(1&e&&(r["\u0275\u0275elementStart"](0,"div",3),r["\u0275\u0275template"](1,X,1,2,void 0,1),r["\u0275\u0275elementEnd"]()),2&e){const e=r["\u0275\u0275nextContext"]();r["\u0275\u0275property"]("ngStyle",e.getGroupHeaderStyle()),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngIf",e.groupHeader&&e.groupHeader.template)}}function L(e,t){1&e&&r["\u0275\u0275projection"](0,0,["*ngIf","(groupHeader && groupHeader.template && expanded) || (!groupHeader || !groupHeader.template)"])}function N(e,t){}function G(e,t){if(1&e&&r["\u0275\u0275template"](0,N,0,0,"ng-template",4),2&e){const e=r["\u0275\u0275nextContext"](2);r["\u0275\u0275property"]("ngTemplateOutlet",e.rowDetail.template)("ngTemplateOutletContext",e.rowContext)}}function $(e,t){if(1&e&&(r["\u0275\u0275elementStart"](0,"div",5),r["\u0275\u0275template"](1,G,1,2,void 0,1),r["\u0275\u0275elementEnd"]()),2&e){const e=r["\u0275\u0275nextContext"]();r["\u0275\u0275styleProp"]("height",e.detailRowHeight,"px"),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngIf",e.rowDetail&&e.rowDetail.template)}}const Q=["cellTemplate"];function Y(e,t){if(1&e){const e=r["\u0275\u0275getCurrentView"]();r["\u0275\u0275elementStart"](0,"label",4),r["\u0275\u0275elementStart"](1,"input",5),r["\u0275\u0275listener"]("click",(function(t){return r["\u0275\u0275restoreView"](e),r["\u0275\u0275nextContext"]().onCheckboxChange(t)})),r["\u0275\u0275elementEnd"](),r["\u0275\u0275elementEnd"]()}if(2&e){const e=r["\u0275\u0275nextContext"]();r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("checked",e.isSelected)}}function q(e,t){1&e&&r["\u0275\u0275element"](0,"i",11)}function K(e,t){1&e&&r["\u0275\u0275element"](0,"i",12)}function U(e,t){1&e&&r["\u0275\u0275element"](0,"i",13)}function Z(e,t){if(1&e){const e=r["\u0275\u0275getCurrentView"]();r["\u0275\u0275elementStart"](0,"button",7),r["\u0275\u0275listener"]("click",(function(){return r["\u0275\u0275restoreView"](e),r["\u0275\u0275nextContext"](2).onTreeAction()})),r["\u0275\u0275elementStart"](1,"span"),r["\u0275\u0275template"](2,q,1,0,"i",8),r["\u0275\u0275template"](3,K,1,0,"i",9),r["\u0275\u0275template"](4,U,1,0,"i",10),r["\u0275\u0275elementEnd"](),r["\u0275\u0275elementEnd"]()}if(2&e){const e=r["\u0275\u0275nextContext"](2);r["\u0275\u0275property"]("disabled","disabled"===e.treeStatus),r["\u0275\u0275advance"](2),r["\u0275\u0275property"]("ngIf","loading"===e.treeStatus),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngIf","collapsed"===e.treeStatus),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngIf","expanded"===e.treeStatus||"disabled"===e.treeStatus)}}function J(e,t){}const ee=function(e){return{cellContext:e}};function te(e,t){if(1&e&&r["\u0275\u0275template"](0,J,0,0,"ng-template",14),2&e){const e=r["\u0275\u0275nextContext"](2);r["\u0275\u0275property"]("ngTemplateOutlet",e.column.treeToggleTemplate)("ngTemplateOutletContext",r["\u0275\u0275pureFunction1"](2,ee,e.cellContext))}}function ne(e,t){if(1&e&&(r["\u0275\u0275elementContainerStart"](0),r["\u0275\u0275template"](1,Z,5,4,"button",6),r["\u0275\u0275template"](2,te,1,4,void 0,2),r["\u0275\u0275elementContainerEnd"]()),2&e){const e=r["\u0275\u0275nextContext"]();r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngIf",!e.column.treeToggleTemplate),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngIf",e.column.treeToggleTemplate)}}function re(e,t){if(1&e&&r["\u0275\u0275element"](0,"span",15),2&e){const e=r["\u0275\u0275nextContext"]();r["\u0275\u0275property"]("title",e.sanitizedValue)("innerHTML",e.value,r["\u0275\u0275sanitizeHtml"])}}function oe(e,t){}function se(e,t){if(1&e&&r["\u0275\u0275template"](0,oe,0,0,"ng-template",14,16,r["\u0275\u0275templateRefExtractor"]),2&e){const e=r["\u0275\u0275nextContext"]();r["\u0275\u0275property"]("ngTemplateOutlet",e.column.cellTemplate)("ngTemplateOutletContext",e.cellContext)}}function ie(e,t){if(1&e&&r["\u0275\u0275element"](0,"datatable-body-row",1),2&e){const e=r["\u0275\u0275nextContext"]();r["\u0275\u0275property"]("innerWidth",e.innerWidth)("offsetX",e.offsetX)("columns",e._internalColumns)("rowHeight",e.rowHeight)("row",e.summaryRow)("rowIndex",-1)}}let ae=(()=>{class e{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 t=e.offsetWidth;e.style.overflow="scroll";const n=this.document.createElement("div");n.style.width="100%",e.appendChild(n);const r=n.offsetWidth;return e.parentNode.removeChild(e),t-r}}return e.\u0275fac=function(t){return new(t||e)(r["\u0275\u0275inject"](o.DOCUMENT))},e.\u0275prov=r["\u0275\u0275defineInjectable"]({token:e,factory:e.\u0275fac}),e})(),le=(()=>{class e{getDimensions(e){return e.getBoundingClientRect()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=r["\u0275\u0275defineInjectable"]({token:e,factory:e.\u0275fac}),e})(),ce=(()=>{class e{constructor(){this.columnInputChanges=new s.a}get columnInputChanges$(){return this.columnInputChanges.asObservable()}onInputChange(){this.columnInputChanges.next()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=r["\u0275\u0275defineInjectable"]({token:e,factory:e.\u0275fac}),e})(),he=(()=>{class e{constructor(e){this.template=e}}return e.\u0275fac=function(t){return new(t||e)(r["\u0275\u0275directiveInject"](r.TemplateRef))},e.\u0275dir=r["\u0275\u0275defineDirective"]({type:e,selectors:[["","ngx-datatable-footer-template",""]]}),e})(),de=(()=>{class e{constructor(e,t){this.element=e,this.zone=t,this.isVisible=!1,this.visible=new r.EventEmitter}ngOnInit(){this.runCheck()}ngOnDestroy(){clearTimeout(this.timeout)}onVisibilityChange(){this.zone.run(()=>{this.isVisible=!0,this.visible.emit(!0)})}runCheck(){const e=()=>{const{offsetHeight:t,offsetWidth:n}=this.element.nativeElement;t&&n?(clearTimeout(this.timeout),this.onVisibilityChange()):(clearTimeout(this.timeout),this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>e(),50)}))};this.timeout=setTimeout(()=>e())}}return e.\u0275fac=function(t){return new(t||e)(r["\u0275\u0275directiveInject"](r.ElementRef),r["\u0275\u0275directiveInject"](r.NgZone))},e.\u0275dir=r["\u0275\u0275defineDirective"]({type:e,selectors:[["","visibilityObserver",""]],hostVars:2,hostBindings:function(e,t){2&e&&r["\u0275\u0275classProp"]("visible",t.isVisible)},outputs:{visible:"visible"}}),e})(),ue=(()=>{class e{constructor(e){this.dragX=!0,this.dragY=!0,this.dragStart=new r.EventEmitter,this.dragging=new r.EventEmitter,this.dragEnd=new r.EventEmitter,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 t={x:e.clientX,y:e.clientY},n=Object(i.a)(document,"mouseup");this.subscription=n.subscribe(e=>this.onMouseup(e));const r=Object(i.a)(document,"mousemove").pipe(Object(l.a)(n)).subscribe(e=>this.move(e,t));this.subscription.add(r),this.dragStart.emit({event:e,element:this.element,model:this.dragModel})}}move(e,t){if(!this.isDragging)return;const n=e.clientY-t.y;this.dragX&&(this.element.style.left=e.clientX-t.x+"px"),this.dragY&&(this.element.style.top=n+"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 e.\u0275fac=function(t){return new(t||e)(r["\u0275\u0275directiveInject"](r.ElementRef))},e.\u0275dir=r["\u0275\u0275defineDirective"]({type:e,selectors:[["","draggable",""]],inputs:{dragX:"dragX",dragY:"dragY",dragEventTarget:"dragEventTarget",dragModel:"dragModel"},outputs:{dragStart:"dragStart",dragging:"dragging",dragEnd:"dragEnd"},features:[r["\u0275\u0275NgOnChangesFeature"]()]}),e})();"undefined"!=typeof window&&window||global,"undefined"!=typeof window&&window||global,"undefined"!=typeof window&&window||global;let ge=(()=>{class e{constructor(e,t){this.renderer=t,this.resizeEnabled=!0,this.resize=new r.EventEmitter,this.resizing=!1,this.element=e.nativeElement}ngAfterViewInit(){const e=this.renderer,t=e.createElement("span");e.addClass(t,this.resizeEnabled?"resize-handle":"resize-handle--not-resizable"),e.appendChild(this.element,t)}ngOnDestroy(){this._destroySubscription()}onMouseup(){this.resizing=!1,this.subscription&&!this.subscription.closed&&(this._destroySubscription(),this.resize.emit(this.element.clientWidth))}onMousedown(e){const t=e.target.classList.contains("resize-handle"),n=this.element.clientWidth,r=e.screenX;if(t){e.stopPropagation(),this.resizing=!0;const t=Object(i.a)(document,"mouseup");this.subscription=t.subscribe(e=>this.onMouseup());const o=Object(i.a)(document,"mousemove").pipe(Object(l.a)(t)).subscribe(e=>this.move(e,n,r));this.subscription.add(o)}}move(e,t,n){const r=t+(e.screenX-n);(!this.minWidth||r>=this.minWidth)&&(!this.maxWidth||r<=this.maxWidth)&&(this.element.style.width=r+"px")}_destroySubscription(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)}}return e.\u0275fac=function(t){return new(t||e)(r["\u0275\u0275directiveInject"](r.ElementRef),r["\u0275\u0275directiveInject"](r.Renderer2))},e.\u0275dir=r["\u0275\u0275defineDirective"]({type:e,selectors:[["","resizeable",""]],hostVars:2,hostBindings:function(e,t){1&e&&r["\u0275\u0275listener"]("mousedown",(function(e){return t.onMousedown(e)})),2&e&&r["\u0275\u0275classProp"]("resizeable",t.resizeEnabled)},inputs:{resizeEnabled:"resizeEnabled",minWidth:"minWidth",maxWidth:"maxWidth"},outputs:{resize:"resize"}}),e})(),pe=(()=>{class e{constructor(e,t){this.document=t,this.reorder=new r.EventEmitter,this.targetChanged=new r.EventEmitter,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 t=({currentValue:e,previousValue:t})=>{n({previousValue:t}),e&&(e.dragStart.subscribe(this.onDragStart.bind(this)),e.dragging.subscribe(this.onDragging.bind(this)),e.dragEnd.subscribe(this.onDragEnd.bind(this)))},n=({previousValue:e})=>{e&&(e.dragStart.unsubscribe(),e.dragging.unsubscribe(),e.dragEnd.unsubscribe())};e.forEachAddedItem(t),e.forEachRemovedItem(n)}}onDragStart(){this.positions={};let e=0;for(const t of this.draggables.toArray()){const n=t.element,r=parseInt(n.offsetLeft.toString(),0);this.positions[t.dragModel.prop]={left:r,right:r+parseInt(n.offsetWidth.toString(),0),index:e++,element:n}}}onDragging({model:e,event:t}){const n=this.positions[e.prop],r=this.isTarget(e,t);r?this.lastDraggingIndex!==r.i&&(this.targetChanged.emit({prevIndex:this.lastDraggingIndex,newIndex:r.i,initialIndex:n.index}),this.lastDraggingIndex=r.i):this.lastDraggingIndex!==n.index&&(this.targetChanged.emit({prevIndex:this.lastDraggingIndex,initialIndex:n.index}),this.lastDraggingIndex=n.index)}onDragEnd({element:e,model:t,event:n}){const r=this.positions[t.prop],o=this.isTarget(t,n);o&&this.reorder.emit({prevIndex:r.index,newIndex:o.i,model:t}),this.lastDraggingIndex=void 0,e.style.left="auto"}isTarget(e,t){let n=0;const r=this.document.elementsFromPoint(t.x||t.clientX,t.y||t.clientY);for(const o in this.positions){const t=this.positions[o];if(e.prop!==o&&r.find(e=>e===t.element))return{pos:t,i:n};n++}}createMapDiffs(){return this.draggables.toArray().reduce((e,t)=>(e[t.dragModel.$$id]=t,e),{})}}return e.\u0275fac=function(t){return new(t||e)(r["\u0275\u0275directiveInject"](r.KeyValueDiffers),r["\u0275\u0275directiveInject"](o.DOCUMENT))},e.\u0275dir=r["\u0275\u0275defineDirective"]({type:e,selectors:[["","orderable",""]],contentQueries:function(e,t,n){var o;1&e&&r["\u0275\u0275contentQuery"](n,ue,!0),2&e&&r["\u0275\u0275queryRefresh"](o=r["\u0275\u0275loadQuery"]())&&(t.draggables=o)},outputs:{reorder:"reorder",targetChanged:"targetChanged"}}),e})(),me=(()=>{class e{constructor(){this.pressEnabled=!0,this.duration=500,this.longPressStart=new r.EventEmitter,this.longPressing=new r.EventEmitter,this.longPressEnd=new r.EventEmitter,this.mouseX=0,this.mouseY=0}get press(){return this.pressing}get isLongPress(){return this.isLongPressing}onMouseDown(e){if(1!==e.which||!this.pressEnabled)return;if(e.target.classList.contains("resize-handle"))return;this.mouseX=e.clientX,this.mouseY=e.clientY,this.pressing=!0,this.isLongPressing=!1;const t=Object(i.a)(document,"mouseup");this.subscription=t.subscribe(e=>this.onMouseup()),this.timeout=setTimeout(()=>{this.isLongPressing=!0,this.longPressStart.emit({event:e,model:this.pressModel}),this.subscription.add(Object(i.a)(document,"mousemove").pipe(Object(l.a)(t)).subscribe(e=>this.onMouseMove(e))),this.loop(e)},this.duration),this.loop(e)}onMouseMove(e){if(this.pressing&&!this.isLongPressing){const t=Math.abs(e.clientX-this.mouseX)>10,n=Math.abs(e.clientY-this.mouseY)>10;(t||n)&&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 e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=r["\u0275\u0275defineDirective"]({type:e,selectors:[["","long-press",""]],hostVars:4,hostBindings:function(e,t){1&e&&r["\u0275\u0275listener"]("mousedown",(function(e){return t.onMouseDown(e)})),2&e&&r["\u0275\u0275classProp"]("press",t.press)("longpress",t.isLongPress)},inputs:{pressEnabled:"pressEnabled",duration:"duration",pressModel:"pressModel"},outputs:{longPressStart:"longPressStart",longPressing:"longPressing",longPressEnd:"longPressEnd"}}),e})(),fe=(()=>{class e{constructor(e,t,n){this.ngZone=e,this.renderer=n,this.scrollbarV=!1,this.scrollbarH=!1,this.scroll=new r.EventEmitter,this.scrollYPos=0,this.scrollXPos=0,this.prevScrollYPos=0,this.prevScrollXPos=0,this._scrollEventListener=null,this.element=t.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 t=e.currentTarget;requestAnimationFrame(()=>{this.scrollYPos=t.scrollTop,this.scrollXPos=t.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 e.\u0275fac=function(t){return new(t||e)(r["\u0275\u0275directiveInject"](r.NgZone),r["\u0275\u0275directiveInject"](r.ElementRef),r["\u0275\u0275directiveInject"](r.Renderer2))},e.\u0275cmp=r["\u0275\u0275defineComponent"]({type:e,selectors:[["datatable-scroller"]],hostAttrs:[1,"datatable-scroll"],hostVars:4,hostBindings:function(e,t){2&e&&r["\u0275\u0275styleProp"]("height",t.scrollHeight,"px")("width",t.scrollWidth,"px")},inputs:{scrollbarV:"scrollbarV",scrollbarH:"scrollbarH",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth"},outputs:{scroll:"scroll"},ngContentSelectors:h,decls:1,vars:0,template:function(e,t){1&e&&(r["\u0275\u0275projectionDef"](),r["\u0275\u0275projection"](0))},encapsulation:2,changeDetection:0}),e})(),we=(()=>{class e{constructor(e){this.template=e}}return e.\u0275fac=function(t){return new(t||e)(r["\u0275\u0275directiveInject"](r.TemplateRef))},e.\u0275dir=r["\u0275\u0275defineDirective"]({type:e,selectors:[["","ngx-datatable-group-header-template",""]]}),e})(),be=(()=>{class e{constructor(){this.rowHeight=0,this.toggle=new r.EventEmitter}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 e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=r["\u0275\u0275defineDirective"]({type:e,selectors:[["ngx-datatable-group-header"]],contentQueries:function(e,t,n){var o;1&e&&r["\u0275\u0275staticContentQuery"](n,we,!0,r.TemplateRef),2&e&&r["\u0275\u0275queryRefresh"](o=r["\u0275\u0275loadQuery"]())&&(t._templateQuery=o.first)},inputs:{rowHeight:"rowHeight",_templateInput:["template","_templateInput"]},outputs:{toggle:"toggle"}}),e})();function ye(){return""}function xe(e){return null==e?ye:"number"==typeof e?ve:-1!==e.indexOf(".")?Ie:Ce}function ve(e,t){if(null==e)return"";if(!e||null==t)return e;const n=e[t];return null==n?"":n}function Ce(e,t){if(null==e)return"";if(!e||!t)return e;const n=e[t];return null==n?"":n}function Ie(e,t){if(null==e)return"";if(!e||!t)return e;let n=e[t];if(void 0!==n)return n;n=e;const r=t.split(".");if(r.length)for(let o=0;o<r.length;o++)if(n=n[r[o]],null==n)return"";return n}function Se(e){return e&&(t=>xe(e)(t,e))}function Re(e,t,n){if(t&&n){const r={},o=e.length;let s=null;r[0]=new Te;const i=e.reduce((e,t)=>{const r=n(t);return-1===e.indexOf(r)&&e.push(r),e},[]);for(let t=0;t<o;t++)r[n(e[t])]=new Te(e[t]);for(let l=0;l<o;l++){s=r[n(e[l])];let o=0;const a=t(s.row);a&&i.indexOf(a)>-1&&(o=a),s.parent=r[o],s.row.level=s.parent.row.level+1,s.parent.children.push(s)}let a=[];return r[0].flatten((function(){a=[...a,this.row]}),!0),a}return e}class Te{constructor(e=null){e||(e={level:-1,treeStatus:"expanded"}),this.row=e,this.parent=null,this.children=[]}flatten(e,t){if("expanded"===this.row.treeStatus)for(let n=0,r=this.children.length;n<r;n++){const r=this.children[n];e.apply(r,Array.prototype.slice.call(arguments,2)),t&&r.flatten.apply(r,arguments)}}}function Ee(e){return(e=(e=(e=e.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(e,t,n){return t.trim()+n.toUpperCase()}))}function He(e){if(!e)return;let t=!1;for(const n of e)n.$$id||(n.$$id=("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)),ke(n.prop)&&n.name&&(n.prop=Ee(n.name)),n.$$valueGetter||(n.$$valueGetter=xe(n.prop)),!ke(n.prop)&&ke(n.name)&&(n.name=String(n.prop).replace(/([A-Z])/g,e=>" "+e).replace(/^./,e=>e.toUpperCase())),ke(n.prop)&&ke(n.name)&&(n.name=""),n.hasOwnProperty("resizeable")||(n.resizeable=!0),n.hasOwnProperty("sortable")||(n.sortable=!0),n.hasOwnProperty("draggable")||(n.draggable=!0),n.hasOwnProperty("canAutoResize")||(n.canAutoResize=!0),n.hasOwnProperty("width")||(n.width=150),n.hasOwnProperty("isTreeColumn")&&n.isTreeColumn&&!t?t=!0:n.isTreeColumn=!1}function ke(e){return null==e}let _e=(()=>{class e{constructor(e){this.template=e}}return e.\u0275fac=function(t){return new(t||e)(r["\u0275\u0275directiveInject"](r.TemplateRef))},e.\u0275dir=r["\u0275\u0275defineDirective"]({type:e,selectors:[["","ngx-datatable-header-template",""]]}),e})(),Pe=(()=>{class e{constructor(e){this.template=e}}return e.\u0275fac=function(t){return new(t||e)(r["\u0275\u0275directiveInject"](r.TemplateRef))},e.\u0275dir=r["\u0275\u0275defineDirective"]({type:e,selectors:[["","ngx-datatable-cell-template",""]]}),e})(),De=(()=>{class e{constructor(e){this.template=e}}return e.\u0275fac=function(t){return new(t||e)(r["\u0275\u0275directiveInject"](r.TemplateRef))},e.\u0275dir=r["\u0275\u0275defineDirective"]({type:e,selectors:[["","ngx-datatable-tree-toggle",""]]}),e})(),ze=(()=>{class e{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 e.\u0275fac=function(t){return new(t||e)(r["\u0275\u0275directiveInject"](ce))},e.\u0275dir=r["\u0275\u0275defineDirective"]({type:e,selectors:[["ngx-datatable-column"]],contentQueries:function(e,t,n){var o;1&e&&(r["\u0275\u0275staticContentQuery"](n,Pe,!0,r.TemplateRef),r["\u0275\u0275staticContentQuery"](n,_e,!0,r.TemplateRef),r["\u0275\u0275staticContentQuery"](n,De,!0,r.TemplateRef)),2&e&&(r["\u0275\u0275queryRefresh"](o=r["\u0275\u0275loadQuery"]())&&(t._cellTemplateQuery=o.first),r["\u0275\u0275queryRefresh"](o=r["\u0275\u0275loadQuery"]())&&(t._headerTemplateQuery=o.first),r["\u0275\u0275queryRefresh"](o=r["\u0275\u0275loadQuery"]())&&(t._treeToggleTemplateQuery=o.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:[r["\u0275\u0275NgOnChangesFeature"]()]}),e})(),Me=(()=>{class e{constructor(e){this.template=e}}return e.\u0275fac=function(t){return new(t||e)(r["\u0275\u0275directiveInject"](r.TemplateRef))},e.\u0275dir=r["\u0275\u0275defineDirective"]({type:e,selectors:[["","ngx-datatable-row-detail-template",""]]}),e})(),Ae=(()=>{class e{constructor(){this.rowHeight=0,this.toggle=new r.EventEmitter}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 e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=r["\u0275\u0275defineDirective"]({type:e,selectors:[["ngx-datatable-row-detail"]],contentQueries:function(e,t,n){var o;1&e&&r["\u0275\u0275staticContentQuery"](n,Me,!0,r.TemplateRef),2&e&&r["\u0275\u0275queryRefresh"](o=r["\u0275\u0275loadQuery"]())&&(t._templateQuery=o.first)},inputs:{rowHeight:"rowHeight",_templateInput:["template","_templateInput"]},outputs:{toggle:"toggle"}}),e})(),Ve=(()=>{class e{get template(){return this._templateInput||this._templateQuery}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=r["\u0275\u0275defineDirective"]({type:e,selectors:[["ngx-datatable-footer"]],contentQueries:function(e,t,n){var o;1&e&&r["\u0275\u0275contentQuery"](n,he,!0,r.TemplateRef),2&e&&r["\u0275\u0275queryRefresh"](o=r["\u0275\u0275loadQuery"]())&&(t._templateQuery=o.first)},inputs:{footerHeight:"footerHeight",totalMessage:"totalMessage",selectedMessage:"selectedMessage",pagerLeftArrowIcon:"pagerLeftArrowIcon",pagerRightArrowIcon:"pagerRightArrowIcon",pagerPreviousIcon:"pagerPreviousIcon",pagerNextIcon:"pagerNextIcon",_templateInput:["template","_templateInput"]}}),e})();function Fe(e){const t={left:[],center:[],right:[]};if(e)for(const n of e)n.frozenLeft?t.left.push(n):n.frozenRight?t.right.push(n):t.center.push(n);return t}function We(e,t){return{left:Oe(e.left),center:Oe(e.center),right:Oe(e.right),total:Math.floor(Oe(t))}}function Oe(e,t){let n=0;if(e)for(const r of e)n+=parseFloat(t&&r[t]?r[t]:r.width);return n}function Be(e){const t=[],n=Fe(e);return t.push({type:"left",columns:n.left}),t.push({type:"center",columns:n.center}),t.push({type:"right",columns:n.right}),t}class Xe{constructor(){this.treeArray=[]}clearCache(){this.treeArray=[]}initCache(e){const{rows:t,rowHeight:n,detailRowHeight:r,externalVirtual:o,rowCount:s,rowIndexes:i,rowExpansions:a}=e,l="function"==typeof n,c="function"==typeof r;if(!l&&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(!c&&isNaN(r))throw new Error(`Row Height cache initialization failed. Please ensure that 'detailRowHeight' is a\n        valid number or function value: (${r}) when 'scrollbarV' is enabled.`);const h=o?s:t.length;this.treeArray=new Array(h);for(let d=0;d<h;++d)this.treeArray[d]=0;for(let d=0;d<h;++d){const e=t[d];let o=n;l&&(o=n(e));const s=a.get(e);e&&1===s&&(o+=c?r(e,i.get(e)):r),this.update(d,o)}}getRowIndex(e){return 0===e?0:this.calcRowIndex(e)}update(e,t){if(!this.treeArray.length)throw new Error(`Update at index ${e} with value ${t} failed:\n        Row Height cache not initialized.`);const n=this.treeArray.length;for(e|=0;e<n;)this.treeArray[e]+=t,e|=e+1}query(e){if(!this.treeArray.length)throw new Error(`query at index ${e} failed: Fenwick tree array not initialized.`);let t=0;for(e|=0;e>=0;)t+=this.treeArray[e],e=(e&e+1)-1;return t}queryBetween(e,t){return this.query(t)-this.query(e-1)}calcRowIndex(e){if(!this.treeArray.length)return 0;let t=-1;const n=this.treeArray.length;for(let r=Math.pow(2,n.toString(2).length-1);0!==r;r>>=1){const o=t+r;o<n&&e>=this.treeArray[o]&&(e-=this.treeArray[o],t=o)}return t+1}}const je={},Le="undefined"!=typeof document?document.createElement("div").style:void 0,Ne=function(){const e="undefined"!=typeof window?window.getComputedStyle(document.documentElement,""):void 0,t=void 0!==e?Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/):null,n=null!==t?t[1]:void 0,r=void 0!==n?"WebKit|Moz|MS|O".match(new RegExp("("+n+")","i"))[1]:void 0;return r?{dom:r,lowercase:n,css:`-${n}-`,js:n[0].toUpperCase()+n.substr(1)}:void 0}();function Ge(e){const t=Ee(e);return je[t]||(void 0!==Ne&&void 0!==Le[Ne.css+e]?je[t]=Ne.css+e:void 0!==Le[e]&&(je[t]=e)),je[t]}const $e="undefined"!=typeof window?Ge("transform"):void 0,Qe="undefined"!=typeof window?Ge("backfaceVisibility"):void 0,Ye="undefined"!=typeof window?!!Ge("transform"):void 0,qe="undefined"!=typeof window?!!Ge("perspective"):void 0,Ke="undefined"!=typeof window?window.navigator.userAgent:"Chrome",Ue=/Safari\//.test(Ke)&&!/Chrome\//.test(Ke);function Ze(e,t,n){void 0!==$e&&Ye?!Ue&&qe?(e[$e]=`translate3d(${t}px, ${n}px, 0)`,e[Qe]="hidden"):e[Ee($e)]=`translate(${t}px, ${n}px)`:(e.top=n+"px",e.left=t+"px")}let Je=(()=>{class e{constructor(e){this.cd=e,this.selected=[],this.scroll=new r.EventEmitter,this.page=new r.EventEmitter,this.activate=new r.EventEmitter,this.select=new r.EventEmitter,this.detailToggle=new r.EventEmitter,this.rowContextmenu=new r.EventEmitter(!1),this.treeAction=new r.EventEmitter,this.rowHeightsCache=new Xe,this.temp=[],this.offsetY=0,this.indexes={},this.rowIndexes=new Map,this.rowExpansions=new Map,this.getDetailRowHeight=(e,t)=>{if(!this.rowDetail)return 0;const n=this.rowDetail.rowHeight;return"function"==typeof n?n(e,t):n},this.rowTrackingFn=(e,t)=>{const n=this.getRowIndex(t);return this.trackByProp?t[this.trackByProp]:n}}set pageSize(e){this._pageSize=e,this.recalcLayout()}get pageSize(){return this._pageSize}set rows(e){this._rows=e,this.rowExpansions.clear(),this.recalcLayout()}get rows(){return this._rows}set columns(e){this._columns=e;const t=Fe(e);this.columnGroupWidths=We(t,e)}get columns(){return this._columns}set offset(e){this._offset=e,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:t})=>{"row"===e&&this.toggleRowExpansion(t),"all"===e&&this.toggleAllRows(t),this.updateIndexes(),this.updateRows(),this.cd.markForCheck()})),this.groupHeader&&(this.listener=this.groupHeader.toggle.subscribe(({type:e,value:t})=>{"group"===e&&this.toggleRowExpansion(t),"all"===e&&this.toggleAllRows(t),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 t=e.scrollYPos,n=e.scrollXPos;this.offsetY===t&&this.offsetX===n||this.scroll.emit({offsetY:t,offsetX:n}),this.offsetY=t,this.offsetX=n,this.updateIndexes(),this.updatePage(e.direction),this.updateRows()}updatePage(e){let t=this.indexes.first/this.pageSize;"up"===e?t=Math.ceil(t):"down"===e&&(t=Math.floor(t)),void 0===e||isNaN(t)||this.page.emit({offset:t})}updateRows(){const{first:e,last:t}=this.indexes;let n=e,r=0;const o=[];if(this.rowIndexes.clear(),this.groupedRows){let e=3;for(1===this.groupedRows.length&&(e=this.groupedRows[0].value.length);n<t&&n<this.groupedRows.length;)o[r]=this.groupedRows[n],r++,n++}else for(;n<t&&n<this.rowCount;){const e=this.rows[n];e&&(this.rowIndexes.set(e,n),o[r]=e),r++,n++}this.temp=o}getRowHeight(e){return"function"==typeof this.rowHeight?this.rowHeight(e):this.rowHeight}getGroupHeight(e){let t=0;if(e.value)for(let n=0;n<e.value.length;n++)t+=this.getRowAndDetailHeight(e.value[n]);return t}getRowAndDetailHeight(e){let t=this.getRowHeight(e);return 1===this.rowExpansions.get(e)&&(t+=this.getDetailRowHeight(e)),t}getRowsStyles(e){const t={};if(this.groupedRows&&(t.width=this.columnGroupWidths.total),this.scrollbarV&&this.virtualization){let n=0;if(this.groupedRows){const t=e[e.length-1];n=t?this.getRowIndex(t):0}else n=this.getRowIndex(e);Ze(t,0,this.rowHeightsCache.query(n-1))}return t}getBottomSummaryRowStyles(){if(!this.scrollbarV||!this.rows||!this.rows.length)return null;const e={position:"absolute"};return Ze(e,0,this.rowHeightsCache.query(this.rows.length-1)),e}hideIndicator(){setTimeout(()=>this.loadingIndicator=!1,500)}updateIndexes(){let e=0,t=0;if(this.scrollbarV)if(this.virtualization){const n=parseInt(this.bodyHeight,0);e=this.rowHeightsCache.getRowIndex(this.offsetY),t=this.rowHeightsCache.getRowIndex(n+this.offsetY)+1}else e=0,t=this.rowCount;else this.externalPaging||(e=Math.max(this.offset*this.pageSize,0)),t=Math.min(e+this.pageSize,this.rowCount);this.indexes={first:e,last:t}}refreshRowHeightCache(){!this.scrollbarV||this.scrollbarV&&!this.virtualization||(this.rowHeightsCache.clearCache(),this.rows&&this.rows.length&&this.rowHeightsCache.initCache({rows:this.rows,rowHeight:this.rowHeight,detailRowHeight:this.getDetailRowHeight,externalVirtual:this.scrollbarV&&this.externalPaging,rowCount:this.rowCount,rowIndexes:this.rowIndexes,rowExpansions:this.rowExpansions}))}getAdjustedViewPortIndex(){const e=this.indexes.first;return this.scrollbarV&&this.virtualization&&this.rowHeightsCache.query(e-1)<=this.offsetY?e-1:e}toggleRowExpansion(e){const t=this.getAdjustedViewPortIndex();let n=this.rowExpansions.get(e);if(this.scrollbarV&&this.virtualization){const t=this.getDetailRowHeight(e)*(n?-1:1),r=this.getRowIndex(e);this.rowHeightsCache.update(r,t)}n=n^=1,this.rowExpansions.set(e,n),this.detailToggle.emit({rows:[e],currentIndex:t})}toggleAllRows(e){this.rowExpansions.clear();const t=e?1:0,n=this.getAdjustedViewPortIndex();for(const r of this.rows)this.rowExpansions.set(r,t);this.scrollbarV&&this.recalcLayout(),this.detailToggle.emit({rows:this.rows,currentIndex:n})}recalcLayout(){this.refreshRowHeightCache(),this.updateIndexes(),this.updateRows()}columnTrackingFn(e,t){return t.$$id}stylesByGroup(e){const t=this.columnGroupWidths,n=this.offsetX,r={width:t[e]+"px"};if("left"===e)Ze(r,n,0);else if("right"===e){const e=parseInt(this.innerWidth+"",0);Ze(r,-1*(t.total-e-n),0)}return r}getRowExpanded(e){if(0===this.rowExpansions.size&&this.groupExpansionDefault)for(const t of this.groupedRows)this.rowExpansions.set(t,1);return 1===this.rowExpansions.get(e)}getRowIndex(e){return this.rowIndexes.get(e)||0}onTreeAction(e){this.treeAction.emit({row:e})}}return e.\u0275fac=function(t){return new(t||e)(r["\u0275\u0275directiveInject"](r.ChangeDetectorRef))},e.\u0275cmp=r["\u0275\u0275defineComponent"]({type:e,selectors:[["datatable-body"]],viewQuery:function(e,t){var n;1&e&&r["\u0275\u0275viewQuery"](fe,!0),2&e&&r["\u0275\u0275queryRefresh"](n=r["\u0275\u0275loadQuery"]())&&(t.scroller=n.first)},hostAttrs:[1,"datatable-body"],hostVars:4,hostBindings:function(e,t){2&e&&r["\u0275\u0275styleProp"]("width",t.bodyWidth)("height",t.bodyHeight)},inputs:{selected:"selected",pageSize:"pageSize",rows:"rows",columns:"columns",offset:"offset",rowCount:"rowCount",bodyHeight:"bodyHeight",offsetX:"offsetX",loadingIndicator:"loadingIndicator",scrollbarV:"scrollbarV",scrollbarH:"scrollbarH",externalPaging:"externalPaging",rowHeight:"rowHeight",emptyMessage:"emptyMessage",selectionType:"selectionType",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"},outputs:{scroll:"scroll",page:"page",activate:"activate",select:"select",detailToggle:"detailToggle",rowContextmenu:"rowContextmenu",treeAction:"treeAction"},decls:5,vars:9,consts:[[3,"selected","rows","selectCheck","selectEnabled","selectionType","rowIdentity","select","activate"],["selector",""],[4,"ngIf"],[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"],[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"],["tabindex","-1",3,"isSelected","innerWidth","offsetX","columns","rowHeight","row","rowIndex","expanded","rowClass","displayCheck","treeStatus","treeAction","activate",4,"ngIf","ngIfElse"],["groupedRowsTemplate",""],["tabindex","-1",3,"isSelected","innerWidth","offsetX","columns","rowHeight","row","rowIndex","expanded","rowClass","displayCheck","treeStatus","treeAction","activate"],["tabindex","-1",3,"isSelected","innerWidth","offsetX","columns","rowHeight","row","group","rowIndex","expanded","rowClass","activate",4,"ngFor","ngForOf","ngForTrackBy"],["tabindex","-1",3,"isSelected","innerWidth","offsetX","columns","rowHeight","row","group","rowIndex","expanded","rowClass","activate"],[3,"ngStyle","rowHeight","offsetX","innerWidth","rows","columns"],[1,"empty-row",3,"innerHTML"]],template:function(e,t){1&e&&(r["\u0275\u0275elementStart"](0,"datatable-selection",0,1),r["\u0275\u0275listener"]("select",(function(e){return t.select.emit(e)}))("activate",(function(e){return t.activate.emit(e)})),r["\u0275\u0275template"](2,d,1,0,"datatable-progress",2),r["\u0275\u0275template"](3,b,4,8,"datatable-scroller",3),r["\u0275\u0275template"](4,y,1,1,"div",4),r["\u0275\u0275elementEnd"]()),2&e&&(r["\u0275\u0275property"]("selected",t.selected)("rows",t.rows)("selectCheck",t.selectCheck)("selectEnabled",t.selectEnabled)("selectionType",t.selectionType)("rowIdentity",t.rowIdentity),r["\u0275\u0275advance"](2),r["\u0275\u0275property"]("ngIf",t.loadingIndicator),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngIf",null==t.rows?null:t.rows.length),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngIf",!(null!=t.rows&&t.rows.length||t.loadingIndicator)))},directives:function(){return[mt,o.NgIf,ct,fe,o.NgForOf,bt,ut,o.NgStyle,dt]},encapsulation:2,changeDetection:0}),e})(),et=(()=>{class e{constructor(e){this.cd=e,this.sort=new r.EventEmitter,this.reorder=new r.EventEmitter,this.resize=new r.EventEmitter,this.select=new r.EventEmitter,this.columnContextmenu=new r.EventEmitter(!1),this._columnGroupWidths={total:100},this._styleByGroup={left:{},center:{},right:{}}}set innerWidth(e){this._innerWidth=e,setTimeout(()=>{if(this._columns){const e=Fe(this._columns);this._columnGroupWidths=We(e,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 t=Fe(e);this._columnsByPin=Be(e),setTimeout(()=>{this._columnGroupWidths=We(t,e),this.setStylesByGroup()})}get columns(){return this._columns}set offsetX(e){this._offsetX=e,this.setStylesByGroup()}get offsetX(){return this._offsetX}onLongPressStart({event:e,model:t}){t.dragging=!0,this.dragEventTarget=e}onLongPressEnd({event:e,model:t}){this.dragEventTarget=e,setTimeout(()=>{const e=this._columns.find(e=>e.$$id===t.$$id);e&&(e.dragging=!1)},5)}get headerWidth(){return this.scrollbarH?this.innerWidth+"px":"100%"}trackByGroups(e,t){return t.type}columnTrackingFn(e,t){return t.$$id}onColumnResized(e,t){e<=t.minWidth?e=t.minWidth:e>=t.maxWidth&&(e=t.maxWidth),this.resize.emit({column:t,prevValue:t.width,newValue:e})}onColumnReordered({prevIndex:e,newIndex:t,model:n}){const r=this.getColumn(t);r.isTarget=!1,r.targetMarkerContext=void 0,this.reorder.emit({column:n,prevValue:e,newValue:t})}onTargetChanged({prevIndex:e,newIndex:t,initialIndex:n}){if(e||0===e){const t=this.getColumn(e);t.isTarget=!1,t.targetMarkerContext=void 0}if(t||0===t){const e=this.getColumn(t);e.isTarget=!0,n!==t&&(e.targetMarkerContext={class:"targetMarker ".concat(n>t?"dragFromRight":"dragFromLeft")})}}getColumn(e){const t=this._columnsByPin[0].columns.length;if(e<t)return this._columnsByPin[0].columns[e];const n=this._columnsByPin[1].columns.length;return e<t+n?this._columnsByPin[1].columns[e-t]:this._columnsByPin[2].columns[e-t-n]}onSort({column:e,prevValue:t,newValue:n}){if(e.dragging)return;const r=this.calcNewSorts(e,t,n);this.sort.emit({sorts:r,column:e,prevValue:t,newValue:n})}calcNewSorts(e,t,n){let r=0;this.sorts||(this.sorts=[]);const o=this.sorts.map((t,n)=>((t=Object.assign({},t)).prop===e.prop&&(r=n),t));return void 0===n?o.splice(r,1):t?o[r].dir=n:("single"===this.sortType&&o.splice(0,this.sorts.length),o.push({dir:n,prop:e.prop})),o}setStylesByGroup(){this._styleByGroup.left=this.calcStylesByGroup("left"),this._styleByGroup.center=this.calcStylesByGroup("center"),this._styleByGroup.right=this.calcStylesByGroup("right"),this.cd.detectChanges()}calcStylesByGroup(e){const t=this._columnGroupWidths,n={width:t[e]+"px"};return"center"===e?Ze(n,-1*this.offsetX,0):"right"===e&&Ze(n,-1*(t.total-this.innerWidth),0),n}}return e.\u0275fac=function(t){return new(t||e)(r["\u0275\u0275directiveInject"](r.ChangeDetectorRef))},e.\u0275cmp=r["\u0275\u0275defineComponent"]({type:e,selectors:[["datatable-header"]],hostAttrs:[1,"datatable-header"],hostVars:4,hostBindings:function(e,t){2&e&&r["\u0275\u0275styleProp"]("height",t.headerHeight)("width",t.headerWidth)},inputs:{innerWidth:"innerWidth",headerHeight:"headerHeight",columns:"columns",offsetX:"offsetX",sorts:"sorts",sortAscendingIcon:"sortAscendingIcon",sortDescendingIcon:"sortDescendingIcon",scrollbarH:"scrollbarH",dealsWithGroup:"dealsWithGroup",targetMarkerTemplate:"targetMarkerTemplate",sortType:"sortType",allRowsSelected:"allRowsSelected",selectionType:"selectionType",reorderable:"reorderable"},outputs:{sort:"sort",reorder:"reorder",resize:"resize",select:"select",columnContextmenu:"columnContextmenu"},decls:2,vars:4,consts:[["orderable","",1,"datatable-header-inner",3,"reorder","targetChanged"],[3,"class","ngStyle",4,"ngFor","ngForOf","ngForTrackBy"],[3,"ngStyle"],["resizeable","","long-press","","draggable","",3,"resizeEnabled","pressModel","pressEnabled","dragX","dragY","dragModel","dragEventTarget","headerHeight","isTarget","targetMarkerTemplate","targetMarkerContext","column","sortType","sorts","selectionType","sortAscendingIcon","sortDescendingIcon","allRowsSelected","resize","longPressStart","longPressEnd","sort","select","columnContextmenu",4,"ngFor","ngForOf","ngForTrackBy"],["resizeable","","long-press","","draggable","",3,"resizeEnabled","pressModel","pressEnabled","dragX","dragY","dragModel","dragEventTarget","headerHeight","isTarget","targetMarkerTemplate","targetMarkerContext","column","sortType","sorts","selectionType","sortAscendingIcon","sortDescendingIcon","allRowsSelected","resize","longPressStart","longPressEnd","sort","select","columnContextmenu"]],template:function(e,t){1&e&&(r["\u0275\u0275elementStart"](0,"div",0),r["\u0275\u0275listener"]("reorder",(function(e){return t.onColumnReordered(e)}))("targetChanged",(function(e){return t.onTargetChanged(e)})),r["\u0275\u0275template"](1,v,2,5,"div",1),r["\u0275\u0275elementEnd"]()),2&e&&(r["\u0275\u0275styleProp"]("width",t._columnGroupWidths.total,"px"),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngForOf",t._columnsByPin)("ngForTrackBy",t.trackByGroups))},directives:function(){return[pe,o.NgForOf,o.NgStyle,it,ge,me,ue]},encapsulation:2,changeDetection:0}),e})();function tt(e,t,n){let r,o,s;n=n||{};let i=null,a=0;function l(){a=!1===n.leading?0:+new Date,i=null,s=e.apply(r,o)}return function(){const c=+new Date;a||!1!==n.leading||(a=c);const h=t-(c-a);return r=this,o=arguments,h<=0?(clearTimeout(i),i=null,a=c,s=e.apply(r,o)):i||!1===n.trailing||(i=setTimeout(l,h)),s}}function nt(e,t){for(const n of t){const t=e.indexOf(n);e.splice(t,1)}}function rt(e,t=300){let n=0;for(const r of e)n+=r.width||t;return n}function ot(e,t){if(null==e&&(e=0),null==t&&(t=0),e instanceof Date&&t instanceof Date){if(e<t)return-1;if(e>t)return 1}else if(isNaN(parseFloat(e))||!isFinite(e)||isNaN(parseFloat(t))||!isFinite(t)){if(e=String(e),t=String(t),e.toLowerCase()<t.toLowerCase())return-1;if(e.toLowerCase()>t.toLowerCase())return 1}else{if(parseFloat(e)<parseFloat(t))return-1;if(parseFloat(e)>parseFloat(t))return 1}return 0}let st=(()=>{class e{constructor(e,t,n,o,s,i,l){this.scrollbarHelper=e,this.dimensionsHelper=t,this.cd=n,this.columnChangesService=i,this.configuration=l,this.selected=[],this.scrollbarV=!1,this.scrollbarH=!1,this.rowHeight=30,this.columnMode="standard",this.headerHeight=30,this.footerHeight=0,this.externalPaging=!1,this.externalSorting=!1,this.loadingIndicator=!1,this.reorderable=!0,this.swapColumns=!0,this.sortType="single",this.sorts=[],this.cssClasses={sortAscending:"datatable-icon-up",sortDescending:"datatable-icon-down",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 r.EventEmitter,this.activate=new r.EventEmitter,this.select=new r.EventEmitter,this.sort=new r.EventEmitter,this.page=new r.EventEmitter,this.reorder=new r.EventEmitter,this.resize=new r.EventEmitter,this.tableContextmenu=new r.EventEmitter(!1),this.treeAction=new r.EventEmitter,this.rowCount=0,this._offsetX=new a.a(0),this._count=0,this._offset=0,this._subscriptions=[],this.rowIdentity=e=>e,this.element=o.nativeElement,this.rowDiffer=s.find({}).create(),this.configuration&&this.configuration.messages&&(this.messages=Object.assign({},this.configuration.messages))}set rows(e){this._rows=e,e&&(this._internalRows=[...e]),this.externalSorting||this.sortInternalRows(),this._internalRows=Re(this._internalRows,Se(this.treeFromRelation),Se(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],He(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"checkbox"===this.selectionType}get isCellSelection(){return"cell"===this.selectionType}get isSingleSelection(){return"single"===this.selectionType}get isMultiSelection(){return"multi"===this.selectionType}get isMultiClickSelection(){return"multiClick"===this.selectionType}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.selectAllRowsOnPage){const t=this.bodyComponent.indexes;e=this.selected.length===t.last-t.first}return this.selected&&this.rows&&0!==this.rows.length&&e}ngOnInit(){this.recalculate()}ngAfterViewInit(){this.externalSorting||this.sortInternalRows(),"undefined"!=typeof requestAnimationFrame&&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 t=e.toArray();t.length&&(this._internalColumns=function(e){const t=[];for(const n of e){const e={},r=Object.getOwnPropertyNames(n);for(const t of r)e[t]=n[t];n.headerTemplate&&(e.headerTemplate=n.headerTemplate),n.cellTemplate&&(e.cellTemplate=n.cellTemplate),n.summaryFunc&&(e.summaryFunc=n.summaryFunc),n.summaryTemplate&&(e.summaryTemplate=n.summaryTemplate),t.push(e)}return t}(t),He(this._internalColumns),this.recalculateColumns(),this.sortInternalRows(),this.cd.markForCheck())}}groupArrayBy(e,t){const n=new Map;return e.forEach(e=>{const r=e[t];n.has(r)?n.get(r).push(e):n.set(r,[e])}),Array.from(n,e=>({key:e[0],value:e[1]}))}ngDoCheck(){this.rowDiffer.diff(this.rows)&&(this.externalSorting?this._internalRows=[...this.rows]:this.sortInternalRows(),this._internalRows=Re(this._internalRows,Se(this.treeFromRelation),Se(this.treeToRelation)),this.recalculatePages(),this.cd.markForCheck())}recalculate(){this.recalculateDims(),this.recalculateColumns()}onWindowResize(){this.recalculate()}recalculateColumns(e=this._internalColumns,t=-1,n=this.scrollbarH){if(!e)return;let r=this._innerWidth;return this.scrollbarV&&(r-=this.scrollbarHelper.width),"force"===this.columnMode?function(e,t,n,r,o=300){const s=e.slice(n+1,e.length).filter(e=>!1!==e.canAutoResize);for(const d of s)d.$$oldWidth||(d.$$oldWidth=d.width);let i=0,a=!1,l=rt(e,o),c=t-l;const h=[];do{i=c/s.length,a=l>=t;for(const e of s){if(a&&r)e.width=e.$$oldWidth||e.width||o;else{const t=(e.width||o)+i;e.minWidth&&t<e.minWidth?(e.width=e.minWidth,h.push(e)):e.maxWidth&&t>e.maxWidth?(e.width=e.maxWidth,h.push(e)):e.width=t}e.width=Math.max(0,e.width)}l=rt(e),c=t-l,nt(s,h)}while(c>1&&0!==s.length)}(e,r,t,n):"flex"===this.columnMode&&function(e,t){const n=function(e,t){let n=0;for(const r of e)n+=r.width;return n}(e),r=function(e){let t=0;for(const n of e)t+=n.flexGrow||0;return t}(e),o=Fe(e);n!==t&&function(e,t,n){for(const s in e)for(const r of e[s])r.canAutoResize?r.width=0:(t-=r.width,n-=r.flexGrow?r.flexGrow:0);const r={};let o=t;do{const t=o/n;o=0;for(const n in e)for(const s of e[n])if(s.canAutoResize&&!r[s.prop]){const e=s.width+s.flexGrow*t;void 0!==s.minWidth&&e<s.minWidth?(o+=e-s.minWidth,s.width=s.minWidth,r[s.prop]=!0):s.width=e}}while(0!==o)}(o,t,r)}(e,r),e}recalculateDims(){const e=this.dimensionsHelper.getDimensions(this.element);if(this._innerWidth=Math.floor(e.width),this.scrollbarV){let t=e.height;this.headerHeight&&(t-=this.headerHeight),this.footerHeight&&(t-=this.footerHeight),this.bodyHeight=t}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 e=Math.ceil(this.bodyHeight/this.rowHeight);return Math.max(e,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:t}){this.tableContextmenu.emit({event:e,type:"header",content:t})}onRowContextmenu({event:e,row:t}){this.tableContextmenu.emit({event:e,type:"body",content:t})}onColumnResize({column:e,newValue:t}){if(void 0===e)return;let n;const r=this._internalColumns.map((r,o)=>((r=Object.assign({},r)).$$id===e.$$id&&(n=o,r.width=t,r.$$oldWidth=t),r));this.recalculateColumns(r,n),this._internalColumns=r,this.resize.emit({column:e,newValue:t})}onColumnReorder({column:e,newValue:t,prevValue:n}){const r=this._internalColumns.map(e=>Object.assign({},e));if(this.swapColumns){const o=r[t];r[t]=e,r[n]=o}else if(t>n){const e=r[n];for(let o=n;o<t;o++)r[o]=r[o+1];r[t]=e}else{const e=r[n];for(let o=n;o>t;o--)r[o]=r[o-1];r[t]=e}this._internalColumns=r,this.reorder.emit({column:e,newValue:t,prevValue:n})}onColumnSort(e){this.selectAllRowsOnPage&&(this.selected=[],this.select.emit({selected:this.selected})),this.sorts=e.sorts,!1===this.externalSorting&&this.sortInternalRows(),this._internalRows=Re(this._internalRows,Se(this.treeFromRelation),Se(this.treeToRelation)),this.offset=0,this.bodyComponent.updateOffsetY(this.offset),this.sort.emit(e)}onHeaderSelect(e){if(this.selectAllRowsOnPage){const e=this.bodyComponent.indexes.first,t=this.bodyComponent.indexes.last,n=this.selected.length===t-e;this.selected=[],n||this.selected.push(...this._internalRows.slice(e,t))}else{const e=this.selected.length===this.rows.length;this.selected=[],e||this.selected.push(...this.rows)}this.select.emit({selected:this.selected})}onBodySelect(e){this.select.emit(e)}onTreeAction(e){const t=e.row,n=this._rows.findIndex(t=>t[this.treeToRelation]===e.row[this.treeToRelation]);this.treeAction.emit({row:t,rowIndex:n})}ngOnDestroy(){this._subscriptions.forEach(e=>e.unsubscribe())}listenForColumnInputChanges(){this._subscriptions.push(this.columnChangesService.columnInputChanges$.subscribe(()=>{this.columnTemplates&&this.columnTemplates.notifyOnChanges()}))}sortInternalRows(){this._internalRows=function(e,t,n){if(!e)return[];if(!n||!n.length||!t)return[...e];const r=new Map;e.forEach((e,t)=>r.set(e,t));const o=[...e],s=t.reduce((e,t)=>(t.comparator&&"function"==typeof t.comparator&&(e[t.prop]=t.comparator),e),{}),i=n.map(e=>{const t=e.prop;return{prop:t,dir:e.dir,valueGetter:xe(t),compareFn:s[t]||ot}});return o.sort((function(e,t){for(const n of i){const{prop:r,valueGetter:o}=n,s=o(e,r),i=o(t,r),a="desc"!==n.dir?n.compareFn(s,i,e,t,n.dir):-n.compareFn(s,i,e,t,n.dir);if(0!==a)return a}return r.has(e)&&r.has(t)?r.get(e)<r.get(t)?-1:1:0}))}(this._internalRows,this._internalColumns,this.sorts)}}return e.\u0275fac=function(t){return new(t||e)(r["\u0275\u0275directiveInject"](ae,4),r["\u0275\u0275directiveInject"](le,4),r["\u0275\u0275directiveInject"](r.ChangeDetectorRef),r["\u0275\u0275directiveInject"](r.ElementRef),r["\u0275\u0275directiveInject"](r.KeyValueDiffers),r["\u0275\u0275directiveInject"](ce),r["\u0275\u0275directiveInject"]("configuration",8))},e.\u0275cmp=r["\u0275\u0275defineComponent"]({type:e,selectors:[["ngx-datatable"]],contentQueries:function(e,t,n){var o;1&e&&(r["\u0275\u0275contentQuery"](n,Ae,!0),r["\u0275\u0275contentQuery"](n,be,!0),r["\u0275\u0275contentQuery"](n,Ve,!0),r["\u0275\u0275contentQuery"](n,ze,!1)),2&e&&(r["\u0275\u0275queryRefresh"](o=r["\u0275\u0275loadQuery"]())&&(t.rowDetail=o.first),r["\u0275\u0275queryRefresh"](o=r["\u0275\u0275loadQuery"]())&&(t.groupHeader=o.first),r["\u0275\u0275queryRefresh"](o=r["\u0275\u0275loadQuery"]())&&(t.footer=o.first),r["\u0275\u0275queryRefresh"](o=r["\u0275\u0275loadQuery"]())&&(t.columnTemplates=o))},viewQuery:function(e,t){var n;1&e&&(r["\u0275\u0275viewQuery"](Je,!0),r["\u0275\u0275viewQuery"](et,!0)),2&e&&(r["\u0275\u0275queryRefresh"](n=r["\u0275\u0275loadQuery"]())&&(t.bodyComponent=n.first),r["\u0275\u0275queryRefresh"](n=r["\u0275\u0275loadQuery"]())&&(t.headerComponent=n.first))},hostAttrs:[1,"ngx-datatable"],hostVars:22,hostBindings:function(e,t){1&e&&r["\u0275\u0275listener"]("resize",(function(){return t.onWindowResize()}),!1,r["\u0275\u0275resolveWindow"]),2&e&&r["\u0275\u0275classProp"]("fixed-header",t.isFixedHeader)("fixed-row",t.isFixedRow)("scroll-vertical",t.isVertScroll)("virtualized",t.isVirtualized)("scroll-horz",t.isHorScroll)("selectable",t.isSelectable)("checkbox-selection",t.isCheckboxSelection)("cell-selection",t.isCellSelection)("single-selection",t.isSingleSelection)("multi-selection",t.isMultiSelection)("multi-click-selection",t.isMultiClickSelection)},inputs:{selected:"selected",scrollbarV:"scrollbarV",scrollbarH:"scrollbarH",rowHeight:"rowHeight",columnMode:"columnMode",headerHeight:"headerHeight",footerHeight:"footerHeight",externalPaging:"externalPaging",externalSorting:"externalSorting",loadingIndicator:"loadingIndicator",reorderable:"reorderable",swapColumns:"swapColumns",sortType:"sortType",sorts:"sorts",cssClasses:"cssClasses",messages:"messages",groupExpansionDefault:"groupExpansionDefault",selectAllRowsOnPage:"selectAllRowsOnPage",virtualization:"virtualization",summaryRow:"summaryRow",summaryHeight:"summaryHeight",summaryPosition:"summaryPosition",rowIdentity:"rowIdentity",rows:"rows",groupedRows:"groupedRows",groupRowsBy:"groupRowsBy",columns:"columns",limit:"limit",count:"count",offset:"offset",targetMarkerTemplate:"targetMarkerTemplate",selectionType:"selectionType",rowClass:"rowClass",selectCheck:"selectCheck",displayCheck:"displayCheck",trackByProp:"trackByProp",treeFromRelation:"treeFromRelation",treeToRelation:"treeToRelation"},outputs:{scroll:"scroll",activate:"activate",select:"select",sort:"sort",page:"page",reorder:"reorder",resize:"resize",tableContextmenu:"tableContextmenu",treeAction:"treeAction"},decls:5,vars:34,consts:[["visibilityObserver","",3,"visible"],[3,"sorts","sortType","scrollbarH","innerWidth","offsetX","dealsWithGroup","columns","headerHeight","reorderable","targetMarkerTemplate","sortAscendingIcon","sortDescendingIcon","allRowsSelected","selectionType","sort","resize","reorder","select","columnContextmenu",4,"ngIf"],[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"],[3,"sorts","sortType","scrollbarH","innerWidth","offsetX","dealsWithGroup","columns","headerHeight","reorderable","targetMarkerTemplate","sortAscendingIcon","sortDescendingIcon","allRowsSelected","selectionType","sort","resize","reorder","select","columnContextmenu"],[3,"rowCount","pageSize","offset","footerHeight","footerTemplate","totalMessage","pagerLeftArrowIcon","pagerRightArrowIcon","pagerPreviousIcon","selectedCount","selectedMessage","pagerNextIcon","page"]],template:function(e,t){1&e&&(r["\u0275\u0275elementStart"](0,"div",0),r["\u0275\u0275listener"]("visible",(function(){return t.recalculate()})),r["\u0275\u0275template"](1,C,2,16,"datatable-header",1),r["\u0275\u0275elementStart"](2,"datatable-body",2),r["\u0275\u0275listener"]("page",(function(e){return t.onBodyPage(e)}))("activate",(function(e){return t.activate.emit(e)}))("rowContextmenu",(function(e){return t.onRowContextmenu(e)}))("select",(function(e){return t.onBodySelect(e)}))("scroll",(function(e){return t.onBodyScroll(e)}))("treeAction",(function(e){return t.onTreeAction(e)})),r["\u0275\u0275pipe"](3,"async"),r["\u0275\u0275elementEnd"](),r["\u0275\u0275template"](4,I,1,12,"datatable-footer",3),r["\u0275\u0275elementEnd"]()),2&e&&(r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngIf",t.headerHeight),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("groupRowsBy",t.groupRowsBy)("groupedRows",t.groupedRows)("rows",t._internalRows)("groupExpansionDefault",t.groupExpansionDefault)("scrollbarV",t.scrollbarV)("scrollbarH",t.scrollbarH)("virtualization",t.virtualization)("loadingIndicator",t.loadingIndicator)("externalPaging",t.externalPaging)("rowHeight",t.rowHeight)("rowCount",t.rowCount)("offset",t.offset)("trackByProp",t.trackByProp)("columns",t._internalColumns)("pageSize",t.pageSize)("offsetX",r["\u0275\u0275pipeBind1"](3,32,t._offsetX))("rowDetail",t.rowDetail)("groupHeader",t.groupHeader)("selected",t.selected)("innerWidth",t._innerWidth)("bodyHeight",t.bodyHeight)("selectionType",t.selectionType)("emptyMessage",t.messages.emptyMessage)("rowIdentity",t.rowIdentity)("rowClass",t.rowClass)("selectCheck",t.selectCheck)("displayCheck",t.displayCheck)("summaryRow",t.summaryRow)("summaryHeight",t.summaryHeight)("summaryPosition",t.summaryPosition),r["\u0275\u0275advance"](2),r["\u0275\u0275property"]("ngIf",t.footerHeight))},directives:function(){return[de,o.NgIf,Je,et,at]},pipes:function(){return[o.AsyncPipe]},styles:[".ngx-datatable{display:block;overflow:hidden;justify-content:center;position:relative;-webkit-transform:translate3d(0,0,0)}.ngx-datatable [hidden]{display:none!important}.ngx-datatable *,.ngx-datatable :after,.ngx-datatable :before{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-header-inner,.ngx-datatable .datatable-row-center{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:0}.ngx-datatable .datatable-row-left,.ngx-datatable .datatable-row-right{z-index:9}.ngx-datatable .datatable-row-center,.ngx-datatable .datatable-row-group,.ngx-datatable .datatable-row-left,.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:0}.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:0}.ngx-datatable .datatable-footer .datatable-pager .pager li a{cursor:pointer;display:inline-block}.ngx-datatable .datatable-footer .datatable-pager .pager li.disabled a{cursor:not-allowed}"],encapsulation:2,changeDetection:0}),Object(c.a)([function(e,t,n){return{configurable:!0,enumerable:n.enumerable,get:function(){return Object.defineProperty(this,t,{configurable:!0,enumerable:n.enumerable,value:tt(n.value,5,void 0)}),this[t]}}},Object(c.b)("design:type",Function),Object(c.b)("design:paramtypes",[]),Object(c.b)("design:returntype",void 0)],e.prototype,"onWindowResize",null),e})(),it=(()=>{class e{constructor(e){this.cd=e,this.sort=new r.EventEmitter,this.select=new r.EventEmitter,this.columnContextmenu=new r.EventEmitter(!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}get 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 t=this.column.headerClass({column:this.column});if("string"==typeof t)e+=t;else if("object"==typeof t){const n=Object.keys(t);for(const r of n)!0===t[r]&&(e+=" "+r)}}const t=this.sortDir;return t&&(e+=" sort-active sort-"+t),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&&"checkbox"===this.selectionType}onContextmenu(e){this.columnContextmenu.emit({event:e,column:this.column})}calcSortDir(e){if(e&&this.column){const t=e.find(e=>e.prop===this.column.prop);if(t)return t.dir}}onSort(){if(!this.column.sortable)return;const e=(t=this.sortDir,"single"===this.sortType?"asc"===t?"desc":"asc":t?"asc"===t?"desc":void 0:"asc");var t;this.sort.emit({column:this.column,prevValue:this.sortDir,newValue:e})}calcSortClass(e){return"asc"===e?"sort-btn sort-asc "+this.sortAscendingIcon:"desc"===e?"sort-btn sort-desc "+this.sortDescendingIcon:"sort-btn"}}return e.\u0275fac=function(t){return new(t||e)(r["\u0275\u0275directiveInject"](r.ChangeDetectorRef))},e.\u0275cmp=r["\u0275\u0275defineComponent"]({type:e,selectors:[["datatable-header-cell"]],hostAttrs:[1,"datatable-header-cell"],hostVars:11,hostBindings:function(e,t){1&e&&r["\u0275\u0275listener"]("contextmenu",(function(e){return t.onContextmenu(e)})),2&e&&(r["\u0275\u0275attribute"]("title",t.name),r["\u0275\u0275classMap"](t.columnCssClasses),r["\u0275\u0275styleProp"]("min-width",t.minWidth,"px")("max-width",t.maxWidth,"px")("width",t.width,"px")("height",t.headerHeight,"px"))},inputs:{allRowsSelected:"allRowsSelected",column:"column",sorts:"sorts",sortType:"sortType",sortAscendingIcon:"sortAscendingIcon",sortDescendingIcon:"sortDescendingIcon",isTarget:"isTarget",targetMarkerTemplate:"targetMarkerTemplate",targetMarkerContext:"targetMarkerContext",selectionType:"selectionType",headerHeight:"headerHeight"},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,t){1&e&&(r["\u0275\u0275elementStart"](0,"div",0),r["\u0275\u0275template"](1,R,1,2,void 0,1),r["\u0275\u0275template"](2,T,2,1,"label",2),r["\u0275\u0275template"](3,E,2,1,"span",3),r["\u0275\u0275template"](4,k,1,2,void 0,1),r["\u0275\u0275elementStart"](5,"span",4),r["\u0275\u0275listener"]("click",(function(){return t.onSort()})),r["\u0275\u0275elementEnd"](),r["\u0275\u0275elementEnd"]()),2&e&&(r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngIf",t.isTarget),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngIf",t.isCheckboxable),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngIf",!t.column.headerTemplate),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngIf",t.column.headerTemplate),r["\u0275\u0275advance"](1),r["\u0275\u0275classMap"](t.sortClass))},directives:[o.NgIf,o.NgTemplateOutlet],encapsulation:2,changeDetection:0}),e})(),at=(()=>{class e{constructor(){this.selectedCount=0,this.page=new r.EventEmitter}get isVisible(){return this.rowCount/this.pageSize>1}get curPage(){return this.offset+1}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=r["\u0275\u0275defineComponent"]({type:e,selectors:[["datatable-footer"]],hostAttrs:[1,"datatable-footer"],inputs:{selectedCount:"selectedCount",footerHeight:"footerHeight",rowCount:"rowCount",pageSize:"pageSize",offset:"offset",pagerLeftArrowIcon:"pagerLeftArrowIcon",pagerRightArrowIcon:"pagerRightArrowIcon",pagerPreviousIcon:"pagerPreviousIcon",pagerNextIcon:"pagerNextIcon",totalMessage:"totalMessage",footerTemplate:"footerTemplate",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,t){1&e&&(r["\u0275\u0275elementStart"](0,"div",0),r["\u0275\u0275template"](1,D,1,8,void 0,1),r["\u0275\u0275template"](2,M,3,3,"div",2),r["\u0275\u0275template"](3,A,1,8,"datatable-pager",3),r["\u0275\u0275elementEnd"]()),2&e&&(r["\u0275\u0275styleProp"]("height",t.footerHeight,"px"),r["\u0275\u0275property"]("ngClass",r["\u0275\u0275pureFunction1"](6,V,t.selectedMessage)),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngIf",t.footerTemplate),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngIf",!t.footerTemplate),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngIf",!t.footerTemplate))},directives:function(){return[o.NgClass,o.NgIf,o.NgTemplateOutlet,lt]},encapsulation:2,changeDetection:0}),e})(),lt=(()=>{class e{constructor(){this.change=new r.EventEmitter,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 t=[];let n=1,r=this.totalPages;e=e||this.page,5<this.totalPages&&(n=e-Math.floor(2.5),r=e+Math.floor(2.5),n<1?(n=1,r=Math.min(n+5-1,this.totalPages)):r>this.totalPages&&(n=Math.max(this.totalPages-5+1,1),r=this.totalPages));for(let o=n;o<=r;o++)t.push({number:o,text:o});return t}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=r["\u0275\u0275defineComponent"]({type:e,selectors:[["datatable-pager"]],hostAttrs:[1,"datatable-pager"],inputs:{size:"size",count:"count",page:"page",pagerLeftArrowIcon:"pagerLeftArrowIcon",pagerRightArrowIcon:"pagerRightArrowIcon",pagerPreviousIcon:"pagerPreviousIcon",pagerNextIcon:"pagerNextIcon"},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,t){1&e&&(r["\u0275\u0275elementStart"](0,"ul",0),r["\u0275\u0275elementStart"](1,"li"),r["\u0275\u0275elementStart"](2,"a",1),r["\u0275\u0275listener"]("click",(function(){return t.selectPage(1)})),r["\u0275\u0275element"](3,"i"),r["\u0275\u0275elementEnd"](),r["\u0275\u0275elementEnd"](),r["\u0275\u0275elementStart"](4,"li"),r["\u0275\u0275elementStart"](5,"a",2),r["\u0275\u0275listener"]("click",(function(){return t.prevPage()})),r["\u0275\u0275element"](6,"i"),r["\u0275\u0275elementEnd"](),r["\u0275\u0275elementEnd"](),r["\u0275\u0275template"](7,F,3,4,"li",3),r["\u0275\u0275elementStart"](8,"li"),r["\u0275\u0275elementStart"](9,"a",4),r["\u0275\u0275listener"]("click",(function(){return t.nextPage()})),r["\u0275\u0275element"](10,"i"),r["\u0275\u0275elementEnd"](),r["\u0275\u0275elementEnd"](),r["\u0275\u0275elementStart"](11,"li"),r["\u0275\u0275elementStart"](12,"a",5),r["\u0275\u0275listener"]("click",(function(){return t.selectPage(t.totalPages)})),r["\u0275\u0275element"](13,"i"),r["\u0275\u0275elementEnd"](),r["\u0275\u0275elementEnd"](),r["\u0275\u0275elementEnd"]()),2&e&&(r["\u0275\u0275advance"](1),r["\u0275\u0275classProp"]("disabled",!t.canPrevious()),r["\u0275\u0275advance"](2),r["\u0275\u0275classMap"](t.pagerPreviousIcon),r["\u0275\u0275advance"](1),r["\u0275\u0275classProp"]("disabled",!t.canPrevious()),r["\u0275\u0275advance"](2),r["\u0275\u0275classMap"](t.pagerLeftArrowIcon),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngForOf",t.pages),r["\u0275\u0275advance"](1),r["\u0275\u0275classProp"]("disabled",!t.canNext()),r["\u0275\u0275advance"](2),r["\u0275\u0275classMap"](t.pagerRightArrowIcon),r["\u0275\u0275advance"](1),r["\u0275\u0275classProp"]("disabled",!t.canNext()),r["\u0275\u0275advance"](2),r["\u0275\u0275classMap"](t.pagerNextIcon))},directives:[o.NgForOf],encapsulation:2,changeDetection:0}),e})(),ct=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=r["\u0275\u0275defineComponent"]({type:e,selectors:[["datatable-progress"]],decls:3,vars:0,consts:[["role","progressbar",1,"progress-linear"],[1,"container"],[1,"bar"]],template:function(e,t){1&e&&(r["\u0275\u0275elementStart"](0,"div",0),r["\u0275\u0275elementStart"](1,"div",1),r["\u0275\u0275element"](2,"div",2),r["\u0275\u0275elementEnd"](),r["\u0275\u0275elementEnd"]())},encapsulation:2,changeDetection:0}),e})();const ht=function(){var e={up:38,down:40,return:13,escape:27,left:37,right:39};return e[e.up]="up",e[e.down]="down",e[e.return]="return",e[e.escape]="escape",e[e.left]="left",e[e.right]="right",e}();let dt=(()=>{class e{constructor(e,t,n,o){this.differs=e,this.scrollbarHelper=t,this.cd=n,this.treeStatus="collapsed",this.activate=new r.EventEmitter,this.treeAction=new r.EventEmitter,this._groupStyles={left:{},center:{},right:{}},this._element=o.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 e=Fe(this._columns);this._columnGroupWidths=We(e,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 t=this.rowClass(this.row);if("string"==typeof t)e+=" "+t;else if("object"==typeof t){const n=Object.keys(t);for(const r of n)!0===t[r]&&(e+=" "+r)}}return e}get columnsTotalWidths(){return this._columnGroupWidths.total}ngDoCheck(){this._rowDiffer.diff(this.row)&&this.cd.markForCheck()}trackByGroups(e,t){return t.type}columnTrackingFn(e,t){return t.$$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 t=this._columnGroupWidths,n=this.offsetX,r={width:t[e]+"px"};if("left"===e)Ze(r,n,0);else if("right"===e){const e=parseInt(this.innerWidth+"",0);Ze(r,-1*(t.total-e-n+this.scrollbarHelper.width),0)}return r}onActivate(e,t){e.cellIndex=t,e.rowElement=this._element,this.activate.emit(e)}onKeyDown(e){const t=e.keyCode;(t===ht.return||t===ht.down||t===ht.up||t===ht.left||t===ht.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})}recalculateColumns(e=this.columns){this._columns=e;const t=Fe(this._columns);this._columnsByPin=Be(this._columns),this._columnGroupWidths=We(t,this._columns)}onTreeAction(){this.treeAction.emit()}}return e.\u0275fac=function(t){return new(t||e)(r["\u0275\u0275directiveInject"](r.KeyValueDiffers),r["\u0275\u0275directiveInject"](ae,4),r["\u0275\u0275directiveInject"](r.ChangeDetectorRef),r["\u0275\u0275directiveInject"](r.ElementRef))},e.\u0275cmp=r["\u0275\u0275defineComponent"]({type:e,selectors:[["datatable-body-row"]],hostVars:6,hostBindings:function(e,t){1&e&&r["\u0275\u0275listener"]("keydown",(function(e){return t.onKeyDown(e)}))("mouseenter",(function(e){return t.onMouseenter(e)})),2&e&&(r["\u0275\u0275classMap"](t.cssClass),r["\u0275\u0275styleProp"]("width",t.columnsTotalWidths,"px")("height",t.rowHeight,"px"))},inputs:{treeStatus:"treeStatus",columns:"columns",innerWidth:"innerWidth",offsetX:"offsetX",expanded:"expanded",rowClass:"rowClass",row:"row",group:"group",isSelected:"isSelected",rowIndex:"rowIndex",displayCheck:"displayCheck",rowHeight:"rowHeight"},outputs:{activate:"activate",treeAction:"treeAction"},decls:1,vars:2,consts:[[3,"class","ngStyle",4,"ngFor","ngForOf","ngForTrackBy"],[3,"ngStyle"],["tabindex","-1",3,"row","group","expanded","isSelected","rowIndex","column","rowHeight","displayCheck","treeStatus","activate","treeAction",4,"ngFor","ngForOf","ngForTrackBy"],["tabindex","-1",3,"row","group","expanded","isSelected","rowIndex","column","rowHeight","displayCheck","treeStatus","activate","treeAction"]],template:function(e,t){1&e&&r["\u0275\u0275template"](0,O,2,6,"div",0),2&e&&r["\u0275\u0275property"]("ngForOf",t._columnsByPin)("ngForTrackBy",t.trackByGroups)},directives:function(){return[o.NgForOf,o.NgStyle,gt]},encapsulation:2,changeDetection:0}),e})(),ut=(()=>{class e{constructor(e,t){this.cd=e,this.differs=t,this.rowContextmenu=new r.EventEmitter(!1),this.groupContext={group:this.row,expanded:this.expanded,rowIndex:this.rowIndex},this.rowContext={row:this.row,expanded:this.expanded,rowIndex:this.rowIndex},this._expanded=!1,this.rowDiffer=t.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 e.\u0275fac=function(t){return new(t||e)(r["\u0275\u0275directiveInject"](r.ChangeDetectorRef),r["\u0275\u0275directiveInject"](r.KeyValueDiffers))},e.\u0275cmp=r["\u0275\u0275defineComponent"]({type:e,selectors:[["datatable-row-wrapper"]],hostAttrs:[1,"datatable-row-wrapper"],hostBindings:function(e,t){1&e&&r["\u0275\u0275listener"]("contextmenu",(function(e){return t.onContextmenu(e)}))},inputs:{rowIndex:"rowIndex",expanded:"expanded",innerWidth:"innerWidth",rowDetail:"rowDetail",groupHeader:"groupHeader",offsetX:"offsetX",detailRowHeight:"detailRowHeight",row:"row",groupedRows:"groupedRows"},outputs:{rowContextmenu:"rowContextmenu"},ngContentSelectors:h,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,t){1&e&&(r["\u0275\u0275projectionDef"](),r["\u0275\u0275template"](0,j,2,2,"div",0),r["\u0275\u0275template"](1,L,1,0,void 0,1),r["\u0275\u0275template"](2,$,2,3,"div",2)),2&e&&(r["\u0275\u0275property"]("ngIf",t.groupHeader&&t.groupHeader.template),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngIf",t.groupHeader&&t.groupHeader.template&&t.expanded||!t.groupHeader||!t.groupHeader.template),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngIf",t.rowDetail&&t.rowDetail.template&&t.expanded))},directives:[o.NgIf,o.NgStyle,o.NgTemplateOutlet],encapsulation:2,changeDetection:0}),e})(),gt=(()=>{class e{constructor(e,t){this.cd=t,this.activate=new r.EventEmitter,this.treeAction=new r.EventEmitter,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}set 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 t=this.column.cellClass({row:this.row,group:this.group,column:this.column,value:this.value,rowHeight:this.rowHeight});if("string"==typeof t)e+=t;else if("object"==typeof t){const n=Object.keys(t);for(const r of n)!0===t[r]&&(e+=" "+r)}}return this.sortDir||(e+=" sort-active"),this.isFocused&&(e+=" active"),"asc"===this.sortDir&&(e+=" sort-asc"),"desc"===this.sortDir&&(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 t=this.column.$$valueGetter(this.row,this.column.prop),n=this.column.pipe;n?e=n.transform(t):void 0!==e&&(e=t)}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 t=e.keyCode;(t===ht.return||t===ht.down||t===ht.up||t===ht.left||t===ht.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 t=e.find(e=>e.prop===this.column.prop);return t?t.dir:void 0}stripHtml(e){return e.replace?e.replace(/<\/?[^>]+(>|$)/g,""):e}onTreeAction(){this.treeAction.emit(this.row)}calcLeftMargin(e,t){return e.isTreeColumn?t.level*(null!=e.treeLevelIndent?e.treeLevelIndent:50):0}}return e.\u0275fac=function(t){return new(t||e)(r["\u0275\u0275directiveInject"](r.ElementRef),r["\u0275\u0275directiveInject"](r.ChangeDetectorRef))},e.\u0275cmp=r["\u0275\u0275defineComponent"]({type:e,selectors:[["datatable-body-cell"]],viewQuery:function(e,t){var n;1&e&&r["\u0275\u0275staticViewQuery"](Q,!0,r.ViewContainerRef),2&e&&r["\u0275\u0275queryRefresh"](n=r["\u0275\u0275loadQuery"]())&&(t.cellTemplate=n.first)},hostVars:10,hostBindings:function(e,t){1&e&&r["\u0275\u0275listener"]("focus",(function(){return t.onFocus()}))("blur",(function(){return t.onBlur()}))("click",(function(e){return t.onClick(e)}))("dblclick",(function(e){return t.onDblClick(e)}))("keydown",(function(e){return t.onKeyDown(e)})),2&e&&(r["\u0275\u0275classMap"](t.columnCssClasses),r["\u0275\u0275styleProp"]("width",t.width,"px")("min-width",t.minWidth,"px")("max-width",t.maxWidth,"px")("height",t.height))},inputs:{group:"group",rowHeight:"rowHeight",isSelected:"isSelected",expanded:"expanded",rowIndex:"rowIndex",column:"column",row:"row",sorts:"sorts",treeStatus:"treeStatus",displayCheck:"displayCheck"},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,t){1&e&&(r["\u0275\u0275elementStart"](0,"div",0),r["\u0275\u0275template"](1,Y,2,1,"label",1),r["\u0275\u0275template"](2,ne,3,2,"ng-container",2),r["\u0275\u0275template"](3,re,1,2,"span",3),r["\u0275\u0275template"](4,se,2,2,void 0,2),r["\u0275\u0275elementEnd"]()),2&e&&(r["\u0275\u0275styleProp"]("margin-left",t.calcLeftMargin(t.column,t.row),"px"),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngIf",t.column.checkboxable&&(!t.displayCheck||t.displayCheck(t.row,t.column,t.value))),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngIf",t.column.isTreeColumn),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngIf",!t.column.cellTemplate),r["\u0275\u0275advance"](1),r["\u0275\u0275property"]("ngIf",t.column.cellTemplate))},directives:[o.NgIf,o.NgTemplateOutlet],encapsulation:2,changeDetection:0}),e})();function pt(e,t,n){const r=n(t,e);return r>-1?e.splice(r,1):e.push(t),e}let mt=(()=>{class e{constructor(){this.activate=new r.EventEmitter,this.select=new r.EventEmitter}selectRow(e,t,n){if(!this.selectEnabled)return;const r="checkbox"===this.selectionType,o="multiClick"===this.selectionType;let s=[];s="multi"===this.selectionType||r||o?e.shiftKey?function(e,t,n,r,o){const s=n<r;for(let i=0;i<t.length;i++){const o=t[i],a=i>=r&&i<=n,l=i<=r&&i>=n;let c={start:0,end:0};c=s?{start:n,end:r}:{start:r,end:n+1},(s&&l||!s&&a)&&i>=c.start&&i<=c.end&&e.push(o)}return e}([],this.rows,t,this.prevIndex,this.getRowSelectedIdx.bind(this)):pt(e.ctrlKey||e.metaKey||o||r?[...this.selected]:[],n,this.getRowSelectedIdx.bind(this)):pt([],n,this.getRowSelectedIdx.bind(this)),"function"==typeof this.selectCheck&&(s=s.filter(this.selectCheck.bind(this))),this.selected.splice(0,this.selected.length),this.selected.push(...s),this.prevIndex=t,this.select.emit({selected:s})}onActivate(e,t){const{type:n,event:r,row:o}=e,s="checkbox"===this.selectionType;!s&&("click"===n||"dblclick"===n)||s&&"checkbox"===n?this.selectRow(r,t,o):"keydown"===n&&(r.keyCode===ht.return?this.selectRow(r,t,o):this.onKeyboardFocus(e)),this.activate.emit(e)}onKeyboardFocus(e){const{keyCode:t}=e.event;if(t===ht.up||t===ht.down||t===ht.right||t===ht.left){const n="cell"===this.selectionType;e.cellElement&&n?n&&this.focusCell(e.cellElement,e.rowElement,t,e.cellIndex):this.focusRow(e.rowElement,t)}}focusRow(e,t){const n=this.getPrevNextRow(e,t);n&&n.focus()}getPrevNextRow(e,t){const n=e.parentElement;if(n){let e;if(t===ht.up?e=n.previousElementSibling:t===ht.down&&(e=n.nextElementSibling),e&&e.children.length)return e.children[0]}}focusCell(e,t,n,r){let o;if(n===ht.left)o=e.previousElementSibling;else if(n===ht.right)o=e.nextElementSibling;else if(n===ht.up||n===ht.down){const e=this.getPrevNextRow(t,n);if(e){const t=e.getElementsByClassName("datatable-body-cell");t.length&&(o=t[r])}}o&&o.focus()}getRowSelected(e){return this.getRowSelectedIdx(e,this.selected)>-1}getRowSelectedIdx(e,t){if(!t||!t.length)return-1;const n=this.rowIdentity(e);return t.findIndex(e=>this.rowIdentity(e)===n)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=r["\u0275\u0275defineComponent"]({type:e,selectors:[["datatable-selection"]],inputs:{rows:"rows",selected:"selected",selectEnabled:"selectEnabled",selectionType:"selectionType",rowIdentity:"rowIdentity",selectCheck:"selectCheck"},outputs:{activate:"activate",select:"select"},ngContentSelectors:h,decls:1,vars:0,template:function(e,t){1&e&&(r["\u0275\u0275projectionDef"](),r["\u0275\u0275projection"](0))},encapsulation:2,changeDetection:0}),e})();function ft(e){const t=e.filter(e=>!!e);return t.length?t.some(e=>"number"!=typeof e)?null:t.reduce((e,t)=>e+t):null}function wt(e){return null}let bt=(()=>{class e{constructor(){this.summaryRow={}}ngOnChanges(){this.columns&&this.rows&&(this.updateInternalColumns(),this.updateValues())}updateInternalColumns(){this._internalColumns=this.columns.map(e=>Object.assign({},e,{cellTemplate:e.summaryTemplate}))}updateValues(){this.summaryRow={},this.columns.filter(e=>!e.summaryTemplate).forEach(e=>{const t=this.rows.map(t=>t[e.prop]),n=this.getSummaryFunction(e);this.summaryRow[e.prop]=e.pipe?e.pipe.transform(n(t)):n(t)})}getSummaryFunction(e){return void 0===e.summaryFunc?ft:null===e.summaryFunc?wt:e.summaryFunc}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=r["\u0275\u0275defineComponent"]({type:e,selectors:[["datatable-summary-row"]],hostAttrs:[1,"datatable-summary-row"],inputs:{rows:"rows",columns:"columns",rowHeight:"rowHeight",offsetX:"offsetX",innerWidth:"innerWidth"},features:[r["\u0275\u0275NgOnChangesFeature"]()],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,t){1&e&&r["\u0275\u0275template"](0,ie,1,6,"datatable-body-row",0),2&e&&r["\u0275\u0275property"]("ngIf",t.summaryRow&&t._internalColumns)},directives:[o.NgIf,dt],encapsulation:2}),e})(),yt=(()=>{class e{static forRoot(t){return{ngModule:e,providers:[{provide:"configuration",useValue:t}]}}}return e.\u0275mod=r["\u0275\u0275defineNgModule"]({type:e}),e.\u0275inj=r["\u0275\u0275defineInjector"]({factory:function(t){return new(t||e)},providers:[ae,le,ce],imports:[[o.CommonModule]]}),e})();"undefined"==typeof document||document.elementsFromPoint||(document.elementsFromPoint=function(e,t){const n=[],r=[];let o,s,i;for(;(o=document.elementFromPoint(e,t))&&-1===n.indexOf(o)&&null!=o;)n.push(o),r.push({value:o.style.getPropertyValue("pointer-events"),priority:o.style.getPropertyPriority("pointer-events")}),o.style.setProperty("pointer-events","none","important");for(s=r.length;i=r[--s];)n[s].style.setProperty("pointer-events",i.value?i.value:"",i.priority);return n})},urQ3:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n("ofXK"),o=n("3Pt+"),s=n("aceb"),i=n("ZOsW"),a=n("sYmb"),l=n("lDzL"),c=n("fXoL");let h=(()=>{class e{}return e.\u0275mod=c["\u0275\u0275defineNgModule"]({type:e}),e.\u0275inj=c["\u0275\u0275defineInjector"]({factory:function(t){return new(t||e)},providers:[l.h],imports:[[r.CommonModule,o.FormsModule,s.W,s.z,i.b,s.s,a.b,s.T,o.ReactiveFormsModule,s.t,s.Xb]]}),e})()}}]);