1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-04-24 19:20:40 +02:00
TableFilter/dist/tablefilter/tablefilter.js
2016-09-07 21:37:22 +10:00

10 lines
112 KiB
JavaScript

/**
* tablefilter v0.2.65 by Max Guglielmi
* build date: 2016-09-07T11:33:04.337Z
* MIT License
*/
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var i=e();for(var s in i)("object"==typeof exports?exports:t)[s]=i[s]}}(this,function(){return function(t){function e(i){if(s[i])return s[i].exports;var n=s[i]={exports:{},id:i,loaded:!1};return t[i].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var i=window.webpackJsonp;window.webpackJsonp=function(s,r){for(var o,l,a=0,h=[];a<s.length;a++)l=s[a],n[l]&&h.push.apply(h,n[l]),n[l]=0;for(o in r)t[o]=r[o];for(i&&i(s,r);h.length;)h.shift().call(null,e)};var s={},n={0:0};return e.e=function(t,i){if(0===n[t])return i.call(null,e);if(void 0!==n[t])n[t].push(i);else{n[t]=[i];var s=document.getElementsByTagName("head")[0],r=document.createElement("script");r.type="text/javascript",r.charset="utf-8",r.async=!0,r.src=e.p+"tf-"+({}[t]||t)+".js",s.appendChild(r)}},e.m=t,e.c=s,e.p="",e(0)}([function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.TableFilter=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},r=i(1),o=i(3),l=i(5),a=i(4),h=i(6),c=i(7),f=i(2),p=i(8),u=i(9),d=i(12),g=i(13),m=i(14),v=i(15),b=i(18),y=i(19),_=i(20),C=i(21),x=i(22),w=i(23),E=i(24),T=i(25),P=i(26),S=i(11),F=f.root.document;e.TableFilter=function(){function t(){var e=this;s(this,t),this.id=null,this.version="0.2.65",this.year=(new Date).getFullYear(),this.tbl=null,this.refRow=null,this.headersRow=null,this.cfg={},this.nbFilterableRows=0,this.nbCells=null;for(var i=void 0,r=arguments.length,l=Array(r),h=0;r>h;h++)l[h]=arguments[h];if(l.forEach(function(t){"object"===("undefined"==typeof t?"undefined":n(t))&&"TABLE"===t.nodeName?(e.tbl=t,e.id=t.id||"tf_"+(new Date).getTime()+"_"):(0,a.isString)(t)?(e.id=t,e.tbl=(0,o.elm)(t)):(0,a.isNumber)(t)?i=t:(0,a.isObj)(t)&&(e.cfg=t)}),!this.tbl||"TABLE"!==this.tbl.nodeName||0===this.getRowsNb())throw new Error("Could not instantiate TableFilter: HTML table\n DOM element not found.");var c=this.cfg;this.emitter=new p.Emitter,this.refRow=(0,a.isUndef)(i)?2:i+1;try{this.nbCells=this.getCellsNb(this.refRow)}catch(f){this.nbCells=this.getCellsNb(0)}this.basePath=c.base_path||"tablefilter/",this.fltGrid=c.grid!==!1,this.gridLayout=Boolean(c.grid_layout),this.filtersRowIndex=isNaN(c.filters_row_index)?0:c.filters_row_index,this.headersRow=isNaN(c.headers_row_index)?0===this.filtersRowIndex?1:0:c.headers_row_index,this.fltCellTag=(0,a.isString)(c.filters_cell_tag)?c.filters_cell_tag:S.CELL_TAG,this.fltIds=[],this.validRowsIndex=[],this.infDiv=null,this.lDiv=null,this.rDiv=null,this.mDiv=null,this.infDivCssClass=c.inf_div_css_class||"inf",this.lDivCssClass=c.left_div_css_class||"ldiv",this.rDivCssClass=c.right_div_css_class||"rdiv",this.mDivCssClass=c.middle_div_css_class||"mdiv",this.stylePath=c.style_path||this.basePath+"style/",this.stylesheet=c.stylesheet||this.stylePath+"tablefilter.css",this.stylesheetId=this.id+"_style",this.fltsRowCssClass=c.flts_row_css_class||"fltrow",this.enableIcons=c.enable_icons!==!1,this.alternateRows=Boolean(c.alternate_rows),this.hasColWidths=(0,a.isArray)(c.col_widths),this.colWidths=this.hasColWidths?c.col_widths:[],this.fltCssClass=c.flt_css_class||"flt",this.fltMultiCssClass=c.flt_multi_css_class||"flt_multi",this.fltSmallCssClass=c.flt_small_css_class||"flt_s",this.singleFltCssClass=c.single_flt_css_class||"single_flt",this.enterKey=c.enter_key!==!1,this.onBeforeFilter=(0,a.isFn)(c.on_before_filter)?c.on_before_filter:null,this.onAfterFilter=(0,a.isFn)(c.on_after_filter)?c.on_after_filter:null,this.caseSensitive=Boolean(c.case_sensitive),this.hasExactMatchByCol=(0,a.isArray)(c.columns_exact_match),this.exactMatchByCol=this.hasExactMatchByCol?c.columns_exact_match:[],this.exactMatch=Boolean(c.exact_match),this.linkedFilters=Boolean(c.linked_filters),this.disableExcludedOptions=Boolean(c.disable_excluded_options),this.activeFilterId=null,this.hasVisibleRows=Boolean(c.rows_always_visible),this.visibleRows=this.hasVisibleRows?c.rows_always_visible:[],this.isExternalFlt=Boolean(c.external_flt_grid),this.externalFltTgtIds=c.external_flt_grid_ids||[],this.onFiltersLoaded=(0,a.isFn)(c.on_filters_loaded)?c.on_filters_loaded:null,this.singleSearchFlt=Boolean(c.single_filter),this.onRowValidated=(0,a.isFn)(c.on_row_validated)?c.on_row_validated:null,this.customCellDataCols=c.custom_cell_data_cols?c.custom_cell_data_cols:[],this.customCellData=(0,a.isFn)(c.custom_cell_data)?c.custom_cell_data:null,this.watermark=c.watermark||"",this.isWatermarkArray=(0,a.isArray)(this.watermark),this.toolBarTgtId=c.toolbar_target_id||null,this.help=(0,a.isUndef)(c.help_instructions)?void 0:Boolean(c.help_instructions),this.popupFilters=Boolean(c.popup_filters),this.markActiveColumns=Boolean(c.mark_active_columns),this.activeColumnsCssClass=c.active_columns_css_class||"activeHeader",this.onBeforeActiveColumn=(0,a.isFn)(c.on_before_active_column)?c.on_before_active_column:null,this.onAfterActiveColumn=(0,a.isFn)(c.on_after_active_column)?c.on_after_active_column:null,this.displayAllText=c.display_all_text||"Clear",this.enableEmptyOption=Boolean(c.enable_empty_option),this.emptyText=c.empty_text||"(Empty)",this.enableNonEmptyOption=Boolean(c.enable_non_empty_option),this.nonEmptyText=c.non_empty_text||"(Non empty)",this.onSlcChange=c.on_change!==!1,this.sortSlc=c.sort_select!==!1,this.isSortNumAsc=Boolean(c.sort_num_asc),this.sortNumAsc=this.isSortNumAsc?c.sort_num_asc:[],this.isSortNumDesc=Boolean(c.sort_num_desc),this.sortNumDesc=this.isSortNumDesc?c.sort_num_desc:[],this.loadFltOnDemand=Boolean(c.load_filters_on_demand),this.hasCustomOptions=(0,a.isObj)(c.custom_options),this.customOptions=c.custom_options,this.rgxOperator=c.regexp_operator||"rgx:",this.emOperator=c.empty_operator||"[empty]",this.nmOperator=c.nonempty_operator||"[nonempty]",this.orOperator=c.or_operator||"||",this.anOperator=c.and_operator||"&&",this.grOperator=c.greater_operator||">",this.lwOperator=c.lower_operator||"<",this.leOperator=c.lower_equal_operator||"<=",this.geOperator=c.greater_equal_operator||">=",this.dfOperator=c.different_operator||"!",this.lkOperator=c.like_operator||"*",this.eqOperator=c.equal_operator||"=",this.stOperator=c.start_with_operator||"{",this.enOperator=c.end_with_operator||"}",this.separator=c.separator||",",this.rowsCounter=Boolean(c.rows_counter),this.statusBar=Boolean(c.status_bar),this.loader=Boolean(c.loader),this.displayBtn=Boolean(c.btn),this.btnText=c.btn_text||(this.enableIcons?"":"Go"),this.btnCssClass=c.btn_css_class||(this.enableIcons?"btnflt_icon":"btnflt"),this.btnReset=Boolean(c.btn_reset),this.onBeforeReset=(0,a.isFn)(c.on_before_reset)?c.on_before_reset:null,this.onAfterReset=(0,a.isFn)(c.on_after_reset)?c.on_after_reset:null,this.paging=Boolean(c.paging),this.nbHiddenRows=0,this.autoFilter=Boolean(c.auto_filter),this.autoFilterDelay=isNaN(c.auto_filter_delay)?S.AUTO_FILTER_DELAY:c.auto_filter_delay,this.isUserTyping=null,this.autoFilterTimer=null,this.highlightKeywords=Boolean(c.highlight_keywords),this.noResults=(0,a.isObj)(c.no_results_message)||Boolean(c.no_results_message),this.state=(0,a.isObj)(c.state)||Boolean(c.state),this.defaultDateType=c.default_date_type||"DMY",this.thousandsSeparator=c.thousands_separator||",",this.decimalSeparator=c.decimal_separator||".",this.hasColNbFormat=(0,a.isArray)(c.col_number_format),this.colNbFormat=this.hasColNbFormat?c.col_number_format:null,this.hasColDateType=(0,a.isArray)(c.col_date_type),this.colDateType=this.hasColDateType?c.col_date_type:null,this.prfxTf="TF",this.prfxFlt="flt",this.prfxValButton="btn",this.prfxInfDiv="inf_",this.prfxLDiv="ldiv_",this.prfxRDiv="rdiv_",this.prfxMDiv="mdiv_",this.prfxResponsive="resp",this.extensions=c.extensions,this.hasExtensions=(0,a.isArray)(this.extensions),this.enableDefaultTheme=Boolean(c.enable_default_theme),this.hasThemes=this.enableDefaultTheme||(0,a.isArray)(c.themes),this.themes=c.themes||[],this.themesPath=c.themes_path||this.stylePath+"themes/",this.responsive=Boolean(c.responsive),this.Mod={},this.ExtRegistry={}}return t.prototype.init=function(){var t=this;if(!this.initialized){var e=this.Mod,i=this.singleSearchFlt?1:this.nbCells,s=void 0;if(this["import"](this.stylesheetId,this.stylesheet,null,"link"),this.hasThemes&&this.loadThemes(),e.help||(e.help=new w.Help(this)),this.help&&e.help.init(),this.state&&(e.state||(e.state=new P.State(this)),e.state.init()),this.gridLayout&&(e.gridLayout||(e.gridLayout=new u.GridLayout(this)),e.gridLayout.init()),this.loader&&(e.loader||(e.loader=new d.Loader(this)),e.loader.init()),this.highlightKeywords&&(e.highlightKeyword=new g.HighlightKeyword(this),e.highlightKeyword.init()),this.popupFilters&&(e.popupFilter||(e.popupFilter=new m.PopupFilter(this)),e.popupFilter.init()),this.fltGrid){var n=this._insertFiltersRow();this.nbFilterableRows=this.getRowsNb();for(var r=0;i>r;r++){this.emitter.emit("before-filter-init",this,r);var l=(0,o.createElm)(this.fltCellTag),a=this.getFilterType(r);this.singleSearchFlt&&(l.colSpan=this.nbCells),this.gridLayout||n.appendChild(l),s=r===i-1&&this.displayBtn?this.fltSmallCssClass:this.fltCssClass,this.singleSearchFlt&&(a=S.INPUT,s=this.singleFltCssClass),a===S.SELECT||a===S.MULTIPLE?(e.dropdown||(e.dropdown=new v.Dropdown(this)),e.dropdown.init(r,this.isExternalFlt,l)):a===S.CHECKLIST?(e.checkList||(e.checkList=new b.CheckList(this)),e.checkList.init(r,this.isExternalFlt,l)):this._buildInputFilter(r,s,l),r===i-1&&this.displayBtn&&this._buildSubmitButton(r,l),this.emitter.emit("after-filter-init",this,r)}this.emitter.on(["filter-focus"],function(e,i){return t.setActiveFilterId(i.id)})}else this._initNoFilters();this.hasVisibleRows&&(this.emitter.on(["after-filtering"],function(){return t.enforceVisibility()}),this.enforceVisibility()),this.rowsCounter&&(e.rowsCounter=new y.RowsCounter(this),e.rowsCounter.init()),this.statusBar&&(e.statusBar=new _.StatusBar(this),e.statusBar.init()),this.paging&&(e.paging?e.paging.reset():(e.paging=new C.Paging(this),e.paging.init())),this.btnReset&&(e.clearButton=new x.ClearButton(this),e.clearButton.init()),this.hasColWidths&&!this.gridLayout&&this.setColWidths(),this.alternateRows&&(e.alternateRows=new E.AlternateRows(this),e.alternateRows.init()),this.noResults&&(e.noResults||(e.noResults=new T.NoResults(this)),e.noResults.init()),this.gridLayout||((0,o.addClass)(this.tbl,this.prfxTf),this.responsive&&(0,o.addClass)(this.tbl,this.prfxResponsive)),this.hasExtensions&&this.initExtensions(),this.markActiveColumns&&(this.emitter.on(["before-filtering"],function(){return t.clearActiveColumns()}),this.emitter.on(["cell-processed"],function(e,i){return t.markActiveColumn(i)})),this.linkedFilters&&this.emitter.on(["after-filtering"],function(){return t.linkFilters()}),this.initialized=!0,this.onFiltersLoaded&&this.onFiltersLoaded.call(null,this),this.emitter.emit("initialized",this)}},t.prototype.detectKey=function(t){if(this.enterKey&&t){var e=(0,r.keyCode)(t);e===S.ENTER_KEY?(this.filter(),(0,r.cancelEvt)(t),(0,r.stopEvt)(t)):(this.isUserTyping=!0,f.root.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null)}},t.prototype.onKeyUp=function(t){function e(){f.root.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null,this.isUserTyping||(this.filter(),this.isUserTyping=null)}if(this.autoFilter){var i=(0,r.keyCode)(t);this.isUserTyping=!1,i!==S.ENTER_KEY&&i!==S.TAB_KEY&&i!==S.ESC_KEY&&i!==S.UP_ARROW_KEY&&i!==S.DOWN_ARROW_KEY?null===this.autoFilterTimer&&(this.autoFilterTimer=f.root.setInterval(e.bind(this),this.autoFilterDelay)):(f.root.clearInterval(this.autoFilterTimer),this.autoFilterTimer=null)}},t.prototype.onKeyDown=function(){this.autoFilter&&(this.isUserTyping=!0)},t.prototype.onInpFocus=function(t){var e=(0,r.targetEvt)(t);this.emitter.emit("filter-focus",this,e)},t.prototype.onInpBlur=function(){this.autoFilter&&(this.isUserTyping=!1,f.root.clearInterval(this.autoFilterTimer)),this.emitter.emit("filter-blur",this)},t.prototype._insertFiltersRow=function(){if(!this.gridLayout){var t=void 0,e=(0,o.tag)(this.tbl,"thead");return t=e.length>0?e[0].insertRow(this.filtersRowIndex):this.tbl.insertRow(this.filtersRowIndex),t.className=this.fltsRowCssClass,this.isExternalFlt&&(t.style.display=S.NONE),this.emitter.emit("filters-row-inserted",this,t),t}},t.prototype._initNoFilters=function(){this.fltGrid||(this.refRow=this.refRow>0?this.refRow-1:0,this.nbFilterableRows=this.getRowsNb())},t.prototype._buildInputFilter=function(t,e,i){var s=this,n=this.getFilterType(t),l=this.isExternalFlt?this.externalFltTgtIds[t]:null,a=n===S.INPUT?"text":"hidden",h=(0,o.createElm)(S.INPUT,["id",this.prfxFlt+t+"_"+this.id],["type",a],["ct",t]);"hidden"!==a&&this.watermark&&h.setAttribute("placeholder",this.isWatermarkArray?this.watermark[t]||"":this.watermark),h.className=e||this.fltCssClass,(0,r.addEvt)(h,"focus",function(t){return s.onInpFocus(t)}),l?(0,o.elm)(l).appendChild(h):i.appendChild(h),this.fltIds.push(h.id),(0,r.addEvt)(h,"keypress",function(t){return s.detectKey(t)}),(0,r.addEvt)(h,"keydown",function(){return s.onKeyDown()}),(0,r.addEvt)(h,"keyup",function(t){return s.onKeyUp(t)}),(0,r.addEvt)(h,"blur",function(){return s.onInpBlur()})},t.prototype._buildSubmitButton=function(t,e){var i=this,s=this.isExternalFlt?this.externalFltTgtIds[t]:null,n=(0,o.createElm)(S.INPUT,["id",this.prfxValButton+t+"_"+this.id],["type","button"],["value",this.btnText]);n.className=this.btnCssClass,s?(0,o.elm)(s).appendChild(n):e.appendChild(n),(0,r.addEvt)(n,"click",function(){return i.filter()})},t.prototype.feature=function(t){return this.Mod[t]},t.prototype.initExtensions=function(){var t=this.extensions;i.p=this.basePath,this.emitter.emit("before-loading-extensions",this);for(var e=0,s=t.length;s>e;e++){var n=t[e];this.ExtRegistry[n.name]||this.loadExtension(n)}this.emitter.emit("after-loading-extensions",this)},t.prototype.loadExtension=function(t){var e=this;if(t&&t.name){var s=t.name,n=t.path,r=void 0;s&&n?r=t.path+s:(s=s.replace(".js",""),r="extensions/{}/{}".replace(/{}/g,s)),i.e(1,function(i){var n=[i(30)("./"+r)];(function(i){var n=new i["default"](e,t);n.init(),e.ExtRegistry[s]=n}).apply(null,n)})}},t.prototype.extension=function(t){return this.ExtRegistry[t]},t.prototype.hasExtension=function(t){return!(0,a.isEmpty)(this.ExtRegistry[t])},t.prototype.destroyExtensions=function(){for(var t=this.extensions,e=0,i=t.length;i>e;e++){var s=t[e],n=this.ExtRegistry[s.name];n&&(n.destroy(),this.ExtRegistry[s.name]=void 0)}},t.prototype.loadThemes=function(){var t=this.themes;if(this.emitter.emit("before-loading-themes",this),this.enableDefaultTheme){var e={name:"default"};this.themes.push(e)}if((0,a.isArray)(t))for(var i=0,s=t.length;s>i;i++){var n=t[i],r=n.name,o=n.path,l=this.prfxTf+r;r&&!o?o=this.themesPath+r+"/"+r+".css":!r&&n.path&&(r="theme{0}".replace("{0}",i)),this.isImported(o,"link")||this["import"](l,o,null,"link")}this.loader=!0,this.emitter.emit("after-loading-themes",this)},t.prototype.getStylesheet=function(){var t=arguments.length<=0||void 0===arguments[0]?"default":arguments[0];return(0,o.elm)(this.prfxTf+t)},t.prototype.destroy=function(){var t=this;if(this.initialized){var e=this.Mod,i=this.emitter;this.isExternalFlt&&!this.popupFilters&&this.removeExternalFlts(),this.infDiv&&this.removeToolbar(),this.markActiveColumns&&(this.clearActiveColumns(),i.off(["before-filtering"],function(){return t.clearActiveColumns()}),i.off(["cell-processed"],function(e,i){return t.markActiveColumn(i)})),this.hasExtensions&&this.destroyExtensions(),this.validateAllRows(),this.fltGrid&&!this.gridLayout&&this.tbl.deleteRow(this.filtersRowIndex),i.emit("destroy",this),Object.keys(e).forEach(function(t){var i=e[t];i&&(0,a.isFn)(i.destroy)&&i.destroy()}),this.hasVisibleRows&&i.off(["after-filtering"],function(){return t.enforceVisibility()}),this.linkedFilters&&i.off(["after-filtering"],function(){return t.linkFilters()}),this.emitter.off(["filter-focus"],function(e,i){return t.setActiveFilterId(i.id)}),(0,o.removeClass)(this.tbl,this.prfxTf),(0,o.removeClass)(this.tbl,this.prfxResponsive),this.nbHiddenRows=0,this.validRowsIndex=[],this.fltIds=[],this.initialized=!1}},t.prototype.setToolbar=function(){if(!this.infDiv){var t=(0,o.createElm)("div",["id",this.prfxInfDiv+this.id]);if(t.className=this.infDivCssClass,this.toolBarTgtId)(0,o.elm)(this.toolBarTgtId).appendChild(t);else if(this.gridLayout){var e=this.Mod.gridLayout;e.tblMainCont.appendChild(t),t.className=e.infDivCssClass}else{var i=(0,o.createElm)("caption");i.appendChild(t),this.tbl.insertBefore(i,this.tbl.firstChild)}this.infDiv=(0,o.elm)(this.prfxInfDiv+this.id);var s=(0,o.createElm)("div",["id",this.prfxLDiv+this.id]);s.className=this.lDivCssClass,t.appendChild(s),this.lDiv=(0,o.elm)(this.prfxLDiv+this.id);var n=(0,o.createElm)("div",["id",this.prfxRDiv+this.id]);n.className=this.rDivCssClass,t.appendChild(n),this.rDiv=(0,o.elm)(this.prfxRDiv+this.id);var r=(0,o.createElm)("div",["id",this.prfxMDiv+this.id]);r.className=this.mDivCssClass,t.appendChild(r),this.mDiv=(0,o.elm)(this.prfxMDiv+this.id),(0,a.isUndef)(this.help)&&(this.Mod.help.enabled=!0,this.emitter.emit("init-help",this))}},t.prototype.removeToolbar=function(){if(this.infDiv){(0,o.removeElm)(this.infDiv),this.infDiv=null;var t=this.tbl,e=(0,o.tag)(t,"caption");e.length>0&&[].forEach.call(e,function(e){return t.removeChild(e)})}},t.prototype.removeExternalFlts=function(){if(this.isExternalFlt)for(var t=this.externalFltTgtIds,e=t.length,i=0;e>i;i++){var s=t[i],n=(0,o.elm)(s);n&&(n.innerHTML="")}},t.prototype.isCustomOptions=function(t){return this.hasCustomOptions&&-1!==this.customOptions.cols.indexOf(t)},t.prototype.getCustomOptions=function(t){if(!(0,a.isEmpty)(t)&&this.isCustomOptions(t)){for(var e=this.customOptions,i=e.cols,s=[],n=[],r=i.indexOf(t),o=e.values[r],l=e.texts[r],h=e.sorts[r],c=0,f=o.length;f>c;c++)n.push(o[c]),l[c]?s.push(l[c]):s.push(o[c]);return h&&(n.sort(),s.sort()),[n,s]}},t.prototype.filter=function(){function t(t,e,i){if(this.highlightKeywords&&e){t=t.replace(b,""),t=t.replace(y,""),t=t.replace(_,""),t=t.replace(C,"");var s=t;(u.test(t)||d.test(t)||g.test(t)||m.test(t)||v.test(t))&&(s=(0,o.getText)(i)),""!==s&&this.emitter.emit("highlight-keyword",this,i,s)}}function e(t,e,i){t=(0,l.matchCase)(t,this.caseSensitive);var s=void 0,n=this.hasColDateType?this.colDateType[i]:this.defaultDateType,r=g.test(t),o=u.test(t),a=m.test(t),T=d.test(t),P=v.test(t),S=y.test(t),F=b.test(t),O=_.test(t),R=C.test(t),I=x===t,N=w===t,L=E.test(t),k=r&&(0,h.isValidDate)(t.replace(g,""),n),A=o&&(0,h.isValidDate)(t.replace(u,""),n),D=a&&(0,h.isValidDate)(t.replace(m,""),n),B=T&&(0,h.isValidDate)(t.replace(d,""),n),H=P&&(0,h.isValidDate)(t.replace(v,""),n),M=S&&(0,h.isValidDate)(t.replace(y,""),n),j=void 0,V=void 0;if((0,h.isValidDate)(e,n))j=(0,h.formatDate)(e,n),k?(V=(0,h.formatDate)(t.replace(g,""),n),s=V>j):A?(V=(0,h.formatDate)(t.replace(u,""),n),s=V>=j):B?(V=(0,h.formatDate)(t.replace(d,""),n),s=j>=V):D?(V=(0,h.formatDate)(t.replace(m,""),n),s=j>V):H?(V=(0,h.formatDate)(t.replace(v,""),n),s=j.toString()!==V.toString()):M?(V=(0,h.formatDate)(t.replace(y,""),n),s=j.toString()===V.toString()):b.test(t)?s=(0,l.contains)(t.replace(b,""),e,!1,this.caseSensitive):(0,h.isValidDate)(t,n)?(V=(0,h.formatDate)(t,n),s=j.toString()===V.toString()):s=I?(0,l.isEmpty)(e):N?!(0,l.isEmpty)(e):(0,l.contains)(t,e,this.isExactMatch(i),this.caseSensitive);else if(this.hasColNbFormat&&this.colNbFormat[i]?(f=(0,c.removeNbFormat)(e,this.colNbFormat[i]),p=this.colNbFormat[i]):","===this.thousandsSeparator&&"."===this.decimalSeparator?(f=(0,c.removeNbFormat)(e,"us"),p="us"):(f=(0,c.removeNbFormat)(e,"eu"),p="eu"),o)s=f<=(0,c.removeNbFormat)(t.replace(u,""),p);else if(T)s=f>=(0,c.removeNbFormat)(t.replace(d,""),p);else if(r)s=f<(0,c.removeNbFormat)(t.replace(g,""),p);else if(a)s=f>(0,c.removeNbFormat)(t.replace(m,""),p);else if(P)s=!(0,l.contains)(t.replace(v,""),e,!1,this.caseSensitive);else if(F)s=(0,l.contains)(t.replace(b,""),e,!1,this.caseSensitive);else if(S)s=(0,l.contains)(t.replace(y,""),e,!0,this.caseSensitive);else if(O)s=0===e.indexOf(t.replace(_,""));else if(R){var z=t.replace(C,"");s=e.lastIndexOf(z,e.length-1)===e.length-1-(z.length-1)&&e.lastIndexOf(z,e.length-1)>-1}else if(I)s=(0,l.isEmpty)(e);else if(N)s=!(0,l.isEmpty)(e);else if(L)try{var U=t.replace(E,""),K=new RegExp(U);s=K.test(e)}catch(W){s=!1}else f&&this.hasColNbFormat&&this.colNbFormat[i]&&!this.singleSearchFlt?(t=(0,c.removeNbFormat)(t,p)||t,s=f===t||(0,l.contains)(t.toString(),f.toString(),this.isExactMatch(i),this.caseSensitive)):s=(0,l.contains)(t,e,this.isExactMatch(i),this.caseSensitive);return s}if(this.fltGrid&&this.initialized){this.onBeforeFilter&&this.onBeforeFilter.call(null,this),this.emitter.emit("before-filtering",this);var i=this.tbl.rows,s=this.getRowsNb(!0),n=0;this.validRowsIndex=[];for(var r=this.getFiltersValue(),f=void 0,p=void 0,u=new RegExp(this.leOperator),d=new RegExp(this.geOperator),g=new RegExp(this.lwOperator),m=new RegExp(this.grOperator),v=new RegExp(this.dfOperator),b=new RegExp((0,l.rgxEsc)(this.lkOperator)),y=new RegExp(this.eqOperator),_=new RegExp(this.stOperator),C=new RegExp(this.enOperator),x=this.emOperator,w=this.nmOperator,E=new RegExp((0,l.rgxEsc)(this.rgxOperator)),T=this.refRow;s>T;T++){i[T].style.display="";var P=i[T].cells,S=P.length;if(S===this.nbCells){for(var F=[],O=!0,R=!1,I=0;S>I;I++){var N=r[this.singleSearchFlt?0:I];if(""!==N){var L=(0,l.matchCase)(this.getCellData(P[I]),this.caseSensitive),k=N.toString().split(this.orOperator),A=k.length>1,D=N.toString().split(this.anOperator),B=D.length>1;if((0,a.isArray)(N)||A||B){var H=void 0,M=void 0,j=!1;M=(0,a.isArray)(N)?N:A?k:D;for(var V=0,z=M.length;z>V&&(H=(0,l.trim)(M[V]),j=e.call(this,H,L,I),t.call(this,H,j,P[I]),!(A&&j||B&&!j))&&(!(0,a.isArray)(N)||!j);V++);F[I]=j}else F[I]=e.call(this,(0,l.trim)(N),L,I),t.call(this,N,F[I],P[I]);F[I]||(O=!1),this.singleSearchFlt&&F[I]&&(R=!0),this.emitter.emit("cell-processed",this,I,P[I])}}this.singleSearchFlt&&R&&(O=!0),O?this.validateRow(T,!0):(this.validateRow(T,!1),n++),this.emitter.emit("row-processed",this,T,this.validRowsIndex.length,O)}}this.nbHiddenRows=n,this.onAfterFilter&&this.onAfterFilter.call(null,this),this.emitter.emit("after-filtering",this,r)}},t.prototype.getColValues=function(t){var e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],s=arguments.length<=3||void 0===arguments[3]?[]:arguments[3];if(this.fltGrid){var n=this.tbl.rows,r=this.getRowsNb(!0),o=[];e&&o.push(this.getHeadersText()[t]);for(var l=this.refRow;r>l;l++){var a=!1;s.length>0&&(a=-1!==s.indexOf(l));var h=n[l].cells,f=h.length;if(f===this.nbCells&&!a)for(var p=0;f>p;p++)if(p===t&&""===n[l].style.display){var u=this.getCellData(h[p]),d=this.colNbFormat?this.colNbFormat[t]:void 0,g=i?(0,c.removeNbFormat)(u,d):u;o.push(g)}}return o}},t.prototype.getFilterValue=function(t){if(this.fltGrid){var e="",i=this.getFilterElement(t);if(!i)return e;var s=this.getFilterType(t);return s!==S.MULTIPLE&&s!==S.CHECKLIST?e=i.value:s===S.MULTIPLE?e=this.feature("dropdown").getValues(t):s===S.CHECKLIST&&(e=this.feature("checkList").getValues(t)),((0,a.isArray)(e)&&0===e.length||1===e.length&&""===e[0])&&(e=""),e}},t.prototype.getFiltersValue=function(){if(this.fltGrid){for(var t=[],e=0,i=this.fltIds.length;i>e;e++){var s=this.getFilterValue(e);(0,a.isArray)(s)?t.push(s):t.push((0,l.trim)(s))}return t}},t.prototype.getFilterId=function(t){return this.fltGrid?this.fltIds[t]:void 0},t.prototype.getFiltersByType=function(t,e){if(this.fltGrid){for(var i=[],s=0,n=this.fltIds.length;n>s;s++){var r=this.getFilterType(s);if(r===t.toLowerCase()){var o=e?s:this.fltIds[s];i.push(o)}}return i}},t.prototype.getFilterElement=function(t){var e=this.fltIds[t];return(0,o.elm)(e)},t.prototype.getCellsNb=function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],e=this.tbl.rows[t];return e.cells.length},t.prototype.getRowsNb=function(t){var e=(0,a.isUndef)(this.refRow)?0:this.refRow,i=this.tbl.rows.length;return t&&(e=0),parseInt(i-e,10)},t.prototype.getCellData=function(t){var e=t.cellIndex;return this.customCellData&&-1!==this.customCellDataCols.indexOf(e)?this.customCellData.call(null,this,t,e):(0,o.getText)(t)},t.prototype.getTableData=function(){var t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0],e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],i=this.tbl.rows,s=this.getRowsNb(!0),n=[];if(t){var r=this.getHeadersText(e);n.push([this.getHeadersRowIndex(),r])}for(var o=this.refRow;s>o;o++){for(var l=[o,[]],a=i[o].cells,h=0,c=a.length;c>h;h++)if(!(e&&this.hasExtension("colsVisibility")&&this.extension("colsVisibility").isColHidden(h))){var f=this.getCellData(a[h]);l[1].push(f)}n.push(l)}return n},t.prototype.getFilteredData=function(){var t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0],e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1];if(!this.validRowsIndex)return[];var i=this.tbl.rows,s=[];if(t){var n=this.getHeadersText(e);s.push([this.getHeadersRowIndex(),n])}for(var r=this.getValidRows(!0),o=0;o<r.length;o++){for(var l=[this.validRowsIndex[o],[]],a=i[this.validRowsIndex[o]].cells,h=0;h<a.length;h++)if(!(e&&this.hasExtension("colsVisibility")&&this.extension("colsVisibility").isColHidden(h))){var c=this.getCellData(a[h]);l[1].push(c)}s.push(l)}return s},t.prototype.getFilteredDataCol=function(t){var e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1];if((0,a.isUndef)(t))return[];var i=this.getFilteredData(),s=[];e&&s.push(this.getHeadersText()[t]);for(var n=0,r=i.length;r>n;n++){var o=i[n],l=o[1],h=l[t];s.push(h)}return s},t.prototype.getRowDisplay=function(t){return t.style.display},t.prototype.validateRow=function(t,e){var i=this.tbl.rows[t];if(i&&"boolean"==typeof e){this.hasVisibleRows&&-1!==this.visibleRows.indexOf(t)&&(e=!0);var s=e?"":S.NONE,n=e?"true":"false";i.style.display=s,this.paging&&i.setAttribute("validRow",n),e&&(-1===this.validRowsIndex.indexOf(t)&&this.validRowsIndex.push(t),this.onRowValidated&&this.onRowValidated.call(null,this,t),this.emitter.emit("row-validated",this,t))}},t.prototype.validateAllRows=function(){if(this.initialized){this.validRowsIndex=[];for(var t=this.refRow;t<this.nbFilterableRows;t++)this.validateRow(t,!0)}},t.prototype.setFilterValue=function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1];if(this.fltGrid){var i=this.getFilterElement(t),s=this.getFilterType(t);if(s!==S.MULTIPLE&&s!==S.CHECKLIST)this.loadFltOnDemand&&!this.initialized&&this.emitter.emit("build-select-filter",this,t,this.linkedFilters,this.isExternalFlt),i.value=e;else if(s===S.MULTIPLE){var n=(0,a.isArray)(e)?e:e.split(" "+this.orOperator+" ");this.loadFltOnDemand&&!this.initialized&&this.emitter.emit("build-select-filter",this,t,this.linkedFilters,this.isExternalFlt),this.emitter.emit("select-options",this,t,n)}else if(s===S.CHECKLIST){var r=[];this.loadFltOnDemand&&!this.initialized&&this.emitter.emit("build-checklist-filter",this,t,this.isExternalFlt),(0,a.isArray)(e)?r=e:(e=(0,l.matchCase)(e,this.caseSensitive),r=e.split(" "+this.orOperator+" ")),this.emitter.emit("select-checklist-options",this,t,r)}}},t.prototype.setColWidths=function(t){if(this.hasColWidths){t=t||this.tbl;for(var e=this.nbCells,i=this.colWidths,s=(0,o.tag)(t,"col"),n=s.length>0,r=n?null:F.createDocumentFragment(),l=0;e>l;l++){var a=void 0;n?a=s[l]:(a=(0,o.createElm)("col",["id",this.id+"_col_"+l]),r.appendChild(a)),a.style.width=i[l]}n||t.insertBefore(r,t.firstChild)}},t.prototype.enforceVisibility=function(){if(this.hasVisibleRows)for(var t=this.getRowsNb(!0),e=0,i=this.visibleRows.length;i>e;e++){var s=this.visibleRows[e];t>=s&&this.validateRow(s,!0)}},t.prototype.clearFilters=function(){if(this.fltGrid){this.emitter.emit("before-clearing-filters",this),this.onBeforeReset&&this.onBeforeReset.call(null,this,this.getFiltersValue());for(var t=0,e=this.fltIds.length;e>t;t++)this.setFilterValue(t,"");this.filter(),this.onAfterReset&&this.onAfterReset.call(null,this),this.emitter.emit("after-clearing-filters",this)}},t.prototype.clearActiveColumns=function(){for(var t=0,e=this.getCellsNb(this.headersRow);e>t;t++)(0,o.removeClass)(this.getHeaderElement(t),this.activeColumnsCssClass)},t.prototype.markActiveColumn=function(t){var e=this.getHeaderElement(t);(0,o.hasClass)(e,this.activeColumnsCssClass)||(this.onBeforeActiveColumn&&this.onBeforeActiveColumn.call(null,this,t),(0,o.addClass)(e,this.activeColumnsCssClass),this.onAfterActiveColumn&&this.onAfterActiveColumn.call(null,this,t))},t.prototype.getActiveFilterId=function(){return this.activeFilterId},t.prototype.setActiveFilterId=function(t){this.activeFilterId=t},t.prototype.getColumnIndexFromFilterId=function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=t.split("_")[0];return e=e.split(this.prfxFlt)[1],parseInt(e,10)},t.prototype.activateFilter=function(t){(0,a.isUndef)(t)||this.setActiveFilterId(this.getFilterId(t))},t.prototype.linkFilters=function(){if(this.linkedFilters&&this.activeFilterId){var t=this.getFiltersByType(S.SELECT,!0),e=this.getFiltersByType(S.MULTIPLE,!0),i=this.getFiltersByType(S.CHECKLIST,!0),s=t.concat(e);s=s.concat(i);for(var n=this.getColumnIndexFromFilterId(this.activeFilterId),r=0,l=s.length;l>r;r++){var a=(0,o.elm)(this.fltIds[s[r]]),h=this.getFilterValue(s[r]);if(n!==s[r]||this.paging&&-1!==t.indexOf(s[r])&&n===s[r]||!this.paging&&(-1!==i.indexOf(s[r])||-1!==e.indexOf(s[r]))||h===this.displayAllText){if(this.loadFltOnDemand){var c=(0,o.createOpt)(this.displayAllText,"");a.innerHTML="",a.appendChild(c)}-1!==i.indexOf(s[r])?this.emitter.emit("build-checklist-filter",this,s[r]):this.emitter.emit("build-select-filter",this,s[r],!0),this.setFilterValue(s[r],h)}}}},t.prototype.isExactMatch=function(t){var e=this.getFilterType(t);return this.exactMatchByCol[t]||this.exactMatch||e!==S.INPUT},t.prototype.isImported=function(t){for(var e=arguments.length<=1||void 0===arguments[1]?"script":arguments[1],i=!1,s="script"===e?"src":"href",n=(0,o.tag)(F,e),r=0,l=n.length;l>r;r++)if(!(0,a.isUndef)(n[r][s])&&n[r][s].match(t)){i=!0;break}return i},t.prototype["import"]=function(t,e,i){var s=this,n=arguments.length<=3||void 0===arguments[3]?"script":arguments[3];if(!this.isImported(e,n)){var r=this,l=!1,a=void 0,h=(0,o.tag)(F,"head")[0];a="link"===n.toLowerCase()?(0,o.createElm)("link",["id",t],["type","text/css"],["rel","stylesheet"],["href",e]):(0,o.createElm)("script",["id",t],["type","text/javascript"],["src",e]),a.onload=a.onreadystatechange=function(){l||s.readyState&&"loaded"!==s.readyState&&"complete"!==s.readyState||(l=!0,"function"==typeof i&&i.call(null,r))},a.onerror=function(){throw new Error("TableFilter could not load: "+e)},h.appendChild(a)}},t.prototype.isInitialized=function(){return this.initialized},t.prototype.getFiltersId=function(){return this.fltIds||[]},t.prototype.getValidRows=function(t){if(!t)return this.validRowsIndex;var e=this.getRowsNb(!0);this.validRowsIndex=[];for(var i=this.refRow;e>i;i++){var s=this.tbl.rows[i];this.paging?"true"!==s.getAttribute("validRow")&&null!==s.getAttribute("validRow")||this.validRowsIndex.push(s.rowIndex):this.getRowDisplay(s)!==S.NONE&&this.validRowsIndex.push(s.rowIndex)}return this.validRowsIndex},t.prototype.getFiltersRowIndex=function(){return this.filtersRowIndex},t.prototype.getHeadersRowIndex=function(){return this.headersRow},t.prototype.getStartRowIndex=function(){return this.refRow},t.prototype.getLastRowIndex=function(){var t=this.getRowsNb(!0);return t-1},t.prototype.getHeaderElement=function(t){for(var e=this.gridLayout?this.Mod.gridLayout.headTbl:this.tbl,i=(0,o.tag)(e,"thead"),s=this.headersRow,n=void 0,r=0;r<this.nbCells;r++)if(r===t){
0===i.length&&(n=e.rows[s].cells[r]),1===i.length&&(n=i[0].rows[s].cells[r]);break}return n},t.prototype.getHeadersText=function(){for(var t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0],e=[],i=0;i<this.nbCells;i++)if(!(t&&this.hasExtension("colsVisibility")&&this.extension("colsVisibility").isColHidden(i))){var s=this.getHeaderElement(i),n=(0,o.getFirstTextNode)(s);e.push(n)}return e},t.prototype.getFilterType=function(t){var e=this.cfg["col_"+t];return e?e.toLowerCase():S.INPUT},t.prototype.getFilterableRowsNb=function(){return this.getRowsNb(!1)},t.prototype.getValidRowsNb=function(){var t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];return this.getValidRows(t).length},t.prototype.config=function(){return this.cfg},t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.keyCode=e.targetEvt=e.cancelEvt=e.stopEvt=e.removeEvt=e.addEvt=void 0;var s=i(2);e.addEvt=function(t,e,i,s){t.addEventListener?t.addEventListener(e,i,s):t.attachEvent?t.attachEvent("on"+e,i):t["on"+e]=i},e.removeEvt=function(t,e,i,s){t.detachEvent?t.detachEvent("on"+e,i):t.removeEventListener?t.removeEventListener(e,i,s):t["on"+e]=null},e.stopEvt=function(t){t||(t=s.root.event),t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},e.cancelEvt=function(t){t||(t=s.root.event),t.preventDefault?t.preventDefault():t.returnValue=!1},e.targetEvt=function(t){return t||(t=s.root.event),t.target||t.srcElement},e.keyCode=function(t){return t.charCode?t.charCode:t.keyCode?t.keyCode:t.which?t.which:0}},function(t,e){(function(t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};e.root="object"===("undefined"==typeof self?"undefined":i(self))&&self.self===self&&self||"object"===("undefined"==typeof t?"undefined":i(t))&&t.global===t&&t||void 0}).call(e,function(){return this}())},function(t,e,i){"use strict";function s(){return l.documentElement.classList}Object.defineProperty(e,"__esModule",{value:!0}),e.tag=e.elm=e.createCheckItem=e.createOpt=e.removeClass=e.addClass=e.hasClass=e.createText=e.removeElm=e.createElm=e.getFirstTextNode=e.getText=void 0;var n=i(2),r=i(4),o=i(5),l=n.root.document,a=(e.getText=function(t){return(0,r.isUndef)(t.textContent)?(0,o.trim)(t.innerText):(0,o.trim)(t.textContent)},e.getFirstTextNode=function(t){for(var e=0;e<t.childNodes.length;e++){var i=t.childNodes[e];if(3===i.nodeType)return i.data}},e.createElm=function(){for(var t=arguments.length,e=Array(t),i=0;t>i;i++)e[i]=arguments[i];var s=e[0];if(!(0,r.isString)(s))return null;for(var n=l.createElement(s),o=0;o<e.length;o++){var a=e[o];(0,r.isArray)(a)&&2===a.length&&n.setAttribute(a[0],a[1])}return n}),h=(e.removeElm=function(t){return t.parentNode.removeChild(t)},e.createText=function(t){return l.createTextNode(t)}),c=e.hasClass=function(t,e){return(0,r.isUndef)(t)?!1:s()?t.classList.contains(e):t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))};e.addClass=function(t,e){return(0,r.isUndef)(t)?void 0:s()?void t.classList.add(e):void(""===t.className?t.className=e:c(t,e)||(t.className+=" "+e))},e.removeClass=function(t,e){if(!(0,r.isUndef)(t)){if(s())return void t.classList.remove(e);var i=new RegExp("(\\s|^)"+e+"(\\s|$)","g");t.className=t.className.replace(i,"")}},e.createOpt=function(t,e,i){var s=!!i,n=s?a("option",["value",e],["selected","true"]):a("option",["value",e]);return n.appendChild(h(t)),n},e.createCheckItem=function(t,e,i){var s=a("li"),n=a("label",["for",t]),r=a("input",["id",t],["name",t],["type","checkbox"],["value",e]);return n.appendChild(r),n.appendChild(h(i)),s.appendChild(n),s.label=n,s.check=r,s},e.elm=function(t){return l.getElementById(t)},e.tag=function(t,e){return t.getElementsByTagName(e)}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=void 0,s=(e.isObj=function(t){return"[object Object]"===Object.prototype.toString.call(t)},e.isFn=function(t){return"[object Function]"===Object.prototype.toString.call(t)},e.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},e.isString=function(t){return"[object String]"===Object.prototype.toString.call(t)},e.isNumber=function(t){return"[object Number]"===Object.prototype.toString.call(t)},e.isUndef=function(t){return t===i}),n=e.isNull=function(t){return null===t};e.isEmpty=function(t){return s(t)||n(t)||0===t.length}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=e.trim=function(t){return t.trim?t.trim():t.replace(/^\s*|\s*$/g,"")},s=(e.isEmpty=function(t){return""===i(t)},e.rgxEsc=function(t){var e=/[-\/\\^$*+?.()|[\]{}]/g,i="\\$&";return String(t).replace(e,i)});e.matchCase=function(t){var e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1];return e?t:t.toLowerCase()},e.contains=function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],n=arguments.length<=3||void 0===arguments[3]?!1:arguments[3],r=void 0,o=n?"g":"gi";return r=i?new RegExp("(^\\s*)"+s(t)+"(\\s*$)",o):new RegExp(s(t),o),r.test(e)}},function(t,e){"use strict";function i(t){if(void 0===t)return 0;if(t.length>2)return t;var e=void 0;return 99>=t&&t>50&&(e="19"+t),(50>t||"00"===t)&&(e="20"+t),e}function s(t){if(void 0===t)return 0;for(var e=void 0,i=["january","february","march","april","may","june","july","august","september","october","november","december","jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],s=0;s<i.length;s++){var n=i[s];if(t.toLowerCase()===n){e=s+1;break}}return(e>11||23>e)&&(e-=12),1>e||e>12?0:e}Object.defineProperty(e,"__esModule",{value:!0});var n=(e.isValidDate=function(t,e){if(e||(e="DMY"),e=e.toUpperCase(),3!==e.length&&"DDMMMYYYY"===e){var i=n(t,e);t=i.getDate()+"/"+(i.getMonth()+1)+"/"+i.getFullYear(),e="DMY"}-1!==e.indexOf("M")&&-1!==e.indexOf("D")&&-1!==e.indexOf("Y")||(e="DMY");var s=void 0,r=void 0;if("Y"===e.substring(0,1)?(s=/^\d{2}(\-|\/|\.)\d{1,2}\1\d{1,2}$/,r=/^\d{4}(\-|\/|\.)\d{1,2}\1\d{1,2}$/):"Y"===e.substring(1,2)?(s=/^\d{1,2}(\-|\/|\.)\d{2}\1\d{1,2}$/,r=/^\d{1,2}(\-|\/|\.)\d{4}\1\d{1,2}$/):(s=/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{2}$/,r=/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/),s.test(t)===!1&&r.test(t)===!1)return!1;var o=t.split(RegExp.$1),l=void 0,a=void 0,h=void 0;l="M"===e.substring(0,1)?o[0]:"M"===e.substring(1,2)?o[1]:o[2],a="D"===e.substring(0,1)?o[0]:"D"===e.substring(1,2)?o[1]:o[2],h="Y"===e.substring(0,1)?o[0]:"Y"===e.substring(1,2)?o[1]:o[2],parseInt(h,10)<=50&&(h=(parseInt(h,10)+2e3).toString()),parseInt(h,10)<=99&&(h=(parseInt(h,10)+1900).toString());var c=new Date(parseInt(h,10),parseInt(l,10)-1,parseInt(a,10),0,0,0,0);return parseInt(a,10)!==c.getDate()?!1:parseInt(l,10)-1===c.getMonth()},e.formatDate=function(t,e){if(e||(e="DMY"),!t||""===t)return new Date(1001,0,1);var n=void 0,r=void 0;switch(e.toUpperCase()){case"DDMMMYYYY":r=t.replace(/[- \/.]/g," ").split(" "),n=new Date(i(r[2]),s(r[1])-1,r[0]);break;case"DMY":r=t.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),n=new Date(i(r[2]),r[1]-1,r[0]);break;case"MDY":r=t.replace(/^(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),n=new Date(i(r[2]),r[0]-1,r[1]);break;case"YMD":r=t.replace(/^((\d\d)?\d\d)([- \/.])(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])$/,"$1 $4 $6").split(" "),n=new Date(i(r[0]),r[1]-1,r[2]);break;default:r=t.replace(/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/,"$1 $3 $5").split(" "),n=new Date(i(r[2]),r[1]-1,r[0])}return n})},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.removeNbFormat=function(t){var e=arguments.length<=1||void 0===arguments[1]?"us":arguments[1],i=t;return i="us"===e.toLowerCase()?+i.replace(/[^\d\.-]/g,""):+i.replace(/[^\d\,-]/g,"").replace(",",".")}},function(t,e){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});e.Emitter=function(){function t(){i(this,t),this.events={}}return t.prototype.on=function(t,e){var i=this;t.forEach(function(t){i.events[t]=i.events[t]||[],i.events[t].push(e)})},t.prototype.off=function(t,e){var i=this;t.forEach(function(t){t in i.events&&i.events[t].splice(i.events[t].indexOf(e),1)})},t.prototype.emit=function(t){if(t in this.events)for(var e=0;e<this.events[t].length;e++)this.events[t][e].apply(this,[].slice.call(arguments,1))},t}()},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.GridLayout=void 0;var o=i(10),l=i(3),a=i(1),h=i(5),c=i(11);e.GridLayout=function(t){function e(i){s(this,e);var r=n(this,t.call(this,i,"gridLayout")),o=r.config;return r.width=o.grid_width||null,r.height=o.grid_height||null,r.mainContCssClass=o.grid_cont_css_class||"grd_Cont",r.contCssClass=o.grid_tbl_cont_css_class||"grd_tblCont",r.headContCssClass=o.grid_tblHead_cont_css_class||"grd_headTblCont",r.infDivCssClass=o.grid_inf_grid_css_class||"grd_inf",r.headRowIndex=o.grid_headers_row_index||0,r.headRows=o.grid_headers_rows||[0],r.enableFilters=o.grid_enable_default_filters!==!1,r.noHeaders=Boolean(o.grid_no_headers),r.defaultColWidth=o.grid_default_col_width||"100px",r.colElms=[],r.prfxMainTblCont="gridCont_",r.prfxTblCont="tblCont_",r.prfxHeadTblCont="tblHeadCont_",r.prfxHeadTbl="tblHead_",r.prfxGridFltTd="_td_",r.prfxGridTh="tblHeadTh_",r.sourceTblHtml=i.tbl.outerHTML,r.tblHasColTag=(0,l.tag)(i.tbl,"col").length>0,r.tblMainCont=null,r.tblCont=null,r.headTblCont=null,r.headTbl=null,i.fltGrid=r.enableFilters,r}return r(e,t),e.prototype.init=function(){var t=this,e=this.tf,i=e.tbl;if(!this.initialized){this.setOverrides(),this.setDefaultColWidths();var s=this.initialTableWidth();this.tblMainCont=this.createContainer(this.prfxMainTblCont+e.id,"div",this.mainContCssClass),this.width&&(this.tblMainCont.style.width=this.width),i.parentNode.insertBefore(this.tblMainCont,i),this.tblCont=this.createContainer(this.prfxTblCont+e.id,"div",this.contCssClass),this.setConfigWidth(this.tblCont),this.height&&(this.tblCont.style.height=this.height),i.parentNode.insertBefore(this.tblCont,i);var n=(0,l.removeElm)(i);this.tblCont.appendChild(n),""===i.style.width&&(i.style.width=((0,h.contains)("%",s)?i.clientWidth:s)+"px");var r=(0,l.removeElm)(this.tblCont);this.tblMainCont.appendChild(r),this.headTblCont=this.createContainer(this.prfxHeadTblCont+e.id,"div",this.headContCssClass),this.setConfigWidth(this.headTblCont),this.headTbl=(0,l.createElm)("table",["id",this.prfxHeadTbl+e.id]);var o=(0,l.createElm)("tHead"),f=i.rows[this.headRowIndex],p=this.getSortTriggerIds(f),u=this.createFiltersRow();this.setHeadersRow(o),this.headTbl.appendChild(o),0===e.filtersRowIndex?o.insertBefore(u,f):o.appendChild(u),this.headTblCont.appendChild(this.headTbl),this.tblCont.parentNode.insertBefore(this.headTblCont,this.tblCont);var d=(0,l.tag)(i,"thead");d.length>0&&i.removeChild(d[0]),this.headTbl.style.tableLayout="fixed",i.style.tableLayout="fixed",this.headTbl.cellPadding=i.cellPadding,this.headTbl.cellSpacing=i.cellSpacing,e.setColWidths(this.headTbl),i.style.width="",this.headTbl.style.width=i.clientWidth+"px",(0,a.addEvt)(this.tblCont,"scroll",function(e){var i=(0,a.targetEvt)(e),s=i.scrollLeft;t.headTblCont.scrollLeft=s});var g=e.extension("sort");g&&(g.asyncSort=!0,g.triggerIds=p),this.setColumnElements(),e.popupFilters&&(u.style.display=c.NONE),i.clientWidth!==this.headTbl.clientWidth&&(i.style.width=this.headTbl.clientWidth+"px"),this.initialized=!0}},e.prototype.setOverrides=function(){var t=this.tf;t.refRow=0,t.headersRow=0,t.filtersRowIndex=1,t.isExternalFlt=!0},e.prototype.setDefaultColWidths=function(){var t=this.tf;if(!t.hasColWidths){for(var e=0,i=t.getCellsNb();i>e;e++){var s=void 0,n=t.tbl.rows[t.getHeadersRowIndex()].cells[e];s=""!==n.width?n.width:""!==n.style.width?parseInt(n.style.width,10):this.defaultColWidth,t.colWidths[e]=s}t.hasColWidths=!0,t.setColWidths()}},e.prototype.initialTableWidth=function(){var t=this.tf.tbl,e=void 0;return e=""!==t.width?t.width:""!==t.style.width?t.style.width:t.clientWidth,parseInt(e,10)},e.prototype.createContainer=function(t,e,i){var s=(0,l.createElm)(e,["id",t]);return s.className=i,s},e.prototype.createFiltersRow=function(){var t=this.tf,e=(0,l.createElm)("tr");if(this.enableFilters&&t.fltGrid){t.externalFltTgtIds=[];for(var i=0;i<t.getCellsNb();i++){var s=t.prfxFlt+i+this.prfxGridFltTd+t.id,n=(0,l.createElm)(t.fltCellTag,["id",s]);e.appendChild(n),t.externalFltTgtIds[i]=s}}return e},e.prototype.setColumnElements=function(){var t=this.tf,e=(0,l.tag)(t.tbl,"col");this.tblHasColTag=e.length>0;for(var i=t.nbCells-1;i>=0;i--){var s=void 0,n=t.id+"_col_"+i;this.tblHasColTag?(s=e[i],s.setAttribute("id",n)):(s=(0,l.createElm)("col",["id",n]),t.tbl.insertBefore(s,t.tbl.firstChild)),s.style.width=t.colWidths[i],this.colElms[i]=s}this.tblHasColTag=!0},e.prototype.setHeadersRow=function(t){if(this.noHeaders)t.appendChild((0,l.createElm)("tr"));else for(var e=0;e<this.headRows.length;e++){var i=this.tf.tbl.rows[this.headRows[e]];t.appendChild(i)}},e.prototype.setConfigWidth=function(t){this.width&&(-1!==this.width.indexOf("%")?t.style.width="100%":t.style.width=this.width)},e.prototype.getSortTriggerIds=function(t){for(var e=this.tf,i=[],s=0;s<e.getCellsNb();s++){var n=t.cells[s],r=n.getAttribute("id");r&&""!==r||(r=this.prfxGridTh+s+"_"+e.id,n.setAttribute("id",r)),i.push(r)}return i},e.prototype.destroy=function(){var t=this.tf,e=t.tbl;if(this.initialized){var i=(0,l.removeElm)(e);this.tblMainCont.parentNode.insertBefore(i,this.tblMainCont),(0,l.removeElm)(this.tblMainCont),this.tblMainCont=null,this.headTblCont=null,this.headTbl=null,this.tblCont=null,e.outerHTML=this.sourceTblHtml,this.tf.tbl=(0,l.elm)(t.id),this.initialized=!1}},e}(o.Feature)},function(t,e){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s="Not implemented.";e.Feature=function(){function t(e,s){i(this,t),this.tf=e,this.feature=s,this.enabled=e[s],this.config=e.config(),this.emitter=e.emitter,this.initialized=!1}return t.prototype.init=function(){throw new Error(s)},t.prototype.reset=function(){this.enable(),this.init()},t.prototype.destroy=function(){throw new Error(s)},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.isEnabled=function(){return this.enabled},t}()},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.INPUT="input",e.SELECT="select",e.MULTIPLE="multiple",e.CHECKLIST="checklist",e.NONE="none",e.ENTER_KEY=13,e.TAB_KEY=9,e.ESC_KEY=27,e.UP_ARROW_KEY=38,e.DOWN_ARROW_KEY=40,e.HEADER_TAG="TH",e.CELL_TAG="TD",e.AUTO_FILTER_DELAY=750},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.Loader=void 0;var o=i(10),l=i(3),a=i(4),h=i(2),c=i(11);e.Loader=function(t){function e(i){s(this,e);var r=n(this,t.call(this,i,"loader")),o=r.config;return r.targetId=o.loader_target_id||null,r.cont=null,r.text=o.loader_text||"Loading...",r.html=o.loader_html||null,r.cssClass=o.loader_css_class||"loader",r.closeDelay=250,r.onShow=(0,a.isFn)(o.on_show_loader)?o.on_show_loader:null,r.onHide=(0,a.isFn)(o.on_hide_loader)?o.on_hide_loader:null,r.prfx="load_",r}return r(e,t),e.prototype.init=function(){var t=this;if(!this.initialized){var e=this.tf,i=this.emitter,s=(0,l.createElm)("div",["id",this.prfx+e.id]);s.className=this.cssClass;var n=this.targetId?(0,l.elm)(this.targetId):e.tbl.parentNode;this.targetId?n.appendChild(s):n.insertBefore(s,e.tbl),this.cont=s,this.html?this.cont.innerHTML=this.html:this.cont.appendChild((0,l.createText)(this.text)),this.show(c.NONE),i.on(["before-filtering","before-populating-filter","before-page-change","before-clearing-filters","before-page-length-change","before-reset-page","before-reset-page-length","before-loading-extensions","before-loading-themes"],function(){return t.show("")}),i.on(["after-filtering","after-populating-filter","after-page-change","after-clearing-filters","after-page-length-change","after-reset-page","after-reset-page-length","after-loading-extensions","after-loading-themes"],function(){return t.show(c.NONE)}),this.initialized=!0}},e.prototype.show=function(t){var e=this;if(this.isEnabled()){var i=function(){e.cont&&(e.onShow&&t!==c.NONE&&e.onShow.call(null,e),e.cont.style.display=t,e.onHide&&t===c.NONE&&e.onHide.call(null,e))},s=t===c.NONE?this.closeDelay:1;h.root.setTimeout(i,s)}},e.prototype.destroy=function(){var t=this;if(this.initialized){var e=this.emitter;(0,l.removeElm)(this.cont),this.cont=null,e.off(["before-filtering","before-populating-filter","before-page-change","before-clearing-filters","before-page-length-change","before-reset-page","before-reset-page-length","before-loading-extensions","before-loading-themes"],function(){return t.show("")}),e.off(["after-filtering","after-populating-filter","after-page-change","after-clearing-filters","after-page-length-change","after-reset-page","after-reset-page-length","after-loading-extensions","after-loading-themes"],function(){return t.show(c.NONE)}),this.initialized=!1}},e}(o.Feature)},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.HighlightKeyword=void 0;var n=i(3),r=i(4);e.HighlightKeyword=function(){function t(e){s(this,t);var i=e.config();this.highlightCssClass=i.highlight_css_class||"keyword",this.tf=e,this.emitter=e.emitter}return t.prototype.init=function(){var t=this;this.emitter.on(["before-filtering","destroy"],function(){return t.unhighlightAll()}),this.emitter.on(["highlight-keyword"],function(e,i,s){return t.highlight(i,s,t.highlightCssClass)})},t.prototype.highlight=function(t,e,i){if(t.hasChildNodes)for(var s=t.childNodes,r=0;r<s.length;r++)this.highlight(s[r],e,i);if(3===t.nodeType){var o=t.nodeValue.toLowerCase(),l=e.toLowerCase();if(-1!==o.indexOf(l)){var a=t.parentNode;if(a&&a.className!==i){var h=t.nodeValue,c=o.indexOf(l),f=(0,n.createText)(h.substr(0,c)),p=h.substr(c,e.length),u=(0,n.createText)(h.substr(c+e.length)),d=(0,n.createText)(p),g=(0,n.createElm)("span");g.className=i,g.appendChild(d),a.insertBefore(f,t),a.insertBefore(g,t),a.insertBefore(u,t),a.removeChild(t)}}}},t.prototype.unhighlight=function(t,e){for(var i=this.tf.tbl.querySelectorAll("."+e),s=0;s<i.length;s++){var r=i[s],o=(0,n.getText)(r),l=o.toLowerCase(),a=t.toLowerCase();-1!==l.indexOf(a)&&r.parentNode.replaceChild((0,n.createText)(o),r)}},t.prototype.unhighlightAll=function(){var t=this;this.tf.highlightKeywords&&this.tf.getFiltersValue().forEach(function(e){(0,r.isArray)(e)?e.forEach(function(e){return t.unhighlight(e,t.highlightCssClass)}):t.unhighlight(e,t.highlightCssClass)})},t.prototype.destroy=function(){var t=this;this.emitter.off(["before-filtering","destroy"],function(){return t.unhighlightAll()}),this.emitter.off(["highlight-keyword"],function(e,i,s){return t.highlight(i,s,t.highlightCssClass)})},t}()},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.PopupFilter=void 0;var o=i(10),l=i(4),a=i(3),h=i(1),c=i(11);e.PopupFilter=function(t){function e(i){s(this,e);var r=n(this,t.call(this,i,"popupFilters")),o=r.config;return i.isExternalFlt=!0,i.externalFltTgtIds=[],r.iconPath=o.popup_filters_image||i.themesPath+"icn_filter.gif",r.activeIconPath=o.popup_filters_image_active||i.themesPath+"icn_filterActive.gif",r.iconHtml=o.popup_filters_image_html||'<img src="'+r.iconPath+'" alt="Column filter" />',r.containerCssClass=o.popup_div_css_class||"popUpFilter",r.onBeforeOpen=(0,l.isFn)(o.on_before_popup_filter_open)?o.on_before_popup_filter_open:null,r.onAfterOpen=(0,l.isFn)(o.on_after_popup_filter_open)?o.on_after_popup_filter_open:null,r.onBeforeClose=(0,l.isFn)(o.on_before_popup_filter_close)?o.on_before_popup_filter_close:null,r.onAfterClose=(0,l.isFn)(o.on_after_popup_filter_close)?o.on_after_popup_filter_close:null,r.fltSpans=[],r.fltIcons=[],r.filtersCache=null,r.fltElms=r.filtersCache||[],r.adjustToContainer=!0,r.prfxSpan="popUpSpan_",r.prfxDiv="popUpDiv_",r}return r(e,t),e.prototype.onClick=function(t){var e=(0,h.targetEvt)(t).parentNode,i=parseInt(e.getAttribute("ci"),10);if(this.closeAll(i),this.toggle(i),this.adjustToContainer){var s=this.fltElms[i],n=this.tf.getHeaderElement(i),r=.95*n.clientWidth;s.style.width=parseInt(r,10)+"px"}(0,h.cancelEvt)(t),(0,h.stopEvt)(t)},e.prototype.init=function(){var t=this;if(!this.initialized){var e=this.tf;e.headersRow<=1&&(e.headersRow=0);for(var i=0;i<e.nbCells;i++)if(e.getFilterType(i)!==c.NONE){var s=(0,a.createElm)("span",["id",this.prfxSpan+e.id+"_"+i],["ci",i]);s.innerHTML=this.iconHtml;var n=e.getHeaderElement(i);n.appendChild(s),(0,h.addEvt)(s,"click",function(e){return t.onClick(e)}),this.fltSpans[i]=s,this.fltIcons[i]=s.firstChild}this.emitter.on(["before-filtering"],function(){return t.buildIcons()}),this.emitter.on(["after-filtering"],function(){return t.closeAll()}),this.emitter.on(["cell-processed"],function(e,i){return t.buildIcon(i,!0)}),this.emitter.on(["filters-row-inserted"],function(){return t.tf.headersRow++}),this.emitter.on(["before-filter-init"],function(e,i){return t.build(i)}),this.initialized=!0}},e.prototype.reset=function(){this.enable(),this.init(),this.buildAll()},e.prototype.buildAll=function(){for(var t=0;t<this.filtersCache.length;t++)this.build(t,this.filtersCache[t])},e.prototype.build=function(t,e){var i=this.tf,s=e?e:(0,a.createElm)("div",["id",this.prfxDiv+i.id+"_"+t]);s.className=this.containerCssClass,i.externalFltTgtIds.push(s.id);var n=i.getHeaderElement(t);n.insertBefore(s,n.firstChild),(0,h.addEvt)(s,"click",function(t){return(0,h.stopEvt)(t)}),this.fltElms[t]=s},e.prototype.toggle=function(t){var e=this.tf,i=this.fltElms[t];if(i.style.display===c.NONE||""===i.style.display){if(this.onBeforeOpen&&this.onBeforeOpen.call(null,this,this.fltElms[t],t),i.style.display="block",e.getFilterType(t)===c.INPUT){var s=e.getFilterElement(t);s&&s.focus()}this.onAfterOpen&&this.onAfterOpen.call(null,this,this.fltElms[t],t)}else this.onBeforeClose&&this.onBeforeClose.call(null,this,this.fltElms[t],t),i.style.display=c.NONE,this.onAfterClose&&this.onAfterClose.call(null,this,this.fltElms[t],t)},e.prototype.closeAll=function(t){for(var e=0;e<this.fltElms.length;e++)if(e!==t){var i=this.fltElms[e];i&&(i.style.display=c.NONE)}},e.prototype.buildIcons=function(){for(var t=0;t<this.fltIcons.length;t++)this.buildIcon(t,!1)},e.prototype.buildIcon=function(t,e){this.fltIcons[t]&&(this.fltIcons[t].src=e?this.activeIconPath:this.iconPath)},e.prototype.destroy=function(){var t=this;if(this.initialized){this.filtersCache=[];for(var e=0;e<this.fltElms.length;e++){var i=this.fltElms[e],s=this.fltSpans[e],n=this.fltIcons[e];i&&((0,a.removeElm)(i),this.filtersCache[e]=i),i=null,s&&(0,a.removeElm)(s),s=null,n&&(0,a.removeElm)(n),n=null}this.fltElms=[],this.fltSpans=[],this.fltIcons=[],this.emitter.off(["before-filtering"],function(){return t.buildIcons()}),this.emitter.off(["after-filtering"],function(){return t.closeAll()}),this.emitter.off(["cell-processed"],function(e,i){return t.buildIcon(i,!0)}),this.emitter.off(["filters-row-inserted"],function(){return t.tf.headersRow++}),this.emitter.off(["before-filter-init"],function(e,i){return t.build(i)}),this.initialized=!1}},e}(o.Feature)},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.Dropdown=void 0;var o=i(10),l=i(3),a=i(16),h=i(5),c=i(17),f=i(1),p=i(11),u="Filter options for column {0} cannot be sorted in {1} manner.";e.Dropdown=function(t){function e(i){s(this,e);var r=n(this,t.call(this,i,"dropdown")),o=r.config;return r.enableSlcResetFilter=o.enable_slc_reset_filter!==!1,r.nonEmptyText=o.non_empty_text||"(Non empty)",r.multipleSlcTooltip=o.multiple_slc_tooltip||"Use Ctrl/Cmd key for multiple selections",r.isCustom=null,r.opts=null,r.optsTxt=null,r}return r(e,t),e.prototype.onSlcFocus=function(t){var e=(0,f.targetEvt)(t),i=this.tf;if(i.loadFltOnDemand&&"0"===e.getAttribute("filled")){var s=e.getAttribute("ct");this.build(s)}this.emitter.emit("filter-focus",i,e)},e.prototype.onSlcChange=function(){this.tf.onSlcChange&&this.tf.filter()},e.prototype.init=function(t,e,i){var s=this,n=this.tf,r=n.getFilterType(t),o=e?n.externalFltTgtIds[t]:null,a=(0,l.createElm)(p.SELECT,["id",n.prfxFlt+t+"_"+n.id],["ct",t],["filled","0"]);if(r===p.MULTIPLE&&(a.multiple=p.MULTIPLE,a.title=this.multipleSlcTooltip),a.className=r.toLowerCase()===p.SELECT?n.fltCssClass:n.fltMultiCssClass,o?(0,l.elm)(o).appendChild(a):i.appendChild(a),n.fltIds.push(a.id),n.loadFltOnDemand){var h=(0,l.createOpt)(n.displayAllText,"");a.appendChild(h)}else this.build(t);(0,f.addEvt)(a,"change",function(){return s.onSlcChange()}),(0,f.addEvt)(a,"focus",function(t){return s.onSlcFocus(t)}),this.emitter.on(["build-select-filter"],function(t,e,i,n){return s.build(e,i,n)}),this.emitter.on(["select-options"],function(t,e,i){return s.selectOptions(e,i)}),this.initialized=!0},e.prototype.build=function(t){var e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],i=this.tf;t=parseInt(t,10),this.emitter.emit("before-populating-filter",i,t),this.opts=[],this.optsTxt=[];var s=i.fltIds[t],n=(0,l.elm)(s),r=i.tbl.rows,o=i.getRowsNb(!0);this.isCustom=i.isCustomOptions(t);var f=void 0,p=i.getActiveFilterId();e&&p&&(f=i.getColumnIndexFromFilterId(p));var d=null,g=null;e&&i.disableExcludedOptions&&(d=[],g=[]);for(var m=i.refRow;o>m;m++)if(!i.hasVisibleRows||-1===i.visibleRows.indexOf(m)){var v=r[m].cells,b=v.length;if(b===i.nbCells&&!this.isCustom)for(var y=0;b>y;y++)if(t===y&&(!e||e&&i.disableExcludedOptions)||t===y&&e&&(""===r[m].style.display&&!i.paging||i.paging&&(!i.validRowsIndex||i.validRowsIndex&&-1!==i.validRowsIndex.indexOf(m))&&(void 0===f||f===t||f!==t&&-1!==i.validRowsIndex.indexOf(m)))){var _=i.getCellData(v[y]),C=(0,h.matchCase)(_,i.caseSensitive);if((0,a.has)(this.opts,C,i.caseSensitive)||this.opts.push(_),e&&i.disableExcludedOptions){var x=g[y];x||(x=i.getFilteredDataCol(y)),(0,a.has)(x,C,i.caseSensitive)||(0,a.has)(d,C,i.caseSensitive)||d.push(_)}}}if(this.isCustom){var w=i.getCustomOptions(t);this.opts=w[0],this.optsTxt=w[1]}if(i.sortSlc&&!this.isCustom&&(i.caseSensitive?(this.opts.sort(),d&&d.sort()):(this.opts.sort(c.ignoreCase),d&&d.sort(c.ignoreCase))),-1!==i.sortNumAsc.indexOf(t))try{this.opts.sort(c.numSortAsc),d&&d.sort(c.numSortAsc),this.isCustom&&this.optsTxt.sort(c.numSortAsc)}catch(E){throw new Error(u.replace("{0}",t).replace("{1}","ascending"))}if(-1!==i.sortNumDesc.indexOf(t))try{this.opts.sort(c.numSortDesc),d&&d.sort(c.numSortDesc),this.isCustom&&this.optsTxt.sort(c.numSortDesc)}catch(E){throw new Error(u.replace("{0}",t).replace("{1}","ascending"))}this.addOptions(t,n,e,d),this.emitter.emit("after-populating-filter",i,t,n)},e.prototype.addOptions=function(t,e,i,s){var n=this.tf,r=e.value;e.innerHTML="",e=this.addFirstOption(e);for(var o=0;o<this.opts.length;o++)if(""!==this.opts[o]){var c=this.opts[o],f=this.isCustom?this.optsTxt[o]:c,u=!1;i&&n.disableExcludedOptions&&(0,a.has)(s,(0,h.matchCase)(c,n.caseSensitive),n.caseSensitive)&&(u=!0);var d=void 0;d=n.loadFltOnDemand&&r===this.opts[o]&&n.getFilterType(t)===p.SELECT?(0,l.createOpt)(f,c,!0):(0,l.createOpt)(f,c,!1),u&&(d.disabled=!0),e.appendChild(d)}e.setAttribute("filled","1")},e.prototype.addFirstOption=function(t){var e=this.tf,i=(0,l.createOpt)(this.enableSlcResetFilter?e.displayAllText:"","");if(this.enableSlcResetFilter||(i.style.display=p.NONE),t.appendChild(i),e.enableEmptyOption){var s=(0,l.createOpt)(e.emptyText,e.emOperator);t.appendChild(s)}if(e.enableNonEmptyOption){var n=(0,l.createOpt)(e.nonEmptyText,e.nmOperator);t.appendChild(n)}return t},e.prototype.selectOptions=function(t){var e=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],i=this.tf;if(i.getFilterType(t)===p.MULTIPLE&&0!==e.length){var s=i.getFilterElement(t);[].forEach.call(s.options,function(t){""!==e[0]&&""!==t.value||(t.selected=!1),""!==t.value&&(0,a.has)(e,t.value,!0)&&(t.selected=!0)})}},e.prototype.getValues=function(t){var e=this.tf,i=e.getFilterElement(t),s=[];return i.selectedOptions?[].forEach.call(i.selectedOptions,function(t){return s.push(t.value)}):[].forEach.call(i.options,function(t){t.selected&&s.push(t.value)}),s},e.prototype.destroy=function(){var t=this;this.emitter.off(["build-select-filter"],function(e,i,s){return t.build(e,i,s)}),this.emitter.off(["select-options"],function(e,i,s){return t.selectOptions(i,s)})},e}(o.Feature)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.has=void 0;var s=i(5);e.has=function(t,e,i){for(var n=Boolean(i),r=0,o=t.length;o>r;r++)if((0,s.matchCase)(t[r].toString(),n)===e)return!0;return!1}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.ignoreCase=function(t,e){var i=t.toLowerCase(),s=e.toLowerCase();return s>i?-1:i>s?1:0},e.numSortAsc=function(t,e){return t-e},e.numSortDesc=function(t,e){return e-t}},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,
configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.CheckList=void 0;var o=i(10),l=i(3),a=i(16),h=i(5),c=i(17),f=i(1),p=i(4),u=i(11),d="Filter options for column {0} cannot be sorted in {1} manner.";e.CheckList=function(t){function e(i){s(this,e);var r=n(this,t.call(this,i,"checkList")),o=r.config;return r.containers=[],r.containerCssClass=o.div_checklist_css_class||"div_checklist",r.filterCssClass=o.checklist_css_class||"flt_checklist",r.itemCssClass=o.checklist_item_css_class||"flt_checklist_item",r.selectedItemCssClass=o.checklist_selected_item_css_class||"flt_checklist_slc_item",r.activateText=o.activate_checklist_text||"Click to load filter data",r.disabledItemCssClass=o.checklist_item_disabled_css_class||"flt_checklist_item_disabled",r.enableResetOption=o.enable_checklist_reset_filter!==!1,r.prfx="chkdiv_",r.isCustom=!1,r.opts=[],r.optsTxt=[],r.excludedOpts=[],r}return r(e,t),e.prototype.optionClick=function(t){var e=(0,f.targetEvt)(t),i=this.tf;this.emitter.emit("filter-focus",i,e),this.setCheckListValues(e),i.filter()},e.prototype.onCheckListClick=function(t){var e=this,i=(0,f.targetEvt)(t);if(this.tf.loadFltOnDemand&&"0"===i.getAttribute("filled")){var s=i.getAttribute("ct"),n=this.containers[s];this.build(s),(0,f.removeEvt)(n,"click",function(t){return e.onCheckListClick(t)})}},e.prototype.init=function(t,e,i){var s=this,n=this.tf,r=e?n.externalFltTgtIds[t]:null,o=(0,l.createElm)("div",["id",this.prfx+t+"_"+n.id],["ct",t],["filled","0"]);o.className=this.containerCssClass,r?(0,l.elm)(r).appendChild(o):i.appendChild(o),this.containers[t]=o,n.fltIds.push(n.prfxFlt+t+"_"+n.id),n.loadFltOnDemand?((0,f.addEvt)(o,"click",function(t){return s.onCheckListClick(t)}),o.appendChild((0,l.createText)(this.activateText))):this.build(t),this.emitter.on(["build-checklist-filter"],function(t,e){return s.build(e)}),this.emitter.on(["select-checklist-options"],function(t,e,i){return s.selectOptions(e,i)}),this.initialized=!0},e.prototype.build=function(t){var e=this.tf;t=parseInt(t,10),this.emitter.emit("before-populating-filter",e,t),this.opts=[],this.optsTxt=[];var i=this.containers[t],s=(0,l.createElm)("ul",["id",e.fltIds[t]],["colIndex",t]);s.className=this.filterCssClass;var n=e.tbl.rows,r=e.getRowsNb(!0),o=e.caseSensitive;this.isCustom=e.isCustomOptions(t);var f=void 0,p=e.getActiveFilterId();e.linkedFilters&&p&&(f=e.getColumnIndexFromFilterId(p));var u=[];e.linkedFilters&&e.disableExcludedOptions&&(this.excludedOpts=[]),i.innerHTML="";for(var g=e.refRow;r>g;g++)if(!e.hasVisibleRows||-1===e.visibleRows.indexOf(g)){var m=n[g].cells,v=m.length;if(v===e.nbCells&&!this.isCustom)for(var b=0;v>b;b++)if(t===b&&(!e.linkedFilters||e.linkedFilters&&e.disableExcludedOptions)||t===b&&e.linkedFilters&&(""===n[g].style.display&&!e.paging||e.paging&&(!f||f===t||f!==t&&-1!==e.validRowsIndex.indexOf(g)))){var y=e.getCellData(m[b]),_=(0,h.matchCase)(y,o);(0,a.has)(this.opts,_,o)||this.opts.push(y);var C=u[b];e.linkedFilters&&e.disableExcludedOptions&&(C||(C=e.getFilteredDataCol(b)),(0,a.has)(C,_,o)||(0,a.has)(this.excludedOpts,_,o)||this.excludedOpts.push(y))}}if(this.isCustom){var x=e.getCustomOptions(t);this.opts=x[0],this.optsTxt=x[1]}if(e.sortSlc&&!this.isCustom&&(o?(this.opts.sort(),this.excludedOpts&&this.excludedOpts.sort()):(this.opts.sort(c.ignoreCase),this.excludedOpts&&this.excludedOpts.sort(c.ignoreCase))),-1!==e.sortNumAsc.indexOf(t))try{this.opts.sort(c.numSortAsc),this.excludedOpts&&this.excludedOpts.sort(c.numSortAsc),this.isCustom&&this.optsTxt.sort(c.numSortAsc)}catch(w){throw new Error(d.replace("{0}",t).replace("{1}","ascending"))}if(-1!==e.sortNumDesc.indexOf(t))try{this.opts.sort(c.numSortDesc),this.excludedOpts&&this.excludedOpts.sort(c.numSortDesc),this.isCustom&&this.optsTxt.sort(c.numSortDesc)}catch(w){throw new Error(d.replace("{0}",t).replace("{1}","descending"))}this.addChecks(t,s),e.loadFltOnDemand&&(i.innerHTML=""),i.appendChild(s),i.setAttribute("filled","1"),this.emitter.emit("after-populating-filter",e,t,i)},e.prototype.addChecks=function(t,e){for(var i=this,s=this.tf,n=this.addTChecks(t,e),r=0;r<this.opts.length;r++){var o=this.opts[r],c=this.isCustom?this.optsTxt[r]:o,p=(0,l.createCheckItem)(s.fltIds[t]+"_"+(r+n),o,c);p.className=this.itemCssClass,s.linkedFilters&&s.disableExcludedOptions&&(0,a.has)(this.excludedOpts,(0,h.matchCase)(o,s.caseSensitive),s.caseSensitive)?((0,l.addClass)(p,this.disabledItemCssClass),p.check.disabled=!0,p.disabled=!0):(0,f.addEvt)(p.check,"click",function(t){return i.optionClick(t)}),e.appendChild(p),""===o&&(p.style.display=u.NONE)}},e.prototype.addTChecks=function(t,e){var i=this,s=this.tf,n=1,r=(0,l.createCheckItem)(s.fltIds[t]+"_0","",s.displayAllText);if(r.className=this.itemCssClass,e.appendChild(r),(0,f.addEvt)(r.check,"click",function(t){return i.optionClick(t)}),this.enableResetOption||(r.style.display=u.NONE),s.enableEmptyOption){var o=(0,l.createCheckItem)(s.fltIds[t]+"_1",s.emOperator,s.emptyText);o.className=this.itemCssClass,e.appendChild(o),(0,f.addEvt)(o.check,"click",function(t){return i.optionClick(t)}),n++}if(s.enableNonEmptyOption){var a=(0,l.createCheckItem)(s.fltIds[t]+"_2",s.nmOperator,s.nonEmptyText);a.className=this.itemCssClass,e.appendChild(a),(0,f.addEvt)(a.check,"click",function(t){return i.optionClick(t)}),n++}return n},e.prototype.setCheckListValues=function(t){if(t){var e=this.tf,i=t.value,s=parseInt(t.id.split("_")[2],10),n=e.getColumnIndexFromFilterId(t.id),r="LI",o=e.getFilterElement(parseInt(n,10)),a=o.childNodes[s],c=o.getAttribute("colIndex"),f=o.getAttribute("value"),p=o.getAttribute("indexes");if(t.checked){if(""===i){if(p&&""!==p)for(var u=p.split(e.separator),d=0;d<u.length;d++){var g=(0,l.elm)(e.fltIds[c]+"_"+u[d]);g&&(g.checked=!1,(0,l.removeClass)(o.childNodes[u[d]],this.selectedItemCssClass))}o.setAttribute("value",""),o.setAttribute("indexes","")}else f=f?f:"",i=(0,h.trim)(f+" "+i+" "+e.orOperator),s=p+s+e.separator,o.setAttribute("value",i),o.setAttribute("indexes",s),(0,l.elm)(e.fltIds[c]+"_0")&&((0,l.elm)(e.fltIds[c]+"_0").checked=!1);a.nodeName===r&&((0,l.removeClass)(o.childNodes[0],this.selectedItemCssClass),(0,l.addClass)(a,this.selectedItemCssClass))}else{if(""!==i){var m=new RegExp((0,h.rgxEsc)(i+" "+e.orOperator));f=f.replace(m,""),o.setAttribute("value",(0,h.trim)(f));var v=new RegExp((0,h.rgxEsc)(s+e.separator));p=p.replace(v,""),o.setAttribute("indexes",p)}a.nodeName===r&&(0,l.removeClass)(a,this.selectedItemCssClass)}}},e.prototype.selectOptions=function(t){var e=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],i=this.tf,s=i.getFilterElement(t);if(i.getFilterType(t)===u.CHECKLIST&&s){var n=(0,l.tag)(s,"li").length;s.setAttribute("value",""),s.setAttribute("indexes","");for(var r=0;n>r;r++){var o=(0,l.tag)(s,"li")[r],c=(0,l.tag)(o,"label")[0],f=(0,l.tag)(o,"input")[0],p=(0,h.matchCase)((0,l.getText)(c),i.caseSensitive);""!==p&&(0,a.has)(e,p,i.caseSensitive)?f.checked=!0:-1!==e.indexOf(i.nmOperator)&&p===(0,h.matchCase)(i.nonEmptyText,i.caseSensitive)?f.checked=!0:-1!==e.indexOf(i.emOperator)&&p===(0,h.matchCase)(i.emptyText,i.caseSensitive)?f.checked=!0:f.checked=!1,this.setCheckListValues(f)}}},e.prototype.getValues=function(t){var e=this.tf,i=e.getFilterElement(t),s=i.getAttribute("value"),n=(0,p.isEmpty)(s)?"":s;return n=n.substr(0,n.length-3),n=n.split(" "+e.orOperator+" ")},e.prototype.destroy=function(){var t=this;this.emitter.off(["build-checklist-filter"],function(e,i,s){return t.build(i,s)}),this.emitter.off(["select-checklist-options"],function(e,i,s){return t.selectOptions(i,s)})},e}(o.Feature)},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.RowsCounter=void 0;var o=i(10),l=i(3),a=i(4);e.RowsCounter=function(t){function e(i){s(this,e);var r=n(this,t.call(this,i,"rowsCounter")),o=r.config;return r.targetId=o.rows_counter_target_id||null,r.container=null,r.label=null,r.text=o.rows_counter_text||"Rows: ",r.fromToTextSeparator=o.from_to_text_separator||"-",r.overText=o.over_text||" / ",r.cssClass=o.tot_rows_css_class||"tot",r.prfxCounter="counter_",r.prfxLabel="totrows_span_",r.prfxText="totRowsTextSpan_",r.onBeforeRefreshCounter=(0,a.isFn)(o.on_before_refresh_counter)?o.on_before_refresh_counter:null,r.onAfterRefreshCounter=(0,a.isFn)(o.on_after_refresh_counter)?o.on_after_refresh_counter:null,r}return r(e,t),e.prototype.init=function(){var t=this;if(!this.initialized){var e=this.tf,i=(0,l.createElm)("div",["id",this.prfxCounter+e.id]);i.className=this.cssClass;var s=(0,l.createElm)("span",["id",this.prfxLabel+e.id]),n=(0,l.createElm)("span",["id",this.prfxText+e.id]);n.appendChild((0,l.createText)(this.text)),this.targetId||e.setToolbar();var r=this.targetId?(0,l.elm)(this.targetId):e.lDiv;this.targetId?(r.appendChild(n),r.appendChild(s)):(i.appendChild(n),i.appendChild(s),r.appendChild(i)),this.container=i,this.label=s,this.emitter.on(["after-filtering","grouped-by-page"],function(){return t.refresh(e.getValidRowsNb())}),this.emitter.on(["rows-changed"],function(){return t.refresh()}),this.initialized=!0,this.refresh()}},e.prototype.refresh=function(t){if(this.initialized&&this.isEnabled()){var e=this.tf;this.onBeforeRefreshCounter&&this.onBeforeRefreshCounter.call(null,e,this.label);var i=void 0;if(e.paging){var s=e.feature("paging");if(s){var n=parseInt(s.startPagingRow,10)+(e.getValidRowsNb()>0?1:0),r=n+s.pagingLength-1<=e.getValidRowsNb()?n+s.pagingLength-1:e.getValidRowsNb();i=n+this.fromToTextSeparator+r+this.overText+e.getValidRowsNb()}}else i=t&&""!==t?t:e.getFilterableRowsNb()-e.nbHiddenRows;this.label.innerHTML=i,this.onAfterRefreshCounter&&this.onAfterRefreshCounter.call(null,e,this.label,i)}},e.prototype.destroy=function(){var t=this;this.initialized&&(!this.targetId&&this.container?(0,l.removeElm)(this.container):(0,l.elm)(this.targetId).innerHTML="",this.label=null,this.container=null,this.emitter.off(["after-filtering","grouped-by-page"],function(){return t.refresh(tf.getValidRowsNb())}),this.emitter.off(["rows-changed"],function(){return t.refresh()}),this.initialized=!1)},e}(o.Feature)},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.StatusBar=void 0;var o=i(10),l=i(2),a=i(3),h=i(4);e.StatusBar=function(t){function e(i){s(this,e);var r=n(this,t.call(this,i,"statusBar")),o=r.config;return r.targetId=o.status_bar_target_id||null,r.container=null,r.msgContainer=null,r.labelContainer=null,r.text=o.status_bar_text||"",r.cssClass=o.status_bar_css_class||"status",r.delay=250,r.onBeforeShowMsg=(0,h.isFn)(o.on_before_show_msg)?o.on_before_show_msg:null,r.onAfterShowMsg=(0,h.isFn)(o.on_after_show_msg)?o.on_after_show_msg:null,r.msgFilter=o.msg_filter||"Filtering data...",r.msgPopulate=o.msg_populate||"Populating filter...",r.msgPopulateCheckList=o.msg_populate_checklist||"Populating list...",r.msgChangePage=o.msg_change_page||"Collecting paging data...",r.msgClear=o.msg_clear||"Clearing filters...",r.msgChangeResults=o.msg_change_results||"Changing results per page...",r.msgResetPage=o.msg_reset_page||"Re-setting page...",r.msgResetPageLength=o.msg_reset_page_length||"Re-setting page length...",r.msgSort=o.msg_sort||"Sorting data...",r.msgLoadExtensions=o.msg_load_extensions||"Loading extensions...",r.msgLoadThemes=o.msg_load_themes||"Loading theme(s)...",r.prfxCont="status_",r.prfxLabel="statusSpan_",r.prfxText="statusText_",r}return r(e,t),e.prototype.init=function(){var t=this;if(!this.initialized){var e=this.tf,i=this.emitter,s=(0,a.createElm)("div",["id",this.prfxCont+e.id]);s.className=this.cssClass;var n=(0,a.createElm)("span",["id",this.prfxLabel+e.id]),r=(0,a.createElm)("span",["id",this.prfxText+e.id]);r.appendChild((0,a.createText)(this.text)),this.targetId||e.setToolbar();var o=this.targetId?(0,a.elm)(this.targetId):e.lDiv;this.targetId?(o.appendChild(r),o.appendChild(n)):(s.appendChild(r),s.appendChild(n),o.appendChild(s)),this.container=s,this.msgContainer=n,this.labelContainer=r,i.on(["before-filtering"],function(){return t.message(t.msgFilter)}),i.on(["before-populating-filter"],function(){return t.message(t.msgPopulate)}),i.on(["before-page-change"],function(){return t.message(t.msgChangePage)}),i.on(["before-clearing-filters"],function(){return t.message(t.msgClear)}),i.on(["before-page-length-change"],function(){return t.message(t.msgChangeResults)}),i.on(["before-reset-page"],function(){return t.message(t.msgResetPage)}),i.on(["before-reset-page-length"],function(){return t.message(t.msgResetPageLength)}),i.on(["before-loading-extensions"],function(){return t.message(t.msgLoadExtensions)}),i.on(["before-loading-themes"],function(){return t.message(t.msgLoadThemes)}),i.on(["after-filtering","after-populating-filter","after-page-change","after-clearing-filters","after-page-length-change","after-reset-page","after-reset-page-length","after-loading-extensions","after-loading-themes"],function(){return t.message("")}),this.initialized=!0}},e.prototype.message=function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?"":arguments[0];if(this.isEnabled()){this.onBeforeShowMsg&&this.onBeforeShowMsg.call(null,this.tf,e);var i=""===e?this.delay:1;l.root.setTimeout(function(){t.initialized&&(t.msgContainer.innerHTML=e,t.onAfterShowMsg&&t.onAfterShowMsg.call(null,t.tf,e))},i)}},e.prototype.destroy=function(){var t=this;if(this.initialized){var e=this.emitter;this.container.innerHTML="",this.targetId||(0,a.removeElm)(this.container),this.labelContainer=null,this.msgContainer=null,this.container=null,e.off(["before-filtering"],function(){return t.message(t.msgFilter)}),e.off(["before-populating-filter"],function(){return t.message(t.msgPopulate)}),e.off(["before-page-change"],function(){return t.message(t.msgChangePage)}),e.off(["before-clearing-filters"],function(){return t.message(t.msgClear)}),e.off(["before-page-length-change"],function(){return t.message(t.msgChangeResults)}),e.off(["before-reset-page"],function(){return t.message(t.msgResetPage)}),e.off(["before-reset-page-length"],function(){return t.message(t.msgResetPageLength)}),e.off(["before-loading-extensions"],function(){return t.message(t.msgLoadExtensions)}),e.off(["before-loading-themes"],function(){return t.message(t.msgLoadThemes)}),e.off(["after-filtering","after-populating-filter","after-page-change","after-clearing-filters","after-page-length-change","after-reset-page","after-reset-page-length","after-loading-extensions","after-loading-themes"],function(){return t.message("")}),this.initialized=!1}},e}(o.Feature)},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.Paging=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},l=i(10),a=i(3),h=i(4),c=i(1),f=i(11);e.Paging=function(t){function e(i){s(this,e);var r=n(this,t.call(this,i,"paging")),o=r.config;r.btnPageCssClass=o.paging_btn_css_class||"pgInp",r.pagingSlc=null,r.resultsPerPageSlc=null,r.pagingTgtId=o.paging_target_id||null,r.pagingLength=isNaN(o.paging_length)?10:o.paging_length,r.resultsPerPageTgtId=o.results_per_page_target_id||null,r.pgSlcCssClass=o.paging_slc_css_class||"pgSlc",r.pgInpCssClass=o.paging_inp_css_class||"pgNbInp",r.resultsPerPage=o.results_per_page||null,r.hasResultsPerPage=(0,h.isArray)(r.resultsPerPage),r.resultsSlcCssClass=o.results_slc_css_class||"rspg",r.resultsSpanCssClass=o.results_span_css_class||"rspgSpan",r.startPagingRow=0,r.nbPages=0,r.currentPageNb=1,r.btnNextPageText=o.btn_next_page_text||">",r.btnPrevPageText=o.btn_prev_page_text||"<",r.btnLastPageText=o.btn_last_page_text||">|",r.btnFirstPageText=o.btn_first_page_text||"|<",r.btnNextPageHtml=o.btn_next_page_html||(i.enableIcons?'<input type="button" value="" class="'+r.btnPageCssClass+' nextPage" title="Next page" />':null),r.btnPrevPageHtml=o.btn_prev_page_html||(i.enableIcons?'<input type="button" value="" class="'+r.btnPageCssClass+' previousPage" title="Previous page" />':null),r.btnFirstPageHtml=o.btn_first_page_html||(i.enableIcons?'<input type="button" value="" class="'+r.btnPageCssClass+' firstPage" title="First page" />':null),r.btnLastPageHtml=o.btn_last_page_html||(i.enableIcons?'<input type="button" value="" class="'+r.btnPageCssClass+' lastPage" title="Last page" />':null),r.pageText=o.page_text||" Page ",r.ofText=o.of_text||" of ",r.nbPgSpanCssClass=o.nb_pages_css_class||"nbpg",r.hasPagingBtns=o.paging_btns!==!1,r.pageSelectorType=o.page_selector_type||f.SELECT,r.onBeforeChangePage=(0,h.isFn)(o.on_before_change_page)?o.on_before_change_page:null,r.onAfterChangePage=(0,h.isFn)(o.on_after_change_page)?o.on_after_change_page:null,r.prfxSlcPages="slcPages_",r.prfxSlcResults="slcResults_",r.prfxSlcResultsTxt="slcResultsTxt_",r.prfxBtnNextSpan="btnNextSpan_",r.prfxBtnPrevSpan="btnPrevSpan_",r.prfxBtnLastSpan="btnLastSpan_",r.prfxBtnFirstSpan="btnFirstSpan_",r.prfxBtnNext="btnNext_",r.prfxBtnPrev="btnPrev_",r.prfxBtnLast="btnLast_",r.prfxBtnFirst="btnFirst_",r.prfxPgSpan="pgspan_",r.prfxPgBeforeSpan="pgbeforespan_",r.prfxPgAfterSpan="pgafterspan_";var l=i.refRow,a=i.getRowsNb(!0);r.nbPages=Math.ceil((a-l)/r.pagingLength);var p=r;return r.evt={slcIndex:function(){return p.pageSelectorType===f.SELECT?p.pagingSlc.options.selectedIndex:parseInt(p.pagingSlc.value,10)-1},nbOpts:function(){return p.pageSelectorType===f.SELECT?parseInt(p.pagingSlc.options.length,10)-1:p.nbPages-1},next:function(){var t=p.evt.slcIndex()<p.evt.nbOpts()?p.evt.slcIndex()+1:0;p.changePage(t)},prev:function(){var t=p.evt.slcIndex()>0?p.evt.slcIndex()-1:p.evt.nbOpts();p.changePage(t)},last:function(){p.changePage(p.evt.nbOpts())},first:function(){p.changePage(0)},_detectKey:function(t){var e=(0,c.keyCode)(t);e===f.ENTER_KEY&&(i.sorted?(i.filter(),p.changePage(p.evt.slcIndex())):p.changePage(),this.blur())},slcPagesChange:null,nextEvt:null,prevEvt:null,lastEvt:null,firstEvt:null},r}return r(e,t),e.prototype.init=function(){var t,e=this,i=this.tf,s=this.evt;if(!this.initialized){this.hasResultsPerPage&&(this.resultsPerPage.length<2?this.hasResultsPerPage=!1:(this.pagingLength=this.resultsPerPage[1][0],this.setResultsPerPage())),s.slcPagesChange=function(t){var i=t.target;e.changePage(i.selectedIndex)},this.pageSelectorType===f.SELECT&&(t=(0,a.createElm)(f.SELECT,["id",this.prfxSlcPages+i.id]),t.className=this.pgSlcCssClass,(0,c.addEvt)(t,"change",s.slcPagesChange)),this.pageSelectorType===f.INPUT&&(t=(0,a.createElm)(f.INPUT,["id",this.prfxSlcPages+i.id],["value",this.currentPageNb]),t.className=this.pgInpCssClass,(0,c.addEvt)(t,"keypress",s._detectKey));var n=(0,a.createElm)("span",["id",this.prfxBtnNextSpan+i.id]),r=(0,a.createElm)("span",["id",this.prfxBtnPrevSpan+i.id]),o=(0,a.createElm)("span",["id",this.prfxBtnLastSpan+i.id]),l=(0,a.createElm)("span",["id",this.prfxBtnFirstSpan+i.id]);if(this.hasPagingBtns){if(this.btnNextPageHtml)n.innerHTML=this.btnNextPageHtml,(0,c.addEvt)(n,"click",s.next);else{var h=(0,a.createElm)(f.INPUT,["id",this.prfxBtnNext+i.id],["type","button"],["value",this.btnNextPageText],["title","Next"]);h.className=this.btnPageCssClass,(0,c.addEvt)(h,"click",s.next),n.appendChild(h)}if(this.btnPrevPageHtml)r.innerHTML=this.btnPrevPageHtml,(0,c.addEvt)(r,"click",s.prev);else{var p=(0,a.createElm)(f.INPUT,["id",this.prfxBtnPrev+i.id],["type","button"],["value",this.btnPrevPageText],["title","Previous"]);p.className=this.btnPageCssClass,(0,c.addEvt)(p,"click",s.prev),r.appendChild(p)}if(this.btnLastPageHtml)o.innerHTML=this.btnLastPageHtml,(0,c.addEvt)(o,"click",s.last);else{var u=(0,a.createElm)(f.INPUT,["id",this.prfxBtnLast+i.id],["type","button"],["value",this.btnLastPageText],["title","Last"]);u.className=this.btnPageCssClass,(0,c.addEvt)(u,"click",s.last),o.appendChild(u)}if(this.btnFirstPageHtml)l.innerHTML=this.btnFirstPageHtml,(0,c.addEvt)(l,"click",s.first);else{var d=(0,a.createElm)(f.INPUT,["id",this.prfxBtnFirst+i.id],["type","button"],["value",this.btnFirstPageText],["title","First"]);d.className=this.btnPageCssClass,(0,c.addEvt)(d,"click",s.first),l.appendChild(d)}}this.pagingTgtId||i.setToolbar();var g=this.pagingTgtId?(0,a.elm)(this.pagingTgtId):i.mDiv;g.appendChild(l),g.appendChild(r);var m=(0,a.createElm)("span",["id",this.prfxPgBeforeSpan+i.id]);m.appendChild((0,a.createText)(this.pageText)),m.className=this.nbPgSpanCssClass,g.appendChild(m),g.appendChild(t);var v=(0,a.createElm)("span",["id",this.prfxPgAfterSpan+i.id]);v.appendChild((0,a.createText)(this.ofText)),v.className=this.nbPgSpanCssClass,g.appendChild(v);var b=(0,a.createElm)("span",["id",this.prfxPgSpan+i.id]);b.className=this.nbPgSpanCssClass,b.appendChild((0,a.createText)(" "+this.nbPages+" ")),g.appendChild(b),g.appendChild(n),g.appendChild(o),this.pagingSlc=(0,a.elm)(this.prfxSlcPages+i.id),this.setPagingInfo(),i.fltGrid||(i.validateAllRows(),this.setPagingInfo(i.validRowsIndex)),this.emitter.on(["after-filtering"],function(){return e.resetPagingInfo()}),this.emitter.on(["change-page"],function(t,i){return e.setPage(i)}),this.emitter.on(["change-page-results"],function(t,i){return e.changeResultsPerPage(i)}),this.initialized=!0}},e.prototype.reset=function(){var t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0],e=this.tf;this.isEnabled()||(this.enable(),this.init(),t&&e.filter())},e.prototype.resetPagingInfo=function(){this.startPagingRow=0,this.currentPageNb=1,this.setPagingInfo(this.tf.validRowsIndex)},e.prototype.setPagingInfo=function(t){var e=this.tf,i=this.pagingTgtId?(0,a.elm)(this.pagingTgtId):e.mDiv,s=(0,a.elm)(this.prfxPgSpan+e.id);if(e.validRowsIndex=t||e.getValidRows(!0),this.nbPages=Math.ceil(e.validRowsIndex.length/this.pagingLength),s.innerHTML=this.nbPages,this.pageSelectorType===f.SELECT&&(this.pagingSlc.innerHTML=""),this.nbPages>0)if(i.style.visibility="visible",this.pageSelectorType===f.SELECT)for(var n=0;n<this.nbPages;n++){var r=(0,a.createOpt)(n+1,n*this.pagingLength,!1);this.pagingSlc.options[n]=r}else this.pagingSlc.value=this.currentPageNb;else i.style.visibility="hidden";this.groupByPage(e.validRowsIndex)},e.prototype.groupByPage=function(t){var e=this.tf,i=e.tbl.rows,s=parseInt(this.startPagingRow,10),n=s+parseInt(this.pagingLength,10);t&&(e.validRowsIndex=t);for(var r=0,o=e.getValidRowsNb(!0);o>r;r++){var l=e.validRowsIndex[r],a=i[l],c=a.getAttribute("validRow"),p=!1;r>=s&&n>r?((0,h.isNull)(c)||Boolean("true"===c))&&(a.style.display="",p=!0):a.style.display=f.NONE,this.emitter.emit("row-paged",e,l,r,p)}this.emitter.emit("grouped-by-page",e,this)},e.prototype.getPage=function(){return this.currentPageNb},e.prototype.setPage=function(t){var e=this.tf;if(e.isInitialized()&&this.isEnabled()){var i=this.evt,s="undefined"==typeof t?"undefined":o(t);if("string"===s)switch(t.toLowerCase()){case"next":i.next();break;case"previous":i.prev();break;case"last":i.last();break;case"first":i.first();break;default:i.next()}else"number"===s&&this.changePage(t-1)}},e.prototype.setResultsPerPage=function(){var t=this,e=this.tf,i=this.evt;if(!this.resultsPerPageSlc&&this.resultsPerPage){i.slcResultsChange=function(e){t.onChangeResultsPerPage(),e.target.blur()};var s=(0,a.createElm)(f.SELECT,["id",this.prfxSlcResults+e.id]);s.className=this.resultsSlcCssClass;var n=this.resultsPerPage[0],r=this.resultsPerPage[1],o=(0,a.createElm)("span",["id",this.prfxSlcResultsTxt+e.id]);o.className=this.resultsSpanCssClass,this.resultsPerPageTgtId||e.setToolbar();var l=this.resultsPerPageTgtId?(0,a.elm)(this.resultsPerPageTgtId):e.rDiv;o.appendChild((0,a.createText)(n));var h=e.feature("help");h&&h.btn?(h.btn.parentNode.insertBefore(o,h.btn),h.btn.parentNode.insertBefore(s,h.btn)):(l.appendChild(o),l.appendChild(s));for(var p=0;p<r.length;p++){var u=new Option(r[p],r[p],!1,!1);s.options[p]=u}(0,c.addEvt)(s,"change",i.slcResultsChange),this.resultsPerPageSlc=s}},e.prototype.removeResultsPerPage=function(){var t=this.tf;if(t.isInitialized()&&this.resultsPerPageSlc&&this.resultsPerPage){var e=this.resultsPerPageSlc,i=(0,a.elm)(this.prfxSlcResultsTxt+t.id);e&&(0,a.removeElm)(e),i&&(0,a.removeElm)(i),this.resultsPerPageSlc=null}},e.prototype.changePage=function(t){var e=this.tf;this.isEnabled()&&(this.emitter.emit("before-page-change",e,t+1),null===t&&(t=this.pageSelectorType===f.SELECT?this.pagingSlc.options.selectedIndex:this.pagingSlc.value-1),t>=0&&t<=this.nbPages-1&&(this.onBeforeChangePage&&this.onBeforeChangePage.call(null,this,t+1),this.currentPageNb=parseInt(t,10)+1,this.pageSelectorType===f.SELECT?this.pagingSlc.options[t].selected=!0:this.pagingSlc.value=this.currentPageNb,this.startPagingRow=this.pageSelectorType===f.SELECT?this.pagingSlc.value:t*this.pagingLength,this.groupByPage(),this.onAfterChangePage&&this.onAfterChangePage.call(null,this,t+1)),this.emitter.emit("after-page-change",e,t+1))},e.prototype.changeResultsPerPage=function(t){this.isEnabled()&&!isNaN(t)&&(this.resultsPerPageSlc.value=t,this.onChangeResultsPerPage())},e.prototype.onChangeResultsPerPage=function(){var t=this.tf;if(this.isEnabled()){this.emitter.emit("before-page-length-change",t);var e=this.resultsPerPageSlc,i=e.selectedIndex,s=this.pageSelectorType===f.SELECT?this.pagingSlc.selectedIndex:parseInt(this.pagingSlc.value-1,10);if(this.pagingLength=parseInt(e.options[i].value,10),this.startPagingRow=this.pagingLength*s,!isNaN(this.pagingLength)&&(this.startPagingRow>=t.nbFilterableRows&&(this.startPagingRow=t.nbFilterableRows-this.pagingLength),this.setPagingInfo(),this.pageSelectorType===f.SELECT)){var n=this.pagingSlc.options.length-1<=s?this.pagingSlc.options.length-1:s;this.pagingSlc.options[n].selected=!0}this.emitter.emit("after-page-length-change",t,this.pagingLength)}},e.prototype.resetPage=function(){var t=this.tf;if(this.isEnabled()){this.emitter.emit("before-reset-page",t);var e=t.feature("store").getPageNb();""!==e&&this.changePage(e-1),this.emitter.emit("after-reset-page",t,e)}},e.prototype.resetPageLength=function(){var t=this.tf;if(this.isEnabled()){this.emitter.emit("before-reset-page-length",t);var e=t.feature("store").getPageLength();""!==e&&(this.resultsPerPageSlc.options[e].selected=!0,this.changeResultsPerPage()),this.emitter.emit("after-reset-page-length",t,e)}},e.prototype.destroy=function(){var t=this,e=this.tf;if(this.initialized){var i=(0,a.elm)(this.prfxBtnNextSpan+e.id),s=(0,a.elm)(this.prfxBtnPrevSpan+e.id),n=(0,a.elm)(this.prfxBtnLastSpan+e.id),r=(0,a.elm)(this.prfxBtnFirstSpan+e.id),o=(0,a.elm)(this.prfxPgBeforeSpan+e.id),l=(0,a.elm)(this.prfxPgAfterSpan+e.id),h=(0,a.elm)(this.prfxPgSpan+e.id),p=this.evt;this.pagingSlc&&(this.pageSelectorType===f.SELECT?(0,c.removeEvt)(this.pagingSlc,"change",p.slcPagesChange):this.pageSelectorType===f.INPUT&&(0,c.removeEvt)(this.pagingSlc,"keypress",p._detectKey),(0,a.removeElm)(this.pagingSlc)),i&&((0,c.removeEvt)(i,"click",p.next),(0,a.removeElm)(i)),s&&((0,c.removeEvt)(s,"click",p.prev),(0,a.removeElm)(s)),n&&((0,c.removeEvt)(n,"click",p.last),(0,a.removeElm)(n)),r&&((0,c.removeEvt)(r,"click",p.first),(0,a.removeElm)(r)),o&&(0,a.removeElm)(o),l&&(0,a.removeElm)(l),h&&(0,a.removeElm)(h),this.hasResultsPerPage&&this.removeResultsPerPage(),this.emitter.off(["after-filtering"],function(){return t.resetPagingInfo()}),this.emitter.off(["change-page"],function(e,i){return t.setPage(i)}),this.emitter.off(["change-page-results"],function(e,i){return t.changeResultsPerPage(i)}),this.pagingSlc=null,this.nbPages=0,this.disable(),this.initialized=!1}},e}(l.Feature)},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.ClearButton=void 0;var o=i(10),l=i(3),a=i(1);e.ClearButton=function(t){function e(i){s(this,e);var r=n(this,t.call(this,i,"btnReset")),o=r.config;return r.targetId=o.btn_reset_target_id||null,r.element=null,r.text=o.btn_reset_text||"Reset",r.cssClass=o.btn_reset_css_class||"reset",r.tooltip=o.btn_reset_tooltip||"Clear filters",r.html=o.btn_reset_html||(i.enableIcons?'<input type="button" value="" class="'+r.cssClass+'" title="'+r.tooltip+'" />':null),r.prfxCont="resetspan_",r}return r(e,t),e.prototype.onClick=function(){this.isEnabled()&&this.tf.clearFilters()},e.prototype.init=function(){var t=this,e=this.tf;if(!this.initialized){var i=(0,l.createElm)("span",["id",this.prfxCont+e.id]);this.targetId||e.setToolbar();var s=this.targetId?(0,l.elm)(this.targetId):e.rDiv;if(s.appendChild(i),this.html){i.innerHTML=this.html;var n=i.firstChild;(0,a.addEvt)(n,"click",function(){return t.onClick()})}else{var r=(0,l.createElm)("a",["href","javascript:void(0);"]);r.className=this.cssClass,r.appendChild((0,l.createText)(this.text)),i.appendChild(r),(0,a.addEvt)(r,"click",function(){return t.onClick()})}this.element=i.firstChild,this.initialized=!0}},e.prototype.destroy=function(){var t=this.tf;if(this.initialized){var e=(0,l.elm)(this.prfxCont+t.id);e&&(0,l.removeElm)(e),this.element=null,this.initialized=!1}},e}(o.Feature)},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.Help=void 0;var o=i(10),l=i(3),a=i(1),h=i(11),c="https://github.com/koalyptus/TableFilter/wiki/4.-Filter-operators",f="http://koalyptus.github.io/TableFilter/";e.Help=function(t){
function e(i){s(this,e);var r=n(this,t.call(this,i,"help")),o=r.config;return r.tgtId=o.help_instructions_target_id||null,r.contTgtId=o.help_instructions_container_target_id||null,r.instrText=o.help_instructions_text?o.help_instructions_text:'Use the filters above each column to filter and limit table data. Advanced searches can be performed by using the following operators: <br /><b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>=</b>, <b>*</b>, <b>!</b>, <b>{</b>, <b>}</b>, <b>||</b>,<b>&amp;&amp;</b>, <b>[empty]</b>, <b>[nonempty]</b>, <b>rgx:</b><br/><a href="'+c+'" target="_blank">Learn more</a><hr/>',r.instrHtml=o.help_instructions_html||null,r.btnText=o.help_instructions_btn_text||"?",r.btnHtml=o.help_instructions_btn_html||null,r.btnCssClass=o.help_instructions_btn_css_class||"helpBtn",r.contCssClass=o.help_instructions_container_css_class||"helpCont",r.btn=null,r.cont=null,r.defaultHtml='<div class="helpFooter"><h4>TableFilter v'+i.version+'</h4><a href="'+f+'" target="_blank">'+f+"</a><br/><span>&copy;2015-"+i.year+' Max Guglielmi</span><div align="center" style="margin-top:8px;"><a href="javascript:void(0);" class="close">Close</a></div></div>',r.prfxHelpSpan="helpSpan_",r.prfxHelpDiv="helpDiv_",r.emitter.on(["init-help"],function(){return r.init()}),r}return r(e,t),e.prototype.init=function(){var t=this;if(!this.initialized){var e=this.tf,i=(0,l.createElm)("span",["id",this.prfxHelpSpan+e.id]),s=(0,l.createElm)("div",["id",this.prfxHelpDiv+e.id]);this.tgtId||e.setToolbar();var n=this.tgtId?(0,l.elm)(this.tgtId):e.rDiv;n.appendChild(i);var r=this.contTgtId?(0,l.elm)(this.contTgtId):i;if(this.btnHtml){i.innerHTML=this.btnHtml;var o=i.firstChild;(0,a.addEvt)(o,"click",function(){return t.toggle()}),r.appendChild(s)}else{r.appendChild(s);var h=(0,l.createElm)("a",["href","javascript:void(0);"]);h.className=this.btnCssClass,h.appendChild((0,l.createText)(this.btnText)),i.appendChild(h),(0,a.addEvt)(h,"click",function(){return t.toggle()})}this.instrHtml?(this.contTgtId&&r.appendChild(s),s.innerHTML=this.instrHtml,this.contTgtId||(s.className=this.contCssClass,(0,a.addEvt)(s,"dblclick",function(){return t.toggle()}))):(s.innerHTML=this.instrText,s.className=this.contCssClass,(0,a.addEvt)(s,"dblclick",function(){return t.toggle()})),s.innerHTML+=this.defaultHtml,(0,a.addEvt)(s,"click",function(){return t.toggle()}),this.cont=s,this.btn=i,this.initialized=!0}},e.prototype.toggle=function(){if(this.enabled!==!1){var t=this.cont.style.display;""===t||t===h.NONE?this.cont.style.display="inline":this.cont.style.display=h.NONE}},e.prototype.destroy=function(){this.initialized&&((0,l.removeElm)(this.btn),this.btn=null,this.cont&&((0,l.removeElm)(this.cont),this.cont=null,this.initialized=!1))},e}(o.Feature)},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.AlternateRows=void 0;var o=i(10),l=i(3);e.AlternateRows=function(t){function e(i){s(this,e);var r=n(this,t.call(this,i,"alternateRows")),o=r.config;return r.evenCss=o.even_row_css_class||"even",r.oddCss=o.odd_row_css_class||"odd",r}return r(e,t),e.prototype.init=function(){var t=this;this.initialized||(this.processAll(),this.emitter.on(["row-processed","row-paged"],function(e,i,s,n){return t.processRow(i,s,n)}),this.emitter.on(["column-sorted"],function(){return t.processAll()}),this.initialized=!0)},e.prototype.processAll=function(){if(this.isEnabled())for(var t=this.tf,e=t.getValidRows(!0),i=e.length,s=0,n=0;i>n;n++){var r=e[n];this.setRowBg(r,s),s++}},e.prototype.processRow=function(t,e,i){i?this.setRowBg(t,e):this.removeRowBg(t)},e.prototype.setRowBg=function(t,e){if(this.isEnabled()&&!isNaN(t)){var i=this.tf.tbl.rows,s=isNaN(e)?t:e;this.removeRowBg(t),(0,l.addClass)(i[t],s%2?this.evenCss:this.oddCss)}},e.prototype.removeRowBg=function(t){if(!isNaN(t)){var e=this.tf.tbl.rows;(0,l.removeClass)(e[t],this.oddCss),(0,l.removeClass)(e[t],this.evenCss)}},e.prototype.destroy=function(){var t=this;if(this.initialized){for(var e=this.tf.getRowsNb(!0),i=0;e>i;i++)this.removeRowBg(i);this.emitter.off(["row-processed","row-paged"],function(e,i,s,n){return t.processRow(i,s,n)}),this.emitter.off(["column-sorted"],function(){return t.processAll()}),this.initialized=!1}},e}(o.Feature)},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.NoResults=void 0;var o=i(10),l=i(3),a=i(4),h=i(11);e.NoResults=function(t){function e(i){s(this,e);var r=n(this,t.call(this,i,"noResults")),o=r.config.no_results_message;return r.content=o.content||"No results",r.customContainer=o.custom_container||null,r.customContainerId=o.custom_container_id||null,r.isExternal=!(0,a.isEmpty)(r.customContainer)||!(0,a.isEmpty)(r.customContainerId),r.cssClass=o.css_class||"no-results",r.cont=null,r.onBeforeShow=(0,a.isFn)(o.on_before_show_msg)?o.on_before_show_msg:null,r.onAfterShow=(0,a.isFn)(o.on_after_show_msg)?o.on_after_show_msg:null,r.onBeforeHide=(0,a.isFn)(o.on_before_hide_msg)?o.on_before_hide_msg:null,r.onAfterHide=(0,a.isFn)(o.on_after_hide_msg)?o.on_after_hide_msg:null,r.prfx="nores_",r}return r(e,t),e.prototype.init=function(){var t=this;if(!this.initialized){var e=this.tf,i=this.customContainer||(0,l.elm)(this.customContainerId)||e.tbl,s=(0,l.createElm)("div",["id",this.prfx+e.id]);s.className=this.cssClass,s.innerHTML=this.content,this.isExternal?i.appendChild(s):i.parentNode.insertBefore(s,i.nextSibling),this.cont=s,this.emitter.on(["after-filtering"],function(){return t.toggle()}),this.initialized=!0,this.hide()}},e.prototype.toggle=function(){this.tf.getValidRowsNb()>0?this.hide():this.show()},e.prototype.show=function(){this.initialized&&this.isEnabled()&&(this.onBeforeShow&&this.onBeforeShow.call(null,this.tf,this),this.setWidth(),this.cont.style.display="block",this.onAfterShow&&this.onAfterShow.call(null,this.tf,this))},e.prototype.hide=function(){this.initialized&&this.isEnabled()&&(this.onBeforeHide&&this.onBeforeHide.call(null,this.tf,this),this.cont.style.display=h.NONE,this.onAfterHide&&this.onAfterHide.call(null,this.tf,this))},e.prototype.setWidth=function(){if(this.initialized&&!this.isExternal&&this.isEnabled()){var t=this.tf;if(t.gridLayout){var e=t.feature("gridLayout");this.cont.style.width=e.tblCont.clientWidth+"px"}else this.cont.style.width=(t.tbl.tHead?t.tbl.tHead.clientWidth:t.tbl.tBodies[0].clientWidth)+"px"}},e.prototype.destroy=function(){var t=this;this.initialized&&((0,l.removeElm)(this.cont),this.cont=null,this.emitter.off(["after-filtering"],function(){return t.toggle()}),this.initialized=!1)},e}(o.Feature)},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.State=void 0;var o=i(10),l=i(27),a=i(28),h=i(5),c=i(4);e.State=function(t){function e(i){s(this,e);var r=n(this,t.call(this,i,"state")),o=r.config.state;return r.enableHash=o===!0||(0,c.isArray)(o.types)&&-1!==o.types.indexOf("hash"),r.enableLocalStorage=(0,c.isArray)(o.types)&&-1!==o.types.indexOf("local_storage"),r.enableCookie=(0,c.isArray)(o.types)&&-1!==o.types.indexOf("cookie"),r.persistFilters=o.filters!==!1,r.persistPageNumber=Boolean(o.page_number),r.persistPageLength=Boolean(o.page_length),r.persistSort=Boolean(o.sort),r.persistColsVisibility=Boolean(o.columns_visibility),r.persistFiltersVisibility=Boolean(o.filters_visibility),r.cookieDuration=isNaN(o.cookie_duration)?87600:parseInt(o.cookie_duration,10),r.enableStorage=r.enableLocalStorage||r.enableCookie,r.storage=null,r.hash=null,r.pageNb=null,r.pageLength=null,r.sort=null,r.hiddenCols=null,r.filtersVisibility=null,r.state={},r.prfxCol="col_",r.pageNbKey="page",r.pageLengthKey="page_length",r.filtersVisKey="filters_visibility",r}return r(e,t),e.prototype.init=function(){var t=this;this.initialized||(this.emitter.on(["after-filtering"],function(){return t.update()}),this.emitter.on(["after-page-change","after-clearing-filters"],function(e,i){return t.updatePage(i)}),this.emitter.on(["after-page-length-change"],function(e,i){return t.updatePageLength(i)}),this.emitter.on(["column-sorted"],function(e,i,s){return t.updateSort(i,s)}),this.emitter.on(["sort-initialized"],function(){return t._syncSort()}),this.emitter.on(["columns-visibility-initialized"],function(){return t._syncColsVisibility()}),this.emitter.on(["column-shown","column-hidden"],function(e,i,s,n){return t.updateColsVisibility(n)}),this.emitter.on(["filters-visibility-initialized"],function(){return t._syncFiltersVisibility()}),this.emitter.on(["filters-toggled"],function(e,i,s){return t.updateFiltersVisibility(s)}),this.enableHash&&(this.hash=new l.Hash(this),this.hash.init()),this.enableStorage&&(this.storage=new a.Storage(this),this.storage.init()),this.initialized=!0)},e.prototype.update=function(){var t=this;if(this.isEnabled()){var e=this.state,i=this.tf;if(this.persistFilters){var s=i.getFiltersValue();s.forEach(function(i,s){var n=""+t.prfxCol+s;(0,c.isString)(i)&&(0,h.isEmpty)(i)?e.hasOwnProperty(n)&&(e[n].flt=void 0):(e[n]=e[n]||{},e[n].flt=i)})}if(this.persistPageNumber&&((0,c.isNull)(this.pageNb)?e[this.pageNbKey]=void 0:e[this.pageNbKey]=this.pageNb),this.persistPageLength&&((0,c.isNull)(this.pageLength)?e[this.pageLengthKey]=void 0:e[this.pageLengthKey]=this.pageLength),this.persistSort&&!(0,c.isNull)(this.sort)){Object.keys(e).forEach(function(i){-1!==i.indexOf(t.prfxCol)&&e[i]&&(e[i].sort=void 0)});var n=""+this.prfxCol+this.sort.column;e[n]=e[n]||{},e[n].sort={descending:this.sort.descending}}this.persistColsVisibility&&((0,c.isNull)(this.hiddenCols)||(Object.keys(e).forEach(function(i){-1!==i.indexOf(t.prfxCol)&&e[i]&&(e[i].hidden=void 0)}),this.hiddenCols.forEach(function(i){var s=""+t.prfxCol+i;e[s]=e[s]||{},e[s].hidden=!0}))),this.persistFiltersVisibility&&((0,c.isNull)(this.filtersVisibility)?e[this.filtersVisKey]=void 0:e[this.filtersVisKey]=this.filtersVisibility),this.emitter.emit("state-changed",i,e)}},e.prototype.updatePage=function(t){this.pageNb=t,this.update()},e.prototype.updatePageLength=function(t){this.pageLength=t,this.update()},e.prototype.updateSort=function(t,e){this.sort={column:t,descending:e},this.update()},e.prototype.updateColsVisibility=function(t){this.hiddenCols=t,this.update()},e.prototype.updateFiltersVisibility=function(t){this.filtersVisibility=t,this.update()},e.prototype.override=function(t){this.state=t},e.prototype.sync=function(){var t=this.state,e=this.tf;if(this._syncFilters(),this.persistPageNumber){var i=t[this.pageNbKey];this.emitter.emit("change-page",e,i)}if(this.persistPageLength){var s=t[this.pageLengthKey];this.emitter.emit("change-page-results",e,s)}this._syncSort(),this._syncColsVisibility(),this._syncFiltersVisibility()},e.prototype.overrideAndSync=function(t){this.disable(),this.override(t),this.sync(),this.enable()},e.prototype._syncFilters=function(){var t=this;if(this.persistFilters){var e=this.state,i=this.tf;Object.keys(e).forEach(function(s){if(-1!==s.indexOf(t.prfxCol)){var n=parseInt(s.replace(t.prfxCol,""),10),r=e[s].flt;i.setFilterValue(n,r)}}),i.filter()}},e.prototype._syncSort=function(){var t=this;if(this.persistSort){var e=this.state,i=this.tf;Object.keys(e).forEach(function(s){if(-1!==s.indexOf(t.prfxCol)){var n=parseInt(s.replace(t.prfxCol,""),10);if(!(0,c.isUndef)(e[s].sort)){var r=e[s].sort;t.emitter.emit("sort",i,n,r.descending)}}})}},e.prototype._syncColsVisibility=function(){var t=this;if(this.persistColsVisibility){var e=this.state,i=this.tf,s=[];Object.keys(e).forEach(function(i){if(-1!==i.indexOf(t.prfxCol)){var n=parseInt(i.replace(t.prfxCol,""),10);(0,c.isUndef)(e[i].hidden)||s.push(n)}}),s.forEach(function(e){t.emitter.emit("hide-column",i,e)})}},e.prototype._syncFiltersVisibility=function(){if(this.persistFiltersVisibility){var t=this.state,e=this.tf,i=t[this.filtersVisKey];this.filtersVisibility=i,this.emitter.emit("show-filters",e,i)}},e.prototype.destroy=function(){var t=this;this.initialized&&(this.state={},this.emitter.off(["after-filtering"],function(){return t.update()}),this.emitter.off(["after-page-change","after-clearing-filters"],function(e,i){return t.updatePage(i)}),this.emitter.off(["after-page-length-change"],function(e,i){return t.updatePageLength(i)}),this.emitter.off(["column-sorted"],function(e,i,s){return t.updateSort(i,s)}),this.emitter.off(["sort-initialized"],function(){return t._syncSort()}),this.emitter.off(["columns-visibility-initialized"],function(){return t._syncColsVisibility()}),this.emitter.off(["column-shown","column-hidden"],function(e,i,s,n){return t.updateColsVisibility(n)}),this.emitter.off(["filters-visibility-initialized"],function(){return t._syncFiltersVisibility()}),this.emitter.off(["filters-toggled"],function(e,i,s){return t.updateFiltersVisibility(s)}),this.enableHash&&(this.hash.destroy(),this.hash=null),this.enableStorage&&(this.storage.destroy(),this.storage=null),this.initialized=!1)},e}(o.Feature)},function(t,e,i){"use strict";function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.Hash=e.hasHashChange=void 0;var n=i(1),r=i(2),o=r.root.JSON,l=r.root.location,a=r.root.decodeURIComponent,h=r.root.encodeURIComponent,c=e.hasHashChange=function(){var t=r.root.documentMode;return"onhashchange"in r.root&&(void 0===t||t>7)};e.Hash=function(){function t(e){s(this,t),this.state=e,this.lastHash=null,this.emitter=e.emitter,this.boundSync=null}return t.prototype.init=function(){var t=this;c()&&(this.lastHash=l.hash,this.boundSync=this.sync.bind(this),this.emitter.on(["state-changed"],function(e,i){return t.update(i)}),this.emitter.on(["initialized"],this.boundSync),(0,n.addEvt)(r.root,"hashchange",this.boundSync))},t.prototype.update=function(t){var e="#"+h(o.stringify(t));this.lastHash!==e&&(l.hash=e,this.lastHash=e)},t.prototype.parse=function(t){return-1===t.indexOf("#")?null:(t=t.substr(1),o.parse(a(t)))},t.prototype.sync=function(){var t=this.parse(l.hash);t&&this.state.overrideAndSync(t)},t.prototype.destroy=function(){var t=this;this.emitter.off(["state-changed"],function(e,i){return t.update(i)}),this.emitter.off(["initialized"],this.boundSync),(0,n.removeEvt)(r.root,"hashchange",this.boundSync),this.state=null,this.lastHash=null,this.emitter=null},t}()},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.Storage=e.hasStorage=void 0;var r=i(29),o=s(r),l=i(2),a=l.root.JSON,h=l.root.localStorage,c=l.root.location,f=e.hasStorage=function(){return"Storage"in l.root};e.Storage=function(){function t(e){n(this,t),this.state=e,this.tf=e.tf,this.enableLocalStorage=e.enableLocalStorage&&f(),this.enableCookie=e.enableCookie&&!this.enableLocalStorage,this.emitter=e.emitter,this.duration=e.cookieDuration}return t.prototype.init=function(){var t=this;this.emitter.on(["state-changed"],function(e,i){return t.save(i)}),this.emitter.on(["initialized"],function(){return t.sync()})},t.prototype.save=function(t){this.enableLocalStorage?h[this.getKey()]=a.stringify(t):o["default"].write(this.getKey(),a.stringify(t),this.duration)},t.prototype.retrieve=function(){var t=null;return t=this.enableLocalStorage?h[this.getKey()]:o["default"].read(this.getKey()),t?a.parse(t):null},t.prototype.remove=function(){this.enableLocalStorage?h.removeItem(this.getKey()):o["default"].remove(this.getKey())},t.prototype.sync=function(){var t=this.retrieve();t&&this.state.overrideAndSync(t)},t.prototype.getKey=function(){return a.stringify({key:this.tf.prfxTf+"_"+this.tf.id,path:c.pathname})},t.prototype.destroy=function(){var t=this;this.emitter.off(["state-changed"],function(e,i){return t.save(i)}),this.emitter.off(["initialized"],function(){return t.sync()}),this.remove(),this.state=null,this.emitter=null},t}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i(2),n=s.root.document;e["default"]={write:function(t,e,i){var s="";i&&(s=new Date((new Date).getTime()+36e5*i),s="; expires="+s.toGMTString()),n.cookie=t+"="+escape(e)+s},read:function(t){var e="",i=t+"=";if(n.cookie.length>0){var s=n.cookie,r=s.indexOf(i);if(-1!==r){r+=i.length;var o=s.indexOf(";",r);-1===o&&(o=s.length),e=unescape(s.substring(r,o))}}return e},remove:function(t){this.write(t,"",-1)}}}])});