/*! SearchPanes 1.4.0 2019-2020 SpryMedia Ltd - datatables.net/license */ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.getGlobal=function(n){n=["object"==typeof globalThis&&globalThis,n,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var q=0;ql&&(l=Math.max(l+t,0));l").addClass(this.classes.buttonGroup),clear:l('').addClass(this.classes.disabledButton).attr("disabled","true").addClass(this.classes.paneButton).addClass(this.classes.clearButton),collapseButton:l('').addClass(this.classes.paneButton).addClass(this.classes.collapseButton), container:l("
").addClass(this.classes.container).addClass(this.classes.layout+(10>b?e:e.split("-")[0]+"-9")),countButton:l('').addClass(this.classes.paneButton).addClass(this.classes.countButton),dtP:l("
"+(this.colExists?l(a.column(this.colExists?this.s.index:0).header()).text():this.customPaneSettings.header||"Custom Pane")+"
"),lower:l("
").addClass(this.classes.subRow2).addClass(this.classes.narrowButton), nameButton:l('').addClass(this.classes.paneButton).addClass(this.classes.nameButton),panesContainer:d,searchBox:l("").addClass(this.classes.paneInputButton).addClass(this.classes.search),searchButton:l('').addClass(this.classes.paneButton),searchCont:l("
").addClass(this.classes.searchCont),searchLabelCont:l("
").addClass(this.classes.searchLabelCont),topRow:l("
").addClass(this.classes.topRow), upper:l("
").addClass(this.classes.subRow1).addClass(this.classes.narrowSearch)};this.s.displayed=!1;a=this.s.dt;this.selections=[];this.s.colOpts=this.colExists?this._getOptions():this._getBonusOptions();var k=this.s.colOpts;e=l('').addClass(this.classes.paneButton);e.text(a.i18n("searchPanes.clearPane",this.c.i18n.clearPane));this.dom.container.addClass(k.className);this.dom.container.addClass(null!==this.customPaneSettings&&void 0!==this.customPaneSettings.className? this.customPaneSettings.className:"");this.s.name=void 0!==this.s.colOpts.name?this.s.colOpts.name:null!==this.customPaneSettings&&void 0!==this.customPaneSettings.name?this.customPaneSettings.name:this.colExists?l(a.column(this.s.index).header()).text():this.customPaneSettings.header||"Custom Pane";l(d).append(this.dom.container);var p=a.table(0).node();this.s.searchFunction=function(m,x,z,y){if(0===g.selections.length||m.nTable!==p)return!0;m=null;g.colExists&&(m=x[g.s.index],"filter"!==k.orthogonal.filter&& (m=g.s.rowData.filterMap.get(z),m instanceof l.fn.dataTable.Api&&(m=m.toArray())));return g._search(m,z)};l.fn.dataTable.ext.search.push(this.s.searchFunction);if(this.c.clear)e.on("click",function(){g.dom.container.find("."+g.classes.search.replace(/\s+/g,".")).each(function(){l(this).val("");l(this).trigger("input")});g.clearPane()});a.on("draw.dtsp",function(){g.adjustTopRow()});a.on("buttons-action",function(){g.adjustTopRow()});a.on("column-reorder.dtsp",function(m,x,z){g.s.index=z.mapping[g.s.index]}); return this}h.prototype.addRow=function(a,b,c,e,d,f,g){for(var k,p=0,m=this.s.indexes;pl(a[0]).width()||252>l(e[0]).width())&&0!==l(a[0]).width()?(l(a[0]).addClass(this.classes.narrow),l(b[0]).addClass(this.classes.narrowSub).removeClass(this.classes.narrowSearch),l(c[0]).addClass(this.classes.narrowSub).removeClass(this.classes.narrowButton)):(l(a[0]).removeClass(this.classes.narrow),l(b[0]).removeClass(this.classes.narrowSub).addClass(this.classes.narrowSearch), l(c[0]).removeClass(this.classes.narrowSub).addClass(this.classes.narrowButton))};h.prototype.clearData=function(){this.s.rowData={arrayFilter:[],arrayOriginal:[],arrayTotals:[],bins:{},binsOriginal:{},binsTotal:{},filterMap:new Map,totalOptions:0}};h.prototype.clearPane=function(){this.s.dtPane.rows({selected:!0}).deselect();this.updateTable();return this};h.prototype.collapse=function(){var a=this;this.s.displayed&&(this.c.collapse||!0===this.s.colOpts.collapse)&&!1!==this.s.colOpts.collapse&&(this.dom.collapseButton.addClass(this.classes.rotated), l(this.s.dtPane.table().container()).addClass(this.classes.hidden),this.dom.topRow.addClass(this.classes.bordered),this.dom.countButton.addClass(this.classes.disabledButton),this.dom.nameButton.addClass(this.classes.disabledButton),this.dom.searchButton.addClass(this.classes.disabledButton),this.dom.topRow.one("click",function(){a.show()}))};h.prototype.destroy=function(){void 0!==this.s.dtPane&&this.s.dtPane.off(".dtsp");this.dom.nameButton.off(".dtsp");this.dom.collapseButton.off(".dtsp");this.dom.countButton.off(".dtsp"); this.dom.clear.off(".dtsp");this.dom.searchButton.off(".dtsp");this.dom.container.remove();for(var a=l.fn.dataTable.ext.search.indexOf(this.s.searchFunction);-1!==a;)l.fn.dataTable.ext.search.splice(a,1),a=l.fn.dataTable.ext.search.indexOf(this.s.searchFunction);void 0!==this.s.dtPane&&this.s.dtPane.destroy();this.s.listSet=!1};h.prototype.emptyMessage=function(){var a=this.c.i18n.emptyMessage;this.c.emptyMessage&&(a=this.c.emptyMessage);!1!==this.s.colOpts.emptyMessage&&null!==this.s.colOpts.emptyMessage&& (a=this.s.colOpts.emptyMessage);return this.s.dt.i18n("searchPanes.emptyMessage",a)};h.prototype.getPaneCount=function(){return void 0!==this.s.dtPane?this.s.dtPane.rows({selected:!0}).data().toArray().length:0};h.prototype.rebuildPane=function(a,b,c,e){void 0===a&&(a=!1);void 0===b&&(b=null);void 0===c&&(c=null);void 0===e&&(e=!1);this.clearData();var d=[];this.s.serverSelect=[];var f=null;void 0!==this.s.dtPane&&(e&&(this.s.dt.page.info().serverSide?this.s.serverSelect=this.s.dtPane.rows({selected:!0}).data().toArray(): d=this.s.dtPane.rows({selected:!0}).data().toArray()),this.s.dtPane.clear().destroy(),f=this.dom.container.prev(),this.destroy(),this.s.dtPane=void 0,l.fn.dataTable.ext.search.push(this.s.searchFunction));this.dom.container.removeClass(this.classes.hidden);this.s.displayed=!1;this._buildPane(this.s.dt.page.info().serverSide?this.s.serverSelect:d,a,b,c,f);return this};h.prototype.removePane=function(){this.s.displayed=!1;this.dom.container.hide()};h.prototype.resize=function(a){this.c.layout=a;var b= parseInt(a.split("-")[1],10);this.dom.container.removeClass().addClass(this.classes.container).addClass(this.classes.layout+(10>b?a:a.split("-")[0]+"-9")).addClass(this.s.colOpts.className).addClass(null!==this.customPaneSettings&&void 0!==this.customPaneSettings.className?this.customPaneSettings.className:"").addClass(this.classes.show);this.adjustTopRow()};h.prototype.setCascadeRegen=function(a){this.s.cascadeRegen=a};h.prototype.setClear=function(a){this.s.clearing=a};h.prototype.show=function(){this.s.displayed&& (this.dom.collapseButton.removeClass(this.classes.rotated),l(this.s.dtPane.table().container()).removeClass(this.classes.hidden),this.dom.topRow.removeClass(this.classes.bordered),this.dom.countButton.removeClass(this.classes.disabledButton),this.dom.nameButton.removeClass(this.classes.disabledButton),this.dom.searchButton.removeClass(this.classes.disabledButton))};h.prototype.updatePane=function(a){void 0===a&&(a=!1);this.s.updating=!0;this._updateCommon(a);this.s.updating=!1};h.prototype.updateTable= function(){this.selections=this.s.dtPane.rows({selected:!0}).data().toArray();this._searchExtras();(this.c.cascadePanes||this.c.viewTotal)&&this.updatePane()};h.prototype._setListeners=function(){var a=this,b=this.s.rowData,c;this.s.dtPane.off("select.dtsp");this.s.dtPane.on("select.dtsp",function(){clearTimeout(c);a.s.dt.page.info().serverSide&&!a.s.updating?a.s.serverSelecting||(a.s.serverSelect=a.s.dtPane.rows({selected:!0}).data().toArray(),a.s.scrollTop=l(a.s.dtPane.table().node()).parent()[0].scrollTop, a.s.selectPresent=!0,a.s.dt.draw(!1)):a.s.updating||(a.s.selectPresent=!0,a._makeSelection(),a.s.selectPresent=!1);a.dom.clear.removeClass(a.classes.disabledButton).removeAttr("disabled")});this.s.dtPane.off("deselect.dtsp");this.s.dtPane.on("deselect.dtsp",function(){c=setTimeout(function(){a.s.scrollTop=l(a.s.dtPane.table().node()).parent()[0].scrollTop;a.s.dt.page.info().serverSide&&!a.s.updating?a.s.serverSelecting||(a.s.serverSelect=a.s.dtPane.rows({selected:!0}).data().toArray(),a.s.deselect= !0,a.s.dt.draw(!1)):(a.s.deselect=!0,a._makeSelection(),a.s.deselect=!1);0===a.s.dtPane.rows({selected:!0}).data().toArray().length&&a.dom.clear.addClass(a.classes.disabledButton).attr("disabled","true")},50)});this.s.firstSet&&(this.s.firstSet=!1,this.s.dt.on("stateSaveParams.dtsp",function(e,d,f){if(l.isEmptyObject(f))a.s.dtPane.state.clear();else{e=[];if(void 0!==a.s.dtPane){e=a.s.dtPane.rows({selected:!0}).data().map(function(z){return z.filter.toString()}).toArray();var g=a.dom.searchBox.val(); var k=a.s.dtPane.order();var p=b.binsOriginal;var m=b.arrayOriginal;var x=a.dom.collapseButton.hasClass(a.classes.rotated)}void 0===f.searchPanes&&(f.searchPanes={});void 0===f.searchPanes.panes&&(f.searchPanes.panes=[]);for(d=0;dthis.c.threshold:b>p.threshold)||!0!==p.show&&1>=u)){this.dom.container.addClass(this.classes.hidden);this.s.displayed=!1;return}this.c.viewTotal&&0===m.arrayTotals.length?(this.s.rowData.totalOptions=0,this._detailsPane()):m.binsTotal=m.bins;this.dom.container.addClass(this.classes.show);this.s.displayed=!0}else if(null!==c&&null!==c.searchPanes&&null!==c.searchPanes.options){if(void 0!==c.tableLength)this.s.tableLength=c.tableLength,this.s.rowData.totalOptions= this.s.tableLength;else if(null===this.s.tableLength||g.rows()[0].length>this.s.tableLength)this.s.tableLength=g.rows()[0].length,this.s.rowData.totalOptions=this.s.tableLength;b=g.column(this.s.index).dataSrc();if(void 0!==c.searchPanes.options[b])for(u=0,b=c.searchPanes.options[b];uthis.c.threshold:b>p.threshold)||!0!==p.show&&1>=u)){this.dom.container.addClass(this.classes.hidden);this.s.displayed=!1;return}this.s.rowData.arrayOriginal=this.s.rowData.arrayFilter;this.s.rowData.binsOriginal=this.s.rowData.bins;this.s.displayed=!0}}else this.s.displayed=!0;this._displayPane();if(!this.s.listSet)this.dom.dtP.on("stateLoadParams.dt", function(C,G,D){l.isEmptyObject(g.state.loaded())&&l.each(D,function(E,I){delete D[E]})});null!==d&&0'+E+"";f.c.viewCount&&p.viewCount||(D="");return"filter"===G?"string"===typeof C&&null!==C.match(/<[^>]*>/)?C.replace(/<[^>]*>/g,""):C:'
]*>/)?C.replace(/<[^>]*>/g,""):C)+'" class="'+f.classes.name+'">'+C+""+D+"
"},targets:0,type:void 0!==g.settings()[0].aoColumns[this.s.index]?g.settings()[0].aoColumns[this.s.index]._sManualType:null},{className:"dtsp-countColumn "+this.classes.badgePill,data:"shown",orderData:[1,2],searchable:!1,targets:1,visible:!1},{data:"total",searchable:!1,targets:2,visible:!1}],deferRender:!0,dom:"t",info:!1,language:this.s.dt.settings()[0].oLanguage,paging:d? !0:!1,scrollX:!1,scrollY:"200px",scroller:d?!0:!1,select:!0,stateSave:g.settings()[0].oFeatures.bStateSave?!0:!1},this.c.dtOpts,void 0!==p?p.dtOpts:{},void 0===this.s.colOpts.options&&this.colExists?void 0:{createdRow:function(C,G,D){l(C).addClass(G.className)}},null!==this.customPaneSettings&&void 0!==this.customPaneSettings.dtOpts?this.customPaneSettings.dtOpts:{},l.fn.dataTable.versionCheck("2")?{layout:{bottomLeft:null,bottomRight:null,topLeft:null,topRight:null}}:{}));this.dom.dtP.addClass(this.classes.table); d="Custom Pane";this.customPaneSettings&&this.customPaneSettings.header?d=this.customPaneSettings.header:p.header?d=p.header:this.colExists&&(d=l.fn.dataTable.versionCheck("2")?g.column(this.s.index).title():g.settings()[0].aoColumns[this.s.index].sTitle);this.dom.searchBox.attr("placeholder",d);l.fn.dataTable.select.init(this.s.dtPane);l.fn.dataTable.ext.errMode=u;if(this.colExists){k=(k=k.search())?k.substr(1,k.length-2).split("|"):[];var B=0;m.arrayFilter.forEach(function(C){""===C.filter&&B++}); u=0;for(d=m.arrayFilter.length;u]*>/g,""));this.s.rowData.filterMap.set(a,f);e[f]?e[f]++:(e[f]=1,this._addOption(f,c.oApi._fnGetCellData(c,a,this.s.index,d.orthogonal.display),c.oApi._fnGetCellData(c,a,this.s.index,d.orthogonal.sort), c.oApi._fnGetCellData(c,a,this.s.index,d.orthogonal.type),b,e));this.s.rowData.totalOptions++}};h.prototype._reloadSelect=function(a){if(void 0!==a){for(var b,c=0;c").replace(/"/g,'"'));if(Array.isArray(a)){if(a.includes(g.filter))return!0}else if("function"===typeof g.filter)if(g.filter.call(e,e.row(b).data(),b)){if("or"===c.combiner)return!0}else{if("and"=== c.combiner)return!1}else if(a===g.filter||("string"!==typeof a||0!==a.length)&&a==g.filter||null===g.filter&&"string"===typeof a&&""===a)return!0}return"and"===c.combiner?!0:!1};h.prototype._searchContSetup=function(){this.c.controls&&this.s.colOpts.controls&&this.dom.searchButton.appendTo(this.dom.searchLabelCont);!1===this.c.dtOpts.searching||!1===this.s.colOpts.dtOpts.searching||null!==this.customPaneSettings&&void 0!==this.customPaneSettings.dtOpts&&void 0!==this.customPaneSettings.dtOpts.searching&& !this.customPaneSettings.dtOpts.searching||this.dom.searchLabelCont.appendTo(this.dom.searchCont)};h.prototype._searchExtras=function(){var a=this.s.updating;this.s.updating=!0;var b=this.s.dtPane.rows({selected:!0}).data().pluck("filter").toArray(),c=b.indexOf(this.emptyMessage()),e=l(this.s.dtPane.table().container());-1No data"},initCollapsed:!1,layout:"auto",name:void 0,orderable:!0,orthogonal:{display:"display",filter:"filter",hideCount:!1,search:"filter",show:void 0,sort:"sort",threshold:.6,type:"type",viewCount:!0},preSelect:[],threshold:.6,viewCount:!0,viewTotal:!1};return h}(),v,A,F=function(){function h(a,b,c){var e=this;void 0===c&&(c=!1);this.regenerating= !1;if(!A||!A.versionCheck||!A.versionCheck("1.10.0"))throw Error("SearchPane requires DataTables 1.10 or newer");if(!A.select)throw Error("SearchPane requires Select");var d=new A.Api(a);this.classes=v.extend(!0,{},h.classes);this.c=v.extend(!0,{},h.defaults,b);this.dom={clearAll:v('').addClass(this.classes.clearAll),collapseAll:v('').addClass(this.classes.collapseAll),container:v("
").addClass(this.classes.panes).text(d.i18n("searchPanes.loadMessage", this.c.i18n.loadMessage)),emptyMessage:v("
").addClass(this.classes.emptyMessage),options:v("
").addClass(this.classes.container),panes:v("
").addClass(this.classes.container),showAll:v('').addClass(this.classes.showAll).addClass(this.classes.disabledButton).attr("disabled","true"),title:v("
").addClass(this.classes.title),titleRow:v("
").addClass(this.classes.titleRow),wrapper:v("
")};this.s={colOpts:[],dt:d,filterCount:0,filterPane:-1, page:0,paging:!1,panes:[],selectionList:[],serverData:{},stateRead:!1,updating:!1};if(void 0===d.settings()[0]._searchPanes){this._getState();if(this.s.dt.page.info().serverSide)d.on("preXhr.dt",function(f,g,k){void 0===k.searchPanes&&(k.searchPanes={});void 0===k.searchPanes_null&&(k.searchPanes_null={});f=0;for(g=e.s.selectionList;fc&&(a=b,c=d);e= 0!==c?e.slice(e.length-c,e.length):[];b=0;for(d=this.s.panes;bNo data",emptyPanes:"No SearchPanes",loadMessage:"Loading Search Panes...",showMessage:"Show All",title:"Filters Active - %d"},layout:"auto",order:[],panes:[],viewTotal:!1}; return h}();(function(h){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return h(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);b&&b.fn.dataTable||(b=require("datatables.net")(a,b).$);return h(b,a,a.document)}:h(window.jQuery,window,document)})(function(h,a,b){function c(d,f,g){void 0===f&&(f=null);void 0===g&&(g=!1);d=new e.Api(d);f=f?f:d.init().searchPanes||e.defaults.searchPanes;return(new F(d,f,g)).getNode()}n(h); q(h);var e=h.fn.dataTable;h.fn.dataTable.SearchPanes=F;h.fn.DataTable.SearchPanes=F;h.fn.dataTable.SearchPane=t;h.fn.DataTable.SearchPane=t;a=h.fn.dataTable.Api.register;a("searchPanes()",function(){return this});a("searchPanes.clearSelections()",function(){return this.iterator("table",function(d){d._searchPanes&&d._searchPanes.clearSelections()})});a("searchPanes.rebuildPane()",function(d,f){return this.iterator("table",function(g){g._searchPanes&&g._searchPanes.rebuild(d,f)})});a("searchPanes.resizePanes()", function(){var d=this.context[0];return d._searchPanes?d._searchPanes.resizePanes():null});a("searchPanes.container()",function(){var d=this.context[0];return d._searchPanes?d._searchPanes.getNode():null});h.fn.dataTable.ext.buttons.searchPanesClear={action:function(d,f,g,k){f.searchPanes.clearSelections()},text:"Clear Panes"};h.fn.dataTable.ext.buttons.searchPanes={action:function(d,f,g,k){d.stopPropagation();this.popover(k._panes.getNode(),{align:"dt-container"});k._panes.rebuild(void 0,!0)},config:{}, init:function(d,f,g){var k=new h.fn.dataTable.SearchPanes(d,h.extend({filterChanged:function(m){d.button(f).text(d.i18n("searchPanes.collapse",void 0!==d.context[0].oLanguage.searchPanes?d.context[0].oLanguage.searchPanes.collapse:d.context[0]._searchPanes.c.i18n.collapse,m))}},g.config)),p=d.i18n("searchPanes.collapse",k.c.i18n.collapse,0);d.button(f).text(p);g._panes=k},text:"Search Panes"};h(b).on("preInit.dt.dtsp",function(d,f,g){"dt"===d.namespace&&(f.oInit.searchPanes||e.defaults.searchPanes)&& (f._searchPanes||c(f,null,!0))});e.ext.feature.push({cFeature:"P",fnInit:c});e.ext.features&&e.ext.features.register("searchPanes",c)})})();