File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
/* Tabulator v4.9.3 (c) Oliver Folkerd */
"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),o=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n<o;){var s=e[n];if(t.call(i,s,n,e))return n;n++}return-1}}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),o=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n<o;){var s=e[n];if(t.call(i,s,n,e))return s;n++}}}),String.prototype.includes||(String.prototype.includes=function(t,e){if(t instanceof RegExp)throw TypeError("first argument must not be a RegExp");return void 0===e&&(e=0),-1!==this.indexOf(t,e)}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(t,e){if(null==this)throw new TypeError('"this" is null or not defined');var o=Object(this),i=o.length>>>0;if(0===i)return!1;var n,s,a=0|e,r=Math.max(a>=0?a:i-Math.abs(a),0);for(;r<i;){if((n=o[r])===(s=t)||"number"==typeof n&&"number"==typeof s&&isNaN(n)&&isNaN(s))return!0;r++}return!1}}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var o=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(o[s]=n[s])}return o},writable:!0,configurable:!0});var ColumnManager=function(t){this.table=t,this.blockHozScrollEvent=!1,this.headersElement=this.createHeadersElement(),this.element=this.createHeaderElement(),this.rowManager=null,this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.scrollLeft=0,this.element.insertBefore(this.headersElement,this.element.firstChild)};ColumnManager.prototype.createHeadersElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-headers"),t},ColumnManager.prototype.createHeaderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-header"),this.table.options.headerVisible||t.classList.add("tabulator-header-hidden"),t},ColumnManager.prototype.initialize=function(){},ColumnManager.prototype.setRowManager=function(t){this.rowManager=t},ColumnManager.prototype.getElement=function(){return this.element},ColumnManager.prototype.getHeadersElement=function(){return this.headersElement},ColumnManager.prototype.scrollHorizontal=function(t){var e=0,o=this.element.scrollWidth-this.table.element.clientWidth;this.element.scrollLeft=t,t>o?(e=t-o,this.element.style.marginLeft=-e+"px"):this.element.style.marginLeft=0,this.scrollLeft=t,this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.scrollHorizontal()},ColumnManager.prototype.generateColumnsFromRowData=function(t){var e,o,i=[],n=this.table.options.autoColumnsDefinitions;if(t&&t.length){for(var s in e=t[0]){var a={field:s,title:s},r=e[s];switch(void 0===r?"undefined":_typeof(r)){case"undefined":o="string";break;case"boolean":o="boolean";break;case"object":o=Array.isArray(r)?"array":"string";break;default:o=isNaN(r)||""===r?r.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?"alphanum":"string":"number"}a.sorter=o,i.push(a)}if(n)switch(void 0===n?"undefined":_typeof(n)){case"function":this.table.options.columns=n.call(this.table,i);break;case"object":Array.isArray(n)?i.forEach((function(t){var e=n.find((function(e){return e.field===t.field}));e&&Object.assign(t,e)})):i.forEach((function(t){n[t.field]&&Object.assign(t,n[t.field])})),this.table.options.columns=i}else this.table.options.columns=i;this.setColumns(this.table.options.columns)}},ColumnManager.prototype.setColumns=function(t,e){for(var o=this;o.headersElement.firstChild;)o.headersElement.removeChild(o.headersElement.firstChild);o.columns=[],o.columnsByIndex=[],o.columnsByField={},o.table.modExists("frozenColumns")&&o.table.modules.frozenColumns.reset(),t.forEach((function(t,e){o._addColumn(t)})),o._reIndexColumns(),o.table.options.responsiveLayout&&o.table.modExists("responsiveLayout",!0)&&o.table.modules.responsiveLayout.initialize(),this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize(!1,!0),o.redraw(!0)},ColumnManager.prototype._addColumn=function(t,e,o){var i=new Column(t,this),n=i.getElement(),s=o?this.findColumnIndex(o):o;if(o&&s>-1){var a=this.columns.indexOf(o.getTopColumn()),r=o.getElement();e?(this.columns.splice(a,0,i),r.parentNode.insertBefore(n,r)):(this.columns.splice(a+1,0,i),r.parentNode.insertBefore(n,r.nextSibling))}else e?(this.columns.unshift(i),this.headersElement.insertBefore(i.getElement(),this.headersElement.firstChild)):(this.columns.push(i),this.headersElement.appendChild(i.getElement())),i.columnRendered();return i},ColumnManager.prototype.registerColumnField=function(t){t.definition.field&&(this.columnsByField[t.definition.field]=t)},ColumnManager.prototype.registerColumnPosition=function(t){this.columnsByIndex.push(t)},ColumnManager.prototype._reIndexColumns=function(){this.columnsByIndex=[],this.columns.forEach((function(t){t.reRegisterPosition()}))},ColumnManager.prototype._verticalAlignHeaders=function(){var t=this,e=0;t.columns.forEach((function(t){var o;t.clearVerticalAlign(),(o=t.getHeight())>e&&(e=o)})),t.columns.forEach((function(o){o.verticalAlign(t.table.options.columnHeaderVertAlign,e)})),t.rowManager.adjustTableSize()},ColumnManager.prototype.findColumn=function(t){return"object"!=(void 0===t?"undefined":_typeof(t))?this.columnsByField[t]||!1:t instanceof Column?t:t instanceof ColumnComponent?t._getSelf()||!1:"undefined"!=typeof HTMLElement&&t instanceof HTMLElement&&this.columns.find((function(e){return e.element===t}))||!1},ColumnManager.prototype.getColumnByField=function(t){return this.columnsByField[t]},ColumnManager.prototype.getColumnsByFieldRoot=function(t){var e=this,o=[];return Object.keys(this.columnsByField).forEach((function(i){i.split(".")[0]===t&&o.push(e.columnsByField[i])})),o},ColumnManager.prototype.getColumnByIndex=function(t){return this.columnsByIndex[t]},ColumnManager.prototype.getFirstVisibileColumn=function(t){return(t=this.columnsByIndex.findIndex((function(t){return t.visible})))>-1&&this.columnsByIndex[t]},ColumnManager.prototype.getColumns=function(){return this.columns},ColumnManager.prototype.findColumnIndex=function(t){return this.columnsByIndex.findIndex((function(e){return t===e}))},ColumnManager.prototype.getRealColumns=function(){return this.columnsByIndex},ColumnManager.prototype.traverse=function(t){this.columnsByIndex.forEach((function(e,o){t(e,o)}))},ColumnManager.prototype.getDefinitions=function(t){var e=[];return this.columnsByIndex.forEach((function(o){(!t||t&&o.visible)&&e.push(o.getDefinition())})),e},ColumnManager.prototype.getDefinitionTree=function(){var t=[];return this.columns.forEach((function(e){t.push(e.getDefinition(!0))})),t},ColumnManager.prototype.getComponents=function(t){var e=[];return(t?this.columns:this.columnsByIndex).forEach((function(t){e.push(t.getComponent())})),e},ColumnManager.prototype.getWidth=function(){var t=0;return this.columnsByIndex.forEach((function(e){e.visible&&(t+=e.getWidth())})),t},ColumnManager.prototype.moveColumn=function(t,e,o){this.moveColumnActual(t,e,o),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),e.element.parentNode.insertBefore(t.element,e.element),o&&e.element.parentNode.insertBefore(e.element,t.element),this._verticalAlignHeaders(),this.table.rowManager.reinitialize()},ColumnManager.prototype.moveColumnActual=function(t,e,o){t.parent.isGroup?this._moveColumnInArray(t.parent.columns,t,e,o):this._moveColumnInArray(this.columns,t,e,o),this._moveColumnInArray(this.columnsByIndex,t,e,o,!0),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize(!0),this.table.options.columnMoved&&this.table.options.columnMoved.call(this.table,t.getComponent(),this.table.columnManager.getComponents()),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns")},ColumnManager.prototype._moveColumnInArray=function(t,e,o,i,n){var s,a=this,r=t.indexOf(e),l=[];r>-1&&(t.splice(r,1),(s=t.indexOf(o))>-1?i&&(s+=1):s=r,t.splice(s,0,e),n&&(this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.rowManager.rows.forEach((function(t){l=l.concat(a.table.modules.dataTree.getTreeChildren(t,!1,!0))})),(l=l.concat(this.table.rowManager.rows)).forEach((function(t){if(t.cells.length){var e=t.cells.splice(r,1)[0];t.cells.splice(s,0,e)}}))))},ColumnManager.prototype.scrollToColumn=function(t,e,o){var i=this,n=0,s=0,a=0,r=t.getElement();return new Promise((function(l,u){if(void 0===e&&(e=i.table.options.scrollToColumnPosition),void 0===o&&(o=i.table.options.scrollToColumnIfVisible),t.visible){switch(e){case"middle":case"center":a=-i.element.clientWidth/2;break;case"right":a=r.clientWidth-i.headersElement.clientWidth}if(!o&&(s=r.offsetLeft)>0&&s+r.offsetWidth<i.element.clientWidth)return!1;n=r.offsetLeft+a,n=Math.max(Math.min(n,i.table.rowManager.element.scrollWidth-i.table.rowManager.element.clientWidth),0),i.table.rowManager.scrollHorizontal(n),i.scrollHorizontal(n),l()}else console.warn("Scroll Error - Column not visible"),u("Scroll Error - Column not visible")}))},ColumnManager.prototype.generateCells=function(t){var e=[];return this.columnsByIndex.forEach((function(o){e.push(o.generateCell(t))})),e},ColumnManager.prototype.getFlexBaseWidth=function(){var t=this,e=t.table.element.clientWidth,o=0;return t.rowManager.element.scrollHeight>t.rowManager.element.clientHeight&&(e-=t.rowManager.element.offsetWidth-t.rowManager.element.clientWidth),this.columnsByIndex.forEach((function(i){var n,s,a;i.visible&&(n=i.definition.width||0,s=void 0===i.minWidth?t.table.options.columnMinWidth:parseInt(i.minWidth),a="string"==typeof n?n.indexOf("%")>-1?e/100*parseInt(n):parseInt(n):n,o+=a>s?a:s)})),o},ColumnManager.prototype.addColumn=function(t,e,o){var i=this;return new Promise((function(n,s){var a=i._addColumn(t,e,o);i._reIndexColumns(),i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout",!0)&&i.table.modules.responsiveLayout.initialize(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.redraw(!0),"fitColumns"!=i.table.modules.layout.getMode()&&a.reinitializeWidth(),i._verticalAlignHeaders(),i.table.rowManager.reinitialize(),i.table.options.virtualDomHoz&&i.table.vdomHoz.reinitialize(),n(a)}))},ColumnManager.prototype.deregisterColumn=function(t){var e,o=t.getField();o&&delete this.columnsByField[o],(e=this.columnsByIndex.indexOf(t))>-1&&this.columnsByIndex.splice(e,1),(e=this.columns.indexOf(t))>-1&&this.columns.splice(e,1),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this._verticalAlignHeaders(),this.redraw()},ColumnManager.prototype.redraw=function(t){t&&(Tabulator.prototype.helpers.elVisible(this.element)&&this._verticalAlignHeaders(),this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),["fitColumns","fitDataStretch"].indexOf(this.table.modules.layout.getMode())>-1||t?this.table.modules.layout.layout():this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),t&&(this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.redraw()),this.table.footerManager.redraw()};var ColumnComponent=function(t){this._column=t,this.type="ColumnComponent"};ColumnComponent.prototype.getElement=function(){return this._column.getElement()},ColumnComponent.prototype.getDefinition=function(){return this._column.getDefinition()},ColumnComponent.prototype.getField=function(){return this._column.getField()},ColumnComponent.prototype.getCells=function(){var t=[];return this._column.cells.forEach((function(e){t.push(e.getComponent())})),t},ColumnComponent.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._column.visible},ColumnComponent.prototype.isVisible=function(){return this._column.visible},ColumnComponent.prototype.show=function(){this._column.isGroup?this._column.columns.forEach((function(t){t.show()})):this._column.show()},ColumnComponent.prototype.hide=function(){this._column.isGroup?this._column.columns.forEach((function(t){t.hide()})):this._column.hide()},ColumnComponent.prototype.toggle=function(){this._column.visible?this.hide():this.show()},ColumnComponent.prototype.delete=function(){return this._column.delete()},ColumnComponent.prototype.getSubColumns=function(){var t=[];return this._column.columns.length&&this._column.columns.forEach((function(e){t.push(e.getComponent())})),t},ColumnComponent.prototype.getParentColumn=function(){return this._column.parent instanceof Column&&this._column.parent.getComponent()},ColumnComponent.prototype._getSelf=function(){return this._column},ColumnComponent.prototype.scrollTo=function(){return this._column.table.columnManager.scrollToColumn(this._column)},ColumnComponent.prototype.getTable=function(){return this._column.table},ColumnComponent.prototype.headerFilterFocus=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterFocus(this._column)},ColumnComponent.prototype.reloadHeaderFilter=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.reloadHeaderFilter(this._column)},ColumnComponent.prototype.getHeaderFilterValue=function(){if(this._column.table.modExists("filter",!0))return this._column.table.modules.filter.getHeaderFilterValue(this._column)},ColumnComponent.prototype.setHeaderFilterValue=function(t){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterValue(this._column,t)},ColumnComponent.prototype.move=function(t,e){var o=this._column.table.columnManager.findColumn(t);o?this._column.table.columnManager.moveColumn(this._column,o,e):console.warn("Move Error - No matching column found:",o)},ColumnComponent.prototype.getNextColumn=function(){var t=this._column.nextColumn();return!!t&&t.getComponent()},ColumnComponent.prototype.getPrevColumn=function(){var t=this._column.prevColumn();return!!t&&t.getComponent()},ColumnComponent.prototype.updateDefinition=function(t){return this._column.updateDefinition(t)},ColumnComponent.prototype.getWidth=function(){return this._column.getWidth()},ColumnComponent.prototype.setWidth=function(t){var e;return e=!0===t?this._column.reinitializeWidth(!0):this._column.setWidth(t),this._column.table.options.virtualDomHoz&&this._column.table.vdomHoz.reinitialize(!0),e},ColumnComponent.prototype.validate=function(){return this._column.validate()};var Column=function t(e,o){var i=this;this.table=o.table,this.definition=e,this.parent=o,this.type="column",this.columns=[],this.cells=[],this.element=this.createElement(),this.contentElement=!1,this.titleHolderElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.isGroup=!1,this.tooltip=!1,this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleFormatterRendered=!1,this.setField(this.definition.field),this.table.options.invalidOptionWarnings&&this.checkDefinition(),this.modules={},this.cellEvents={cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1},this.width=null,this.widthStyled="",this.maxWidth=null,this.maxWidthStyled="",this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this._mapDepricatedFunctionality(),e.columns?(this.isGroup=!0,e.columns.forEach((function(e,o){var n=new t(e,i);i.attachColumn(n)})),i.checkColumnVisibility()):o.registerColumnField(this),e.rowHandle&&!1!==this.table.options.movableRows&&this.table.modExists("moveRow")&&this.table.modules.moveRow.setHandle(!0),this._buildHeader(),this.bindModuleColumns()};Column.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col"),t.setAttribute("role","columnheader"),t.setAttribute("aria-sort","none"),t},Column.prototype.createGroupElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col-group-cols"),t},Column.prototype.checkDefinition=function(){var t=this;Object.keys(this.definition).forEach((function(e){-1===t.defaultOptionList.indexOf(e)&&console.warn("Invalid column definition option in '"+(t.field||t.definition.title)+"' column:",e)}))},Column.prototype.setField=function(t){this.field=t,this.fieldStructure=t?this.table.options.nestedFieldSeparator?t.split(this.table.options.nestedFieldSeparator):[t]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData},Column.prototype.registerColumnPosition=function(t){this.parent.registerColumnPosition(t)},Column.prototype.registerColumnField=function(t){this.parent.registerColumnField(t)},Column.prototype.reRegisterPosition=function(){this.isGroup?this.columns.forEach((function(t){t.reRegisterPosition()})):this.registerColumnPosition(this)},Column.prototype._mapDepricatedFunctionality=function(){void 0!==this.definition.hideInHtml&&(this.definition.htmlOutput=!this.definition.hideInHtml,console.warn("hideInHtml column definition property is deprecated, you should now use htmlOutput")),void 0!==this.definition.align&&(this.definition.hozAlign=this.definition.align,console.warn("align column definition property is deprecated, you should now use hozAlign")),void 0!==this.definition.downloadTitle&&(this.definition.titleDownload=this.definition.downloadTitle,console.warn("downloadTitle definition property is deprecated, you should now use titleDownload"))},Column.prototype.setTooltip=function(){var t=this,e=t.definition,o=e.headerTooltip||!1===e.tooltip?e.headerTooltip:t.table.options.tooltipsHeader;o?!0===o?e.field?t.table.modules.localize.bind("columns|"+e.field,(function(o){t.element.setAttribute("title",o||e.title)})):t.element.setAttribute("title",e.title):("function"==typeof o&&!1===(o=o(t.getComponent()))&&(o=""),t.element.setAttribute("title",o)):t.element.setAttribute("title","")},Column.prototype._buildHeader=function(){for(var t=this,e=t.definition;t.element.firstChild;)t.element.removeChild(t.element.firstChild);e.headerVertical&&(t.element.classList.add("tabulator-col-vertical"),"flip"===e.headerVertical&&t.element.classList.add("tabulator-col-vertical-flip")),t.contentElement=t._bindEvents(),t.contentElement=t._buildColumnHeaderContent(),t.element.appendChild(t.contentElement),t.isGroup?t._buildGroupHeader():t._buildColumnHeader(),t.setTooltip(),t.table.options.resizableColumns&&t.table.modExists("resizeColumns")&&t.table.modules.resizeColumns.initializeColumn("header",t,t.element),e.headerFilter&&t.table.modExists("filter")&&t.table.modExists("edit")&&(void 0!==e.headerFilterPlaceholder&&e.field&&t.table.modules.localize.setHeaderFilterColumnPlaceholder(e.field,e.headerFilterPlaceholder),t.table.modules.filter.initializeColumn(t)),t.table.modExists("frozenColumns")&&t.table.modules.frozenColumns.initializeColumn(t),t.table.options.movableColumns&&!t.isGroup&&t.table.modExists("moveColumn")&&t.table.modules.moveColumn.initializeColumn(t),(e.topCalc||e.bottomCalc)&&t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.initializeColumn(t),t.table.modExists("persistence")&&t.table.modules.persistence.config.columns&&t.table.modules.persistence.initializeColumn(t),t.element.addEventListener("mouseenter",(function(e){t.setTooltip()}))},Column.prototype._bindEvents=function(){var t,e,o,i=this,n=i.definition;"function"==typeof n.headerClick&&i.element.addEventListener("click",(function(t){n.headerClick(t,i.getComponent())})),"function"==typeof n.headerDblClick&&i.element.addEventListener("dblclick",(function(t){n.headerDblClick(t,i.getComponent())})),"function"==typeof n.headerContext&&i.element.addEventListener("contextmenu",(function(t){n.headerContext(t,i.getComponent())})),"function"==typeof n.headerTap&&(o=!1,i.element.addEventListener("touchstart",(function(t){o=!0}),{passive:!0}),i.element.addEventListener("touchend",(function(t){o&&n.headerTap(t,i.getComponent()),o=!1}))),"function"==typeof n.headerDblTap&&(t=null,i.element.addEventListener("touchend",(function(e){t?(clearTimeout(t),t=null,n.headerDblTap(e,i.getComponent())):t=setTimeout((function(){clearTimeout(t),t=null}),300)}))),"function"==typeof n.headerTapHold&&(e=null,i.element.addEventListener("touchstart",(function(t){clearTimeout(e),e=setTimeout((function(){clearTimeout(e),e=null,o=!1,n.headerTapHold(t,i.getComponent())}),1e3)}),{passive:!0}),i.element.addEventListener("touchend",(function(t){clearTimeout(e),e=null}))),"function"==typeof n.cellClick&&(i.cellEvents.cellClick=n.cellClick),"function"==typeof n.cellDblClick&&(i.cellEvents.cellDblClick=n.cellDblClick),"function"==typeof n.cellContext&&(i.cellEvents.cellContext=n.cellContext),"function"==typeof n.cellMouseEnter&&(i.cellEvents.cellMouseEnter=n.cellMouseEnter),"function"==typeof n.cellMouseLeave&&(i.cellEvents.cellMouseLeave=n.cellMouseLeave),"function"==typeof n.cellMouseOver&&(i.cellEvents.cellMouseOver=n.cellMouseOver),"function"==typeof n.cellMouseOut&&(i.cellEvents.cellMouseOut=n.cellMouseOut),"function"==typeof n.cellMouseMove&&(i.cellEvents.cellMouseMove=n.cellMouseMove),"function"==typeof n.cellTap&&(i.cellEvents.cellTap=n.cellTap),"function"==typeof n.cellDblTap&&(i.cellEvents.cellDblTap=n.cellDblTap),"function"==typeof n.cellTapHold&&(i.cellEvents.cellTapHold=n.cellTapHold),"function"==typeof n.cellEdited&&(i.cellEvents.cellEdited=n.cellEdited),"function"==typeof n.cellEditing&&(i.cellEvents.cellEditing=n.cellEditing),"function"==typeof n.cellEditCancelled&&(i.cellEvents.cellEditCancelled=n.cellEditCancelled)},Column.prototype._buildColumnHeader=function(){var t=this,e=this.definition,o=this.table;(o.modExists("sort")&&o.modules.sort.initializeColumn(this,this.titleHolderElement),(e.headerContextMenu||e.headerClickMenu||e.headerMenu)&&o.modExists("menu")&&o.modules.menu.initializeColumnHeader(this),o.modExists("format")&&o.modules.format.initializeColumn(this),void 0!==e.editor&&o.modExists("edit")&&o.modules.edit.initializeColumn(this),void 0!==e.validator&&o.modExists("validate")&&o.modules.validate.initializeColumn(this),o.modExists("mutator")&&o.modules.mutator.initializeColumn(this),o.modExists("accessor")&&o.modules.accessor.initializeColumn(this),_typeof(o.options.responsiveLayout)&&o.modExists("responsiveLayout")&&o.modules.responsiveLayout.initializeColumn(this),void 0!==e.visible&&(e.visible?this.show(!0):this.hide(!0)),e.cssClass)&&e.cssClass.split(" ").forEach((function(e){t.element.classList.add(e)}));e.field&&this.element.setAttribute("tabulator-field",e.field),this.setMinWidth(void 0===e.minWidth?this.table.options.columnMinWidth:parseInt(e.minWidth)),(e.maxWidth||this.table.options.columnMaxWidth)&&!1!==e.maxWidth&&this.setMaxWidth(void 0===e.maxWidth?this.table.options.columnMaxWidth:parseInt(e.maxWidth)),this.reinitializeWidth(),this.tooltip=this.definition.tooltip||!1===this.definition.tooltip?this.definition.tooltip:this.table.options.tooltips,this.hozAlign=void 0===this.definition.hozAlign?this.table.options.cellHozAlign:this.definition.hozAlign,this.vertAlign=void 0===this.definition.vertAlign?this.table.options.cellVertAlign:this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign||this.table.options.headerHozAlign},Column.prototype._buildColumnHeaderContent=function(){this.definition,this.table;var t=document.createElement("div");return t.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),t.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),t},Column.prototype._buildColumnHeaderTitle=function(){var t=this,e=t.definition,o=t.table,i=document.createElement("div");if(i.classList.add("tabulator-col-title"),e.editableTitle){var n=document.createElement("input");n.classList.add("tabulator-title-editor"),n.addEventListener("click",(function(t){t.stopPropagation(),n.focus()})),n.addEventListener("change",(function(){e.title=n.value,o.options.columnTitleChanged.call(t.table,t.getComponent())})),i.appendChild(n),e.field?o.modules.localize.bind("columns|"+e.field,(function(t){n.value=t||e.title||" "})):n.value=e.title||" "}else e.field?o.modules.localize.bind("columns|"+e.field,(function(o){t._formatColumnHeaderTitle(i,o||e.title||" ")})):t._formatColumnHeaderTitle(i,e.title||" ");return i},Column.prototype._formatColumnHeaderTitle=function(t,e){var o,i,n,s,a,r=this;if(this.definition.titleFormatter&&this.table.modExists("format"))switch(o=this.table.modules.format.getFormatter(this.definition.titleFormatter),a=function(t){r.titleFormatterRendered=t},s={getValue:function(){return e},getElement:function(){return t}},n="function"==typeof(n=this.definition.titleFormatterParams||{})?n():n,void 0===(i=o.call(this.table.modules.format,s,n,a))?"undefined":_typeof(i)){case"object":i instanceof Node?t.appendChild(i):(t.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":case"null":t.innerHTML="";break;default:t.innerHTML=i}else t.innerHTML=e},Column.prototype._buildGroupHeader=function(){var t=this;(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass)&&this.definition.cssClass.split(" ").forEach((function(e){t.element.classList.add(e)}));(this.definition.headerContextMenu||this.definition.headerMenu)&&this.table.modExists("menu")&&this.table.modules.menu.initializeColumnHeader(this),this.titleElement.style.textAlign=this.definition.headerHozAlign||this.table.options.headerHozAlign,this.element.appendChild(this.groupElement)},Column.prototype._getFlatData=function(t){return t[this.field]},Column.prototype._getNestedData=function(t){for(var e,o=t,i=this.fieldStructure,n=i.length,s=0;s<n&&(e=o=o[i[s]],o);s++);return e},Column.prototype._setFlatData=function(t,e){this.field&&(t[this.field]=e)},Column.prototype._setNestedData=function(t,e){for(var o=t,i=this.fieldStructure,n=i.length,s=0;s<n;s++)if(s==n-1)o[i[s]]=e;else{if(!o[i[s]]){if(void 0===e)break;o[i[s]]={}}o=o[i[s]]}},Column.prototype.attachColumn=function(t){this.groupElement?(this.columns.push(t),this.groupElement.appendChild(t.getElement())):console.warn("Column Warning - Column being attached to another column instead of column group")},Column.prototype.verticalAlign=function(t,e){var o=this.parent.isGroup?this.parent.getGroupElement().clientHeight:e||this.parent.getHeadersElement().clientHeight;this.element.style.height=o+"px",this.isGroup&&(this.groupElement.style.minHeight=o-this.contentElement.offsetHeight+"px"),this.isGroup||"top"===t||(this.element.style.paddingTop="bottom"===t?this.element.clientHeight-this.contentElement.offsetHeight+"px":(this.element.clientHeight-this.contentElement.offsetHeight)/2+"px"),this.columns.forEach((function(e){e.verticalAlign(t)}))},Column.prototype.clearVerticalAlign=function(){this.element.style.paddingTop="",this.element.style.height="",this.element.style.minHeight="",this.groupElement.style.minHeight="",this.columns.forEach((function(t){t.clearVerticalAlign()}))},Column.prototype.bindModuleColumns=function(){"rownum"==this.definition.formatter&&(this.table.rowManager.rowNumColumn=this)},Column.prototype.getElement=function(){return this.element},Column.prototype.getGroupElement=function(){return this.groupElement},Column.prototype.getField=function(){return this.field},Column.prototype.getFirstColumn=function(){return this.isGroup?!!this.columns.length&&this.columns[0].getFirstColumn():this},Column.prototype.getLastColumn=function(){return this.isGroup?!!this.columns.length&&this.columns[this.columns.length-1].getLastColumn():this},Column.prototype.getColumns=function(){return this.columns},Column.prototype.getCells=function(){return this.cells},Column.prototype.getTopColumn=function(){return this.parent.isGroup?this.parent.getTopColumn():this},Column.prototype.getDefinition=function(t){var e=[];return this.isGroup&&t&&(this.columns.forEach((function(t){e.push(t.getDefinition(!0))})),this.definition.columns=e),this.definition},Column.prototype.checkColumnVisibility=function(){var t=!1;this.columns.forEach((function(e){e.visible&&(t=!0)})),t?(this.show(),this.parent.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),!1)):this.hide()},Column.prototype.show=function(t,e){this.visible||(this.visible=!0,this.element.style.display="",this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach((function(t){t.show()})),this.isGroup||null!==this.width||this.reinitializeWidth(),this.table.columnManager._verticalAlignHeaders(),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),!e&&this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.updateColumnVisibility(this,this.visible),t||this.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),!0),this.parent.isGroup&&this.parent.matchChildWidths(),!this.silent&&this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize())},Column.prototype.hide=function(t,e){this.visible&&(this.visible=!1,this.element.style.display="none",this.table.columnManager._verticalAlignHeaders(),this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach((function(t){t.hide()})),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),!e&&this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.updateColumnVisibility(this,this.visible),t||this.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),!1),this.parent.isGroup&&this.parent.matchChildWidths(),!this.silent&&this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize())},Column.prototype.matchChildWidths=function(){var t=0;this.contentElement&&this.columns.length&&(this.columns.forEach((function(e){e.visible&&(t+=e.getWidth())})),this.contentElement.style.maxWidth=t-1+"px",this.parent.isGroup&&this.parent.matchChildWidths())},Column.prototype.removeChild=function(t){var e=this.columns.indexOf(t);e>-1&&this.columns.splice(e,1),this.columns.length||this.delete()},Column.prototype.setWidth=function(t){this.widthFixed=!0,this.setWidthActual(t)},Column.prototype.setWidthActual=function(t){isNaN(t)&&(t=Math.floor(this.table.element.clientWidth/100*parseInt(t))),t=Math.max(this.minWidth,t),this.maxWidth&&(t=Math.min(this.maxWidth,t)),this.width=t,this.widthStyled=t?t+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach((function(t){t.setWidth()})),this.parent.isGroup&&this.parent.matchChildWidths(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()},Column.prototype.checkCellHeights=function(){var t=[];this.cells.forEach((function(e){e.row.heightInitialized&&(null!==e.row.getElement().offsetParent?(t.push(e.row),e.row.clearCellHeight()):e.row.heightInitialized=!1)})),t.forEach((function(t){t.calcHeight()})),t.forEach((function(t){t.setCellHeight()}))},Column.prototype.getWidth=function(){var t=0;return this.isGroup?this.columns.forEach((function(e){e.visible&&(t+=e.getWidth())})):t=this.width,t},Column.prototype.getHeight=function(){return this.element.offsetHeight},Column.prototype.setMinWidth=function(t){this.minWidth=t,this.minWidthStyled=t?t+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach((function(t){t.setMinWidth()}))},Column.prototype.setMaxWidth=function(t){this.maxWidth=t,this.maxWidthStyled=t?t+"px":"",this.element.style.maxWidth=this.maxWidthStyled,this.cells.forEach((function(t){t.setMaxWidth()}))},Column.prototype.delete=function(){var t=this;return new Promise((function(e,o){t.isGroup&&t.columns.forEach((function(t){t.delete()})),t.table.modExists("edit")&&t.table.modules.edit.currentCell.column===t&&t.table.modules.edit.cancelEdit();for(var i=t.cells.length,n=0;n<i;n++)t.cells[0].delete();t.element.parentNode&&t.element.parentNode.removeChild(t.element),t.element=!1,t.contentElement=!1,t.titleElement=!1,t.groupElement=!1,t.parent.isGroup&&t.parent.removeChild(t),t.table.columnManager.deregisterColumn(t),t.table.options.virtualDomHoz&&t.table.vdomHoz.reinitialize(!0),e()}))},Column.prototype.columnRendered=function(){this.titleFormatterRendered&&this.titleFormatterRendered()},Column.prototype.validate=function(){var t=[];return this.cells.forEach((function(e){e.validate()||t.push(e.getComponent())})),!t.length||t},Column.prototype.generateCell=function(t){var e=new Cell(this,t);return this.cells.push(e),e},Column.prototype.nextColumn=function(){var t=this.table.columnManager.findColumnIndex(this);return t>-1&&this._nextVisibleColumn(t+1)},Column.prototype._nextVisibleColumn=function(t){var e=this.table.columnManager.getColumnByIndex(t);return!e||e.visible?e:this._nextVisibleColumn(t+1)},Column.prototype.prevColumn=function(){var t=this.table.columnManager.findColumnIndex(this);return t>-1&&this._prevVisibleColumn(t-1)},Column.prototype._prevVisibleColumn=function(t){var e=this.table.columnManager.getColumnByIndex(t);return!e||e.visible?e:this._prevVisibleColumn(t-1)},Column.prototype.reinitializeWidth=function(t){this.widthFixed=!1,void 0===this.definition.width||t||this.setWidth(this.definition.width),this.table.modExists("filter")&&this.table.modules.filter.hideHeaderFilterElements(),this.fitToData(),this.table.modExists("filter")&&this.table.modules.filter.showHeaderFilterElements()},Column.prototype.fitToData=function(){this.widthFixed||(this.element.style.width="",this.cells.forEach((function(t){t.clearWidth()})));var t=this.element.offsetWidth;this.width&&this.widthFixed||(this.cells.forEach((function(e){var o=e.getWidth();o>t&&(t=o)})),t&&this.setWidthActual(t+1))},Column.prototype.updateDefinition=function(t){var e=this;return new Promise((function(o,i){var n;e.isGroup||e.parent.isGroup?(console.warn("Column Update Error - The updateDefinition function is only available on ungrouped columns"),i("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(n=Object.assign({},e.getDefinition()),n=Object.assign(n,t),e.table.columnManager.addColumn(n,!1,e).then((function(t){n.field==e.field&&(e.field=!1),e.delete().then((function(){o(t.getComponent())})).catch((function(t){i(t)}))})).catch((function(t){i(t)})))}))},Column.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},Column.prototype.defaultOptionList=["title","field","columns","visible","align","hozAlign","vertAlign","width","minWidth","maxWidth","widthGrow","widthShrink","resizable","frozen","responsive","tooltip","cssClass","rowHandle","hideInHtml","print","htmlOutput","sorter","sorterParams","formatter","formatterParams","variableHeight","editable","editor","editorParams","validator","mutator","mutatorParams","mutatorData","mutatorDataParams","mutatorEdit","mutatorEditParams","mutatorClipboard","mutatorClipboardParams","accessor","accessorParams","accessorData","accessorDataParams","accessorDownload","accessorDownloadParams","accessorClipboard","accessorClipboardParams","accessorPrint","accessorPrintParams","accessorHtmlOutput","accessorHtmlOutputParams","clipboard","download","downloadTitle","topCalc","topCalcParams","topCalcFormatter","topCalcFormatterParams","bottomCalc","bottomCalcParams","bottomCalcFormatter","bottomCalcFormatterParams","cellClick","cellDblClick","cellContext","cellTap","cellDblTap","cellTapHold","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellEditing","cellEdited","cellEditCancelled","headerSort","headerSortStartingDir","headerSortTristate","headerClick","headerDblClick","headerContext","headerTap","headerDblTap","headerTapHold","headerTooltip","headerVertical","headerHozAlign","editableTitle","titleFormatter","titleFormatterParams","headerFilter","headerFilterPlaceholder","headerFilterParams","headerFilterEmptyCheck","headerFilterFunc","headerFilterFuncParams","headerFilterLiveFilter","print","headerContextMenu","headerMenu","contextMenu","clickMenu","formatterPrint","formatterPrintParams","formatterClipboard","formatterClipboardParams","formatterHtmlOutput","formatterHtmlOutputParams","titlePrint","titleClipboard","titleHtmlOutput","titleDownload"],Column.prototype.getComponent=function(){return this.component||(this.component=new ColumnComponent(this)),this.component};var RowManager=function(t){this.table=t,this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.heightFixer=this.createTableElement(),this.columnManager=null,this.height=0,this.firstRender=!1,this.renderMode="virtual",this.fixedHeight=!1,this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[],this.rowNumColumn=!1,this.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRederInPosition=!1};RowManager.prototype.createHolderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-tableHolder"),t.setAttribute("tabindex",0),t},RowManager.prototype.createTableElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-table"),t},RowManager.prototype.getElement=function(){return this.element},RowManager.prototype.getTableElement=function(){return this.tableElement},RowManager.prototype.getRowPosition=function(t,e){return e?this.activeRows.indexOf(t):this.rows.indexOf(t)},RowManager.prototype.setColumnManager=function(t){this.columnManager=t},RowManager.prototype.initialize=function(){var t=this;t.setRenderMode(),t.element.appendChild(t.tableElement),t.firstRender=!0,t.element.addEventListener("scroll",(function(){var e=t.element.scrollLeft;t.scrollLeft!=e&&(t.columnManager.scrollHorizontal(e),t.table.options.groupBy&&t.table.modules.groupRows.scrollHeaders(e),t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.scrollHorizontal(e),t.table.options.scrollHorizontal(e)),t.scrollLeft=e})),"virtual"===this.renderMode&&t.element.addEventListener("scroll",(function(){var e=t.element.scrollTop,o=t.scrollTop>e;t.scrollTop!=e?(t.scrollTop=e,t.scrollVertical(o),"scroll"==t.table.options.ajaxProgressiveLoad&&t.table.modules.ajax.nextPage(t.element.scrollHeight-t.element.clientHeight-e),t.table.options.scrollVertical(e)):t.scrollTop=e}))},RowManager.prototype.findRow=function(t){var e=this;return"object"!=(void 0===t?"undefined":_typeof(t))?null!=t&&(e.rows.find((function(o){return o.data[e.table.options.index]==t}))||!1):t instanceof Row?t:t instanceof RowComponent?t._getSelf()||!1:"undefined"!=typeof HTMLElement&&t instanceof HTMLElement&&e.rows.find((function(e){return e.getElement()===t}))||!1},RowManager.prototype.getRowFromDataObject=function(t){return this.rows.find((function(e){return e.data===t}))||!1},RowManager.prototype.getRowFromPosition=function(t,e){return e?this.activeRows[t]:this.rows[t]},RowManager.prototype.scrollToRow=function(t,e,o){var i,n=this,s=this.getDisplayRows().indexOf(t),a=t.getElement(),r=0;return new Promise((function(t,l){if(s>-1){if(void 0===e&&(e=n.table.options.scrollToRowPosition),void 0===o&&(o=n.table.options.scrollToRowIfVisible),"nearest"===e)switch(n.renderMode){case"classic":i=Tabulator.prototype.helpers.elOffset(a).top,e=Math.abs(n.element.scrollTop-i)>Math.abs(n.element.scrollTop+n.element.clientHeight-i)?"bottom":"top";break;case"virtual":e=Math.abs(n.vDomTop-s)>Math.abs(n.vDomBottom-s)?"bottom":"top"}if(!o&&Tabulator.prototype.helpers.elVisible(a)&&(r=Tabulator.prototype.helpers.elOffset(a).top-Tabulator.prototype.helpers.elOffset(n.element).top)>0&&r<n.element.clientHeight-a.offsetHeight)return!1;switch(n.renderMode){case"classic":n.element.scrollTop=Tabulator.prototype.helpers.elOffset(a).top-Tabulator.prototype.helpers.elOffset(n.element).top+n.element.scrollTop;break;case"virtual":n._virtualRenderFill(s,!0)}switch(e){case"middle":case"center":n.element.scrollHeight-n.element.scrollTop==n.element.clientHeight?n.element.scrollTop=n.element.scrollTop+(a.offsetTop-n.element.scrollTop)-(n.element.scrollHeight-a.offsetTop)/2:n.element.scrollTop=n.element.scrollTop-n.element.clientHeight/2;break;case"bottom":n.element.scrollHeight-n.element.scrollTop==n.element.clientHeight?n.element.scrollTop=n.element.scrollTop-(n.element.scrollHeight-a.offsetTop)+a.offsetHeight:n.element.scrollTop=n.element.scrollTop-n.element.clientHeight+a.offsetHeight}t()}else console.warn("Scroll Error - Row not visible"),l("Scroll Error - Row not visible")}))},RowManager.prototype.setData=function(t,e,o){var i=this,n=this;return new Promise((function(s,a){e&&i.getDisplayRows().length?n.table.options.pagination?n._setDataActual(t,!0):i.reRenderInPosition((function(){n._setDataActual(t)})):(i.table.options.autoColumns&&o&&i.table.columnManager.generateColumnsFromRowData(t),i.resetScroll(),i._setDataActual(t)),s()}))},RowManager.prototype._setDataActual=function(t,e){var o=this;o.table.options.dataLoading.call(this.table,t),this._wipeElements(),this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.clear(),Array.isArray(t)?(this.table.modExists("selectRow")&&this.table.modules.selectRow.clearSelectionData(),this.table.options.reactiveData&&this.table.modExists("reactiveData",!0)&&this.table.modules.reactiveData.watchData(t),t.forEach((function(t,e){if(t&&"object"===(void 0===t?"undefined":_typeof(t))){var i=new Row(t,o);o.rows.push(i)}else console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:",t)})),o.refreshActiveData(!1,!1,e),o.table.options.dataLoaded.call(this.table,t)):console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ",void 0===t?"undefined":_typeof(t),"\nData: ",t)},RowManager.prototype._wipeElements=function(){this.rows.forEach((function(t){t.wipe()})),this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.wipe(),this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.adjustTableSize()},RowManager.prototype.deleteRow=function(t,e){var o=this.rows.indexOf(t),i=this.activeRows.indexOf(t);i>-1&&this.activeRows.splice(i,1),o>-1&&this.rows.splice(o,1),this.setActiveRows(this.activeRows),this.displayRowIterator((function(e){var o=e.indexOf(t);o>-1&&e.splice(o,1)})),e||this.reRenderInPosition(),this.regenerateRowNumbers(),this.table.options.rowDeleted.call(this.table,t.getComponent()),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.getData()),this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.updateGroupRows(!0):this.table.options.pagination&&this.table.modExists("page")?this.refreshActiveData(!1,!1,!0):this.table.options.pagination&&this.table.modExists("page")&&this.refreshActiveData("page")},RowManager.prototype.addRow=function(t,e,o,i){var n=this.addRowActual(t,e,o,i);return this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowAdd",n,{data:t,pos:e,index:o}),n},RowManager.prototype.addRows=function(t,e,o){var i=this,n=this,s=[];return new Promise((function(a,r){e=i.findAddRowPos(e),Array.isArray(t)||(t=[t]),t.length-1,(void 0===o&&e||void 0!==o&&!e)&&t.reverse(),t.forEach((function(t,i){var a=n.addRow(t,e,o,!0);s.push(a)})),i.table.options.groupBy&&i.table.modExists("groupRows")?i.table.modules.groupRows.updateGroupRows(!0):i.table.options.pagination&&i.table.modExists("page")?i.refreshActiveData(!1,!1,!0):i.reRenderInPosition(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.regenerateRowNumbers(),a(s)}))},RowManager.prototype.findAddRowPos=function(t){return void 0===t&&(t=this.table.options.addRowPos),"pos"===t&&(t=!0),"bottom"===t&&(t=!1),t},RowManager.prototype.addRowActual=function(t,e,o,i){var n,s,a=t instanceof Row?t:new Row(t||{},this),r=this.findAddRowPos(e),l=-1;if(!o&&this.table.options.pagination&&"page"==this.table.options.paginationAddRow&&(s=this.getDisplayRows(),r?s.length?o=s[0]:this.activeRows.length&&(o=this.activeRows[this.activeRows.length-1],r=!1):s.length&&(o=s[s.length-1],r=!(s.length<this.table.modules.page.getPageSize()))),void 0!==o&&(o=this.findRow(o)),this.table.options.groupBy&&this.table.modExists("groupRows")){this.table.modules.groupRows.assignRowToGroup(a);var u=a.getGroup().rows;u.length>1&&(!o||o&&-1==u.indexOf(o)?r?u[0]!==a&&(o=u[0],this._moveRowInArray(a.getGroup().rows,a,o,!r)):u[u.length-1]!==a&&(o=u[u.length-1],this._moveRowInArray(a.getGroup().rows,a,o,!r)):this._moveRowInArray(a.getGroup().rows,a,o,!r))}return o&&(l=this.rows.indexOf(o)),o&&l>-1?(n=this.activeRows.indexOf(o),this.displayRowIterator((function(t){var e=t.indexOf(o);e>-1&&t.splice(r?e:e+1,0,a)})),n>-1&&this.activeRows.splice(r?n:n+1,0,a),this.rows.splice(r?l:l+1,0,a)):r?(this.displayRowIterator((function(t){t.unshift(a)})),this.activeRows.unshift(a),this.rows.unshift(a)):(this.displayRowIterator((function(t){t.push(a)})),this.activeRows.push(a),this.rows.push(a)),this.setActiveRows(this.activeRows),this.table.options.rowAdded.call(this.table,a.getComponent()),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.getData()),i||this.reRenderInPosition(),a},RowManager.prototype.moveRow=function(t,e,o){this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowMove",t,{posFrom:this.getRowPosition(t),posTo:this.getRowPosition(e),to:e,after:o}),this.moveRowActual(t,e,o),this.regenerateRowNumbers(),this.table.options.rowMoved.call(this.table,t.getComponent())},RowManager.prototype.moveRowActual=function(t,e,o){var i=this;if(this._moveRowInArray(this.rows,t,e,o),this._moveRowInArray(this.activeRows,t,e,o),this.displayRowIterator((function(n){i._moveRowInArray(n,t,e,o)})),this.table.options.groupBy&&this.table.modExists("groupRows")){!o&&e instanceof Group&&(e=this.table.rowManager.prevDisplayRow(t)||e);var n=e.getGroup(),s=t.getGroup();n===s?this._moveRowInArray(n.rows,t,e,o):(s&&s.removeRow(t),n.insertRow(t,e,o))}},RowManager.prototype._moveRowInArray=function(t,e,o,i){var n,s,a;if(e!==o&&((n=t.indexOf(e))>-1&&(t.splice(n,1),(s=t.indexOf(o))>-1?i?t.splice(s+1,0,e):t.splice(s,0,e):t.splice(n,0,e)),t===this.getDisplayRows())){a=s>n?s:n+1;for(var r=n<s?n:s;r<=a;r++)t[r]&&this.styleRow(t[r],r)}},RowManager.prototype.clearData=function(){this.setData([])},RowManager.prototype.getRowIndex=function(t){return this.findRowIndex(t,this.rows)},RowManager.prototype.getDisplayRowIndex=function(t){var e=this.getDisplayRows().indexOf(t);return e>-1&&e},RowManager.prototype.nextDisplayRow=function(t,e){var o=this.getDisplayRowIndex(t),i=!1;return!1!==o&&o<this.displayRowsCount-1&&(i=this.getDisplayRows()[o+1]),!i||i instanceof Row&&"row"==i.type?i:this.nextDisplayRow(i,e)},RowManager.prototype.prevDisplayRow=function(t,e){var o=this.getDisplayRowIndex(t),i=!1;return o&&(i=this.getDisplayRows()[o-1]),!e||!i||i instanceof Row&&"row"==i.type?i:this.prevDisplayRow(i,e)},RowManager.prototype.findRowIndex=function(t,e){var o;return!!((t=this.findRow(t))&&(o=e.indexOf(t))>-1)&&o},RowManager.prototype.getData=function(t,e){var o=[];return this.getRows(t).forEach((function(t){"row"==t.type&&o.push(t.getData(e||"data"))})),o},RowManager.prototype.getComponents=function(t){var e=[];return this.getRows(t).forEach((function(t){e.push(t.getComponent())})),e},RowManager.prototype.getDataCount=function(t){return this.getRows(t).length},RowManager.prototype._genRemoteRequest=function(){var t=this,e=this.table,o=e.options,i={};if(e.modExists("page")){if(o.ajaxSorting){var n=this.table.modules.sort.getSort();n.forEach((function(t){delete t.column})),i[this.table.modules.page.paginationDataSentNames.sorters]=n}if(o.ajaxFiltering){var s=this.table.modules.filter.getFilters(!0,!0);i[this.table.modules.page.paginationDataSentNames.filters]=s}this.table.modules.ajax.setParams(i,!0)}e.modules.ajax.sendRequest().then((function(e){t._setDataActual(e,!0)})).catch((function(t){}))},RowManager.prototype.filterRefresh=function(){var t=this.table,e=t.options,o=this.scrollLeft;e.ajaxFiltering?"remote"==e.pagination&&t.modExists("page")?(t.modules.page.reset(!0),t.modules.page.setPage(1).then((function(){})).catch((function(){}))):e.ajaxProgressiveLoad?t.modules.ajax.loadData().then((function(){})).catch((function(){})):this._genRemoteRequest():this.refreshActiveData("filter"),this.scrollHorizontal(o)},RowManager.prototype.sorterRefresh=function(t){var e=this.table,o=this.table.options,i=this.scrollLeft;o.ajaxSorting?("remote"==o.pagination||o.progressiveLoad)&&e.modExists("page")?(e.modules.page.reset(!0),e.modules.page.setPage(1).then((function(){})).catch((function(){}))):o.ajaxProgressiveLoad?e.modules.ajax.loadData().then((function(){})).catch((function(){})):this._genRemoteRequest():this.refreshActiveData(t?"filter":"sort"),this.scrollHorizontal(i)},RowManager.prototype.scrollHorizontal=function(t){this.scrollLeft=t,this.element.scrollLeft=t,this.table.options.groupBy&&this.table.modules.groupRows.scrollHeaders(t),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.scrollHorizontal(t)},RowManager.prototype.refreshActiveData=function(t,e,o){var i,n=this.table,s=["all","filter","sort","display","freeze","group","tree","page"];if(this.redrawBlock)(!this.redrawBlockRestoreConfig||s.indexOf(t)<s.indexOf(this.redrawBlockRestoreConfig.stage))&&(this.redrawBlockRestoreConfig={stage:t,skipStage:e,renderInPosition:o});else{switch(this.table.modExists("edit")&&this.table.modules.edit.cancelEdit(),t||(t="all"),n.options.selectable&&!n.options.selectablePersistence&&n.modExists("selectRow")&&n.modules.selectRow.deselectRows(),t){case"all":case"filter":e?e=!1:n.modExists("filter")?this.setActiveRows(n.modules.filter.filter(this.rows)):this.setActiveRows(this.rows.slice(0));case"sort":e?e=!1:n.modExists("sort")&&n.modules.sort.sort(this.activeRows),this.regenerateRowNumbers();case"display":this.resetDisplayRows();case"freeze":e?e=!1:this.table.modExists("frozenRows")&&n.modules.frozenRows.isFrozen()&&(n.modules.frozenRows.getDisplayIndex()||n.modules.frozenRows.setDisplayIndex(this.getNextDisplayIndex()),i=n.modules.frozenRows.getDisplayIndex(),!0!==(i=this.setDisplayRows(n.modules.frozenRows.getRows(this.getDisplayRows(i-1)),i))&&n.modules.frozenRows.setDisplayIndex(i));case"group":e?e=!1:n.options.groupBy&&n.modExists("groupRows")&&(n.modules.groupRows.getDisplayIndex()||n.modules.groupRows.setDisplayIndex(this.getNextDisplayIndex()),i=n.modules.groupRows.getDisplayIndex(),!0!==(i=this.setDisplayRows(n.modules.groupRows.getRows(this.getDisplayRows(i-1)),i))&&n.modules.groupRows.setDisplayIndex(i));case"tree":e?e=!1:n.options.dataTree&&n.modExists("dataTree")&&(n.modules.dataTree.getDisplayIndex()||n.modules.dataTree.setDisplayIndex(this.getNextDisplayIndex()),i=n.modules.dataTree.getDisplayIndex(),!0!==(i=this.setDisplayRows(n.modules.dataTree.getRows(this.getDisplayRows(i-1)),i))&&n.modules.dataTree.setDisplayIndex(i)),n.options.pagination&&n.modExists("page")&&!o&&"local"==n.modules.page.getMode()&&n.modules.page.reset();case"page":e?e=!1:n.options.pagination&&n.modExists("page")&&(n.modules.page.getDisplayIndex()||n.modules.page.setDisplayIndex(this.getNextDisplayIndex()),i=n.modules.page.getDisplayIndex(),"local"==n.modules.page.getMode()&&n.modules.page.setMaxRows(this.getDisplayRows(i-1).length),!0!==(i=this.setDisplayRows(n.modules.page.getRows(this.getDisplayRows(i-1)),i))&&n.modules.page.setDisplayIndex(i))}Tabulator.prototype.helpers.elVisible(this.element)&&(o?this.reRenderInPosition():("all"===t&&this.table.options.virtualDomHoz&&this.table.vdomHoz.dataChange(),this.renderTable(),n.options.layoutColumnsOnNewData&&this.table.columnManager.redraw(!0))),n.modExists("columnCalcs")&&n.modules.columnCalcs.recalc(this.activeRows)}},RowManager.prototype.regenerateRowNumbers=function(){var t=this;this.rowNumColumn&&this.activeRows.forEach((function(e){var o=e.getCell(t.rowNumColumn);o&&o._generateContents()}))},RowManager.prototype.setActiveRows=function(t){this.activeRows=t,this.activeRowsCount=this.activeRows.length},RowManager.prototype.resetDisplayRows=function(){this.displayRows=[],this.displayRows.push(this.activeRows.slice(0)),this.displayRowsCount=this.displayRows[0].length,this.table.modExists("frozenRows")&&this.table.modules.frozenRows.setDisplayIndex(0),this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.setDisplayIndex(0),this.table.options.pagination&&this.table.modExists("page")&&this.table.modules.page.setDisplayIndex(0)},RowManager.prototype.getNextDisplayIndex=function(){return this.displayRows.length},RowManager.prototype.setDisplayRows=function(t,e){var o=!0;return e&&void 0!==this.displayRows[e]?(this.displayRows[e]=t,o=!0):(this.displayRows.push(t),o=e=this.displayRows.length-1),e==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length),o},RowManager.prototype.getDisplayRows=function(t){return void 0===t?this.displayRows.length?this.displayRows[this.displayRows.length-1]:[]:this.displayRows[t]||[]},RowManager.prototype.getVisibleRows=function(t){var e=this.element.scrollTop,o=this.element.clientHeight+e,i=!1,n=0,s=0,a=this.getDisplayRows();if(t){this.getDisplayRows();for(var r=this.vDomTop;r<=this.vDomBottom;r++)if(a[r])if(i){if(!(o-a[r].getElement().offsetTop>=0))break;s=r}else if(e-a[r].getElement().offsetTop>=0)n=r;else{if(i=!0,!(o-a[r].getElement().offsetTop>=0))break;s=r}}else n=this.vDomTop,s=this.vDomBottom;return a.slice(n,s+1)},RowManager.prototype.displayRowIterator=function(t){this.displayRows.forEach(t),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length},RowManager.prototype.getRows=function(t){var e;switch(t){case"active":e=this.activeRows;break;case"display":e=this.table.rowManager.getDisplayRows();break;case"visible":e=this.getVisibleRows(!0);break;case"selected":e=this.table.modules.selectRow.selectedRows;break;default:e=this.rows}return e},RowManager.prototype.reRenderInPosition=function(t){if("virtual"==this.getRenderMode())if(this.redrawBlock)t?t():this.redrawBlockRederInPosition=!0;else{for(var e=this.element.scrollTop,o=!1,i=!1,n=this.scrollLeft,s=this.getDisplayRows(),a=this.vDomTop;a<=this.vDomBottom;a++)if(s[a]){var r=e-s[a].getElement().offsetTop;if(!(!1===i||Math.abs(r)<i))break;i=r,o=a}t&&t(),this._virtualRenderFill(!1===o?this.displayRowsCount-1:o,!0,i||0),this.scrollHorizontal(n)}else this.renderTable(),t&&t()},RowManager.prototype.setRenderMode=function(){this.table.options.virtualDom?(this.renderMode="virtual",this.table.element.clientHeight||this.table.options.height?this.fixedHeight=!0:this.fixedHeight=!1):this.renderMode="classic"},RowManager.prototype.getRenderMode=function(){return this.renderMode},RowManager.prototype.renderTable=function(){switch(this.table.options.renderStarted.call(this.table),this.element.scrollTop=0,this.renderMode){case"classic":this._simpleRender();break;case"virtual":this._virtualRenderFill()}this.firstRender&&(this.displayRowsCount?(this.firstRender=!1,this.table.modules.layout.layout()):this.renderEmptyScroll()),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.displayRowsCount||this.table.options.placeholder&&(this.table.options.placeholder.setAttribute("tabulator-render-mode",this.renderMode),this.getElement().appendChild(this.table.options.placeholder),this.table.options.placeholder.style.width=this.table.columnManager.getWidth()+"px"),this.table.options.renderComplete.call(this.table)},RowManager.prototype._simpleRender=function(){this._clearVirtualDom(),this.displayRowsCount?this.checkClassicModeGroupHeaderWidth():this.renderEmptyScroll()},RowManager.prototype.checkClassicModeGroupHeaderWidth=function(){var t=this,e=this.tableElement,o=!0;t.getDisplayRows().forEach((function(i,n){t.styleRow(i,n),e.appendChild(i.getElement()),i.initialize(!0),"group"!==i.type&&(o=!1)})),e.style.minWidth=o?t.table.columnManager.getWidth()+"px":""},RowManager.prototype.renderEmptyScroll=function(){this.table.options.placeholder?this.tableElement.style.display="none":this.tableElement.style.minWidth=this.table.columnManager.getWidth()+"px"},RowManager.prototype._clearVirtualDom=function(){var t=this.tableElement;for(this.table.options.placeholder&&this.table.options.placeholder.parentNode&&this.table.options.placeholder.parentNode.removeChild(this.table.options.placeholder);t.firstChild;)t.removeChild(t.firstChild);t.style.paddingTop="",t.style.paddingBottom="",t.style.minWidth="",t.style.minHeight="",t.style.display="",t.style.visibility="",this.scrollTop=0,this.scrollLeft=0,this.vDomTop=0,this.vDomBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0},RowManager.prototype.styleRow=function(t,e){var o=t.getElement();e%2?(o.classList.add("tabulator-row-even"),o.classList.remove("tabulator-row-odd")):(o.classList.add("tabulator-row-odd"),o.classList.remove("tabulator-row-even"))},RowManager.prototype._virtualRenderFill=function(t,e,o){var i=this.tableElement,n=this.element,s=0,a=0,r=0,l=0,u=!0,c=this.getDisplayRows();if(o=o||0,t=t||0){for(;i.firstChild;)i.removeChild(i.firstChild);var d=(this.displayRowsCount-t+1)*this.vDomRowHeight;d<this.height&&(t-=Math.ceil((this.height-d)/this.vDomRowHeight))<0&&(t=0),t-=s=Math.min(Math.max(Math.floor(this.vDomWindowBuffer/this.vDomRowHeight),this.vDomWindowMinMarginRows),t)}else this._clearVirtualDom();if(this.displayRowsCount&&Tabulator.prototype.helpers.elVisible(this.element)){for(this.vDomTop=t,this.vDomBottom=t-1;(a<=this.height+this.vDomWindowBuffer||l<this.vDomWindowMinTotalRows)&&this.vDomBottom<this.displayRowsCount-1;){var h,p=this.vDomBottom+1,m=c[p];this.styleRow(m,p),i.appendChild(m.getElement()),m.initialize(),m.heightInitialized||m.normalizeHeight(!0),h=m.getHeight(),l<s?r+=h:a+=h,h>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*h),"group"!==m.type&&(u=!1),this.vDomBottom++,l++}t?(this.vDomTopPad=e?this.vDomRowHeight*this.vDomTop+o:this.scrollTop-r,this.vDomBottomPad=this.vDomBottom==this.displayRowsCount-1?0:Math.max(this.vDomScrollHeight-this.vDomTopPad-a-r,0)):(this.vDomTopPad=0,this.vDomRowHeight=Math.floor((a+r)/l),this.vDomBottomPad=this.vDomRowHeight*(this.displayRowsCount-this.vDomBottom-1),this.vDomScrollHeight=r+a+this.vDomBottomPad-this.height),i.style.paddingTop=this.vDomTopPad+"px",i.style.paddingBottom=this.vDomBottomPad+"px",e&&(this.scrollTop=this.vDomTopPad+r+o-(this.element.scrollWidth>this.element.clientWidth?this.element.offsetHeight-this.element.clientHeight:0)),this.scrollTop=Math.min(this.scrollTop,this.element.scrollHeight-this.height),this.element.scrollWidth>this.element.offsetWidth&&e&&(this.scrollTop+=this.element.offsetHeight-this.element.clientHeight),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,n.scrollTop=this.scrollTop,i.style.minWidth=u?this.table.columnManager.getWidth()+"px":"",this.table.options.groupBy&&"fitDataFill"!=this.table.modules.layout.getMode()&&this.displayRowsCount==this.table.modules.groupRows.countGroups()&&(this.tableElement.style.minWidth=this.table.columnManager.getWidth())}else this.renderEmptyScroll();this.fixedHeight||this.adjustTableSize()},RowManager.prototype.scrollVertical=function(t){var e=this.scrollTop-this.vDomScrollPosTop,o=this.scrollTop-this.vDomScrollPosBottom,i=2*this.vDomWindowBuffer;if(-e>i||o>i){var n=this.scrollLeft;this._virtualRenderFill(Math.floor(this.element.scrollTop/this.element.scrollHeight*this.displayRowsCount)),this.scrollHorizontal(n)}else t?(e<0&&this._addTopRow(-e),o<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(-o):this.vDomScrollPosBottom=this.scrollTop)):(e>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(e):this.vDomScrollPosTop=this.scrollTop),o>=0&&this._addBottomRow(o))},RowManager.prototype._addTopRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomTop){var n=this.vDomTop-1,s=i[n],a=s.getHeight()||this.vDomRowHeight;t>=a&&(this.styleRow(s,n),o.insertBefore(s.getElement(),o.firstChild),s.initialized&&s.heightInitialized||(this.vDomTopNewRows.push(s),s.heightInitialized||s.clearCellHeight()),s.initialize(),this.vDomTopPad-=a,this.vDomTopPad<0&&(this.vDomTopPad=n*this.vDomRowHeight),n||(this.vDomTopPad=0),o.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=a,this.vDomTop--),t=-(this.scrollTop-this.vDomScrollPosTop),s.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*s.getHeight()),e<this.vDomMaxRenderChain&&this.vDomTop&&t>=(i[this.vDomTop-1].getHeight()||this.vDomRowHeight)?this._addTopRow(t,e+1):this._quickNormalizeRowHeight(this.vDomTopNewRows)}},RowManager.prototype._removeTopRow=function(t){var e=this.tableElement,o=this.getDisplayRows()[this.vDomTop],i=o.getHeight()||this.vDomRowHeight;if(t>=i){var n=o.getElement();n.parentNode.removeChild(n),this.vDomTopPad+=i,e.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?i:i+this.vDomWindowBuffer,this.vDomTop++,t=this.scrollTop-this.vDomScrollPosTop,this._removeTopRow(t)}},RowManager.prototype._addBottomRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomBottom<this.displayRowsCount-1){var n=this.vDomBottom+1,s=i[n],a=s.getHeight()||this.vDomRowHeight;t>=a&&(this.styleRow(s,n),o.appendChild(s.getElement()),s.initialized&&s.heightInitialized||(this.vDomBottomNewRows.push(s),s.heightInitialized||s.clearCellHeight()),s.initialize(),this.vDomBottomPad-=a,(this.vDomBottomPad<0||n==this.displayRowsCount-1)&&(this.vDomBottomPad=0),o.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=a,this.vDomBottom++),t=this.scrollTop-this.vDomScrollPosBottom,s.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*s.getHeight()),e<this.vDomMaxRenderChain&&this.vDomBottom<this.displayRowsCount-1&&t>=(i[this.vDomBottom+1].getHeight()||this.vDomRowHeight)?this._addBottomRow(t,e+1):this._quickNormalizeRowHeight(this.vDomBottomNewRows)}},RowManager.prototype._removeBottomRow=function(t){var e=this.tableElement,o=this.getDisplayRows()[this.vDomBottom],i=o.getHeight()||this.vDomRowHeight;if(t>=i){var n=o.getElement();n.parentNode&&n.parentNode.removeChild(n),this.vDomBottomPad+=i,this.vDomBottomPad<0&&(this.vDomBottomPad=0),e.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=i,this.vDomBottom--,t=-(this.scrollTop-this.vDomScrollPosBottom),this._removeBottomRow(t)}},RowManager.prototype._quickNormalizeRowHeight=function(t){t.forEach((function(t){t.calcHeight()})),t.forEach((function(t){t.setCellHeight()})),t.length=0},RowManager.prototype.normalizeHeight=function(){this.activeRows.forEach((function(t){t.normalizeHeight()}))},RowManager.prototype.adjustTableSize=function(){var t,e=this.element.clientHeight;if("virtual"===this.renderMode){var o=Math.floor(this.columnManager.getElement().getBoundingClientRect().height+(this.table.footerManager&&this.table.footerManager.active&&!this.table.footerManager.external?this.table.footerManager.getElement().getBoundingClientRect().height:0));this.fixedHeight?(this.element.style.minHeight="calc(100% - "+o+"px)",this.element.style.height="calc(100% - "+o+"px)",this.element.style.maxHeight="calc(100% - "+o+"px)"):(this.element.style.height="",this.element.style.height=this.table.element.clientHeight-o+"px",this.element.scrollTop=this.scrollTop),this.height=this.element.clientHeight,this.vDomWindowBuffer=this.table.options.virtualDomBuffer||this.height,this.fixedHeight||e==this.element.clientHeight||((t=this.table.modExists("resizeTable"))&&!this.table.modules.resizeTable.autoResize||!t)&&this.redraw()}},RowManager.prototype.reinitialize=function(){this.rows.forEach((function(t){t.reinitialize(!0)}))},RowManager.prototype.blockRedraw=function(){this.redrawBlock=!0,this.redrawBlockRestoreConfig=!1},RowManager.prototype.restoreRedraw=function(){this.redrawBlock=!1,this.redrawBlockRestoreConfig?(this.refreshActiveData(this.redrawBlockRestoreConfig.stage,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition),this.redrawBlockRestoreConfig=!1):this.redrawBlockRederInPosition&&this.reRenderInPosition(),this.redrawBlockRederInPosition=!1},RowManager.prototype.redraw=function(t){var e=this.scrollLeft;this.adjustTableSize(),this.table.tableWidth=this.table.element.clientWidth,t?this.renderTable():("classic"==this.renderMode?this.table.options.groupBy?this.refreshActiveData("group",!1,!1):this._simpleRender():(this.reRenderInPosition(),this.scrollHorizontal(e)),this.displayRowsCount||this.table.options.placeholder&&this.getElement().appendChild(this.table.options.placeholder))},RowManager.prototype.resetScroll=function(){if(this.element.scrollLeft=0,this.element.scrollTop=0,"ie"===this.table.browser){var t=document.createEvent("Event");t.initEvent("scroll",!1,!0),this.element.dispatchEvent(t)}else this.element.dispatchEvent(new Event("scroll"))};var VDomHoz=function(t){this.table=t,this.element=this.table.rowManager.tableElement,this.holderEl=this.table.rowManager.element,this.leftCol=0,this.rightCol=0,this.scrollLeft=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0,this.fitDataColAvg=0,this.window=200,this.initialized=!1,this.columns=[],this.compatabilityCheck()&&this.initialize()};VDomHoz.prototype.compatabilityCheck=function(){var t=this.table.options,e=!0;return"fitDataTable"==t.layout&&(console.warn("Horizontal Vitrual DOM is not compatible with fitDataTable layout mode"),e=!1),t.responsiveLayout&&(console.warn("Horizontal Vitrual DOM is not compatible with responsive columns"),e=!1),this.table.rtl&&(console.warn("Horizontal Vitrual DOM is not currently compatible with RTL text direction"),e=!1),t.columns&&t.columns.find((function(t){return t.frozen}))&&(console.warn("Horizontal Vitrual DOM is not compatible with frozen columns"),e=!1),e||(t.virtualDomHoz=!1),e},VDomHoz.prototype.initialize=function(){var t=this;this.holderEl.addEventListener("scroll",(function(){var e=t.holderEl.scrollLeft;t.scrollLeft!=e&&(t.scrollLeft=e,t.scroll(e-(t.vDomScrollPosLeft+t.window)))}))},VDomHoz.prototype.deinitialize=function(){this.initialized=!1},VDomHoz.prototype.clear=function(){this.columns=[],this.leftCol=-1,this.rightCol=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0},VDomHoz.prototype.dataChange=function(){var t,e,o=!1,i=0,n=0;if("fitData"===this.table.options.layout){if(this.table.columnManager.columnsByIndex.forEach((function(t){!t.definition.width&&t.visible&&(o=!0)})),o&&o&&this.table.rowManager.getDisplayRows().length&&(this.vDomScrollPosRight=this.scrollLeft+this.holderEl.clientWidth+this.window,t=this.table.options.groupBy?this.table.modules.groupRows.getGroups(!1)[0].getRows(!1)[0]:this.table.rowManager.getDisplayRows()[0])){e=t.getElement(),t.generateCells(),this.element.appendChild(e);for(n=0;n<t.cells.length;n++){var s=t.cells[n];if(e.appendChild(s.getElement()),s.column.reinitializeWidth(),(i+=s.column.getWidth())>this.vDomScrollPosRight)break}for(e.parentNode.removeChild(e),this.fitDataColAvg=Math.floor(i/(n+1));n<this.table.columnManager.columnsByIndex.length;n++)this.table.columnManager.columnsByIndex[n].setWidth(this.fitDataColAvg);this.reinitialize(!1,!0)}}else"fitColumns"===this.table.options.layout&&(this.table.modules.layout.layout(),this.table.vdomHoz.reinitialize(!1,!0))},VDomHoz.prototype.fitDataLayoutOverride=function(){for(var t=this.leftCol;t<=this.rightCol;t++)this.columns[t].reinitializeWidth()},VDomHoz.prototype.reinitialize=function(t,e){var o=this,i={cols:this.columns,leftCol:this.leftCol,rightCol:this.rightCol};if(!t||this.initialized){this.clear(),this.scrollLeft=this.holderEl.scrollLeft,this.vDomScrollPosLeft=this.scrollLeft-this.window,this.vDomScrollPosRight=this.scrollLeft+this.holderEl.clientWidth+this.window;var n=0;this.table.columnManager.columnsByIndex.forEach((function(t){var e={};if(t.visible){var i=t.getWidth();e.leftPos=n,e.rightPos=n+i,n+i>o.vDomScrollPosLeft&&n<o.vDomScrollPosRight?(-1==o.leftCol&&(o.leftCol=o.columns.length,o.vDomPadLeft=n),o.rightCol=o.columns.length):-1!==o.leftCol&&(o.vDomPadRight+=i),o.columns.push(t),t.modules.vdomHoz=e,n+=i}})),this.element.style.paddingLeft=this.vDomPadLeft+"px",this.element.style.paddingRight=this.vDomPadRight+"px",this.initialized=!0,e||t&&!this.reinitChanged(i)||this.renitializeRows(),this.holderEl.scrollLeft=this.scrollLeft}},VDomHoz.prototype.reinitChanged=function(t){var e=this,o=!0;return t.cols.length!==this.columns.length||t.leftCol!==this.leftCol||t.rightCol!==this.rightCol||(t.cols.forEach((function(t,i){t!==e.columns[i]&&(o=!1)})),!o)},VDomHoz.prototype.renitializeRows=function(){var t=this;this.table.rowManager.getVisibleRows().forEach((function(e){t.reinitializeRow(e,!0)}))},VDomHoz.prototype.scroll=function(t){this.vDomScrollPosLeft+=t,this.vDomScrollPosRight+=t,t>.8*this.holderEl.clientWidth?this.reinitialize():t>0?(this.addColRight(),this.removeColLeft()):(this.addColLeft(),this.removeColRight())},VDomHoz.prototype.colPositionAdjust=function(t,e,o){for(var i=t;i<e;i++){var n=this.columns[i];n.modules.vdomHoz.leftPos-=o,n.modules.vdomHoz.rightPos-=o}},VDomHoz.prototype.addColRight=function(){var t,e,o=this.columns[this.rightCol+1];o&&o.modules.vdomHoz.leftPos<=this.vDomScrollPosRight&&(this.table.rowManager.getVisibleRows().forEach((function(t){if("group"!==t.type){var e=t.getCell(o);t.getElement().appendChild(e.getElement()),e.cellRendered()}})),this.fitDataColAvg&&(t=o.getWidth())===this.fitDataColAvg&&(o.reinitializeWidth(),(e=t-o.getWidth())&&(o.modules.vdomHoz.rightPos-=e,this.colPositionAdjust(this.rightCol+1,this.columns.length,e))),this.rightCol++,this.rightCol>=this.columns.length-1?this.vDomPadRight=0:this.vDomPadRight-=o.getWidth(),this.element.style.paddingRight=this.vDomPadRight+"px",this.addColRight())},VDomHoz.prototype.addColLeft=function(){var t=this.columns[this.leftCol-1];t&&t.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft&&(this.table.rowManager.getVisibleRows().forEach((function(e){if("group"!==e.type){var o=e.getCell(t);e.getElement().prepend(o.getElement()),o.cellRendered()}})),this.leftCol?this.vDomPadLeft-=t.getWidth():this.vDomPadLeft=0,this.element.style.paddingLeft=this.vDomPadLeft+"px",this.leftCol--,this.addColLeft())},VDomHoz.prototype.removeColRight=function(t){var e;(t=this.columns[this.rightCol])&&t.modules.vdomHoz.leftPos>this.vDomScrollPosRight&&(e=this.table.rowManager.getVisibleRows(),t.modules.vdomHoz.visible=!1,e.forEach((function(e){if("group"!==e.type){var o=e.getCell(t);e.getElement().removeChild(o.getElement())}})),this.vDomPadRight+=t.getWidth(),this.element.style.paddingRight=this.vDomPadRight+"px",this.rightCol--,this.removeColRight())},VDomHoz.prototype.removeColLeft=function(){var t=this.columns[this.leftCol];t&&t.modules.vdomHoz.rightPos<this.vDomScrollPosLeft&&(this.table.rowManager.getVisibleRows().forEach((function(e){if("group"!==e.type){var o=e.getCell(t);e.getElement().removeChild(o.getElement())}})),this.vDomPadLeft+=t.getWidth(),this.element.style.paddingLeft=this.vDomPadLeft+"px",this.leftCol++,this.removeColLeft())},VDomHoz.prototype.initializeRow=function(t){if("group"!==t.type){t.modules.vdomHoz={leftCol:this.leftCol,rightCol:this.rightCol};for(var e=this.leftCol;e<=this.rightCol;e++){var o=this.columns[e];if(o&&o.visible){var i=t.getCell(o);t.getElement().appendChild(i.getElement()),i.cellRendered()}}}},VDomHoz.prototype.reinitializeRow=function(t,e){if("group"!==t.type&&(e||!t.modules.vdomHoz||t.modules.vdomHoz.leftCol!==this.leftCol||t.modules.vdomHoz.rightCol!==this.rightCol)){for(var o=t.getElement();o.firstChild;)o.removeChild(o.firstChild);this.initializeRow(t)}};var RowComponent=function(t){this._row=t};RowComponent.prototype.getData=function(t){return this._row.getData(t)},RowComponent.prototype.getElement=function(){return this._row.getElement()},RowComponent.prototype.getCells=function(){var t=[];return this._row.getCells().forEach((function(e){t.push(e.getComponent())})),t},RowComponent.prototype.getCell=function(t){var e=this._row.getCell(t);return!!e&&e.getComponent()},RowComponent.prototype.getIndex=function(){return this._row.getData("data")[this._row.table.options.index]},RowComponent.prototype.getPosition=function(t){return this._row.table.rowManager.getRowPosition(this._row,t)},RowComponent.prototype.delete=function(){return this._row.delete()},RowComponent.prototype.scrollTo=function(){return this._row.table.rowManager.scrollToRow(this._row)},RowComponent.prototype.pageTo=function(){if(this._row.table.modExists("page",!0))return this._row.table.modules.page.setPageToRow(this._row)},RowComponent.prototype.move=function(t,e){this._row.moveToRow(t,e)},RowComponent.prototype.update=function(t){return this._row.updateData(t)},RowComponent.prototype.normalizeHeight=function(){this._row.normalizeHeight(!0)},RowComponent.prototype.select=function(){this._row.table.modules.selectRow.selectRows(this._row)},RowComponent.prototype.deselect=function(){this._row.table.modules.selectRow.deselectRows(this._row)},RowComponent.prototype.toggleSelect=function(){this._row.table.modules.selectRow.toggleRow(this._row)},RowComponent.prototype.isSelected=function(){return this._row.table.modules.selectRow.isRowSelected(this._row)},RowComponent.prototype._getSelf=function(){return this._row},RowComponent.prototype.validate=function(){return this._row.validate()},RowComponent.prototype.freeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.freezeRow(this._row)},RowComponent.prototype.unfreeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.unfreezeRow(this._row)},RowComponent.prototype.isFrozen=function(){return!!this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.rows.indexOf(this._row)>-1},RowComponent.prototype.treeCollapse=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.collapseRow(this._row)},RowComponent.prototype.treeExpand=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.expandRow(this._row)},RowComponent.prototype.treeToggle=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.toggleRow(this._row)},RowComponent.prototype.getTreeParent=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeParent(this._row)},RowComponent.prototype.getTreeChildren=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeChildren(this._row,!0)},RowComponent.prototype.addTreeChild=function(t,e,o){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.addTreeChildRow(this._row,t,e,o)},RowComponent.prototype.reformat=function(){return this._row.reinitialize()},RowComponent.prototype.getGroup=function(){return this._row.getGroup().getComponent()},RowComponent.prototype.getTable=function(){return this._row.table},RowComponent.prototype.getNextRow=function(){var t=this._row.nextRow();return t?t.getComponent():t},RowComponent.prototype.getPrevRow=function(){var t=this._row.prevRow();return t?t.getComponent():t};var Row=function(t,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"row";this.table=e.table,this.parent=e,this.data={},this.type=o,this.element=!1,this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.component=null,this.created=!1,this.setData(t)};Row.prototype.create=function(){this.created||(this.created=!0,this.generateElement())},Row.prototype.createElement=function(){var t=document.createElement("div");t.classList.add("tabulator-row"),t.setAttribute("role","row"),this.element=t},Row.prototype.getElement=function(){return this.create(),this.element},Row.prototype.detachElement=function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},Row.prototype.generateElement=function(){var t,e,o,i=this;this.createElement(),!1!==i.table.options.selectable&&i.table.modExists("selectRow")&&i.table.modules.selectRow.initializeRow(this),!1!==i.table.options.movableRows&&i.table.modExists("moveRow")&&i.table.modules.moveRow.initializeRow(this),!1!==i.table.options.dataTree&&i.table.modExists("dataTree")&&i.table.modules.dataTree.initializeRow(this),"collapse"===i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout")&&i.table.modules.responsiveLayout.initializeRow(this),(i.table.options.rowContextMenu||i.table.options.rowClickMenu)&&this.table.modExists("menu")&&i.table.modules.menu.initializeRow(this),i.table.options.rowClick&&i.element.addEventListener("click",(function(t){i.table.options.rowClick(t,i.getComponent())})),i.table.options.rowDblClick&&i.element.addEventListener("dblclick",(function(t){i.table.options.rowDblClick(t,i.getComponent())})),i.table.options.rowContext&&i.element.addEventListener("contextmenu",(function(t){i.table.options.rowContext(t,i.getComponent())})),i.table.options.rowMouseEnter&&i.element.addEventListener("mouseenter",(function(t){i.table.options.rowMouseEnter(t,i.getComponent())})),i.table.options.rowMouseLeave&&i.element.addEventListener("mouseleave",(function(t){i.table.options.rowMouseLeave(t,i.getComponent())})),i.table.options.rowMouseOver&&i.element.addEventListener("mouseover",(function(t){i.table.options.rowMouseOver(t,i.getComponent())})),i.table.options.rowMouseOut&&i.element.addEventListener("mouseout",(function(t){i.table.options.rowMouseOut(t,i.getComponent())})),i.table.options.rowMouseMove&&i.element.addEventListener("mousemove",(function(t){i.table.options.rowMouseMove(t,i.getComponent())})),i.table.options.rowTap&&(o=!1,i.element.addEventListener("touchstart",(function(t){o=!0}),{passive:!0}),i.element.addEventListener("touchend",(function(t){o&&i.table.options.rowTap(t,i.getComponent()),o=!1}))),i.table.options.rowDblTap&&(t=null,i.element.addEventListener("touchend",(function(e){t?(clearTimeout(t),t=null,i.table.options.rowDblTap(e,i.getComponent())):t=setTimeout((function(){clearTimeout(t),t=null}),300)}))),i.table.options.rowTapHold&&(e=null,i.element.addEventListener("touchstart",(function(t){clearTimeout(e),e=setTimeout((function(){clearTimeout(e),e=null,o=!1,i.table.options.rowTapHold(t,i.getComponent())}),1e3)}),{passive:!0}),i.element.addEventListener("touchend",(function(t){clearTimeout(e),e=null})))},Row.prototype.generateCells=function(){this.cells=this.table.columnManager.generateCells(this)},Row.prototype.initialize=function(t){var e=this;if(this.create(),!this.initialized||t){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutRow(this),this.generateCells(),this.table.options.virtualDomHoz&&this.table.vdomHoz.initialized?this.table.vdomHoz.initializeRow(this):this.cells.forEach((function(t){e.element.appendChild(t.getElement()),t.cellRendered()})),t&&this.normalizeHeight(),this.table.options.dataTree&&this.table.modExists("dataTree")&&this.table.modules.dataTree.layoutRow(this),"collapse"===this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout")&&this.table.modules.responsiveLayout.layoutRow(this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.table.options.resizableRows&&this.table.modExists("resizeRows")&&this.table.modules.resizeRows.initializeRow(this),this.initialized=!0}else this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitializeRow(this)},Row.prototype.reinitializeHeight=function(){this.heightInitialized=!1,this.element&&null!==this.element.offsetParent&&this.normalizeHeight(!0)},Row.prototype.reinitialize=function(t){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),this.element&&null!==this.element.offsetParent&&this.initialize(!0),this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.modules.dataTree.getTreeChildren(this,!1,!0).forEach((function(t){t.reinitialize(!0)}))},Row.prototype.calcHeight=function(t){var e=0,o=this.table.options.resizableRows?this.element.clientHeight:0;this.cells.forEach((function(t){var o=t.getHeight();o>e&&(e=o)})),this.height=t?Math.max(e,o):this.manualHeight?this.height:Math.max(e,o),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight},Row.prototype.setCellHeight=function(){this.cells.forEach((function(t){t.setHeight()})),this.heightInitialized=!0},Row.prototype.clearCellHeight=function(){this.cells.forEach((function(t){t.clearHeight()}))},Row.prototype.normalizeHeight=function(t){t&&this.clearCellHeight(),this.calcHeight(t),this.setCellHeight()},Row.prototype.setHeight=function(t,e){(this.height!=t||e)&&(this.manualHeight=!0,this.height=t,this.heightStyled=t?t+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight)},Row.prototype.getHeight=function(){return this.outerHeight},Row.prototype.getWidth=function(){return this.element.offsetWidth},Row.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},Row.prototype.setData=function(t){this.table.modExists("mutator")&&(t=this.table.modules.mutator.transformRow(t,"data")),this.data=t,this.table.options.reactiveData&&this.table.modExists("reactiveData",!0)&&this.table.modules.reactiveData.watchRow(this)},Row.prototype.updateData=function(t){var e,o=this,i=this.element&&Tabulator.prototype.helpers.elVisible(this.element),n={};return new Promise((function(s,a){for(var r in"string"==typeof t&&(t=JSON.parse(t)),o.table.options.reactiveData&&o.table.modExists("reactiveData",!0)&&o.table.modules.reactiveData.block(),o.table.modExists("mutator")?(n=Object.assign(n,o.data),n=Object.assign(n,t),e=o.table.modules.mutator.transformRow(n,"data",t)):e=t,e)o.data[r]=e[r];for(var r in o.table.options.reactiveData&&o.table.modExists("reactiveData",!0)&&o.table.modules.reactiveData.unblock(),t){o.table.columnManager.getColumnsByFieldRoot(r).forEach((function(t){var n=o.getCell(t.getField());if(n){var s=t.getFieldValue(e);n.getValue()!=s&&(n.setValueProcessData(s),i&&n.cellRendered())}}))}o.table.options.groupUpdateOnCellEdit&&o.table.options.groupBy&&o.table.modExists("groupRows")&&o.table.modules.groupRows.reassignRowToGroup(o.row),i?(o.normalizeHeight(!0),o.table.options.rowFormatter&&o.table.options.rowFormatter(o.getComponent())):(o.initialized=!1,o.height=0,o.heightStyled=""),!1!==o.table.options.dataTree&&o.table.modExists("dataTree")&&o.table.modules.dataTree.redrawNeeded(t)&&(o.table.modules.dataTree.initializeRow(o),i&&(o.table.modules.dataTree.layoutRow(o),o.table.rowManager.refreshActiveData("tree",!1,!0))),o.table.options.rowUpdated.call(o.table,o.getComponent()),o.table.options.dataChanged&&o.table.options.dataChanged.call(o.table,o.table.rowManager.getData()),s()}))},Row.prototype.getData=function(t){return t&&this.table.modExists("accessor")?this.table.modules.accessor.transformRow(this,t):this.data},Row.prototype.getCell=function(t){return t=this.table.columnManager.findColumn(t),this.cells.find((function(e){return e.column===t}))},Row.prototype.getCellIndex=function(t){return this.cells.findIndex((function(e){return e===t}))},Row.prototype.findNextEditableCell=function(t){var e=!1;if(t<this.cells.length-1)for(var o=t+1;o<this.cells.length;o++){var i=this.cells[o];if(i.column.modules.edit&&Tabulator.prototype.helpers.elVisible(i.getElement())){var n=!0;if("function"==typeof i.column.modules.edit.check&&(n=i.column.modules.edit.check(i.getComponent())),n){e=i;break}}}return e},Row.prototype.findPrevEditableCell=function(t){var e=!1;if(t>0)for(var o=t-1;o>=0;o--){var i=this.cells[o],n=!0;if(i.column.modules.edit&&Tabulator.prototype.helpers.elVisible(i.getElement())&&("function"==typeof i.column.modules.edit.check&&(n=i.column.modules.edit.check(i.getComponent())),n)){e=i;break}}return e},Row.prototype.getCells=function(){return this.cells},Row.prototype.nextRow=function(){return this.table.rowManager.nextDisplayRow(this,!0)||!1},Row.prototype.prevRow=function(){return this.table.rowManager.prevDisplayRow(this,!0)||!1},Row.prototype.moveToRow=function(t,e){var o=this.table.rowManager.findRow(t);o?(this.table.rowManager.moveRowActual(this,o,!e),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",t)},Row.prototype.validate=function(){var t=[];return this.cells.forEach((function(e){e.validate()||t.push(e.getComponent())})),!t.length||t},Row.prototype.delete=function(){var t=this;return new Promise((function(e,o){var i,n;t.table.options.history&&t.table.modExists("history")&&(t.table.options.groupBy&&t.table.modExists("groupRows")?(i=(n=t.getGroup().rows).indexOf(t))&&(i=n[i-1]):(i=t.table.rowManager.getRowIndex(t))&&(i=t.table.rowManager.rows[i-1]),t.table.modules.history.action("rowDelete",t,{data:t.getData(),pos:!i,index:i})),t.deleteActual(),e()}))},Row.prototype.deleteActual=function(t){this.table.rowManager.getRowIndex(this);this.detatchModules(),this.table.options.reactiveData&&this.table.modExists("reactiveData",!0),this.modules.group&&this.modules.group.removeRow(this),this.table.rowManager.deleteRow(this,t),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.modules.dataTree.rowDelete(this),this.table.modExists("columnCalcs")&&(this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.columnCalcs.recalcRowGroup(this):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows))},Row.prototype.detatchModules=function(){this.table.modExists("selectRow")&&this.table.modules.selectRow._deselectRow(this,!0),this.table.modExists("edit")&&this.table.modules.edit.currentCell.row===this&&this.table.modules.edit.cancelEdit(),this.table.modExists("frozenRows")&&this.table.modules.frozenRows.detachRow(this)},Row.prototype.deleteCells=function(){for(var t=this.cells.length,e=0;e<t;e++)this.cells[0].delete()},Row.prototype.wipe=function(){if(this.detatchModules(),this.deleteCells(),this.element){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.parentNode&&this.element.parentNode.removeChild(this.element)}this.element=!1,this.modules={}},Row.prototype.getGroup=function(){return this.modules.group||!1},Row.prototype.getComponent=function(){return this.component||(this.component=new RowComponent(this)),this.component};var CellComponent=function(t){this._cell=t};CellComponent.prototype.getValue=function(){return this._cell.getValue()},CellComponent.prototype.getOldValue=function(){return this._cell.getOldValue()},CellComponent.prototype.getInitialValue=function(){return this._cell.initialValue},CellComponent.prototype.getElement=function(){return this._cell.getElement()},CellComponent.prototype.getRow=function(){return this._cell.row.getComponent()},CellComponent.prototype.getData=function(){return this._cell.row.getData()},CellComponent.prototype.getField=function(){return this._cell.column.getField()},CellComponent.prototype.getColumn=function(){return this._cell.column.getComponent()},CellComponent.prototype.setValue=function(t,e){void 0===e&&(e=!0),this._cell.setValue(t,e)},CellComponent.prototype.restoreOldValue=function(){this._cell.setValueActual(this._cell.getOldValue())},CellComponent.prototype.restoreInitialValue=function(){this._cell.setValueActual(this._cell.initialValue)},CellComponent.prototype.edit=function(t){return this._cell.edit(t)},CellComponent.prototype.cancelEdit=function(){this._cell.cancelEdit()},CellComponent.prototype.isEdited=function(){return!!this._cell.modules.edit&&this._cell.modules.edit.edited},CellComponent.prototype.clearEdited=function(){self.table.modExists("edit",!0)&&this._cell.table.modules.edit.clearEdited(this._cell)},CellComponent.prototype.isValid=function(){return!this._cell.modules.validate||!this._cell.modules.validate.invalid},CellComponent.prototype.validate=function(){return this._cell.validate()},CellComponent.prototype.clearValidation=function(){this._cell.table.modExists("validate",!0)&&this._cell.table.modules.validate.clearValidation(this._cell)},CellComponent.prototype.nav=function(){return this._cell.nav()},CellComponent.prototype.checkHeight=function(){this._cell.checkHeight()},CellComponent.prototype.getTable=function(){return this._cell.table},CellComponent.prototype._getSelf=function(){return this._cell};var Cell=function(t,e){this.table=t.table,this.column=t,this.row=e,this.element=null,this.value=null,this.initialValue,this.oldValue=null,this.modules={},this.height=null,this.width=null,this.minWidth=null,this.component=null,this.loaded=!1,this.build()};Cell.prototype.build=function(){this.generateElement(),this.setWidth(),this._configureCell(),this.setValueActual(this.column.getFieldValue(this.row.data)),this.initialValue=this.value},Cell.prototype.generateElement=function(){this.element=document.createElement("div"),this.element.className="tabulator-cell",this.element.setAttribute("role","gridcell"),this.element=this.element},Cell.prototype._configureCell=function(){var t=this,e=t.column.cellEvents,o=t.element,i=this.column.getField();(o.style.textAlign=t.column.hozAlign,t.column.vertAlign&&(o.style.display="inline-flex",o.style.alignItems={top:"flex-start",bottom:"flex-end",middle:"center"}[t.column.vertAlign]||"",t.column.hozAlign&&(o.style.justifyContent={left:"flex-start",right:"flex-end",center:"center"}[t.column.hozAlign]||"")),i&&o.setAttribute("tabulator-field",i),t.column.definition.cssClass)&&t.column.definition.cssClass.split(" ").forEach((function(t){o.classList.add(t)}));"hover"===this.table.options.tooltipGenerationMode&&o.addEventListener("mouseenter",(function(e){t._generateTooltip()})),t._bindClickEvents(e),t._bindTouchEvents(e),t._bindMouseEvents(e),t.column.modules.edit&&t.table.modules.edit.bindEditor(t),t.column.definition.rowHandle&&!1!==t.table.options.movableRows&&t.table.modExists("moveRow")&&t.table.modules.moveRow.initializeCell(t),t.column.visible||t.hide()},Cell.prototype._bindClickEvents=function(t){var e=this,o=e.element;(t.cellClick||e.table.options.cellClick)&&o.addEventListener("click",(function(o){var i=e.getComponent();t.cellClick&&t.cellClick.call(e.table,o,i),e.table.options.cellClick&&e.table.options.cellClick.call(e.table,o,i)})),t.cellDblClick||this.table.options.cellDblClick?o.addEventListener("dblclick",(function(o){var i=e.getComponent();t.cellDblClick&&t.cellDblClick.call(e.table,o,i),e.table.options.cellDblClick&&e.table.options.cellDblClick.call(e.table,o,i)})):o.addEventListener("dblclick",(function(t){if(!e.table.modExists("edit")||e.table.modules.edit.currentCell!==e){t.preventDefault();try{if(document.selection)(o=document.body.createTextRange()).moveToElementText(e.element),o.select();else if(window.getSelection){var o;(o=document.createRange()).selectNode(e.element),window.getSelection().removeAllRanges(),window.getSelection().addRange(o)}}catch(t){}}})),(t.cellContext||this.table.options.cellContext)&&o.addEventListener("contextmenu",(function(o){var i=e.getComponent();t.cellContext&&t.cellContext.call(e.table,o,i),e.table.options.cellContext&&e.table.options.cellContext.call(e.table,o,i)}))},Cell.prototype._bindMouseEvents=function(t){var e=this,o=e.element;(t.cellMouseEnter||e.table.options.cellMouseEnter)&&o.addEventListener("mouseenter",(function(o){var i=e.getComponent();t.cellMouseEnter&&t.cellMouseEnter.call(e.table,o,i),e.table.options.cellMouseEnter&&e.table.options.cellMouseEnter.call(e.table,o,i)})),(t.cellMouseLeave||e.table.options.cellMouseLeave)&&o.addEventListener("mouseleave",(function(o){var i=e.getComponent();t.cellMouseLeave&&t.cellMouseLeave.call(e.table,o,i),e.table.options.cellMouseLeave&&e.table.options.cellMouseLeave.call(e.table,o,i)})),(t.cellMouseOver||e.table.options.cellMouseOver)&&o.addEventListener("mouseover",(function(o){var i=e.getComponent();t.cellMouseOver&&t.cellMouseOver.call(e.table,o,i),e.table.options.cellMouseOver&&e.table.options.cellMouseOver.call(e.table,o,i)})),(t.cellMouseOut||e.table.options.cellMouseOut)&&o.addEventListener("mouseout",(function(o){var i=e.getComponent();t.cellMouseOut&&t.cellMouseOut.call(e.table,o,i),e.table.options.cellMouseOut&&e.table.options.cellMouseOut.call(e.table,o,i)})),(t.cellMouseMove||e.table.options.cellMouseMove)&&o.addEventListener("mousemove",(function(o){var i=e.getComponent();t.cellMouseMove&&t.cellMouseMove.call(e.table,o,i),e.table.options.cellMouseMove&&e.table.options.cellMouseMove.call(e.table,o,i)}))},Cell.prototype._bindTouchEvents=function(t){var e,o,i,n=this,s=n.element;(t.cellTap||this.table.options.cellTap)&&(i=!1,s.addEventListener("touchstart",(function(t){i=!0}),{passive:!0}),s.addEventListener("touchend",(function(e){if(i){var o=n.getComponent();t.cellTap&&t.cellTap.call(n.table,e,o),n.table.options.cellTap&&n.table.options.cellTap.call(n.table,e,o)}i=!1}))),(t.cellDblTap||this.table.options.cellDblTap)&&(e=null,s.addEventListener("touchend",(function(o){if(e){clearTimeout(e),e=null;var i=n.getComponent();t.cellDblTap&&t.cellDblTap.call(n.table,o,i),n.table.options.cellDblTap&&n.table.options.cellDblTap.call(n.table,o,i)}else e=setTimeout((function(){clearTimeout(e),e=null}),300)}))),(t.cellTapHold||this.table.options.cellTapHold)&&(o=null,s.addEventListener("touchstart",(function(e){clearTimeout(o),o=setTimeout((function(){clearTimeout(o),o=null,i=!1;var s=n.getComponent();t.cellTapHold&&t.cellTapHold.call(n.table,e,s),n.table.options.cellTapHold&&n.table.options.cellTapHold.call(n.table,e,s)}),1e3)}),{passive:!0}),s.addEventListener("touchend",(function(t){clearTimeout(o),o=null})))},Cell.prototype._generateContents=function(){var t;switch(void 0===(t=this.table.modExists("format")?this.table.modules.format.formatValue(this):this.element.innerHTML=this.value)?"undefined":_typeof(t)){case"object":if(t instanceof Node){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.appendChild(t)}else this.element.innerHTML="",null!=t&&console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",t);break;case"undefined":case"null":this.element.innerHTML="";break;default:this.element.innerHTML=t}},Cell.prototype.cellRendered=function(){this.table.modExists("format")&&this.table.modules.format.cellRendered&&this.table.modules.format.cellRendered(this)},Cell.prototype._generateTooltip=function(){var t=this.column.tooltip;t?(!0===t?t=this.value:"function"==typeof t&&!1===(t=t(this.getComponent()))&&(t=""),void 0===t&&(t=""),this.element.setAttribute("title",t)):this.element.setAttribute("title","")},Cell.prototype.getElement=function(t){return this.loaded||(this.loaded=!0,t||this.layoutElement()),this.element},Cell.prototype.getValue=function(){return this.value},Cell.prototype.getOldValue=function(){return this.oldValue},Cell.prototype.setValue=function(t,e){var o;this.setValueProcessData(t,e)&&(this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("cellEdit",this,{oldValue:this.oldValue,newValue:this.value}),o=this.getComponent(),this.column.cellEvents.cellEdited&&this.column.cellEvents.cellEdited.call(this.table,o),this.table.options.groupUpdateOnCellEdit&&this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.reassignRowToGroup(this.row),this.cellRendered(),this.table.options.cellEdited.call(this.table,o),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.table.rowManager.getData()))},Cell.prototype.setValueProcessData=function(t,e){var o=!1;return this.value!=t&&(o=!0,e&&this.column.modules.mutate&&(t=this.table.modules.mutator.transformCell(this,t))),this.setValueActual(t),o&&this.table.modExists("columnCalcs")&&(this.column.definition.topCalc||this.column.definition.bottomCalc)&&(this.table.options.groupBy&&this.table.modExists("groupRows")?("table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs||this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),"table"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.recalcRowGroup(this.row)):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows)),o},Cell.prototype.setValueActual=function(t){this.oldValue=this.value,this.value=t,this.table.options.reactiveData&&this.table.modExists("reactiveData")&&this.table.modules.reactiveData.block(),this.column.setFieldValue(this.row.data,t),this.table.options.reactiveData&&this.table.modExists("reactiveData")&&this.table.modules.reactiveData.unblock(),this.loaded&&this.layoutElement()},Cell.prototype.layoutElement=function(){this._generateContents(),this._generateTooltip(),this.table.options.resizableColumns&&this.table.modExists("resizeColumns")&&"row"===this.row.type&&this.table.modules.resizeColumns.initializeColumn("cell",this.column,this.element),(this.column.definition.contextMenu||this.column.definition.clickMenu)&&this.table.modExists("menu")&&this.table.modules.menu.initializeCell(this),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutElement(this.element,this.column)},Cell.prototype.setWidth=function(){this.width=this.column.width,this.element.style.width=this.column.widthStyled},Cell.prototype.clearWidth=function(){this.width="",this.element.style.width=""},Cell.prototype.getWidth=function(){return this.width||this.element.offsetWidth},Cell.prototype.setMinWidth=function(){this.minWidth=this.column.minWidth,this.element.style.minWidth=this.column.minWidthStyled},Cell.prototype.setMaxWidth=function(){this.maxWidth=this.column.maxWidth,this.element.style.maxWidth=this.column.maxWidthStyled},Cell.prototype.checkHeight=function(){this.row.reinitializeHeight()},Cell.prototype.clearHeight=function(){this.element.style.height="",this.height=null},Cell.prototype.setHeight=function(){this.height=this.row.height,this.element.style.height=this.row.heightStyled},Cell.prototype.getHeight=function(){return this.height||this.element.offsetHeight},Cell.prototype.show=function(){this.element.style.display=this.column.vertAlign?"inline-flex":""},Cell.prototype.hide=function(){this.element.style.display="none"},Cell.prototype.edit=function(t){if(this.table.modExists("edit",!0))return this.table.modules.edit.editCell(this,t)},Cell.prototype.cancelEdit=function(){if(this.table.modExists("edit",!0)){var t=this.table.modules.edit.getCurrentCell();t&&t._getSelf()===this?this.table.modules.edit.cancelEdit():console.warn("Cancel Editor Error - This cell is not currently being edited ")}},Cell.prototype.validate=function(){return!this.column.modules.validate||!this.table.modExists("validate",!0)||!0===this.table.modules.validate.validate(this.column.modules.validate,this,this.getValue())},Cell.prototype.delete=function(){!this.table.rowManager.redrawBlock&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.modules.validate&&this.modules.validate.invalid&&this.table.modules.validate.clearValidation(this),this.modules.edit&&this.modules.edit.edited&&this.table.modules.edit.clearEdited(this),this.table.options.history&&this.table.modules.history.clearComponentHistory(this),this.element=!1,this.column.deleteCell(this),this.row.deleteCell(this),this.calcs={}},Cell.prototype.nav=function(){var t=this,e=!1,o=this.row.getCellIndex(this);return{next:function(){var e,o=this.right();return!!o||!(!(e=t.table.rowManager.nextDisplayRow(t.row,!0))||!(o=e.findNextEditableCell(-1)))&&(o.edit(),!0)},prev:function(){var e,o=this.left();return!!o||!(!(e=t.table.rowManager.prevDisplayRow(t.row,!0))||!(o=e.findPrevEditableCell(e.cells.length)))&&(o.edit(),!0)},left:function(){return!!(e=t.row.findPrevEditableCell(o))&&(e.edit(),!0)},right:function(){return!!(e=t.row.findNextEditableCell(o))&&(e.edit(),!0)},up:function(){var e=t.table.rowManager.prevDisplayRow(t.row,!0);e&&e.cells[o].edit()},down:function(){var e=t.table.rowManager.nextDisplayRow(t.row,!0);e&&e.cells[o].edit()}}},Cell.prototype.getIndex=function(){this.row.getCellIndex(this)},Cell.prototype.getComponent=function(){return this.component||(this.component=new CellComponent(this)),this.component};var FooterManager=function(t){this.table=t,this.active=!1,this.element=this.createElement(),this.external=!1,this.links=[],this._initialize()};FooterManager.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-footer"),t},FooterManager.prototype._initialize=function(t){if(this.table.options.footerElement)switch(_typeof(this.table.options.footerElement)){case"string":"<"===this.table.options.footerElement[0]?this.element.innerHTML=this.table.options.footerElement:(this.external=!0,this.element=document.querySelector(this.table.options.footerElement));break;default:this.element=this.table.options.footerElement}},FooterManager.prototype.getElement=function(){return this.element},FooterManager.prototype.append=function(t,e){this.activate(e),this.element.appendChild(t),this.table.rowManager.adjustTableSize()},FooterManager.prototype.prepend=function(t,e){this.activate(e),this.element.insertBefore(t,this.element.firstChild),this.table.rowManager.adjustTableSize()},FooterManager.prototype.remove=function(t){t.parentNode.removeChild(t),this.deactivate()},FooterManager.prototype.deactivate=function(t){this.element.firstChild&&!t||(this.external||this.element.parentNode.removeChild(this.element),this.active=!1)},FooterManager.prototype.activate=function(t){this.active||(this.active=!0,this.external||(this.table.element.appendChild(this.getElement()),this.table.element.style.display="")),t&&this.links.push(t)},FooterManager.prototype.redraw=function(){this.links.forEach((function(t){t.footerRedraw()}))};var Tabulator=function t(e,o){this.options={},this.columnManager=null,this.rowManager=null,this.footerManager=null,this.vdomHoz=null,this.browser="",this.browserSlow=!1,this.browserMobile=!1,this.rtl=!1,this.modules={},this.initializeElement(e)&&(this.initializeOptions(o||{}),this._create()),t.prototype.comms.register(this)};Tabulator.prototype.defaultOptions={height:!1,minHeight:!1,maxHeight:!1,layout:"fitData",layoutColumnsOnNewData:!1,columnMinWidth:40,columnMaxWidth:!1,columnHeaderVertAlign:"top",columnVertAlign:!1,resizableColumns:!0,resizableRows:!1,autoResize:!0,columns:[],cellHozAlign:"",cellVertAlign:"",headerHozAlign:"",data:[],autoColumns:!1,autoColumnsDefinitions:!1,reactiveData:!1,nestedFieldSeparator:".",tooltips:!1,tooltipsHeader:!1,tooltipGenerationMode:"load",initialSort:!1,initialFilter:!1,initialHeaderFilter:!1,columnHeaderSortMulti:!0,sortOrderReverse:!1,headerSort:!0,headerSortTristate:!1,headerSortElement:"<div class='tabulator-arrow'></div>",footerElement:!1,index:"id",textDirection:"auto",keybindings:[],tabEndNewRow:!1,invalidOptionWarnings:!0,clipboard:!1,clipboardCopyStyled:!0,clipboardCopyConfig:!1,clipboardCopyFormatter:!1,clipboardCopyRowRange:"active",clipboardPasteParser:"table",clipboardPasteAction:"insert",clipboardCopied:function(){},clipboardPasted:function(){},clipboardPasteError:function(){},downloadDataFormatter:!1,downloadReady:function(t,e){return e},downloadComplete:!1,downloadConfig:{},downloadRowRange:"active",dataTree:!1,dataTreeFilter:!0,dataTreeSort:!0,dataTreeElementColumn:!1,dataTreeBranchElement:!0,dataTreeChildIndent:9,dataTreeChildField:"_children",dataTreeCollapseElement:!1,dataTreeExpandElement:!1,dataTreeStartExpanded:!1,dataTreeRowExpanded:function(){},dataTreeRowCollapsed:function(){},dataTreeChildColumnCalcs:!1,dataTreeSelectPropagate:!1,printAsHtml:!1,printFormatter:!1,printHeader:!1,printFooter:!1,printCopyStyle:!0,printStyled:!0,printVisibleRows:!0,printRowRange:"visible",printConfig:{},addRowPos:"bottom",selectable:"highlight",selectableRangeMode:"drag",selectableRollingSelection:!0,selectablePersistence:!0,selectableCheck:function(t,e){return!0},headerFilterLiveFilterDelay:300,headerFilterPlaceholder:!1,headerVisible:!0,history:!1,locale:!1,langs:{},virtualDom:!0,virtualDomBuffer:0,virtualDomHoz:!1,persistentLayout:!1,persistentSort:!1,persistentFilter:!1,persistenceID:"",persistenceMode:!0,persistenceReaderFunc:!1,persistenceWriterFunc:!1,persistence:!1,responsiveLayout:!1,responsiveLayoutCollapseStartOpen:!0,responsiveLayoutCollapseUseFormatters:!0,responsiveLayoutCollapseFormatter:!1,pagination:!1,paginationSize:!1,paginationInitialPage:1,paginationButtonCount:5,paginationSizeSelector:!1,paginationElement:!1,paginationDataSent:{},paginationDataReceived:{},paginationAddRow:"page",ajaxURL:!1,ajaxURLGenerator:!1,ajaxParams:{},ajaxConfig:"get",ajaxContentType:"form",ajaxRequestFunc:!1,ajaxLoader:!0,ajaxLoaderLoading:!1,ajaxLoaderError:!1,ajaxFiltering:!1,ajaxSorting:!1,ajaxProgressiveLoad:!1,ajaxProgressiveLoadDelay:0,ajaxProgressiveLoadScrollMargin:0,groupBy:!1,groupStartOpen:!0,groupValues:!1,groupUpdateOnCellEdit:!1,groupHeader:!1,groupHeaderPrint:null,groupHeaderClipboard:null,groupHeaderHtmlOutput:null,groupHeaderDownload:null,htmlOutputConfig:!1,movableColumns:!1,movableRows:!1,movableRowsConnectedTables:!1,movableRowsConnectedElements:!1,movableRowsSender:!1,movableRowsReceiver:"insert",movableRowsSendingStart:function(){},movableRowsSent:function(){},movableRowsSentFailed:function(){},movableRowsSendingStop:function(){},movableRowsReceivingStart:function(){},movableRowsReceived:function(){},movableRowsReceivedFailed:function(){},movableRowsReceivingStop:function(){},movableRowsElementDrop:function(){},scrollToRowPosition:"top",scrollToRowIfVisible:!0,scrollToColumnPosition:"left",scrollToColumnIfVisible:!0,rowFormatter:!1,rowFormatterPrint:null,rowFormatterClipboard:null,rowFormatterHtmlOutput:null,placeholder:!1,tableBuilding:function(){},tableBuilt:function(){},renderStarted:function(){},renderComplete:function(){},rowClick:!1,rowDblClick:!1,rowContext:!1,rowTap:!1,rowDblTap:!1,rowTapHold:!1,rowMouseEnter:!1,rowMouseLeave:!1,rowMouseOver:!1,rowMouseOut:!1,rowMouseMove:!1,rowContextMenu:!1,rowClickMenu:!1,rowAdded:function(){},rowDeleted:function(){},rowMoved:function(){},rowUpdated:function(){},rowSelectionChanged:function(){},rowSelected:function(){},rowDeselected:function(){},rowResized:function(){},cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1,cellEditing:function(){},cellEdited:function(){},cellEditCancelled:function(){},columnMoved:!1,columnResized:function(){},columnTitleChanged:function(){},columnVisibilityChanged:function(){},htmlImporting:function(){},htmlImported:function(){},dataLoading:function(){},dataLoaded:function(){},dataEdited:!1,dataChanged:!1,ajaxRequesting:function(){},ajaxResponse:!1,ajaxError:function(){},dataFiltering:!1,dataFiltered:!1,dataSorting:function(){},dataSorted:function(){},groupToggleElement:"arrow",groupClosedShowCalcs:!1,dataGrouping:function(){},dataGrouped:!1,groupVisibilityChanged:function(){},groupClick:!1,groupDblClick:!1,groupContext:!1,groupContextMenu:!1,groupClickMenu:!1,groupTap:!1,groupDblTap:!1,groupTapHold:!1,columnCalcs:!0,pageLoaded:function(){},localized:function(){},validationMode:"blocking",validationFailed:function(){},historyUndo:function(){},historyRedo:function(){},scrollHorizontal:function(){},scrollVertical:function(){}},Tabulator.prototype.initializeOptions=function(t){if(!1!==t.invalidOptionWarnings)for(var e in t)void 0===this.defaultOptions[e]&&console.warn("Invalid table constructor option:",e);for(var e in this.defaultOptions)e in t?this.options[e]=t[e]:Array.isArray(this.defaultOptions[e])?this.options[e]=Object.assign([],this.defaultOptions[e]):"object"===_typeof(this.defaultOptions[e])&&null!==this.defaultOptions[e]?this.options[e]=Object.assign({},this.defaultOptions[e]):this.options[e]=this.defaultOptions[e]},Tabulator.prototype.initializeElement=function(t){return"undefined"!=typeof HTMLElement&&t instanceof HTMLElement?(this.element=t,!0):"string"==typeof t?(this.element=document.querySelector(t),!!this.element||(console.error("Tabulator Creation Error - no element found matching selector: ",t),!1)):(console.error("Tabulator Creation Error - Invalid element provided:",t),!1)},Tabulator.prototype.rtlCheck=function(){var t=window.getComputedStyle(this.element);switch(this.options.textDirection){case"auto":if("rtl"!==t.direction)break;case"rtl":this.element.classList.add("tabulator-rtl"),this.rtl=!0;break;case"ltr":this.element.classList.add("tabulator-ltr");default:this.rtl=!1}},Tabulator.prototype._mapDepricatedFunctionality=function(){(this.options.persistentLayout||this.options.persistentSort||this.options.persistentFilter)&&(this.options.persistence||(this.options.persistence={})),this.options.dataEdited&&(console.warn("DEPRECATION WARNING - dataEdited option has been deprecated, please use the dataChanged option instead"),this.options.dataChanged=this.options.dataEdited),this.options.downloadDataFormatter&&console.warn("DEPRECATION WARNING - downloadDataFormatter option has been deprecated"),void 0!==this.options.clipboardCopyHeader&&(this.options.columnHeaders=this.options.clipboardCopyHeader,console.warn("DEPRECATION WARNING - clipboardCopyHeader option has been deprecated, please use the columnHeaders property on the clipboardCopyConfig option")),!0!==this.options.printVisibleRows&&(console.warn("printVisibleRows option is deprecated, you should now use the printRowRange option"),this.options.persistence.printRowRange="active"),!0!==this.options.printCopyStyle&&(console.warn("printCopyStyle option is deprecated, you should now use the printStyled option"),this.options.persistence.printStyled=this.options.printCopyStyle),this.options.persistentLayout&&(console.warn("persistentLayout option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.columns&&(this.options.persistence.columns=!0)),this.options.persistentSort&&(console.warn("persistentSort option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.sort&&(this.options.persistence.sort=!0)),this.options.persistentFilter&&(console.warn("persistentFilter option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.filter&&(this.options.persistence.filter=!0)),this.options.columnVertAlign&&(console.warn("columnVertAlign option is deprecated, you should now use the columnHeaderVertAlign option"),this.options.columnHeaderVertAlign=this.options.columnVertAlign)},Tabulator.prototype._clearSelection=function(){this.element.classList.add("tabulator-block-select"),window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),this.element.classList.remove("tabulator-block-select")},Tabulator.prototype._create=function(){this._clearObjectPointers(),this._mapDepricatedFunctionality(),this.bindModules(),this.rtlCheck(),"TABLE"===this.element.tagName&&this.modExists("htmlTableImport",!0)&&this.modules.htmlTableImport.parseTable(),this.columnManager=new ColumnManager(this),this.rowManager=new RowManager(this),this.footerManager=new FooterManager(this),this.columnManager.setRowManager(this.rowManager),this.rowManager.setColumnManager(this.columnManager),this.options.virtualDomHoz&&(this.vdomHoz=new VDomHoz(this)),this._buildElement(),this._loadInitialData()},Tabulator.prototype._clearObjectPointers=function(){this.options.columns=this.options.columns.slice(0),this.options.reactiveData||(this.options.data=this.options.data.slice(0))},Tabulator.prototype._buildElement=function(){var t=this,e=this.element,o=this.modules,i=this.options;for(i.tableBuilding.call(this),e.classList.add("tabulator"),e.setAttribute("role","grid");e.firstChild;)e.removeChild(e.firstChild);for(var n in i.height&&(i.height=isNaN(i.height)?i.height:i.height+"px",e.style.height=i.height),!1!==i.minHeight&&(i.minHeight=isNaN(i.minHeight)?i.minHeight:i.minHeight+"px",e.style.minHeight=i.minHeight),!1!==i.maxHeight&&(i.maxHeight=isNaN(i.maxHeight)?i.maxHeight:i.maxHeight+"px",e.style.maxHeight=i.maxHeight),this.columnManager.initialize(),this.rowManager.initialize(),this._detectBrowser(),this.modExists("layout",!0)&&o.layout.initialize(i.layout),o.localize.initialize(),!1!==i.headerFilterPlaceholder&&o.localize.setHeaderFilterPlaceholder(i.headerFilterPlaceholder),i.langs)o.localize.installLang(n,i.langs[n]);if(o.localize.setLocale(i.locale),"string"==typeof i.placeholder){var s=document.createElement("div");s.classList.add("tabulator-placeholder");var a=document.createElement("span");a.innerHTML=i.placeholder,s.appendChild(a),i.placeholder=s}if(e.appendChild(this.columnManager.getElement()),e.appendChild(this.rowManager.getElement()),i.footerElement&&this.footerManager.activate(),i.persistence&&this.modExists("persistence",!0)&&o.persistence.initialize(),i.movableRows&&this.modExists("moveRow")&&o.moveRow.initialize(),i.autoColumns&&this.options.data&&this.columnManager.generateColumnsFromRowData(this.options.data),this.modExists("columnCalcs")&&o.columnCalcs.initialize(),this.columnManager.setColumns(i.columns),i.dataTree&&this.modExists("dataTree",!0)&&o.dataTree.initialize(),this.modExists("frozenRows")&&this.modules.frozenRows.initialize(),(i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.sort||i.initialSort)&&this.modExists("sort",!0)){var r=[];i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.sort?!1===(r=o.persistence.load("sort"))&&i.initialSort&&(r=i.initialSort):i.initialSort&&(r=i.initialSort),o.sort.setSort(r)}if((i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.filter||i.initialFilter)&&this.modExists("filter",!0)){var l=[];i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.filter?!1===(l=o.persistence.load("filter"))&&i.initialFilter&&(l=i.initialFilter):i.initialFilter&&(l=i.initialFilter),o.filter.setFilter(l)}i.initialHeaderFilter&&this.modExists("filter",!0)&&i.initialHeaderFilter.forEach((function(e){var i=t.columnManager.findColumn(e.field);if(!i)return console.warn("Column Filter Error - No matching column found:",e.field),!1;o.filter.setHeaderFilterValue(i,e.value)})),this.modExists("ajax")&&o.ajax.initialize(),i.pagination&&this.modExists("page",!0)&&o.page.initialize(),i.groupBy&&this.modExists("groupRows",!0)&&o.groupRows.initialize(),this.modExists("keybindings")&&o.keybindings.initialize(),this.modExists("selectRow")&&o.selectRow.clearSelectionData(!0),i.autoResize&&this.modExists("resizeTable")&&o.resizeTable.initialize(),this.modExists("clipboard")&&o.clipboard.initialize(),i.printAsHtml&&this.modExists("print")&&o.print.initialize(),i.tableBuilt.call(this)},Tabulator.prototype._loadInitialData=function(){var t=this;if(t.options.pagination&&t.modExists("page"))if(t.modules.page.reset(!0,!0),"local"==t.options.pagination){if(t.options.data.length)t.rowManager.setData(t.options.data,!1,!0);else{if((t.options.ajaxURL||t.options.ajaxURLGenerator)&&t.modExists("ajax"))return void t.modules.ajax.loadData(!1,!0).then((function(){})).catch((function(){t.options.paginationInitialPage&&t.modules.page.setPage(t.options.paginationInitialPage)}));t.rowManager.setData(t.options.data,!1,!0)}t.options.paginationInitialPage&&t.modules.page.setPage(t.options.paginationInitialPage)}else t.options.ajaxURL?t.modules.page.setPage(t.options.paginationInitialPage).then((function(){})).catch((function(){})):t.rowManager.setData([],!1,!0);else t.options.data.length?t.rowManager.setData(t.options.data):(t.options.ajaxURL||t.options.ajaxURLGenerator)&&t.modExists("ajax")?t.modules.ajax.loadData(!1,!0).then((function(){})).catch((function(){})):t.rowManager.setData(t.options.data,!1,!0)},Tabulator.prototype.destroy=function(){var t=this.element;for(Tabulator.prototype.comms.deregister(this),this.options.reactiveData&&this.modExists("reactiveData",!0)&&this.modules.reactiveData.unwatchData(),this.rowManager.rows.forEach((function(t){t.wipe()})),this.rowManager.rows=[],this.rowManager.activeRows=[],this.rowManager.displayRows=[],this.options.autoResize&&this.modExists("resizeTable")&&this.modules.resizeTable.clearBindings(),this.modExists("keybindings")&&this.modules.keybindings.clearBindings();t.firstChild;)t.removeChild(t.firstChild);t.classList.remove("tabulator")},Tabulator.prototype._detectBrowser=function(){var t=navigator.userAgent||navigator.vendor||window.opera;t.indexOf("Trident")>-1?(this.browser="ie",this.browserSlow=!0):t.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):t.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.browserMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))},Tabulator.prototype.blockRedraw=function(){return this.rowManager.blockRedraw()},Tabulator.prototype.restoreRedraw=function(){return this.rowManager.restoreRedraw()},Tabulator.prototype.setDataFromLocalFile=function(t){var e=this;return new Promise((function(o,i){var n=document.createElement("input");n.type="file",n.accept=t||".json,application/json",n.addEventListener("change",(function(t){var s,a=n.files[0],r=new FileReader;r.readAsText(a),r.onload=function(t){try{s=JSON.parse(r.result)}catch(t){return console.warn("File Load Error - File contents is invalid JSON",t),void i(t)}e.setData(s).then((function(t){o(t)})).catch((function(t){o(t)}))},r.onerror=function(t){console.warn("File Load Error - Unable to read file"),i()}})),n.click()}))},Tabulator.prototype.setData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o,!1,!0)},Tabulator.prototype._setData=function(t,e,o,i,n){return"string"!=typeof t?t?this.rowManager.setData(t,i,n):this.modExists("ajax")&&(this.modules.ajax.getUrl||this.options.ajaxURLGenerator)?"remote"==this.options.pagination&&this.modExists("page",!0)?(this.modules.page.reset(!0,!0),this.modules.page.setPage(1)):this.modules.ajax.loadData(i,n):this.rowManager.setData([],i,n):0==t.indexOf("{")||0==t.indexOf("[")?this.rowManager.setData(JSON.parse(t),i,n):this.modExists("ajax",!0)?(e&&this.modules.ajax.setParams(e),o&&this.modules.ajax.setConfig(o),this.modules.ajax.setUrl(t),"remote"==this.options.pagination&&this.modExists("page",!0)?(this.modules.page.reset(!0,!0),this.modules.page.setPage(1)):this.modules.ajax.loadData(i,n)):void 0},Tabulator.prototype.clearData=function(){this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this.rowManager.clearData()},Tabulator.prototype.getData=function(t){return!0===t&&(console.warn("passing a boolean to the getData function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getData(t)},Tabulator.prototype.getDataCount=function(t){return!0===t&&(console.warn("passing a boolean to the getDataCount function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getDataCount(t)},Tabulator.prototype.searchRows=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("rows",t,e,o)},Tabulator.prototype.searchData=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("data",t,e,o)},Tabulator.prototype.getHtml=function(t,e,o){if(this.modExists("export",!0))return this.modules.export.getHtml(t,e,o)},Tabulator.prototype.print=function(t,e,o){if(this.modExists("print",!0))return this.modules.print.printFullscreen(t,e,o)},Tabulator.prototype.getAjaxUrl=function(){if(this.modExists("ajax",!0))return this.modules.ajax.getUrl()},Tabulator.prototype.replaceData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o,!0)},Tabulator.prototype.updateData=function(t){var e=this,o=this,i=0;return new Promise((function(n,s){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach((function(t){var e=o.rowManager.findRow(t[o.options.index]);e&&(i++,e.updateData(t).then((function(){--i||n()})))})):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))}))},Tabulator.prototype.addData=function(t,e,o){var i=this;return new Promise((function(n,s){i.modExists("ajax")&&i.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?i.rowManager.addRows(t,e,o).then((function(t){var e=[];t.forEach((function(t){e.push(t.getComponent())})),n(e)})):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))}))},Tabulator.prototype.updateOrAddData=function(t){var e=this,o=this,i=[],n=0;return new Promise((function(s,a){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach((function(t){var e=o.rowManager.findRow(t[o.options.index]);n++,e?e.updateData(t).then((function(){n--,i.push(e.getComponent()),n||s(i)})):o.rowManager.addRows(t).then((function(t){n--,i.push(t[0].getComponent()),n||s(i)}))})):(console.warn("Update Error - No data provided"),a("Update Error - No data provided"))}))},Tabulator.prototype.getRow=function(t){var e=this.rowManager.findRow(t);return e?e.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},Tabulator.prototype.getRowFromPosition=function(t,e){var o=this.rowManager.getRowFromPosition(t,e);return o?o.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},Tabulator.prototype.deleteRow=function(t){var e=this;return new Promise((function(o,i){var n=e,s=0,a=0,r=[];function l(){++s==t.length&&a&&(n.rowManager.reRenderInPosition(),o())}Array.isArray(t)||(t=[t]),t.forEach((function(t){var o=e.rowManager.findRow(t,!0);o?r.push(o):(console.warn("Delete Error - No matching row found:",t),i("Delete Error - No matching row found"),l())})),r.sort((function(t,o){return e.rowManager.rows.indexOf(t)>e.rowManager.rows.indexOf(o)?1:-1})),r.forEach((function(t){t.delete().then((function(){a++,l()})).catch((function(t){l(),i(t)}))}))}))},Tabulator.prototype.addRow=function(t,e,o){var i=this;return new Promise((function(n,s){"string"==typeof t&&(t=JSON.parse(t)),i.rowManager.addRows(t,e,o).then((function(t){i.modExists("columnCalcs")&&i.modules.columnCalcs.recalc(i.rowManager.activeRows),n(t[0].getComponent())}))}))},Tabulator.prototype.updateOrAddRow=function(t,e){var o=this;return new Promise((function(i,n){var s=o.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),s?s.updateData(e).then((function(){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(s.getComponent())})).catch((function(t){n(t)})):s=o.rowManager.addRows(e).then((function(t){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(t[0].getComponent())})).catch((function(t){n(t)}))}))},Tabulator.prototype.updateRow=function(t,e){var o=this;return new Promise((function(i,n){var s=o.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),s?s.updateData(e).then((function(){i(s.getComponent())})).catch((function(t){n(t)})):(console.warn("Update Error - No matching row found:",t),n("Update Error - No matching row found"))}))},Tabulator.prototype.scrollToRow=function(t,e,o){var i=this;return new Promise((function(n,s){var a=i.rowManager.findRow(t);a?i.rowManager.scrollToRow(a,e,o).then((function(){n()})).catch((function(t){s(t)})):(console.warn("Scroll Error - No matching row found:",t),s("Scroll Error - No matching row found"))}))},Tabulator.prototype.moveRow=function(t,e,o){var i=this.rowManager.findRow(t);i?i.moveToRow(e,o):console.warn("Move Error - No matching row found:",t)},Tabulator.prototype.getRows=function(t){return!0===t&&(console.warn("passing a boolean to the getRows function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getComponents(t)},Tabulator.prototype.getRowPosition=function(t,e){var o=this.rowManager.findRow(t);return o?this.rowManager.getRowPosition(o,e):(console.warn("Position Error - No matching row found:",t),!1)},Tabulator.prototype.copyToClipboard=function(t){this.modExists("clipboard",!0)&&this.modules.clipboard.copy(t)},Tabulator.prototype.setColumns=function(t){this.columnManager.setColumns(t)},Tabulator.prototype.getColumns=function(t){return this.columnManager.getComponents(t)},Tabulator.prototype.getColumn=function(t){var e=this.columnManager.findColumn(t);return e?e.getComponent():(console.warn("Find Error - No matching column found:",t),!1)},Tabulator.prototype.getColumnDefinitions=function(){return this.columnManager.getDefinitionTree()},Tabulator.prototype.getColumnLayout=function(){if(this.modExists("persistence",!0))return this.modules.persistence.parseColumns(this.columnManager.getColumns())},Tabulator.prototype.setColumnLayout=function(t){return!!this.modExists("persistence",!0)&&(this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns,t)),!0)},Tabulator.prototype.showColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Show Error - No matching column found:",t),!1;e.show(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},Tabulator.prototype.hideColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Hide Error - No matching column found:",t),!1;e.hide(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},Tabulator.prototype.toggleColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Visibility Toggle Error - No matching column found:",t),!1;e.visible?e.hide():e.show()},Tabulator.prototype.addColumn=function(t,e,o){var i=this;return new Promise((function(n,s){var a=i.columnManager.findColumn(o);i.columnManager.addColumn(t,e,a).then((function(t){n(t.getComponent())})).catch((function(t){s(t)}))}))},Tabulator.prototype.deleteColumn=function(t){var e=this;return new Promise((function(o,i){var n=e.columnManager.findColumn(t);n?n.delete().then((function(){o()})).catch((function(t){i(t)})):(console.warn("Column Delete Error - No matching column found:",t),i())}))},Tabulator.prototype.updateColumnDefinition=function(t,e){var o=this;return new Promise((function(i,n){var s=o.columnManager.findColumn(t);s?s.updateDefinition(e).then((function(t){i(t)})).catch((function(t){n(t)})):(console.warn("Column Update Error - No matching column found:",t),n())}))},Tabulator.prototype.moveColumn=function(t,e,o){var i=this.columnManager.findColumn(t),n=this.columnManager.findColumn(e);i?n?this.columnManager.moveColumn(i,n,o):console.warn("Move Error - No matching column found:",n):console.warn("Move Error - No matching column found:",t)},Tabulator.prototype.scrollToColumn=function(t,e,o){var i=this;return new Promise((function(n,s){var a=i.columnManager.findColumn(t);a?i.columnManager.scrollToColumn(a,e,o).then((function(){n()})).catch((function(t){s(t)})):(console.warn("Scroll Error - No matching column found:",t),s("Scroll Error - No matching column found"))}))},Tabulator.prototype.setLocale=function(t){this.modules.localize.setLocale(t)},Tabulator.prototype.getLocale=function(){return this.modules.localize.getLocale()},Tabulator.prototype.getLang=function(t){return this.modules.localize.getLang(t)},Tabulator.prototype.redraw=function(t){this.columnManager.redraw(t),this.rowManager.redraw(t)},Tabulator.prototype.setHeight=function(t){"classic"!==this.rowManager.renderMode?(this.options.height=isNaN(t)?t:t+"px",this.element.style.height=this.options.height,this.rowManager.setRenderMode(),this.rowManager.redraw()):console.warn("setHeight function is not available in classic render mode")},Tabulator.prototype.setSort=function(t,e){this.modExists("sort",!0)&&(this.modules.sort.setSort(t,e),this.rowManager.sorterRefresh())},Tabulator.prototype.getSorters=function(){if(this.modExists("sort",!0))return this.modules.sort.getSort()},Tabulator.prototype.clearSort=function(){this.modExists("sort",!0)&&(this.modules.sort.clear(),this.rowManager.sorterRefresh())},Tabulator.prototype.setFilter=function(t,e,o,i){this.modExists("filter",!0)&&(this.modules.filter.setFilter(t,e,o,i),this.rowManager.filterRefresh())},Tabulator.prototype.refreshFilter=function(){this.modExists("filter",!0)&&this.rowManager.filterRefresh()},Tabulator.prototype.addFilter=function(t,e,o,i){this.modExists("filter",!0)&&(this.modules.filter.addFilter(t,e,o,i),this.rowManager.filterRefresh())},Tabulator.prototype.getFilters=function(t){if(this.modExists("filter",!0))return this.modules.filter.getFilters(t)},Tabulator.prototype.setHeaderFilterFocus=function(t){if(this.modExists("filter",!0)){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Filter Focus Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterFocus(e)}},Tabulator.prototype.getHeaderFilterValue=function(t){if(this.modExists("filter",!0)){var e=this.columnManager.findColumn(t);if(e)return this.modules.filter.getHeaderFilterValue(e);console.warn("Column Filter Error - No matching column found:",t)}},Tabulator.prototype.setHeaderFilterValue=function(t,e){if(this.modExists("filter",!0)){var o=this.columnManager.findColumn(t);if(!o)return console.warn("Column Filter Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterValue(o,e)}},Tabulator.prototype.getHeaderFilters=function(){if(this.modExists("filter",!0))return this.modules.filter.getHeaderFilters()},Tabulator.prototype.removeFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.removeFilter(t,e,o),this.rowManager.filterRefresh())},Tabulator.prototype.clearFilter=function(t){this.modExists("filter",!0)&&(this.modules.filter.clearFilter(t),this.rowManager.filterRefresh())},Tabulator.prototype.clearHeaderFilter=function(){this.modExists("filter",!0)&&(this.modules.filter.clearHeaderFilter(),this.rowManager.filterRefresh())},Tabulator.prototype.selectRow=function(t){this.modExists("selectRow",!0)&&(!0===t&&(console.warn("passing a boolean to the selectRowselectRow function is deprecated, you should now pass the string 'active'"),t="active"),this.modules.selectRow.selectRows(t))},Tabulator.prototype.deselectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.deselectRows(t)},Tabulator.prototype.toggleSelectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.toggleRow(t)},Tabulator.prototype.getSelectedRows=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedRows()},Tabulator.prototype.getSelectedData=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedData()},Tabulator.prototype.getInvalidCells=function(){if(this.modExists("validate",!0))return this.modules.validate.getInvalidCells()},Tabulator.prototype.clearCellValidation=function(t){var e=this;this.modExists("validate",!0)&&(t||(t=this.modules.validate.getInvalidCells()),Array.isArray(t)||(t=[t]),t.forEach((function(t){e.modules.validate.clearValidation(t._getSelf())})))},Tabulator.prototype.validate=function(t){var e=[];return this.rowManager.rows.forEach((function(t){var o=t.validate();!0!==o&&(e=e.concat(o))})),!e.length||e},Tabulator.prototype.setMaxPage=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setMaxPage(t)},Tabulator.prototype.setPage=function(t){return this.options.pagination&&this.modExists("page")?this.modules.page.setPage(t):new Promise((function(t,e){e()}))},Tabulator.prototype.setPageToRow=function(t){var e=this;return new Promise((function(o,i){e.options.pagination&&e.modExists("page")&&(t=e.rowManager.findRow(t))?e.modules.page.setPageToRow(t).then((function(){o()})).catch((function(){i()})):i()}))},Tabulator.prototype.setPageSize=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setPageSize(t),this.modules.page.setPage(1).then((function(){})).catch((function(){}))},Tabulator.prototype.getPageSize=function(){if(this.options.pagination&&this.modExists("page",!0))return this.modules.page.getPageSize()},Tabulator.prototype.previousPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.previousPage()},Tabulator.prototype.nextPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.nextPage()},Tabulator.prototype.getPage=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPage()},Tabulator.prototype.getPageMax=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPageMax()},Tabulator.prototype.setGroupBy=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupBy=t,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")},Tabulator.prototype.setGroupValues=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupValues=t,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")},Tabulator.prototype.setGroupStartOpen=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupStartOpen=t,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},Tabulator.prototype.setGroupHeader=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupHeader=t,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},Tabulator.prototype.getGroups=function(t){return!!this.modExists("groupRows",!0)&&this.modules.groupRows.getGroups(!0)},Tabulator.prototype.getGroupedData=function(){if(this.modExists("groupRows",!0))return this.options.groupBy?this.modules.groupRows.getGroupedData():this.getData()},Tabulator.prototype.getEditedCells=function(){if(this.modExists("edit",!0))return this.modules.edit.getEditedCells()},Tabulator.prototype.clearCellEdited=function(t){var e=this;this.modExists("edit",!0)&&(t||(t=this.modules.edit.getEditedCells()),Array.isArray(t)||(t=[t]),t.forEach((function(t){e.modules.edit.clearEdited(t._getSelf())})))},Tabulator.prototype.getCalcResults=function(){return!!this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.getResults()},Tabulator.prototype.recalc=function(){this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.recalcAll(this.rowManager.activeRows)},Tabulator.prototype.navigatePrev=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&t.nav().prev()},Tabulator.prototype.navigateNext=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&t.nav().next()},Tabulator.prototype.navigateLeft=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().left())},Tabulator.prototype.navigateRight=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().right())},Tabulator.prototype.navigateUp=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().up())},Tabulator.prototype.navigateDown=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().down())},Tabulator.prototype.undo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.undo()},Tabulator.prototype.redo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.redo()},Tabulator.prototype.getHistoryUndoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryUndoSize()},Tabulator.prototype.getHistoryRedoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryRedoSize()},Tabulator.prototype.clearHistory=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.clear()},Tabulator.prototype.download=function(t,e,o,i){this.modExists("download",!0)&&this.modules.download.download(t,e,o,i)},Tabulator.prototype.downloadToTab=function(t,e,o,i){this.modExists("download",!0)&&this.modules.download.download(t,e,o,i,!0)},Tabulator.prototype.tableComms=function(t,e,o,i){this.modules.comms.receive(t,e,o,i)},Tabulator.prototype.moduleBindings={},Tabulator.prototype.extendModule=function(t,e,o){if(Tabulator.prototype.moduleBindings[t]){var i=Tabulator.prototype.moduleBindings[t].prototype[e];if(i)if("object"==(void 0===o?"undefined":_typeof(o)))for(var n in o)i[n]=o[n];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",e)}else console.warn("Module Error - module does not exist:",t)},Tabulator.prototype.registerModule=function(t,e){Tabulator.prototype.moduleBindings[t]=e},Tabulator.prototype.bindModules=function(){for(var t in this.modules={},Tabulator.prototype.moduleBindings)this.modules[t]=new Tabulator.prototype.moduleBindings[t](this)},Tabulator.prototype.modExists=function(t,e){return!!this.modules[t]||(e&&console.error("Tabulator Module Not Installed: "+t),!1)},Tabulator.prototype.helpers={elVisible:function(t){return!(t.offsetWidth<=0&&t.offsetHeight<=0)},elOffset:function(t){var e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset-document.documentElement.clientTop,left:e.left+window.pageXOffset-document.documentElement.clientLeft}},deepClone:function(t){var e=Object.assign(Array.isArray(t)?[]:{},t);for(var o in t)null!=t[o]&&"object"===_typeof(t[o])&&(t[o]instanceof Date?e[o]=new Date(t[o]):e[o]=this.deepClone(t[o]));return e}},Tabulator.prototype.comms={tables:[],register:function(t){Tabulator.prototype.comms.tables.push(t)},deregister:function(t){var e=Tabulator.prototype.comms.tables.indexOf(t);e>-1&&Tabulator.prototype.comms.tables.splice(e,1)},lookupTable:function(t,e){var o,i,n=[];if("string"==typeof t){if((o=document.querySelectorAll(t)).length)for(var s=0;s<o.length;s++)(i=Tabulator.prototype.comms.matchElement(o[s]))&&n.push(i)}else"undefined"!=typeof HTMLElement&&t instanceof HTMLElement||t instanceof Tabulator?(i=Tabulator.prototype.comms.matchElement(t))&&n.push(i):Array.isArray(t)?t.forEach((function(t){n=n.concat(Tabulator.prototype.comms.lookupTable(t))})):e||console.warn("Table Connection Error - Invalid Selector",t);return n},matchElement:function(t){return Tabulator.prototype.comms.tables.find((function(e){return t instanceof Tabulator?e===t:e.element===t}))}},Tabulator.prototype.findTable=function(t){var e=Tabulator.prototype.comms.lookupTable(t,!0);return!(Array.isArray(e)&&!e.length)&&e};var Layout=function(t){this.table=t,this.mode=null};Layout.prototype.initialize=function(t){this.modes[t]?this.mode=t:(console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : "+t),this.mode="fitData"),this.table.element.setAttribute("tabulator-layout",this.mode)},Layout.prototype.getMode=function(){return this.mode},Layout.prototype.layout=function(){this.modes[this.mode].call(this,this.table.columnManager.columnsByIndex),0===this.mode.indexOf("fitData")&&this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns")},Layout.prototype.modes={fitData:function(t){this.table.options.virtualDomHoz?this.table.vdomHoz.fitDataLayoutOverride():t.forEach((function(t){t.reinitializeWidth()})),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitDataFill:function(t){t.forEach((function(t){t.reinitializeWidth()})),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitDataTable:function(t){t.forEach((function(t){t.reinitializeWidth()})),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitDataStretch:function(t){var e=this,o=0,i=this.table.rowManager.element.clientWidth,n=0,s=!1;t.forEach((function(t,i){t.widthFixed||t.reinitializeWidth(),(e.table.options.responsiveLayout?t.modules.responsive.visible:t.visible)&&(s=t),t.visible&&(o+=t.getWidth())})),s?(n=i-o+s.getWidth(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&(s.setWidth(0),this.table.modules.responsiveLayout.update()),n>0?s.setWidth(n):s.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function(t){var e,o,i=this.table.element.clientWidth,n=0,s=0,a=0,r=[],l=[],u=0,c=0;function d(t){return"string"==typeof t?t.indexOf("%")>-1?i/100*parseInt(t):parseInt(t):t}function h(t,e,o,i){var n=[],s=0,r=0,l=0,u=a,c=0,p=0,m=[];function f(t){return o*(t.column.definition.widthGrow||1)}function g(t){return d(t.width)-o*(t.column.definition.widthShrink||0)}return t.forEach((function(t,s){var a=i?g(t):f(t);t.column.minWidth>=a?n.push(t):t.column.maxWidth&&t.column.maxWidth<a?(t.width=t.column.maxWidth,e-=t.column.maxWidth,(u-=i?t.column.definition.widthShrink||1:t.column.definition.widthGrow||1)&&(o=Math.floor(e/u))):(m.push(t),p+=i?t.column.definition.widthShrink||1:t.column.definition.widthGrow||1)})),n.length?(n.forEach((function(t){s+=i?t.width-t.column.minWidth:t.column.minWidth,t.width=t.column.minWidth})),c=(r=e-s)-(l=p?Math.floor(r/p):r)*p,c+=h(m,r,l,i)):(c=p?e-Math.floor(e/p)*p:e,m.forEach((function(t){t.width=i?g(t):f(t)}))),c}this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(i-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),t.forEach((function(t){var e,o,i;t.visible&&(e=t.definition.width,o=parseInt(t.minWidth),e?(i=d(e),n+=i>o?i:o,t.definition.widthShrink&&(l.push({column:t,width:i>o?i:o}),u+=t.definition.widthShrink)):(r.push({column:t,width:0}),a+=t.definition.widthGrow||1))})),s=i-n,e=Math.floor(s/a);c=h(r,s,e,!1);r.length&&c>0&&(r[r.length-1].width+=+c),r.forEach((function(t){s-=t.width})),(o=Math.abs(c)+s)>0&&u&&(c=h(l,o,Math.floor(o/u),!0)),l.length&&(l[l.length-1].width-=c),r.forEach((function(t){t.column.setWidth(t.width)})),l.forEach((function(t){t.column.setWidth(t.width)}))}},Tabulator.prototype.registerModule("layout",Layout);var Localize=function(t){this.table=t,this.locale="default",this.lang=!1,this.bindings={},this.langList={}};Localize.prototype.initialize=function(){this.langList=Tabulator.prototype.helpers.deepClone(this.langs)},Localize.prototype.setHeaderFilterPlaceholder=function(t){this.langList.default.headerFilters.default=t},Localize.prototype.setHeaderFilterColumnPlaceholder=function(t,e){this.langList.default.headerFilters.columns[t]=e,this.lang&&!this.lang.headerFilters.columns[t]&&(this.lang.headerFilters.columns[t]=e)},Localize.prototype.installLang=function(t,e){this.langList[t]?this._setLangProp(this.langList[t],e):this.langList[t]=e},Localize.prototype._setLangProp=function(t,e){for(var o in e)t[o]&&"object"==_typeof(t[o])?this._setLangProp(t[o],e[o]):t[o]=e[o]},Localize.prototype.setLocale=function(t){if(!0===(t=t||"default")&&navigator.language&&(t=navigator.language.toLowerCase()),t&&!this.langList[t]){var e=t.split("-")[0];this.langList[e]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",t,e),t=e):(console.warn("Localization Error - Matching locale not found, using default: ",t),t="default")}this.locale=t,this.lang=Tabulator.prototype.helpers.deepClone(this.langList.default||{}),"default"!=t&&function t(e,o){for(var i in e)"object"==_typeof(e[i])?(o[i]||(o[i]={}),t(e[i],o[i])):o[i]=e[i]}(this.langList[t],this.lang),this.table.options.localized.call(this.table,this.locale,this.lang),this._executeBindings()},Localize.prototype.getLocale=function(t){return self.locale},Localize.prototype.getLang=function(t){return t?this.langList[t]:this.lang},Localize.prototype.getText=function(t,e){var o=(t=e?t+"|"+e:t).split("|");return this._getLangElement(o,this.locale)||""},Localize.prototype._getLangElement=function(t,e){var o=this.lang;return t.forEach((function(t){var e;o&&(e=o[t],o=void 0!==e&&e)})),o},Localize.prototype.bind=function(t,e){this.bindings[t]||(this.bindings[t]=[]),this.bindings[t].push(e),e(this.getText(t),this.lang)},Localize.prototype._executeBindings=function(){var t=this,e=function(e){t.bindings[e].forEach((function(o){o(t.getText(e),t.lang)}))};for(var o in t.bindings)e(o)},Localize.prototype.langs={default:{groups:{item:"item",items:"items"},columns:{},ajax:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All"},headerFilters:{default:"filter column...",columns:{}}}},Tabulator.prototype.registerModule("localize",Localize);var Comms=function(t){this.table=t};Comms.prototype.getConnections=function(t){var e=this,o=[];return Tabulator.prototype.comms.lookupTable(t).forEach((function(t){e.table!==t&&o.push(t)})),o},Comms.prototype.send=function(t,e,o,i){var n=this,s=this.getConnections(t);s.forEach((function(t){t.tableComms(n.table.element,e,o,i)})),!s.length&&t&&console.warn("Table Connection Error - No tables matching selector found",t)},Comms.prototype.receive=function(t,e,o,i){if(this.table.modExists(e))return this.table.modules[e].commsReceived(t,o,i);console.warn("Inter-table Comms Error - no such module:",e)},Tabulator.prototype.registerModule("comms",Comms);var Accessor=function(t){this.table=t,this.allowedTypes=["","data","download","clipboard","print","htmlOutput"]};Accessor.prototype.initializeColumn=function(t){var e=this,o=!1,i={};this.allowedTypes.forEach((function(n){var s,a="accessor"+(n.charAt(0).toUpperCase()+n.slice(1));t.definition[a]&&(s=e.lookupAccessor(t.definition[a]))&&(o=!0,i[a]={accessor:s,params:t.definition[a+"Params"]||{}})})),o&&(t.modules.accessor=i)},Accessor.prototype.lookupAccessor=function(t){var e=!1;switch(void 0===t?"undefined":_typeof(t)){case"string":this.accessors[t]?e=this.accessors[t]:console.warn("Accessor Error - No such accessor found, ignoring: ",t);break;case"function":e=t}return e},Accessor.prototype.transformRow=function(t,e){var o="accessor"+(e.charAt(0).toUpperCase()+e.slice(1)),i=t.getComponent(),n=Tabulator.prototype.helpers.deepClone(t.data||{});return this.table.columnManager.traverse((function(t){var s,a,r,l;t.modules.accessor&&(a=t.modules.accessor[o]||t.modules.accessor.accessor||!1)&&"undefined"!=(s=t.getFieldValue(n))&&(l=t.getComponent(),r="function"==typeof a.params?a.params(s,n,e,l,i):a.params,t.setFieldValue(n,a.accessor(s,n,e,r,l,i)))})),n},Accessor.prototype.accessors={},Tabulator.prototype.registerModule("accessor",Accessor);var Ajax=function(t){this.table=t,this.config=!1,this.url="",this.urlGenerator=!1,this.params=!1,this.loaderElement=this.createLoaderElement(),this.msgElement=this.createMsgElement(),this.loadingElement=!1,this.errorElement=!1,this.loaderPromise=!1,this.progressiveLoad=!1,this.loading=!1,this.requestOrder=0};Ajax.prototype.initialize=function(){var t;this.loaderElement.appendChild(this.msgElement),this.table.options.ajaxLoaderLoading&&("string"==typeof this.table.options.ajaxLoaderLoading?((t=document.createElement("template")).innerHTML=this.table.options.ajaxLoaderLoading.trim(),this.loadingElement=t.content.firstChild):this.loadingElement=this.table.options.ajaxLoaderLoading),this.loaderPromise=this.table.options.ajaxRequestFunc||this.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||this.defaultURLGenerator,this.table.options.ajaxLoaderError&&("string"==typeof this.table.options.ajaxLoaderError?((t=document.createElement("template")).innerHTML=this.table.options.ajaxLoaderError.trim(),this.errorElement=t.content.firstChild):this.errorElement=this.table.options.ajaxLoaderError),this.table.options.ajaxParams&&this.setParams(this.table.options.ajaxParams),this.table.options.ajaxConfig&&this.setConfig(this.table.options.ajaxConfig),this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.table.options.ajaxProgressiveLoad&&(this.table.options.pagination?(this.progressiveLoad=!1,console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time")):this.table.modExists("page")?(this.progressiveLoad=this.table.options.ajaxProgressiveLoad,this.table.modules.page.initializeProgressive(this.progressiveLoad)):console.error("Pagination plugin is required for progressive ajax loading"))},Ajax.prototype.createLoaderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-loader"),t},Ajax.prototype.createMsgElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-loader-msg"),t.setAttribute("role","alert"),t},Ajax.prototype.setParams=function(t,e){if(e)for(var o in this.params=this.params||{},t)this.params[o]=t[o];else this.params=t},Ajax.prototype.getParams=function(){return this.params||{}},Ajax.prototype.setConfig=function(t){if(this._loadDefaultConfig(),"string"==typeof t)this.config.method=t;else for(var e in t)this.config[e]=t[e]},Ajax.prototype._loadDefaultConfig=function(t){if(!this.config||t)for(var e in this.config={},this.defaultConfig)this.config[e]=this.defaultConfig[e]},Ajax.prototype.setUrl=function(t){this.url=t},Ajax.prototype.getUrl=function(){return this.url},Ajax.prototype.loadData=function(t,e){return this.progressiveLoad?this._loadDataProgressive():this._loadDataStandard(t,e)},Ajax.prototype.nextPage=function(t){this.loading||t<(this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.getElement().clientHeight)&&this.table.modules.page.nextPage().then((function(){})).catch((function(){}))},Ajax.prototype.blockActiveRequest=function(){this.requestOrder++},Ajax.prototype._loadDataProgressive=function(){return this.table.rowManager.setData([]),this.table.modules.page.setPage(1)},Ajax.prototype._loadDataStandard=function(t,e){var o=this;return new Promise((function(i,n){o.sendRequest(t).then((function(s){o.table.rowManager.setData(s,t,e).then((function(){i()})).catch((function(t){n(t)}))})).catch((function(t){n(t)}))}))},Ajax.prototype.generateParamsList=function(t,e){var o=this,i=[];if(e=e||"",Array.isArray(t))t.forEach((function(t,n){i=i.concat(o.generateParamsList(t,e?e+"["+n+"]":n))}));else if("object"===(void 0===t?"undefined":_typeof(t)))for(var n in t)i=i.concat(o.generateParamsList(t[n],e?e+"["+n+"]":n));else i.push({key:e,value:t});return i},Ajax.prototype.serializeParams=function(t){var e=this.generateParamsList(t),o=[];return e.forEach((function(t){o.push(encodeURIComponent(t.key)+"="+encodeURIComponent(t.value))})),o.join("&")},Ajax.prototype.sendRequest=function(t){var e,o=this,i=this,n=i.url;return i.requestOrder++,e=i.requestOrder,i._loadDefaultConfig(),new Promise((function(s,a){!1!==i.table.options.ajaxRequesting.call(o.table,i.url,i.params)?(i.loading=!0,t||i.showLoader(),o.loaderPromise(n,i.config,i.params).then((function(t){e===i.requestOrder?(i.table.options.ajaxResponse&&(t=i.table.options.ajaxResponse.call(i.table,i.url,i.params,t)),s(t),i.hideLoader(),i.loading=!1):console.warn("Ajax Response Blocked - An active ajax request was blocked by an attempt to change table data while the request was being made")})).catch((function(t){console.error("Ajax Load Error: ",t),i.table.options.ajaxError.call(i.table,t),i.showError(),setTimeout((function(){i.hideLoader()}),3e3),i.loading=!1,a(t)}))):a()}))},Ajax.prototype.showLoader=function(){if("function"==typeof this.table.options.ajaxLoader?this.table.options.ajaxLoader():this.table.options.ajaxLoader){for(this.hideLoader();this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.remove("tabulator-error"),this.msgElement.classList.add("tabulator-loading"),this.loadingElement?this.msgElement.appendChild(this.loadingElement):this.msgElement.innerHTML=this.table.modules.localize.getText("ajax|loading"),this.table.element.appendChild(this.loaderElement)}},Ajax.prototype.showError=function(){for(this.hideLoader();this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.remove("tabulator-loading"),this.msgElement.classList.add("tabulator-error"),this.errorElement?this.msgElement.appendChild(this.errorElement):this.msgElement.innerHTML=this.table.modules.localize.getText("ajax|error"),this.table.element.appendChild(this.loaderElement)},Ajax.prototype.hideLoader=function(){this.loaderElement.parentNode&&this.loaderElement.parentNode.removeChild(this.loaderElement)},Ajax.prototype.defaultConfig={method:"GET"},Ajax.prototype.defaultURLGenerator=function(t,e,o){return t&&o&&Object.keys(o).length&&(e.method&&"get"!=e.method.toLowerCase()||(e.method="get",t+=(t.includes("?")?"&":"?")+this.modules.ajax.serializeParams(o))),t},Ajax.prototype.defaultLoaderPromise=function(t,e,o){var i,n=this;return new Promise((function(s,a){if(t=n.urlGenerator.call(n.table,t,e,o),"GET"!=e.method.toUpperCase())if(i="object"===_typeof(n.table.options.ajaxContentType)?n.table.options.ajaxContentType:n.contentTypeFormatters[n.table.options.ajaxContentType]){for(var r in i.headers)e.headers||(e.headers={}),void 0===e.headers[r]&&(e.headers[r]=i.headers[r]);e.body=i.body.call(n,t,e,o)}else console.warn("Ajax Error - Invalid ajaxContentType value:",n.table.options.ajaxContentType);t?(void 0===e.headers&&(e.headers={}),void 0===e.headers.Accept&&(e.headers.Accept="application/json"),void 0===e.headers["X-Requested-With"]&&(e.headers["X-Requested-With"]="XMLHttpRequest"),void 0===e.mode&&(e.mode="cors"),"cors"==e.mode?(void 0===e.headers["Access-Control-Allow-Origin"]&&(e.headers["Access-Control-Allow-Origin"]=window.location.origin),void 0===e.credentials&&(e.credentials="same-origin")):void 0===e.credentials&&(e.credentials="include"),fetch(t,e).then((function(t){t.ok?t.json().then((function(t){s(t)})).catch((function(t){a(t),console.warn("Ajax Load Error - Invalid JSON returned",t)})):(console.error("Ajax Load Error - Connection Error: "+t.status,t.statusText),a(t))})).catch((function(t){console.error("Ajax Load Error - Connection Error: ",t),a(t)}))):(console.warn("Ajax Load Error - No URL Set"),s([]))}))},Ajax.prototype.contentTypeFormatters={json:{headers:{"Content-Type":"application/json"},body:function(t,e,o){return JSON.stringify(o)}},form:{headers:{},body:function(t,e,o){var i=this.generateParamsList(o),n=new FormData;return i.forEach((function(t){n.append(t.key,t.value)})),n}}},Tabulator.prototype.registerModule("ajax",Ajax);var CalcComponent=function(t){this._row=t};CalcComponent.prototype.getData=function(t){return this._row.getData(t)},CalcComponent.prototype.getElement=function(){return this._row.getElement()},CalcComponent.prototype.getTable=function(){return this._row.table},CalcComponent.prototype.getCells=function(){var t=[];return this._row.getCells().forEach((function(e){t.push(e.getComponent())})),t},CalcComponent.prototype.getCell=function(t){var e=this._row.getCell(t);return!!e&&e.getComponent()},CalcComponent.prototype._getSelf=function(){return this._row};var ColumnCalcs=function(t){this.table=t,this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=this.createElement(),this.botElement=this.createElement(),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.initialize()};ColumnCalcs.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-calcs-holder"),t},ColumnCalcs.prototype.initialize=function(){this.genColumn=new Column({field:"value"},this)},ColumnCalcs.prototype.registerColumnField=function(){},ColumnCalcs.prototype.initializeColumn=function(t){var e=t.definition,o={topCalcParams:e.topCalcParams||{},botCalcParams:e.bottomCalcParams||{}};if(e.topCalc){switch(_typeof(e.topCalc)){case"string":this.calculations[e.topCalc]?o.topCalc=this.calculations[e.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",e.topCalc);break;case"function":o.topCalc=e.topCalc}o.topCalc&&(t.modules.columnCalcs=o,this.topCalcs.push(t),"group"!=this.table.options.columnCalcs&&this.initializeTopRow())}if(e.bottomCalc){switch(_typeof(e.bottomCalc)){case"string":this.calculations[e.bottomCalc]?o.botCalc=this.calculations[e.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",e.bottomCalc);break;case"function":o.botCalc=e.bottomCalc}o.botCalc&&(t.modules.columnCalcs=o,this.botCalcs.push(t),"group"!=this.table.options.columnCalcs&&this.initializeBottomRow())}},ColumnCalcs.prototype.removeCalcs=function(){var t=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.parentNode.removeChild(this.topElement),t=!0),this.botInitialized&&(this.botInitialized=!1,this.table.footerManager.remove(this.botElement),t=!0),t&&this.table.rowManager.adjustTableSize()},ColumnCalcs.prototype.initializeTopRow=function(){this.topInitialized||(this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling),this.topInitialized=!0)},ColumnCalcs.prototype.initializeBottomRow=function(){this.botInitialized||(this.table.footerManager.prepend(this.botElement),this.botInitialized=!0)},ColumnCalcs.prototype.scrollHorizontal=function(t){this.botInitialized&&this.botRow&&(this.botRow.getElement().style.marginLeft=-t+"px")},ColumnCalcs.prototype.recalc=function(t){var e;if(this.topInitialized||this.botInitialized){if(this.rowsToData(t),this.topInitialized){for(this.topRow&&this.topRow.deleteCells(),e=this.generateRow("top",this.rowsToData(t)),this.topRow=e;this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild);this.topElement.appendChild(e.getElement()),e.initialize(!0)}if(this.botInitialized){for(this.botRow&&this.botRow.deleteCells(),e=this.generateRow("bottom",this.rowsToData(t)),this.botRow=e;this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild);this.botElement.appendChild(e.getElement()),e.initialize(!0)}this.table.rowManager.adjustTableSize(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()}},ColumnCalcs.prototype.recalcRowGroup=function(t){this.recalcGroup(this.table.modules.groupRows.getRowGroup(t))},ColumnCalcs.prototype.recalcAll=function(){var t=this;(this.topCalcs.length||this.botCalcs.length)&&("group"!==this.table.options.columnCalcs&&this.recalc(this.table.rowManager.activeRows),this.table.options.groupBy&&"table"!==this.table.options.columnCalcs&&table.modules.groupRows.getChildGroups().forEach((function(e){t.recalcGroup(e)})))},ColumnCalcs.prototype.recalcGroup=function(t){var e,o;t&&t.calcs&&(t.calcs.bottom&&(e=this.rowsToData(t.rows),o=this.generateRowData("bottom",e),t.calcs.bottom.updateData(o),t.calcs.bottom.reinitialize()),t.calcs.top&&(e=this.rowsToData(t.rows),o=this.generateRowData("top",e),t.calcs.top.updateData(o),t.calcs.top.reinitialize()))},ColumnCalcs.prototype.generateTopRow=function(t){return this.generateRow("top",this.rowsToData(t))},ColumnCalcs.prototype.generateBottomRow=function(t){return this.generateRow("bottom",this.rowsToData(t))},ColumnCalcs.prototype.rowsToData=function(t){var e=this,o=[];return t.forEach((function(t){if(o.push(t.getData()),e.table.options.dataTree&&e.table.options.dataTreeChildColumnCalcs&&t.modules.dataTree.open){var i=e.rowsToData(e.table.modules.dataTree.getFilteredTreeChildren(t));o=o.concat(i)}})),o},ColumnCalcs.prototype.generateRow=function(t,e){var o,i=this,n=this.generateRowData(t,e);return i.table.modExists("mutator")&&i.table.modules.mutator.disable(),o=new Row(n,this,"calc"),i.table.modExists("mutator")&&i.table.modules.mutator.enable(),o.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+t),o.component=!1,o.getComponent=function(){return this.component||(this.component=new CalcComponent(this)),this.component},o.generateCells=function(){var e=[];i.table.columnManager.columnsByIndex.forEach((function(n){i.genColumn.setField(n.getField()),i.genColumn.hozAlign=n.hozAlign,n.definition[t+"CalcFormatter"]&&i.table.modExists("format")?i.genColumn.modules.format={formatter:i.table.modules.format.getFormatter(n.definition[t+"CalcFormatter"]),params:n.definition[t+"CalcFormatterParams"]||{}}:i.genColumn.modules.format={formatter:i.table.modules.format.getFormatter("plaintext"),params:{}},i.genColumn.definition.cssClass=n.definition.cssClass;var s=new Cell(i.genColumn,o);s.getElement(),s.column=n,s.setWidth(),n.cells.push(s),e.push(s),n.visible||s.hide()})),this.cells=e},o},ColumnCalcs.prototype.generateRowData=function(t,e){var o,i,n={},s="top"==t?this.topCalcs:this.botCalcs,a="top"==t?"topCalc":"botCalc";return s.forEach((function(t){var s=[];t.modules.columnCalcs&&t.modules.columnCalcs[a]&&(e.forEach((function(e){s.push(t.getFieldValue(e))})),i=a+"Params",o="function"==typeof t.modules.columnCalcs[i]?t.modules.columnCalcs[i](s,e):t.modules.columnCalcs[i],t.setFieldValue(n,t.modules.columnCalcs[a](s,e,o)))})),n},ColumnCalcs.prototype.hasTopCalcs=function(){return!!this.topCalcs.length},ColumnCalcs.prototype.hasBottomCalcs=function(){return!!this.botCalcs.length},ColumnCalcs.prototype.redraw=function(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)},ColumnCalcs.prototype.getResults=function(){var t=this,e={};return this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.getGroups(!0).forEach((function(o){e[o.getKey()]=t.getGroupResults(o)})):e={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},e},ColumnCalcs.prototype.getGroupResults=function(t){var e=this,o=t._getSelf(),i=t.getSubGroups(),n={};return i.forEach((function(t){n[t.getKey()]=e.getGroupResults(t)})),{top:o.calcs.top?o.calcs.top.getData():{},bottom:o.calcs.bottom?o.calcs.bottom.getData():{},groups:n}},ColumnCalcs.prototype.calculations={avg:function(t,e,o){var i=0,n=void 0!==o.precision?o.precision:2;return t.length&&(i=t.reduce((function(t,e){return Number(t)+Number(e)})),i/=t.length,i=!1!==n?i.toFixed(n):i),parseFloat(i).toString()},max:function(t,e,o){var i=null,n=void 0!==o.precision&&o.precision;return t.forEach((function(t){((t=Number(t))>i||null===i)&&(i=t)})),null!==i?!1!==n?i.toFixed(n):i:""},min:function(t,e,o){var i=null,n=void 0!==o.precision&&o.precision;return t.forEach((function(t){((t=Number(t))<i||null===i)&&(i=t)})),null!==i?!1!==n?i.toFixed(n):i:""},sum:function(t,e,o){var i=0,n=void 0!==o.precision&&o.precision;return t.length&&t.forEach((function(t){t=Number(t),i+=isNaN(t)?0:Number(t)})),!1!==n?i.toFixed(n):i},concat:function(t,e,o){var i=0;return t.length&&(i=t.reduce((function(t,e){return String(t)+String(e)}))),i},count:function(t,e,o){var i=0;return t.length&&t.forEach((function(t){t&&i++})),i}},Tabulator.prototype.registerModule("columnCalcs",ColumnCalcs);var Clipboard=function(t){this.table=t,this.mode=!0,this.pasteParser=function(){},this.pasteAction=function(){},this.customSelection=!1,this.rowRange=!1,this.blocked=!0};Clipboard.prototype.initialize=function(){var t=this;this.mode=this.table.options.clipboard,this.rowRange=this.table.options.clipboardCopyRowRange,!0!==this.mode&&"copy"!==this.mode||this.table.element.addEventListener("copy",(function(e){var o,i;if(!t.blocked){if(e.preventDefault(),t.customSelection)o=t.customSelection,t.table.options.clipboardCopyFormatter&&(o=t.table.options.clipboardCopyFormatter("plain",o));else{var n=t.table.modules.export.generateExportList(t.table.options.clipboardCopyConfig,t.table.options.clipboardCopyStyled,t.rowRange,"clipboard");o=(i=t.table.modules.export.genereateHTMLTable(n))?t.generatePlainContent(n):"",t.table.options.clipboardCopyFormatter&&(o=t.table.options.clipboardCopyFormatter("plain",o),i=t.table.options.clipboardCopyFormatter("html",i))}window.clipboardData&&window.clipboardData.setData?window.clipboardData.setData("Text",o):e.clipboardData&&e.clipboardData.setData?(e.clipboardData.setData("text/plain",o),i&&e.clipboardData.setData("text/html",i)):e.originalEvent&&e.originalEvent.clipboardData.setData&&(e.originalEvent.clipboardData.setData("text/plain",o),i&&e.originalEvent.clipboardData.setData("text/html",i)),t.table.options.clipboardCopied.call(t.table,o,i),t.reset()}})),!0!==this.mode&&"paste"!==this.mode||this.table.element.addEventListener("paste",(function(e){t.paste(e)})),this.setPasteParser(this.table.options.clipboardPasteParser),this.setPasteAction(this.table.options.clipboardPasteAction)},Clipboard.prototype.reset=function(){this.blocked=!0,this.customSelection=!1},Clipboard.prototype.generatePlainContent=function(t){var e=[];return t.forEach((function(t){var o=[];t.columns.forEach((function(e){var i="";if(e)if("group"===t.type&&(e.value=e.component.getKey()),null===e.value)i="";else switch(_typeof(e.value)){case"object":i=JSON.stringify(e.value);break;case"undefined":i="";break;default:i=e.value}o.push(i)})),e.push(o.join("\t"))})),e.join("\n")},Clipboard.prototype.copy=function(t,e){var o,i;this.blocked=!1,this.customSelection=!1,!0!==this.mode&&"copy"!==this.mode||(this.rowRange=t||this.table.options.clipboardCopyRowRange,void 0!==window.getSelection&&void 0!==document.createRange?((t=document.createRange()).selectNodeContents(this.table.element),(o=window.getSelection()).toString()&&e&&(this.customSelection=o.toString()),o.removeAllRanges(),o.addRange(t)):void 0!==document.selection&&void 0!==document.body.createTextRange&&((i=document.body.createTextRange()).moveToElementText(this.table.element),i.select()),document.execCommand("copy"),o&&o.removeAllRanges())},Clipboard.prototype.setPasteAction=function(t){switch(void 0===t?"undefined":_typeof(t)){case"string":this.pasteAction=this.pasteActions[t],this.pasteAction||console.warn("Clipboard Error - No such paste action found:",t);break;case"function":this.pasteAction=t}},Clipboard.prototype.setPasteParser=function(t){switch(void 0===t?"undefined":_typeof(t)){case"string":this.pasteParser=this.pasteParsers[t],this.pasteParser||console.warn("Clipboard Error - No such paste parser found:",t);break;case"function":this.pasteParser=t}},Clipboard.prototype.paste=function(t){var e,o,i;this.checkPaseOrigin(t)&&(e=this.getPasteData(t),(o=this.pasteParser.call(this,e))?(t.preventDefault(),this.table.modExists("mutator")&&(o=this.mutateData(o)),i=this.pasteAction.call(this,o),this.table.options.clipboardPasted.call(this.table,e,o,i)):this.table.options.clipboardPasteError.call(this.table,e))},Clipboard.prototype.mutateData=function(t){var e=this,o=[];return Array.isArray(t)?t.forEach((function(t){o.push(e.table.modules.mutator.transformRow(t,"clipboard"))})):o=t,o},Clipboard.prototype.checkPaseOrigin=function(t){var e=!0;return("DIV"!=t.target.tagName||this.table.modules.edit.currentCell)&&(e=!1),e},Clipboard.prototype.getPasteData=function(t){var e;return window.clipboardData&&window.clipboardData.getData?e=window.clipboardData.getData("Text"):t.clipboardData&&t.clipboardData.getData?e=t.clipboardData.getData("text/plain"):t.originalEvent&&t.originalEvent.clipboardData.getData&&(e=t.originalEvent.clipboardData.getData("text/plain")),e},Clipboard.prototype.pasteParsers={table:function(t){var e=[],o=!0,i=this.table.columnManager.columns,n=[],s=[];return(t=t.split("\n")).forEach((function(t){e.push(t.split("\t"))})),!(!e.length||1===e.length&&e[0].length<2)&&(!0,e[0].forEach((function(t){var e=i.find((function(e){return t&&e.definition.title&&t.trim()&&e.definition.title.trim()===t.trim()}));e?n.push(e):o=!1})),o||(o=!0,n=[],e[0].forEach((function(t){var e=i.find((function(e){return t&&e.field&&t.trim()&&e.field.trim()===t.trim()}));e?n.push(e):o=!1})),o||(n=this.table.columnManager.columnsByIndex)),o&&e.shift(),e.forEach((function(t){var e={};t.forEach((function(t,o){n[o]&&(e[n[o].field]=t)})),s.push(e)})),s)}},Clipboard.prototype.pasteActions={replace:function(t){return this.table.setData(t)},update:function(t){return this.table.updateOrAddData(t)},insert:function(t){return this.table.addData(t)}},Tabulator.prototype.registerModule("clipboard",Clipboard);var DataTree=function(t){this.table=t,this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.elementField=!1,this.startOpen=function(){},this.displayIndex=0};DataTree.prototype.initialize=function(){var t=null,e=this.table.columnManager.getFirstVisibileColumn(),o=this.table.options;switch(this.field=o.dataTreeChildField,this.indent=o.dataTreeChildIndent,this.elementField=o.dataTreeElementColumn||!!e&&e.field,o.dataTreeBranchElement&&(!0===o.dataTreeBranchElement?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):"string"==typeof o.dataTreeBranchElement?((t=document.createElement("div")).innerHTML=o.dataTreeBranchElement,this.branchEl=t.firstChild):this.branchEl=o.dataTreeBranchElement),o.dataTreeCollapseElement?"string"==typeof o.dataTreeCollapseElement?((t=document.createElement("div")).innerHTML=o.dataTreeCollapseElement,this.collapseEl=t.firstChild):this.collapseEl=o.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.tabIndex=0,this.collapseEl.innerHTML="<div class='tabulator-data-tree-control-collapse'></div>"),o.dataTreeExpandElement?"string"==typeof o.dataTreeExpandElement?((t=document.createElement("div")).innerHTML=o.dataTreeExpandElement,this.expandEl=t.firstChild):this.expandEl=o.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="<div class='tabulator-data-tree-control-expand'></div>"),_typeof(o.dataTreeStartExpanded)){case"boolean":this.startOpen=function(t,e){return o.dataTreeStartExpanded};break;case"function":this.startOpen=o.dataTreeStartExpanded;break;default:this.startOpen=function(t,e){return o.dataTreeStartExpanded[e]}}},DataTree.prototype.initializeRow=function(t){var e=t.getData()[this.field],o=Array.isArray(e),i=o||!o&&"object"===(void 0===e?"undefined":_typeof(e))&&null!==e;!i&&t.modules.dataTree&&t.modules.dataTree.branchEl&&t.modules.dataTree.branchEl.parentNode.removeChild(t.modules.dataTree.branchEl),!i&&t.modules.dataTree&&t.modules.dataTree.controlEl&&t.modules.dataTree.controlEl.parentNode.removeChild(t.modules.dataTree.controlEl),t.modules.dataTree={index:t.modules.dataTree?t.modules.dataTree.index:0,open:!!i&&(t.modules.dataTree?t.modules.dataTree.open:this.startOpen(t.getComponent(),0)),controlEl:!(!t.modules.dataTree||!i)&&t.modules.dataTree.controlEl,branchEl:!(!t.modules.dataTree||!i)&&t.modules.dataTree.branchEl,parent:!!t.modules.dataTree&&t.modules.dataTree.parent,children:i}},DataTree.prototype.layoutRow=function(t){var e=(this.elementField?t.getCell(this.elementField):t.getCells()[0]).getElement(),o=t.modules.dataTree;o.branchEl&&(o.branchEl.parentNode&&o.branchEl.parentNode.removeChild(o.branchEl),o.branchEl=!1),o.controlEl&&(o.controlEl.parentNode&&o.controlEl.parentNode.removeChild(o.controlEl),o.controlEl=!1),this.generateControlElement(t,e),t.getElement().classList.add("tabulator-tree-level-"+o.index),o.index&&(this.branchEl?(o.branchEl=this.branchEl.cloneNode(!0),e.insertBefore(o.branchEl,e.firstChild),this.table.rtl?o.branchEl.style.marginRight=(o.branchEl.offsetWidth+o.branchEl.style.marginLeft)*(o.index-1)+o.index*this.indent+"px":o.branchEl.style.marginLeft=(o.branchEl.offsetWidth+o.branchEl.style.marginRight)*(o.index-1)+o.index*this.indent+"px"):this.table.rtl?e.style.paddingRight=parseInt(window.getComputedStyle(e,null).getPropertyValue("padding-right"))+o.index*this.indent+"px":e.style.paddingLeft=parseInt(window.getComputedStyle(e,null).getPropertyValue("padding-left"))+o.index*this.indent+"px")},DataTree.prototype.generateControlElement=function(t,e){var o=this,i=t.modules.dataTree,n=(e=e||t.getCells()[0].getElement(),i.controlEl);!1!==i.children&&(i.open?(i.controlEl=this.collapseEl.cloneNode(!0),i.controlEl.addEventListener("click",(function(e){e.stopPropagation(),o.collapseRow(t)}))):(i.controlEl=this.expandEl.cloneNode(!0),i.controlEl.addEventListener("click",(function(e){e.stopPropagation(),o.expandRow(t)}))),i.controlEl.addEventListener("mousedown",(function(t){t.stopPropagation()})),n&&n.parentNode===e?n.parentNode.replaceChild(i.controlEl,n):e.insertBefore(i.controlEl,e.firstChild))},DataTree.prototype.setDisplayIndex=function(t){this.displayIndex=t},DataTree.prototype.getDisplayIndex=function(){return this.displayIndex},DataTree.prototype.getRows=function(t){var e=this,o=[];return t.forEach((function(t,i){var n;o.push(t),t instanceof Row&&(t.create(),(n=t.modules.dataTree.children).index||!1===n.children||e.getChildren(t).forEach((function(t){t.create(),o.push(t)})))})),o},DataTree.prototype.getChildren=function(t,e){var o=this,i=t.modules.dataTree,n=[],s=[];return!1!==i.children&&(i.open||e)&&(Array.isArray(i.children)||(i.children=this.generateChildren(t)),n=this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(i.children):i.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(n),n.forEach((function(t){s.push(t),o.getChildren(t).forEach((function(t){s.push(t)}))}))),s},DataTree.prototype.generateChildren=function(t){var e=this,o=[],i=t.getData()[this.field];return Array.isArray(i)||(i=[i]),i.forEach((function(i){var n=new Row(i||{},e.table.rowManager);n.create(),n.modules.dataTree.index=t.modules.dataTree.index+1,n.modules.dataTree.parent=t,n.modules.dataTree.children&&(n.modules.dataTree.open=e.startOpen(n.getComponent(),n.modules.dataTree.index)),o.push(n)})),o},DataTree.prototype.expandRow=function(t,e){var o=t.modules.dataTree;!1!==o.children&&(o.open=!0,t.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowExpanded(t.getComponent(),t.modules.dataTree.index))},DataTree.prototype.collapseRow=function(t){var e=t.modules.dataTree;!1!==e.children&&(e.open=!1,t.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowCollapsed(t.getComponent(),t.modules.dataTree.index))},DataTree.prototype.toggleRow=function(t){var e=t.modules.dataTree;!1!==e.children&&(e.open?this.collapseRow(t):this.expandRow(t))},DataTree.prototype.getTreeParent=function(t){return!!t.modules.dataTree.parent&&t.modules.dataTree.parent.getComponent()},DataTree.prototype.getFilteredTreeChildren=function(t){var e=t.modules.dataTree,o=[];return e.children&&(Array.isArray(e.children)||(e.children=this.generateChildren(t)),(this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(e.children):e.children).forEach((function(t){t instanceof Row&&o.push(t)}))),o},DataTree.prototype.rowDelete=function(t){var e,o=t.modules.dataTree.parent;o&&(!1!==(e=this.findChildIndex(t,o))&&o.data[this.field].splice(e,1),o.data[this.field].length||delete o.data[this.field],this.initializeRow(o),this.layoutRow(o)),this.table.rowManager.refreshActiveData("tree",!1,!0)},DataTree.prototype.addTreeChildRow=function(t,e,o,i){var n=!1;"string"==typeof e&&(e=JSON.parse(e)),Array.isArray(t.data[this.field])||(t.data[this.field]=[],t.modules.dataTree.open=this.startOpen(t.getComponent(),t.modules.dataTree.index)),void 0!==i&&!1!==(n=this.findChildIndex(i,t))&&t.data[this.field].splice(o?n:n+1,0,e),!1===n&&(o?t.data[this.field].unshift(e):t.data[this.field].push(e)),this.initializeRow(t),this.layoutRow(t),this.table.rowManager.refreshActiveData("tree",!1,!0)},DataTree.prototype.findChildIndex=function(t,e){var o=this,i=!1;return"object"==(void 0===t?"undefined":_typeof(t))?t instanceof Row?i=t.data:t instanceof RowComponent?i=t._getSelf().data:"undefined"!=typeof HTMLElement&&t instanceof HTMLElement&&e.modules.dataTree&&(i=e.modules.dataTree.children.find((function(e){return e instanceof Row&&e.element===t})))&&(i=i.data):i=null!=t&&e.data[this.field].find((function(e){return e.data[o.table.options.index]==t})),i&&(Array.isArray(e.data[this.field])&&(i=e.data[this.field].indexOf(i)),-1==i&&(i=!1)),i},DataTree.prototype.getTreeChildren=function(t,e,o){var i=this,n=t.modules.dataTree,s=[];return n.children&&(Array.isArray(n.children)||(n.children=this.generateChildren(t)),n.children.forEach((function(t){t instanceof Row&&(s.push(e?t.getComponent():t),o&&(s=s.concat(i.getTreeChildren(t,e,o))))}))),s},DataTree.prototype.checkForRestyle=function(t){t.row.cells.indexOf(t)||t.row.reinitialize()},DataTree.prototype.getChildField=function(){return this.field},DataTree.prototype.redrawNeeded=function(t){return!!this.field&&void 0!==t[this.field]||!!this.elementField&&void 0!==t[this.elementField]},Tabulator.prototype.registerModule("dataTree",DataTree);var Download=function(t){this.table=t};Download.prototype.download=function(t,e,o,i,n){var s=this,a=!1;if("function"==typeof t?a=t:s.downloaders[t]?a=s.downloaders[t]:console.warn("Download Error - No such download type found: ",t),a){var r=this.generateExportList(i);a.call(this.table,r,o||{},(function(o,i){n?!0===n?s.triggerDownload(o,i,t,e,!0):n(o):s.triggerDownload(o,i,t,e)}))}},Download.prototype.generateExportList=function(t){var e=this.table.modules.export.generateExportList(this.table.options.downloadConfig,!1,t||this.table.options.downloadRowRange,"download"),o=this.table.options.groupHeaderDownload;return o&&!Array.isArray(o)&&(o=[o]),e.forEach((function(t){var e;"group"===t.type&&(e=t.columns[0],o&&o[t.indent]&&(e.value=o[t.indent](e.value,t.component._group.getRowCount(),t.component._group.getData(),t.component)))})),e},Download.prototype.triggerDownload=function(t,e,o,i,n){var s=document.createElement("a"),a=new Blob([t],{type:e});i=i||"Tabulator."+("function"==typeof o?"txt":o);(a=this.table.options.downloadReady.call(this.table,t,a))&&(n?window.open(window.URL.createObjectURL(a)):navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(a,i):(s.setAttribute("href",window.URL.createObjectURL(a)),s.setAttribute("download",i),s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s)),this.table.options.downloadComplete&&this.table.options.downloadComplete())},Download.prototype.commsReceived=function(t,e,o){switch(e){case"intercept":this.download(o.type,"",o.options,o.active,o.intercept)}},Download.prototype.downloaders={csv:function(t,e,o){var i=e&&e.delimiter?e.delimiter:",",n=[],s=[];t.forEach((function(t){var e=[];switch(t.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":t.columns.forEach((function(t,e){t&&1===t.depth&&(s[e]=void 0===t.value||null===t.value?"":'"'+String(t.value).split('"').join('""')+'"')}));break;case"row":t.columns.forEach((function(t){if(t){switch(_typeof(t.value)){case"object":t.value=JSON.stringify(t.value);break;case"undefined":case"null":t.value=""}e.push('"'+String(t.value).split('"').join('""')+'"')}})),n.push(e.join(i))}})),s.length&&n.unshift(s.join(i)),n=n.join("\n"),e.bom&&(n="\ufeff"+n),o(n,"text/csv")},json:function(t,e,o){var i=[];t.forEach((function(t){var e={};switch(t.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":t.columns.forEach((function(t){t&&(e[t.component.getField()]=t.value)})),i.push(e)}})),o(i=JSON.stringify(i,null,"\t"),"application/json")},pdf:function(t,e,o){var i=[],n=[],s={},a=e.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},r=e.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},l=e.jsPDF||{},u=e&&e.title?e.title:"";function c(t,e){var o=[];return t.columns.forEach((function(t){var i;if(t){switch(_typeof(t.value)){case"object":t.value=JSON.stringify(t.value);break;case"undefined":case"null":t.value=""}i={content:t.value,colSpan:t.width,rowSpan:t.height},e&&(i.styles=e),o.push(i)}else o.push("")})),o}l.orientation||(l.orientation=e.orientation||"landscape"),l.unit||(l.unit="pt"),t.forEach((function(t){switch(t.type){case"header":i.push(c(t));break;case"group":n.push(c(t,a));break;case"calc":n.push(c(t,r));break;case"row":n.push(c(t))}}));var d=new jsPDF(l);e&&e.autoTable&&(s="function"==typeof e.autoTable?e.autoTable(d)||{}:e.autoTable),u&&(s.addPageContent=function(t){d.text(u,40,30)}),s.head=i,s.body=n,d.autoTable(s),e&&e.documentProcessing&&e.documentProcessing(d),o(d.output("arraybuffer"),"application/pdf")},xlsx:function(t,e,o){var i=e.sheetName||"Sheet1",n=XLSX.utils.book_new();function s(){var e=[],o=[],i={},n={s:{c:0,r:0},e:{c:t[0]?t[0].columns.reduce((function(t,e){return t+(e&&e.width?e.width:1)}),0):0,r:t.length}};return t.forEach((function(t,i){var n=[];t.columns.forEach((function(t,e){t?(n.push(t.value instanceof Date||"object"!==_typeof(t.value)?t.value:JSON.stringify(t.value)),(t.width>1||t.height>-1)&&o.push({s:{r:i,c:e},e:{r:i+t.height-1,c:e+t.width-1}})):n.push("")})),e.push(n)})),XLSX.utils.sheet_add_aoa(i,e),i["!ref"]=XLSX.utils.encode_range(n),o.length&&(i["!merges"]=o),i}if(n.SheetNames=[],n.Sheets={},e.sheetOnly)o(s());else{if(e.sheets)for(var a in e.sheets)!0===e.sheets[a]?(n.SheetNames.push(a),n.Sheets[a]=s()):(n.SheetNames.push(a),this.modules.comms.send(e.sheets[a],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:this.active,intercept:function(t){n.Sheets[a]=t}}));else n.SheetNames.push(i),n.Sheets[i]=s();e.documentProcessing&&(n=e.documentProcessing(n)),o(function(t){for(var e=new ArrayBuffer(t.length),o=new Uint8Array(e),i=0;i!=t.length;++i)o[i]=255&t.charCodeAt(i);return e}(XLSX.write(n,{bookType:"xlsx",bookSST:!0,type:"binary"})),"application/octet-stream")}},html:function(t,e,o){this.modExists("export",!0)&&o(this.modules.export.genereateHTMLTable(t),"text/html")}},Tabulator.prototype.registerModule("download",Download);var Edit=function(t){this.table=t,this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[]};Edit.prototype.initializeColumn=function(t){var e={editor:!1,blocked:!1,check:t.definition.editable,params:t.definition.editorParams||{}};switch(_typeof(t.definition.editor)){case"string":"tick"===t.definition.editor&&(t.definition.editor="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),this.editors[t.definition.editor]?e.editor=this.editors[t.definition.editor]:console.warn("Editor Error - No such editor found: ",t.definition.editor);break;case"function":e.editor=t.definition.editor;break;case"boolean":!0===t.definition.editor&&("function"!=typeof t.definition.formatter?("tick"===t.definition.formatter&&(t.definition.formatter="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),this.editors[t.definition.formatter]?e.editor=this.editors[t.definition.formatter]:e.editor=this.editors.input):console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",t.definition.formatter))}e.editor&&(t.modules.edit=e)},Edit.prototype.getCurrentCell=function(){return!!this.currentCell&&this.currentCell.getComponent()},Edit.prototype.clearEditor=function(t){var e,o=this.currentCell;if(this.invalidEdit=!1,o){for(this.currentCell=!1,e=o.getElement(),t?o.validate():e.classList.remove("tabulator-validation-fail"),e.classList.remove("tabulator-editing");e.firstChild;)e.removeChild(e.firstChild);o.row.getElement().classList.remove("tabulator-row-editing")}},Edit.prototype.cancelEdit=function(){if(this.currentCell){var t=this.currentCell,e=this.currentCell.getComponent();this.clearEditor(!0),t.setValueActual(t.getValue()),t.cellRendered(),("textarea"==t.column.definition.editor||t.column.definition.variableHeight)&&t.row.normalizeHeight(!0),t.column.cellEvents.cellEditCancelled&&t.column.cellEvents.cellEditCancelled.call(this.table,e),this.table.options.cellEditCancelled.call(this.table,e)}},Edit.prototype.bindEditor=function(t){var e=this,o=t.getElement(!0);o.setAttribute("tabindex",0),o.addEventListener("click",(function(t){o.classList.contains("tabulator-editing")||o.focus({preventScroll:!0})})),o.addEventListener("mousedown",(function(t){2===t.button?t.preventDefault():e.mouseClick=!0})),o.addEventListener("focus",(function(o){e.recursionBlock||e.edit(t,o,!1)}))},Edit.prototype.focusCellNoEvent=function(t,e){this.recursionBlock=!0,e&&"ie"===this.table.browser||t.getElement().focus({preventScroll:!0}),this.recursionBlock=!1},Edit.prototype.editCell=function(t,e){this.focusCellNoEvent(t),this.edit(t,!1,e)},Edit.prototype.focusScrollAdjust=function(t){if("virtual"==this.table.rowManager.getRenderMode()){var e=this.table.rowManager.element.scrollTop,o=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,i=t.row.getElement();i.offsetTop;i.offsetTop<e?this.table.rowManager.element.scrollTop-=e-i.offsetTop:i.offsetTop+i.offsetHeight>o&&(this.table.rowManager.element.scrollTop+=i.offsetTop+i.offsetHeight-o);var n=this.table.rowManager.element.scrollLeft,s=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,a=t.getElement();a.offsetLeft;this.table.modExists("frozenColumns")&&(n+=parseInt(this.table.modules.frozenColumns.leftMargin),s-=parseInt(this.table.modules.frozenColumns.rightMargin)),this.table.options.virtualDomHoz&&(n-=parseInt(this.table.vdomHoz.vDomPadLeft),s-=parseInt(this.table.vdomHoz.vDomPadLeft)),a.offsetLeft<n?this.table.rowManager.element.scrollLeft-=n-a.offsetLeft:a.offsetLeft+a.offsetWidth>s&&(this.table.rowManager.element.scrollLeft+=a.offsetLeft+a.offsetWidth-s)}},Edit.prototype.edit=function(t,e,o){var i,n,s,a=this,r=!0,l=function(){},u=t.getElement();if(!this.currentCell){if(t.column.modules.edit.blocked)return this.mouseClick=!1,u.blur(),!1;switch(e&&e.stopPropagation(),_typeof(t.column.modules.edit.check)){case"function":r=t.column.modules.edit.check(t.getComponent());break;case"boolean":r=t.column.modules.edit.check}if(r||o){if(a.cancelEdit(),a.currentCell=t,this.focusScrollAdjust(t),n=t.getComponent(),this.mouseClick&&(this.mouseClick=!1,t.column.cellEvents.cellClick&&t.column.cellEvents.cellClick.call(this.table,e,n)),t.column.cellEvents.cellEditing&&t.column.cellEvents.cellEditing.call(this.table,n),a.table.options.cellEditing.call(this.table,n),s="function"==typeof t.column.modules.edit.params?t.column.modules.edit.params(n):t.column.modules.edit.params,!1===(i=t.column.modules.edit.editor.call(a,n,(function(t){l=t}),(function(e){if(a.currentCell===t){var o=!0;return t.column.modules.validate&&a.table.modExists("validate")&&"manual"!=a.table.options.validationMode&&(o=a.table.modules.validate.validate(t.column.modules.validate,t,e)),!0===o||"highlight"===a.table.options.validationMode?(a.clearEditor(),t.modules.edit||(t.modules.edit={}),t.modules.edit.edited=!0,-1==a.editedCells.indexOf(t)&&a.editedCells.push(t),t.setValue(e,!0),a.table.options.dataTree&&a.table.modExists("dataTree")&&a.table.modules.dataTree.checkForRestyle(t),!0===o||(u.classList.add("tabulator-validation-fail"),a.table.options.validationFailed.call(a.table,t.getComponent(),e,o),!1)):(a.invalidEdit=!0,u.classList.add("tabulator-validation-fail"),a.focusCellNoEvent(t,!0),l(),a.table.options.validationFailed.call(a.table,t.getComponent(),e,o),!1)}}),(function(){a.currentCell===t&&(a.cancelEdit(),a.table.options.dataTree&&a.table.modExists("dataTree")&&a.table.modules.dataTree.checkForRestyle(t))}),s)))return u.blur(),!1;if(!(i instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",i),u.blur(),!1;for(u.classList.add("tabulator-editing"),t.row.getElement().classList.add("tabulator-row-editing");u.firstChild;)u.removeChild(u.firstChild);u.appendChild(i),l();for(var c=u.children,d=0;d<c.length;d++)c[d].addEventListener("click",(function(t){t.stopPropagation()}));return!0}return this.mouseClick=!1,u.blur(),!1}this.invalidEdit||this.cancelEdit()},Edit.prototype.maskInput=function(t,e){var o=e.mask,i=void 0!==e.maskLetterChar?e.maskLetterChar:"A",n=void 0!==e.maskNumberChar?e.maskNumberChar:"9",s=void 0!==e.maskWildcardChar?e.maskWildcardChar:"*";function a(e){var r=o[e];void 0!==r&&r!==s&&r!==i&&r!==n&&(t.value=t.value+""+r,a(e+1))}t.addEventListener("keydown",(function(e){var a=t.value.length,r=e.key;if(e.keyCode>46){if(a>=o.length)return e.preventDefault(),e.stopPropagation(),!1,!1;switch(o[a]){case i:if(r.toUpperCase()==r.toLowerCase())return e.preventDefault(),e.stopPropagation(),!1,!1;break;case n:if(isNaN(r))return e.preventDefault(),e.stopPropagation(),!1,!1;break;case s:break;default:if(r!==o[a])return e.preventDefault(),e.stopPropagation(),!1,!1}!0}})),t.addEventListener("keyup",(function(o){o.keyCode>46&&e.maskAutoFill&&a(t.value.length)})),t.placeholder||(t.placeholder=o),e.maskAutoFill&&a(t.value.length)},Edit.prototype.getEditedCells=function(){var t=[];return this.editedCells.forEach((function(e){t.push(e.getComponent())})),t},Edit.prototype.clearEdited=function(t){var e;t.modules.edit&&t.modules.edit.edited&&(t.modules.edit.edited=!1,t.modules.validate&&(t.modules.validate.invalid=!1)),(e=this.editedCells.indexOf(t))>-1&&this.editedCells.splice(e,1)},Edit.prototype.editors={input:function(t,e,o,i,n){var s=t.getValue(),a=document.createElement("input");if(a.setAttribute("type",n.search?"search":"text"),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var r in n.elementAttributes)"+"==r.charAt(0)?(r=r.slice(1),a.setAttribute(r,a.getAttribute(r)+n.elementAttributes["+"+r])):a.setAttribute(r,n.elementAttributes[r]);function l(t){null==s&&""!==a.value||a.value!==s?o(a.value)&&(s=a.value):i()}return a.value=void 0!==s?s:"",e((function(){a.focus({preventScroll:!0}),a.style.height="100%"})),a.addEventListener("change",l),a.addEventListener("blur",l),a.addEventListener("keydown",(function(t){switch(t.keyCode){case 13:l();break;case 27:i();break;case 35:case 36:t.stopPropagation()}})),n.mask&&this.table.modules.edit.maskInput(a,n),a},textarea:function(t,e,o,i,n){var s=t.getValue(),a=n.verticalNavigation||"hybrid",r=String(null!=s?s:""),l=((r.match(/(?:\r\n|\r|\n)/g)||[]).length,document.createElement("textarea")),u=0;if(l.style.display="block",l.style.padding="2px",l.style.height="100%",l.style.width="100%",l.style.boxSizing="border-box",l.style.whiteSpace="pre-wrap",l.style.resize="none",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var c in n.elementAttributes)"+"==c.charAt(0)?(c=c.slice(1),l.setAttribute(c,l.getAttribute(c)+n.elementAttributes["+"+c])):l.setAttribute(c,n.elementAttributes[c]);function d(e){null==s&&""!==l.value||l.value!==s?(o(l.value)&&(s=l.value),setTimeout((function(){t.getRow().normalizeHeight()}),300)):i()}return l.value=r,e((function(){l.focus({preventScroll:!0}),l.style.height="100%",l.scrollHeight,l.style.height=l.scrollHeight+"px",t.getRow().normalizeHeight()})),l.addEventListener("change",d),l.addEventListener("blur",d),l.addEventListener("keyup",(function(){l.style.height="";var e=l.scrollHeight;l.style.height=e+"px",e!=u&&(u=e,t.getRow().normalizeHeight())})),l.addEventListener("keydown",(function(t){switch(t.keyCode){case 27:i();break;case 38:("editor"==a||"hybrid"==a&&l.selectionStart)&&(t.stopImmediatePropagation(),t.stopPropagation());break;case 40:("editor"==a||"hybrid"==a&&l.selectionStart!==l.value.length)&&(t.stopImmediatePropagation(),t.stopPropagation());break;case 35:case 36:t.stopPropagation()}})),n.mask&&this.table.modules.edit.maskInput(l,n),l},number:function(t,e,o,i,n){var s=t.getValue(),a=n.verticalNavigation||"editor",r=document.createElement("input");if(r.setAttribute("type","number"),void 0!==n.max&&r.setAttribute("max",n.max),void 0!==n.min&&r.setAttribute("min",n.min),void 0!==n.step&&r.setAttribute("step",n.step),r.style.padding="4px",r.style.width="100%",r.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var l in n.elementAttributes)"+"==l.charAt(0)?(l=l.slice(1),r.setAttribute(l,r.getAttribute(l)+n.elementAttributes["+"+l])):r.setAttribute(l,n.elementAttributes[l]);r.value=s;var u=function(t){c()};function c(){var t=r.value;isNaN(t)||""===t||(t=Number(t)),t!==s?o(t)&&(s=t):i()}return e((function(){r.removeEventListener("blur",u),r.focus({preventScroll:!0}),r.style.height="100%",r.addEventListener("blur",u)})),r.addEventListener("keydown",(function(t){switch(t.keyCode){case 13:c();break;case 27:i();break;case 38:case 40:"editor"==a&&(t.stopImmediatePropagation(),t.stopPropagation());break;case 35:case 36:t.stopPropagation()}})),n.mask&&this.table.modules.edit.maskInput(r,n),r},range:function(t,e,o,i,n){var s=t.getValue(),a=document.createElement("input");if(a.setAttribute("type","range"),void 0!==n.max&&a.setAttribute("max",n.max),void 0!==n.min&&a.setAttribute("min",n.min),void 0!==n.step&&a.setAttribute("step",n.step),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var r in n.elementAttributes)"+"==r.charAt(0)?(r=r.slice(1),a.setAttribute(r,a.getAttribute(r)+n.elementAttributes["+"+r])):a.setAttribute(r,n.elementAttributes[r]);function l(){var t=a.value;isNaN(t)||""===t||(t=Number(t)),t!=s?o(t)&&(s=t):i()}return a.value=s,e((function(){a.focus({preventScroll:!0}),a.style.height="100%"})),a.addEventListener("blur",(function(t){l()})),a.addEventListener("keydown",(function(t){switch(t.keyCode){case 13:l();break;case 27:i()}})),a},select:function(t,e,o,i,n){var s=this,a=this,r=t.getElement(),l=t.getValue(),u=n.verticalNavigation||"editor",c=void 0!==l||null===l?Array.isArray(l)?l:[l]:void 0!==n.defaultValue?n.defaultValue:[],d=document.createElement("input"),h=document.createElement("div"),p=n.multiselect,m=[],f={},g=[],b=[],v=!0,w=!1,y="",C=null;function E(e){var o,i={},n=a.table.getData();return(o=e?a.table.columnManager.getColumnByField(e):t.getColumn()._getSelf())?n.forEach((function(t){var e=o.getFieldValue(t);null!=e&&""!==e&&(i[e]=!0)})):console.warn("unable to find matching column to create select lookup list:",e),Object.keys(i)}function R(e,o){var i=[],s=[];function a(t){t={label:t.label,value:t.value,itemParams:t.itemParams,elementAttributes:t.elementAttributes,element:!1};return o.indexOf(t.value)>-1&&M(t),i.push(t),s.push(t),t}if("function"==typeof e&&(e=e(t)),Array.isArray(e))e.forEach((function(t){var e;"object"===(void 0===t?"undefined":_typeof(t))?t.options?(e={label:t.label,group:!0,itemParams:t.itemParams,elementAttributes:t.elementAttributes,element:!1},s.push(e),t.options.forEach((function(t){a(t)}))):a(t):(e={label:t,value:t,element:!1},o.indexOf(e.value)>-1&&M(e),i.push(e),s.push(e))}));else for(var r in e){var l={label:e[r],value:r,element:!1};o.indexOf(l.value)>-1&&M(l),i.push(l),s.push(l)}n.sortValuesList&&(i.sort((function(t,e){return t.label<e.label?-1:t.label>e.label?1:0})),s.sort((function(t,e){return t.label<e.label?-1:t.label>e.label?1:0})),"asc"!==n.sortValuesList&&(i.reverse(),s.reverse())),m=i,g=s,function(){for(;h.firstChild;)h.removeChild(h.firstChild);g.forEach((function(e){var o=e.element;if(!o){if(o=document.createElement("div"),e.label=n.listItemFormatter?n.listItemFormatter(e.value,e.label,t,o,e.itemParams):e.label,e.group?(o.classList.add("tabulator-edit-select-list-group"),o.tabIndex=0,o.innerHTML=""===e.label?" ":e.label):(o.classList.add("tabulator-edit-select-list-item"),o.tabIndex=0,o.innerHTML=""===e.label?" ":e.label,o.addEventListener("click",(function(){w=!0,setTimeout((function(){w=!1}),10),p?(L(e),d.focus()):D(e)})),b.indexOf(e)>-1&&o.classList.add("active")),e.elementAttributes&&"object"==_typeof(e.elementAttributes))for(var i in e.elementAttributes)"+"==i.charAt(0)?(i=i.slice(1),o.setAttribute(i,d.getAttribute(i)+e.elementAttributes["+"+i])):o.setAttribute(i,e.elementAttributes[i]);o.addEventListener("mousedown",(function(){v=!1,setTimeout((function(){v=!0}),10)})),e.element=o}h.appendChild(o)}))}()}function x(t,e){!p&&f&&f.element&&f.element.classList.remove("active"),f&&f.element&&f.element.classList.remove("focused"),f=t,t.element&&(t.element.classList.add("focused"),e&&t.element.classList.add("active")),t&&t.element&&t.element.scrollIntoView&&t.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function M(t){-1==b.indexOf(t)&&(b.push(t),x(t,!0)),k()}function T(t){var e=b[t];t>-1&&(b.splice(t,1),e.element&&e.element.classList.remove("active"))}function L(t){t||(t=f);var e=b.indexOf(t);e>-1?T(e):(!0!==p&&b.length>=p&&T(0),M(t)),k()}function D(t){H(),t||(t=f),t&&(d.value=t.label,o(t.value)),c=[t.value]}function z(t){t||H();var e=[];b.forEach((function(t){e.push(t.value)})),c=e,o(e)}function k(){var t=[];b.forEach((function(e){t.push(e.label)})),d.value=t.join(", "),!1===a.currentCell&&z(!0)}function S(){H(),i()}function H(){h.parentNode&&h.parentNode.removeChild(h),a.table.rowManager.element.removeEventListener("scroll",S)}if((Array.isArray(n)||!Array.isArray(n)&&"object"===(void 0===n?"undefined":_typeof(n))&&!n.values)&&(console.warn("DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"),n={values:n}),d.setAttribute("type","text"),d.style.padding="4px",d.style.width="100%",d.style.boxSizing="border-box",d.style.cursor="default",d.readOnly=0!=this.currentCell,n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var P in n.elementAttributes)"+"==P.charAt(0)?(P=P.slice(1),d.setAttribute(P,d.getAttribute(P)+n.elementAttributes["+"+P])):d.setAttribute(P,n.elementAttributes[P]);return d.value=void 0!==l||null===l?l:"",d.addEventListener("search",(function(t){d.value||(!function(){for(var t=b.length,e=0;e<t;e++)T(0)}(),z())})),d.addEventListener("keydown",(function(t){var e;switch(t.keyCode){case 38:e=m.indexOf(f),("editor"==u||"hybrid"==u&&e)&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault(),e>0&&x(m[e-1],!p));break;case 40:e=m.indexOf(f),("editor"==u||"hybrid"==u&&e<m.length-1)&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault(),e<m.length-1&&x(-1==e?m[0]:m[e+1],!p));break;case 37:case 39:t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault();break;case 13:p?L():D();break;case 27:S();break;case 9:break;default:!1===a.currentCell&&t.preventDefault(),t.keyCode>=38&&t.keyCode<=90&&function(t){clearTimeout(C);var e=String.fromCharCode(event.keyCode).toLowerCase();y+=e.toLowerCase();var o=m.find((function(t){return void 0!==t.label&&t.label.toLowerCase().startsWith(y)}));o&&x(o,!p),C=setTimeout((function(){y=""}),800)}(t.keyCode)}})),d.addEventListener("blur",(function(t){v&&(p?z():S())})),d.addEventListener("focus",(function(t){w||function(){if(b=[],!h.parentNode){!0===n.values?R(E(),c):"string"==typeof n.values?R(E(n.values),c):R(n.values||[],c);var t=Tabulator.prototype.helpers.elOffset(r);h.style.minWidth=r.offsetWidth+"px",h.style.top=t.top+r.offsetHeight+"px",h.style.left=t.left+"px",h.addEventListener("mousedown",(function(t){v=!1,setTimeout((function(){v=!0}),10)})),document.body.appendChild(h)}}()})),(h=document.createElement("div")).classList.add("tabulator-edit-select-list"),e((function(){d.style.height="100%",d.focus({preventScroll:!0})})),setTimeout((function(){s.table.rowManager.element.addEventListener("scroll",S)}),10),d},autocomplete:function(t,e,o,i,n){var s=this,a=this,r=t.getElement(),l=t.getValue(),u=n.verticalNavigation||"editor",c=void 0!==l||null===l?l:void 0!==n.defaultValue?n.defaultValue:"",d=document.createElement("input"),h=document.createElement("div"),p=[],m=!1,f=!0,g=!1;if(d.setAttribute("type","search"),d.style.padding="4px",d.style.width="100%",d.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var b in n.elementAttributes)"+"==b.charAt(0)?(b=b.slice(1),d.setAttribute(b,d.getAttribute(b)+n.elementAttributes["+"+b])):d.setAttribute(b,n.elementAttributes[b]);function v(){!0===n.values?g=w():"string"==typeof n.values&&(g=w(n.values))}function w(e){var o,i={},s=a.table.getData();return(o=e?a.table.columnManager.getColumnByField(e):t.getColumn()._getSelf())?(s.forEach((function(t){var e=o.getFieldValue(t);null!=e&&""!==e&&(i[e]=!0)})),i=n.sortValuesList?"asc"==n.sortValuesList?Object.keys(i).sort():Object.keys(i).sort().reverse():Object.keys(i)):console.warn("unable to find matching column to create autocomplete lookup list:",e),i}function y(t,e){var o,i,s=[];o=g||(n.values||[]),n.searchFunc?(s=n.searchFunc(t,o))instanceof Promise?(C(void 0!==n.searchingPlaceholder?n.searchingPlaceholder:"Searching..."),s.then((function(t){x(E(t),e)})).catch((function(t){console.err("error in autocomplete search promise:",t)}))):x(E(s),e):(i=E(o),""===t?n.showListOnEmpty&&(s=i):i.forEach((function(e){null===e.value&&void 0===e.value||(String(e.value).toLowerCase().indexOf(String(t).toLowerCase())>-1||String(e.title).toLowerCase().indexOf(String(t).toLowerCase())>-1)&&s.push(e)})),x(s,e))}function C(t){var e=document.createElement("div");R(),!1!==t&&(e.classList.add("tabulator-edit-select-list-notice"),e.tabIndex=0,t instanceof Node?e.appendChild(t):e.innerHTML=t,h.appendChild(e))}function E(t){var e=[];if(Array.isArray(t))t.forEach((function(t){var o={};"object"===(void 0===t?"undefined":_typeof(t))?(o.title=n.listItemFormatter?n.listItemFormatter(t.value,t.label):t.label,o.value=t.value):(o.title=n.listItemFormatter?n.listItemFormatter(t,t):t,o.value=t),e.push(o)}));else for(var o in t){var i={title:n.listItemFormatter?n.listItemFormatter(o,t[o]):t[o],value:o};e.push(i)}return e}function R(){for(;h.firstChild;)h.removeChild(h.firstChild)}function x(t,e){t.length?function(t,e){var o=!1;R(),(p=t).forEach((function(t){var i=t.element;i||((i=document.createElement("div")).classList.add("tabulator-edit-select-list-item"),i.tabIndex=0,i.innerHTML=t.title,i.addEventListener("click",(function(e){T(t),M()})),i.addEventListener("mousedown",(function(t){f=!1,setTimeout((function(){f=!0}),10)})),t.element=i,e&&t.value==l&&(d.value=t.title,t.element.classList.add("active"),o=!0),t===m&&(t.element.classList.add("active"),o=!0)),h.appendChild(i)})),o||T(!1)}(t,e):n.emptyPlaceholder&&C(n.emptyPlaceholder)}function M(){L(),m?l!==m.value?(l=m.value,d.value=m.title,o(m.value)):i():n.freetext||n.allowEmpty&&""===d.value?(l=d.value,o(d.value)):i()}function T(t,e){m&&m.element&&m.element.classList.remove("active"),m=t,t&&t.element&&t.element.classList.add("active"),t&&t.element&&t.element.scrollIntoView&&t.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function L(){h.parentNode&&h.parentNode.removeChild(h),a.table.rowManager.element.removeEventListener("scroll",D)}function D(){L(),i()}return h.classList.add("tabulator-edit-select-list"),h.addEventListener("mousedown",(function(t){f=!1,setTimeout((function(){f=!0}),10)})),d.addEventListener("keydown",(function(t){var e;switch(t.keyCode){case 38:e=p.indexOf(m),("editor"==u||"hybrid"==u&&e)&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault(),T(e>0&&p[e-1]));break;case 40:e=p.indexOf(m),("editor"==u||"hybrid"==u&&e<p.length-1)&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault(),e<p.length-1&&T(-1==e?p[0]:p[e+1]));break;case 37:case 39:t.stopImmediatePropagation(),t.stopPropagation();break;case 13:M();break;case 27:D();break;case 36:case 35:t.stopImmediatePropagation()}})),d.addEventListener("keyup",(function(t){switch(t.keyCode){case 38:case 37:case 39:case 40:case 13:case 27:break;default:y(d.value)}})),d.addEventListener("search",(function(t){y(d.value)})),d.addEventListener("blur",(function(t){f&&M()})),d.addEventListener("focus",(function(t){var e=c;v(),function(){if(!h.parentNode){for(console.log("show",c);h.firstChild;)h.removeChild(h.firstChild);var t=Tabulator.prototype.helpers.elOffset(r);h.style.minWidth=r.offsetWidth+"px",h.style.top=t.top+r.offsetHeight+"px",h.style.left=t.left+"px",document.body.appendChild(h)}}(),d.value=e,y(e,!0)})),e((function(){d.style.height="100%",d.focus({preventScroll:!0})})),n.mask&&this.table.modules.edit.maskInput(d,n),setTimeout((function(){s.table.rowManager.element.addEventListener("scroll",D)}),10),v(),d.value=c,y(c,!0),d},star:function(t,e,o,i,n){var s=this,a=t.getElement(),r=t.getValue(),l=a.getElementsByTagName("svg").length||5,u=a.getElementsByTagName("svg")[0]?a.getElementsByTagName("svg")[0].getAttribute("width"):14,c=[],d=document.createElement("div"),h=document.createElementNS("http://www.w3.org/2000/svg","svg");function p(t){c.forEach((function(e,o){o<t?("ie"==s.table.browser?e.setAttribute("class","tabulator-star-active"):e.classList.replace("tabulator-star-inactive","tabulator-star-active"),e.innerHTML='<polygon fill="#488CE9" stroke="#014AAE" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>'):("ie"==s.table.browser?e.setAttribute("class","tabulator-star-inactive"):e.classList.replace("tabulator-star-active","tabulator-star-inactive"),e.innerHTML='<polygon fill="#010155" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>')}))}function m(t){var e=document.createElement("span"),i=h.cloneNode(!0);c.push(i),e.addEventListener("mouseenter",(function(e){e.stopPropagation(),e.stopImmediatePropagation(),p(t)})),e.addEventListener("mousemove",(function(t){t.stopPropagation(),t.stopImmediatePropagation()})),e.addEventListener("click",(function(e){e.stopPropagation(),e.stopImmediatePropagation(),o(t),a.blur()})),e.appendChild(i),d.appendChild(e)}function f(t){r=t,p(t)}if(a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",d.style.verticalAlign="middle",d.style.display="inline-block",d.style.padding="4px",h.setAttribute("width",u),h.setAttribute("height",u),h.setAttribute("viewBox","0 0 512 512"),h.setAttribute("xml:space","preserve"),h.style.padding="0 1px",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var g in n.elementAttributes)"+"==g.charAt(0)?(g=g.slice(1),d.setAttribute(g,d.getAttribute(g)+n.elementAttributes["+"+g])):d.setAttribute(g,n.elementAttributes[g]);for(var b=1;b<=l;b++)m(b);return p(r=Math.min(parseInt(r),l)),d.addEventListener("mousemove",(function(t){p(0)})),d.addEventListener("click",(function(t){o(0)})),a.addEventListener("blur",(function(t){i()})),a.addEventListener("keydown",(function(t){switch(t.keyCode){case 39:f(r+1);break;case 37:f(r-1);break;case 13:o(r);break;case 27:i()}})),d},progress:function(t,e,o,i,n){var s,a,r=t.getElement(),l=void 0===n.max?r.getElementsByTagName("div")[0].getAttribute("max")||100:n.max,u=void 0===n.min?r.getElementsByTagName("div")[0].getAttribute("min")||0:n.min,c=(l-u)/100,d=t.getValue()||0,h=document.createElement("div"),p=document.createElement("div");function m(){var t=window.getComputedStyle(r,null),e=c*Math.round(p.offsetWidth/((r.clientWidth-parseInt(t.getPropertyValue("padding-left"))-parseInt(t.getPropertyValue("padding-right")))/100))+u;o(e),r.setAttribute("aria-valuenow",e),r.setAttribute("aria-label",d)}if(h.style.position="absolute",h.style.right="0",h.style.top="0",h.style.bottom="0",h.style.width="5px",h.classList.add("tabulator-progress-handle"),p.style.display="inline-block",p.style.position="relative",p.style.height="100%",p.style.backgroundColor="#488CE9",p.style.maxWidth="100%",p.style.minWidth="0%",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var f in n.elementAttributes)"+"==f.charAt(0)?(f=f.slice(1),p.setAttribute(f,p.getAttribute(f)+n.elementAttributes["+"+f])):p.setAttribute(f,n.elementAttributes[f]);return r.style.padding="4px 4px",d=Math.min(parseFloat(d),l),d=Math.max(parseFloat(d),u),d=Math.round((d-u)/c),p.style.width=d+"%",r.setAttribute("aria-valuemin",u),r.setAttribute("aria-valuemax",l),p.appendChild(h),h.addEventListener("mousedown",(function(t){s=t.screenX,a=p.offsetWidth})),h.addEventListener("mouseover",(function(){h.style.cursor="ew-resize"})),r.addEventListener("mousemove",(function(t){s&&(p.style.width=a+t.screenX-s+"px")})),r.addEventListener("mouseup",(function(t){s&&(t.stopPropagation(),t.stopImmediatePropagation(),s=!1,a=!1,m())})),r.addEventListener("keydown",(function(t){switch(t.keyCode){case 39:t.preventDefault(),p.style.width=p.clientWidth+r.clientWidth/100+"px";break;case 37:t.preventDefault(),p.style.width=p.clientWidth-r.clientWidth/100+"px";break;case 9:case 13:m();break;case 27:i()}})),r.addEventListener("blur",(function(){i()})),p},tickCross:function(t,e,o,i,n){var s=t.getValue(),a=document.createElement("input"),r=n.tristate,l=void 0===n.indeterminateValue?null:n.indeterminateValue,u=!1;if(a.setAttribute("type","checkbox"),a.style.marginTop="5px",a.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var c in n.elementAttributes)"+"==c.charAt(0)?(c=c.slice(1),a.setAttribute(c,a.getAttribute(c)+n.elementAttributes["+"+c])):a.setAttribute(c,n.elementAttributes[c]);function d(t){return r?t?u?l:a.checked:a.checked&&!u?(a.checked=!1,a.indeterminate=!0,u=!0,l):(u=!1,a.checked):a.checked}return a.value=s,!r||void 0!==s&&s!==l&&""!==s||(u=!0,a.indeterminate=!0),"firefox"!=this.table.browser&&e((function(){a.focus({preventScroll:!0})})),a.checked=!0===s||"true"===s||"True"===s||1===s,e((function(){a.focus()})),a.addEventListener("change",(function(t){o(d())})),a.addEventListener("blur",(function(t){o(d(!0))})),a.addEventListener("keydown",(function(t){13==t.keyCode&&o(d()),27==t.keyCode&&i()})),a}},Tabulator.prototype.registerModule("edit",Edit);var ExportRow=function(t,e,o,i){this.type=t,this.columns=e,this.component=o||!1,this.indent=i||0},ExportColumn=function(t,e,o,i,n){this.value=t,this.component=e||!1,this.width=o,this.height=i,this.depth=n},Export=function(t){this.table=t,this.config={},this.cloneTableStyle=!0,this.colVisProp=""};Export.prototype.generateExportList=function(t,e,o,i){this.cloneTableStyle=e,this.config=t||{},this.colVisProp=i;var n=!1!==this.config.columnHeaders?this.headersToExportRows(this.generateColumnGroupHeaders()):[],s=this.bodyToExportRows(this.rowLookup(o));return n.concat(s)},Export.prototype.genereateTable=function(t,e,o,i){var n=this.generateExportList(t,e,o,i);return this.genereateTableElement(n)},Export.prototype.rowLookup=function(t){var e=this,o=[];if("function"==typeof t)t.call(this.table).forEach((function(t){(t=e.table.rowManager.findRow(t))&&o.push(t)}));else switch(t){case!0:case"visible":o=this.table.rowManager.getVisibleRows(!0);break;case"all":o=this.table.rowManager.rows;break;case"selected":o=this.table.modules.selectRow.selectedRows;break;case"active":default:o=this.table.options.pagination?this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length-2):this.table.rowManager.getDisplayRows()}return Object.assign([],o)},Export.prototype.generateColumnGroupHeaders=function(){var t=this,e=[];return(!1!==this.config.columnGroups?this.table.columnManager.columns:this.table.columnManager.columnsByIndex).forEach((function(o){var i=t.processColumnGroup(o);i&&e.push(i)})),e},Export.prototype.processColumnGroup=function(t){var e=this,o=t.columns,i=0,n={title:t.definition["title"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))]||t.definition.title,column:t,depth:1};if(o.length){if(n.subGroups=[],n.width=0,o.forEach((function(t){var o=e.processColumnGroup(t);o&&(n.width+=o.width,n.subGroups.push(o),o.depth>i&&(i=o.depth))})),n.depth+=i,!n.width)return!1}else{if(!this.columnVisCheck(t))return!1;n.width=1}return n},Export.prototype.columnVisCheck=function(t){return!1!==t.definition[this.colVisProp]&&(t.visible||!t.visible&&t.definition[this.colVisProp])},Export.prototype.headersToExportRows=function(t){var e=[],o=0,i=[];return t.forEach((function(t){t.depth>o&&(o=t.depth)})),t.forEach((function(t){!function t(i,n){var s=o-n;if(void 0===e[n]&&(e[n]=[]),i.height=i.subGroups?1:s-i.depth+1,e[n].push(i),i.height>1)for(var a=1;a<i.height;a++)void 0===e[n+a]&&(e[n+a]=[]),e[n+a].push(!1);if(i.width>1)for(var r=1;r<i.width;r++)e[n].push(!1);i.subGroups&&i.subGroups.forEach((function(e){t(e,n+1)}))}(t,0)})),e.forEach((function(t){var e=[];t.forEach((function(t){t?e.push(new ExportColumn(t.title,t.column.getComponent(),t.width,t.height,t.depth)):e.push(null)})),i.push(new ExportRow("header",e))})),i},Export.prototype.bodyToExportRows=function(t){var e=this,o=[],i=[];return this.table.columnManager.columnsByIndex.forEach((function(t){e.columnVisCheck(t)&&o.push(t.getComponent())})),!1!==this.config.columnCalcs&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&t.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&t.push(this.table.modules.columnCalcs.botRow)),(t=t.filter((function(t){switch(t.type){case"group":return!1!==e.config.rowGroups;case"calc":return!1!==e.config.columnCalcs;case"row":return!(e.table.options.dataTree&&!1===e.config.dataTree&&t.modules.dataTree.parent)}return!0}))).forEach((function(t,n){var s=t.getData(e.colVisProp),a=[],r=0;switch(t.type){case"group":r=t.level,a.push(new ExportColumn(t.key,t.getComponent(),o.length,1));break;case"calc":case"row":o.forEach((function(t){a.push(new ExportColumn(t._column.getFieldValue(s),t,1,1))})),e.table.options.dataTree&&!1!==e.config.dataTree&&(r=t.modules.dataTree.index)}i.push(new ExportRow(t.type,a,t.getComponent(),r))})),i},Export.prototype.genereateTableElement=function(t){var e=this,o=document.createElement("table"),i=document.createElement("thead"),n=document.createElement("tbody"),s=this.lookupTableStyles(),a=this.table.options["rowFormatter"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],r={};return r.rowFormatter=null!==a?a:this.table.options.rowFormatter,this.table.options.dataTree&&!1!==this.config.dataTree&&this.table.modExists("columnCalcs")&&(r.treeElementField=this.table.modules.dataTree.elementField),r.groupHeader=this.table.options["groupHeader"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],r.groupHeader&&!Array.isArray(r.groupHeader)&&(r.groupHeader=[r.groupHeader]),o.classList.add("tabulator-print-table"),this.mapElementStyles(this.table.columnManager.getHeadersElement(),i,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),t.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),t.forEach((function(t,o){switch(t.type){case"header":i.appendChild(e.genereateHeaderElement(t,r,s));break;case"group":n.appendChild(e.genereateGroupElement(t,r,s));break;case"calc":n.appendChild(e.genereateCalcElement(t,r,s));break;case"row":var a=e.genereateRowElement(t,r,s);e.mapElementStyles(o%2&&s.evenRow?s.evenRow:s.oddRow,a,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),n.appendChild(a)}})),i.innerHTML&&o.appendChild(i),o.appendChild(n),this.mapElementStyles(this.table.element,o,["border-top","border-left","border-right","border-bottom"]),o},Export.prototype.lookupTableStyles=function(){var t={};return this.cloneTableStyle&&window.getComputedStyle&&(t.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),t.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),t.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),t.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),t.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0],t.firstRow&&(t.styleCells=t.firstRow.getElementsByClassName("tabulator-cell"),t.firstCell=t.styleCells[0],t.lastCell=t.styleCells[t.styleCells.length-1])),t},Export.prototype.genereateHeaderElement=function(t,e,o){var i=this,n=document.createElement("tr");return t.columns.forEach((function(t){if(t){var e=document.createElement("th"),o=t.component._column.definition.cssClass?t.component._column.definition.cssClass.split(" "):[];e.colSpan=t.width,e.rowSpan=t.height,e.innerHTML=t.value,i.cloneTableStyle&&(e.style.boxSizing="border-box"),o.forEach((function(t){e.classList.add(t)})),i.mapElementStyles(t.component.getElement(),e,["text-align","border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),i.mapElementStyles(t.component._column.contentElement,e,["padding-top","padding-left","padding-right","padding-bottom"]),t.component._column.visible?i.mapElementStyles(t.component.getElement(),e,["width"]):t.component._column.definition.width&&(e.style.width=t.component._column.definition.width+"px"),t.component._column.parent&&i.mapElementStyles(t.component._column.parent.groupElement,e,["border-top"]),n.appendChild(e)}})),n},Export.prototype.genereateGroupElement=function(t,e,o){var i=document.createElement("tr"),n=document.createElement("td"),s=t.columns[0];return i.classList.add("tabulator-print-table-row"),e.groupHeader&&e.groupHeader[t.indent]?s.value=e.groupHeader[t.indent](s.value,t.component._group.getRowCount(),t.component._group.getData(),t.component):!1===e.groupHeader?s.value=s.value:s.value=t.component._group.generator(s.value,t.component._group.getRowCount(),t.component._group.getData(),t.component),n.colSpan=s.width,n.innerHTML=s.value,i.classList.add("tabulator-print-table-group"),i.classList.add("tabulator-group-level-"+t.indent),s.component.isVisible()&&i.classList.add("tabulator-group-visible"),this.mapElementStyles(o.firstGroup,i,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),this.mapElementStyles(o.firstGroup,n,["padding-top","padding-left","padding-right","padding-bottom"]),i.appendChild(n),i},Export.prototype.genereateCalcElement=function(t,e,o){var i=this.genereateRowElement(t,e,o);return i.classList.add("tabulator-print-table-calcs"),this.mapElementStyles(o.calcRow,i,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),i},Export.prototype.genereateRowElement=function(t,e,o){var n=this,s=document.createElement("tr");return s.classList.add("tabulator-print-table-row"),t.columns.forEach((function(a){if(a){var r=document.createElement("td"),l=a.component._column,u=a.value,c={modules:{},getValue:function(){return u},getField:function(){return l.definition.field},getElement:function(){return r},getColumn:function(){return l.getComponent()},getData:function(){return t.component.getData()},getRow:function(){return t.component},getComponent:function(){return c},column:l};if((l.definition.cssClass?l.definition.cssClass.split(" "):[]).forEach((function(t){r.classList.add(t)})),n.table.modExists("format")&&!1!==n.config.formatCells)u=n.table.modules.format.formatExportValue(c,n.colVisProp);else switch(void 0===u?"undefined":_typeof(u)){case"object":u=JSON.stringify(u);break;case"undefined":case"null":u="";break;default:u=u}u instanceof Node?r.appendChild(u):r.innerHTML=u,o.firstCell&&(n.mapElementStyles(o.firstCell,r,["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size"]),l.definition.align&&(r.style.textAlign=l.definition.align)),n.table.options.dataTree&&!1!==n.config.dataTree&&(e.treeElementField&&e.treeElementField==l.field||!e.treeElementField&&0==i)&&(t.component._row.modules.dataTree.controlEl&&r.insertBefore(t.component._row.modules.dataTree.controlEl.cloneNode(!0),r.firstChild),t.component._row.modules.dataTree.branchEl&&r.insertBefore(t.component._row.modules.dataTree.branchEl.cloneNode(!0),r.firstChild)),s.appendChild(r),c.modules.format&&c.modules.format.renderedCallback&&c.modules.format.renderedCallback(),e.rowFormatter&&!1!==n.config.formatCells&&e.rowFormatter(t.component)}})),s},Export.prototype.genereateHTMLTable=function(t){var e=document.createElement("div");return e.appendChild(this.genereateTableElement(t)),e.innerHTML},Export.prototype.getHtml=function(t,e,o,i){var n=this.generateExportList(o||this.table.options.htmlOutputConfig,e,t,i||"htmlOutput");return this.genereateHTMLTable(n)},Export.prototype.mapElementStyles=function(t,e,o){if(this.cloneTableStyle&&t&&e){var i={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var n=window.getComputedStyle(t);o.forEach((function(t){e.style[i[t]]=n.getPropertyValue(t)}))}}},Tabulator.prototype.registerModule("export",Export);var Filter=function(t){this.table=t,this.filterList=[],this.headerFilters={},this.headerFilterColumns=[],this.prevHeaderFilterChangeCheck="",this.prevHeaderFilterChangeCheck="{}",this.changed=!1};Filter.prototype.initializeColumn=function(t,e){var o=this,i=t.getField();t.modules.filter={success:function(e){var n,s="input"==t.modules.filter.tagType&&"text"==t.modules.filter.attrType||"textarea"==t.modules.filter.tagType?"partial":"match",a="",r="";if(void 0===t.modules.filter.prevSuccess||t.modules.filter.prevSuccess!==e){if(t.modules.filter.prevSuccess=e,t.modules.filter.emptyFunc(e))delete o.headerFilters[i];else{switch(t.modules.filter.value=e,_typeof(t.definition.headerFilterFunc)){case"string":o.filters[t.definition.headerFilterFunc]?(a=t.definition.headerFilterFunc,n=function(i){var n=t.definition.headerFilterFuncParams||{},s=t.getFieldValue(i);return n="function"==typeof n?n(e,s,i):n,o.filters[t.definition.headerFilterFunc](e,s,i,n)}):console.warn("Header Filter Error - Matching filter function not found: ",t.definition.headerFilterFunc);break;case"function":a=n=function(o){var i=t.definition.headerFilterFuncParams||{},n=t.getFieldValue(o);return i="function"==typeof i?i(e,n,o):i,t.definition.headerFilterFunc(e,n,o,i)}}if(!n)switch(s){case"partial":n=function(o){var i=t.getFieldValue(o);return null!=i&&String(i).toLowerCase().indexOf(String(e).toLowerCase())>-1},a="like";break;default:n=function(o){return t.getFieldValue(o)==e},a="="}o.headerFilters[i]={value:e,func:n,type:a,params:{}}}r=JSON.stringify(o.headerFilters),o.prevHeaderFilterChangeCheck!==r&&(o.prevHeaderFilterChangeCheck=r,o.changed=!0,o.table.rowManager.filterRefresh())}return!0},attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(t)},Filter.prototype.generateHeaderFilterElement=function(t,e,o){var i,n,s,a,r,l,u,c=this,d=this,h=t.modules.filter.success,p=t.getField();if(t.modules.filter.headerElement&&t.modules.filter.headerElement.parentNode&&t.contentElement.removeChild(t.modules.filter.headerElement.parentNode),p){switch(t.modules.filter.emptyFunc=t.definition.headerFilterEmptyCheck||function(t){return!t&&"0"!==t&&0!==t},(i=document.createElement("div")).classList.add("tabulator-header-filter"),_typeof(t.definition.headerFilter)){case"string":d.table.modules.edit.editors[t.definition.headerFilter]?(n=d.table.modules.edit.editors[t.definition.headerFilter],"tick"!==t.definition.headerFilter&&"tickCross"!==t.definition.headerFilter||t.definition.headerFilterEmptyCheck||(t.modules.filter.emptyFunc=function(t){return!0!==t&&!1!==t})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",t.definition.editor);break;case"function":n=t.definition.headerFilter;break;case"boolean":t.modules.edit&&t.modules.edit.editor?n=t.modules.edit.editor:t.definition.formatter&&d.table.modules.edit.editors[t.definition.formatter]?(n=d.table.modules.edit.editors[t.definition.formatter],"tick"!==t.definition.formatter&&"tickCross"!==t.definition.formatter||t.definition.headerFilterEmptyCheck||(t.modules.filter.emptyFunc=function(t){return!0!==t&&!1!==t})):n=d.table.modules.edit.editors.input}if(n){if(a={getValue:function(){return void 0!==e?e:""},getField:function(){return t.definition.field},getElement:function(){return i},getColumn:function(){return t.getComponent()},getRow:function(){return{normalizeHeight:function(){}}}},u="function"==typeof(u=t.definition.headerFilterParams||{})?u.call(d.table):u,!(s=n.call(this.table.modules.edit,a,(function(){}),h,(function(){}),u)))return void console.warn("Filter Error - Cannot add filter to "+p+" column, editor returned a value of false");if(!(s instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+p+" column, editor should return an instance of Node, the editor returned:",s);p?d.table.modules.localize.bind("headerFilters|columns|"+t.definition.field,(function(t){s.setAttribute("placeholder",void 0!==t&&t?t:d.table.modules.localize.getText("headerFilters|default"))})):d.table.modules.localize.bind("headerFilters|default",(function(t){s.setAttribute("placeholder",void 0!==d.column.definition.headerFilterPlaceholder&&d.column.definition.headerFilterPlaceholder?d.column.definition.headerFilterPlaceholder:t)})),s.addEventListener("click",(function(t){t.stopPropagation(),s.focus()})),s.addEventListener("focus",(function(t){var e=c.table.columnManager.element.scrollLeft;e!==c.table.rowManager.element.scrollLeft&&(c.table.rowManager.scrollHorizontal(e),c.table.columnManager.scrollHorizontal(e))})),r=!1,l=function(t){r&&clearTimeout(r),r=setTimeout((function(){h(s.value)}),d.table.options.headerFilterLiveFilterDelay)},t.modules.filter.headerElement=s,t.modules.filter.attrType=s.hasAttribute("type")?s.getAttribute("type").toLowerCase():"",t.modules.filter.tagType=s.tagName.toLowerCase(),!1!==t.definition.headerFilterLiveFilter&&("autocomplete"!==t.definition.headerFilter&&"tickCross"!==t.definition.headerFilter&&("autocomplete"!==t.definition.editor&&"tickCross"!==t.definition.editor||!0!==t.definition.headerFilter)&&(s.addEventListener("keyup",l),s.addEventListener("search",l),"number"==t.modules.filter.attrType&&s.addEventListener("change",(function(t){h(s.value)})),"text"==t.modules.filter.attrType&&"ie"!==this.table.browser&&s.setAttribute("type","search")),"input"!=t.modules.filter.tagType&&"select"!=t.modules.filter.tagType&&"textarea"!=t.modules.filter.tagType||s.addEventListener("mousedown",(function(t){t.stopPropagation()}))),i.appendChild(s),t.contentElement.appendChild(i),o||d.headerFilterColumns.push(t)}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",t.definition.title)},Filter.prototype.hideHeaderFilterElements=function(){this.headerFilterColumns.forEach((function(t){t.modules.filter&&t.modules.filter.headerElement&&(t.modules.filter.headerElement.style.display="none")}))},Filter.prototype.showHeaderFilterElements=function(){this.headerFilterColumns.forEach((function(t){t.modules.filter&&t.modules.filter.headerElement&&(t.modules.filter.headerElement.style.display="")}))},Filter.prototype.setHeaderFilterFocus=function(t){t.modules.filter&&t.modules.filter.headerElement?t.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",t.getField())},Filter.prototype.getHeaderFilterValue=function(t){if(t.modules.filter&&t.modules.filter.headerElement)return t.modules.filter.headerElement.value;console.warn("Column Filter Error - No header filter set on column:",t.getField())},Filter.prototype.setHeaderFilterValue=function(t,e){t&&(t.modules.filter&&t.modules.filter.headerElement?(this.generateHeaderFilterElement(t,e,!0),t.modules.filter.success(e)):console.warn("Column Filter Error - No header filter set on column:",t.getField()))},Filter.prototype.reloadHeaderFilter=function(t){t&&(t.modules.filter&&t.modules.filter.headerElement?this.generateHeaderFilterElement(t,t.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",t.getField()))},Filter.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},Filter.prototype.setFilter=function(t,e,o,i){this.filterList=[],Array.isArray(t)||(t=[{field:t,type:e,value:o,params:i}]),this.addFilter(t)},Filter.prototype.addFilter=function(t,e,o,i){var n=this;Array.isArray(t)||(t=[{field:t,type:e,value:o,params:i}]),t.forEach((function(t){(t=n.findFilter(t))&&(n.filterList.push(t),n.changed=!0)})),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.findFilter=function(t){var e,o=this;if(Array.isArray(t))return this.findSubFilters(t);var i=!1;return"function"==typeof t.field?i=function(e){return t.field(e,t.type||{})}:o.filters[t.type]?i=(e=o.table.columnManager.getColumnByField(t.field))?function(i){return o.filters[t.type](t.value,e.getFieldValue(i),i,t.params||{})}:function(e){return o.filters[t.type](t.value,e[t.field],e,t.params||{})}:console.warn("Filter Error - No such filter type found, ignoring: ",t.type),t.func=i,!!t.func&&t},Filter.prototype.findSubFilters=function(t){var e=this,o=[];return t.forEach((function(t){(t=e.findFilter(t))&&o.push(t)})),!!o.length&&o},Filter.prototype.getFilters=function(t,e){var o=[];return t&&(o=this.getHeaderFilters()),e&&o.forEach((function(t){"function"==typeof t.type&&(t.type="function")})),o=o.concat(this.filtersToArray(this.filterList,e))},Filter.prototype.filtersToArray=function(t,e){var o=this,i=[];return t.forEach((function(t){var n;Array.isArray(t)?i.push(o.filtersToArray(t,e)):(n={field:t.field,type:t.type,value:t.value},e&&"function"==typeof n.type&&(n.type="function"),i.push(n))})),i},Filter.prototype.getHeaderFilters=function(){var t=[];for(var e in this.headerFilters)t.push({field:e,type:this.headerFilters[e].type,value:this.headerFilters[e].value});return t},Filter.prototype.removeFilter=function(t,e,o){var i=this;Array.isArray(t)||(t=[{field:t,type:e,value:o}]),t.forEach((function(t){var e=-1;(e="object"==_typeof(t.field)?i.filterList.findIndex((function(e){return t===e})):i.filterList.findIndex((function(e){return t.field===e.field&&t.type===e.type&&t.value===e.value})))>-1?(i.filterList.splice(e,1),i.changed=!0):console.warn("Filter Error - No matching filter type found, ignoring: ",t.type)})),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.clearFilter=function(t){this.filterList=[],t&&this.clearHeaderFilter(),this.changed=!0,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.clearHeaderFilter=function(){var t=this;this.headerFilters={},t.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach((function(e){void 0!==e.modules.filter.value&&delete e.modules.filter.value,e.modules.filter.prevSuccess=void 0,t.reloadHeaderFilter(e)})),this.changed=!0},Filter.prototype.search=function(t,e,o,i){var n=this,s=[],a=[];return Array.isArray(e)||(e=[{field:e,type:o,value:i}]),e.forEach((function(t){(t=n.findFilter(t))&&a.push(t)})),this.table.rowManager.rows.forEach((function(e){var o=!0;a.forEach((function(t){n.filterRecurse(t,e.getData())||(o=!1)})),o&&s.push("data"===t?e.getData("data"):e.getComponent())})),s},Filter.prototype.filter=function(t,e){var o=this,i=[],n=[];return o.table.options.dataFiltering&&o.table.options.dataFiltering.call(o.table,o.getFilters()),o.table.options.ajaxFiltering||!o.filterList.length&&!Object.keys(o.headerFilters).length?i=t.slice(0):t.forEach((function(t){o.filterRow(t)&&i.push(t)})),o.table.options.dataFiltered&&(i.forEach((function(t){n.push(t.getComponent())})),o.table.options.dataFiltered.call(o.table,o.getFilters(),n)),i},Filter.prototype.filterRow=function(t,e){var o=this,i=!0,n=t.getData();for(var s in o.filterList.forEach((function(t){o.filterRecurse(t,n)||(i=!1)})),o.headerFilters)o.headerFilters[s].func(n)||(i=!1);return i},Filter.prototype.filterRecurse=function(t,e){var o=this,i=!1;return Array.isArray(t)?t.forEach((function(t){o.filterRecurse(t,e)&&(i=!0)})):i=t.func(e),i},Filter.prototype.filters={"=":function(t,e,o,i){return e==t},"<":function(t,e,o,i){return e<t},"<=":function(t,e,o,i){return e<=t},">":function(t,e,o,i){return e>t},">=":function(t,e,o,i){return e>=t},"!=":function(t,e,o,i){return e!=t},regex:function(t,e,o,i){return"string"==typeof t&&(t=new RegExp(t)),t.test(e)},like:function(t,e,o,i){return null==t?e===t:null!=e&&String(e).toLowerCase().indexOf(t.toLowerCase())>-1},keywords:function(t,e,o,i){var n=t.toLowerCase().split(void 0===i.separator?" ":i.separator),s=String(null==e?"":e).toLowerCase(),a=[];return n.forEach((function(t){s.includes(t)&&a.push(!0)})),i.matchAll?a.length===n.length:!!a.length},starts:function(t,e,o,i){return null==t?e===t:null!=e&&String(e).toLowerCase().startsWith(t.toLowerCase())},ends:function(t,e,o,i){return null==t?e===t:null!=e&&String(e).toLowerCase().endsWith(t.toLowerCase())},in:function(t,e,o,i){return Array.isArray(t)?!t.length||t.indexOf(e)>-1:(console.warn("Filter Error - filter value is not an array:",t),!1)}},Tabulator.prototype.registerModule("filter",Filter);var Format=function(t){this.table=t};Format.prototype.initializeColumn=function(t){t.modules.format=this.lookupFormatter(t,""),void 0!==t.definition.formatterPrint&&(t.modules.format.print=this.lookupFormatter(t,"Print")),void 0!==t.definition.formatterClipboard&&(t.modules.format.clipboard=this.lookupFormatter(t,"Clipboard")),void 0!==t.definition.formatterHtmlOutput&&(t.modules.format.htmlOutput=this.lookupFormatter(t,"HtmlOutput"))},Format.prototype.lookupFormatter=function(t,e){var o={params:t.definition["formatter"+e+"Params"]||{}},i=t.definition["formatter"+e];switch(void 0===i?"undefined":_typeof(i)){case"string":"tick"===i&&(i="tickCross",void 0===o.params.crossElement&&(o.params.crossElement=!1),console.warn("DEPRECATION WARNING - the tick formatter has been deprecated, please use the tickCross formatter with the crossElement param set to false")),this.formatters[i]?o.formatter=this.formatters[i]:(console.warn("Formatter Error - No such formatter found: ",i),o.formatter=this.formatters.plaintext);break;case"function":o.formatter=i;break;default:o.formatter=this.formatters.plaintext}return o},Format.prototype.cellRendered=function(t){t.modules.format&&t.modules.format.renderedCallback&&!t.modules.format.rendered&&(t.modules.format.renderedCallback(),t.modules.format.rendered=!0)},Format.prototype.formatValue=function(t){var e=t.getComponent(),o="function"==typeof t.column.modules.format.params?t.column.modules.format.params(e):t.column.modules.format.params;return t.column.modules.format.formatter.call(this,e,o,(function(e){t.modules.format||(t.modules.format={}),t.modules.format.renderedCallback=e,t.modules.format.rendered=!1}))},Format.prototype.formatExportValue=function(t,e){var o,i=t.column.modules.format[e];if(i){return o="function"==typeof i.params?i.params(component):i.params,i.formatter.call(this,t.getComponent(),o,(function(e){t.modules.format||(t.modules.format={}),t.modules.format.renderedCallback=e,t.modules.format.rendered=!1}))}return this.formatValue(t)},Format.prototype.sanitizeHTML=function(t){if(t){var e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(t).replace(/[&<>"'`=\/]/g,(function(t){return e[t]}))}return t},Format.prototype.emptyToSpace=function(t){return null==t||""===t?" ":t},Format.prototype.getFormatter=function(t){switch(void 0===t?"undefined":_typeof(t)){case"string":this.formatters[t]?t=this.formatters[t]:(console.warn("Formatter Error - No such formatter found: ",t),t=this.formatters.plaintext);break;case"function":t=t;break;default:t=this.formatters.plaintext}return t},Format.prototype.formatters={plaintext:function(t,e,o){return this.emptyToSpace(this.sanitizeHTML(t.getValue()))},html:function(t,e,o){return t.getValue()},textarea:function(t,e,o){return t.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(t.getValue()))},money:function(t,e,o){var i,n,s,a,r=parseFloat(t.getValue()),l=e.decimal||".",u=e.thousand||",",c=e.symbol||"",d=!!e.symbolAfter,h=void 0!==e.precision?e.precision:2;if(isNaN(r))return this.emptyToSpace(this.sanitizeHTML(t.getValue()));for(i=!1!==h?r.toFixed(h):r,n=(i=String(i).split("."))[0],s=i.length>1?l+i[1]:"",a=/(\d+)(\d{3})/;a.test(n);)n=n.replace(a,"$1"+u+"$2");return d?n+s+c:c+n+s},link:function(t,e,o){var i=t.getValue(),n=e.urlPrefix||"",s=e.download,a=i,r=document.createElement("a");if(e.labelField&&(a=t.getData()[e.labelField]),e.label)switch(_typeof(e.label)){case"string":a=e.label;break;case"function":a=e.label(t)}if(a){if(e.urlField&&(i=t.getData()[e.urlField]),e.url)switch(_typeof(e.url)){case"string":i=e.url;break;case"function":i=e.url(t)}return r.setAttribute("href",n+i),e.target&&r.setAttribute("target",e.target),e.download&&(s="function"==typeof s?s(t):!0===s?"":s,r.setAttribute("download",s)),r.innerHTML=this.emptyToSpace(this.sanitizeHTML(a)),r}return" "},image:function(t,e,o){var i=document.createElement("img"),n=t.getValue();switch(e.urlPrefix&&(n=e.urlPrefix+t.getValue()),e.urlSuffix&&(n+=e.urlSuffix),i.setAttribute("src",n),_typeof(e.height)){case"number":i.style.height=e.height+"px";break;case"string":i.style.height=e.height}switch(_typeof(e.width)){case"number":i.style.width=e.width+"px";break;case"string":i.style.width=e.width}return i.addEventListener("load",(function(){t.getRow().normalizeHeight()})),i},tickCross:function(t,e,o){var i=t.getValue(),n=t.getElement(),s=e.allowEmpty,a=e.allowTruthy,r=void 0!==e.tickElement?e.tickElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>',l=void 0!==e.crossElement?e.crossElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>';return a&&i||!0===i||"true"===i||"True"===i||1===i||"1"===i?(n.setAttribute("aria-checked",!0),r||""):!s||"null"!==i&&""!==i&&null!=i?(n.setAttribute("aria-checked",!1),l||""):(n.setAttribute("aria-checked","mixed"),"")},datetime:function(t,e,o){var i=e.inputFormat||"YYYY-MM-DD hh:mm:ss",n=e.outputFormat||"DD/MM/YYYY hh:mm:ss",s=void 0!==e.invalidPlaceholder?e.invalidPlaceholder:"",a=t.getValue(),r=moment(a,i);return r.isValid()?e.timezone?r.tz(e.timezone).format(n):r.format(n):!0===s?a:"function"==typeof s?s(a):s},datetimediff:function(t,e,o){var i=e.inputFormat||"YYYY-MM-DD hh:mm:ss",n=void 0!==e.invalidPlaceholder?e.invalidPlaceholder:"",s=void 0!==e.suffix&&e.suffix,a=void 0!==e.unit?e.unit:void 0,r=void 0!==e.humanize&&e.humanize,l=void 0!==e.date?e.date:moment(),u=t.getValue(),c=moment(u,i);return c.isValid()?r?moment.duration(c.diff(l)).humanize(s):c.diff(l,a)+(s?" "+s:""):!0===n?u:"function"==typeof n?n(u):n},lookup:function(t,e,o){var i=t.getValue();return void 0===e[i]?(console.warn("Missing display value for "+i),i):e[i]},star:function(t,e,o){var i=t.getValue(),n=t.getElement(),s=e&&e.stars?e.stars:5,a=document.createElement("span"),r=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.verticalAlign="middle",r.setAttribute("width","14"),r.setAttribute("height","14"),r.setAttribute("viewBox","0 0 512 512"),r.setAttribute("xml:space","preserve"),r.style.padding="0 1px",i=i&&!isNaN(i)?parseInt(i):0,i=Math.max(0,Math.min(i,s));for(var l=1;l<=s;l++){var u=r.cloneNode(!0);u.innerHTML=l<=i?'<polygon fill="#FFEA00" stroke="#C1AB60" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>':'<polygon fill="#D2D2D2" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>',a.appendChild(u)}return n.style.whiteSpace="nowrap",n.style.overflow="hidden",n.style.textOverflow="ellipsis",n.setAttribute("aria-label",i),a},traffic:function(t,e,o){var i,n,s=this.sanitizeHTML(t.getValue())||0,a=document.createElement("span"),r=e&&e.max?e.max:100,l=e&&e.min?e.min:0,u=e&&void 0!==e.color?e.color:["red","orange","green"],c="#666666";if(!isNaN(s)&&void 0!==t.getValue()){switch(a.classList.add("tabulator-traffic-light"),n=parseFloat(s)<=r?parseFloat(s):r,n=parseFloat(n)>=l?parseFloat(n):l,i=(r-l)/100,n=Math.round((n-l)/i),void 0===u?"undefined":_typeof(u)){case"string":c=u;break;case"function":c=u(s);break;case"object":if(Array.isArray(u)){var d=100/u.length,h=Math.floor(n/d);h=Math.min(h,u.length-1),c=u[h=Math.max(h,0)];break}}return a.style.backgroundColor=c,a}},progress:function(t,e,o){var i,n,s,a,r,l=this.sanitizeHTML(t.getValue())||0,u=t.getElement(),c=e&&e.max?e.max:100,d=e&&e.min?e.min:0,h=e&&e.legendAlign?e.legendAlign:"center";switch(n=parseFloat(l)<=c?parseFloat(l):c,n=parseFloat(n)>=d?parseFloat(n):d,i=(c-d)/100,n=Math.round((n-d)/i),_typeof(e.color)){case"string":s=e.color;break;case"function":s=e.color(l);break;case"object":if(Array.isArray(e.color)){var p=100/e.color.length,m=Math.floor(n/p);m=Math.min(m,e.color.length-1),m=Math.max(m,0),s=e.color[m];break}default:s="#2DC214"}switch(_typeof(e.legend)){case"string":a=e.legend;break;case"function":a=e.legend(l);break;case"boolean":a=l;break;default:a=!1}switch(_typeof(e.legendColor)){case"string":r=e.legendColor;break;case"function":r=e.legendColor(l);break;case"object":if(Array.isArray(e.legendColor)){p=100/e.legendColor.length,m=Math.floor(n/p);m=Math.min(m,e.legendColor.length-1),m=Math.max(m,0),r=e.legendColor[m]}break;default:r="#000"}u.style.minWidth="30px",u.style.position="relative",u.setAttribute("aria-label",n);var f=document.createElement("div");if(f.style.display="inline-block",f.style.position="relative",f.style.width=n+"%",f.style.backgroundColor=s,f.style.height="100%",f.setAttribute("data-max",c),f.setAttribute("data-min",d),a){var g=document.createElement("div");g.style.position="absolute",g.style.top="4px",g.style.left=0,g.style.textAlign=h,g.style.width="100%",g.style.color=r,g.innerHTML=a}return o((function(){if(!(t instanceof CellComponent)){var e=document.createElement("div");e.style.position="absolute",e.style.top="4px",e.style.bottom="4px",e.style.left="4px",e.style.right="4px",u.appendChild(e),u=e}u.appendChild(f),a&&u.appendChild(g)})),""},color:function(t,e,o){return t.getElement().style.backgroundColor=this.sanitizeHTML(t.getValue()),""},buttonTick:function(t,e,o){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>'},buttonCross:function(t,e,o){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>'},rownum:function(t,e,o){return this.table.rowManager.activeRows.indexOf(t.getRow()._getSelf())+1},handle:function(t,e,o){return t.getElement().classList.add("tabulator-row-handle"),"<div class='tabulator-row-handle-box'><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div></div>"},responsiveCollapse:function(t,e,o){var i=document.createElement("div"),n=t.getRow()._row.modules.responsiveLayout;function s(t){var e=n.element;n.open=t,e&&(n.open?(i.classList.add("open"),e.style.display=""):(i.classList.remove("open"),e.style.display="none"))}return i.classList.add("tabulator-responsive-collapse-toggle"),i.innerHTML="<span class='tabulator-responsive-collapse-toggle-open'>+</span><span class='tabulator-responsive-collapse-toggle-close'>-</span>",t.getElement().classList.add("tabulator-row-handle"),i.addEventListener("click",(function(t){t.stopImmediatePropagation(),s(!n.open)})),s(n.open),i},rowSelection:function(t,e,o){var i=this,n=document.createElement("input");if(n.type="checkbox",this.table.modExists("selectRow",!0))if(n.addEventListener("click",(function(t){t.stopPropagation()})),"function"==typeof t.getRow){var s=t.getRow();s instanceof RowComponent?(n.addEventListener("change",(function(t){s.toggleSelect()})),n.checked=s.isSelected&&s.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(s,n)):n=""}else n.addEventListener("change",(function(t){i.table.modules.selectRow.selectedRows.length?i.table.deselectRow():i.table.selectRow(e.rowRange)})),this.table.modules.selectRow.registerHeaderSelectCheckbox(n);return n}},Tabulator.prototype.registerModule("format",Format);var FrozenColumns=function(t){this.table=t,this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightPadding=0,this.initializationMode="left",this.active=!1,this.scrollEndTimer=!1};FrozenColumns.prototype.reset=function(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightMargin=0,this.active=!1,this.table.columnManager.headersElement.style.marginLeft=0,this.table.columnManager.element.style.paddingRight=0},FrozenColumns.prototype.initializeColumn=function(t){var e={margin:0,edge:!1};t.isGroup||(this.frozenCheck(t)?(e.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(t):this.rightColumns.unshift(t),this.active=!0,t.modules.frozen=e):this.initializationMode="right")},FrozenColumns.prototype.frozenCheck=function(t){return t.parent.isGroup&&t.definition.frozen&&console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"),t.parent.isGroup?this.frozenCheck(t.parent):t.definition.frozen},FrozenColumns.prototype.scrollHorizontal=function(){var t,e=this;this.active&&(clearTimeout(this.scrollEndTimer),this.scrollEndTimer=setTimeout((function(){e.layout()}),100),t=this.table.rowManager.getVisibleRows(),this.calcMargins(),this.layoutColumnPosition(),this.layoutCalcRows(),t.forEach((function(t){"row"===t.type&&e.layoutRow(t)})),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},FrozenColumns.prototype.calcMargins=function(){this.leftMargin=this._calcSpace(this.leftColumns,this.leftColumns.length)+"px",this.table.columnManager.headersElement.style.marginLeft=this.leftMargin,this.rightMargin=this._calcSpace(this.rightColumns,this.rightColumns.length)+"px",this.table.columnManager.element.style.paddingRight=this.rightMargin,this.rightPadding=this.table.rowManager.element.clientWidth+this.table.columnManager.scrollLeft},FrozenColumns.prototype.layoutCalcRows=function(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow))},FrozenColumns.prototype.layoutColumnPosition=function(t){var e=this,o=[];this.leftColumns.forEach((function(i,n){if(i.modules.frozen.margin=e._calcSpace(e.leftColumns,n)+e.table.columnManager.scrollLeft+"px",n==e.leftColumns.length-1?i.modules.frozen.edge=!0:i.modules.frozen.edge=!1,i.parent.isGroup){var s=e.getColGroupParentElement(i);o.includes(s)||(e.layoutElement(s,i),o.push(s)),i.modules.frozen.edge&&s.classList.add("tabulator-frozen-"+i.modules.frozen.position)}else e.layoutElement(i.getElement(),i);t&&i.cells.forEach((function(t){e.layoutElement(t.getElement(!0),i)}))})),this.rightColumns.forEach((function(o,i){o.modules.frozen.margin=e.rightPadding-e._calcSpace(e.rightColumns,i+1)+"px",i==e.rightColumns.length-1?o.modules.frozen.edge=!0:o.modules.frozen.edge=!1,o.parent.isGroup?e.layoutElement(e.getColGroupParentElement(o),o):e.layoutElement(o.getElement(),o),t&&o.cells.forEach((function(t){e.layoutElement(t.getElement(!0),o)}))}))},FrozenColumns.prototype.getColGroupParentElement=function(t){return t.parent.isGroup?this.getColGroupParentElement(t.parent):t.getElement()},FrozenColumns.prototype.layout=function(){var t=this;t.active&&(this.calcMargins(),t.table.rowManager.getDisplayRows().forEach((function(e){"row"===e.type&&t.layoutRow(e)})),this.layoutCalcRows(),this.layoutColumnPosition(!0),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},FrozenColumns.prototype.layoutRow=function(t){var e=this;t.getElement().style.paddingLeft=this.leftMargin,this.leftColumns.forEach((function(o){var i=t.getCell(o);i&&e.layoutElement(i.getElement(!0),o)})),this.rightColumns.forEach((function(o){var i=t.getCell(o);i&&e.layoutElement(i.getElement(!0),o)}))},FrozenColumns.prototype.layoutElement=function(t,e){e.modules.frozen&&(t.style.position="absolute",t.style.left=e.modules.frozen.margin,t.classList.add("tabulator-frozen"),e.modules.frozen.edge&&t.classList.add("tabulator-frozen-"+e.modules.frozen.position))},FrozenColumns.prototype._calcSpace=function(t,e){for(var o=0,i=0;i<e;i++)t[i].visible&&(o+=t[i].getWidth());return o},Tabulator.prototype.registerModule("frozenColumns",FrozenColumns);var FrozenRows=function(t){this.table=t,this.topElement=document.createElement("div"),this.rows=[],this.displayIndex=0};FrozenRows.prototype.initialize=function(){this.rows=[],this.topElement.classList.add("tabulator-frozen-rows-holder"),this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling)},FrozenRows.prototype.setDisplayIndex=function(t){this.displayIndex=t},FrozenRows.prototype.getDisplayIndex=function(){return this.displayIndex},FrozenRows.prototype.isFrozen=function(){return!!this.rows.length},FrozenRows.prototype.getRows=function(t){var e=t.slice(0);return this.rows.forEach((function(t){var o=e.indexOf(t);o>-1&&e.splice(o,1)})),e},FrozenRows.prototype.freezeRow=function(t){t.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(t.modules.frozen=!0,this.topElement.appendChild(t.getElement()),t.initialize(),t.normalizeHeight(),this.table.rowManager.adjustTableSize(),this.rows.push(t),this.table.rowManager.refreshActiveData("display"),this.styleRows())},FrozenRows.prototype.unfreezeRow=function(t){this.rows.indexOf(t);t.modules.frozen?(t.modules.frozen=!1,this.detachRow(t),this.table.rowManager.adjustTableSize(),this.table.rowManager.refreshActiveData("display"),this.rows.length&&this.styleRows()):console.warn("Freeze Error - Row is already unfrozen")},FrozenRows.prototype.detachRow=function(t){var e=this.rows.indexOf(t);if(e>-1){var o=t.getElement();o.parentNode.removeChild(o),this.rows.splice(e,1)}},FrozenRows.prototype.styleRows=function(t){var e=this;this.rows.forEach((function(t,o){e.table.rowManager.styleRow(t,o)}))},Tabulator.prototype.registerModule("frozenRows",FrozenRows);var GroupComponent=function(t){this._group=t,this.type="GroupComponent"};GroupComponent.prototype.getKey=function(){return this._group.key},GroupComponent.prototype.getField=function(){return this._group.field},GroupComponent.prototype.getElement=function(){return this._group.element},GroupComponent.prototype.getRows=function(){return this._group.getRows(!0)},GroupComponent.prototype.getSubGroups=function(){return this._group.getSubGroups(!0)},GroupComponent.prototype.getParentGroup=function(){return!!this._group.parent&&this._group.parent.getComponent()},GroupComponent.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._group.visible},GroupComponent.prototype.isVisible=function(){return this._group.visible},GroupComponent.prototype.show=function(){this._group.show()},GroupComponent.prototype.hide=function(){this._group.hide()},GroupComponent.prototype.toggle=function(){this._group.toggleVisibility()},GroupComponent.prototype._getSelf=function(){return this._group},GroupComponent.prototype.getTable=function(){return this._group.groupManager.table};var Group=function(t,e,o,i,n,s,a){this.groupManager=t,this.parent=e,this.key=i,this.level=o,this.field=n,this.hasSubGroups=o<t.groupIDLookups.length-1,this.addRow=this.hasSubGroups?this._addRowToGroup:this._addRow,this.type="group",this.old=a,this.rows=[],this.groups=[],this.groupList=[],this.generator=s,this.elementContents=!1,this.height=0,this.outerHeight=0,this.initialized=!1,this.calcs={},this.initialized=!1,this.modules={},this.arrowElement=!1,this.visible=a?a.visible:void 0!==t.startOpen[o]?t.startOpen[o]:t.startOpen[0],this.component=null,this.createElements(),this.addBindings(),this.createValueGroups()};Group.prototype.wipe=function(){this.groupList.length?this.groupList.forEach((function(t){t.wipe()})):(this.element=!1,this.arrowElement=!1,this.elementContents=!1)},Group.prototype.createElements=function(){var t=document.createElement("div");t.classList.add("tabulator-arrow"),this.element=document.createElement("div"),this.element.classList.add("tabulator-row"),this.element.classList.add("tabulator-group"),this.element.classList.add("tabulator-group-level-"+this.level),this.element.setAttribute("role","rowgroup"),this.arrowElement=document.createElement("div"),this.arrowElement.classList.add("tabulator-group-toggle"),this.arrowElement.appendChild(t),!1!==this.groupManager.table.options.movableRows&&this.groupManager.table.modExists("moveRow")&&this.groupManager.table.modules.moveRow.initializeGroupHeader(this)},Group.prototype.createValueGroups=function(){var t=this,e=this.level+1;this.groupManager.allowedValues&&this.groupManager.allowedValues[e]&&this.groupManager.allowedValues[e].forEach((function(o){t._createGroup(o,e)}))},Group.prototype.addBindings=function(){var t,e,o,i=this;i.groupManager.table.options.groupClick&&i.element.addEventListener("click",(function(t){i.groupManager.table.options.groupClick.call(i.groupManager.table,t,i.getComponent())})),i.groupManager.table.options.groupDblClick&&i.element.addEventListener("dblclick",(function(t){i.groupManager.table.options.groupDblClick.call(i.groupManager.table,t,i.getComponent())})),i.groupManager.table.options.groupContext&&i.element.addEventListener("contextmenu",(function(t){i.groupManager.table.options.groupContext.call(i.groupManager.table,t,i.getComponent())})),(i.groupManager.table.options.groupContextMenu||i.groupManager.table.options.groupClickMenu)&&i.groupManager.table.modExists("menu")&&i.groupManager.table.modules.menu.initializeGroup.call(i.groupManager.table.modules.menu,i),i.groupManager.table.options.groupTap&&(o=!1,i.element.addEventListener("touchstart",(function(t){o=!0}),{passive:!0}),i.element.addEventListener("touchend",(function(t){o&&i.groupManager.table.options.groupTap(t,i.getComponent()),o=!1}))),i.groupManager.table.options.groupDblTap&&(t=null,i.element.addEventListener("touchend",(function(e){t?(clearTimeout(t),t=null,i.groupManager.table.options.groupDblTap(e,i.getComponent())):t=setTimeout((function(){clearTimeout(t),t=null}),300)}))),i.groupManager.table.options.groupTapHold&&(e=null,i.element.addEventListener("touchstart",(function(t){clearTimeout(e),e=setTimeout((function(){clearTimeout(e),e=null,o=!1,i.groupManager.table.options.groupTapHold(t,i.getComponent())}),1e3)}),{passive:!0}),i.element.addEventListener("touchend",(function(t){clearTimeout(e),e=null}))),i.groupManager.table.options.groupToggleElement&&("arrow"==i.groupManager.table.options.groupToggleElement?i.arrowElement:i.element).addEventListener("click",(function(t){t.stopPropagation(),t.stopImmediatePropagation(),i.toggleVisibility()}))},Group.prototype._createGroup=function(t,e){var o=e+"_"+t,i=new Group(this.groupManager,this,e,t,this.groupManager.groupIDLookups[e].field,this.groupManager.headerGenerator[e]||this.groupManager.headerGenerator[0],!!this.old&&this.old.groups[o]);this.groups[o]=i,this.groupList.push(i)},Group.prototype._addRowToGroup=function(t){var e=this.level+1;if(this.hasSubGroups){var o=this.groupManager.groupIDLookups[e].func(t.getData()),i=e+"_"+o;this.groupManager.allowedValues&&this.groupManager.allowedValues[e]?this.groups[i]&&this.groups[i].addRow(t):(this.groups[i]||this._createGroup(o,e),this.groups[i].addRow(t))}},Group.prototype._addRow=function(t){this.rows.push(t),t.modules.group=this},Group.prototype.insertRow=function(t,e,o){var i=this.conformRowData({});t.updateData(i);var n=this.rows.indexOf(e);n>-1?o?this.rows.splice(n+1,0,t):this.rows.splice(n,0,t):o?this.rows.push(t):this.rows.unshift(t),t.modules.group=this,this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)},Group.prototype.scrollHeader=function(t){this.arrowElement.style.marginLeft=t,this.groupList.forEach((function(e){e.scrollHeader(t)}))},Group.prototype.getRowIndex=function(t){},Group.prototype.conformRowData=function(t){return this.field?t[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(t=this.parent.conformRowData(t)),t},Group.prototype.removeRow=function(t){var e=this.rows.indexOf(t),o=t.getElement();e>-1&&this.rows.splice(e,1),this.groupManager.table.options.groupValues||this.rows.length?(o.parentNode&&o.parentNode.removeChild(o),this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)):(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0))},Group.prototype.removeGroup=function(t){var e,o=t.level+"_"+t.key;this.groups[o]&&(delete this.groups[o],(e=this.groupList.indexOf(t))>-1&&this.groupList.splice(e,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))},Group.prototype.getHeadersAndRows=function(t){var e=[];return e.push(this),this._visSet(),this.visible?this.groupList.length?this.groupList.forEach((function(o){e=e.concat(o.getHeadersAndRows(t))})):(!t&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),e=e.concat(this.rows),!t&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))):this.groupList.length||"table"==this.groupManager.table.options.columnCalcs||this.groupManager.table.modExists("columnCalcs")&&(!t&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top))),!t&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom)))),e},Group.prototype.getData=function(t,e){var o=[];return this._visSet(),(!t||t&&this.visible)&&this.rows.forEach((function(t){o.push(t.getData(e||"data"))})),o},Group.prototype.getRowCount=function(){var t=0;return this.groupList.length?this.groupList.forEach((function(e){t+=e.getRowCount()})):t=this.rows.length,t},Group.prototype.toggleVisibility=function(){this.visible?this.hide():this.show()},Group.prototype.hide=function(){this.visible=!1,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination?this.groupManager.updateGroupRows(!0):(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach((function(t){t.getHeadersAndRows().forEach((function(t){t.detachElement()}))})):this.rows.forEach((function(t){var e=t.getElement();e.parentNode.removeChild(e)})),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()),this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!1)},Group.prototype.show=function(){if(this.visible=!0,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination)this.groupManager.updateGroupRows(!0);else{this.element.classList.add("tabulator-group-visible");var t=this.getElement();this.groupList.length?this.groupList.forEach((function(e){e.getHeadersAndRows().forEach((function(e){var o=e.getElement();t.parentNode.insertBefore(o,t.nextSibling),e.initialize(),t=o}))})):this.rows.forEach((function(e){var o=e.getElement();t.parentNode.insertBefore(o,t.nextSibling),e.initialize(),t=o})),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()}this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!0)},Group.prototype._visSet=function(){var t=[];"function"==typeof this.visible&&(this.rows.forEach((function(e){t.push(e.getData())})),this.visible=this.visible(this.key,this.getRowCount(),t,this.getComponent()))},Group.prototype.getRowGroup=function(t){var e=!1;return this.groupList.length?this.groupList.forEach((function(o){var i=o.getRowGroup(t);i&&(e=i)})):this.rows.find((function(e){return e===t}))&&(e=this),e},Group.prototype.getSubGroups=function(t){var e=[];return this.groupList.forEach((function(o){e.push(t?o.getComponent():o)})),e},Group.prototype.getRows=function(t){var e=[];return this.rows.forEach((function(o){e.push(t?o.getComponent():o)})),e},Group.prototype.generateGroupHeaderContents=function(){var t=[];for(this.rows.forEach((function(e){t.push(e.getData())})),this.elementContents=this.generator(this.key,this.getRowCount(),t,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);"string"==typeof this.elementContents?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)},Group.prototype.getPath=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t.unshift(this.key),this.parent&&this.parent.getPath(t),t},Group.prototype.getElement=function(){this.addBindingsd=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var t=0;t<this.element.childNodes.length;++t)this.element.childNodes[t].parentNode.removeChild(this.element.childNodes[t]);return this.generateGroupHeaderContents(),this.element},Group.prototype.detachElement=function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},Group.prototype.normalizeHeight=function(){this.setHeight(this.element.clientHeight)},Group.prototype.initialize=function(t){this.initialized&&!t||(this.normalizeHeight(),this.initialized=!0)},Group.prototype.reinitialize=function(){this.initialized=!1,this.height=0,Tabulator.prototype.helpers.elVisible(this.element)&&this.initialize(!0)},Group.prototype.setHeight=function(t){this.height!=t&&(this.height=t,this.outerHeight=this.element.offsetHeight)},Group.prototype.getHeight=function(){return this.outerHeight},Group.prototype.getGroup=function(){return this},Group.prototype.reinitializeHeight=function(){},Group.prototype.calcHeight=function(){},Group.prototype.setCellHeight=function(){},Group.prototype.clearCellHeight=function(){},Group.prototype.getComponent=function(){return this.component||(this.component=new GroupComponent(this)),this.component};var GroupRows=function(t){this.table=t,this.groupIDLookups=!1,this.startOpen=[function(){return!1}],this.headerGenerator=[function(){return""}],this.groupList=[],this.allowedValues=!1,this.groups={},this.displayIndex=0};GroupRows.prototype.initialize=function(){var t=this,e=t.table.options.groupBy,o=t.table.options.groupStartOpen,i=t.table.options.groupHeader;(this.allowedValues=t.table.options.groupValues,Array.isArray(e)&&Array.isArray(i)&&e.length>i.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),t.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],t.table.modules.localize.bind("groups|item",(function(e,o){t.headerGenerator[0]=function(t,i,n){return(void 0===t?"":t)+"<span>("+i+" "+(1===i?e:o.groups.items)+")</span>"}})),this.groupIDLookups=[],Array.isArray(e)||e)?this.table.modExists("columnCalcs")&&"table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.removeCalcs():this.table.modExists("columnCalcs")&&"group"!=this.table.options.columnCalcs&&this.table.columnManager.getRealColumns().forEach((function(e){e.definition.topCalc&&t.table.modules.columnCalcs.initializeTopRow(),e.definition.bottomCalc&&t.table.modules.columnCalcs.initializeBottomRow()}));Array.isArray(e)||(e=[e]),e.forEach((function(e,o){var i,n;i="function"==typeof e?e:(n=t.table.columnManager.getColumnByField(e))?function(t){return n.getFieldValue(t)}:function(t){return t[e]},t.groupIDLookups.push({field:"function"!=typeof e&&e,func:i,values:!!t.allowedValues&&t.allowedValues[o]})})),o&&(Array.isArray(o)||(o=[o]),o.forEach((function(t){t="function"==typeof t?t:function(){return!0}})),t.startOpen=o),i&&(t.headerGenerator=Array.isArray(i)?i:[i]),this.initialized=!0},GroupRows.prototype.setDisplayIndex=function(t){this.displayIndex=t},GroupRows.prototype.getDisplayIndex=function(){return this.displayIndex},GroupRows.prototype.getRows=function(t){return this.groupIDLookups.length?(this.table.options.dataGrouping.call(this.table),this.generateGroups(t),this.table.options.dataGrouped&&this.table.options.dataGrouped.call(this.table,this.getGroups(!0)),this.updateGroupRows()):t.slice(0)},GroupRows.prototype.getGroups=function(t){var e=[];return this.groupList.forEach((function(o){e.push(t?o.getComponent():o)})),e},GroupRows.prototype.getChildGroups=function(t){var e=this,o=[];return t||(t=this),t.groupList.forEach((function(t){t.groupList.length?o=o.concat(e.getChildGroups(t)):o.push(t)})),o},GroupRows.prototype.wipe=function(){this.groupList.forEach((function(t){t.wipe()}))},GroupRows.prototype.pullGroupListData=function(t){var e=this,o=[];return t.forEach((function(t){var i={level:0,rowCount:0,headerContent:""},n=[];t.hasSubGroups?(n=e.pullGroupListData(t.groupList),i.level=t.level,i.rowCount=n.length-t.groupList.length,i.headerContent=t.generator(t.key,i.rowCount,t.rows,t),o.push(i),o=o.concat(n)):(i.level=t.level,i.headerContent=t.generator(t.key,t.rows.length,t.rows,t),i.rowCount=t.getRows().length,o.push(i),t.getRows().forEach((function(t){o.push(t.getData("data"))})))})),o},GroupRows.prototype.getGroupedData=function(){return this.pullGroupListData(this.groupList)},GroupRows.prototype.getRowGroup=function(t){var e=!1;return this.groupList.forEach((function(o){var i=o.getRowGroup(t);i&&(e=i)})),e},GroupRows.prototype.countGroups=function(){return this.groupList.length},GroupRows.prototype.generateGroups=function(t){var e=this,o=e.groups;e.groups={},e.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach((function(t){e.createGroup(t,0,o)})),t.forEach((function(t){e.assignRowToExistingGroup(t,o)}))):t.forEach((function(t){e.assignRowToGroup(t,o)}))},GroupRows.prototype.createGroup=function(t,e,o){var i,n=e+"_"+t;o=o||[],i=new Group(this,!1,e,t,this.groupIDLookups[0].field,this.headerGenerator[0],o[n]),this.groups[n]=i,this.groupList.push(i)},GroupRows.prototype.assignRowToExistingGroup=function(t,e){var o="0_"+this.groupIDLookups[0].func(t.getData());this.groups[o]&&this.groups[o].addRow(t)},GroupRows.prototype.assignRowToGroup=function(t,e){var o=this.groupIDLookups[0].func(t.getData()),i=!this.groups["0_"+o];return i&&this.createGroup(o,0,e),this.groups["0_"+o].addRow(t),!i},GroupRows.prototype.reassignRowToGroup=function(t){var e=t.getGroup(),o=e.getPath(),i=this.getExpectedPath(t);o.length==i.length&&o.every((function(t,e){return t===i[e]}))||(e.removeRow(t),this.assignRowToGroup(t,self.groups),this.table.rowManager.refreshActiveData("group",!1,!0))},GroupRows.prototype.getExpectedPath=function(t){var e=[],o=t.getData();return this.groupIDLookups.forEach((function(t){e.push(t.func(o))})),e},GroupRows.prototype.updateGroupRows=function(t){var e=[];if(this.groupList.forEach((function(t){e=e.concat(t.getHeadersAndRows())})),t){var o=this.table.rowManager.setDisplayRows(e,this.getDisplayIndex());!0!==o&&this.setDisplayIndex(o),this.table.rowManager.refreshActiveData("group",!0,!0)}return e},GroupRows.prototype.scrollHeaders=function(t){this.table.options.virtualDomHoz&&(t-=this.table.vdomHoz.vDomPadLeft),t+="px",this.groupList.forEach((function(e){e.scrollHeader(t)}))},GroupRows.prototype.removeGroup=function(t){var e,o=t.level+"_"+t.key;this.groups[o]&&(delete this.groups[o],(e=this.groupList.indexOf(t))>-1&&this.groupList.splice(e,1))},Tabulator.prototype.registerModule("groupRows",GroupRows);var History=function(t){this.table=t,this.history=[],this.index=-1};History.prototype.clear=function(){this.history=[],this.index=-1},History.prototype.action=function(t,e,o){this.history=this.history.slice(0,this.index+1),this.history.push({type:t,component:e,data:o}),this.index++},History.prototype.getHistoryUndoSize=function(){return this.index+1},History.prototype.getHistoryRedoSize=function(){return this.history.length-(this.index+1)},History.prototype.clearComponentHistory=function(t){var e=this.history.findIndex((function(e){return e.component===t}));e>-1&&(this.history.splice(e,1),e<=this.index&&this.index--,this.clearComponentHistory(t))},History.prototype.undo=function(){if(this.index>-1){var t=this.history[this.index];return this.undoers[t.type].call(this,t),this.index--,this.table.options.historyUndo.call(this.table,t.type,t.component.getComponent(),t.data),!0}return console.warn("History Undo Error - No more history to undo"),!1},History.prototype.redo=function(){if(this.history.length-1>this.index){this.index++;var t=this.history[this.index];return this.redoers[t.type].call(this,t),this.table.options.historyRedo.call(this.table,t.type,t.component.getComponent(),t.data),!0}return console.warn("History Redo Error - No more history to redo"),!1},History.prototype.undoers={cellEdit:function(t){t.component.setValueProcessData(t.data.oldValue)},rowAdd:function(t){t.component.deleteActual()},rowDelete:function(t){var e=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(t.component,e)},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.rows[t.data.posFrom],!t.data.after),this.table.rowManager.redraw()}},History.prototype.redoers={cellEdit:function(t){t.component.setValueProcessData(t.data.newValue)},rowAdd:function(t){var e=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(t.component,e)},rowDelete:function(t){t.component.deleteActual()},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.rows[t.data.posTo],t.data.after),this.table.rowManager.redraw()}},History.prototype._rebindRow=function(t,e){this.history.forEach((function(o){if(o.component instanceof Row)o.component===t&&(o.component=e);else if(o.component instanceof Cell&&o.component.row===t){var i=o.component.column.getField();i&&(o.component=e.getCell(i))}}))},Tabulator.prototype.registerModule("history",History);var HtmlTableImport=function(t){this.table=t,this.fieldIndex=[],this.hasIndex=!1};HtmlTableImport.prototype.parseTable=function(){var t=this.table.element,e=this.table.options,o=(e.columns,t.getElementsByTagName("th")),i=t.getElementsByTagName("tbody")[0],n=[];this.hasIndex=!1,this.table.options.htmlImporting.call(this.table),i=i?i.getElementsByTagName("tr"):[],this._extractOptions(t,e),o.length?this._extractHeaders(o,i):this._generateBlankHeaders(o,i);for(var s=0;s<i.length;s++){var a=i[s].getElementsByTagName("td"),r={};this.hasIndex||(r[e.index]=s);for(var l=0;l<a.length;l++){var u=a[l];void 0!==this.fieldIndex[l]&&(r[this.fieldIndex[l]]=u.innerHTML)}n.push(r)}var c=document.createElement("div"),d=t.attributes;for(var l in d)"object"==_typeof(d[l])&&c.setAttribute(d[l].name,d[l].value);t.parentNode.replaceChild(c,t),e.data=n,this.table.options.htmlImported.call(this.table),this.table.element=c},HtmlTableImport.prototype._extractOptions=function(t,e,o){var i=t.attributes,n=o?Object.assign([],o):Object.keys(e),s={};for(var a in n.forEach((function(t){s[t.toLowerCase()]=t})),i){var r,l=i[a];l&&"object"==(void 0===l?"undefined":_typeof(l))&&l.name&&0===l.name.indexOf("tabulator-")&&(r=l.name.replace("tabulator-",""),void 0!==s[r]&&(e[s[r]]=this._attribValue(l.value)))}},HtmlTableImport.prototype._attribValue=function(t){return"true"===t||"false"!==t&&t},HtmlTableImport.prototype._findCol=function(t){return this.table.options.columns.find((function(e){return e.title===t}))||!1},HtmlTableImport.prototype._extractHeaders=function(t,e){for(var o=0;o<t.length;o++){var i,n=t[o],s=!1,a=this._findCol(n.textContent);a?s=!0:a={title:n.textContent.trim()},a.field||(a.field=n.textContent.trim().toLowerCase().replace(" ","_")),(i=n.getAttribute("width"))&&!a.width&&(a.width=i),n.attributes,this._extractOptions(n,a,Column.prototype.defaultOptionList),this.fieldIndex[o]=a.field,a.field==this.table.options.index&&(this.hasIndex=!0),s||this.table.options.columns.push(a)}},HtmlTableImport.prototype._generateBlankHeaders=function(t,e){for(var o=0;o<t.length;o++){var i=t[o],n={title:"",field:"col"+o};this.fieldIndex[o]=n.field;var s=i.getAttribute("width");s&&(n.width=s),this.table.options.columns.push(n)}},Tabulator.prototype.registerModule("htmlTableImport",HtmlTableImport);var Keybindings=function(t){this.table=t,this.watchKeys=null,this.pressedKeys=null,this.keyupBinding=!1,this.keydownBinding=!1};Keybindings.prototype.initialize=function(){var t=this.table.options.keybindings,e={};if(this.watchKeys={},this.pressedKeys=[],!1!==t){for(var o in this.bindings)e[o]=this.bindings[o];if(Object.keys(t).length)for(var i in t)e[i]=t[i];this.mapBindings(e),this.bindEvents()}},Keybindings.prototype.mapBindings=function(t){var e=this,o=this,i=function(i){e.actions[i]?t[i]&&("object"!==_typeof(t[i])&&(t[i]=[t[i]]),t[i].forEach((function(t){o.mapBinding(i,t)}))):console.warn("Key Binding Error - no such action:",i)};for(var n in t)i(n)},Keybindings.prototype.mapBinding=function(t,e){var o=this,i={action:this.actions[t],keys:[],ctrl:!1,shift:!1,meta:!1};e.toString().toLowerCase().split(" ").join("").split("+").forEach((function(t){switch(t){case"ctrl":i.ctrl=!0;break;case"shift":i.shift=!0;break;case"meta":i.meta=!0;break;default:t=parseInt(t),i.keys.push(t),o.watchKeys[t]||(o.watchKeys[t]=[]),o.watchKeys[t].push(i)}}))},Keybindings.prototype.bindEvents=function(){var t=this;this.keyupBinding=function(e){var o=e.keyCode,i=t.watchKeys[o];i&&(t.pressedKeys.push(o),i.forEach((function(o){t.checkBinding(e,o)})))},this.keydownBinding=function(e){var o=e.keyCode;if(t.watchKeys[o]){var i=t.pressedKeys.indexOf(o);i>-1&&t.pressedKeys.splice(i,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)},Keybindings.prototype.clearBindings=function(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)},Keybindings.prototype.checkBinding=function(t,e){var o=this,i=!0;return t.ctrlKey==e.ctrl&&t.shiftKey==e.shift&&t.metaKey==e.meta&&(e.keys.forEach((function(t){-1==o.pressedKeys.indexOf(t)&&(i=!1)})),i&&e.action.call(o,t),!0)},Keybindings.prototype.bindings={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:"ctrl + 90",redo:"ctrl + 89",copyToClipboard:"ctrl + 67"},Keybindings.prototype.actions={keyBlock:function(t){t.stopPropagation(),t.preventDefault()},scrollPageUp:function(t){var e=this.table.rowManager,o=e.scrollTop-e.height;e.element.scrollHeight;t.preventDefault(),e.displayRowsCount&&(o>=0?e.element.scrollTop=o:e.scrollToRow(e.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(t){var e=this.table.rowManager,o=e.scrollTop+e.height,i=e.element.scrollHeight;t.preventDefault(),e.displayRowsCount&&(o<=i?e.element.scrollTop=o:e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1]),this.table.element.focus()},navPrev:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().prev())},navNext:function(t){var e,o=!1,i=this.table.options.tabEndNewRow;this.table.modExists("edit")&&(o=this.table.modules.edit.currentCell)&&(t.preventDefault(),(e=o.nav()).next()||i&&(o.getElement().firstChild.blur(),(i=!0===i?this.table.addRow({}):"function"==typeof i?this.table.addRow(i(o.row.getComponent())):this.table.addRow(Object.assign({},i))).then((function(){setTimeout((function(){e.next()}))}))))},navLeft:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().left())},navRight:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().right())},navUp:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().up())},navDown:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().down())},undo:function(t){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(t.preventDefault(),this.table.modules.history.undo()))},redo:function(t){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(t.preventDefault(),this.table.modules.history.redo()))},copyToClipboard:function(t){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}},Tabulator.prototype.registerModule("keybindings",Keybindings);var Menu=function(t){this.table=t,this.menuElements=[],this.blurEvent=this.hideMenu.bind(this),this.escEvent=this.escMenu.bind(this),this.nestedMenuBlock=!1,this.positionReversedX=!1};Menu.prototype.initializeColumnHeader=function(t){var e,o=this;t.definition.headerContextMenu&&(t.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,t,t.definition.headerContextMenu)),this.tapHold(t,t.definition.headerContextMenu)),t.definition.headerMenu&&((e=document.createElement("span")).classList.add("tabulator-header-menu-button"),e.innerHTML="⋮",e.addEventListener("click",(function(e){e.stopPropagation(),e.preventDefault(),o.LoadMenuEvent(t,t.definition.headerMenu,e)})),t.titleElement.insertBefore(e,t.titleElement.firstChild))},Menu.prototype.LoadMenuEvent=function(t,e,o){e="function"==typeof e?e.call(this.table,t.getComponent(),o):e,this.loadMenu(o,t,e)},Menu.prototype.tapHold=function(t,e){var o=this,i=t.getElement(),n=null,s=!1;i.addEventListener("touchstart",(function(i){clearTimeout(n),s=!1,n=setTimeout((function(){clearTimeout(n),n=null,s=!0,o.LoadMenuEvent(t,e,i)}),1e3)}),{passive:!0}),i.addEventListener("touchend",(function(t){clearTimeout(n),n=null,s&&t.preventDefault()}))},Menu.prototype.initializeCell=function(t){t.column.definition.contextMenu&&(t.getElement(!0).addEventListener("contextmenu",this.LoadMenuEvent.bind(this,t,t.column.definition.contextMenu)),this.tapHold(t,t.column.definition.contextMenu)),t.column.definition.clickMenu&&t.getElement(!0).addEventListener("click",this.LoadMenuEvent.bind(this,t,t.column.definition.clickMenu))},Menu.prototype.initializeRow=function(t){this.table.options.rowContextMenu&&(t.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,t,this.table.options.rowContextMenu)),this.tapHold(t,this.table.options.rowContextMenu)),this.table.options.rowClickMenu&&t.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,t,this.table.options.rowClickMenu))},Menu.prototype.initializeGroup=function(t){this.table.options.groupContextMenu&&(t.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,t,this.table.options.groupContextMenu)),this.tapHold(t,this.table.options.groupContextMenu)),this.table.options.groupClickMenu&&t.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,t,this.table.options.groupClickMenu))},Menu.prototype.loadMenu=function(t,e,o,i){var n=this,s=!(t instanceof MouseEvent),a=document.createElement("div");if(a.classList.add("tabulator-menu"),s||t.preventDefault(),o&&o.length){if(!i){if(this.nestedMenuBlock){if(this.isOpen())return}else this.nestedMenuBlock=setTimeout((function(){n.nestedMenuBlock=!1}),100);this.hideMenu(),this.menuElements=[]}o.forEach((function(t){var o=document.createElement("div"),i=t.label,s=t.disabled;t.separator?o.classList.add("tabulator-menu-separator"):(o.classList.add("tabulator-menu-item"),"function"==typeof i&&(i=i.call(n.table,e.getComponent())),i instanceof Node?o.appendChild(i):o.innerHTML=i,"function"==typeof s&&(s=s.call(n.table,e.getComponent())),s?(o.classList.add("tabulator-menu-item-disabled"),o.addEventListener("click",(function(t){t.stopPropagation()}))):t.menu&&t.menu.length?o.addEventListener("click",(function(i){i.stopPropagation(),n.hideOldSubMenus(a),n.loadMenu(i,e,t.menu,o)})):t.action&&o.addEventListener("click",(function(o){t.action(o,e.getComponent())})),t.menu&&t.menu.length&&o.classList.add("tabulator-menu-item-submenu")),a.appendChild(o)})),a.addEventListener("click",(function(t){n.hideMenu()})),this.menuElements.push(a),this.positionMenu(a,i,s,t)}},Menu.prototype.hideOldSubMenus=function(t){var e=this.menuElements.indexOf(t);if(e>-1)for(var o=this.menuElements.length-1;o>e;o--){var i=this.menuElements[o];i.parentNode&&i.parentNode.removeChild(i),this.menuElements.pop()}},Menu.prototype.positionMenu=function(t,e,o,i){var n,s,a,r=this,l=Math.max(document.body.offsetHeight,window.innerHeight);e?(n=(a=Tabulator.prototype.helpers.elOffset(e)).left+e.offsetWidth,s=a.top-1):(n=o?i.touches[0].pageX:i.pageX,s=o?i.touches[0].pageY:i.pageY,this.positionReversedX=!1),t.style.top=s+"px",t.style.left=n+"px",setTimeout((function(){r.table.rowManager.element.addEventListener("scroll",r.blurEvent),document.body.addEventListener("click",r.blurEvent),document.body.addEventListener("contextmenu",r.blurEvent),window.addEventListener("resize",r.blurEvent),document.body.addEventListener("keydown",r.escEvent)}),100),document.body.appendChild(t),s+t.offsetHeight>=l&&(t.style.top="",t.style.bottom=e?l-a.top-e.offsetHeight-1+"px":l-s+"px"),(n+t.offsetWidth>=document.body.offsetWidth||this.positionReversedX)&&(t.style.left="",t.style.right=e?document.documentElement.offsetWidth-a.left+"px":document.documentElement.offsetWidth-n+"px",this.positionReversedX=!0)},Menu.prototype.isOpen=function(){return!!this.menuElements.length},Menu.prototype.escMenu=function(t){27==t.keyCode&&this.hideMenu()},Menu.prototype.hideMenu=function(){this.menuElements.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)})),document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent)},Menu.prototype.menus={},Tabulator.prototype.registerModule("menu",Menu);var MoveColumns=function(t){this.table=t,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.touchMove=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this)};MoveColumns.prototype.createPlaceholderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col"),t.classList.add("tabulator-col-placeholder"),t},MoveColumns.prototype.initializeColumn=function(t){var e,o=this,i={};t.modules.frozen||(e=t.getElement(),i.mousemove=function(i){t.parent===o.moving.parent&&((o.touchMove?i.touches[0].pageX:i.pageX)-Tabulator.prototype.helpers.elOffset(e).left+o.table.columnManager.element.scrollLeft>t.getWidth()/2?o.toCol===t&&o.toColAfter||(e.parentNode.insertBefore(o.placeholderElement,e.nextSibling),o.moveColumn(t,!0)):(o.toCol!==t||o.toColAfter)&&(e.parentNode.insertBefore(o.placeholderElement,e),o.moveColumn(t,!1)))}.bind(o),e.addEventListener("mousedown",(function(e){o.touchMove=!1,1===e.which&&(o.checkTimeout=setTimeout((function(){o.startMove(e,t)}),o.checkPeriod))})),e.addEventListener("mouseup",(function(t){1===t.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)})),o.bindTouchEvents(t)),t.modules.moveColumn=i},MoveColumns.prototype.bindTouchEvents=function(t){var e,o,i,n,s,a,r=this,l=t.getElement(),u=!1;l.addEventListener("touchstart",(function(l){r.checkTimeout=setTimeout((function(){r.touchMove=!0,t,e=t.nextColumn(),i=e?e.getWidth()/2:0,o=t.prevColumn(),n=o?o.getWidth()/2:0,s=0,a=0,u=!1,r.startMove(l,t)}),r.checkPeriod)}),{passive:!0}),l.addEventListener("touchmove",(function(l){var c,d;r.moving&&(r.moveHover(l),u||(u=l.touches[0].pageX),(c=l.touches[0].pageX-u)>0?e&&c-s>i&&(d=e)!==t&&(u=l.touches[0].pageX,d.getElement().parentNode.insertBefore(r.placeholderElement,d.getElement().nextSibling),r.moveColumn(d,!0)):o&&-c-a>n&&(d=o)!==t&&(u=l.touches[0].pageX,d.getElement().parentNode.insertBefore(r.placeholderElement,d.getElement()),r.moveColumn(d,!1)),d&&(d,e=d.nextColumn(),s=i,i=e?e.getWidth()/2:0,o=d.prevColumn(),a=n,n=o?o.getWidth()/2:0))}),{passive:!0}),l.addEventListener("touchend",(function(t){r.checkTimeout&&clearTimeout(r.checkTimeout),r.moving&&r.endMove(t)}))},MoveColumns.prototype.startMove=function(t,e){var o=e.getElement();this.moving=e,this.startX=(this.touchMove?t.touches[0].pageX:t.pageX)-Tabulator.prototype.helpers.elOffset(o).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=e.getWidth()+"px",this.placeholderElement.style.height=e.getHeight()+"px",o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.table.columnManager.getElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom="0",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(t)},MoveColumns.prototype._bindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach((function(t){t.modules.moveColumn.mousemove&&t.getElement().addEventListener("mousemove",t.modules.moveColumn.mousemove)}))},MoveColumns.prototype._unbindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach((function(t){t.modules.moveColumn.mousemove&&t.getElement().removeEventListener("mousemove",t.modules.moveColumn.mousemove)}))},MoveColumns.prototype.moveColumn=function(t,e){var o=this.moving.getCells();this.toCol=t,this.toColAfter=e,e?t.getCells().forEach((function(t,e){var i=t.getElement(!0);i.parentNode.insertBefore(o[e].getElement(),i.nextSibling)})):t.getCells().forEach((function(t,e){var i=t.getElement(!0);i.parentNode.insertBefore(o[e].getElement(),i)}))},MoveColumns.prototype.endMove=function(t){(1===t.which||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))},MoveColumns.prototype.moveHover=function(t){var e,o=this,i=o.table.columnManager.getElement(),n=i.scrollLeft,s=(o.touchMove?t.touches[0].pageX:t.pageX)-Tabulator.prototype.helpers.elOffset(i).left+n;o.hoverElement.style.left=s-o.startX+"px",s-n<o.autoScrollMargin&&(o.autoScrollTimeout||(o.autoScrollTimeout=setTimeout((function(){e=Math.max(0,n-5),o.table.rowManager.getElement().scrollLeft=e,o.autoScrollTimeout=!1}),1))),n+i.clientWidth-s<o.autoScrollMargin&&(o.autoScrollTimeout||(o.autoScrollTimeout=setTimeout((function(){e=Math.min(i.clientWidth,n+5),o.table.rowManager.getElement().scrollLeft=e,o.autoScrollTimeout=!1}),1)))},Tabulator.prototype.registerModule("moveColumn",MoveColumns);var MoveRows=function(t){this.table=t,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=150,this.moving=!1,this.toRow=!1,this.toRowAfter=!1,this.hasHandle=!1,this.startY=0,this.startX=0,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.tableRowDropEvent=!1,this.touchMove=!1,this.connection=!1,this.connectionSelectorsTables=!1,this.connectionSelectorsElements=!1,this.connectionElements=[],this.connections=[],this.connectedTable=!1,this.connectedRow=!1};MoveRows.prototype.createPlaceholderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-row"),t.classList.add("tabulator-row-placeholder"),t},MoveRows.prototype.initialize=function(t){this.connectionSelectorsTables=this.table.options.movableRowsConnectedTables,this.connectionSelectorsElements=this.table.options.movableRowsConnectedElements,this.connection=this.connectionSelectorsTables||this.connectionSelectorsElements},MoveRows.prototype.setHandle=function(t){this.hasHandle=t},MoveRows.prototype.initializeGroupHeader=function(t){var e=this,o={};o.mouseup=function(t){e.tableRowDrop(t,row)}.bind(e),o.mousemove=function(o){var i;o.pageY-Tabulator.prototype.helpers.elOffset(t.element).top+e.table.rowManager.element.scrollTop>t.getHeight()/2?e.toRow===t&&e.toRowAfter||((i=t.getElement()).parentNode.insertBefore(e.placeholderElement,i.nextSibling),e.moveRow(t,!0)):(e.toRow!==t||e.toRowAfter)&&(i=t.getElement()).previousSibling&&(i.parentNode.insertBefore(e.placeholderElement,i),e.moveRow(t,!1))}.bind(e),t.modules.moveRow=o},MoveRows.prototype.initializeRow=function(t){var e,o=this,i={};i.mouseup=function(e){o.tableRowDrop(e,t)}.bind(o),i.mousemove=function(e){var i=t.getElement();e.pageY-Tabulator.prototype.helpers.elOffset(i).top+o.table.rowManager.element.scrollTop>t.getHeight()/2?o.toRow===t&&o.toRowAfter||(i.parentNode.insertBefore(o.placeholderElement,i.nextSibling),o.moveRow(t,!0)):(o.toRow!==t||o.toRowAfter)&&(i.parentNode.insertBefore(o.placeholderElement,i),o.moveRow(t,!1))}.bind(o),this.hasHandle||((e=t.getElement()).addEventListener("mousedown",(function(e){1===e.which&&(o.checkTimeout=setTimeout((function(){o.startMove(e,t)}),o.checkPeriod))})),e.addEventListener("mouseup",(function(t){1===t.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)})),this.bindTouchEvents(t,t.getElement())),t.modules.moveRow=i},MoveRows.prototype.initializeCell=function(t){var e=this,o=t.getElement(!0);o.addEventListener("mousedown",(function(o){1===o.which&&(e.checkTimeout=setTimeout((function(){e.startMove(o,t.row)}),e.checkPeriod))})),o.addEventListener("mouseup",(function(t){1===t.which&&e.checkTimeout&&clearTimeout(e.checkTimeout)})),this.bindTouchEvents(t.row,o)},MoveRows.prototype.bindTouchEvents=function(t,e){var o,i,n,s,a,r,l=this,u=!1;e.addEventListener("touchstart",(function(e){l.checkTimeout=setTimeout((function(){l.touchMove=!0,t,o=t.nextRow(),n=o?o.getHeight()/2:0,i=t.prevRow(),s=i?i.getHeight()/2:0,a=0,r=0,u=!1,l.startMove(e,t)}),l.checkPeriod)}),{passive:!0}),this.moving,this.toRow,this.toRowAfter,e.addEventListener("touchmove",(function(e){var c,d;l.moving&&(e.preventDefault(),l.moveHover(e),u||(u=e.touches[0].pageY),(c=e.touches[0].pageY-u)>0?o&&c-a>n&&(d=o)!==t&&(u=e.touches[0].pageY,d.getElement().parentNode.insertBefore(l.placeholderElement,d.getElement().nextSibling),l.moveRow(d,!0)):i&&-c-r>s&&(d=i)!==t&&(u=e.touches[0].pageY,d.getElement().parentNode.insertBefore(l.placeholderElement,d.getElement()),l.moveRow(d,!1)),d&&(d,o=d.nextRow(),a=n,n=o?o.getHeight()/2:0,i=d.prevRow(),r=s,s=i?i.getHeight()/2:0))})),e.addEventListener("touchend",(function(t){l.checkTimeout&&clearTimeout(l.checkTimeout),l.moving&&(l.endMove(t),l.touchMove=!1)}))},MoveRows.prototype._bindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach((function(t){"row"!==t.type&&"group"!==t.type||!t.modules.moveRow.mousemove||t.getElement().addEventListener("mousemove",t.modules.moveRow.mousemove)}))},MoveRows.prototype._unbindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach((function(t){"row"!==t.type&&"group"!==t.type||!t.modules.moveRow.mousemove||t.getElement().removeEventListener("mousemove",t.modules.moveRow.mousemove)}))},MoveRows.prototype.startMove=function(t,e){var o=e.getElement();this.setStartPosition(t,e),this.moving=e,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=e.getWidth()+"px",this.placeholderElement.style.height=e.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(e)):(o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o)),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.moveHover(t)},MoveRows.prototype.setStartPosition=function(t,e){var o,i,n=this.touchMove?t.touches[0].pageX:t.pageX,s=this.touchMove?t.touches[0].pageY:t.pageY;o=e.getElement(),this.connection?(i=o.getBoundingClientRect(),this.startX=i.left-n+window.pageXOffset,this.startY=i.top-s+window.pageYOffset):this.startY=s-o.getBoundingClientRect().top},MoveRows.prototype.endMove=function(t){t&&1!==t.which&&!this.touchMove||(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow&&this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))},MoveRows.prototype.moveRow=function(t,e){this.toRow=t,this.toRowAfter=e},MoveRows.prototype.moveHover=function(t){this.connection?this.moveHoverConnections.call(this,t):this.moveHoverTable.call(this,t)},MoveRows.prototype.moveHoverTable=function(t){var e=this.table.rowManager.getElement(),o=e.scrollTop,i=(this.touchMove?t.touches[0].pageY:t.pageY)-e.getBoundingClientRect().top+o;this.hoverElement.style.top=i-this.startY+"px"},MoveRows.prototype.moveHoverConnections=function(t){this.hoverElement.style.left=this.startX+(this.touchMove?t.touches[0].pageX:t.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?t.touches[0].pageY:t.pageY)+"px"},MoveRows.prototype.elementRowDrop=function(t,e,o){this.table.options.movableRowsElementDrop&&this.table.options.movableRowsElementDrop(t,e,!!o&&o.getComponent())},MoveRows.prototype.connectToTables=function(t){var e,o=this;this.connectionSelectorsTables&&(e=this.table.modules.comms.getConnections(this.connectionSelectorsTables),this.table.options.movableRowsSendingStart.call(this.table,e),this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","connect",{row:t})),this.connectionSelectorsElements&&(this.connectionElements=[],Array.isArray(this.connectionSelectorsElements)||(this.connectionSelectorsElements=[this.connectionSelectorsElements]),this.connectionSelectorsElements.forEach((function(t){"string"==typeof t?o.connectionElements=o.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(t))):o.connectionElements.push(t)})),this.connectionElements.forEach((function(t){var e=function(e){o.elementRowDrop(e,t,o.moving)};t.addEventListener("mouseup",e),t.tabulatorElementDropEvent=e,t.classList.add("tabulator-movingrow-receiving")})))},MoveRows.prototype.disconnectFromTables=function(){var t;this.connectionSelectorsTables&&(t=this.table.modules.comms.getConnections(this.connectionSelectorsTables),this.table.options.movableRowsSendingStop.call(this.table,t),this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","disconnect")),this.connectionElements.forEach((function(t){t.classList.remove("tabulator-movingrow-receiving"),t.removeEventListener("mouseup",t.tabulatorElementDropEvent),delete t.tabulatorElementDropEvent}))},MoveRows.prototype.connect=function(t,e){return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=t,this.connectedRow=e,this.table.element.classList.add("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach((function(t){"row"===t.type&&t.modules.moveRow&&t.modules.moveRow.mouseup&&t.getElement().addEventListener("mouseup",t.modules.moveRow.mouseup)})),this.tableRowDropEvent=this.tableRowDrop.bind(this),this.table.element.addEventListener("mouseup",this.tableRowDropEvent),this.table.options.movableRowsReceivingStart.call(this.table,e,t),!0)},MoveRows.prototype.disconnect=function(t){t===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach((function(t){"row"===t.type&&t.modules.moveRow&&t.modules.moveRow.mouseup&&t.getElement().removeEventListener("mouseup",t.modules.moveRow.mouseup)})),this.table.element.removeEventListener("mouseup",this.tableRowDropEvent),this.table.options.movableRowsReceivingStop.call(this.table,t)):console.warn("Move Row Error - trying to disconnect from non connected table")},MoveRows.prototype.dropComplete=function(t,e,o){var i=!1;if(o){switch(_typeof(this.table.options.movableRowsSender)){case"string":i=this.senders[this.table.options.movableRowsSender];break;case"function":i=this.table.options.movableRowsSender}i?i.call(this,this.moving.getComponent(),e?e.getComponent():void 0,t):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.table.options.movableRowsSent.call(this.table,this.moving.getComponent(),e?e.getComponent():void 0,t)}else this.table.options.movableRowsSentFailed.call(this.table,this.moving.getComponent(),e?e.getComponent():void 0,t);this.endMove()},MoveRows.prototype.tableRowDrop=function(t,e){var o=!1,i=!1;switch(t.stopImmediatePropagation(),_typeof(this.table.options.movableRowsReceiver)){case"string":o=this.receivers[this.table.options.movableRowsReceiver];break;case"function":o=this.table.options.movableRowsReceiver}o?i=o.call(this,this.connectedRow.getComponent(),e?e.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),i?this.table.options.movableRowsReceived.call(this.table,this.connectedRow.getComponent(),e?e.getComponent():void 0,this.connectedTable):this.table.options.movableRowsReceivedFailed.call(this.table,this.connectedRow.getComponent(),e?e.getComponent():void 0,this.connectedTable),this.table.modules.comms.send(this.connectedTable,"moveRow","dropcomplete",{row:e,success:i})},MoveRows.prototype.receivers={insert:function(t,e,o){return this.table.addRow(t.getData(),void 0,e),!0},add:function(t,e,o){return this.table.addRow(t.getData()),!0},update:function(t,e,o){return!!e&&(e.update(t.getData()),!0)},replace:function(t,e,o){return!!e&&(this.table.addRow(t.getData(),void 0,e),e.delete(),!0)}},MoveRows.prototype.senders={delete:function(t,e,o){t.delete()}},MoveRows.prototype.commsReceived=function(t,e,o){switch(e){case"connect":return this.connect(t,o.row);case"disconnect":return this.disconnect(t);case"dropcomplete":return this.dropComplete(t,o.row,o.success)}},Tabulator.prototype.registerModule("moveRow",MoveRows);var Mutator=function(t){this.table=t,this.allowedTypes=["","data","edit","clipboard"],this.enabled=!0};Mutator.prototype.initializeColumn=function(t){var e=this,o=!1,i={};this.allowedTypes.forEach((function(n){var s,a="mutator"+(n.charAt(0).toUpperCase()+n.slice(1));t.definition[a]&&(s=e.lookupMutator(t.definition[a]))&&(o=!0,i[a]={mutator:s,params:t.definition[a+"Params"]||{}})})),o&&(t.modules.mutate=i)},Mutator.prototype.lookupMutator=function(t){var e=!1;switch(void 0===t?"undefined":_typeof(t)){case"string":this.mutators[t]?e=this.mutators[t]:console.warn("Mutator Error - No such mutator found, ignoring: ",t);break;case"function":e=t}return e},Mutator.prototype.transformRow=function(t,e,o){var i,n="mutator"+(e.charAt(0).toUpperCase()+e.slice(1));return this.enabled&&this.table.columnManager.traverse((function(s){var a,r,l;s.modules.mutate&&(a=s.modules.mutate[n]||s.modules.mutate.mutator||!1)&&(i=s.getFieldValue(void 0!==o?o:t),"data"!=e&&void 0===i||(l=s.getComponent(),r="function"==typeof a.params?a.params(i,t,e,l):a.params,s.setFieldValue(t,a.mutator(i,t,e,r,l))))})),t},Mutator.prototype.transformCell=function(t,e){var o=t.column.modules.mutate.mutatorEdit||t.column.modules.mutate.mutator||!1,i={};return o?(i=Object.assign(i,t.row.getData()),t.column.setFieldValue(i,e),o.mutator(e,i,"edit",o.params,t.getComponent())):e},Mutator.prototype.enable=function(){this.enabled=!0},Mutator.prototype.disable=function(){this.enabled=!1},Mutator.prototype.mutators={},Tabulator.prototype.registerModule("mutator",Mutator);var Page=function(t){this.table=t,this.mode="local",this.progressiveLoad=!1,this.size=0,this.page=1,this.count=5,this.max=1,this.displayIndex=0,this.initialLoad=!0,this.pageSizes=[],this.dataReceivedNames={},this.dataSentNames={},this.createElements()};Page.prototype.createElements=function(){var t;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),(t=document.createElement("button")).classList.add("tabulator-page"),t.setAttribute("type","button"),t.setAttribute("role","button"),t.setAttribute("aria-label",""),t.setAttribute("title",""),this.firstBut=t.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=t.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=t.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=t.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))},Page.prototype.generatePageSizeSelectList=function(){var t=this,e=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))e=this.table.options.paginationSizeSelector,this.pageSizes=e,-1==this.pageSizes.indexOf(this.size)&&e.unshift(this.size);else if(-1==this.pageSizes.indexOf(this.size)){e=[];for(var o=1;o<5;o++)e.push(this.size*o);this.pageSizes=e}else e=this.pageSizes;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);e.forEach((function(e){var o=document.createElement("option");o.value=e,!0===e?t.table.modules.localize.bind("pagination|all",(function(t){o.innerHTML=t})):o.innerHTML=e,t.pageSizeSelect.appendChild(o)})),this.pageSizeSelect.value=this.size}},Page.prototype.initialize=function(t){var e,o,i,n=this;this.dataSentNames=Object.assign({},this.paginationDataSentNames),this.dataSentNames=Object.assign(this.dataSentNames,this.table.options.paginationDataSent),this.dataReceivedNames=Object.assign({},this.paginationDataReceivedNames),this.dataReceivedNames=Object.assign(this.dataReceivedNames,this.table.options.paginationDataReceived),n.table.modules.localize.bind("pagination|first",(function(t){n.firstBut.innerHTML=t})),n.table.modules.localize.bind("pagination|first_title",(function(t){n.firstBut.setAttribute("aria-label",t),n.firstBut.setAttribute("title",t)})),n.table.modules.localize.bind("pagination|prev",(function(t){n.prevBut.innerHTML=t})),n.table.modules.localize.bind("pagination|prev_title",(function(t){n.prevBut.setAttribute("aria-label",t),n.prevBut.setAttribute("title",t)})),n.table.modules.localize.bind("pagination|next",(function(t){n.nextBut.innerHTML=t})),n.table.modules.localize.bind("pagination|next_title",(function(t){n.nextBut.setAttribute("aria-label",t),n.nextBut.setAttribute("title",t)})),n.table.modules.localize.bind("pagination|last",(function(t){n.lastBut.innerHTML=t})),n.table.modules.localize.bind("pagination|last_title",(function(t){n.lastBut.setAttribute("aria-label",t),n.lastBut.setAttribute("title",t)})),n.firstBut.addEventListener("click",(function(){n.setPage(1).then((function(){})).catch((function(){}))})),n.prevBut.addEventListener("click",(function(){n.previousPage().then((function(){})).catch((function(){}))})),n.nextBut.addEventListener("click",(function(){n.nextPage().then((function(){})).catch((function(){}))})),n.lastBut.addEventListener("click",(function(){n.setPage(n.max).then((function(){})).catch((function(){}))})),n.table.options.paginationElement&&(n.element=n.table.options.paginationElement),this.pageSizeSelect&&(e=document.createElement("label"),n.table.modules.localize.bind("pagination|page_size",(function(t){n.pageSizeSelect.setAttribute("aria-label",t),n.pageSizeSelect.setAttribute("title",t),e.innerHTML=t})),n.element.appendChild(e),n.element.appendChild(n.pageSizeSelect),n.pageSizeSelect.addEventListener("change",(function(t){n.setPageSize("true"==n.pageSizeSelect.value||n.pageSizeSelect.value),n.setPage(1).then((function(){})).catch((function(){}))}))),n.element.appendChild(n.firstBut),n.element.appendChild(n.prevBut),n.element.appendChild(n.pagesElement),n.element.appendChild(n.nextBut),n.element.appendChild(n.lastBut),n.table.options.paginationElement||t||n.table.footerManager.append(n.element,n),n.mode=n.table.options.pagination,n.table.options.paginationSize?n.size=n.table.options.paginationSize:((o=document.createElement("div")).classList.add("tabulator-row"),o.style.visibility=t,(i=document.createElement("div")).classList.add("tabulator-cell"),i.innerHTML="Page Row Test",o.appendChild(i),n.table.rowManager.getTableElement().appendChild(o),n.size=Math.floor(n.table.rowManager.getElement().clientHeight/o.offsetHeight),n.table.rowManager.getTableElement().removeChild(o)),n.count=n.table.options.paginationButtonCount,n.generatePageSizeSelectList()},Page.prototype.initializeProgressive=function(t){this.initialize(!0),this.mode="progressive_"+t,this.progressiveLoad=!0},Page.prototype.setDisplayIndex=function(t){this.displayIndex=t},Page.prototype.getDisplayIndex=function(){return this.displayIndex},Page.prototype.setMaxRows=function(t){this.max=t?!0===this.size?1:Math.ceil(t/this.size):1,this.page>this.max&&(this.page=this.max)},Page.prototype.reset=function(t,e){return("local"==this.mode||t)&&(this.page=1),e&&(this.initialLoad=!0),!0},Page.prototype.setMaxPage=function(t){t=parseInt(t),this.max=t||1,this.page>this.max&&(this.page=this.max,this.trigger())},Page.prototype.setPage=function(t){var e=this,o=this;switch(t){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return new Promise((function(i,n){(t=parseInt(t))>0&&t<=e.max||"local"!==e.mode?(e.page=t,e.trigger().then((function(){i()})).catch((function(){n()})),o.table.options.persistence&&o.table.modExists("persistence",!0)&&o.table.modules.persistence.config.page&&o.table.modules.persistence.save("page")):(console.warn("Pagination Error - Requested page is out of range of 1 - "+e.max+":",t),n())}))},Page.prototype.setPageToRow=function(t){var e=this;return new Promise((function(o,i){var n=e.table.rowManager.getDisplayRows(e.displayIndex-1).indexOf(t);if(n>-1){var s=!0===e.size?1:Math.ceil((n+1)/e.size);e.setPage(s).then((function(){o()})).catch((function(){i()}))}else console.warn("Pagination Error - Requested row is not visible"),i()}))},Page.prototype.setPageSize=function(t){!0!==t&&(t=parseInt(t)),t>0&&(this.size=t),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.page&&this.table.modules.persistence.save("page")},Page.prototype._setPageButtons=function(){for(var t=Math.floor((this.count-1)/2),e=Math.ceil((this.count-1)/2),o=this.max-this.page+t+1<this.count?this.max-this.count+1:Math.max(this.page-t,1),i=this.page<=e?Math.min(this.count,this.max):Math.min(this.page+e,this.max);this.pagesElement.firstChild;)this.pagesElement.removeChild(this.pagesElement.firstChild);1==this.page?(this.firstBut.disabled=!0,this.prevBut.disabled=!0):(this.firstBut.disabled=!1,this.prevBut.disabled=!1),this.page==this.max?(this.lastBut.disabled=!0,this.nextBut.disabled=!0):(this.lastBut.disabled=!1,this.nextBut.disabled=!1);for(var n=o;n<=i;n++)n>0&&n<=this.max&&this.pagesElement.appendChild(this._generatePageButton(n));this.footerRedraw()},Page.prototype._generatePageButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("tabulator-page"),t==e.page&&o.classList.add("active"),o.setAttribute("type","button"),o.setAttribute("role","button"),e.table.modules.localize.bind("pagination|page_title",(function(e){o.setAttribute("aria-label",e+" "+t),o.setAttribute("title",e+" "+t)})),o.setAttribute("data-page",t),o.textContent=t,o.addEventListener("click",(function(o){e.setPage(t).then((function(){})).catch((function(){}))})),o},Page.prototype.previousPage=function(){var t=this;return new Promise((function(e,o){t.page>1?(t.page--,t.trigger().then((function(){e()})).catch((function(){o()})),t.table.options.persistence&&t.table.modExists("persistence",!0)&&t.table.modules.persistence.config.page&&t.table.modules.persistence.save("page")):(console.warn("Pagination Error - Previous page would be less than page 1:",0),o())}))},Page.prototype.nextPage=function(){var t=this;return new Promise((function(e,o){t.page<t.max?(t.page++,t.trigger().then((function(){e()})).catch((function(){o()})),t.table.options.persistence&&t.table.modExists("persistence",!0)&&t.table.modules.persistence.config.page&&t.table.modules.persistence.save("page")):(t.progressiveLoad||console.warn("Pagination Error - Next page would be greater than maximum page of "+t.max+":",t.max+1),o())}))},Page.prototype.getPage=function(){return this.page},Page.prototype.getPageMax=function(){return this.max},Page.prototype.getPageSize=function(t){return this.size},Page.prototype.getMode=function(){return this.mode},Page.prototype.getRows=function(t){var e,o,i;if("local"==this.mode){e=[],!0===this.size?(o=0,i=t.length):i=(o=this.size*(this.page-1))+parseInt(this.size),this._setPageButtons();for(var n=o;n<i;n++)t[n]&&e.push(t[n]);return e}return this._setPageButtons(),t.slice(0)},Page.prototype.trigger=function(){var t,e=this;return new Promise((function(o,i){switch(e.mode){case"local":t=e.table.rowManager.scrollLeft,e.table.rowManager.refreshActiveData("page"),e.table.rowManager.scrollHorizontal(t),e.table.options.pageLoaded.call(e.table,e.getPage()),o();break;case"remote":case"progressive_load":case"progressive_scroll":e.table.modules.ajax.blockActiveRequest(),e._getRemotePage().then((function(){o()})).catch((function(){i()}));break;default:console.warn("Pagination Error - no such pagination mode:",e.mode),i()}}))},Page.prototype._getRemotePage=function(){var t,e,o=this,i=this;return new Promise((function(n,s){if(i.table.modExists("ajax",!0)||s(),t=Tabulator.prototype.helpers.deepClone(i.table.modules.ajax.getParams()||{}),(e=i.table.modules.ajax.getParams())[o.dataSentNames.page]=i.page,o.size&&(e[o.dataSentNames.size]=o.size),o.table.options.ajaxSorting&&o.table.modExists("sort")){var a=i.table.modules.sort.getSort();a.forEach((function(t){delete t.column})),e[o.dataSentNames.sorters]=a}if(o.table.options.ajaxFiltering&&o.table.modExists("filter")){var r=i.table.modules.filter.getFilters(!0,!0);e[o.dataSentNames.filters]=r}i.table.modules.ajax.setParams(e),i.table.modules.ajax.sendRequest(o.progressiveLoad).then((function(t){i._parseRemoteData(t),n()})).catch((function(t){s()})),i.table.modules.ajax.setParams(t)}))},Page.prototype._parseRemoteData=function(t){var e,o,i=this;if(void 0===t[this.dataReceivedNames.last_page]&&console.warn("Remote Pagination Error - Server response missing '"+this.dataReceivedNames.last_page+"' property"),t[this.dataReceivedNames.data]){if(this.max=parseInt(t[this.dataReceivedNames.last_page])||1,this.progressiveLoad)switch(this.mode){case"progressive_load":1==this.page?this.table.rowManager.setData(t[this.dataReceivedNames.data],!1,this.initialLoad&&1==this.page):this.table.rowManager.addRows(t[this.dataReceivedNames.data]),this.page<this.max&&setTimeout((function(){i.nextPage().then((function(){})).catch((function(){}))}),i.table.options.ajaxProgressiveLoadDelay);break;case"progressive_scroll":t=this.table.rowManager.getData().concat(t[this.dataReceivedNames.data]),this.table.rowManager.setData(t,!0,this.initialLoad&&1==this.page),o=this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.element.clientHeight,i.table.rowManager.element.scrollHeight<=i.table.rowManager.element.clientHeight+o&&i.nextPage().then((function(){})).catch((function(){}))}else e=this.table.rowManager.scrollLeft,this.table.rowManager.setData(t[this.dataReceivedNames.data],!1,this.initialLoad&&1==this.page),this.table.rowManager.scrollHorizontal(e),this.table.columnManager.scrollHorizontal(e),this.table.options.pageLoaded.call(this.table,this.getPage());this.initialLoad=!1}else console.warn("Remote Pagination Error - Server response missing '"+this.dataReceivedNames.data+"' property")},Page.prototype.footerRedraw=function(){var t=this.table.footerManager.element;Math.ceil(t.clientWidth)-t.scrollWidth<0?this.pagesElement.style.display="none":(this.pagesElement.style.display="",Math.ceil(t.clientWidth)-t.scrollWidth<0&&(this.pagesElement.style.display="none"))},Page.prototype.paginationDataSentNames={page:"page",size:"size",sorters:"sorters",filters:"filters"},Page.prototype.paginationDataReceivedNames={current_page:"current_page",last_page:"last_page",data:"data"},Tabulator.prototype.registerModule("page",Page);var Persistence=function(t){this.table=t,this.mode="",this.id="",this.defWatcherBlock=!1,this.config={},this.readFunc=!1,this.writeFunc=!1};Persistence.prototype.localStorageTest=function(){var t="_tabulator_test";try{return window.localStorage.setItem(t,t),window.localStorage.removeItem(t),!0}catch(t){return!1}},Persistence.prototype.initialize=function(){var t,e=this.table.options.persistenceMode,o=this.table.options.persistenceID;this.mode=!0!==e?e:this.localStorageTest()?"local":"cookie",this.table.options.persistenceReaderFunc?"function"==typeof this.table.options.persistenceReaderFunc?this.readFunc=this.table.options.persistenceReaderFunc:this.readers[this.table.options.persistenceReaderFunc]?this.readFunc=this.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):this.readers[this.mode]?this.readFunc=this.readers[this.mode]:console.warn("Persistence Read Error - invalid reader set",this.mode),this.table.options.persistenceWriterFunc?"function"==typeof this.table.options.persistenceWriterFunc?this.writeFunc=this.table.options.persistenceWriterFunc:this.readers[this.table.options.persistenceWriterFunc]?this.writeFunc=this.readers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):this.writers[this.mode]?this.writeFunc=this.writers[this.mode]:console.warn("Persistence Write Error - invalid writer set",this.mode),this.id="tabulator-"+(o||this.table.element.getAttribute("id")||""),this.config={sort:!0===this.table.options.persistence||this.table.options.persistence.sort,filter:!0===this.table.options.persistence||this.table.options.persistence.filter,group:!0===this.table.options.persistence||this.table.options.persistence.group,page:!0===this.table.options.persistence||this.table.options.persistence.page,columns:!0===this.table.options.persistence?["title","width","visible"]:this.table.options.persistence.columns},this.config.page&&(t=this.retreiveData("page"))&&(void 0===t.paginationSize||!0!==this.config.page&&!this.config.page.size||(this.table.options.paginationSize=t.paginationSize),void 0===t.paginationInitialPage||!0!==this.config.page&&!this.config.page.page||(this.table.options.paginationInitialPage=t.paginationInitialPage)),this.config.group&&(t=this.retreiveData("group"))&&(void 0===t.groupBy||!0!==this.config.group&&!this.config.group.groupBy||(this.table.options.groupBy=t.groupBy),void 0===t.groupStartOpen||!0!==this.config.group&&!this.config.group.groupStartOpen||(this.table.options.groupStartOpen=t.groupStartOpen),void 0===t.groupHeader||!0!==this.config.group&&!this.config.group.groupHeader||(this.table.options.groupHeader=t.groupHeader)),this.config.columns&&(this.table.options.columns=this.load("columns",this.table.options.columns))},Persistence.prototype.initializeColumn=function(t){var e,o=this;this.config.columns&&(this.defWatcherBlock=!0,e=t.getDefinition(),(!0===this.config.columns?Object.keys(e):this.config.columns).forEach((function(t){var i=Object.getOwnPropertyDescriptor(e,t),n=e[t];i&&Object.defineProperty(e,t,{set:function(t){n=t,o.defWatcherBlock||o.save("columns"),i.set&&i.set(t)},get:function(){return i.get&&i.get(),n}})})),this.defWatcherBlock=!1)},Persistence.prototype.load=function(t,e){var o=this.retreiveData(t);return e&&(o=o?this.mergeDefinition(e,o):e),o},Persistence.prototype.retreiveData=function(t){return!!this.readFunc&&this.readFunc(this.id,t)},Persistence.prototype.mergeDefinition=function(t,e){var o=this,i=[];return(e=e||[]).forEach((function(e,n){var s,a=o._findColumn(t,e);a&&(!0===o.config.columns||null==o.config.columns?(s=Object.keys(a)).push("width"):s=o.config.columns,s.forEach((function(t){"columns"!==t&&void 0!==e[t]&&(a[t]=e[t])})),a.columns&&(a.columns=o.mergeDefinition(a.columns,e.columns)),i.push(a))})),t.forEach((function(t,n){o._findColumn(e,t)||(i.length>n?i.splice(n,0,t):i.push(t))})),i},Persistence.prototype._findColumn=function(t,e){var o=e.columns?"group":e.field?"field":"object";return t.find((function(t){switch(o){case"group":return t.title===e.title&&t.columns.length===e.columns.length;case"field":return t.field===e.field;case"object":return t===e}}))},Persistence.prototype.save=function(t){var e={};switch(t){case"columns":e=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":e=this.table.modules.filter.getFilters();break;case"sort":e=this.validateSorters(this.table.modules.sort.getSort());break;case"group":e=this.getGroupConfig();break;case"page":e=this.getPageConfig()}this.writeFunc&&this.writeFunc(this.id,t,e)},Persistence.prototype.validateSorters=function(t){return t.forEach((function(t){t.column=t.field,delete t.field})),t},Persistence.prototype.getGroupConfig=function(){var t={};return this.config.group&&((!0===this.config.group||this.config.group.groupBy)&&(t.groupBy=this.table.options.groupBy),(!0===this.config.group||this.config.group.groupStartOpen)&&(t.groupStartOpen=this.table.options.groupStartOpen),(!0===this.config.group||this.config.group.groupHeader)&&(t.groupHeader=this.table.options.groupHeader)),t},Persistence.prototype.getPageConfig=function(){var t={};return this.config.page&&((!0===this.config.page||this.config.page.size)&&(t.paginationSize=this.table.modules.page.getPageSize()),(!0===this.config.page||this.config.page.page)&&(t.paginationInitialPage=this.table.modules.page.getPage())),t},Persistence.prototype.parseColumns=function(t){var e=this,o=[],i=["headerContextMenu","headerMenu","contextMenu","clickMenu"];return t.forEach((function(t){var n,s={},a=t.getDefinition();t.isGroup?(s.title=a.title,s.columns=e.parseColumns(t.getColumns())):(s.field=t.getField(),!0===e.config.columns||null==e.config.columns?(n=Object.keys(a)).push("width"):n=e.config.columns,n.forEach((function(e){switch(e){case"width":s.width=t.getWidth();break;case"visible":s.visible=t.visible;break;default:"function"!=typeof a[e]&&-1===i.indexOf(e)&&(s[e]=a[e])}}))),o.push(s)})),o},Persistence.prototype.readers={local:function(t,e){var o=localStorage.getItem(t+"-"+e);return!!o&&JSON.parse(o)},cookie:function(t,e){var o,i,n=document.cookie,s=t+"-"+e,a=n.indexOf(s+"=");return a>-1&&(n=n.substr(a),(o=n.indexOf(";"))>-1&&(n=n.substr(0,o)),i=n.replace(s+"=","")),!!i&&JSON.parse(i)}},Persistence.prototype.writers={local:function(t,e,o){localStorage.setItem(t+"-"+e,JSON.stringify(o))},cookie:function(t,e,o){var i=new Date;i.setDate(i.getDate()+1e4),document.cookie=t+"-"+e+"="+JSON.stringify(o)+"; expires="+i.toUTCString()}},Tabulator.prototype.registerModule("persistence",Persistence);var Print=function(t){this.table=t,this.element=!1,this.manualBlock=!1};Print.prototype.initialize=function(){window.addEventListener("beforeprint",this.replaceTable.bind(this)),window.addEventListener("afterprint",this.cleanup.bind(this))},Print.prototype.replaceTable=function(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))},Print.prototype.cleanup=function(){document.body.classList.remove("tabulator-print-fullscreen-hide"),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.table.element.style.display="")},Print.prototype.printFullscreen=function(t,e,o){var i,n,s=window.scrollX,a=window.scrollY,r=document.createElement("div"),l=document.createElement("div"),u=this.table.modules.export.genereateTable(void 0!==o?o:this.table.options.printConfig,void 0!==e?e:this.table.options.printStyled,t,"print");this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(r.classList.add("tabulator-print-header"),"string"==typeof(i="function"==typeof this.table.options.printHeader?this.table.options.printHeader.call(this.table):this.table.options.printHeader)?r.innerHTML=i:r.appendChild(i),this.element.appendChild(r)),this.element.appendChild(u),this.table.options.printFooter&&(l.classList.add("tabulator-print-footer"),"string"==typeof(n="function"==typeof this.table.options.printFooter?this.table.options.printFooter.call(this.table):this.table.options.printFooter)?l.innerHTML=n:l.appendChild(n),this.element.appendChild(l)),document.body.classList.add("tabulator-print-fullscreen-hide"),document.body.appendChild(this.element),this.table.options.printFormatter&&this.table.options.printFormatter(this.element,u),window.print(),this.cleanup(),window.scrollTo(s,a),this.manualBlock=!1},Tabulator.prototype.registerModule("print",Print);var ReactiveData=function(t){this.table=t,this.data=!1,this.blocked=!1,this.origFuncs={},this.currentVersion=0};ReactiveData.prototype.watchData=function(t){var e,o=this;this.currentVersion++,e=this.currentVersion,o.unwatchData(),o.data=t,o.origFuncs.push=t.push,Object.defineProperty(o.data,"push",{enumerable:!1,configurable:!0,value:function(){var i=Array.from(arguments);return o.blocked||e!==o.currentVersion||i.forEach((function(t){o.table.rowManager.addRowActual(t,!1)})),o.origFuncs.push.apply(t,arguments)}}),o.origFuncs.unshift=t.unshift,Object.defineProperty(o.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var i=Array.from(arguments);return o.blocked||e!==o.currentVersion||i.forEach((function(t){o.table.rowManager.addRowActual(t,!0)})),o.origFuncs.unshift.apply(t,arguments)}}),o.origFuncs.shift=t.shift,Object.defineProperty(o.data,"shift",{enumerable:!1,configurable:!0,value:function(){var i;return o.blocked||e!==o.currentVersion||o.data.length&&(i=o.table.rowManager.getRowFromDataObject(o.data[0]))&&i.deleteActual(),o.origFuncs.shift.call(t)}}),o.origFuncs.pop=t.pop,Object.defineProperty(o.data,"pop",{enumerable:!1,configurable:!0,value:function(){var i;return o.blocked||e!==o.currentVersion||o.data.length&&(i=o.table.rowManager.getRowFromDataObject(o.data[o.data.length-1]))&&i.deleteActual(),o.origFuncs.pop.call(t)}}),o.origFuncs.splice=t.splice,Object.defineProperty(o.data,"splice",{enumerable:!1,configurable:!0,value:function(){var i,n=Array.from(arguments),s=n[0]<0?t.length+n[0]:n[0],a=n[1],r=!!n[2]&&n.slice(2);if(!o.blocked&&e===o.currentVersion){if(r&&((i=!!t[s]&&o.table.rowManager.getRowFromDataObject(t[s]))?r.forEach((function(t){o.table.rowManager.addRowActual(t,!0,i,!0)})):(r=r.slice().reverse()).forEach((function(t){o.table.rowManager.addRowActual(t,!0,!1,!0)}))),0!==a){var l=t.slice(s,void 0===n[1]?n[1]:s+a);l.forEach((function(t,e){var i=o.table.rowManager.getRowFromDataObject(t);i&&i.deleteActual(e!==l.length-1)}))}(r||0!==a)&&o.table.rowManager.reRenderInPosition()}return o.origFuncs.splice.apply(t,arguments)}})},ReactiveData.prototype.unwatchData=function(){if(!1!==this.data)for(var t in this.origFuncs)Object.defineProperty(this.data,t,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})},ReactiveData.prototype.watchRow=function(t){var e=t.getData();for(var o in this.blocked=!0,e)this.watchKey(t,e,o);this.table.options.dataTree&&this.watchTreeChildren(t),this.blocked=!1},ReactiveData.prototype.watchTreeChildren=function(t){var e=this,o=t.getData()[this.table.options.dataTreeChildField],i={};function n(){e.table.modules.dataTree.initializeRow(t),e.table.modules.dataTree.layoutRow(t),e.table.rowManager.refreshActiveData("tree",!1,!0)}o&&(i.push=o.push,Object.defineProperty(o,"push",{enumerable:!1,configurable:!0,value:function(){var t=i.push.apply(o,arguments);return n(),t}}),i.unshift=o.unshift,Object.defineProperty(o,"unshift",{enumerable:!1,configurable:!0,value:function(){var t=i.unshift.apply(o,arguments);return n(),t}}),i.shift=o.shift,Object.defineProperty(o,"shift",{enumerable:!1,configurable:!0,value:function(){var t=i.shift.call(o);return n(),t}}),i.pop=o.pop,Object.defineProperty(o,"pop",{enumerable:!1,configurable:!0,value:function(){var t=i.pop.call(o);return n(),t}}),i.splice=o.splice,Object.defineProperty(o,"splice",{enumerable:!1,configurable:!0,value:function(){var t=i.splice.apply(o,arguments);return n(),t}}))},ReactiveData.prototype.watchKey=function(t,e,o){var i=this,n=Object.getOwnPropertyDescriptor(e,o),s=e[o],a=this.currentVersion;Object.defineProperty(e,o,{set:function(e){if(s=e,!i.blocked&&a===i.currentVersion){var r={};r[o]=e,t.updateData(r)}n.set&&n.set(e)},get:function(){return n.get&&n.get(),s}})},ReactiveData.prototype.unwatchRow=function(t){var e=t.getData();for(var o in e)Object.defineProperty(e,o,{value:e[o]})},ReactiveData.prototype.block=function(){this.blocked=!0},ReactiveData.prototype.unblock=function(){this.blocked=!1},Tabulator.prototype.registerModule("reactiveData",ReactiveData);var ResizeColumns=function(t){this.table=t,this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.handle=null,this.prevHandle=null};ResizeColumns.prototype.initializeColumn=function(t,e,o){var i=this,n=!1,s=this.table.options.resizableColumns;if("header"===t&&(n="textarea"==e.definition.formatter||e.definition.variableHeight,e.modules.resize={variableHeight:n}),!0===s||s==t){var a=document.createElement("div");a.className="tabulator-col-resize-handle";var r=document.createElement("div");r.className="tabulator-col-resize-handle prev",a.addEventListener("click",(function(t){t.stopPropagation()}));var l=function(t){var o=e.getLastColumn();o&&i._checkResizability(o)&&(i.startColumn=e,i._mouseDown(t,o,a))};a.addEventListener("mousedown",l),a.addEventListener("touchstart",l,{passive:!0}),a.addEventListener("dblclick",(function(t){var o=e.getLastColumn();o&&i._checkResizability(o)&&(t.stopPropagation(),o.reinitializeWidth(!0))})),r.addEventListener("click",(function(t){t.stopPropagation()}));var u=function(t){var o,n,s;(o=e.getFirstColumn())&&(s=(n=i.table.columnManager.findColumnIndex(o))>0&&i.table.columnManager.getColumnByIndex(n-1))&&i._checkResizability(s)&&(i.startColumn=e,i._mouseDown(t,s,r))};r.addEventListener("mousedown",u),r.addEventListener("touchstart",u,{passive:!0}),r.addEventListener("dblclick",(function(t){var o,n,s;(o=e.getFirstColumn())&&(s=(n=i.table.columnManager.findColumnIndex(o))>0&&i.table.columnManager.getColumnByIndex(n-1))&&i._checkResizability(s)&&(t.stopPropagation(),s.reinitializeWidth(!0))})),o.appendChild(a),o.appendChild(r)}},ResizeColumns.prototype._checkResizability=function(t){return void 0!==t.definition.resizable?t.definition.resizable:this.table.options.resizableColumns},ResizeColumns.prototype._mouseDown=function(t,e,o){var i=this;function n(t){i.table.rtl?e.setWidth(i.startWidth-((void 0===t.screenX?t.touches[0].screenX:t.screenX)-i.startX)):e.setWidth(i.startWidth+((void 0===t.screenX?t.touches[0].screenX:t.screenX)-i.startX)),i.table.options.virtualDomHoz&&i.table.vdomHoz.reinitialize(!0),!i.table.browserSlow&&e.modules.resize&&e.modules.resize.variableHeight&&e.checkCellHeights()}function s(t){i.startColumn.modules.edit&&(i.startColumn.modules.edit.blocked=!1),i.table.browserSlow&&e.modules.resize&&e.modules.resize.variableHeight&&e.checkCellHeights(),document.body.removeEventListener("mouseup",s),document.body.removeEventListener("mousemove",n),o.removeEventListener("touchmove",n),o.removeEventListener("touchend",s),i.table.element.classList.remove("tabulator-block-select"),i.table.options.persistence&&i.table.modExists("persistence",!0)&&i.table.modules.persistence.config.columns&&i.table.modules.persistence.save("columns"),i.table.options.columnResized.call(i.table,e.getComponent())}i.table.element.classList.add("tabulator-block-select"),t.stopPropagation(),i.startColumn.modules.edit&&(i.startColumn.modules.edit.blocked=!0),i.startX=void 0===t.screenX?t.touches[0].screenX:t.screenX,i.startWidth=e.getWidth(),document.body.addEventListener("mousemove",n),document.body.addEventListener("mouseup",s),o.addEventListener("touchmove",n,{passive:!0}),o.addEventListener("touchend",s)},Tabulator.prototype.registerModule("resizeColumns",ResizeColumns);var ResizeRows=function(t){this.table=t,this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null};ResizeRows.prototype.initializeRow=function(t){var e=this,o=t.getElement(),i=document.createElement("div");i.className="tabulator-row-resize-handle";var n=document.createElement("div");n.className="tabulator-row-resize-handle prev",i.addEventListener("click",(function(t){t.stopPropagation()}));var s=function(o){e.startRow=t,e._mouseDown(o,t,i)};i.addEventListener("mousedown",s),i.addEventListener("touchstart",s,{passive:!0}),n.addEventListener("click",(function(t){t.stopPropagation()}));var a=function(o){var i=e.table.rowManager.prevDisplayRow(t);i&&(e.startRow=i,e._mouseDown(o,i,n))};n.addEventListener("mousedown",a),n.addEventListener("touchstart",a,{passive:!0}),o.appendChild(i),o.appendChild(n)},ResizeRows.prototype._mouseDown=function(t,e,o){var i=this;function n(t){e.setHeight(i.startHeight+((void 0===t.screenY?t.touches[0].screenY:t.screenY)-i.startY))}function s(t){document.body.removeEventListener("mouseup",n),document.body.removeEventListener("mousemove",n),o.removeEventListener("touchmove",n),o.removeEventListener("touchend",s),i.table.element.classList.remove("tabulator-block-select"),i.table.options.rowResized.call(this.table,e.getComponent())}i.table.element.classList.add("tabulator-block-select"),t.stopPropagation(),i.startY=void 0===t.screenY?t.touches[0].screenY:t.screenY,i.startHeight=e.getHeight(),document.body.addEventListener("mousemove",n),document.body.addEventListener("mouseup",s),o.addEventListener("touchmove",n,{passive:!0}),o.addEventListener("touchend",s)},Tabulator.prototype.registerModule("resizeRows",ResizeRows);var ResizeTable=function(t){this.table=t,this.binding=!1,this.observer=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1};ResizeTable.prototype.initialize=function(t){var e,o=this,i=this.table;this.tableHeight=i.element.clientHeight,this.tableWidth=i.element.clientWidth,i.element.parentNode&&(this.containerHeight=i.element.parentNode.clientHeight,this.containerWidth=i.element.parentNode.clientWidth),"undefined"!=typeof ResizeObserver&&"virtual"===i.rowManager.getRenderMode()?(this.autoResize=!0,this.observer=new ResizeObserver((function(t){if(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell){var e=Math.floor(t[0].contentRect.height),n=Math.floor(t[0].contentRect.width);o.tableHeight==e&&o.tableWidth==n||(o.tableHeight=e,o.tableWidth=n,i.element.parentNode&&(o.containerHeight=i.element.parentNode.clientHeight,o.containerWidth=i.element.parentNode.clientWidth),i.options.virtualDomHoz&&i.vdomHoz.reinitialize(!0),i.redraw())}})),this.observer.observe(i.element),e=window.getComputedStyle(i.element),this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(e.getPropertyValue("max-height")||e.getPropertyValue("min-height"))&&(this.containerObserver=new ResizeObserver((function(t){if(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell){var e=Math.floor(t[0].contentRect.height),n=Math.floor(t[0].contentRect.width);o.containerHeight==e&&o.containerWidth==n||(o.containerHeight=e,o.containerWidth=n,o.tableHeight=i.element.clientHeight,o.tableWidth=i.element.clientWidth),i.options.virtualDomHoz&&i.vdomHoz.reinitialize(!0),i.redraw()}})),this.containerObserver.observe(this.table.element.parentNode))):(this.binding=function(){(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell)&&(i.options.virtualDomHoz&&i.vdomHoz.reinitialize(!0),i.redraw())},window.addEventListener("resize",this.binding))},ResizeTable.prototype.clearBindings=function(t){this.binding&&window.removeEventListener("resize",this.binding),this.observer&&this.observer.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)},Tabulator.prototype.registerModule("resizeTable",ResizeTable);var ResponsiveLayout=function(t){this.table=t,this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0,this.collapseHandleColumn=!1};ResponsiveLayout.prototype.initialize=function(){var t=this,e=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.table.columnManager.columnsByIndex.forEach((function(o,i){o.modules.responsive&&o.modules.responsive.order&&o.modules.responsive.visible&&(o.modules.responsive.index=i,e.push(o),o.visible||"collapse"!==t.mode||t.hiddenColumns.push(o))})),e=(e=e.reverse()).sort((function(t,e){return e.modules.responsive.order-t.modules.responsive.order||e.modules.responsive.index-t.modules.responsive.index})),this.columns=e,"collapse"===this.mode&&this.generateCollapsedContent();var o=this.table.columnManager.columnsByIndex,i=Array.isArray(o),n=0;for(o=i?o:o[Symbol.iterator]();;){var s;if(i){if(n>=o.length)break;s=o[n++]}else{if((n=o.next()).done)break;s=n.value}var a=s;if("responsiveCollapse"==a.definition.formatter){this.collapseHandleColumn=a;break}}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())},ResponsiveLayout.prototype.initializeColumn=function(t){var e=t.getDefinition();t.modules.responsive={order:void 0===e.responsive?1:e.responsive,visible:!1!==e.visible}},ResponsiveLayout.prototype.initializeRow=function(t){var e;"calc"!==t.type&&((e=document.createElement("div")).classList.add("tabulator-responsive-collapse"),t.modules.responsiveLayout={element:e,open:this.collapseStartOpen},this.collapseStartOpen||(e.style.display="none"))},ResponsiveLayout.prototype.layoutRow=function(t){var e=t.getElement();t.modules.responsiveLayout&&(e.appendChild(t.modules.responsiveLayout.element),this.generateCollapsedRowContent(t))},ResponsiveLayout.prototype.updateColumnVisibility=function(t,e){t.modules.responsive&&(t.modules.responsive.visible=e,this.initialize())},ResponsiveLayout.prototype.hideColumn=function(t){var e=this.hiddenColumns.length;t.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(t),this.generateCollapsedContent(),this.collapseHandleColumn&&!e&&this.collapseHandleColumn.show())},ResponsiveLayout.prototype.showColumn=function(t){var e;t.show(!1,!0),t.setWidth(t.getWidth()),"collapse"===this.mode&&((e=this.hiddenColumns.indexOf(t))>-1&&this.hiddenColumns.splice(e,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())},ResponsiveLayout.prototype.update=function(){for(var t=!0;t;){var e="fitColumns"==this.table.modules.layout.getMode()?this.table.columnManager.getFlexBaseWidth():this.table.columnManager.getWidth(),o=(this.table.options.headerVisible?this.table.columnManager.element.clientWidth:this.table.element.clientWidth)-e;if(o<0){var i=this.columns[this.index];i?(this.hideColumn(i),this.index++):t=!1}else{var n=this.columns[this.index-1];n&&o>0&&o>=n.getWidth()?(this.showColumn(n),this.index--):t=!1}this.table.rowManager.activeRowsCount||this.table.rowManager.renderEmptyScroll()}},ResponsiveLayout.prototype.generateCollapsedContent=function(){var t=this;this.table.rowManager.getDisplayRows().forEach((function(e){t.generateCollapsedRowContent(e)}))},ResponsiveLayout.prototype.generateCollapsedRowContent=function(t){var e,o;if(t.modules.responsiveLayout){for(e=t.modules.responsiveLayout.element;e.firstChild;)e.removeChild(e.firstChild);(o=this.collapseFormatter(this.generateCollapsedRowData(t)))&&e.appendChild(o)}},ResponsiveLayout.prototype.generateCollapsedRowData=function(t){var e,o=this,i=t.getData(),n=[];return this.hiddenColumns.forEach((function(s){var a=s.getFieldValue(i);s.definition.title&&s.field&&(s.modules.format&&o.table.options.responsiveLayoutCollapseUseFormatters?(e={value:!1,data:{},getValue:function(){return a},getData:function(){return i},getElement:function(){return document.createElement("div")},getRow:function(){return t.getComponent()},getColumn:function(){return s.getComponent()}},n.push({field:s.field,title:s.definition.title,value:s.modules.format.formatter.call(o.table.modules.format,e,s.modules.format.params)})):n.push({field:s.field,title:s.definition.title,value:a}))})),n},ResponsiveLayout.prototype.formatCollapsedData=function(t){var e=document.createElement("table");return t.forEach((function(t){var o,i=document.createElement("tr"),n=document.createElement("td"),s=document.createElement("td"),a=document.createElement("strong");n.appendChild(a),this.table.modules.localize.bind("columns|"+t.field,(function(e){a.innerText=e||t.title})),t.value instanceof Node?((o=document.createElement("div")).appendChild(t.value),s.appendChild(o)):s.innerHTML=t.value,i.appendChild(n),i.appendChild(s),e.appendChild(i)}),this),Object.keys(t).length?e:""},Tabulator.prototype.registerModule("responsiveLayout",ResponsiveLayout);var SelectRow=function(t){this.table=t,this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],this.headerCheckboxElement=null};SelectRow.prototype.clearSelectionData=function(t){this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],t||this._rowSelectionChanged()},SelectRow.prototype.initializeRow=function(t){var e=this,o=t.getElement(),i=function t(){setTimeout((function(){e.selecting=!1}),50),document.body.removeEventListener("mouseup",t)};t.modules.select={selected:!1},e.table.options.selectableCheck.call(this.table,t.getComponent())?(o.classList.add("tabulator-selectable"),o.classList.remove("tabulator-unselectable"),e.table.options.selectable&&"highlight"!=e.table.options.selectable&&("click"===e.table.options.selectableRangeMode?o.addEventListener("click",(function(o){if(o.shiftKey){e.table._clearSelection(),e.lastClickedRow=e.lastClickedRow||t;var i=e.table.rowManager.getDisplayRowIndex(e.lastClickedRow),n=e.table.rowManager.getDisplayRowIndex(t),s=i<=n?i:n,a=i>=n?i:n,r=e.table.rowManager.getDisplayRows().slice(0).splice(s,a-s+1);o.ctrlKey||o.metaKey?(r.forEach((function(o){o!==e.lastClickedRow&&(!0===e.table.options.selectable||e.isRowSelected(t)||e.selectedRows.length<e.table.options.selectable)&&e.toggleRow(o)})),e.lastClickedRow=t):(e.deselectRows(void 0,!0),!0!==e.table.options.selectable&&r.length>e.table.options.selectable&&(r=r.slice(0,e.table.options.selectable)),e.selectRows(r)),e.table._clearSelection()}else o.ctrlKey||o.metaKey?(e.toggleRow(t),e.lastClickedRow=t):(e.deselectRows(void 0,!0),e.selectRows(t),e.lastClickedRow=t)})):(o.addEventListener("click",(function(o){e.table.modExists("edit")&&e.table.modules.edit.getCurrentCell()||e.table._clearSelection(),e.selecting||e.toggleRow(t)})),o.addEventListener("mousedown",(function(o){if(o.shiftKey)return e.table._clearSelection(),e.selecting=!0,e.selectPrev=[],document.body.addEventListener("mouseup",i),document.body.addEventListener("keyup",i),e.toggleRow(t),!1})),o.addEventListener("mouseenter",(function(o){e.selecting&&(e.table._clearSelection(),e.toggleRow(t),e.selectPrev[1]==t&&e.toggleRow(e.selectPrev[0]))})),o.addEventListener("mouseout",(function(o){e.selecting&&(e.table._clearSelection(),e.selectPrev.unshift(t))}))))):(o.classList.add("tabulator-unselectable"),o.classList.remove("tabulator-selectable"))},SelectRow.prototype.toggleRow=function(t){this.table.options.selectableCheck.call(this.table,t.getComponent())&&(t.modules.select&&t.modules.select.selected?this._deselectRow(t):this._selectRow(t))},SelectRow.prototype.selectRows=function(t){var e,o=this;switch(void 0===t?"undefined":_typeof(t)){case"undefined":this.table.rowManager.rows.forEach((function(t){o._selectRow(t,!0,!0)})),this._rowSelectionChanged();break;case"string":(e=this.table.rowManager.findRow(t))?this._selectRow(e,!0,!0):this.table.rowManager.getRows(t).forEach((function(t){o._selectRow(t,!0,!0)})),this._rowSelectionChanged();break;default:Array.isArray(t)?(t.forEach((function(t){o._selectRow(t,!0,!0)})),this._rowSelectionChanged()):this._selectRow(t,!1,!0)}},SelectRow.prototype._selectRow=function(t,e,o){if(!isNaN(this.table.options.selectable)&&!0!==this.table.options.selectable&&!o&&this.selectedRows.length>=this.table.options.selectable){if(!this.table.options.selectableRollingSelection)return!1;this._deselectRow(this.selectedRows[0])}var i=this.table.rowManager.findRow(t);i?-1==this.selectedRows.indexOf(i)&&(i.getElement().classList.add("tabulator-selected"),i.modules.select||(i.modules.select={}),i.modules.select.selected=!0,i.modules.select.checkboxEl&&(i.modules.select.checkboxEl.checked=!0),this.selectedRows.push(i),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(i,!0),e||this.table.options.rowSelected.call(this.table,i.getComponent()),this._rowSelectionChanged(e)):e||console.warn("Selection Error - No such row found, ignoring selection:"+t)},SelectRow.prototype.isRowSelected=function(t){return-1!==this.selectedRows.indexOf(t)},SelectRow.prototype.deselectRows=function(t,e){var o,i=this;if(void 0===t){o=i.selectedRows.length;for(var n=0;n<o;n++)i._deselectRow(i.selectedRows[0],!0);i._rowSelectionChanged(e)}else Array.isArray(t)?(t.forEach((function(t){i._deselectRow(t,!0)})),i._rowSelectionChanged(e)):i._deselectRow(t,e)},SelectRow.prototype._deselectRow=function(t,e){var o,i=this.table.rowManager.findRow(t);i?(o=this.selectedRows.findIndex((function(t){return t==i})))>-1&&(i.getElement().classList.remove("tabulator-selected"),i.modules.select||(i.modules.select={}),i.modules.select.selected=!1,i.modules.select.checkboxEl&&(i.modules.select.checkboxEl.checked=!1),this.selectedRows.splice(o,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(i,!1),e||this.table.options.rowDeselected.call(this.table,i.getComponent()),this._rowSelectionChanged(e)):e||console.warn("Deselection Error - No such row found, ignoring selection:"+t)},SelectRow.prototype.getSelectedData=function(){var t=[];return this.selectedRows.forEach((function(e){t.push(e.getData())})),t},SelectRow.prototype.getSelectedRows=function(){var t=[];return this.selectedRows.forEach((function(e){t.push(e.getComponent())})),t},SelectRow.prototype._rowSelectionChanged=function(t){this.headerCheckboxElement&&(0===this.selectedRows.length?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),t||this.table.options.rowSelectionChanged.call(this.table,this.getSelectedData(),this.getSelectedRows())},SelectRow.prototype.registerRowSelectCheckbox=function(t,e){t._row.modules.select||(t._row.modules.select={}),t._row.modules.select.checkboxEl=e},SelectRow.prototype.registerHeaderSelectCheckbox=function(t){this.headerCheckboxElement=t},SelectRow.prototype.childRowSelection=function(t,e){var o=this.table.modules.dataTree.getChildren(t,!0);if(e){var i=o,n=Array.isArray(i),s=0;for(i=n?i:i[Symbol.iterator]();;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if((s=i.next()).done)break;a=s.value}var r=a;this._selectRow(r,!0)}}else{var l=o,u=Array.isArray(l),c=0;for(l=u?l:l[Symbol.iterator]();;){var d;if(u){if(c>=l.length)break;d=l[c++]}else{if((c=l.next()).done)break;d=c.value}var h=d;this._deselectRow(h,!0)}}},Tabulator.prototype.registerModule("selectRow",SelectRow);var Sort=function(t){this.table=t,this.sortList=[],this.changed=!1};Sort.prototype.initializeColumn=function(t,e){var o,i,n=this,s=!1;switch(_typeof(t.definition.sorter)){case"string":n.sorters[t.definition.sorter]?s=n.sorters[t.definition.sorter]:console.warn("Sort Error - No such sorter found: ",t.definition.sorter);break;case"function":s=t.definition.sorter}t.modules.sort={sorter:s,dir:"none",params:t.definition.sorterParams||{},startingDir:t.definition.headerSortStartingDir||"asc",tristate:void 0!==t.definition.headerSortTristate?t.definition.headerSortTristate:this.table.options.headerSortTristate},(void 0===t.definition.headerSort?!1!==this.table.options.headerSort:!1!==t.definition.headerSort)&&((o=t.getElement()).classList.add("tabulator-sortable"),(i=document.createElement("div")).classList.add("tabulator-col-sorter"),"object"==_typeof(this.table.options.headerSortElement)?i.appendChild(this.table.options.headerSortElement):i.innerHTML=this.table.options.headerSortElement,e.appendChild(i),t.modules.sort.element=i,o.addEventListener("click",(function(e){var o="",i=[],s=!1;if(t.modules.sort){if(t.modules.sort.tristate)o="none"==t.modules.sort.dir?t.modules.sort.startingDir:t.modules.sort.dir==t.modules.sort.startingDir?"asc"==t.modules.sort.dir?"desc":"asc":"none";else switch(t.modules.sort.dir){case"asc":o="desc";break;case"desc":o="asc";break;default:o=t.modules.sort.startingDir}n.table.options.columnHeaderSortMulti&&(e.shiftKey||e.ctrlKey)?((s=(i=n.getSort()).findIndex((function(e){return e.field===t.getField()})))>-1?(i[s].dir=o,s!=i.length-1&&(s=i.splice(s,1)[0],"none"!=o&&i.push(s))):"none"!=o&&i.push({column:t,dir:o}),n.setSort(i)):"none"==o?n.clear():n.setSort(t,o),n.table.rowManager.sorterRefresh(!n.sortList.length)}})))},Sort.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},Sort.prototype.getSort=function(){var t=[];return this.sortList.forEach((function(e){e.column&&t.push({column:e.column.getComponent(),field:e.column.getField(),dir:e.dir})})),t},Sort.prototype.setSort=function(t,e){var o=this,i=[];Array.isArray(t)||(t=[{column:t,dir:e}]),t.forEach((function(t){var e;(e=o.table.columnManager.findColumn(t.column))?(t.column=e,i.push(t),o.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",t.column)})),o.sortList=i,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.sort&&this.table.modules.persistence.save("sort")},Sort.prototype.clear=function(){this.setSort([])},Sort.prototype.findSorter=function(t){var e,o=this.table.rowManager.activeRows[0],i="string";if(o&&(o=o.getData(),t.getField()))switch(void 0===(e=t.getFieldValue(o))?"undefined":_typeof(e)){case"undefined":i="string";break;case"boolean":i="boolean";break;default:isNaN(e)||""===e?e.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(i="alphanum"):i="number"}return this.sorters[i]},Sort.prototype.sort=function(t){var e=this,o=this.table.options.sortOrderReverse?e.sortList.slice().reverse():e.sortList,i=[],n=[];e.table.options.dataSorting&&e.table.options.dataSorting.call(e.table,e.getSort()),e.clearColumnHeaders(),e.table.options.ajaxSorting?o.forEach((function(t,o){e.setColumnHeader(t.column,t.dir)})):(o.forEach((function(t,o){var n=t.column.modules.sort;t.column&&n&&(n.sorter||(n.sorter=e.findSorter(t.column)),t.params="function"==typeof n.params?n.params(t.column.getComponent(),t.dir):n.params,i.push(t)),e.setColumnHeader(t.column,t.dir)})),i.length&&e._sortItems(t,i)),e.table.options.dataSorted&&(t.forEach((function(t){n.push(t.getComponent())})),e.table.options.dataSorted.call(e.table,e.getSort(),n))},Sort.prototype.clearColumnHeaders=function(){this.table.columnManager.getRealColumns().forEach((function(t){t.modules.sort&&(t.modules.sort.dir="none",t.getElement().setAttribute("aria-sort","none"))}))},Sort.prototype.setColumnHeader=function(t,e){t.modules.sort.dir=e,t.getElement().setAttribute("aria-sort",e)},Sort.prototype._sortItems=function(t,e){var o=this,i=e.length-1;t.sort((function(t,n){for(var s,a=i;a>=0;a--){var r=e[a];if(0!==(s=o._sortRow(t,n,r.column,r.dir,r.params)))break}return s}))},Sort.prototype._sortRow=function(t,e,o,i,n){var s,a,r="asc"==i?t:e,l="asc"==i?e:t;return t=void 0!==(t=o.getFieldValue(r.getData()))?t:"",e=void 0!==(e=o.getFieldValue(l.getData()))?e:"",s=r.getComponent(),a=l.getComponent(),o.modules.sort.sorter.call(this,t,e,s,a,o.getComponent(),i,n)},Sort.prototype.sorters={number:function(t,e,o,i,n,s,a){var r=a.alignEmptyValues,l=a.decimalSeparator,u=a.thousandSeparator,c=0;if(t=String(t),e=String(e),u&&(t=t.split(u).join(""),e=e.split(u).join("")),l&&(t=t.split(l).join("."),e=e.split(l).join(".")),t=parseFloat(t),e=parseFloat(e),isNaN(t))c=isNaN(e)?0:-1;else{if(!isNaN(e))return t-e;c=1}return("top"===r&&"desc"===s||"bottom"===r&&"asc"===s)&&(c*=-1),c},string:function(t,e,o,i,n,s,a){var r,l=a.alignEmptyValues,u=0;if(t){if(e){switch(_typeof(a.locale)){case"boolean":a.locale&&(r=this.table.modules.localize.getLocale());break;case"string":r=a.locale}return String(t).toLowerCase().localeCompare(String(e).toLowerCase(),r)}u=1}else u=e?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(u*=-1),u},date:function(t,e,o,i,n,s,a){return a.format||(a.format="DD/MM/YYYY"),this.sorters.datetime.call(this,t,e,o,i,n,s,a)},time:function(t,e,o,i,n,s,a){return a.format||(a.format="HH:mm"),this.sorters.datetime.call(this,t,e,o,i,n,s,a)},datetime:function(t,e,o,i,n,s,a){var r=a.format||"DD/MM/YYYY HH:mm:ss",l=a.alignEmptyValues,u=0;if("undefined"!=typeof moment){if(t=moment(t,r),e=moment(e,r),t.isValid()){if(e.isValid())return t-e;u=1}else u=e.isValid()?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(u*=-1),u}console.error("Sort Error - 'datetime' sorter is dependant on moment.js")},boolean:function(t,e,o,i,n,s,a){return(!0===t||"true"===t||"True"===t||1===t?1:0)-(!0===e||"true"===e||"True"===e||1===e?1:0)},array:function(t,e,o,i,n,s,a){var r=a.type||"length",l=a.alignEmptyValues,u=0;function c(t){switch(r){case"length":return t.length;case"sum":return t.reduce((function(t,e){return t+e}));case"max":return Math.max.apply(null,t);case"min":return Math.min.apply(null,t);case"avg":return t.reduce((function(t,e){return t+e}))/t.length}}if(Array.isArray(t)){if(Array.isArray(e))return(t?c(t):0)-(e?c(e):0);l=1}else l=Array.isArray(e)?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(u*=-1),u},exists:function(t,e,o,i,n,s,a){return(void 0===t?0:1)-(void 0===e?0:1)},alphanum:function(t,e,o,i,n,s,a){var r,l,u,c,d,h=0,p=/(\d+)|(\D+)/g,m=/\d/,f=a.alignEmptyValues,g=0;if(t||0===t){if(e||0===e){if(isFinite(t)&&isFinite(e))return t-e;if((r=String(t).toLowerCase())===(l=String(e).toLowerCase()))return 0;if(!m.test(r)||!m.test(l))return r>l?1:-1;for(r=r.match(p),l=l.match(p),d=r.length>l.length?l.length:r.length;h<d;)if((u=r[h])!==(c=l[h++]))return isFinite(u)&&isFinite(c)?("0"===u.charAt(0)&&(u="."+u),"0"===c.charAt(0)&&(c="."+c),u-c):u>c?1:-1;return r.length>l.length}g=1}else g=e||0===e?-1:0;return("top"===f&&"desc"===s||"bottom"===f&&"asc"===s)&&(g*=-1),g}},Tabulator.prototype.registerModule("sort",Sort);var Validate=function(t){this.table=t,this.invalidCells=[]};Validate.prototype.initializeColumn=function(t){var e,o=this,i=[];t.definition.validator&&(Array.isArray(t.definition.validator)?t.definition.validator.forEach((function(t){(e=o._extractValidator(t))&&i.push(e)})):(e=this._extractValidator(t.definition.validator))&&i.push(e),t.modules.validate=!!i.length&&i)},Validate.prototype._extractValidator=function(t){var e,o,i;switch(void 0===t?"undefined":_typeof(t)){case"string":return(i=t.indexOf(":"))>-1?(e=t.substring(0,i),o=t.substring(i+1)):e=t,this._buildValidator(e,o);case"function":return this._buildValidator(t);case"object":return this._buildValidator(t.type,t.parameters)}},Validate.prototype._buildValidator=function(t,e){var o="function"==typeof t?t:this.validators[t];return o?{type:"function"==typeof t?"function":t,func:o,params:e}:(console.warn("Validator Setup Error - No matching validator found:",t),!1)},Validate.prototype.validate=function(t,e,o){var i=this,n=[],s=this.invalidCells.indexOf(e);return t&&t.forEach((function(t){t.func.call(i,e.getComponent(),o,t.params)||n.push({type:t.type,parameters:t.params})})),n=!n.length||n,e.modules.validate||(e.modules.validate={}),!0===n?(e.modules.validate.invalid=!1,e.getElement().classList.remove("tabulator-validation-fail"),s>-1&&this.invalidCells.splice(s,1)):(e.modules.validate.invalid=!0,"manual"!==this.table.options.validationMode&&e.getElement().classList.add("tabulator-validation-fail"),-1==s&&this.invalidCells.push(e)),n},Validate.prototype.getInvalidCells=function(){var t=[];return this.invalidCells.forEach((function(e){t.push(e.getComponent())})),t},Validate.prototype.clearValidation=function(t){var e;t.modules.validate&&t.modules.validate.invalid&&(t.getElement().classList.remove("tabulator-validation-fail"),t.modules.validate.invalid=!1,(e=this.invalidCells.indexOf(t))>-1&&this.invalidCells.splice(e,1))},Validate.prototype.validators={integer:function(t,e,o){return""===e||null==e||"number"==typeof(e=Number(e))&&isFinite(e)&&Math.floor(e)===e},float:function(t,e,o){return""===e||null==e||"number"==typeof(e=Number(e))&&isFinite(e)&&e%1!=0},numeric:function(t,e,o){return""===e||null==e||!isNaN(e)},string:function(t,e,o){return""===e||null==e||isNaN(e)},max:function(t,e,o){return""===e||null==e||parseFloat(e)<=o},min:function(t,e,o){return""===e||null==e||parseFloat(e)>=o},starts:function(t,e,o){return""===e||null==e||String(e).toLowerCase().startsWith(String(o).toLowerCase())},ends:function(t,e,o){return""===e||null==e||String(e).toLowerCase().endsWith(String(o).toLowerCase())},minLength:function(t,e,o){return""===e||null==e||String(e).length>=o},maxLength:function(t,e,o){return""===e||null==e||String(e).length<=o},in:function(t,e,o){return""===e||null==e||("string"==typeof o&&(o=o.split("|")),""===e||o.indexOf(e)>-1)},regex:function(t,e,o){return""===e||null==e||new RegExp(o).test(e)},unique:function(t,e,o){if(""===e||null==e)return!0;var i=!0,n=t.getData(),s=t.getColumn()._getSelf();return this.table.rowManager.rows.forEach((function(t){var o=t.getData();o!==n&&e==s.getFieldValue(o)&&(i=!1)})),i},required:function(t,e,o){return""!==e&&null!=e}},Tabulator.prototype.registerModule("validate",Validate);export default Tabulator;