Yellow Bike Project Hours and Transaction Database for Community Bike Shops
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

6 lines
148 KiB

/* Tabulator v3.3.1 (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};!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(t,o){!function(){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),i=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var n=arguments[1],s=0;s<i;){var a=e[s];if(t.call(n,a,s,e))return a;s++}return o}});var i=function(e){this.table=e,this.headersElement=t("<div class='tabulator-headers'></div>"),this.element=t("<div class='tabulator-header'></div>"),this.rowManager=null,this.columns=[],this.columnsByIndex=[],this.columnsByField=[],this.scrollLeft=0,this.element.prepend(this.headersElement)};i.prototype.setRowManager=function(t){this.rowManager=t},i.prototype.getElement=function(){return this.element},i.prototype.getHeadersElement=function(){return this.headersElement},i.prototype.scrollHorizontal=function(t){var e=0,o=this.element[0].scrollWidth-this.table.element.innerWidth();this.element.scrollLeft(t),t>o?(e=t-o,this.element.css("margin-left",-e)):this.element.css("margin-left",0),this.scrollLeft=t,this.table.extExists("frozenColumns")&&this.table.extensions.frozenColumns.layout()},i.prototype.setColumns=function(t,e){var o=this;o.headersElement.empty(),o.columns=[],o.columnsByIndex=[],o.columnsByField=[],o.table.extExists("frozenColumns")&&o.table.extensions.frozenColumns.reset(),t.forEach(function(t,e){o._addColumn(t)}),o._reIndexColumns(),o.table.options.responsiveLayout&&o.table.extExists("responsiveLayout",!0)&&o.table.extensions.responsiveLayout.initialize(),o.redraw(!0)},i.prototype._addColumn=function(t,e,o){var i=new s(t,this),n=o?this.findColumnIndex(o):o;if(o&&n>-1){var a=this.columns.indexOf(o.getTopColumn());e?(this.columns.splice(a,0,i),o.getElement().before(i.getElement())):(this.columns.splice(a+1,0,i),o.getElement().after(i.getElement()))}else e?(this.columns.unshift(i),this.headersElement.prepend(i.getElement())):(this.columns.push(i),this.headersElement.append(i.getElement()));return i},i.prototype.registerColumnField=function(t){t.definition.field&&(this.columnsByField[t.definition.field]=t)},i.prototype.registerColumnPosition=function(t){this.columnsByIndex.push(t)},i.prototype._reIndexColumns=function(){this.columnsByIndex=[],this.columns.forEach(function(t){t.reRegisterPosition()})},i.prototype._verticalAlignHeaders=function(){var t=this;t.columns.forEach(function(t){t.clearVerticalAlign()}),t.columns.forEach(function(e){e.verticalAlign(t.table.options.columnVertAlign)}),t.rowManager.adjustTableSize()},i.prototype.findColumn=function(t){var e=this;if("object"!=(void 0===t?"undefined":_typeof(t)))return this.columnsByField[t]||!1;if(t instanceof s)return t;if(t instanceof n)return t._getSelf()||!1;if(t instanceof jQuery){return e.columns.find(function(e){return e.element===t})||!1}return!1},i.prototype.getColumnByField=function(t){return this.columnsByField[t]},i.prototype.getColumnByIndex=function(t){return this.columnsByIndex[t]},i.prototype.getColumns=function(){return this.columns},i.prototype.findColumnIndex=function(t){return this.columnsByIndex.findIndex(function(e){return t===e})},i.prototype.getRealColumns=function(){return this.columnsByIndex},i.prototype.traverse=function(t){this.columnsByIndex.forEach(function(e,o){t(e,o)})},i.prototype.getDefinitions=function(t){var e=this,o=[];return e.columnsByIndex.forEach(function(e){(!t||t&&e.visible)&&o.push(e.getDefinition())}),o},i.prototype.getDefinitionTree=function(){var t=this,e=[];return t.columns.forEach(function(t){e.push(t.getDefinition(!0))}),e},i.prototype.getComponents=function(){var t=this,e=[];return t.columnsByIndex.forEach(function(t){e.push(t.getComponent())}),e},i.prototype.getWidth=function(){var t=0;return this.columnsByIndex.forEach(function(e){e.visible&&(t+=e.getWidth())}),t},i.prototype.moveColumn=function(t,e,o){this._moveColumnInArray(this.columns,t,e,o),this._moveColumnInArray(this.columnsByIndex,t,e,o,!0),this.table.options.columnMoved(t.getComponent()),this.table.options.persistentLayout&&this.table.extExists("persistentLayout",!0)&&this.table.extensions.persistentLayout.save()},i.prototype._moveColumnInArray=function(t,e,o,i,n){var s,a=t.indexOf(e);a>-1&&(t.splice(a,1),s=t.indexOf(o),s>-1?i&&(s+=1):s=a,t.splice(s,0,e),n&&this.table.rowManager.rows.forEach(function(t){if(t.cells.length){var e=t.cells.splice(a,1)[0];t.cells.splice(s,0,e)}}))},i.prototype.generateCells=function(t){var e=this,o=[];return e.columnsByIndex.forEach(function(e){o.push(e.generateCell(t))}),o},i.prototype.getFlexBaseWidth=function(){var t=this,e=t.table.element.innerWidth(),o=0;return t.rowManager.element[0].scrollHeight>t.rowManager.element.innerHeight()&&(e-=t.rowManager.element[0].offsetWidth-t.rowManager.element[0].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},i.prototype.addColumn=function(t,e,o){var i=this._addColumn(t,e,o);this._reIndexColumns(),this.table.options.responsiveLayout&&this.table.extExists("responsiveLayout",!0)&&this.table.extensions.responsiveLayout.initialize(),this.table.extExists("columnCalcs")&&this.table.extensions.columnCalcs.recalc(this.table.rowManager.displayRows),this.redraw(),"fitColumns"!=this.table.extensions.layout.getMode()&&i.reinitializeWidth(),this._verticalAlignHeaders(),this.table.rowManager.reinitialize()},i.prototype.deregisterColumn=function(t){var e,o=t.getField();o&&delete this.columnsByField[o],e=this.columnsByIndex.indexOf(t),e>-1&&this.columnsByIndex.splice(e,1),e=this.columns.indexOf(t),e>-1&&this.columns.splice(e,1),this.table.options.responsiveLayout&&this.table.extExists("responsiveLayout",!0)&&this.table.extensions.responsiveLayout.initialize(),this.redraw()},i.prototype.redraw=function(t){t&&(this.element.is(":visible")&&this._verticalAlignHeaders(),this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),"fitColumns"==this.table.extensions.layout.getMode()?this.table.extensions.layout.layout():t?this.table.extensions.layout.layout():this.table.options.responsiveLayout&&this.table.extExists("responsiveLayout",!0)&&this.table.extensions.responsiveLayout.update(),this.table.extExists("frozenColumns")&&this.table.extensions.frozenColumns.layout(),this.table.extExists("columnCalcs")&&this.table.extensions.columnCalcs.recalc(this.table.rowManager.displayRows),t&&(this.table.options.persistentLayout&&this.table.extExists("persistentLayout",!0)&&this.table.extensions.persistentLayout.save(),this.table.extExists("columnCalcs")&&this.table.extensions.columnCalcs.redraw()),this.table.footerManager.redraw()};var n=function(t){this.column=t,this.type="ColumnComponent"};n.prototype.getElement=function(){return this.column.getElement()},n.prototype.getDefinition=function(){return this.column.getDefinition()},n.prototype.getField=function(){return this.column.getField()},n.prototype.getCells=function(){var t=[];return this.column.cells.forEach(function(e){t.push(e.getComponent())}),t},n.prototype.getVisibility=function(){return this.column.visible},n.prototype.show=function(){this.column.show()},n.prototype.hide=function(){this.column.hide()},n.prototype.toggle=function(){this.column.visible?this.column.hide():this.column.show()},n.prototype.delete=function(){this.column.delete()},n.prototype._getSelf=function(){return this.column};var s=function e(o,i){var n=this;this.table=i.table,this.definition=o,this.parent=i,this.type="column",this.columns=[],this.cells=[],this.element=t("<div class='tabulator-col' role='columnheader' aria-sort='none'></div>"),this.contentElement=!1,this.groupElement=t("<div class='tabulator-col-group-cols'></div>"),this.isGroup=!1,this.tooltip=!1,this.hozAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.setField(this.definition.field),this.extensions={},this.cellEvents={cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1},this.width=null,this.minWidth=null,this.widthFixed=!1,this.visible=!0,o.columns?(this.isGroup=!0,o.columns.forEach(function(t,o){var i=new e(t,n);n.attachColumn(i)}),n.checkColumnVisibility()):i.registerColumnField(this),o.rowHandle&&!1!==this.table.options.movableRows&&this.table.extExists("moveRow")&&this.table.extensions.moveRow.setHandle(!0),this._mapDepricatedFunctionality(),this._buildHeader()};s.prototype._mapDepricatedFunctionality=function(t){this.definition.tooltipHeader&&(console.warn("The%c tooltipHeader%c column definition property has been depricated and will be removed in version 4.0, use %c headerTooltio%c instead.","font-weight:bold;","font-weight:regular;","font-weight:bold;","font-weight:regular;"),void 0===this.definition.headerTooltip&&(this.definition.headerTooltip=this.definition.tooltipHeader))},s.prototype.setField=function(t){this.field=t,this.fieldStructure=t?t.split("."):[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNesteData:this._setFlatData},s.prototype.registerColumnPosition=function(t){this.parent.registerColumnPosition(t)},s.prototype.registerColumnField=function(t){this.parent.registerColumnField(t)},s.prototype.reRegisterPosition=function(){this.isGroup?this.columns.forEach(function(t){t.reRegisterPosition()}):this.registerColumnPosition(this)},s.prototype._buildHeader=function(){var t,e,o,i=this,n=i.definition;i.element.empty(),i.contentElement=i._buildColumnHeaderContent(),i.element.append(i.contentElement),i.isGroup?i._buildGroupHeader():i._buildColumnHeader();var s=n.headerTooltip||!1===n.tooltip?n.headerTooltip:i.table.options.tooltipsHeader;s?!0===s?n.field?i.table.extensions.localize.bind("columns."+n.field,function(t){i.element.attr("title",t||n.title)}):i.element.attr("title",n.title):("function"==typeof s&&(s=s(i.getComponent())),i.element.attr("title",s)):i.element.attr("title",""),i.table.options.resizableColumns&&i.table.extExists("resizeColumns")&&i.table.extensions.resizeColumns.initializeColumn("header",i,i.element),n.headerFilter&&i.table.extExists("filter")&&i.table.extExists("edit")&&(void 0!==n.headerFilterPlaceholder&&n.field&&i.table.extensions.localize.setHeaderFilterColumnPlaceholder(n.field,n.headerFilterPlaceholder),i.table.extensions.filter.initializeColumn(i)),i.table.extExists("frozenColumns")&&i.table.extensions.frozenColumns.initializeColumn(i),i.table.options.movableColumns&&!i.isGroup&&i.table.extExists("moveColumn")&&i.table.extensions.moveColumn.initializeColumn(i),(n.topCalc||n.bottomCalc)&&i.table.extExists("columnCalcs")&&i.table.extensions.columnCalcs.initializeColumn(i),"function"==typeof n.headerClick&&i.element.on("click",function(t){n.headerClick(t,i.getComponent())}),"function"==typeof n.headerDblClick&&i.element.on("dblclick",function(t){n.headerDblClick(t,i.getComponent())}),"function"==typeof n.headerContext&&i.element.on("contextmenu",function(t){n.headerContext(t,i.getComponent())}),"function"==typeof n.headerTap&&(o=!1,i.element.on("touchstart",function(t){o=!0}),i.element.on("touchend",function(t){o&&n.headerTap(t,i.getComponent()),o=!1})),"function"==typeof n.headerDblTap&&(t=null,i.element.on("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.on("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,n.headerTapHold(t,i.getComponent())},1e3)}),i.element.on("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.cellTap&&(i.cellEvents.cellTap=n.cellTap),"function"==typeof n.cellDblTap&&(i.cellEvents.cellDblTap=n.cellDblTap),"function"==typeof n.cellTapHold&&(i.cellEvents.cellTapHold=n.cellTapHold)},s.prototype._buildColumnHeader=function(){var t=this,e=t.definition,o=t.table;o.extExists("sort")&&o.extensions.sort.initializeColumn(t,t.contentElement),o.extExists("format")&&o.extensions.format.initializeColumn(t),void 0!==e.editor&&o.extExists("edit")&&o.extensions.edit.initializeColumn(t),void 0!==e.validator&&o.extExists("validate")&&o.extensions.validate.initializeColumn(t),void 0!==e.mutator&&o.extExists("mutator")&&o.extensions.mutator.initializeColumn(t),void 0!==e.accessor&&o.extExists("accessor")&&o.extensions.accessor.initializeColumn(t),void 0!==e.visible&&(e.visible?t.show():t.hide()),e.cssClass&&t.element.addClass(e.cssClass),t.setMinWidth(void 0===e.minWidth?t.table.options.columnMinWidth:e.minWidth),t.reinitializeWidth(),t.tooltip=t.definition.tooltip||!1===t.definition.tooltip?t.definition.tooltip:t.table.options.tooltips,t.hozAlign=void 0===t.definition.align?"":t.definition.align},s.prototype._buildColumnHeaderContent=function(){var e=this,o=(e.definition,e.table,t("<div class='tabulator-col-content'></div>"));return o.append(e._buildColumnHeaderTitle()),o},s.prototype._buildColumnHeaderTitle=function(){var e=this,o=e.definition,i=e.table,n=t("<div class='tabulator-col-title'></div>");if(o.editableTitle){var s=t("<input class='tabulator-title-editor'>");s.on("click",function(e){e.stopPropagation(),t(this).focus()}),s.on("change",function(){var n=t(this).val();o.title=n,i.options.columnTitleChanged(e.getComponent())}),n.append(s),o.field?i.extensions.localize.bind("columns."+o.field,function(t){s.val(t||o.title||"&nbsp")}):s.val(o.title||"&nbsp")}else o.field?i.extensions.localize.bind("columns."+o.field,function(t){e._formatColumnHeaderTitle(n,t||o.title||"&nbsp")}):e._formatColumnHeaderTitle(n,o.title||"&nbsp");return n},s.prototype._formatColumnHeaderTitle=function(t,e){var o,i;this.definition.titleFormatter&&this.table.extExists("format")?(o=this.table.extensions.format.getFormatter(this.definition.titleFormatter),i=o.call(this.table.extensions.format,{getValue:function(){return e},getElement:function(){return t}},this.definition.titleFormatterParams||{}),t.append(i)):t.html(e)},s.prototype._buildGroupHeader=function(){var t=this,e=t.definition;t.table;t.element.addClass("tabulator-col-group").attr("role","columngroup").attr("aria-title",e.title),t.element.append(t.groupElement)},s.prototype._getFlatData=function(t){return t[this.field]},s.prototype._getNestedData=function(t){for(var e,o=t,i=this.fieldStructure,n=i.length,s=0;s<n&&(o=o[i[s]],e=o,o);s++);return e},s.prototype._setFlatData=function(t,e){t[this.field]=e},s.prototype._setNesteData=function(t,e){for(var o=t,i=this.fieldStructure,n=i.length,s=0;s<n;s++)s==n-1?o[i[s]]=e:(o[i[s]]||(o[i[s]]={}),o=o[i[s]])},s.prototype.attachColumn=function(t){var e=this;e.groupElement?(e.columns.push(t),e.groupElement.append(t.getElement())):console.warn("Column Warning - Column being attached to another column instead of column group")},s.prototype.verticalAlign=function(t){this.parent.isGroup?this.element.css("height",this.parent.getGroupElement().innerHeight()):this.element.css("height",this.parent.getHeadersElement().innerHeight()),this.isGroup||"top"===t||("bottom"===t?this.element.css({"padding-top":this.element.innerHeight()-this.contentElement.outerHeight()}):this.element.css({"padding-top":(this.element.innerHeight()-this.contentElement.outerHeight())/2})),this.columns.forEach(function(e){e.verticalAlign(t)})},s.prototype.clearVerticalAlign=function(){this.element.css("padding-top",""),this.element.css("height",""),this.columns.forEach(function(t){t.clearVerticalAlign()})},s.prototype.getElement=function(){return this.element},s.prototype.getGroupElement=function(){return this.groupElement},s.prototype.getField=function(){return this.field},s.prototype.getFirstColumn=function(){return this.isGroup?!!this.columns.length&&this.columns[0].getFirstColumn():this},s.prototype.getLastColumn=function(){return this.isGroup?!!this.columns.length&&this.columns[this.columns.length-1].getLastColumn():this},s.prototype.getColumns=function(){return this.columns},s.prototype.getCells=function(){return this.cells},s.prototype.getTopColumn=function(){return this.parent.isGroup?this.parent.getTopColumn():this},s.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},s.prototype.checkColumnVisibility=function(){var t=!1;this.columns.forEach(function(e){e.visible&&(t=!0)}),t?(this.show(),this.parent.table.options.columnVisibilityChanged(this.getComponent(),!1)):this.hide()},s.prototype.show=function(){this.visible||(this.visible=!0,this.element.show(),this.table.columnManager._verticalAlignHeaders(),this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(t){t.show()}),this.table.options.persistentLayout&&this.table.extExists("persistentLayout",!0)&&this.table.extensions.persistentLayout.save(),this.table.options.groupVisibilityChanged(this.getComponent(),!0))},s.prototype.hide=function(){this.visible&&(this.visible=!1,this.element.hide(),this.table.columnManager._verticalAlignHeaders(),this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(t){t.hide()}),this.table.options.persistentLayout&&this.table.extExists("persistentLayout",!0)&&this.table.extensions.persistentLayout.save(),this.table.options.groupVisibilityChanged(this.getComponent(),!1))},s.prototype.setWidth=function(t){this.widthFixed=!0,this.setWidthActual(t)},s.prototype.setWidthActual=function(t){isNaN(t)&&(t=Math.floor(this.table.element.innerWidth()/100*parseInt(t))),t=Math.max(this.minWidth,t),this.width=t,this.isGroup||(this.element.css("width",t||""),this.cells.forEach(function(e){e.setWidth(t)})),this.table.extExists("frozenColumns")&&this.table.extensions.frozenColumns.layout()},s.prototype.checkCellHeights=function(){var t=[];this.cells.forEach(function(e){e.row.heightInitialized&&(null!==e.row.element[0].offsetParent?(t.push(e.row),e.row.clearCellHeight()):e.row.heightInitialized=!1)}),t.forEach(function(t){t.calcHeight()}),t.forEach(function(t){t.setCellHeight()})},s.prototype.getWidth=function(){return this.element.outerWidth()},s.prototype.getHeight=function(){return this.element.outerHeight()},s.prototype.setMinWidth=function(t){this.minWidth=t,this.element.css("min-width",t||""),this.cells.forEach(function(e){e.setMinWidth(t)})},s.prototype.delete=function(){this.isGroup&&this.columns.forEach(function(t){t.delete()});for(var t=this.cells.length,e=0;e<t;e++)this.cells[0].delete();this.element.detach(),this.table.columnManager.deregisterColumn(this)},s.prototype.generateCell=function(t){var e=this,o=new c(e,t);return this.cells.push(o),o},s.prototype.reinitializeWidth=function(){this.widthFixed=!1,void 0!==this.definition.width&&this.setWidth(this.definition.width),this.fitToData()},s.prototype.fitToData=function(){var t=this;this.widthFixed||(this.element.css("width",""),t.cells.forEach(function(t){t.setWidth("")}));var e=this.element.outerWidth();t.width&&this.widthFixed||(t.cells.forEach(function(t){var o=t.getWidth();o>e&&(e=o)}),e&&t.setWidthActual(e+1))},s.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},s.prototype.getComponent=function(){return new n(this)};var a=function(e){this.table=e,this.element=t("<div class='tabulator-tableHolder' tabindex='0'></div>"),this.tableElement=t("<div class='tabulator-table'></div>"),this.columnManager=null,this.height=0,this.firstRender=!1,this.renderMode="classic",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._initialize()};a.prototype.getElement=function(){return this.element},a.prototype.getTableElement=function(){return this.tableElement},a.prototype.setColumnManager=function(t){this.columnManager=t},a.prototype._initialize=function(){var t=this;t.element.append(t.tableElement),t.firstRender=!0,t.element.scroll(function(){var e=t.element[0].scrollLeft;t.scrollLeft!=e&&(t.columnManager.scrollHorizontal(e),t.table.options.groupBy&&t.table.extensions.groupRows.scrollHeaders(e),t.table.extExists("columnCalcs")&&t.table.extensions.columnCalcs.scrollHorizontal(e)),t.scrollLeft=e}),t.table.options.height&&t.table.options.virtualDom&&t.element.scroll(function(){var e=t.element[0].scrollTop,o=t.scrollTop>e;t.scrollTop!=e?(t.scrollTop=e,t.scrollVertical(o)):t.scrollTop=e})},a.prototype.findRow=function(t){var e=this;if("object"!=(void 0===t?"undefined":_typeof(t))){return e.rows.find(function(o){return o.data[e.table.options.index]==t})||!1}if(t instanceof l)return t;if(t instanceof r)return t._getSelf()||!1;if(t instanceof jQuery){return e.rows.find(function(e){return e.element===t})||!1}return!1},a.prototype.scrollToRow=function(t){var e;if((e=this.displayRows.indexOf(t))>-1)switch(this.renderMode){case"classic":this.element.scrollTop(t.element.offset().top-this.element.offset().top+this.element.scrollTop());break;case"virtual":this._virtualRenderFill(e,!0)}else console.warn("Scroll Error - Row not visible")},a.prototype.setData=function(t){var e=this;e.table.options.dataLoading(t),e.rows=[],this.table.options.history&&this.table.extExists("history")&&this.table.extensions.history.clear(),Array.isArray(t)?(this.table.extExists("selectRow")&&this.table.extensions.selectRow.clearSelectionData(),t.forEach(function(t,o){var i=new l(t,e);e.rows.push(i)}),e.table.options.dataLoaded(t),e.refreshActiveData(!0)):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)},a.prototype.deleteRow=function(t){var e=this.rows.indexOf(t),o=this.activeRows.indexOf(t),i=this.displayRows.indexOf(t);i>-1&&this.displayRows.splice(i,1),o>-1&&this.activeRows.splice(o,1),e>-1&&this.rows.splice(e,1),this.setActiveRows(this.activeRows),this.setDisplayRows(this.displayRows),this.table.options.rowDeleted(t.getComponent()),this.table.options.dataEdited(this.getData()),this.table.options.pagination&&this.table.extExists("page")?this.refreshActiveData():this.renderTable()},a.prototype.addRow=function(t,e,o){var i=this.addRowActual(t,e,o);return this.table.options.history&&this.table.extExists("history")&&this.table.extensions.history.action("rowAdd",i,{data:t,pos:e,index:o}),i},a.prototype.addRows=function(t,e,o){var i=this,n=[];return e=this.findAddRowPos(e),Array.isArray(t)||(t=[t]),(void 0===o&&e||void 0!==o&&!e)&&t.reverse(),t.forEach(function(t){var s=i.addRow(t,e,o);n.push(s.getComponent())}),n},a.prototype.findAddRowPos=function(t){return void 0===t&&(t=this.table.options.addRowPos),"pos"===t&&(t=!0),"bottom"===t&&(t=!1),t},a.prototype.addRowActual=function(t,e,o){var i=t||{},n=new l(i,this),s=this.findAddRowPos(e);if(o&&(o=this.findRow(o)),o){var a=this.rows.indexOf(o),r=this.activeRows.indexOf(o),u=this.displayRows.indexOf(o);u>-1&&this.displayRows.splice(s?u:u+1,0,n),r>-1&&this.activeRows.splice(s?r:r+1,0,n),a>-1&&this.rows.splice(s?a:a+1,0,n)}else s?(this.displayRows.unshift(n),this.activeRows.unshift(n),this.rows.unshift(n)):(this.displayRows.push(n),this.activeRows.push(n),this.rows.push(n));return this.setDisplayRows(this.displayRows),this.setActiveRows(this.activeRows),this.table.options.rowAdded(n.getComponent()),this.table.options.dataEdited(this.getData()),this.renderTable(),n},a.prototype.moveRow=function(t,e,o){this._moveRowInArray(this.rows,t,e,o),this._moveRowInArray(this.activeRows,t,e,o),this._moveRowInArray(this.displayRows,t,e,o),this.table.options.rowMoved(t.getComponent())},a.prototype._moveRowInArray=function(t,e,o,i){var n,s,a,r=t.indexOf(e);if(r>-1&&(t.splice(r,1),n=t.indexOf(o),n>-1?i?t.splice(n+1,0,e):t.splice(n,0,e):t.splice(r,0,e)),t===this.displayRows){s=r<n?r:n,a=n>r?n:r+1;for(var l=s;l<=a;l++)t[l]&&this.styleRow(t[l],l)}},a.prototype.clearData=function(){this.setData([])},a.prototype.getRowIndex=function(t){return this.findRowIndex(t,this.rows)},a.prototype.getDisplayRowIndex=function(t){return this.findRowIndex(t,this.displayRows)},a.prototype.nextDisplayRow=function(t){var e=this.getDisplayRowIndex(t),o=!1;return!1!==e&&e<this.displayRowsCount-1&&(o=this.displayRows[e+1]),o},a.prototype.prevDisplayRow=function(t){var e=this.getDisplayRowIndex(t),o=!1;return e&&(o=this.displayRows[e-1]),o},a.prototype.findRowIndex=function(t,e){var o;return!!((t=this.findRow(t))&&(o=e.indexOf(t))>-1)&&o},a.prototype.getData=function(t){var e=this,o=[];return(t?e.activeRows:e.rows).forEach(function(t){o.push(t.getData(!0))}),o},a.prototype.getHtml=function(t){var e=this.getData(t),o=this.table.columnManager.getComponents(),i="",n="";return o.forEach(function(t){var e=t.getDefinition();t.getVisibility()&&(i+="<th>"+e.title+"</th>")}),e.forEach(function(t){var e="";o.forEach(function(o){var i=void 0===t[o.getField()]?"":t[o.getField()];o.getVisibility()&&(e+="<td>"+i+"</td>")}),n+="<tr>"+e+"</tr>"}),"<table>\n\n \t\t\t\t<thead>\n\n \t\t\t\t<tr>"+i+"</tr>\n\n \t\t\t\t</thead>\n\n \t\t\t\t<tbody>"+n+"</tbody>\n\n \t\t\t\t</table>"},a.prototype.getComponents=function(t){var e=this,o=[];return(t?e.activeRows:e.rows).forEach(function(t){o.push(t.getComponent())}),o},a.prototype.getDataCount=function(t){return t?this.rows.length:this.activeRows.length},a.prototype._genRemoteRequest=function(){var t=this,e=t.table,o=e.options,i={};if(e.extExists("page")){if(o.ajaxSorting){var n=t.table.extensions.sort.getSort();n.forEach(function(t){delete t.column}),i[t.table.extensions.page.paginationDataSentNames.sorters]=n}if(o.ajaxFiltering){var s=t.table.extensions.filter.getFilters(!0,!0);i[t.table.extensions.page.paginationDataSentNames.filters]=s}t.table.extensions.ajax.setParams(i,!0)}e.extensions.ajax.sendRequest(function(e){t.setData(e)})},a.prototype.filterRefresh=function(){var t=this.table,e=t.options;e.ajaxFiltering?"remote"==e.pagination&&t.extExists("page")?(t.extensions.page.reset(!0),t.extensions.page.setPage(1)):this._genRemoteRequest():this.refreshActiveData()},a.prototype.sorterRefresh=function(){var t=this.table,e=this.table.options,o=this.scrollLeft;e.ajaxSorting?"remote"==e.pagination&&t.extExists("page")?(t.extensions.page.reset(!0),t.extensions.page.setPage(1)):this._genRemoteRequest():this.refreshActiveData(),this.element.scrollLeft(o)},a.prototype.refreshActiveData=function(t){var e=this,o=this.table;o.options.selectable&&!o.options.selectablePersistence&&o.extExists("selectRow")&&o.extensions.selectRow.deselectRows(),o.extExists("filter")?(o.extensions.filter.hasChanged()||t)&&(e.setActiveRows(o.extensions.filter.filter(e.rows)),t=!0):e.setActiveRows(e.rows.slice(0)),o.extExists("sort")&&(o.extensions.sort.hasChanged()||t)&&(o.extensions.sort.sort(),t=!0),o.options.groupBy&&o.extExists("groupRows")?(e.setDisplayRows(o.extensions.groupRows.getRows(this.activeRows,t)),o.options.pagination&&console.warn("Invalid Setup Combination - Pagination and Row Grouping cannot be enabled at the same time")):o.options.pagination&&o.extExists("page")?("local"==o.extensions.page.getMode()&&(t&&o.extensions.page.reset(),o.extensions.page.setMaxRows(this.activeRows.length)),e.setDisplayRows(o.extensions.page.getRows(this.activeRows))):e.setDisplayRows(e.activeRows.slice(0)),e.element.is(":visible")&&e.renderTable(),o.extExists("columnCalcs")&&o.extensions.columnCalcs.recalc(this.displayRows)},a.prototype.setActiveRows=function(t){this.activeRows=t,this.activeRowsCount=this.activeRows.length},a.prototype.setDisplayRows=function(t){this.displayRows=t,this.displayRowsCount=this.displayRows.length},a.prototype.getRows=function(){return this.rows},a.prototype.renderTable=function(){var t=this;t.table.options.renderStarted(),t.element.scrollTop(0),t.height&&t.table.options.virtualDom&&!t.table.options.pagination?(t.renderMode="virtual",t._virtualRenderFill()):(t.renderMode="classic",t._simpleRender()),t.firstRender&&(t.displayRowsCount?(t.firstRender=!1,t.table.extensions.layout.layout()):t.renderEmptyScroll()),t.table.extExists("frozenColumns")&&t.table.extensions.frozenColumns.layout(),t.displayRowsCount||t.table.options.placeholder&&t.getElement().append(t.table.options.placeholder),t.table.options.renderComplete()},a.prototype.getRenderMode=function(){return this.renderMode},a.prototype._simpleRender=function(){var t=this,e=this.tableElement;t._clearVirtualDom(),t.displayRowsCount?t.displayRows.forEach(function(o,i){t.styleRow(o,i),e.append(o.getElement()),o.initialize(!0)}):t.renderEmptyScroll()},a.prototype.renderEmptyScroll=function(){var t=this;t.tableElement.css({"min-width":t.table.columnManager.getWidth(),"min-height":"1px",visibility:"hidden"})},a.prototype._clearVirtualDom=function(){var t=this.tableElement;this.table.options.placeholder&&this.table.options.placeholder.detach(),t.children().detach(),t.css({"padding-top":"","padding-bottom":"","min-width":"","min-height":"",visibility:""}),this.scrollTop=0,this.scrollLeft=0,this.vDomTop=0,this.vDomBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0},a.prototype.styleRow=function(t,e){e%2?t.element.addClass("tabulator-row-even").removeClass("tabulator-row-odd"):t.element.addClass("tabulator-row-odd").removeClass("tabulator-row-even")},a.prototype._virtualRenderFill=function(t,e){var o=this,i=o.tableElement,n=o.element,s=0,a=0,r=0,l=0;if(t=t||0){i.children().detach();var u=(o.displayRowsCount-t)*o.vDomRowHeight;u<o.height&&(t-=Math.ceil((o.height-u)/o.displayRowsCount))<0&&(t=0),s=Math.min(Math.max(Math.floor(o.vDomWindowBuffer/o.vDomRowHeight),o.vDomWindowMinMarginRows),t),t-=s}else o._clearVirtualDom();if(o.displayRowsCount&&o.element.is(":visible")){for(o.vDomTop=t,o.vDomBottom=t-1;(a<=o.height+o.vDomWindowBuffer||l<o.vDomWindowMinTotalRows)&&o.vDomBottom<o.displayRowsCount-1;){var c=o.vDomBottom+1,h=o.displayRows[c];o.styleRow(h,c),i.append(h.getElement()),h.initialized?h.heightInitialized||h.normalizeHeight(!0):h.initialize(!0),l<s?r+=h.getHeight():a+=h.getHeight(),o.vDomBottom++,l++}t?(o.vDomTopPad=e?o.vDomRowHeight*this.vDomTop+r:o.scrollTop-r,o.vDomBottomPad=o.vDomBottom==o.displayRowsCount-1?0:Math.max(o.vDomScrollHeight-o.vDomTopPad-a-r,0)):(this.vDomTopPad=0,o.vDomRowHeight=Math.floor((a+r)/l),o.vDomBottomPad=o.vDomRowHeight*(o.displayRowsCount-o.vDomBottom-1),o.vDomScrollHeight=r+a+o.vDomBottomPad-o.height),i[0].style.paddingTop=o.vDomTopPad+"px",i[0].style.paddingBottom=o.vDomBottomPad+"px",e&&(this.scrollTop=o.vDomTopPad+r),this.scrollTop=Math.min(this.scrollTop,this.element[0].scrollHeight-this.height),this.element[0].scrollWidth>this.element[0].offsetWidt&&(this.scrollTop+=this.element[0].offsetHeight-this.element[0].clientHeight),this.vDomScrollPosTop=this.scrollTop,
this.vDomScrollPosBottom=this.scrollTop,n.scrollTop(this.scrollTop),o.table.options.groupBy&&"fitDataFill"!=o.table.extensions.layout.getMode()&&o.displayRowsCount==o.table.extensions.groupRows.countGroups()&&o.tableElement.css({"min-width":o.table.columnManager.getWidth()})}else this.renderEmptyScroll()},a.prototype.scrollVertical=function(t){var e=this.scrollTop-this.vDomScrollPosTop,o=this.scrollTop-this.vDomScrollPosBottom,i=2*this.vDomWindowBuffer;-e>i||o>i?this._virtualRenderFill(Math.floor(this.element[0].scrollTop/this.element[0].scrollHeight*this.displayRowsCount)):t?(e<0&&this._addTopRow(-e),e<0&&this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer&&this._removeBottomRow(-o)):(e>=0&&this.scrollTop>this.vDomWindowBuffer&&this._removeTopRow(e),o>=0&&this._addBottomRow(o))},a.prototype._addTopRow=function(t){var e=arguments.length>1&&arguments[1]!==o?arguments[1]:0,i=this.tableElement;if(this.vDomTop){var n=this.vDomTop-1,s=this.displayRows[n],a=s.getHeight()||this.vDomRowHeight;t>=a&&(this.styleRow(s,n),i.prepend(s.getElement()),s.initialized&&s.heightInitialized||(this.vDomTopNewRows.push(s),s.heightInitialized||s.clearCellHeight()),s.initialize(),this.vDomTopPad-=a,this.vDomTopPad<0&&(this.vDomTopPad=(this.vDomTop-1)*this.vDomRowHeight),i[0].style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=a,this.vDomTop--),t=-(this.scrollTop-this.vDomScrollPosTop),e<this.vDomMaxRenderChain&&this.vDomTop&&t>=(this.displayRows[this.vDomTop-1].getHeight()||this.vDomRowHeight)?this._addTopRow(t,e+1):this._quickNormalizeRowHeight(this.vDomTopNewRows)}},a.prototype._removeTopRow=function(t){var e=this.tableElement,o=this.displayRows[this.vDomTop],i=o.getHeight()||this.vDomRowHeight;t>=i&&(o.element.detach(),this.vDomTopPad+=i,e[0].style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?i:i+this.vDomWindowBuffer,this.vDomTop++,t=this.scrollTop-this.vDomScrollPosTop,this._removeTopRow(t))},a.prototype._addBottomRow=function(t){var e=arguments.length>1&&arguments[1]!==o?arguments[1]:0,i=this.tableElement;if(this.vDomBottom<this.displayRowsCount-1){var n=this.vDomBottom+1,s=this.displayRows[n],a=s.getHeight()||this.vDomRowHeight;t>=a&&(this.styleRow(s,n),i.append(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),i[0].style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=a,this.vDomBottom++),t=this.scrollTop-this.vDomScrollPosBottom,e<this.vDomMaxRenderChain&&this.vDomBottom<this.displayRowsCount-1&&t>=(this.displayRows[this.vDomBottom+1].getHeight()||this.vDomRowHeight)?this._addBottomRow(t,e+1):this._quickNormalizeRowHeight(this.vDomBottomNewRows)}},a.prototype._removeBottomRow=function(t){var e=this.tableElement,o=this.displayRows[this.vDomBottom],i=o.getHeight()||this.vDomRowHeight;t>=i&&(o.element.detach(),this.vDomBottomPad+=i,this.vDomBottomPad<0&&this.vDomBottomPad,e[0].style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=i,this.vDomBottom--,t=-(this.scrollTop-this.vDomScrollPosBottom),this._removeBottomRow(t))},a.prototype._quickNormalizeRowHeight=function(t){t.forEach(function(t){t.calcHeight()}),t.forEach(function(t){t.setCellHeight()}),t.length=0},a.prototype.normalizeHeight=function(){this.displayRows.forEach(function(t){t.normalizeHeight()})},a.prototype.adjustTableSize=function(){var t=this;if(t.table.options.height){var e=t.columnManager.getElement().outerHeight()+(t.table.footerManager?t.table.footerManager.getElement().outerHeight():0);t.element.css({"min-height":"calc(100% - "+e+"px)",height:"calc(100% - "+e+"px)","max-height":"calc(100% - "+e+"px)"}),t.height=t.element.innerHeight(),t.vDomWindowBuffer=t.table.options.virtualDomBuffer||t.height}},a.prototype.reinitialize=function(){this.rows.forEach(function(t){t.reinitialize()})},a.prototype.redraw=function(t){("virtual"==this.renderMode&&this.adjustTableSize(),t)?this.renderTable():("simple"==self.renderMode?this._simpleRender():(Math.floor(this.element.scrollTop()/this.element[0].scrollHeight*this.displayRowsCount),this._virtualRenderFill(0)),this.displayRowsCount||this.table.options.placeholder&&this.getElement().append(this.table.options.placeholder))},a.prototype.resetScroll=function(){this.element.scrollLeft(0),this.element.scrollTop(0),this.element.scroll()};var r=function(t){this.row=t};r.prototype.getData=function(){return this.row.getData(!0)},r.prototype.getElement=function(){return this.row.getElement()},r.prototype.getCells=function(){var t=[];return this.row.getCells().forEach(function(e){t.push(e.getComponent())}),t},r.prototype.getCell=function(t){return this.row.getCell(t).getComponent()},r.prototype.getIndex=function(){return this.row.getData(!0)[this.row.table.options.index]},r.prototype.delete=function(){this.row.delete()},r.prototype.scrollTo=function(){this.row.table.rowManager.scrollToRow(this.row)},r.prototype.update=function(t){this.row.updateData(t)},r.prototype.normalizeHeight=function(){this.row.normalizeHeight(!0)},r.prototype.select=function(){this.row.selectRows(this.row)},r.prototype.deselect=function(){this.row.deselectRows(this.row)},r.prototype.toggleSelect=function(){this.row.toggleRow(this.row)},r.prototype._getSelf=function(){return this.row};var l=function(e,o){this.table=o.table,this.parent=o,this.data={},this.type="row",this.element=t("<div class='tabulator-row' role='row'></div>"),this.extensions={},this.cells=[],this.height=0,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.setData(e),this.generateElement()};l.prototype.getElement=function(){return this.element},l.prototype.generateElement=function(){var t,e,o,i=this;!1!==i.table.options.selectable&&i.table.extExists("selectRow")&&i.table.extensions.selectRow.initializeRow(this),!1!==i.table.options.movableRows&&i.table.extExists("moveRow")&&i.table.extensions.moveRow.initializeRow(this),i.table.options.rowClick&&i.element.on("click",function(t){i.table.options.rowClick(t,i.getComponent())}),i.table.options.rowDblClick&&i.element.on("dblclick",function(t){i.table.options.rowDblClick(t,i.getComponent())}),i.table.options.rowContext&&i.element.on("contextmenu",function(t){i.table.options.rowContext(t,i.getComponent())}),i.table.options.rowTap&&(o=!1,i.element.on("touchstart",function(t){o=!0}),i.element.on("touchend",function(t){o&&i.table.options.rowTap(t,i.getComponent()),o=!1})),i.table.options.rowDblTap&&(t=null,i.element.on("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.on("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,i.table.options.rowTapHold(t,i.getComponent())},1e3)}),i.element.on("touchend",function(t){clearTimeout(e),e=null}))},l.prototype.generateCells=function(){this.cells=this.table.columnManager.generateCells(this)},l.prototype.initialize=function(t){var e=this;e.initialized&&!t||(e.deleteCells(),e.element.empty(),this.table.extExists("frozenColumns")&&this.table.extensions.frozenColumns.layoutRow(this),this.generateCells(),e.cells.forEach(function(t){e.element.append(t.getElement())}),t&&e.normalizeHeight(),e.table.options.rowFormatter&&e.table.options.rowFormatter(e.getComponent()),e.initialized=!0)},l.prototype.reinitializeHeight=function(){this.heightInitialized=!1,null!==this.element[0].offsetParent&&this.normalizeHeight(!0)},l.prototype.reinitialize=function(){this.initialized=!1,this.heightInitialized=!1,this.height=0,null!==this.element[0].offsetParent&&this.initialize(!0)},l.prototype.calcHeight=function(){this.height=this.element[0].clientHeight,this.outerHeight=this.element[0].offsetHeight},l.prototype.setCellHeight=function(){var t=this.height;this.cells.forEach(function(e){e.setHeight(t)}),this.heightInitialized=!0},l.prototype.clearCellHeight=function(){this.cells.forEach(function(t){t.clearHeight()})},l.prototype.normalizeHeight=function(t){t&&this.clearCellHeight(),this.calcHeight(),this.setCellHeight()},l.prototype.setHeight=function(t,e){(this.height!=t||e)&&(this.height=t,this.setCellHeight(),this.outerHeight=this.element[0].offsetHeight)},l.prototype.getHeight=function(){return this.outerHeight},l.prototype.getWidth=function(){return this.element.outerWidth()},l.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},l.prototype.setData=function(t){var e=this;e.table.extExists("mutator")?e.data=e.table.extensions.mutator.transformRow(t):e.data=t},l.prototype.updateData=function(t){var e=this;e.table.extExists("mutator")&&(t=e.table.extensions.mutator.transformRow(t));for(var o in t)e.data[o]=t[o];for(var o in t){var i=this.getCell(o);i&&i.getValue()!=t[o]&&i.setValueProcessData(t[o])}this.element.is(":visible")?(e.normalizeHeight(),e.table.options.rowFormatter&&e.table.options.rowFormatter(e.getComponent())):(this.initialized=!1,this.height=0),e.table.options.rowUpdated(e.getComponent())},l.prototype.getData=function(t){var e=this;return t?e.table.extExists("accessor")?e.table.extensions.accessor.transformRow(e.data):void 0:this.data},l.prototype.getCell=function(t){var t=this.table.columnManager.findColumn(t);return this.cells.find(function(e){return e.column===t})},l.prototype.getCellIndex=function(t){return this.cells.findIndex(function(e){return e===t})},l.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.extensions.edit&&i.getElement().is(":visible")){var n=!0;if("function"==typeof i.column.extensions.edit.check&&(n=i.column.extensions.edit.check(i.getComponent())),n){e=i;break}}}return e},l.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.extensions.edit&&i.getElement().is(":visible")&&("function"==typeof i.column.extensions.edit.check&&(n=i.column.extensions.edit.check(i.getComponent())),n)){e=i;break}}return e},l.prototype.getCells=function(){return this.cells},l.prototype.delete=function(){var t=this.table.rowManager.getRowIndex(this);this.deleteActual(),this.table.options.history&&this.table.extExists("history")&&(t&&(t=this.table.rowManager.rows[t-1]),this.table.extensions.history.action("rowDelete",this,{data:this.getData(),pos:!t,index:t}))},l.prototype.deleteActual=function(){this.table.rowManager.deleteRow(this),this.deleteCells()},l.prototype.deleteCells=function(){for(var t=this.cells.length,e=0;e<t;e++)this.cells[0].delete()},l.prototype.getComponent=function(){return new r(this)};var u=function(t){this.cell=t};u.prototype.getValue=function(){return this.cell.getValue()},u.prototype.getOldValue=function(){return this.cell.getOldValue()},u.prototype.getElement=function(){return t(this.cell.getElement())},u.prototype.getRow=function(){return this.cell.row.getComponent()},u.prototype.getData=function(){return this.cell.row.getData()},u.prototype.getField=function(){return this.cell.column.getField()},u.prototype.getColumn=function(){return this.cell.column.getComponent()},u.prototype.setValue=function(t,e){void 0===e&&(e=!0),this.cell.setValue(t,e)},u.prototype.restoreOldValue=function(){this.cell.setValueActual(this.cell.getOldValue())},u.prototype.edit=function(){this.cell.edit()},u.prototype.nav=function(){return this.cell.nav()},u.prototype.checkHeight=function(){this.cell.checkHeight()},u.prototype._getSelf=function(){return this.cell};var c=function(t,e){this.table=t.table,this.column=t,this.row=e,this.element=null,this.value=null,this.oldValue=null,this.height=null,this.width=null,this.minWidth=null,this.build()};c.prototype.build=function(){this.generateElement(),this.setWidth(this.column.width),this._configureCell(),this.setValueActual(this.column.getFieldValue(this.row.data))},c.prototype.generateElement=function(){this.element=document.createElement("div"),this.element.className="tabulator-cell",this.element.setAttribute("role","gridcell"),this.element=t(this.element)},c.prototype._configureCell=function(){var t,e,o,i=this,n=i.column.cellEvents,s=i.element,a=this.column.getField();s[0].style.textAlign=i.column.hozAlign,a&&s.attr("tabulator-field",a),i.column.definition.cssClass&&s.addClass(i.column.definition.cssClass),n.cellClick&&i.element.on("click",function(t){n.cellClick(t,i.getComponent())}),n.cellDblClick&&i.element.on("dblclick",function(t){n.cellDblClick(t,i.getComponent())}),n.cellContext&&i.element.on("contextmenu",function(t){n.cellContext(t,i.getComponent())}),n.cellTap&&(o=!1,i.element.on("touchstart",function(t){o=!0}),i.element.on("touchend",function(t){o&&n.cellTap(t,i.getComponent()),o=!1})),n.cellDblTap&&(t=null,i.element.on("touchend",function(e){t?(clearTimeout(t),t=null,n.cellDblTap(e,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),n.cellTapHold&&(e=null,i.element.on("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,n.cellTapHold(t,i.getComponent())},1e3)}),i.element.on("touchend",function(t){clearTimeout(e),e=null})),i.column.extensions.edit&&i.table.extensions.edit.bindEditor(i),i.column.definition.rowHandle&&!1!==i.table.options.movableRows&&i.table.extExists("moveRow")&&i.table.extensions.moveRow.initializeCell(i),i.column.visible||i.hide()},c.prototype._generateContents=function(){var t=this;t.table.extExists("format")?t.element.html(t.table.extensions.format.formatValue(t)):t.element.html(t.value)},c.prototype._generateTooltip=function(){var t=this,e=t.column.tooltip;e?(!0===e?e=t.value:"function"==typeof e&&(e=e(t.getComponent())),t.element[0].setAttribute("title",e)):t.element[0].setAttribute("title","")},c.prototype.getElement=function(){return this.element},c.prototype.getValue=function(){return this.value},c.prototype.getOldValue=function(){return this.oldValue},c.prototype.setValue=function(t,e){this.setValueProcessData(t,e)&&(this.table.options.history&&this.table.extExists("history")&&this.table.extensions.history.action("cellEdit",this,{oldValue:this.oldValue,newValue:this.value}),this.table.options.cellEdited(this.getComponent()),this.table.options.dataEdited(this.table.rowManager.getData())),this.table.extExists("columnCalcs")&&(this.column.definition.topCalc||this.column.definition.bottomCalc)&&(this.table.options.groupBy&&this.table.extExists("groupRows")?this.table.extensions.columnCalcs.recalcRowGroup(this.row):this.table.extensions.columnCalcs.recalc(this.table.rowManager.displayRows))},c.prototype.setValueProcessData=function(t,e){var o=!1;return this.value!=t&&(o=!0,e&&this.column.extensions.mutate&&"data"!==this.column.extensions.mutate.type&&(t=this.table.extensions.mutator.transformCell(this,t))),this.setValueActual(t),o},c.prototype.setValueActual=function(t){this.oldValue=this.value,this.value=t,this.column.setFieldValue(this.row.data,t),this._generateContents(),this._generateTooltip(),this.table.options.resizableColumns&&this.table.extExists("resizeColumns")&&this.table.extensions.resizeColumns.initializeColumn("cell",this.column,this.element),this.table.extExists("frozenColumns")&&this.table.extensions.frozenColumns.layoutElement(this.element,this.column)},c.prototype.setWidth=function(t){this.width=t,this.element[0].style.width=t?t+"px":""},c.prototype.getWidth=function(){return this.width||this.element.outerWidth()},c.prototype.setMinWidth=function(t){this.minWidth=t,this.element[0].style.minWidth=t?t+"px":""},c.prototype.checkHeight=function(){this.element.css("height");this.row.reinitializeHeight()},c.prototype.clearHeight=function(){this.element[0].style.height=""},c.prototype.setHeight=function(t){this.height=t,this.element[0].style.height=t?t+"px":""},c.prototype.getHeight=function(){return this.height||this.element.outerHeight()},c.prototype.show=function(){this.element[0].style.display=""},c.prototype.hide=function(){this.element[0].style.display="none"},c.prototype.edit=function(){this.element.focus()},c.prototype.delete=function(){this.element.detach(),this.column.deleteCell(this),this.row.deleteCell(this)},c.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))||!(o=e.findNextEditableCell(-1)))&&(o.edit(),!0)},prev:function(){var e,o=this.left();return!!o||!(!(e=t.table.rowManager.prevDisplayRow(t.row))||!(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);e&&e.cells[o].edit()},down:function(){var e=t.table.rowManager.nextDisplayRow(t.row);e&&e.cells[o].edit()}}},c.prototype.getIndex=function(){this.row.getCellIndex(this)},c.prototype.getComponent=function(){return new u(this)};var h=function(e){this.table=e,this.active=!1,this.element=t("<div class='tabulator-footer'></div>"),this.links=[],this._initialize()};h.prototype._initialize=function(t){this.table.options.footerElement&&(this.element=this.table.options.footerElement)},h.prototype.getElement=function(){return this.element},h.prototype.append=function(t,e){this.activate(e),this.element.append(t),this.table.rowManager.adjustTableSize()},h.prototype.prepend=function(t,e){this.activate(e),this.element.prepend(t),this.table.rowManager.adjustTableSize()},h.prototype.remove=function(t){t.remove(),this.deactivate()},h.prototype.deactivate=function(t){(this.element.is(":empty")||t)&&(this.element.remove(),this.active=!1)},h.prototype.activate=function(t){this.active||(this.active=!0,this.table.element.append(this.getElement()),this.table.element.show()),t&&this.links.push(t)},h.prototype.redraw=function(){this.links.forEach(function(t){t.footerRedraw()})},window.Tabulator={columnManager:null,rowManager:null,footerManager:null,browser:"",browserSlow:!1,options:{height:!1,layout:"fitData",fitColumns:!1,columnMinWidth:40,columnVertAlign:"top",resizableColumns:!0,columns:[],data:[],tooltips:!1,tooltipsHeader:!1,initialSort:!1,footerElement:!1,index:"id",keybindings:[],downloadDataMutator:!1,addRowPos:"bottom",selectable:"highlight",selectableRollingSelection:!0,selectablePersistence:!0,selectableCheck:function(t,e){return!0},headerFilterPlaceholder:!1,history:!1,locale:!1,langs:{},virtualDom:!0,persistentLayout:!1,persistentLayoutID:"",responsiveLayout:!1,pagination:!1,paginationSize:!1,paginationElement:!1,paginationDataSent:{},paginationDataReceived:{},paginator:!1,ajaxURL:!1,ajaxParams:{},ajaxConfig:"get",ajaxLoader:!0,ajaxLoaderLoading:!1,ajaxLoaderError:!1,ajaxFiltering:!1,ajaxSorting:!1,groupBy:!1,groupStartOpen:!0,groupHeader:!1,movableColumns:!1,movableRows:!1,rowFormatter:!1,placeholder:!1,tableBuilding:function(){},tableBuilt:function(){},renderStarted:function(){},renderComplete:function(){},rowClick:!1,rowDblClick:!1,rowContext:!1,rowTap:!1,rowDblTap:!1,rowTapHold:!1,rowAdded:function(){},rowDeleted:function(){},rowMoved:function(){},rowUpdated:function(){},rowSelectionChanged:function(){},rowSelected:function(){},rowDeselected:function(){},cellEditing:function(){},cellEdited:function(){},cellEditCancelled:function(){},columnMoved:function(){},columnResized:function(){},columnTitleChanged:function(){},columnVisibilityChanged:function(){},htmlImporting:function(){},htmlImported:function(){},dataLoading:function(){},dataLoaded:function(){},dataEdited:function(){},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,groupTap:!1,groupDblTap:!1,groupTapHold:!1,pageLoaded:function(){},localized:function(){},validationFailed:function(){}},_mapDepricatedFunctionality:function(){this.options.fitColumns&&(this.options.layout="fitColumns",console.warn("The%c fitColumns:true%c option has been depricated and will be removed in version 4.0, use %c layout:'fitColumns'%c instead.","font-weight:bold;","font-weight:regular;","font-weight:bold;","font-weight:regular;"))},_create:function(){var t=this,e=this.element;t._mapDepricatedFunctionality(),t.bindExtensions(),e.is("table")?this.extExists("htmlTableImport",!0)&&t.extensions.htmlTableImport.parseTable():(t.columnManager=new i(t),t.rowManager=new a(t),t.footerManager=new h(t),t.columnManager.setRowManager(t.rowManager),t.rowManager.setColumnManager(t.columnManager),t._buildElement(),this._loadInitialData())},_buildElement:function(){var e=this.element,o=this.extensions,i=this.options;i.tableBuilding(),e.addClass("tabulator").attr("role","grid").empty(),this._detectBrowser(),this.extExists("layout",!0)&&o.layout.initialize(i.layout),!1!==i.headerFilterPlaceholder&&o.localize.setHeaderFilterPlaceholder(i.headerFilterPlaceholder);for(var n in i.langs)o.localize.installLang(n,i.langs[n]);o.localize.setLocale(i.locale),"string"==typeof i.placeholder&&(i.placeholder=t("<div class='tabulator-placeholder'><span>"+i.placeholder+"</span></div>")),i.height&&(i.height=isNaN(i.height)?i.height:i.height+"px",this.element.css({height:i.height})),e.append(this.columnManager.getElement()),e.append(this.rowManager.getElement()),i.footerElement&&this.footerManager.activate(),i.persistentLayout&&this.extExists("persistentLayout",!0)&&(o.persistentLayout.initialize(i.persistentLayout,i.persistentLayoutID),i.columns=o.persistentLayout.load(i.columns)),this.extExists("columnCalcs")&&o.columnCalcs.initialize(),this.columnManager.setColumns(i.columns),i.initialSort&&this.extExists("sort",!0)&&o.sort.setSort(i.initialSort),i.pagination&&this.extExists("page",!0)&&o.page.initialize(),i.groupBy&&this.extExists("groupRows",!0)&&o.groupRows.initialize(),this.extExists("ajax")&&o.ajax.initialize(),this.extExists("keybindings")&&o.keybindings.initialize(),this.extExists("selectRow")&&o.selectRow.clearSelectionData(),i.tableBuilt()},_loadInitialData:function(){var t=this;t.options.pagination&&t.extExists("page")?(t.extensions.page.reset(!0),t.extensions.page.setPage(1),"local"==t.options.pagination&&t.rowManager.setData(t.options.data)):t.options.data.length?t.rowManager.setData(t.options.data):t.options.ajaxURL&&t.extExists("ajax")?t.extensions.ajax.sendRequest(function(e){t.rowManager.setData(e)}):t.rowManager.setData(t.options.data)},_setOption:function(t,e){console.error("Options Error - Tabulator does not allow options to be set after initialization unless there is a function defined for that purpose")},_destroy:function(){var t=this.element;t.empty(),t.removeClass("tabulator")},_detectBrowser:function(){var t=navigator.userAgent;t.indexOf("Trident")>-1?(this.brower="ie",this.browserSlow=!0):t.indexOf("Edge")>-1?(this.brower="edge",this.browserSlow=!0):(this.brower="other",this.browserSlow=!1)},setData:function(t,e,o){var i=this,i=this;"string"==typeof t?0==t.indexOf("{")||0==t.indexOf("[")?i.rowManager.setData(JSON.parse(t)):i.extExists("ajax",!0)&&(e&&i.extensions.ajax.setParams(e),o&&i.extensions.ajax.setConfig(o),i.extensions.ajax.setUrl(t),"remote"==i.options.pagination&&i.extExists("page",!0)?(i.extensions.page.reset(!0),i.extensions.page.setPage(1)):i.extensions.ajax.sendRequest(function(t){i.rowManager.setData(t)})):t?i.rowManager.setData(t):i.extExists("ajax")&&i.extensions.ajax.getUrl?"remote"==i.options.pagination&&i.extExists("page",!0)?(i.extensions.page.reset(!0),i.extensions.page.setPage(1)):i.extensions.ajax.sendRequest(function(t){i.rowManager.setData(t)}):i.rowManager.setData([])},clearData:function(){this.rowManager.clearData()},getData:function(t){return this.rowManager.getData(t)},getDataCount:function(t){return this.rowManager.getDataCount(t)},getHtml:function(t){return this.rowManager.getHtml(t)},getAjaxUrl:function(){if(this.extExists("ajax",!0))return this.extensions.ajax.getUrl()},updateData:function(t){var e=this;t?t.forEach(function(t){var o=e.rowManager.findRow(t[e.options.index]);o&&o.updateData(t)}):console.warn("Update Error - No data provided")},addData:function(t,e,o){t?this.rowManager.addRows(t,e,o):console.warn("Update Error - No data provided")},updateOrAddData:function(t){var e=this;t?t.forEach(function(t){var o=e.rowManager.findRow(t[e.options.index]);o?o.updateData(t):e.rowManager.addRow(t)}):console.warn("Update Error - No data provided")},getRow:function(t){var e=this.rowManager.findRow(t);return e?e.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},deleteRow:function(t){var e=this.rowManager.findRow(t);return e?(e.delete(),!0):(console.warn("Delete Error - No matching row found:",t),!1)},addRow:function(t,e,o){return this.rowManager.addRow(t,e,o)},updateOrAddRow:function(t,e){var o=this.rowManager.findRow(t);return o?o.updateData(e):o=this.rowManager.addRow(e),o.getComponent()},updateRow:function(t,e){var o=this.rowManager.findRow(t);return o?(o.updateData(e),o.getComponent()):(console.warn("Update Error - No matching row found:",t),!1)},scrollToRow:function(t){var e=this.rowManager.findRow(t);return e?this.rowManager.scrollToRow(e):(console.warn("Scroll Error - No matching row found:",t),!1)},getRows:function(t){return this.rowManager.getComponents(t)},setColumns:function(t){this.columnManager.setColumns(t)},getColumns:function(){return this.columnManager.getComponents()},getColumnDefinitions:function(){return this.columnManager.getDefinitionTree()},getColumnLayout:function(){if(this.extExists("persistentLayout",!0))return this.extensions.persistentLayout.parseColumns(this.columnManager.getColumns())},setColumnLayout:function(t){return!!this.extExists("persistentLayout",!0)&&(this.columnManager.setColumns(this.extensions.persistentLayout.mergeDefinition(this.options.columns,t)),!0)},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()},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()},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()},addColumn:function(t,e,o){var i=this.columnManager.findColumn(o);this.columnManager.addColumn(t,e,i)},deleteColumn:function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Delete Error - No matching column found:",t),!1;e.delete()},setLocale:function(t){this.extensions.localize.setLocale(t)},getLocale:function(){return this.extensions.localize.getLocale()},getLang:function(t){return this.extensions.localize.getLang(t)},redraw:function(t){this.columnManager.redraw(t),this.rowManager.redraw(t)},setHeight:function(t){this.options.height=isNaN(t)?t:t+"px",this.element.css({height:this.options.height}),this.rowManager.redraw()},setSort:function(t,e){this.extExists("sort",!0)&&(this.extensions.sort.setSort(t,e),this.rowManager.sorterRefresh())},getSort:function(){if(this.extExists("sort",!0))return console.warn("The%c getSort%c function has been depricated and will be removed in version 4.0, use %c getSorters%c instead.","font-weight:bold;","font-weight:regular;","font-weight:bold;","font-weight:regular;"),this.getSorters()},getSorters:function(){if(this.extExists("sort",!0))return this.extensions.sort.getSort()},clearSort:function(){this.extExists("sort",!0)&&(this.extensions.sort.clear(),this.rowManager.sorterRefresh())},setFilter:function(t,e,o){this.extExists("filter",!0)&&(this.extensions.filter.setFilter(t,e,o),this.rowManager.filterRefresh())},addFilter:function(t,e,o){this.extExists("filter",!0)&&(this.extensions.filter.addFilter(t,e,o),this.rowManager.filterRefresh())},getFilter:function(t){console.warn("The%c getFilter%c function has been depricated and will be removed in version 4.0, use %c getFilters%c instead.","font-weight:bold;","font-weight:regular;","font-weight:bold;","font-weight:regular;"),this.getFilters(t)},getFilters:function(t){if(this.extExists("filter",!0))return this.extensions.filter.getFilters(t)},getHeaderFilters:function(){if(this.extExists("filter",!0))return this.extensions.filter.getHeaderFilters()},removeFilter:function(t,e,o){this.extExists("filter",!0)&&(this.extensions.filter.removeFilter(t,e,o),this.rowManager.filterRefresh())},clearFilter:function(t){this.extExists("filter",!0)&&(this.extensions.filter.clearFilter(t),this.rowManager.filterRefresh())},clearHeaderFilter:function(){this.extExists("filter",!0)&&(this.extensions.filter.clearHeaderFilter(),this.rowManager.filterRefresh())},selectRow:function(t){this.extExists("selectRow",!0)&&this.extensions.selectRow.selectRows(t)},deselectRow:function(t){this.extExists("selectRow",!0)&&this.extensions.selectRow.deselectRows(t)},toggleSelectRow:function(t){this.extExists("selectRow",!0)&&this.extensions.selectRow.toggleRow(t)},getSelectedRows:function(){if(this.extExists("selectRow",!0))return this.extensions.selectRow.getSelectedRows()},getSelectedData:function(){if(this.extExists("selectRow",!0))return this.extensions.selectRow.getSelectedData()},setMaxPage:function(t){if(!this.options.pagination||!this.extExists("page"))return!1;this.extensions.page.setMaxPage(t)},setPage:function(t){if(!this.options.pagination||!this.extExists("page"))return!1;this.extensions.page.setPage(t)},setPageSize:function(t){if(!this.options.pagination||!this.extExists("page"))return!1;this.extensions.page.setPageSize(t),this.extensions.page.setPage(1)},getPageSize:function(){if(this.options.pagination&&this.extExists("page",!0))return this.extensions.page.getPageSize()},previousPage:function(){if(!this.options.pagination||!this.extExists("page"))return!1;this.extensions.page.previousPage()},nextPage:function(){if(!this.options.pagination||!this.extExists("page"))return!1;this.extensions.page.nextPage()},getPage:function(){return!(!this.options.pagination||!this.extExists("page"))&&this.extensions.page.getPage()},getPageMax:function(){return!(!this.options.pagination||!this.extExists("page"))&&this.extensions.page.getPageMax()},setGroupBy:function(t){if(!this.extExists("groupRows",!0))return!1;this.options.groupBy=t,this.extensions.groupRows.initialize(),this.rowManager.refreshActiveData()},setGroupStartOpen:function(t){if(!this.extExists("groupRows",!0))return!1;this.options.groupStartOpen=t,this.extensions.groupRows.initialize(),this.options.groupBy?this.rowManager.refreshActiveData():console.warn("Grouping Update - cant refresh view, no groups have been set")},setGroupHeader:function(t){if(!this.extExists("groupRows",!0))return!1;this.options.groupHeader=t,this.extensions.groupRows.initialize(),this.options.groupBy?this.rowManager.refreshActiveData():console.warn("Grouping Update - cant refresh view, no groups have been set")},getGroups:function(t){return!!this.extExists("groupRows",!0)&&this.extensions.groupRows.getGroups()},navigatePrev:function(){var t=!1;return!(!this.table.extExists("edit",!0)||!(t=this.table.extensions.edit.currentCell))&&(e.preventDefault(),t.nav().prev())},navigateNext:function(){var t=!1;return!(!this.table.extExists("edit",!0)||!(t=this.table.extensions.edit.currentCell))&&(e.preventDefault(),t.nav().next())},navigateLeft:function(){var t=!1;return!(!this.table.extExists("edit",!0)||!(t=this.table.extensions.edit.currentCell))&&(e.preventDefault(),t.nav().left())},navigateRight:function(){var t=!1;return!(!this.table.extExists("edit",!0)||!(t=this.table.extensions.edit.currentCell))&&(e.preventDefault(),t.nav().right())},navigateUp:function(){var t=!1;return!(!this.table.extExists("edit",!0)||!(t=this.table.extensions.edit.currentCell))&&(e.preventDefault(),t.nav().up())},
navigateDown:function(){var t=!1;return!(!this.table.extExists("edit",!0)||!(t=this.table.extensions.edit.currentCell))&&(e.preventDefault(),t.nav().dpwn())},undo:function(){return!(!this.options.history||!this.extExists("history",!0))&&this.extensions.history.undo()},redo:function(){return!(!this.options.history||!this.extExists("history",!0))&&this.extensions.history.redo()},download:function(t,e,o){this.extExists("download",!0)&&this.extensions.download.download(t,e,o)},extensions:{},extensionBindings:{},extendExtension:function(t,e,o){if(this.extensionBindings[t]){var i=this.extensionBindings[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("Extension Error - Invalid value type, it must be an object");else console.warn("Extension Error - property does not exist:",e)}else console.warn("Extension Error - extension does not exist:",t)},registerExtension:function(t,e){this.extensionBindings[t]=e},bindExtensions:function(){var t=this;this.extensions={};for(var e in t.extensionBindings)t.extensions[e]=new t.extensionBindings[e](t)},extExists:function(t,e){return!!this.extensions[t]||(e&&console.error("Tabulator Plugin Not Installed: "+t),!1)}};var p=function(t){this.table=t,this.mode=null};p.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.attr("tabulator-layout",this.mode)},p.prototype.getMode=function(){return this.mode},p.prototype.layout=function(){this.modes[this.mode].call(this,this.table.columnManager.columnsByIndex)},p.prototype.modes={fitData:function(t){t.forEach(function(t){t.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.extExists("responsiveLayout",!0)&&this.table.extensions.responsiveLayout.update()},fitDataFill:function(t){t.forEach(function(t){t.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.extExists("responsiveLayout",!0)&&this.table.extensions.responsiveLayout.update()},fitColumns:function(t){function e(t,o,i){var n=[],s=0,a=0,r=0,l=0,u=[];return t.forEach(function(t,e){t.minWidth>=i?n.push(t):u.push(t)}),n.length?(n.forEach(function(t){s+=t.minWidth,t.setWidth(t.minWidth)}),a=o-s,r=u.length?Math.floor(a/u.length):a,l=a-r*u.length,l+=e(u,a,r)):(l=u.length?o-Math.floor(o/u.length)*u.length:o,u.forEach(function(t){t.setWidth(i)})),l}var o=this,i=o.table.element.innerWidth(),n=0,s=0,a=0,r=[],l=0;this.table.options.responsiveLayout&&this.table.extExists("responsiveLayout",!0)&&this.table.extensions.responsiveLayout.update(),this.table.rowManager.element[0].scrollHeight>this.table.rowManager.element.innerHeight()&&(i-=this.table.rowManager.element[0].offsetWidth-this.table.rowManager.element[0].clientWidth),t.forEach(function(t){var e,o,s;t.visible&&(e=t.definition.width,o=parseInt(t.minWidth),e?(s="string"==typeof e?e.indexOf("%")>-1?i/100*parseInt(e):parseInt(e):e,n+=s>o?s:o):r.push(t))}),s=i-n,a=Math.floor(s/r.length);var l=e(r,s,a);r.length&&r[r.length-1].setWidth(r[r.length-1].getWidth()+l)}},Tabulator.registerExtension("layout",p);var d=function(t){this.table=t,this.locale="default",this.lang=!1,this.bindings={}};d.prototype.setHeaderFilterPlaceholder=function(t){this.langs.default.headerFilters.default=t},d.prototype.setHeaderFilterColumnPlaceholder=function(t,e){this.langs.default.headerFilters.columns[t]=e,this.lang&&!this.lang.headerFilters.columns[t]&&(this.lang.headerFilters.columns[t]=e)},d.prototype.installLang=function(t,e){this.langs[t]?this._setLangProp(this.langs[t],e):this.langs[t]=e},d.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]},d.prototype.setLocale=function(e){function o(t,e){for(var i in t)"object"==_typeof(t[i])?(e[i]||(e[i]={}),o(t[i],e[i])):e[i]=t[i]}var i=this;if(e=e||"default",!0===e&&navigator.language&&(e=navigator.language.toLowerCase()),e&&!i.langs[e]){var n=e.split("-")[0];i.langs[n]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",e,n),e=n):(console.warn("Localization Error - Matching locale not found, using default: ",e),e="default")}i.locale=e,i.lang=t.extend(!0,{},i.langs.default),"default"!=e&&o(i.langs[e],i.lang),i.table.options.localized(i.locale,i.lang),i._executeBindings()},d.prototype.getLocale=function(t){return self.locale},d.prototype.getLang=function(t){return t?this.langs[t]:this.lang},d.prototype.getText=function(t,e){var t=e?t+"."+e:t,o=t.split(".");return this._getLangElement(o,this.locale)||""},d.prototype._getLangElement=function(t,e){var o=this,i=o.lang;return t.forEach(function(t){var e;i&&(e=i[t],i=void 0!==e&&e)}),i},d.prototype.bind=function(t,e){this.bindings[t]||(this.bindings[t]=[]),this.bindings[t].push(e),e(this.getText(t),this.lang)},d.prototype._executeBindings=function(){var t=this;for(var e in t.bindings)!function(e){t.bindings[e].forEach(function(o){o(t.getText(e),t.lang)})}(e)},d.prototype.langs={default:{groups:{item:"item",items:"items"},columns:{},ajax:{loading:"Loading",error:"Error"},pagination:{first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page"},headerFilters:{default:"filter column...",columns:{}}}},Tabulator.registerExtension("localize",d);var f=function(t){this.table=t};f.prototype.initializeColumn=function(t){var e={accessor:!1,params:t.definition.accessorParams||{}};switch(_typeof(t.definition.accessor)){case"string":this.accessors[t.definition.accessor]?e.accessor=this.accessors[t.definition.accessor]:console.warn("Accessor Error - No such accessor found, ignoring: ",t.definition.accessor);break;case"function":e.accessor=t.definition.accessor}e.accessor&&(t.extensions.accessor=e)},f.prototype.transformRow=function(e){var o=this,i=t.extend(!0,{},e||{});return o.table.columnManager.traverse(function(t){var e;t.extensions.accessor&&(e=t.getField(),void 0!==i[e]&&t.setFieldValue(i,t.extensions.accessor.accessor(t.getFieldValue(i),i,t.extensions.accessor.params)))}),i},f.prototype.accessors={},Tabulator.registerExtension("accessor",f);var g=function(e){this.table=e,this.config=!1,this.url="",this.params=!1,this.loaderElement=t("<div class='tablulator-loader'></div>"),this.msgElement=t("<div class='tabulator-loader-msg' role='alert'></div>"),this.loadingElement=!1,this.errorElement=!1};g.prototype.initialize=function(){this.loaderElement.append(this.msgElement),this.table.options.ajaxLoaderLoading&&(this.loadingElement=this.table.options.ajaxLoaderLoading),this.table.options.ajaxLoaderError&&(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)},g.prototype.setParams=function(t,e){if(e){this.params=this.params||{};for(var o in t)this.params[o]=t[o]}else this.params=t},g.prototype.getParams=function(){return this.params||{}},g.prototype.setConfig=function(t){if(this._loadDefaultConfig(),"string"==typeof t)this.config.type=t;else for(var e in t)this.config[e]=t[e]},g.prototype._loadDefaultConfig=function(t){var e=this;if(!e.config||t){e.config={};for(var o in e.defaultConfig)e.config[o]=e.defaultConfig[o]}},g.prototype.setUrl=function(t){this.url=t},g.prototype.getUrl=function(){return this.url},g.prototype.sendRequest=function(e){var o=this;if(!o.url)return console.warn("Ajax Load Error - No URL Set"),!1;o._loadDefaultConfig(),o.config.url=o.url,o.params&&(o.config.data=o.params),!1!==o.table.options.ajaxRequesting(o.url,o.params)&&(o.showLoader(),t.ajax(o.config).done(function(t){o.table.options.ajaxResponse&&(t=o.table.options.ajaxResponse(o.url,o.params,t)),o.table.options.dataLoaded(t),e(t),o.hideLoader()}).fail(function(t,e,i){console.error("Ajax Load Error - Connection Error: "+t.status,i),o.table.options.ajaxError(t,e,i),o.showError(),setTimeout(function(){o.hideLoader()},3e3)}))},g.prototype.showLoader=function(){this.loaderElement.detach(),this.msgElement.empty().removeClass("tabulator-error").addClass("tabulator-loading"),this.loadingElement?this.msgElement.append(this.loadingElement):this.msgElement.append(this.table.extensions.localize.getText("ajax.loading")),this.table.element.append(this.loaderElement)},g.prototype.showError=function(){this.loaderElement.detach(),this.msgElement.empty().removeClass("tabulator-loading").addClass("tabulator-error"),this.errorElement?this.msgElement.append(this.errorElement):this.msgElement.append(this.table.extensions.localize.getText("ajax.error")),this.table.element.append(this.loaderElement)},g.prototype.hideLoader=function(){this.loaderElement.detach()},g.prototype.defaultConfig={url:"",type:"GET",async:!0,dataType:"json",success:function(t){}},Tabulator.registerExtension("ajax",g);var m=function(e){this.table=e,this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=t("<div class='tabulator-calcs-holder'></div>"),this.botElement=t("<div class='tabulator-calcs-holder'></div>"),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.initialize()};m.prototype.initialize=function(){this.genColumn=new s({field:"value"},this)},m.prototype.registerColumnField=function(){},m.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.extensions.columnCalcs=o,this.topCalcs.push(t),this.table.options.groupBy||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.extensions.columnCalcs=o,this.botCalcs.push(t),this.table.options.groupBy||this.initializeBottomRow())}},m.prototype.removeCalcs=function(){var t=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.remove(),t=!0),this.botInitialized&&(this.botInitialized=!1,this.table.footerManager.remove(this.botElement),t=!0),t&&this.table.rowManager.adjustTableSize()},m.prototype.initializeTopRow=function(){this.topInitialized||(this.table.columnManager.element.append(this.topElement),this.topInitialized=!0)},m.prototype.initializeBottomRow=function(){this.botInitialized||(this.table.footerManager.prepend(this.botElement),this.botInitialized=!0)},m.prototype.scrollHorizontal=function(t){this.table.columnManager.element[0].scrollWidth,this.table.element.innerWidth();this.botInitialized&&this.botRow.getElement().css("margin-left",-t)},m.prototype.recalc=function(t){var e;(this.topInitialized||this.botInitialized)&&(this.rowsToData(t),this.topInitialized&&(e=this.generateRow("top",this.rowsToData(t)),this.topRow=e,this.topElement.empty(),this.topElement.append(e.getElement()),e.initialize(!0)),this.botInitialized&&(e=this.generateRow("bottom",this.rowsToData(t)),this.botRow=e,this.botElement.empty(),this.botElement.append(e.getElement()),e.initialize(!0)),this.table.rowManager.adjustTableSize(),this.table.extExists("frozenColumns")&&this.table.extensions.frozenColumns.layout())},m.prototype.recalcRowGroup=function(t){var e,o,i=this.table.extensions.groupRows.getRowGroup(t);i.calcs.bottom&&(e=this.rowsToData(i.rows),o=this.generateRowData("bottom",e),i.calcs.bottom.updateData(o)),i.calcs.top&&(e=this.rowsToData(i.rows),o=this.generateRowData("top",e),i.calcs.top.updateData(o))},m.prototype.generateTopRow=function(t){return this.generateRow("top",this.rowsToData(t))},m.prototype.generateBottomRow=function(t){return this.generateRow("bottom",this.rowsToData(t))},m.prototype.rowsToData=function(t){var e=[];return t.forEach(function(t){e.push(t.getData())}),e},m.prototype.generateRow=function(t,e){var o=this,i=this.generateRowData(t,e),n=new l(i,this);return n.getElement().addClass("tabulator-calcs").addClass("tabulator-calcs-"+t),n.type="calc",n.generateCells=function(){var e=[];o.table.columnManager.columnsByIndex.forEach(function(i){if(i.visible){o.genColumn.setField(i.getField()),o.genColumn.hozAlign=i.hozAlign,i.definition[t+"CalcFormatter"]&&o.table.extExists("format")?o.genColumn.extensions.format={formatter:o.table.extensions.format.getFormatter(i.definition[t+"CalcFormatter"]),params:i.definition[t+"CalcFormatterParams"]}:o.genColumn.extensions.format={formatter:o.table.extensions.format.getFormatter("plaintext"),params:{}};var s=new c(o.genColumn,n);s.column=i,s.setWidth(i.getWidth()),i.cells.push(s),e.push(s)}}),this.cells=e},n},m.prototype.generateRowData=function(t,e){var o={},i="top"==t?this.topCalcs:this.botCalcs,n="top"==t?"topCalc":"botCalc";return i.forEach(function(t){var i=[];t.extensions.columnCalcs&&t.extensions.columnCalcs[n]&&(e.forEach(function(e){i.push(t.getFieldValue(e))}),t.setFieldValue(o,t.extensions.columnCalcs[n](i,e,t.extensions.columnCalcs[n+"Params"])))}),o},m.prototype.hasTopCalcs=function(){return!!this.topCalcs.length},m.prototype.hasBottomCalcs=function(){return!!this.botCalcs.length},m.prototype.redraw=function(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)},m.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 e=Number(e),t+e}),i/=t.length,i=!1!==n?i.toFixed(n):i),parseFloat(i).toString()},max:function(t,e,o){var i=null;return t.forEach(function(t){((t=Number(t))>i||null===i)&&(i=t)}),null!==i?i:""},min:function(t,e,o){var i=null;return t.forEach(function(t){((t=Number(t))<i||null===i)&&(i=t)}),null!==i?i:""},sum:function(t,e,o){var i=0;return t.length&&t.forEach(function(t){t=Number(t),i+=isNaN(t)?0:Number(t)}),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.registerExtension("columnCalcs",m);var v=function(t){this.table=t,this.fields={}};v.prototype.download=function(t,e,o){function i(o,i){n.triggerDownload(o,i,t,e)}var n=this,s=!1;"function"==typeof t?s=t:n.downloaders[t]?s=n.downloaders[t]:console.warn("Download Error - No such download type found: ",t),s&&s.call(this,n.processDefinitions(),n.processData(),o,i)},v.prototype.processDefinitions=function(){var t=this,e=t.table.columnManager.getDefinitions(),o=[];return t.fields={},e.forEach(function(e){if(e.field&&(t.fields[e.field]=e.field.split("."),!1!==e.download)){var i={};for(var n in e)i[n]=e[n];void 0!==e.downloadTitle&&(i.title=e.downloadTitle),o.push(i)}}),o},v.prototype.processData=function(){var t=this,e=t.table.rowManager.getData(!0);return"function"==typeof t.table.options.downloadDataMutator&&(e=t.table.options.downloadDataMutator(e)),e},v.prototype.triggerDownload=function(t,e,o,i){var n=document.createElement("a"),s=new Blob([t],{type:e}),i=i||"Tabulator."+("function"==typeof o?"txt":o);navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(s,i):(n.setAttribute("href",window.URL.createObjectURL(s)),n.setAttribute("download",i),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n))},v.prototype.getFieldValue=function(t,e){for(var o,i=e,n=this.fields[t],s=n.length,a=0;a<s&&(i=i[n[a]],o=i,i);a++);return o},v.prototype.downloaders={csv:function(t,e,o,i){var n,s=this,a=[],r=[],l=o&&o.delimiter?o.delimiter:",";t.forEach(function(t){t.field&&(a.push('"'+String(t.title).split('"').join('""')+'"'),r.push(t.field))}),n=[a.join(l)],e.forEach(function(t){var e=[];r.forEach(function(o){var i=s.getFieldValue(o,t);switch(void 0===i?"undefined":_typeof(i)){case"object":i=JSON.stringify(i);break;case"undefined":case"null":i="";break;default:i=i}e.push('"'+String(i).split('"').join('""')+'"')}),n.push(e.join(l))}),i(n.join("\n"),"text/csv")},json:function(t,e,o,i){i(JSON.stringify(e,null,"\t"),"application/json")},xlsx:function(t,e,o,i){var n,s,a=this,r=[],l=[],u=[],c={SheetNames:["Sheet1"],Sheets:{}};t.forEach(function(t){t.field&&(r.push(t.title),l.push(t.field))}),u.push(r),e.forEach(function(t){var e=[];l.forEach(function(o){e.push(a.getFieldValue(o,t))}),u.push(e)}),n=function(){var t={},e={s:{c:0,r:0},e:{c:l.length,r:u.length}};return u.forEach(function(e,o){e.forEach(function(e,i){var n={v:void 0===e||null===e?"":e};if(null!=n){switch(_typeof(n.v)){case"number":n.t="n";break;case"boolean":n.t="b";break;default:n.t="s"}t[XLSX.utils.encode_cell({c:i,r:o})]=n}})}),t["!ref"]=XLSX.utils.encode_range(e),t}(),c.Sheets.Sheet1=n,s=XLSX.write(c,{bookType:"xlsx",bookSST:!0,type:"binary"}),i(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}(s),"application/octet-stream")}},Tabulator.registerExtension("download",v);var b=function(t){this.table=t,this.currentCell=!1};b.prototype.initializeColumn=function(t){var e=this,o={editor:!1,blocked:!1,check:t.definition.editable,params:t.definition.editorParams||{}};switch(_typeof(t.definition.editor)){case"string":e.editors[t.definition.editor]?o.editor=e.editors[t.definition.editor]:console.warn("Editor Error - No such editor found: ",t.definition.editor);break;case"function":o.editor=t.definition.editor;break;case"boolean":!0===t.definition.editor&&("function"!=typeof t.definition.formatter?e.editors[t.definition.formatter]?o.editor=e.editors[t.definition.formatter]:o.editor=e.editors.input:console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",t.definition.formatter))}o.editor&&(t.extensions.edit=o)},b.prototype.getCurrentCell=function(){return!!this.currentCell&&this.currentCell.getComponent()},b.prototype.clearEditor=function(t){this.currentCell=!1,t.getElement().removeClass("tabulator-validation-fail"),t.getElement().removeClass("tabulator-editing").empty(),t.row.getElement().removeClass("tabulator-row-editing")},b.prototype.bindEditor=function(e){function o(t){var o=!0;e.column.extensions.validate&&n.table.extExists("validate")&&(o=n.table.extensions.validate.validate(e.column.extensions.validate,e.getComponent(),t)),!0===o?(n.clearEditor(e),e.setValue(t,!0)):(e.getElement().addClass("tabulator-validation-fail"),s(),n.table.options.validationFailed(e.getComponent(),t,o))}function i(){n.clearEditor(e),e.setValueActual(e.getValue()),n.table.options.cellEditCancelled(e.getComponent())}var n=this,s=function(){},a=e.getElement(),r=!1;a.attr("tabindex",0),a.on("click",function(e){t(this).hasClass("tabulator-editing")||t(this).focus()}),a.on("mousedown",function(t){r=!0}),a.on("focus",function(t){function l(t){s=t}var u,c=!0;n.currentCell=e,r&&(r=!1,e.column.cellEvents.cellClick&&e.column.cellEvents.cellClick(t,e.getComponent())),e.column.extensions.edit.blocked?a.blur():(t.stopPropagation(),"function"==typeof e.column.extensions.edit.check&&(c=e.column.extensions.edit.check(e.getComponent())),c?(n.table.options.cellEditing(e.getComponent()),u=e.column.extensions.edit.editor.call(n,e.getComponent(),l,o,i,e.column.extensions.edit.params),!1!==u?(a.addClass("tabulator-editing"),e.row.getElement().addClass("tabulator-row-editing"),a.empty(),a.append(u),s(),a.children().click(function(t){t.stopPropagation()})):a.blur()):a.blur())})},b.prototype.editors={input:function(e,o,i,n,s){var a=t("<input type='text'/>");return a.css({padding:"4px",width:"100%","box-sizing":"border-box"}).val(e.getValue()),o(function(){a.focus(),a.css("height","100%")}),a.on("change blur",function(t){a.val()!=e.getValue()?i(a.val()):n()}),a.on("keydown",function(t){13==t.keyCode&&i(a.val()),27==t.keyCode&&n()}),a},textarea:function(e,o,i,n,s){var a=e.getValue(),r=String("null"==typeof a||void 0===a?"":a),l=(r.match(/(?:\r\n|\r|\n)/g),t("<textarea></textarea>")),u=0;return l.css({display:"block",height:"100%",width:"100%",padding:"2px","box-sizing":"border-box","white-space":"pre-wrap",resize:"none"}).val(r),o(function(){l.focus(),l.css("height","100%")}),l.on("change blur",function(t){l.val()!=e.getValue()?(i(l.val()),setTimeout(function(){e.getRow().normalizeHeight()},300)):n()}),l.on("keyup",function(){l.css({height:""});var t=l[0].scrollHeight;l.css({height:t}),t!=u&&(u=t,e.getRow().normalizeHeight())}),l.on("keydown",function(t){27==t.keyCode&&n()}),l},number:function(e,o,i,n,s){var a=t("<input type='number'/>");return a.css({padding:"4px",width:"100%","box-sizing":"border-box"}).val(e.getValue()),o(function(){a.focus(),a.css("height","100%")}),a.on("blur",function(t){var o=a.val();isNaN(o)||(o=Number(o)),o!=e.getValue()?i(o):n()}),a.on("keydown",function(t){var e;13==t.keyCode&&(e=a.val(),isNaN(e)||(e=Number(e)),i(e)),27==t.keyCode&&n()}),a},star:function(e,o,i,n,s){var a=e.getElement(),r=e.getValue(),l=t("svg",a).length||5,u=t("svg:first",a).attr("width")||14,c=t("<div style='vertical-align:middle; padding:4px; display:inline-block; vertical-align:middle;'></div>"),h=t('<svg width="'+u+'" height="'+u+'" class="tabulator-star-active" viewBox="0 0 512 512" xml:space="preserve" style="padding:0 1px;"><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 "/></svg>'),p=t('<svg width="'+u+'" height="'+u+'" class="tabulator-star-inactive" viewBox="0 0 512 512" xml:space="preserve" style="padding:0 1px;"><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 "/></svg>'),d=function(e){t(".tabulator-star-active",e.closest("div")).length!=e.prevAll("svg").length+1&&(e.prevAll("svg").replaceWith(h.clone()),e.nextAll("svg").replaceWith(p.clone()),e.replaceWith(h.clone()))};r=parseInt(r)<l?parseInt(r):l;for(var f=1;f<=l;f++){var g=f<=r?h:p;c.append(g.clone())}return c.on("mouseover","svg",function(e){e.stopPropagation(),d(t(this))}),c.on("mouseover",function(e){t("svg",t(this)).replaceWith(p.clone())}),c.on("click",function(t){i(0)}),c.on("click","svg",function(e){e.stopPropagation(),i(t(this).prevAll("svg").length+1)}),a.css({"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"}),a.on("blur",function(){n()}),a.on("keydown",function(e){switch(e.keyCode){case 39:d(t(".tabulator-star-inactive:first",c));break;case 37:var o=t(".tabulator-star-active:last",c).prev("svg");o.length?d(o):t("svg",c).replaceWith(p.clone());break;case 13:i(t(".tabulator-star-active",c).length);break;case 27:n()}}),c},progress:function(e,o,i,n,s){var a,r=e.getElement(),l=t("div",r).data("max"),u=t("div",r).data("min"),c=(l-u)/100,h=e.getValue()||0,p=t("<div class='tabulator-progress-handle' style='position:absolute; right:0; top:0; bottom:0; width:5px;'></div>"),d=function(){var t=c*Math.round(a.outerWidth()/(r.width()/100))+u;i(t),r.attr("aria-valuenow",t).attr("aria-label",h)};return h=parseFloat(h)<=l?parseFloat(h):l,h=parseFloat(h)>=u?parseFloat(h):u,h=100-Math.round((h-u)/c),a=t("<div style='position:absolute; top:8px; bottom:8px; left:4px; right:"+h+"%; margin-right:4px; background-color:#488CE9; display:inline-block; max-width:100%; min-width:0%;' data-max='"+l+"' data-min='"+u+"'></div>"),r.css({padding:"0 4px"}),r.attr("aria-valuemin",u).attr("aria-valuemax",l),a.append(p),p.on("mousedown",function(t){a.data("mouseDrag",t.screenX),a.data("mouseDragWidth",a.outerWidth())}),p.on("mouseover",function(){t(this).css({cursor:"ew-resize"})}),r.on("mousemove",function(t){a.data("mouseDrag")&&a.css({width:a.data("mouseDragWidth")+(t.screenX-a.data("mouseDrag"))})}),r.on("mouseup",function(t){a.data("mouseDrag")&&(t.stopPropagation(),t.stopImmediatePropagation(),a.data("mouseDragOut",!0),a.data("mouseDrag",!1),a.data("mouseDragWidth",!1),d())}),r.on("keydown",function(t){switch(t.keyCode){case 39:a.css({width:a.width()+r.width()/100});break;case 37:a.css({width:a.width()-r.width()/100});break;case 13:d();break;case 27:n()}}),r.on("blur",function(){n()}),a},tickCross:function(e,o,i,n,s){var a=e.getValue(),r=t("<input type='checkbox'/>");return r.css({"margin-top":"5px","box-sizing":"border-box"}).val(a),o(function(){r.focus()}),!0===a||"true"===a||"True"===a||1===a?r.prop("checked",!0):r.prop("checked",!1),r.on("change blur",function(t){i(r.is(":checked"))}),r.on("keydown",function(t){13==t.keyCode&&i(r.is(":checked")),27==t.keyCode&&n()}),r},tick:function(e,o,i,n,s){var a=e.getValue(),r=t("<input type='checkbox'/>");return r.css({"margin-top":"5px","box-sizing":"border-box"}).val(a),o(function(){r.focus()}),!0===a||"true"===a||"True"===a||1===a?r.prop("checked",!0):r.prop("checked",!1),r.on("change blur",function(t){i(r.is(":checked"))}),r.on("keydown",function(t){13==t.keyCode&&i(r.is(":checked")),27==t.keyCode&&n()}),r}},Tabulator.registerExtension("edit",b);var w=function(t){this.table=t,this.filterList=[],this.headerFilters={},this.headerFilterElements=[],this.changed=!1};w.prototype.initializeColumn=function(e){function o(t){var o,i="input"==u&&"text"==c?"partial":"match",n="";if(t){switch(_typeof(e.definition.headerFilterFunc)){case"string":h.filters[e.definition.headerFilterFunc]?(n=e.definition.headerFilterFunc,o=function(o){return h.filters[e.definition.headerFilterFunc](t,e.getFieldValue(o))}):console.warn("Header Filter Error - Matching filter function not found: ",e.definition.headerFilterFunc);break;case"function":o=function(o){return e.definition.headerFilterFunc(t,e.getFieldValue(o),o,e.definition.headerFilterFuncParams||{})},n=o}if(!o)switch(i){case"partial":o=function(o){return String(e.getFieldValue(o)).toLowerCase().indexOf(String(t).toLowerCase())>-1},n="like";break;default:o=function(o){return e.getFieldValue(o)==t},n="="}h.headerFilters[p]={value:t,func:o,type:n}}else delete h.headerFilters[p];h.changed=!0,h.table.rowManager.filterRefresh()}function i(){}var n,s,a,r,l,u,c,h=this,p=e.getField();if(p){switch(n=t("<div class='tabulator-header-filter'></div>"),_typeof(e.definition.headerFilter)){case"string":h.table.extensions.edit.editors[e.definition.headerFilter]?s=h.table.extensions.edit.editors[e.definition.headerFilter]:console.warn("Filter Error - Cannot build header filter, No such editor found: ",e.definition.editor);break;case"function":s=e.definition.headerFilter;break;case"boolean":s=e.extensions.edit&&e.extensions.edit.editor?e.extensions.edit.editor:e.definition.formatter&&h.table.extensions.edit.editors[e.definition.formatter]?h.table.extensions.edit.editors[e.definition.formatter]:h.table.extensions.edit.editors.input}s&&(r={getValue:function(){return""},getField:function(){return e.definition.field},getElement:function(){return n}},a=s.call(h,r,function(){},o,i,e.definition.headerFilterParams||{}),p?h.table.extensions.localize.bind("headerFilters.columns."+e.definition.field,function(t){a.attr("placeholder",void 0!==t&&t?t:h.table.extensions.localize.getText("headerFilters.default"))}):h.table.extensions.localize.bind("headerFilters.default",function(t){a.attr("placeholdder",void 0!==h.column.definition.headerFilterPlaceholder&&h.column.definition.headerFilterPlaceholder?h.column.definition.headerFilterPlaceholder:t)}),a.on("click",function(e){e.stopPropagation(),t(this).focus()}),l=!1,a.on("keyup search",function(e){var i=t(this);l&&clearTimeout(l),l=setTimeout(function(){o(i.val())},300)}),c=a.attr("type")?a.attr("type").toLowerCase():"","number"==c&&a.on("change",function(e){o(t(this).val())}),"text"==c&&(a.attr("type","search"),a.off("change blur")),u=a.prop("tagName").toLowerCase(),"input"!=u&&"select"!=u||a.on("mousedown",function(t){t.stopPropagation()}),n.append(a),e.contentElement.append(n),h.headerFilterElements.push(a))}else console.warn("Filter Error - Cannot add header filter, column has no field set:",e.definition.title)},w.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},w.prototype.setFilter=function(t,e,o){var i=this;i.filterList=[],Array.isArray(t)||(t=[{field:t,type:e,value:o}]),i.addFilter(t)},w.prototype.addFilter=function(t,e,o){var i,n=this;Array.isArray(t)||(t=[{field:t,type:e,value:o}]),t.forEach(function(t){var e=!1;"function"==typeof t.field?e=function(e){return t.field(e,t.type||{})}:n.filters[t.type]?(i=n.table.columnManager.getColumnByField(t.field),e=i?function(e){return n.filters[t.type](t.value,i.getFieldValue(e))}:function(e){return n.filters[t.type](t.value,e[t.field])}):console.warn("Filter Error - No such filter type found, ignoring: ",t.type),e&&(t.func=e,n.filterList.push(t),n.changed=!0)})},w.prototype.getFilters=function(t,e){var o=this,i=[];return t&&(i=o.getHeaderFilters()),o.filterList.forEach(function(t){i.push({field:t.field,type:t.type,value:t.value})}),e&&i.forEach(function(t){"function"==typeof t.type&&(t.type="function")}),i},w.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},w.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}),e>-1?(i.filterList.splice(e,1),i.changed=!0):console.warn("Filter Error - No matching filter type found, ignoring: ",t.type)})},w.prototype.clearFilter=function(t){this.filterList=[],t&&this.clearHeaderFilter(),this.changed=!0},w.prototype.clearHeaderFilter=function(){this.headerFilters={},this.headerFilterElements.forEach(function(t){t.val("")}),self.changed=!0},w.prototype.filter=function(t){var e=this,o=[],i=[];return e.table.options.dataFiltering&&e.table.options.dataFiltering(e.getFilters()),e.table.options.ajaxFiltering||!e.filterList.length&&!Object.keys(e.headerFilters).length?o=t.slice(0):t.forEach(function(t){e.filterRow(t)&&o.push(t)}),e.table.options.dataFiltered&&(o.forEach(function(t){i.push(t.getComponent())}),e.table.options.dataFiltered(e.getFilters(),i)),o},w.prototype.filterRow=function(t){var e=this,o=!0,i=t.getData();e.filterList.forEach(function(t){t.func(i)||(o=!1)});for(var n in e.headerFilters)e.headerFilters[n].func(i)||(o=!1);return o},w.prototype.filters={"=":function(t,e){return e==t},"<":function(t,e){return e<t},"<=":function(t,e){return e<=t},">":function(t,e){return e>t},">=":function(t,e){return e>=t},"!=":function(t,e){return e!=t},like:function(t,e){return null===t||void 0===t?e===t:e.toLowerCase().indexOf(t.toLowerCase())>-1}},Tabulator.registerExtension("filter",w);var y=function(t){this.table=t};y.prototype.initializeColumn=function(t){var e=this,o={params:t.definition.formatterParams||{}};switch(_typeof(t.definition.formatter)){case"string":e.formatters[t.definition.formatter]?o.formatter=e.formatters[t.definition.formatter]:(console.warn("Formatter Error - No such formatter found: ",t.definition.formatter),o.formatter=e.formatters.plaintext);break;case"function":o.formatter=t.definition.formatter;break;default:o.formatter=e.formatters.plaintext}t.extensions.format=o},y.prototype.formatValue=function(t){return t.column.extensions.format.formatter.call(this,t.getComponent(),t.column.extensions.format.params)},y.prototype.sanitizeHTML=function(t){if(t){var e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};return String(t).replace(/[&<>"'`=\/]/g,function(t){return e[t]})}return t},
y.prototype.emptyToSpace=function(t){return null===t?"&nbsp":t},y.prototype.getFormatter=function(t){var 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},y.prototype.formatters={plaintext:function(t,e){return this.emptyToSpace(this.sanitizeHTML(t.getValue()))},html:function(t,e){return t.getValue()},textarea:function(t,e){return t.getElement().css({"white-space":"pre-wrap"}),this.emptyToSpace(this.sanitizeHTML(t.getValue()))},money:function(t,e){var o,i,n,s,a=parseFloat(t.getValue()),r=e.decimal||".",l=e.thousand||",",u=e.symbol||"",c=!!e.symbolAfter,h=void 0!==e.precision?e.precision:2;if(isNaN(a))return this.emptyToSpace(this.sanitizeHTML(t.getValue()));for(o=!1!==h?a.toFixed(h):a,o=o.split("."),i=o[0],n=o.length>1?r+o[1]:"",s=/(\d+)(\d{3})/;s.test(i);)i=i.replace(s,"$1"+l+"$2");return c?i+n+u:u+i+n},email:function(t,e){var o=this.sanitizeHTML(t.getValue());return"<a href='mailto:"+o+"'>"+this.emptyToSpace(o)+"</a>"},link:function(t,e){var o=this.sanitizeHTML(t.getValue());return"<a href='"+o+"'>"+this.emptyToSpace(o)+"</a>"},image:function(t,e){return"<img src='"+this.sanitizeHTML(t.getValue())+"'/>"},tick:function(t,e){var o=t.getValue(),i=t.getElement();return!0===o||"true"===o||"True"===o||1===o||"1"===o?(i.attr("aria-checked",!0),'<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>'):(i.attr("aria-checked",!1),"")},tickCross:function(t,e){var o=t.getValue(),i=t.getElement();return!0===o||"true"===o||"True"===o||1===o||"1"===o?(i.attr("aria-checked",!0),'<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>'):(i.attr("aria-checked",!1),'<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>')},star:function(e,o){var i=e.getValue(),n=e.getElement(),s=o&&o.stars?o.stars:5,a=t("<span style='vertical-align:middle;'></span>"),r=t('<svg width="14" height="14" viewBox="0 0 512 512" xml:space="preserve" style="margin:0 1px;"><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 "/></svg>'),l=t('<svg width="14" height="14" viewBox="0 0 512 512" xml:space="preserve" style="margin:0 1px;"><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 "/></svg>');i=parseInt(i)<s?parseInt(i):s;for(var u=1;u<=s;u++){var c=u<=i?r:l;a.append(c.clone())}return n.css({"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"}),n.attr("aria-label",i),a.html()},progress:function(t,e){var o,i=this.sanitizeHTML(t.getValue())||0,n=t.getElement(),s=e&&e.max?e.max:100,a=e&&e.min?e.min:0,r=e&&e.color?e.color:"#2DC214";return i=parseFloat(i)<=s?parseFloat(i):s,i=parseFloat(i)>=a?parseFloat(i):a,o=(s-a)/100,i=100-Math.round((i-a)/o),n.css({"min-width":"30px",position:"relative"}),n.attr("aria-label",i),"<div style='position:absolute; top:8px; bottom:8px; left:4px; right:"+i+"%; margin-right:4px; background-color:"+r+"; display:inline-block;' data-max='"+s+"' data-min='"+a+"'></div>"},color:function(t,e){return t.getElement().css({"background-color":this.sanitizeHTML(t.getValue())}),""},buttonTick:function(t,e){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){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){return this.table.rowManager.activeRows.indexOf(t.getRow()._getSelf())+1},handle:function(t,e){return t.getElement().addClass("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>"}},Tabulator.registerExtension("format",y);var x=function(t){this.table=t,this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.initializationMode="left",this.active=!1};x.prototype.reset=function(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.active=!1},x.prototype.initializeColumn=function(t){var e={margin:0,edge:!1};t.definition.frozen?t.parent.isGroup?console.warn("Frozen Column Error - Grouped columns cannot be frozen"):t.isGroup?console.warn("Frozen Column Error - Column Groups cannot be frozen"):(e.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(t):this.rightColumns.unshift(t),this.active=!0,t.extensions.frozen=e):this.initializationMode="right"},x.prototype.layout=function(){var t=this,e=this.table.rowManager.element,o=0;t.active&&(t.leftMargin=t._calcSpace(t.leftColumns,t.leftColumns.length),t.table.columnManager.headersElement.css("margin-left",t.leftMargin),t.rightMargin=t._calcSpace(t.rightColumns,t.rightColumns.length),t.table.columnManager.element.css("padding-right",t.rightMargin),t.table.rowManager.activeRows.forEach(function(e){t.layoutRow(e)}),t.table.extExists("columnCalcs")&&(t.table.extensions.columnCalcs.topInitialized&&t.table.extensions.columnCalcs.topRow&&t.layoutRow(t.table.extensions.columnCalcs.topRow),t.table.extensions.columnCalcs.botInitialized&&t.table.extensions.columnCalcs.botRow&&t.layoutRow(t.table.extensions.columnCalcs.botRow)),t.leftColumns.forEach(function(e,o){e.extensions.frozen.margin=t._calcSpace(t.leftColumns,o)+t.table.columnManager.scrollLeft,o==t.leftColumns.length-1?e.extensions.frozen.edge=!0:e.extensions.frozen.edge=!1,t.layoutColumn(e)}),o=t.table.rowManager.element.innerWidth()+t.table.columnManager.scrollLeft,e[0].scrollHeight>e.innerHeight()&&(o-=e[0].offsetWidth-e[0].clientWidth),t.rightColumns.forEach(function(e,i){e.extensions.frozen.margin=o-t._calcSpace(t.rightColumns,i+1),i==t.rightColumns.length-1?e.extensions.frozen.edge=!0:e.extensions.frozen.edge=!1,t.layoutColumn(e)}))},x.prototype.layoutColumn=function(t){var e=this;e.layoutElement(t.element,t),t.cells.forEach(function(o){e.layoutElement(o.element,t)})},x.prototype.layoutRow=function(t){t.getElement().css({"padding-left":this.leftMargin,"padding-right":this.rightMargin})},x.prototype.layoutElement=function(t,e){if(e.extensions.frozen){var o={position:"absolute",left:e.extensions.frozen.margin};t.css(o),t.addClass("tabulator-frozen"),e.extensions.frozen.edge&&t.addClass("tabulator-frozen-"+e.extensions.frozen.position)}},x.prototype._calcSpace=function(t,e){for(var o=0,i=0;i<e;i++)t[i].visible&&(o+=t[i].getWidth());return o},Tabulator.registerExtension("frozenColumns",x);var C=function(t){this.group=t,this.type="GroupComponent"};C.prototype.getKey=function(){return this.group.key},C.prototype.getElement=function(){return this.group.element},C.prototype.getRows=function(){var t=[];return this.group.rows.forEach(function(e){t.push(e.getComponent())}),t},C.prototype.getSubGroups=function(){var t=[];return this.group.groupList.forEach(function(e){t.push(e.getComponent())}),t},C.prototype.getParentGroup=function(){return!!this.group.parent&&this.group.parent.getComponent()},C.prototype.getVisibility=function(){return this.group.visible},C.prototype.show=function(){this.group.show()},C.prototype.hide=function(){this.group.hide()},C.prototype.toggle=function(){this.group.toggleVisibility()},C.prototype._getSelf=function(){return this.group};var E=function(e,o,i,n,s,a){this.groupManager=e,this.parent=o,this.key=n,this.level=i,this.hasSubGroups=i<e.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.element=t("<div class='tabulator-row tabulator-group tabulator-group-level-"+i+"' role='rowgroup'></div>"),this.arrowElement=t("<div class='tabulator-arrow'></div>"),this.height=0,this.outerHeight=0,this.initialized=!1,this.calcs={},this.initialized=!1,this.visible=a?a.visible:void 0!==e.startOpen[i]?e.startOpen[i]:e.startOpen[0],this.addBindings()};E.prototype.addBindings=function(){var t,e,o,i,n=this;n.groupManager.table.options.groupToggleElement&&(i="arrow"==n.groupManager.table.options.groupToggleElement?n.arrowElement:n.element,i.on("click",function(t){t.stopPropagation(),t.stopImmediatePropagation(),n.toggleVisibility()})),n.groupManager.table.options.groupClick&&n.element.on("click",function(t){n.groupManager.table.options.groupClick(t,n.getComponent())}),n.groupManager.table.options.groupDblClick&&n.element.on("dblclick",function(t){n.groupManager.table.options.groupDblClick(t,n.getComponent())}),n.groupManager.table.options.groupContext&&n.element.on("contextmenu",function(t){n.groupManager.table.options.groupContext(t,n.getComponent())}),n.groupManager.table.options.groupTap&&(o=!1,n.element.on("touchstart",function(t){o=!0}),n.element.on("touchend",function(t){o&&n.groupManager.table.options.groupTap(t,n.getComponent()),o=!1})),n.groupManager.table.options.groupDblTap&&(t=null,n.element.on("touchend",function(e){t?(clearTimeout(t),t=null,n.groupManager.table.options.groupDblTap(e,n.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),n.groupManager.table.options.groupTapHold&&(e=null,n.element.on("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,n.groupManager.table.options.groupTapHold(t,n.getComponent())},1e3)}),n.element.on("touchend",function(t){clearTimeout(e),e=null}))},E.prototype._addRowToGroup=function(t){var e=this.level+1;if(this.hasSubGroups){var o=this.groupManager.groupIDLookups[e](t.getData());if(!this.groups[o]){var i=new E(this.groupManager,this,e,o,this.groupManager.headerGenerator[e]||this.groupManager.headerGenerator[0],!!this.old&&this.old.groups[o]);this.groups[o]=i,this.groupList.push(i)}this.groups[o].addRow(t)}},E.prototype._addRow=function(t){this.rows.push(t)},E.prototype.getHeadersAndRows=function(){var t=[];return t.push(this),this._visSet(),this.visible?this.groupList.length?this.groupList.forEach(function(e){t=t.concat(e.getHeadersAndRows())}):(this.groupManager.table.extExists("columnCalcs")&&this.groupManager.table.extensions.columnCalcs.hasTopCalcs()&&(this.calcs.top=this.groupManager.table.extensions.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top)),t=t.concat(this.rows),this.groupManager.table.extExists("columnCalcs")&&this.groupManager.table.extensions.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom=this.groupManager.table.extensions.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom))):this.groupManager.table.options.groupClosedShowCalcs&&this.groupManager.table.extExists("columnCalcs")&&(this.groupManager.table.extensions.columnCalcs.hasTopCalcs()&&(this.calcs.top=this.groupManager.table.extensions.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top)),this.groupManager.table.extensions.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom=this.groupManager.table.extensions.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom))),t},E.prototype.getRows=function(){return this._visSet(),this.visible?this.rows:[]},E.prototype.getRowCount=function(){var t=0;return this.groupList.length?this.groupList.forEach(function(e){t+=e.getRowCount()}):t=this.rows.length,t},E.prototype.toggleVisibility=function(){this.visible?this.hide():this.show()},E.prototype.hide=function(){this.visible=!1,"classic"==this.groupManager.table.rowManager.getRenderMode()?(this.element.removeClass("tabulator-group-visible"),this.rows.forEach(function(t){t.getElement().detach()})):this.groupManager.updateGroupRows(!0),this.groupManager.table.options.groupVisibilityChanged(this.getComponent(),!1)},E.prototype.show=function(){var t=this;t.visible=!0,"classic"==this.groupManager.table.rowManager.getRenderMode()?(this.element.addClass("tabulator-group-visible"),t.rows.forEach(function(e){t.getElement().after(e.getElement()),e.initialize()})):this.groupManager.updateGroupRows(!0),this.groupManager.table.options.groupVisibilityChanged(this.getComponent(),!0)},E.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.getRowCount()))},E.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},E.prototype.getElement=function(){this.addBindingsd=!1,this._visSet();var t=[];return this.rows.forEach(function(e){t.push(e.getData())}),this.visible?this.element.addClass("tabulator-group-visible"):this.element.removeClass("tabulator-group-visible"),this.element.children().detach(),this.element.html(this.generator(this.key,this.getRowCount(),t,this.getComponent())).prepend(this.arrowElement),this.element},E.prototype.normalizeHeight=function(){this.setHeight(this.element.innerHeight())},E.prototype.initialize=function(t){this.initialized&&!t||(this.normalizeHeight(),this.initialized=!0)},E.prototype.reinitialize=function(){this.initialized=!1,this.height=0,this.element.is(":visible")&&this.initialize(!0)},E.prototype.setHeight=function(t){this.height!=t&&(this.height=t,this.outerHeight=this.element.outerHeight())},E.prototype.getHeight=function(){return this.outerHeight},E.prototype.reinitializeHeight=function(){},E.prototype.calcHeight=function(){},E.prototype.setCellHeight=function(){},E.prototype.clearCellHeight=function(){},E.prototype.getComponent=function(){return new C(this)};var R=function(t){this.table=t,this.groupIDLookups=!1,this.startOpen=[function(){return!1}],this.headerGenerator=[function(){return""}],this.groupList=[],this.groups={}};R.prototype.initialize=function(){var t=this,e=t.table.options.groupBy,o=t.table.options.groupStartOpen,i=t.table.options.groupHeader;if(t.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],t.table.extensions.localize.bind("groups.item",function(e,o){t.headerGenerator[0]=function(t,i,n){return t+"<span>("+i+" "+(1===i?e:o.groups.items)+")</span>"}}),this.groupIDLookups=[],Array.isArray(e)||e)this.table.extExists("columnCalcs")&&this.table.extensions.columnCalcs.removeCalcs();else if(this.table.extExists("columnCalcs")){var n=this.table.columnManager.getRealColumns();n.forEach(function(e){e.definition.topCalc&&t.table.extensions.columnCalcs.initializeTopRow(),e.definition.bottomCalc&&t.table.extensions.columnCalcs.initializeBottomRow()})}Array.isArray(e)||(e=[e]),e.forEach(function(e){var o,i;"function"==typeof e?o=e:(i=t.table.columnManager.getColumnByField(e),o=i?function(t){return i.getFieldValue(t)}:function(t){return t[e]}),t.groupIDLookups.push(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},R.prototype.getRows=function(t){return this.groupIDLookups.length?(this.table.options.dataGrouping(),this.generateGroups(t),this.table.options.dataGrouped&&this.table.options.dataGrouped(this.getGroups()),this.updateGroupRows()):t.slice(0)},R.prototype.getGroups=function(){var t=[];return this.table.options.dataGrouped&&this.groupList.forEach(function(e){t.push(e.getComponent())}),t},R.prototype.getRowGroup=function(t){var e=!1;return this.groupList.forEach(function(o){var i=o.getRowGroup(t);i&&(e=i)}),e},R.prototype.countGroups=function(){return this.groupList.length},R.prototype.generateGroups=function(t){var e=this,o=e.groups;e.groups={},e.groupList=[],t.forEach(function(t){var i=e.groupIDLookups[0](t.getData());if(!e.groups[i]){var n=new E(e,!1,0,i,e.headerGenerator[0],o[i]);e.groups[i]=n,e.groupList.push(n)}e.groups[i].addRow(t)})},R.prototype.updateGroupRows=function(t){var e,o=this,i=[];return o.groupList.forEach(function(t){i=i.concat(t.getHeadersAndRows())}),t&&(e=o.table.rowManager.displayRowsCount,o.table.rowManager.setDisplayRows(i),o.table.rowManager._virtualRenderFill(Math.floor(o.table.rowManager.element.scrollTop()/o.table.rowManager.element[0].scrollHeight*e))),i},R.prototype.scrollHeaders=function(t){this.groupList.forEach(function(e){e.arrowElement.css("margin-left",t)})},Tabulator.registerExtension("groupRows",R);var D=function(t){this.table=t,this.history=[],this.index=-1};D.prototype.clear=function(){this.history=[],this.index=-1},D.prototype.action=function(t,e,o){this.index>-1&&(this.history=this.history.slice(0,this.index+1)),this.history.push({type:t,component:e,data:o}),this.index++},D.prototype.undo=function(){if(this.index>-1){var t=this.history[this.index];return this.undoers[t.type].call(this,t),this.index--,!0}return console.warn("History Undo Error - No more history to undo"),!1},D.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),!0}return console.warn("History Redo Error - No more history to redo"),!1},D.prototype.undoers={cellEdit:function(t){t.component.setValueProcessData(t.data.oldValue)},rowAdd:function(t){t.component.delete()},rowDelete:function(t){var e=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this._rebindRow(t.component,e)}},D.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._rebindRow(t.component,e)},rowDelete:function(t){t.component.delete()}},D.prototype._rebindRow=function(t,e){this.history.forEach(function(o){if(o.component instanceof l)o.component===t&&(o.component=e);else if(o.component instanceof c&&o.component.row===t){var i=o.component.column.getField();i&&(o.component=e.getCell(i))}})},Tabulator.registerExtension("history",D);var M=function(t){this.table=t};M.prototype.parseTable=function(){var e=this,o=e.table.element,i=e.table.options,n=(i.columns,t("th",o)),s=t("tbody tr",o),a=[];e.table.options.htmlImporting(),e._extractOptions(o,i),n.length?e._extractHeaders(o):e._generateBlankHeaders(o),s.each(function(e){var o={};o[i.index]=e,t("td",t(this)).each(function(e){o[t(this).data("field")]=t(this).html()}),a.push(o)});var r=t("<div></div>"),l=o.prop("attributes");t.each(l,function(){r.attr(this.name,this.value)}),o.replaceWith(r),i.data=a,e.table.options.htmlImported(),r.tabulator(i)},M.prototype._extractOptions=function(t,e){var o=this,i=t[0].attributes;for(var n in i){var s,a=i[n];if(a&&a.name&&0===a.name.indexOf("tabulator-")){s=a.name.replace("tabulator-","");for(var r in e)r.toLowerCase()==s&&(e[r]=o._attribValue(a.value))}}},M.prototype._attribValue=function(t){return"true"===t||"false"!==t&&t},M.prototype._findCol=function(t){return this.table.options.columns.find(function(e){return e.title===t})||!1},M.prototype._extractHeaders=function(e){var o=this,i=t("th",e),n=t("tbody tr",e);i.each(function(e){var i,s,a=t(this),r=!1,l=o._findCol(a.text()),u=["title","field","align","width","minWidth","frozen","sortable","sorter","formatter","cellClick","cellDblClick","cellContext","editable","editor","visible","cssClass","tooltip","tooltipHeader","editableTitle","headerFilter","mutator","mutateType","accessor"];l?r=!0:l={title:a.text().trim()},l.field||(l.field=a.text().trim().toLowerCase().replace(" ","_")),i=a.attr("width"),i&&!l.width&&(l.width=i),s=a[0].attributes;for(var c in s){var h,p=s[c];p&&p.name&&0===p.name.indexOf("tabulator-")&&(h=p.name.replace("tabulator-",""),u.forEach(function(t){t.toLowerCase()==h&&(l[t]=o._attribValue(p.value))}))}t("td:eq("+e+")",n).data("field",l.field),l.field==o.table.options.index&&(hasIndex=!0),r||o.table.options.columns.push(l)})},M.prototype._generateBlankHeaders=function(e){var o=this;t("tr:first td",e).each(function(e){var i={title:"",field:"col"+e};t("td:eq("+e+")",rows).data("field",i.field);var n=t(this).attr("width");n&&(i.width=n),o.table.options.columns.push(i)})},Tabulator.registerExtension("htmlTableImport",M);var T=function(t){this.table=t,this.watchKeys=null,this.pressedKeys=null};T.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()}},T.prototype.mapBindings=function(t){var e=this,o=this;for(var i in t)!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)}(i)},T.prototype.mapBinding=function(t,e){var o=this,i={action:this.actions[t],keys:[],ctrl:!1,shift:!1};e.toString().toLowerCase().split(" ").join("").split("+").forEach(function(t){switch(t){case"ctrl":i.ctrl=!0;break;case"shift":i.shift=!0;break;default:t=parseInt(t),i.keys.push(t),o.watchKeys[t]||(o.watchKeys[t]=[]),o.watchKeys[t].push(i)}})},T.prototype.bindEvents=function(){var t=this;this.table.element.on("keydown",function(e){var o=e.keyCode,i=t.watchKeys[o];i&&(t.pressedKeys.push(o),i.forEach(function(o){t.checkBinding(e,o)}))}),this.table.element.on("keyup",function(e){var o=e.keyCode;if(t.watchKeys[o]){var i=t.pressedKeys.indexOf(o);i>-1&&t.pressedKeys.splice(i,1)}})},T.prototype.checkBinding=function(t,e){var o=this,i=!0;return t.ctrlKey==e.ctrl&&t.shiftKey==e.shift&&(e.keys.forEach(function(t){-1==o.pressedKeys.indexOf(t)&&(i=!1)}),i&&e.action.call(o,t),!0)},T.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"},T.prototype.actions={keyBlock:function(t){t.stopPropagation(),t.preventDefault()},scrollPageUp:function(t){var e=this.table.rowManager,o=e.scrollTop-e.height;e.element[0].scrollHeight;t.preventDefault(),e.displayRowsCount&&(o>=0?e.element.scrollTop(o):e.scrollToRow(e.displayRows[0])),this.table.element.focus()},scrollPageDown:function(t){var e=this.table.rowManager,o=e.scrollTop+e.height,i=e.element[0].scrollHeight;t.preventDefault(),e.displayRowsCount&&(o<=i?e.element.scrollTop(o):e.scrollToRow(e.displayRows[e.displayRows.length-1])),this.table.element.focus()},scrollToStart:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.displayRows[0]),this.table.element.focus()},scrollToEnd:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.displayRows[e.displayRows.length-1]),this.table.element.focus()},navPrev:function(t){var e=!1;this.table.extExists("edit")&&(e=this.table.extensions.edit.currentCell)&&(t.preventDefault(),e.nav().prev())},navNext:function(t){var e=!1;this.table.extExists("edit")&&(e=this.table.extensions.edit.currentCell)&&(t.preventDefault(),e.nav().next())},navLeft:function(t){var e=!1;this.table.extExists("edit")&&(e=this.table.extensions.edit.currentCell)&&(t.preventDefault(),e.nav().left())},navRight:function(t){var e=!1;this.table.extExists("edit")&&(e=this.table.extensions.edit.currentCell)&&(t.preventDefault(),e.nav().right())},navUp:function(t){var e=!1;this.table.extExists("edit")&&(e=this.table.extensions.edit.currentCell)&&(t.preventDefault(),e.nav().up())},navDown:function(t){var e=!1;this.table.extExists("edit")&&(e=this.table.extensions.edit.currentCell)&&(t.preventDefault(),e.nav().down())},undo:function(t){this.table.options.history&&this.table.extExists("history")&&this.table.extExists("edit")&&(this.table.extensions.edit.currentCell||(t.preventDefault(),this.table.extensions.history.undo()))},redo:function(t){this.table.options.history&&this.table.extExists("history")&&this.table.extExists("edit")&&(this.table.extensions.edit.currentCell||(t.preventDefault(),this.table.extensions.history.redo()))}},Tabulator.registerExtension("keybindings",T);var z=function(e){this.table=e,this.placeholderElement=t("<div class='tabulator-col tabulator-col-placeholder'></div>"),this.hoverElement=t(),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.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this)};z.prototype.initializeColumn=function(t){var e=this,o={};t.extensions.frozen||(o.mousemove=function(o){t.parent===e.moving.parent&&(o.pageX-t.element.offset().left+e.table.columnManager.element.scrollLeft()>t.getWidth()/2?e.toCol===t&&e.toColAfter||(t.element.after(e.placeholderElement),e.moveColumn(t,!0)):(e.toCol!==t||e.toColAfter)&&(t.element.before(e.placeholderElement),e.moveColumn(t,!1)))}.bind(e),t.getElement().on("mousedown",function(o){e.checkTimeout=setTimeout(function(){e.startMove(o,t)},e.checkPeriod)}),t.getElement().on("mouseup",function(t){e.checkTimeout&&clearTimeout(e.checkTimeout)})),t.extensions.moveColumn=o},z.prototype.startMove=function(e,o){var i=this,n=o.getElement();i.moving=o,i.startX=e.pageX-n.offset().left,i.table.element.addClass("tabulator-block-select"),i.placeholderElement.css({width:o.getWidth(),height:o.getHeight()}),n.before(i.placeholderElement),n.detach(),i.hoverElement=n.clone(),i.hoverElement.addClass("tabulator-moving"),i.table.columnManager.getElement().append(i.hoverElement),i.hoverElement.css({left:0,bottom:0}),i._bindMouseMove(),t("body").on("mousemove",i.moveHover),t("body").on("mouseup",i.endMove),i.moveHover(e)},z.prototype._bindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(t){t.extensions.moveColumn.mousemove&&t.element.on("mousemove",t.extensions.moveColumn.mousemove)})},z.prototype._unbindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(t){t.extensions.moveColumn.mousemove&&t.element.off("mousemove",t.extensions.moveColumn.mousemove)})},z.prototype.moveColumn=function(t,e){var o=this,i=this.moving.getCells();o.toCol=t,o.toColAfter=e,e?t.getCells().forEach(function(t,e){t.getElement().after(i[e].getElement())}):t.getCells().forEach(function(t,e){t.getElement().before(i[e].getElement())})},z.prototype.endMove=function(e){var o=this;o._unbindMouseMove(),o.placeholderElement.after(o.moving.getElement()),o.placeholderElement.detach(),o.hoverElement.detach(),o.table.element.removeClass("tabulator-block-select"),o.toCol&&o.table.columnManager.moveColumn(o.moving,o.toCol,o.toColAfter),o.moving=!1,o.toCol=!1,o.toColAfter=!1,t("body").off("mousemove",o.moveHover),t("body").off("mouseup",o.endMove)},z.prototype.moveHover=function(t){var e,o=this,i=o.table.columnManager.getElement(),n=i.scrollLeft(),s=t.pageX-i.offset().left+n;o.hoverElement.css({left:s-o.startX}),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.innerWidth()-s<o.autoScrollMargin&&(o.autoScrollTimeout||(o.autoScrollTimeout=setTimeout(function(){e=Math.min(i.innerWidth(),n+5),o.table.rowManager.getElement().scrollLeft(e),o.autoScrollTimeout=!1},1)))},Tabulator.registerExtension("moveColumn",z);var k=function(e){this.table=e,this.placeholderElement=t("<div class='tabulator-row tabulator-row-placeholder'></div>"),this.hoverElement=t(),this.checkTimeout=!1,this.checkPeriod=150,this.moving=!1,this.toRow=!1,this.toRowAfter=!1,this.hasHandle=!1,this.startY=0,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this)};k.prototype.setHandle=function(t){this.hasHandle=t},k.prototype.initializeRow=function(t){var e=this,o={};o.mousemove=function(o){o.pageY-t.element.offset().top+e.table.rowManager.element.scrollTop()>t.getHeight()/2?e.toRow===t&&e.toRowAfter||(t.element.after(e.placeholderElement),e.moveRow(t,!0)):(e.toRow!==t||e.toRowAfter)&&(t.element.before(e.placeholderElement),e.moveRow(t,!1))}.bind(e),this.hasHandle||(t.getElement().on("mousedown",function(o){e.checkTimeout=setTimeout(function(){e.startMove(o,t)},e.checkPeriod)}),t.getElement().on("mouseup",function(t){e.checkTimeout&&clearTimeout(e.checkTimeout)})),t.extensions.moveRow=o},k.prototype.initializeCell=function(t){var e=this;t.getElement().on("mousedown",function(o){e.checkTimeout=setTimeout(function(){e.startMove(o,t.row)},e.checkPeriod)}),t.getElement().on("mouseup",function(t){e.checkTimeout&&clearTimeout(e.checkTimeout)})},k.prototype._bindMouseMove=function(){this.table.rowManager.displayRows.forEach(function(t){"row"===t.type&&t.extensions.moveRow.mousemove&&t.element.on("mousemove",t.extensions.moveRow.mousemove)})},k.prototype._unbindMouseMove=function(){this.table.rowManager.displayRows.forEach(function(t){"row"===t.type&&t.extensions.moveRow.mousemove&&t.element.off("mousemove",t.extensions.moveRow.mousemove)})},k.prototype.startMove=function(e,o){var i=this,n=o.getElement();i.moving=o,i.startY=e.pageY-n.offset().top,i.table.element.addClass("tabulator-block-select"),i.placeholderElement.css({width:o.getWidth(),
height:o.getHeight()}),n.before(i.placeholderElement),n.detach(),i.hoverElement=n.clone(),i.hoverElement.addClass("tabulator-moving"),i.table.rowManager.getTableElement().append(i.hoverElement),i.hoverElement.css({left:0,top:0}),i._bindMouseMove(),t("body").on("mousemove",i.moveHover),t("body").on("mouseup",i.endMove),i.moveHover(e)},k.prototype.endMove=function(e){var o=this;o._unbindMouseMove(),o.placeholderElement.after(o.moving.getElement()),o.placeholderElement.detach(),o.hoverElement.detach(),o.table.element.removeClass("tabulator-block-select"),o.toRow&&o.table.rowManager.moveRow(o.moving,o.toRow,o.toRowAfter),o.moving=!1,o.toRow=!1,o.toRowAfter=!1,t("body").off("mousemove",o.moveHover),t("body").off("mouseup",o.endMove)},k.prototype.moveRow=function(t,e){var o=this;o.toRow=t,o.toRowAfter=e},k.prototype.moveHover=function(t){var e=this,o=e.table.rowManager.getElement(),i=o.scrollTop(),n=t.pageY-o.offset().top+i;e.hoverElement.css({top:n-e.startY})},Tabulator.registerExtension("moveRow",k);var F=function(t){this.table=t};F.prototype.initializeColumn=function(t){var e={mutator:!1,type:t.definition.mutateType,params:t.definition.mutatorParams||{}};switch(_typeof(t.definition.mutator)){case"string":this.mutators[t.definition.mutator]?e.mutator=this.mutators[t.definition.mutator]:console.warn("Mutator Error - No such mutator found, ignoring: ",t.definition.mutator);break;case"function":e.mutator=t.definition.mutator}e.mutator&&(t.extensions.mutate=e)},F.prototype.transformRow=function(t){return this.table.columnManager.traverse(function(e){e.extensions.mutate&&(e.getField(),"edit"!=e.extensions.mutate.type&&e.setFieldValue(t,e.extensions.mutate.mutator(e.getFieldValue(t),t,"data",e.extensions.mutate.params)))}),t},F.prototype.transformCell=function(t,e){return t.column.extensions.mutate.mutator(e,t.row.getData(),"edit",t.column.extensions.mutate.params,t.getComponent())},F.prototype.mutators={},Tabulator.registerExtension("mutator",F);var _=function(e){this.table=e,this.element=t("<span class='tabulator-paginator'></span>"),this.pagesElement=t("<span class='tabulator-pages'></span>"),this.firstBut=t("<button class='tabulator-page' data-page='first' role='button' aria-label='' title=''></button>"),this.prevBut=t("<button class='tabulator-page' data-page='prev' role='button' aria-label='' title=''></button>"),this.nextBut=t("<button class='tabulator-page' data-page='next' role='button' aria-label='' title=''></button>"),this.lastBut=t("<button class='tabulator-page' data-page='last' role='button' aria-label='' title=''></button>"),this.mode="local",this.size=0,this.page=1,this.max=1,this.paginator=!1};_.prototype.initialize=function(){var t=this;for(var e in t.table.options.paginationDataSent)t.paginationDataSentNames[e]=t.table.options.paginationDataSent[e];for(var o in t.table.options.paginationDataReceived)t.paginationDataReceivedNames[o]=t.table.options.paginationDataReceived[o];t.table.options.paginator&&(t.paginator=t.table.options.paginator),t.table.extensions.localize.bind("pagination.first",function(e){t.firstBut.html(e)}),t.table.extensions.localize.bind("pagination.first_title",function(e){t.firstBut.attr("aria-label",e).attr("title",e)}),t.table.extensions.localize.bind("pagination.prev",function(e){t.prevBut.html(e)}),t.table.extensions.localize.bind("pagination.prev_title",function(e){t.prevBut.attr("aria-label",e).attr("title",e)}),t.table.extensions.localize.bind("pagination.next",function(e){t.nextBut.html(e)}),t.table.extensions.localize.bind("pagination.next_title",function(e){t.nextBut.attr("aria-label",e).attr("title",e)}),t.table.extensions.localize.bind("pagination.last",function(e){t.lastBut.html(e)}),t.table.extensions.localize.bind("pagination.last_title",function(e){t.lastBut.attr("aria-label",e).attr("title",e)}),t.firstBut.on("click",function(){t.setPage(1)}),t.prevBut.on("click",function(){t.previousPage()}),t.nextBut.on("click",function(){t.nextPage()}),t.lastBut.on("click",function(){t.setPage(t.max)}),t.table.options.paginationElement&&(t.element=t.table.options.paginationElement),t.element.append(t.firstBut),t.element.append(t.prevBut),t.element.append(t.pagesElement),t.element.append(t.nextBut),t.element.append(t.lastBut),t.table.options.paginationElement||t.table.footerManager.append(t.element,t),t.mode=t.table.options.pagination,t.size=t.table.options.paginationSize||Math.floor(t.table.rowManager.getElement().innerHeight()/26)},_.prototype.setMaxRows=function(t){this.max=t?Math.ceil(t/this.size):1,this.page>this.max&&(this.page=this.max)},_.prototype.reset=function(t){return("local"==this.mode||t)&&(this.page=1),!0},_.prototype.setMaxPage=function(t){this.max=t||1,this.page>this.max&&(this.page=this.max,this.trigger())},_.prototype.setPage=function(t){return t>0&&t<=this.max?(this.page=t,this.trigger(),!0):(console.warn("Pagination Error - Requested page is out of range of 1 - "+this.max+":",t),!1)},_.prototype.setPageSize=function(t){t>0&&(this.size=t)},_.prototype._setPageButtons=function(){var t=this,e=this.page<this.max-2?this.page-2:this.page-(4-(this.max-this.page)),o=this.page>3?this.page+2:this.page+(5-this.page);t.pagesElement.empty(),1==t.page?(t.firstBut.prop("disabled",!0),t.prevBut.prop("disabled",!0)):(t.firstBut.prop("disabled",!1),t.prevBut.prop("disabled",!1)),t.page==t.max?(t.lastBut.prop("disabled",!0),t.nextBut.prop("disabled",!0)):(t.lastBut.prop("disabled",!1),t.nextBut.prop("disabled",!1));for(var i=e;i<=o;i++)i>0&&i<=t.max&&t.pagesElement.append(t._generatePageButton(i));this.footerRedraw()},_.prototype._generatePageButton=function(e){var o=this,i=t("<button class='tabulator-page "+(e==o.page?"active":"")+"' data-page='"+e+"' role='button' arpagea-label='Show Page "+e+"'>"+e+"</button>");return i.on("click",function(t){o.setPage(e)}),i},_.prototype.previousPage=function(){return this.page>1?(this.page--,this.trigger(),!0):(console.warn("Pagination Error - Previous page would be less than page 1:",0),!1)},_.prototype.nextPage=function(){return this.page<this.max?(this.page++,this.trigger(),!0):(console.warn("Pagination Error - Next page would be greater than maximum page of "+this.max+":",this.max+1),!1)},_.prototype.getPage=function(){return this.page},_.prototype.getPageMax=function(){return this.max},_.prototype.getPageSize=function(t){return this.size},_.prototype.getMode=function(){return this.mode},_.prototype.getRows=function(t){var e,o,i;if("local"==this.mode){e=[],o=this.size*(this.page-1),i=o+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)},_.prototype.trigger=function(){switch(this.mode){case"local":this.table.rowManager.refreshActiveData(),this.table.options.pageLoaded(this.getPage());break;case"remote":this._getRemotePage();break;default:console.warn("Pagination Error - no such pagination mode:",this.mode)}},_.prototype._getRemotePage=function(){this.table.extExists("ajax",!0)&&(this.paginator?this._getRemotePagePaginator():this._getRemotePageAuto())},_.prototype._getRemotePagePaginator=function(){var t=this,e=t.table.extensions.ajax,o=e.getUrl();e.setUrl(t.paginator(e.getUrl(),t.page,t.size,e.getParams())),e.sendRequest(function(e){t._parseRemoteData(e)}),e.setUrl(o)},_.prototype._getRemotePageAuto=function(){var e,o,i=this;if(e=t.extend(!0,{},i.table.extensions.ajax.getParams()),o=i.table.extensions.ajax.getParams(),o[this.paginationDataSentNames.page]=i.page,this.size&&(o[this.paginationDataSentNames.size]=this.size),this.table.extExists("sort")){var n=i.table.extensions.sort.getSort();n.forEach(function(t){delete t.column}),o[this.paginationDataSentNames.sorters]=n}if(this.table.extExists("filter")){var s=i.table.extensions.filter.getFilters(!0,!0);o[this.paginationDataSentNames.filters]=s}i.table.extensions.ajax.setParams(o),i.table.extensions.ajax.sendRequest(function(t){i._parseRemoteData(t)}),i.table.extensions.ajax.setParams(e)},_.prototype._parseRemoteData=function(t){t[this.paginationDataReceivedNames.last_page]?t[this.paginationDataReceivedNames.data]?(this.max=parseInt(t[this.paginationDataReceivedNames.last_page]),this.table.rowManager.setData(t[this.paginationDataReceivedNames.data]),this.table.options.pageLoaded(this.getPage())):console.warn("Remote Pagination Error - Server response missing '"+this.paginationDataReceivedNames.data+"' property"):console.warn("Remote Pagination Error - Server response missing '"+this.paginationDataReceivedNames.last_page+"' property")},_.prototype.footerRedraw=function(){var t=this.table.footerManager.element;t.innerWidth()-t[0].scrollWidth<0?this.pagesElement.hide():(this.pagesElement.show(),t.innerWidth()-t[0].scrollWidth<0&&this.pagesElement.hide())},_.prototype.paginationDataSentNames={page:"page",size:"size",sorters:"sorters",filters:"filters"},_.prototype.paginationDataReceivedNames={current_page:"current_page",last_page:"last_page",data:"data"},Tabulator.registerExtension("page",_);var H=function(t){this.table=t,this.mode="",this.id="",this.persistProps=["field","width","visible"]};H.prototype.initialize=function(t,e){this.mode=!0!==t?t:void 0!==window.localStorage?"local":"cookie",this.id="tabulator-"+(e||this.table.element.attr("id")||"")},H.prototype.load=function(t){var e="";switch(this.mode){case"local":e=localStorage.getItem(this.id);break;case"cookie":var o=document.cookie,i=o.indexOf(this.id+"="),n=void 0;i>-1&&(o=o.substr(i),n=o.indexOf(";"),n>-1&&(o=o.substr(0,n)),e=o.replace(this.id+"=",""));break;default:console.warn("Persistance Load Error - invalid mode selected",this.mode)}return e&&(e=JSON.parse(e),t=this.mergeDefinition(t,e)),t},H.prototype.mergeDefinition=function(t,e){var o=this,i=[];return e.forEach(function(e,n){var s=o._findColumn(t,e);s&&(s.width=e.width,s.visible=e.visible,s.columns&&(s.columns=o.mergeDefinition(s.columns,e.columns)),i.push(s))}),i},H.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}})},H.prototype.save=function(){var t=this.parseColumns(this.table.columnManager.getColumns()),e=JSON.stringify(t);switch(this.mode){case"local":localStorage.setItem(this.id,e);break;case"cookie":var o=new Date;o.setDate(o.getDate()+1e4),document.cookie=this.id+"="+e+"; expires="+o.toUTCString();break;default:console.warn("Persistance Save Error - invalid mode selected",this.mode)}},H.prototype.parseColumns=function(t){var e=this,o=[];return t.forEach(function(t){var i={};t.isGroup?(i.title=t.getDefinition().title,i.columns=e.parseColumns(t.getColumns())):(i.title=t.getDefinition().title,i.field=t.getField(),i.width=t.getWidth(),i.visible=t.visible),o.push(i)}),o},Tabulator.registerExtension("persistentLayout",H);var S=function(t){this.table=t,this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.handle=null,this.prevHandle=null};S.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.extensions.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()}),a.addEventListener("mousedown",function(t){var o=e.getLastColumn();o&&(i.startColumn=e,i._mouseDown(t,o))}),r.addEventListener("click",function(t){t.stopPropagation()}),r.addEventListener("mousedown",function(t){var o,n,s;(o=e.getFirstColumn())&&(n=i.table.columnManager.findColumnIndex(o),(s=n>0&&i.table.columnManager.getColumnByIndex(n-1))&&(i.startColumn=e,i._mouseDown(t,s)))}),o.append(a).append(r)}},S.prototype._mouseDown=function(e,o){function i(t){o.setWidth(s.startWidth+(t.screenX-s.startX)),!s.table.browserSlow&&o.extensions.resize&&o.extensions.resize.variableHeight&&o.checkCellHeights()}function n(e){s.startColumn.extensions.edit&&(s.startColumn.extensions.edit.blocked=!1),s.table.browserSlow&&o.extensions.resize&&o.extensions.resize.variableHeight&&o.checkCellHeights(),t("body").off("mouseup",i),t("body").off("mousemove",i),s.table.element.removeClass("tabulator-block-select"),s.table.options.persistentLayout&&s.table.extExists("persistentLayout",!0)&&s.table.extensions.persistentLayout.save(),s.table.options.columnResized(s.startColumn.getComponent())}var s=this;s.table.element.addClass("tabulator-block-select"),e.stopPropagation(),s.startColumn.extensions.edit&&(s.startColumn.extensions.edit.blocked=!0),s.startX=e.screenX,s.startWidth=o.getWidth(),t("body").on("mousemove",i),t("body").on("mouseup",n)},Tabulator.registerExtension("resizeColumns",S);var L=function(t){this.table=t,this.columns=[],this.index=0};L.prototype.initialize=function(){var t=[];this.table.columnManager.columnsByIndex.forEach(function(e){var o=e.getDefinition();e.extensions.responsive={order:void 0===o.responsive?1:o.responsive},e.extensions.responsive.order&&t.push(e)}),t=t.reverse(),t=t.sort(function(t,e){return e.extensions.responsive.order-t.extensions.responsive.order}),this.columns=t},L.prototype.update=function(){for(var t=this,e=!0;e;){var o="fitColumns"==t.table.extensions.layout.getMode()?t.table.columnManager.getFlexBaseWidth():t.table.columnManager.getWidth(),i=t.table.columnManager.element.innerWidth()-o;if(i<0){var n=t.columns[t.index];n?(n.hide(),t.index++):e=!1}else{var s=t.columns[t.index-1];s&&i>0&&i>=s.getWidth()?(s.show(),s.setWidth(s.getWidth()),t.index--):e=!1}t.table.rowManager.activeRowsCount||t.table.rowManager.renderEmptyScroll()}},Tabulator.registerExtension("responsiveLayout",L);var P=function(t){this.table=t,this.selecting=!1,this.selectPrev=[],this.selectedRows=[]};P.prototype.clearSelectionData=function(){this.selecting=!1,this.selectPrev=[],this.selectedRows=[]},P.prototype.initializeRow=function(e){var o=this,i=e.getElement(),n=function e(){setTimeout(function(){o.selecting=!1},50),t("body").off("mouseup",e)};e.extensions.select={selected:!1},o.table.options.selectableCheck(e.getComponent())?(i.addClass("tabulator-selectable").removeClass("tabulator-unselectable"),o.table.options.selectable&&"highlight"!=o.table.options.selectable&&(i.on("click",function(t){o.selecting||o.toggleRow(e)}),i.on("mousedown",function(i){if(i.shiftKey)return o.selecting=!0,o.selectPrev=[],t("body").on("mouseup",n),t("body").on("keyup",n),o.toggleRow(e),!1}),i.on("mouseenter",function(t){o.selecting&&(o.toggleRow(e),o.selectPrev[1]==e&&o.toggleRow(o.selectPrev[0]))}),i.on("mouseout",function(t){o.selecting&&o.selectPrev.unshift(e)}))):e.getElement().addClass("tabulator-unselectable").removeClass("tabulator-selectable")},P.prototype.toggleRow=function(t){this.table.options.selectableCheck(t.getComponent())&&(t.extensions.select.selected?this._deselectRow(t):this._selectRow(t))},P.prototype.selectRows=function(t){var e=this;switch(void 0===t?"undefined":_typeof(t)){case"undefined":e.table.rowManager.rows.forEach(function(t){e._selectRow(t,!0,!0)}),e._rowSelectionChanged();break;case"boolean":!0===t&&(e.table.rowManager.activeRows.forEach(function(t){e._selectRow(t,!0,!0)}),e._rowSelectionChanged());break;default:Array.isArray(t)?(t.forEach(function(t){e._selectRow(t,!0)}),e._rowSelectionChanged()):e._selectRow(t)}},P.prototype._selectRow=function(t,e,o){var i=this;if(!isNaN(i.table.options.selectable)&&!0!==i.table.options.selectable&&!o&&i.selectedRows.length>=i.table.options.selectable){if(!i.table.options.selectableRollingSelection)return!1;i._deselectRow(i.selectedRows[0],!0)}var n=i.table.rowManager.findRow(t);if(n){var i=this;n.extensions.select.selected=!0,n.getElement().addClass("tabulator-selected"),i.selectedRows.push(n),e||(i.table.options.rowSelected(n.getComponent()),i._rowSelectionChanged())}else console.warn("Selection Error - No such row found, ignoring selection:"+t)},P.prototype.deselectRows=function(t){var e=this;if(void 0===t){for(var o=e.selectedRows.length,i=0;i<o;i++)e._deselectRow(e.selectedRows[0],!0);e._rowSelectionChanged()}else Array.isArray(t)?(t.forEach(function(t){e._deselectRow(t,!0)}),e._rowSelectionChanged()):e._deselectRow(t)},P.prototype._deselectRow=function(t,e){var o,i=this,n=i.table.rowManager.findRow(t);n?(o=i.selectedRows.findIndex(function(t){return t==n}))>-1&&(n.extensions.select.selected=!1,n.getElement().removeClass("tabulator-selected"),i.selectedRows.splice(o,1),e||(i.table.options.rowDeselected(n.getComponent()),i._rowSelectionChanged())):console.warn("Selection Error - No such row found, ignoring selection:"+t)},P.prototype.getSelectedData=function(){var t=[];return this.selectedRows.forEach(function(e){t.push(e.getData())}),t},P.prototype.getSelectedRows=function(){var t=[];return this.selectedRows.forEach(function(e){t.push(e.getComponent())}),t},P.prototype._rowSelectionChanged=function(){this.table.options.rowSelectionChanged(this.getSelectedData(),this.getSelectedRows())},Tabulator.registerExtension("selectRow",P);var B=function(t){this.table=t,this.sortList=[],this.changed=!1};B.prototype.initializeColumn=function(e,o){var i=this,n=!1;switch(_typeof(e.definition.sorter)){case"string":i.sorters[e.definition.sorter]?n=i.sorters[e.definition.sorter]:console.warn("Sort Error - No such sorter found: ",e.definition.sorter);break;case"function":n=e.definition.sorter}e.extensions.sort={sorter:n,dir:"none",params:e.definition.sorterParams||{}},!1!==e.definition.headerSort&&(e.element.addClass("tabulator-sortable"),o.append(t("<div class='tabulator-arrow'></div>")),e.element.on("click",function(t){var o="",n=[],s=!1;e.extensions.sort&&(o="asc"==e.extensions.sort.dir?"desc":"asc",t.shiftKey||t.ctrlKey?(n=i.getSort(),s=n.findIndex(function(t){return t.field===e.getField()}),s>-1?(n[s].dir="asc"==n[s].dir?"desc":"asc",s!=n.length-1&&n.push(n.splice(s,1)[0])):n.push({column:e,dir:o}),i.setSort(n)):i.setSort(e,o),i.table.rowManager.sorterRefresh())}))},B.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},B.prototype.getSort=function(){var t=this,e=[];return t.sortList.forEach(function(t){t.column&&e.push({column:t.column.getComponent(),field:t.column.getField(),dir:t.dir})}),e},B.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),e?(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},B.prototype.clear=function(){this.setSort([])},B.prototype.findSorter=function(t){var e,o=this.table.rowManager.activeRows[0],i="string";if(o&&(o=o.getData(),t.getField()))switch(e=t.getFieldValue(o),void 0===e?"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]},B.prototype.sort=function(){var t=this;t.table.options.dataSorting&&t.table.options.dataSorting(t.getSort()),t.clearColumnHeaders(),t.table.options.ajaxSorting||t.sortList.forEach(function(e,o){e.column&&e.column.extensions.sort&&(e.column.extensions.sort.sorter||(e.column.extensions.sort.sorter=t.findSorter(e.column)),t._sortItem(e.column,e.dir,t.sortList,o)),t.setColumnHeader(e.column,e.dir)}),t.table.options.dataSorted&&t.table.options.dataSorted(t.getSort(),t.table.rowManager.getComponents(!0))},B.prototype.clearColumnHeaders=function(){this.table.columnManager.getRealColumns().forEach(function(t){t.extensions.sort&&(t.extensions.sort.dir="none",t.element.attr("aria-sort","none"))})},B.prototype.setColumnHeader=function(t,e){t.extensions.sort.dir=e,t.element.attr("aria-sort",e)},B.prototype._sortItem=function(t,e,o,i){var n=this;n.table.rowManager.activeRows.sort(function(s,a){var r=n._sortRow(s,a,t,e);if(0==r&&i)for(var l=i-1;l>=0&&0==(r=n._sortRow(s,a,o[l].column,o[l].dir));l--);return r})},B.prototype._sortRow=function(t,e,o,i){var n=this,s="asc"==i?t:e,a="asc"==i?e:t;return t=o.getFieldValue(s.getData()),e=o.getFieldValue(a.getData()),t=void 0!==t?t:"",e=void 0!==e?e:"",o.extensions.sort.sorter.call(n,t,e,s.getComponent(),a.getComponent(),o.getComponent(),i,o.extensions.sort.params)},B.prototype.sorters={number:function(t,e,o,i,n,s,a){return parseFloat(String(t).replace(",",""))-parseFloat(String(e).replace(",",""))},string:function(t,e,o,i,n,s,a){return String(t).toLowerCase().localeCompare(String(e).toLowerCase())},date:function(t,e,o,i,n,s,a){var r=a.format||"DD/MM/YYYY";return"undefined"!=typeof moment?(t=moment(t,r),e=moment(e,r)):console.error("Sort Error - 'date' sorter is dependant on moment.js"),t-e},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)},alphanum:function(t,e,o,i,n,s,a){var r,l,u,c,h,p=0,d=/(\d+)|(\D+)/g,f=/\d/;if(isFinite(t)&&isFinite(e))return t-e;if(r=String(t).toLowerCase(),l=String(e).toLowerCase(),r===l)return 0;if(!f.test(r)||!f.test(l))return r>l?1:-1;for(r=r.match(d),l=l.match(d),h=r.length>l.length?l.length:r.length;p<h;)if(u=r[p],c=l[p++],u!==c)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},time:function(t,e,o,i,n,s,a){var r=a.format||"hh:mm";return"undefined"!=typeof moment?(t=moment(t,r),e=moment(e,r)):console.error("Sort Error - 'date' sorter is dependant on moment.js"),t-e}},Tabulator.registerExtension("sort",B);var A=function(t){this.table=t};A.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.extensions.validate=!!i.length&&i)},A.prototype._extractValidator=function(t){switch(void 0===t?"undefined":_typeof(t)){case"string":var e=t.split(":"),o=e.shift(),i=e.join();return this._buildValidator(o,i);case"function":return this._buildValidator(t);case"object":return this._buildValidator(t.type,t.parameters)}},A.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)},A.prototype.validate=function(t,e,o){var i=this,n=[];return t&&t.forEach(function(t){t.func.call(i,e,o,t.params)||n.push({type:t.type,parameters:t.params})}),!n.length||n},A.prototype.validators={integer:function(t,e,o){return"number"==typeof(e=Number(e))&&isFinite(e)&&Math.floor(e)===e},float:function(t,e,o){return"number"==typeof(e=Number(e))&&isFinite(e)&&e%1!=0},numeric:function(t,e,o){return!isNaN(e)},string:function(t,e,o){return isNaN(e)},max:function(t,e,o){return parseFloat(e)<=o},min:function(t,e,o){return parseFloat(e)>=o},minLength:function(t,e,o){return String(e).length>=o},maxLength:function(t,e,o){return String(e).length<=o},in:function(t,e,o){return"string"==typeof o&&(o=o.split("|")),""===e||o.indexOf(e)>-1},regex:function(t,e,o){return new RegExp(o).test(e)},unique:function(t,e,o){var i=!0,n=t.getData();return this.table.rowManager.rows.forEach(function(o){var s=o.getData();s!==n&&e==s[t.getField()]&&(i=!1)}),i},required:function(t,e,o){return""!==e&null!==e&&void 0!==e}},Tabulator.registerExtension("validate",A)}(),t.widget("ui.tabulator",Tabulator)});