1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00
invoiceninja/public/js/tablesorter.min.js
2020-03-29 09:39:57 +03:00

7 lines
142 KiB
JavaScript
Raw Blame History

!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&"object"==typeof module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){return function(t){"use strict";var r=t.tablesorter={version:"2.28.4",parsers:[],widgets:[],defaults:{theme:"default",widthFixed:!1,showProcessing:!1,headerTemplate:"{content}",onRenderTemplate:null,onRenderHeader:null,cancelSelection:!0,tabIndex:!0,dateFormat:"mmddyyyy",sortMultiSortKey:"shiftKey",sortResetKey:"ctrlKey",usNumberFormat:!0,delayInit:!1,serverSideSorting:!1,resort:!0,headers:{},ignoreCase:!0,sortForce:null,sortList:[],sortAppend:null,sortStable:!1,sortInitialOrder:"asc",sortLocaleCompare:!1,sortReset:!1,sortRestart:!1,emptyTo:"bottom",stringTo:"max",duplicateSpan:!0,textExtraction:"basic",textAttribute:"data-text",textSorter:null,numberSorter:null,initWidgets:!0,widgetClass:"widget-{name}",widgets:[],widgetOptions:{zebra:["even","odd"]},initialized:null,tableClass:"",cssAsc:"",cssDesc:"",cssNone:"",cssHeader:"",cssHeaderRow:"",cssProcessing:"",cssChildRow:"tablesorter-childRow",cssInfoBlock:"tablesorter-infoOnly",cssNoSort:"tablesorter-noSort",cssIgnoreRow:"tablesorter-ignoreRow",cssIcon:"tablesorter-icon",cssIconNone:"",cssIconAsc:"",cssIconDesc:"",pointerClick:"click",pointerDown:"mousedown",pointerUp:"mouseup",selectorHeaders:"> thead th, > thead td",selectorSort:"th, td",selectorRemove:".remove-me",debug:!1,headerList:[],empties:{},strings:{},parsers:[],globalize:0,imgAttr:0},css:{table:"tablesorter",cssHasChild:"tablesorter-hasChildRow",childRow:"tablesorter-childRow",colgroup:"tablesorter-colgroup",header:"tablesorter-header",headerRow:"tablesorter-headerRow",headerIn:"tablesorter-header-inner",icon:"tablesorter-icon",processing:"tablesorter-processing",sortAsc:"tablesorter-headerAsc",sortDesc:"tablesorter-headerDesc",sortNone:"tablesorter-headerUnSorted"},language:{sortAsc:"Ascending sort applied, ",sortDesc:"Descending sort applied, ",sortNone:"No sort applied, ",sortDisabled:"sorting is disabled",nextAsc:"activate to apply an ascending sort",nextDesc:"activate to apply a descending sort",nextNone:"activate to remove the sort"},regex:{templateContent:/\{content\}/g,templateIcon:/\{icon\}/g,templateName:/\{name\}/i,spaces:/\s+/g,nonWord:/\W/g,formElements:/(input|select|button|textarea)/i,chunk:/(^([+\-]?(?:\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,chunks:/(^\\0|\\0$)/,hex:/^0x[0-9a-f]+$/i,comma:/,/g,digitNonUS:/[\s|\.]/g,digitNegativeTest:/^\s*\([.\d]+\)/,digitNegativeReplace:/^\s*\(([.\d]+)\)/,digitTest:/^[\-+(]?\d+[)]?$/,digitReplace:/[,.'"\s]/g},string:{max:1,min:-1,emptymin:1,emptymax:-1,zero:0,none:0,"null":0,top:!0,bottom:!1},keyCodes:{enter:13},dates:{},instanceMethods:{},setup:function(e,a){if(!e||!e.tHead||0===e.tBodies.length||e.hasInitialized===!0)return void(a.debug&&(e.hasInitialized?console.warn("Stopping initialization. Tablesorter has already been initialized"):console.error("Stopping initialization! No table, thead or tbody",e)));var i="",s=t(e),o=t.metadata;e.hasInitialized=!1,e.isProcessing=!0,e.config=a,t.data(e,"tablesorter",a),a.debug&&(console[console.group?"group":"log"]("Initializing tablesorter v"+r.version),t.data(e,"startoveralltimer",new Date)),a.supportsDataObject=function(e){return e[0]=parseInt(e[0],10),e[0]>1||1===e[0]&&parseInt(e[1],10)>=4}(t.fn.jquery.split(".")),a.emptyTo=a.emptyTo.toLowerCase(),a.stringTo=a.stringTo.toLowerCase(),a.last={sortList:[],clickedIndex:-1},/tablesorter\-/.test(s.attr("class"))||(i=""!==a.theme?" tablesorter-"+a.theme:""),a.table=e,a.$table=s.addClass(r.css.table+" "+a.tableClass+i).attr("role","grid"),a.$headers=s.find(a.selectorHeaders),a.namespace?a.namespace="."+a.namespace.replace(r.regex.nonWord,""):a.namespace=".tablesorter"+Math.random().toString(16).slice(2),a.$table.children().children("tr").attr("role","row"),a.$tbodies=s.children("tbody:not(."+a.cssInfoBlock+")").attr({"aria-live":"polite","aria-relevant":"all"}),a.$table.children("caption").length&&(i=a.$table.children("caption")[0],i.id||(i.id=a.namespace.slice(1)+"caption"),a.$table.attr("aria-labelledby",i.id)),a.widgetInit={},a.textExtraction=a.$table.attr("data-text-extraction")||a.textExtraction||"basic",r.buildHeaders(a),r.fixColumnWidth(e),r.addWidgetFromClass(e),r.applyWidgetOptions(e),r.setupParsers(a),a.totalRows=0,r.validateOptions(a),a.delayInit||r.buildCache(a),r.bindEvents(e,a.$headers,!0),r.bindMethods(a),a.supportsDataObject&&"undefined"!=typeof s.data().sortlist?a.sortList=s.data().sortlist:o&&s.metadata()&&s.metadata().sortlist&&(a.sortList=s.metadata().sortlist),r.applyWidget(e,!0),a.sortList.length>0?r.sortOn(a,a.sortList,{},!a.initWidgets):(r.setHeadersCss(a),a.initWidgets&&r.applyWidget(e,!1)),a.showProcessing&&s.unbind("sortBegin"+a.namespace+" sortEnd"+a.namespace).bind("sortBegin"+a.namespace+" sortEnd"+a.namespace,function(t){clearTimeout(a.timerProcessing),r.isProcessing(e),"sortBegin"===t.type&&(a.timerProcessing=setTimeout(function(){r.isProcessing(e,!0)},500))}),e.hasInitialized=!0,e.isProcessing=!1,a.debug&&(console.log("Overall initialization time:"+r.benchmark(t.data(e,"startoveralltimer"))),a.debug&&console.groupEnd&&console.groupEnd()),s.triggerHandler("tablesorter-initialized",e),"function"==typeof a.initialized&&a.initialized(e)},bindMethods:function(e){var a=e.$table,i=e.namespace,s="sortReset update updateRows updateAll updateHeaders addRows updateCell updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave ".split(" ").join(i+" ");a.unbind(s.replace(r.regex.spaces," ")).bind("sortReset"+i,function(e,t){e.stopPropagation(),r.sortReset(this.config,t)}).bind("updateAll"+i,function(e,t,a){e.stopPropagation(),r.updateAll(this.config,t,a)}).bind("update"+i+" updateRows"+i,function(e,t,a){e.stopPropagation(),r.update(this.config,t,a)}).bind("updateHeaders"+i,function(e,t){e.stopPropagation(),r.updateHeaders(this.config,t)}).bind("updateCell"+i,function(e,t,a,i){e.stopPropagation(),r.updateCell(this.config,t,a,i)}).bind("addRows"+i,function(e,t,a,i){e.stopPropagation(),r.addRows(this.config,t,a,i)}).bind("updateComplete"+i,function(){this.isUpdating=!1}).bind("sorton"+i,function(e,t,a,i){e.stopPropagation(),r.sortOn(this.config,t,a,i)}).bind("appendCache"+i,function(e,a,i){e.stopPropagation(),r.appendCache(this.config,i),t.isFunction(a)&&a(this)}).bind("updateCache"+i,function(e,t,a){e.stopPropagation(),r.updateCache(this.config,t,a)}).bind("applyWidgetId"+i,function(e,t){e.stopPropagation(),r.applyWidgetId(this,t)}).bind("applyWidgets"+i,function(e,t){e.stopPropagation(),r.applyWidget(this,t)}).bind("refreshWidgets"+i,function(e,t,a){e.stopPropagation(),r.refreshWidgets(this,t,a)}).bind("removeWidget"+i,function(e,t,a){e.stopPropagation(),r.removeWidget(this,t,a)}).bind("destroy"+i,function(e,t,a){e.stopPropagation(),r.destroy(this,t,a)}).bind("resetToLoadState"+i,function(a){a.stopPropagation(),r.removeWidget(this,!0,!1);var i=t.extend(!0,{},e.originalSettings);e=t.extend(!0,r.defaults,i),e.originalSettings=i,this.hasInitialized=!1,r.setup(this,e)})},bindEvents:function(e,a,i){e=t(e)[0];var s,o=e.config,l=o.namespace,n=null;i!==!0&&(a.addClass(l.slice(1)+"_extra_headers"),s=t.fn.closest?a.closest("table")[0]:a.parents("table")[0],s&&"TABLE"===s.nodeName&&s!==e&&t(s).addClass(l.slice(1)+"_extra_table")),s=(o.pointerDown+" "+o.pointerUp+" "+o.pointerClick+" sort keyup ").replace(r.regex.spaces," ").split(" ").join(l+" "),a.find(o.selectorSort).add(a.filter(o.selectorSort)).unbind(s).bind(s,function(e,i){var s,l,c,d=t(e.target),u=" "+e.type+" ";if(!(1!==(e.which||e.button)&&!u.match(" "+o.pointerClick+" | sort | keyup ")||" keyup "===u&&e.which!==r.keyCodes.enter||u.match(" "+o.pointerClick+" ")&&"undefined"!=typeof e.which||u.match(" "+o.pointerUp+" ")&&n!==e.target&&i!==!0)){if(u.match(" "+o.pointerDown+" "))return n=e.target,c=d.jquery.split("."),void("1"===c[0]&&c[1]<4&&e.preventDefault());if(n=null,r.regex.formElements.test(e.target.nodeName)||d.hasClass(o.cssNoSort)||d.parents("."+o.cssNoSort).length>0||d.parents("button").length>0)return!o.cancelSelection;o.delayInit&&r.isEmptyObject(o.cache)&&r.buildCache(o),s=t.fn.closest?t(this).closest("th, td"):/TH|TD/.test(this.nodeName)?t(this):t(this).parents("th, td"),c=a.index(s),o.last.clickedIndex=c<0?s.attr("data-column"):c,l=o.$headers[o.last.clickedIndex],l&&!l.sortDisabled&&r.initSort(o,l,e)}}),o.cancelSelection&&a.attr("unselectable","on").bind("selectstart",!1).css({"user-select":"none",MozUserSelect:"none"})},buildHeaders:function(e){var a,i,s,o;for(e.headerList=[],e.headerContent=[],e.sortVars=[],e.debug&&(s=new Date),e.columns=r.computeColumnIndex(e.$table.children("thead, tfoot").children("tr")),i=e.cssIcon?'<i class="'+(e.cssIcon===r.css.icon?r.css.icon:e.cssIcon+" "+r.css.icon)+'"></i>':"",e.$headers=t(t.map(e.$table.find(e.selectorHeaders),function(a,s){var o,l,n,c,d,u=t(a);if(!u.parent().hasClass(e.cssIgnoreRow))return o=r.getColumnData(e.table,e.headers,s,!0),e.headerContent[s]=u.html(),""===e.headerTemplate||u.find("."+r.css.headerIn).length||(c=e.headerTemplate.replace(r.regex.templateContent,u.html()).replace(r.regex.templateIcon,u.find("."+r.css.icon).length?"":i),e.onRenderTemplate&&(l=e.onRenderTemplate.apply(u,[s,c]),l&&"string"==typeof l&&(c=l)),u.html('<div class="'+r.css.headerIn+'">'+c+"</div>")),e.onRenderHeader&&e.onRenderHeader.apply(u,[s,e,e.$table]),n=parseInt(u.attr("data-column"),10),a.column=n,d=r.getOrder(r.getData(u,o,"sortInitialOrder")||e.sortInitialOrder),e.sortVars[n]={count:-1,order:d?e.sortReset?[1,0,2]:[1,0]:e.sortReset?[0,1,2]:[0,1],lockedOrder:!1},d=r.getData(u,o,"lockedOrder")||!1,"undefined"!=typeof d&&d!==!1&&(e.sortVars[n].lockedOrder=!0,e.sortVars[n].order=r.getOrder(d)?[1,1]:[0,0]),e.headerList[s]=a,u.addClass(r.css.header+" "+e.cssHeader).parent().addClass(r.css.headerRow+" "+e.cssHeaderRow).attr("role","row"),e.tabIndex&&u.attr("tabindex",0),a})),e.$headerIndexed=[],o=0;o<e.columns;o++)r.isEmptyObject(e.sortVars[o])&&(e.sortVars[o]={}),a=e.$headers.filter('[data-column="'+o+'"]'),e.$headerIndexed[o]=a.length?a.not(".sorter-false").length?a.not(".sorter-false").filter(":last"):a.filter(":last"):t();e.$table.find(e.selectorHeaders).attr({scope:"col",role:"columnheader"}),r.updateHeader(e),e.debug&&(console.log("Built headers:"+r.benchmark(s)),console.log(e.$headers))},addInstanceMethods:function(e){t.extend(r.instanceMethods,e)},setupParsers:function(e,t){var a,i,s,o,l,n,c,d,u,f,p,g,h,m,b=e.table,y=0,w={};if(e.$tbodies=e.$table.children("tbody:not(."+e.cssInfoBlock+")"),h="undefined"==typeof t?e.$tbodies:t,m=h.length,0===m)return e.debug?console.warn("Warning: *Empty table!* Not building a parser cache"):"";for(e.debug&&(g=new Date,console[console.group?"group":"log"]("Detecting parsers for each column")),i={extractors:[],parsers:[]};y<m;){if(a=h[y].rows,a.length)for(l=0,o=e.columns,n=0;n<o;n++){if(c=e.$headerIndexed[l],c&&c.length&&(d=r.getColumnData(b,e.headers,l),p=r.getParserById(r.getData(c,d,"extractor")),f=r.getParserById(r.getData(c,d,"sorter")),u="false"===r.getData(c,d,"parser"),e.empties[l]=(r.getData(c,d,"empty")||e.emptyTo||(e.emptyToBottom?"bottom":"top")).toLowerCase(),e.strings[l]=(r.getData(c,d,"string")||e.stringTo||"max").toLowerCase(),u&&(f=r.getParserById("no-parser")),p||(p=!1),f||(f=r.detectParserForColumn(e,a,-1,l)),e.debug&&(w["("+l+") "+c.text()]={parser:f.id,extractor:p?p.id:"none",string:e.strings[l],empty:e.empties[l]}),i.parsers[l]=f,i.extractors[l]=p,s=c[0].colSpan-1,s>0))for(l+=s,o+=s;s+1>0;)i.parsers[l-s]=f,i.extractors[l-s]=p,s--;l++}y+=i.parsers.length?m:1}e.debug&&(r.isEmptyObject(w)?console.warn(" No parsers detected!"):console[console.table?"table":"log"](w),console.log("Completed detecting parsers"+r.benchmark(g)),console.groupEnd&&console.groupEnd()),e.parsers=i.parsers,e.extractors=i.extractors},addParser:function(e){var t,a=r.parsers.length,i=!0;for(t=0;t<a;t++)r.parsers[t].id.toLowerCase()===e.id.toLowerCase()&&(i=!1);i&&(r.parsers[r.parsers.length]=e)},getParserById:function(e){if("false"==e)return!1;var t,a=r.parsers.length;for(t=0;t<a;t++)if(r.parsers[t].id.toLowerCase()===e.toString().toLowerCase())return r.parsers[t];return!1},detectParserForColumn:function(e,a,i,s){for(var o,l,n,c=r.parsers.length,d=!1,u="",f=!0;""===u&&f;)i++,n=a[i],n&&i<50?n.className.indexOf(r.cssIgnoreRow)<0&&(d=a[i].cells[s],u=r.getElementText(e,d,s),l=t(d),e.debug&&console.log("Checking if value was empty on row "+i+", column: "+s+': "'+u+'"')):f=!1;for(;--c>=0;)if(o=r.parsers[c],o&&"text"!==o.id&&o.is&&o.is(u,e.table,d,l))return o;return r.getParserById("text")},getElementText:function(e,a,i){if(!a)return"";var s,o=e.textExtraction||"",l=a.jquery?a:t(a);return"string"==typeof o?"basic"===o&&"undefined"!=typeof(s=l.attr(e.textAttribute))?t.trim(s):t.trim(a.textContent||l.text()):"function"==typeof o?t.trim(o(l[0],e.table,i)):"function"==typeof(s=r.getColumnData(e.table,o,i))?t.trim(s(l[0],e.table,i)):t.trim(l[0].textContent||l.text())},getParsedText:function(e,t,a,i){"undefined"==typeof i&&(i=r.getElementText(e,t,a));var s=""+i,o=e.parsers[a],l=e.extractors[a];return o&&(l&&"function"==typeof l.format&&(i=l.format(i,e.table,t,a)),s="no-parser"===o.id?"":o.format(""+i,e.table,t,a),e.ignoreCase&&"string"==typeof s&&(s=s.toLowerCase())),s},buildCache:function(e,a,i){var s,o,l,n,c,d,u,f,p,g,h,m,b,y,w,_,v,x,C,$,S,F,R=e.table,z=e.parsers;if(e.$tbodies=e.$table.children("tbody:not(."+e.cssInfoBlock+")"),u="undefined"==typeof i?e.$tbodies:i,e.cache={},e.totalRows=0,!z)return e.debug?console.warn("Warning: *Empty table!* Not building a cache"):"";for(e.debug&&(m=new Date),e.showProcessing&&r.isProcessing(R,!0),d=0;d<u.length;d++){for(_=[],s=e.cache[d]={normalized:[]},b=u[d]&&u[d].rows.length||0,n=0;n<b;++n)if(y={child:[],raw:[]},f=t(u[d].rows[n]),p=[],!f.hasClass(e.selectorRemove.slice(1)))if(f.hasClass(e.cssChildRow)&&0!==n)for(S=s.normalized.length-1,w=s.normalized[S][e.columns],w.$row=w.$row.add(f),f.prev().hasClass(e.cssChildRow)||f.prev().addClass(r.css.cssHasChild),g=f.children("th, td"),S=w.child.length,w.child[S]=[],x=0,$=e.columns,c=0;c<$;c++)h=g[c],h&&(w.child[S][c]=r.getParsedText(e,h,c),v=g[c].colSpan-1,v>0&&(x+=v,$+=v)),x++;else{for(y.$row=f,y.order=n,x=0,$=e.columns,c=0;c<$;++c){if(h=f[0].cells[c],h&&x<e.columns&&(C="undefined"!=typeof z[x],!C&&e.debug&&console.warn("No parser found for row: "+n+", column: "+c+'; cell containing: "'+t(h).text()+'"; does it have a header?'),o=r.getElementText(e,h,x),y.raw[x]=o,l=r.getParsedText(e,h,x,o),p[x]=l,C&&"numeric"===(z[x].type||"").toLowerCase()&&(_[x]=Math.max(Math.abs(l)||0,_[x]||0)),v=h.colSpan-1,v>0)){for(F=0;F<=v;)l=e.duplicateSpan||0===F?o:"string"!=typeof e.textExtraction?r.getElementText(e,h,x+F)||"":"",y.raw[x+F]=l,p[x+F]=l,F++;x+=v,$+=v}x++}p[e.columns]=y,s.normalized[s.normalized.length]=p}s.colMax=_,e.totalRows+=s.normalized.length}if(e.showProcessing&&r.isProcessing(R),e.debug){for(S=Math.min(5,e.cache[0].normalized.length),console[console.group?"group":"log"]("Building cache for "+e.totalRows+" rows (showing "+S+" rows in log) and "+e.columns+" columns"+r.benchmark(m)),o={},c=0;c<e.columns;c++)for(x=0;x<S;x++)o["row: "+x]||(o["row: "+x]={}),o["row: "+x][e.$headerIndexed[c].text()]=e.cache[0].normalized[x][c];console[console.table?"table":"log"](o),console.groupEnd&&console.groupEnd()}t.isFunction(a)&&a(R)},getColumnText:function(e,a,i,s){e=t(e)[0];var o,l,n,c,d,u,f,p,g,h,m="function"==typeof i,b="all"===a,y={raw:[],parsed:[],$cell:[]},w=e.config;if(!r.isEmptyObject(w)){for(d=w.$tbodies.length,o=0;o<d;o++)for(n=w.cache[o].normalized,u=n.length,l=0;l<u;l++)c=n[l],s&&!c[w.columns].$row.is(s)||(h=!0,p=b?c.slice(0,w.columns):c[a],c=c[w.columns],f=b?c.raw:c.raw[a],g=b?c.$row.children():c.$row.children().eq(a),m&&(h=i({tbodyIndex:o,rowIndex:l,parsed:p,raw:f,$row:c.$row,$cell:g})),h!==!1&&(y.parsed[y.parsed.length]=p,y.raw[y.raw.length]=f,y.$cell[y.$cell.length]=g));return y}w.debug&&console.warn("No cache found - aborting getColumnText function!")},setHeadersCss:function(e){var a,i,s,o=e.sortList,l=o.length,n=r.css.sortNone+" "+e.cssNone,c=[r.css.sortAsc+" "+e.cssAsc,r.css.sortDesc+" "+e.cssDesc],d=[e.cssIconAsc,e.cssIconDesc,e.cssIconNone],u=["ascending","descending"],f=e.$table.find("tfoot tr").children("td, th").add(t(e.namespace+"_extra_headers")).removeClass(c.join(" "));for(e.$headers.add(t("thead "+e.namespace+"_extra_headers")).removeClass(c.join(" ")).addClass(n).attr("aria-sort","none").find("."+r.css.icon).removeClass(d.join(" ")).addClass(d[2]),i=0;i<l;i++)if(2!==o[i][1]&&(a=e.$headers.filter(function(t){for(var a=!0,i=e.$headers.eq(t),s=parseInt(i.attr("data-column"),10),o=s+e.$headers[t].colSpan;s<o;s++)a=!!a&&(a||r.isValueInArray(s,e.sortList)>-1);return a}),a=a.not(".sorter-false").filter('[data-column="'+o[i][0]+'"]'+(1===l?":last":"")),a.length)){for(s=0;s<a.length;s++)a[s].sortDisabled||a.eq(s).removeClass(n).addClass(c[o[i][1]]).attr("aria-sort",u[o[i][1]]).find("."+r.css.icon).removeClass(d[2]).addClass(d[o[i][1]]);f.length&&f.filter('[data-column="'+o[i][0]+'"]').removeClass(n).addClass(c[o[i][1]])}for(l=e.$headers.length,i=0;i<l;i++)r.setColumnAriaLabel(e,e.$headers.eq(i))},setColumnAriaLabel:function(e,a,i){if(a.length){var s=parseInt(a.attr("data-column"),10),o=e.sortVars[s],l=a.hasClass(r.css.sortAsc)?"sortAsc":a.hasClass(r.css.sortDesc)?"sortDesc":"sortNone",n=t.trim(a.text())+": "+r.language[l];a.hasClass("sorter-false")||i===!1?n+=r.language.sortDisabled:(l=(o.count+1)%o.order.length,i=o.order[l],n+=r.language[0===i?"nextAsc":1===i?"nextDesc":"nextNone"]),a.attr("aria-label",n)}},updateHeader:function(e){var t,a,i,s,o=e.table,l=e.$headers.length;for(t=0;t<l;t++)i=e.$headers.eq(t),s=r.getColumnData(o,e.headers,t,!0),a="false"===r.getData(i,s,"sorter")||"false"===r.getData(i,s,"parser"),r.setColumnSort(e,i,a)},setColumnSort:function(e,t,r){var a=e.table.id;t[0].sortDisabled=r,t[r?"addClass":"removeClass"]("sorter-false").attr("aria-disabled",""+r),e.tabIndex&&(r?t.removeAttr("tabindex"):t.attr("tabindex","0")),a&&(r?t.removeAttr("aria-controls"):t.attr("aria-controls",a))},updateHeaderSortCount:function(e,a){var i,s,o,l,n,c,d,u,f=a||e.sortList,p=f.length;for(e.sortList=[],l=0;l<p;l++)if(d=f[l],i=parseInt(d[0],10),i<e.columns){switch(e.sortVars[i].order||(u=r.getOrder(e.sortInitialOrder)?e.sortReset?[1,0,2]:[1,0]:e.sortReset?[0,1,2]:[0,1],e.sortVars[i].order=u,e.sortVars[i].count=0),u=e.sortVars[i].order,s=(""+d[1]).match(/^(1|d|s|o|n)/),s=s?s[0]:""){case"1":case"d":s=1;break;case"s":s=n||0;break;case"o":c=u[(n||0)%u.length],s=0===c?1:1===c?0:2;break;case"n":s=u[++e.sortVars[i].count%u.length];break;default:s=0}n=0===l?s:n,o=[i,parseInt(s,10)||0],e.sortList[e.sortList.length]=o,s=t.inArray(o[1],u),e.sortVars[i].count=s>=0?s:o[1]%u.length}},updateAll:function(e,t,a){var i=e.table;i.isUpdating=!0,r.refreshWidgets(i,!0,!0),r.buildHeaders(e),r.bindEvents(i,e.$headers,!0),r.bindMethods(e),r.commonUpdate(e,t,a)},update:function(e,t,a){var i=e.table;i.isUpdating=!0,r.updateHeader(e),r.commonUpdate(e,t,a)},updateHeaders:function(e,t){e.table.isUpdating=!0,r.buildHeaders(e),r.bindEvents(e.table,e.$headers,!0),r.resortComplete(e,t)},updateCell:function(e,a,i,s){if(r.isEmptyObject(e.cache))return r.updateHeader(e),void r.commonUpdate(e,i,s);e.table.isUpdating=!0,e.$table.find(e.selectorRemove).remove();var o,l,n,c,d,u,f=e.$tbodies,p=t(a),g=f.index(t.fn.closest?p.closest("tbody"):p.parents("tbody").filter(":first")),h=e.cache[g],m=t.fn.closest?p.closest("tr"):p.parents("tr").filter(":first");if(a=p[0],f.length&&g>=0){if(n=f.eq(g).find("tr").index(m),d=h.normalized[n],u=m[0].cells.length,u!==e.columns)for(c=0,o=!1,l=0;l<u;l++)o||m[0].cells[l]===a?o=!0:c+=m[0].cells[l].colSpan;else c=p.index();o=r.getElementText(e,a,c),d[e.columns].raw[c]=o,o=r.getParsedText(e,a,c,o),d[c]=o,d[e.columns].$row=m,"numeric"===(e.parsers[c].type||"").toLowerCase()&&(h.colMax[c]=Math.max(Math.abs(o)||0,h.colMax[c]||0)),o="undefined"!==i?i:e.resort,o!==!1?r.checkResort(e,o,s):r.resortComplete(e,s)}else e.debug&&console.error("updateCell aborted, tbody missing or not within the indicated table"),e.table.isUpdating=!1},addRows:function(a,i,s,o){var l,n,c,d,u,f,p,g,h,m,b,y,w,_="string"==typeof i&&1===a.$tbodies.length&&/<tr/.test(i||""),v=a.table;if(_)i=t(i),a.$tbodies.append(i);else if(!(i&&i instanceof e&&(t.fn.closest?i.closest("table")[0]:i.parents("table")[0])===a.table))return a.debug&&console.error("addRows method requires (1) a jQuery selector reference to rows that have already been added to the table, or (2) row HTML string to be added to a table with only one tbody"),!1;if(v.isUpdating=!0,r.isEmptyObject(a.cache))r.updateHeader(a),r.commonUpdate(a,s,o);else{for(u=i.filter("tr").attr("role","row").length,c=a.$tbodies.index(i.parents("tbody").filter(":first")),a.parsers&&a.parsers.length||r.setupParsers(a),d=0;d<u;d++){for(h=0,p=i[d].cells.length,g=a.cache[c].normalized.length,b=[],m={child:[],raw:[],$row:i.eq(d),order:g},f=0;f<p;f++)y=i[d].cells[f],l=r.getElementText(a,y,h),m.raw[h]=l,n=r.getParsedText(a,y,h,l),b[h]=n,"numeric"===(a.parsers[h].type||"").toLowerCase()&&(a.cache[c].colMax[h]=Math.max(Math.abs(n)||0,a.cache[c].colMax[h]||0)),w=y.colSpan-1,w>0&&(h+=w),h++;b[a.columns]=m,a.cache[c].normalized[g]=b}r.checkResort(a,s,o)}},updateCache:function(e,t,a){e.parsers&&e.parsers.length||r.setupParsers(e,a),r.buildCache(e,t,a)},appendCache:function(e,t){var a,i,s,o,l,n,c,d=e.table,u=e.widgetOptions,f=e.$tbodies,p=[],g=e.cache;if(r.isEmptyObject(g))return e.appender?e.appender(d,p):d.isUpdating?e.$table.triggerHandler("updateComplete",d):"";for(e.debug&&(c=new Date),n=0;n<f.length;n++)if(s=f.eq(n),s.length){for(o=r.processTbody(d,s,!0),a=g[n].normalized,i=a.length,l=0;l<i;l++)p[p.length]=a[l][e.columns].$row,e.appender&&(!e.pager||e.pager.removeRows&&u.pager_removeRows||e.pager.ajax)||o.append(a[l][e.columns].$row);r.processTbody(d,o,!1)}e.appender&&e.appender(d,p),e.debug&&console.log("Rebuilt table"+r.benchmark(c)),t||e.appender||r.applyWidget(d),d.isUpdating&&e.$table.triggerHandler("updateComplete",d)},commonUpdate:function(e,t,a){e.$table.find(e.selectorRemove).remove(),r.setupParsers(e),r.buildCache(e),r.checkResort(e,t,a)},initSort:function(e,a,i){if(e.table.isUpdating)return setTimeout(function(){r.initSort(e,a,i)},50);var s,o,l,n,c,d,u,f=!i[e.sortMultiSortKey],p=e.table,g=e.$headers.length,h=parseInt(t(a).attr("data-column"),10),m=e.sortVars[h].order;if(e.$table.triggerHandler("sortStart",p),d=(e.sortVars[h].count+1)%m.length,e.sortVars[h].count=i[e.sortResetKey]?2:d,e.sortRestart)for(l=0;l<g;l++)u=e.$headers.eq(l),d=parseInt(u.attr("data-column"),10),h!==d&&(f||u.hasClass(r.css.sortNone))&&(e.sortVars[d].count=-1);if(f){if(e.sortList=[],e.last.sortList=[],null!==e.sortForce)for(s=e.sortForce,o=0;o<s.length;o++)s[o][0]!==h&&(e.sortList[e.sortList.length]=s[o]);if(n=m[e.sortVars[h].count],n<2&&(e.sortList[e.sortList.length]=[h,n],a.colSpan>1))for(o=1;o<a.colSpan;o++)e.sortList[e.sortList.length]=[h+o,n],e.sortVars[h+o].count=t.inArray(n,m)}else if(e.sortList=t.extend([],e.last.sortList),r.isValueInArray(h,e.sortList)>=0)for(o=0;o<e.sortList.length;o++)d=e.sortList[o],d[0]===h&&(d[1]=m[e.sortVars[h].count],2===d[1]&&(e.sortList.splice(o,1),e.sortVars[h].count=-1));else if(n=m[e.sortVars[h].count],n<2&&(e.sortList[e.sortList.length]=[h,n],a.colSpan>1))for(o=1;o<a.colSpan;o++)e.sortList[e.sortList.length]=[h+o,n],e.sortVars[h+o].count=t.inArray(n,m);if(e.last.sortList=t.extend([],e.sortList),e.sortList.length&&e.sortAppend&&(s=t.isArray(e.sortAppend)?e.sortAppend:e.sortAppend[e.sortList[0][0]],!r.isEmptyObject(s)))for(o=0;o<s.length;o++)if(s[o][0]!==h&&r.isValueInArray(s[o][0],e.sortList)<0){if(n=s[o][1],c=(""+n).match(/^(a|d|s|o|n)/))switch(d=e.sortList[0][1],c[0]){case"d":n=1;break;case"s":n=d;break;case"o":n=0===d?1:0;break;case"n":n=(d+1)%m.length;break;default:n=0}e.sortList[e.sortList.length]=[s[o][0],n]}e.$table.triggerHandler("sortBegin",p),setTimeout(function(){r.setHeadersCss(e),r.multisort(e),r.appendCache(e),e.$table.triggerHandler("sortBeforeEnd",p),e.$table.triggerHandler("sortEnd",p)},1)},multisort:function(e){var t,a,i,s,o,l=e.table,n=[],c=0,d=e.textSorter||"",u=e.sortList,f=u.length,p=e.$tbodies.length;if(!e.serverSideSorting&&!r.isEmptyObject(e.cache)){if(e.debug&&(a=new Date),"object"==typeof d)for(i=e.columns;i--;)o=r.getColumnData(l,d,i),"function"==typeof o&&(n[i]=o);for(t=0;t<p;t++)i=e.cache[t].colMax,s=e.cache[t].normalized,s.sort(function(t,a){var s,o,p,g,h,m,b;for(s=0;s<f;s++){if(p=u[s][0],g=u[s][1],c=0===g,e.sortStable&&t[p]===a[p]&&1===f)return t[e.columns].order-a[e.columns].order;if(o=/n/i.test(r.getSortType(e.parsers,p)),o&&e.strings[p]?(o="boolean"==typeof r.string[e.strings[p]]?(c?1:-1)*(r.string[e.strings[p]]?-1:1):e.strings[p]?r.string[e.strings[p]]||0:0,h=e.numberSorter?e.numberSorter(t[p],a[p],c,i[p],l):r["sortNumeric"+(c?"Asc":"Desc")](t[p],a[p],o,i[p],p,e)):(m=c?t:a,b=c?a:t,h="function"==typeof d?d(m[p],b[p],c,p,l):"function"==typeof n[p]?n[p](m[p],b[p],c,p,l):r["sortNatural"+(c?"Asc":"Desc")](t[p],a[p],p,e)),h)return h}return t[e.columns].order-a[e.columns].order});e.debug&&console.log("Applying sort "+u.toString()+r.benchmark(a))}},resortComplete:function(e,r){e.table.isUpdating&&e.$table.triggerHandler("updateComplete",e.table),t.isFunction(r)&&r(e.table)},checkResort:function(e,a,i){var s=t.isArray(a)?a:e.sortList,o="undefined"==typeof a?e.resort:a;o===!1||e.serverSideSorting||e.table.isProcessing?(r.resortComplete(e,i),r.applyWidget(e.table,!1)):s.length?r.sortOn(e,s,function(){r.resortComplete(e,i)},!0):r.sortReset(e,function(){r.resortComplete(e,i),r.applyWidget(e.table,!1)})},sortOn:function(e,a,i,s){var o=e.table;e.$table.triggerHandler("sortStart",o),r.updateHeaderSortCount(e,a),r.setHeadersCss(e),e.delayInit&&r.isEmptyObject(e.cache)&&r.buildCache(e),e.$table.triggerHandler("sortBegin",o),r.multisort(e),r.appendCache(e,s),e.$table.triggerHandler("sortBeforeEnd",o),e.$table.triggerHandler("sortEnd",o),r.applyWidget(o),t.isFunction(i)&&i(o)},sortReset:function(e,a){e.sortList=[],r.setHeadersCss(e),r.multisort(e),r.appendCache(e),t.isFunction(a)&&a(e.table)},getSortType:function(e,t){return e&&e[t]?e[t].type||"":""},getOrder:function(e){return/^d/i.test(e)||1===e},sortNatural:function(e,t){if(e===t)return 0;var a,i,s,o,l,n,c=r.regex;if(c.hex.test(t)){if(a=parseInt((e||"").match(c.hex),16),i=parseInt((t||"").match(c.hex),16),a<i)return-1;if(a>i)return 1}for(a=(e||"").replace(c.chunk,"\\0$1\\0").replace(c.chunks,"").split("\\0"),i=(t||"").replace(c.chunk,"\\0$1\\0").replace(c.chunks,"").split("\\0"),n=Math.max(a.length,i.length),l=0;l<n;l++){if(s=isNaN(a[l])?a[l]||0:parseFloat(a[l])||0,o=isNaN(i[l])?i[l]||0:parseFloat(i[l])||0,isNaN(s)!==isNaN(o))return isNaN(s)?1:-1;if(typeof s!=typeof o&&(s+="",o+=""),s<o)return-1;if(s>o)return 1}return 0},sortNaturalAsc:function(e,t,a,i){if(e===t)return 0;var s=r.string[i.empties[a]||i.emptyTo];return""===e&&0!==s?"boolean"==typeof s?s?-1:1:-s||-1:""===t&&0!==s?"boolean"==typeof s?s?1:-1:s||1:r.sortNatural(e,t)},sortNaturalDesc:function(e,t,a,i){if(e===t)return 0;var s=r.string[i.empties[a]||i.emptyTo];return""===e&&0!==s?"boolean"==typeof s?s?-1:1:s||1:""===t&&0!==s?"boolean"==typeof s?s?1:-1:-s||-1:r.sortNatural(t,e)},sortText:function(e,t){return e>t?1:e<t?-1:0},getTextValue:function(e,t,r){if(r){var a,i=e?e.length:0,s=r+t;for(a=0;a<i;a++)s+=e.charCodeAt(a);return t*s}return 0},sortNumericAsc:function(e,t,a,i,s,o){if(e===t)return 0;var l=r.string[o.empties[s]||o.emptyTo];return""===e&&0!==l?"boolean"==typeof l?l?-1:1:-l||-1:""===t&&0!==l?"boolean"==typeof l?l?1:-1:l||1:(isNaN(e)&&(e=r.getTextValue(e,a,i)),isNaN(t)&&(t=r.getTextValue(t,a,i)),e-t)},sortNumericDesc:function(e,t,a,i,s,o){if(e===t)return 0;var l=r.string[o.empties[s]||o.emptyTo];return""===e&&0!==l?"boolean"==typeof l?l?-1:1:l||1:""===t&&0!==l?"boolean"==typeof l?l?1:-1:-l||-1:(isNaN(e)&&(e=r.getTextValue(e,a,i)),isNaN(t)&&(t=r.getTextValue(t,a,i)),t-e)},sortNumeric:function(e,t){return e-t},addWidget:function(e){e.id&&!r.isEmptyObject(r.getWidgetById(e.id))&&console.warn('"'+e.id+'" widget was loaded more than once!'),r.widgets[r.widgets.length]=e},hasWidget:function(e,r){return e=t(e),e.length&&e[0].config&&e[0].config.widgetInit[r]||!1},getWidgetById:function(e){var t,a,i=r.widgets.length;for(t=0;t<i;t++)if(a=r.widgets[t],a&&a.id&&a.id.toLowerCase()===e.toLowerCase())return a},applyWidgetOptions:function(e){var a,i,s=e.config,o=s.widgets.length;if(o)for(a=0;a<o;a++)i=r.getWidgetById(s.widgets[a]),i&&i.options&&(s.widgetOptions=t.extend(!0,{},i.options,s.widgetOptions),t.extend(!0,r.defaults.widgetOptions,i.options))},addWidgetFromClass:function(e){var t,a,i=e.config,s="^"+i.widgetClass.replace(r.regex.templateName,"(\\S+)+")+"$",o=new RegExp(s,"g"),l=(e.className||"").split(r.regex.spaces);if(l.length)for(t=l.length,a=0;a<t;a++)l[a].match(o)&&(i.widgets[i.widgets.length]=l[a].replace(o,"$1"))},applyWidgetId:function(e,a,i){e=t(e)[0];var s,o,l,n=e.config,c=n.widgetOptions,d=r.getWidgetById(a);d&&(l=d.id,s=!1,t.inArray(l,n.widgets)<0&&(n.widgets[n.widgets.length]=l),n.debug&&(o=new Date),!i&&n.widgetInit[l]||(n.widgetInit[l]=!0,e.hasInitialized&&r.applyWidgetOptions(e),"function"==typeof d.init&&(s=!0,n.debug&&console[console.group?"group":"log"]("Initializing "+l+" widget"),d.init(e,d,n,c))),i||"function"!=typeof d.format||(s=!0,n.debug&&console[console.group?"group":"log"]("Updating "+l+" widget"),d.format(e,n,c,!1)),n.debug&&s&&(console.log("Completed "+(i?"initializing ":"applying ")+l+" widget"+r.benchmark(o)),console.groupEnd&&console.groupEnd()))},applyWidget:function(e,a,i){e=t(e)[0];var s,o,l,n,c,d=e.config,u=[];if(a===!1||!e.hasInitialized||!e.isApplyingWidgets&&!e.isUpdating){if(d.debug&&(c=new Date),r.addWidgetFromClass(e),clearTimeout(d.timerReady),d.widgets.length){for(e.isApplyingWidgets=!0,d.widgets=t.grep(d.widgets,function(e,r){return t.inArray(e,d.widgets)===r}),l=d.widgets||[],o=l.length,s=0;s<o;s++)n=r.getWidgetById(l[s]),n&&n.id?(n.priority||(n.priority=10),u[s]=n):d.debug&&console.warn('"'+l[s]+'" widget code does not exist!');for(u.sort(function(e,t){return e.priority<t.priority?-1:e.priority===t.priority?0:1}),o=u.length,d.debug&&console[console.group?"group":"log"]("Start "+(a?"initializing":"applying")+" widgets"),s=0;s<o;s++)n=u[s],n&&n.id&&r.applyWidgetId(e,n.id,a);d.debug&&console.groupEnd&&console.groupEnd(),a||"function"!=typeof i||i(e)}d.timerReady=setTimeout(function(){e.isApplyingWidgets=!1,t.data(e,"lastWidgetApplication",new Date),d.$table.triggerHandler("tablesorter-ready")},10),d.debug&&(n=d.widgets.length,console.log("Completed "+(a===!0?"initializing ":"applying ")+n+" widget"+(1!==n?"s":"")+r.benchmark(c)))}},removeWidget:function(e,a,i){e=t(e)[0];var s,o,l,n,c=e.config;if(a===!0)for(a=[],n=r.widgets.length,l=0;l<n;l++)o=r.widgets[l],o&&o.id&&(a[a.length]=o.id);else a=(t.isArray(a)?a.join(","):a||"").toLowerCase().split(/[\s,]+/);for(n=a.length,s=0;s<n;s++)o=r.getWidgetById(a[s]),l=t.inArray(a[s],c.widgets),l>=0&&i!==!0&&c.widgets.splice(l,1),o&&o.remove&&(c.debug&&console.log((i?"Refreshing":"Removing")+' "'+a[s]+'" widget'),o.remove(e,c,c.widgetOptions,i),c.widgetInit[a[s]]=!1)},refreshWidgets:function(e,a,i){e=t(e)[0];var s,o,l=e.config,n=l.widgets,c=r.widgets,d=c.length,u=[],f=function(e){t(e).triggerHandler("refreshComplete")};for(s=0;s<d;s++)o=c[s],o&&o.id&&(a||t.inArray(o.id,n)<0)&&(u[u.length]=o.id);r.removeWidget(e,u.join(","),!0),i!==!0?(r.applyWidget(e,a||!1,f),a&&r.applyWidget(e,!1,f)):f(e)},benchmark:function(e){return" ("+((new Date).getTime()-e.getTime())+" ms)"},log:function(){console.log(arguments)},isEmptyObject:function(e){for(var t in e)return!1;return!0},isValueInArray:function(e,t){var r,a=t&&t.length||0;for(r=0;r<a;r++)if(t[r][0]===e)return r;return-1},formatFloat:function(e,a){if("string"!=typeof e||""===e)return e;var i,s=a&&a.config?a.config.usNumberFormat!==!1:"undefined"==typeof a||a;
return e=s?e.replace(r.regex.comma,""):e.replace(r.regex.digitNonUS,"").replace(r.regex.comma,"."),r.regex.digitNegativeTest.test(e)&&(e=e.replace(r.regex.digitNegativeReplace,"-$1")),i=parseFloat(e),isNaN(i)?t.trim(e):i},isDigit:function(e){return isNaN(e)?r.regex.digitTest.test(e.toString().replace(r.regex.digitReplace,"")):""!==e},computeColumnIndex:function(e,r){var a,i,s,o,l,n,c,d,u,f,p=r&&r.columns||0,g=[],h=new Array(p);for(a=0;a<e.length;a++)for(n=e[a].cells,i=0;i<n.length;i++){for(l=n[i],c=l.parentNode.rowIndex,d=l.rowSpan||1,u=l.colSpan||1,"undefined"==typeof g[c]&&(g[c]=[]),s=0;s<g[c].length+1;s++)if("undefined"==typeof g[c][s]){f=s;break}for(p&&l.cellIndex===f||(l.setAttribute?l.setAttribute("data-column",f):t(l).attr("data-column",f)),s=c;s<c+d;s++)for("undefined"==typeof g[s]&&(g[s]=[]),h=g[s],o=f;o<f+u;o++)h[o]="x"}return h.length},fixColumnWidth:function(e){e=t(e)[0];var a,i,s,o,l,n=e.config,c=n.$table.children("colgroup");if(c.length&&c.hasClass(r.css.colgroup)&&c.remove(),n.widthFixed&&0===n.$table.children("colgroup").length){for(c=t('<colgroup class="'+r.css.colgroup+'">'),a=n.$table.width(),s=n.$tbodies.find("tr:first").children(":visible"),o=s.length,l=0;l<o;l++)i=parseInt(s.eq(l).width()/a*1e3,10)/10+"%",c.append(t("<col>").css("width",i));n.$table.prepend(c)}},getData:function(e,r,a){var i,s,o="",l=t(e);return l.length?(i=!!t.metadata&&l.metadata(),s=" "+(l.attr("class")||""),"undefined"!=typeof l.data(a)||"undefined"!=typeof l.data(a.toLowerCase())?o+=l.data(a)||l.data(a.toLowerCase()):i&&"undefined"!=typeof i[a]?o+=i[a]:r&&"undefined"!=typeof r[a]?o+=r[a]:" "!==s&&s.match(" "+a+"-")&&(o=s.match(new RegExp("\\s"+a+"-([\\w-]+)"))[1]||""),t.trim(o)):""},getColumnData:function(e,r,a,i,s){if("object"!=typeof r||null===r)return r;e=t(e)[0];var o,l,n=e.config,c=s||n.$headers,d=n.$headerIndexed&&n.$headerIndexed[a]||c.filter('[data-column="'+a+'"]:last');if("undefined"!=typeof r[a])return i?r[a]:r[c.index(d)];for(l in r)if("string"==typeof l&&(o=d.filter(l).add(d.find(l)),o.length))return r[l]},isProcessing:function(e,a,i){e=t(e);var s=e[0].config,o=i||e.find("."+r.css.header);a?("undefined"!=typeof i&&s.sortList.length>0&&(o=o.filter(function(){return!this.sortDisabled&&r.isValueInArray(parseFloat(t(this).attr("data-column")),s.sortList)>=0})),e.add(o).addClass(r.css.processing+" "+s.cssProcessing)):e.add(o).removeClass(r.css.processing+" "+s.cssProcessing)},processTbody:function(e,r,a){if(e=t(e)[0],a)return e.isProcessing=!0,r.before('<colgroup class="tablesorter-savemyplace"/>'),t.fn.detach?r.detach():r.remove();var i=t(e).find("colgroup.tablesorter-savemyplace");r.insertAfter(i),i.remove(),e.isProcessing=!1},clearTableBody:function(e){t(e)[0].config.$tbodies.children().detach()},characterEquivalents:{a:"áàâãäąå",A:"ÁÀÂÃÄĄÅ",c:"çćč",C:"ÇĆČ",e:"éèêëěę",E:"ÉÈÊËĚĘ",i:"íìİîïı",I:"ÍÌİÎÏ",o:"óòôõöō",O:"ÓÒÔÕÖŌ",ss:"ß",SS:"ẞ",u:"úùûüů",U:"ÚÙÛÜŮ"},replaceAccents:function(e){var t,a="[",i=r.characterEquivalents;if(!r.characterRegex){r.characterRegexArray={};for(t in i)"string"==typeof t&&(a+=i[t],r.characterRegexArray[t]=new RegExp("["+i[t]+"]","g"));r.characterRegex=new RegExp(a+"]")}if(r.characterRegex.test(e))for(t in i)"string"==typeof t&&(e=e.replace(r.characterRegexArray[t],t));return e},validateOptions:function(e){var a,i,s,o,l="headers sortForce sortList sortAppend widgets".split(" "),n=e.originalSettings;if(n){e.debug&&(o=new Date);for(a in n)if(s=typeof r.defaults[a],"undefined"===s)console.warn('Tablesorter Warning! "table.config.'+a+'" option not recognized');else if("object"===s)for(i in n[a])s=r.defaults[a]&&typeof r.defaults[a][i],t.inArray(a,l)<0&&"undefined"===s&&console.warn('Tablesorter Warning! "table.config.'+a+"."+i+'" option not recognized');e.debug&&console.log("validate options time:"+r.benchmark(o))}},restoreHeaders:function(e){var a,i,s=t(e)[0].config,o=s.$table.find(s.selectorHeaders),l=o.length;for(a=0;a<l;a++)i=o.eq(a),i.find("."+r.css.headerIn).length&&i.html(s.headerContent[a])},destroy:function(e,a,i){if(e=t(e)[0],e.hasInitialized){r.removeWidget(e,!0,!1);var s,o=t(e),l=e.config,n=l.debug,c=o.find("thead:first"),d=c.find("tr."+r.css.headerRow).removeClass(r.css.headerRow+" "+l.cssHeaderRow),u=o.find("tfoot:first > tr").children("th, td");a===!1&&t.inArray("uitheme",l.widgets)>=0&&(o.triggerHandler("applyWidgetId",["uitheme"]),o.triggerHandler("applyWidgetId",["zebra"])),c.find("tr").not(d).remove(),s="sortReset update updateRows updateAll updateHeaders updateCell addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets removeWidget destroy mouseup mouseleave "+"keypress sortBegin sortEnd resetToLoadState ".split(" ").join(l.namespace+" "),o.removeData("tablesorter").unbind(s.replace(r.regex.spaces," ")),l.$headers.add(u).removeClass([r.css.header,l.cssHeader,l.cssAsc,l.cssDesc,r.css.sortAsc,r.css.sortDesc,r.css.sortNone].join(" ")).removeAttr("data-column").removeAttr("aria-label").attr("aria-disabled","true"),d.find(l.selectorSort).unbind("mousedown mouseup keypress ".split(" ").join(l.namespace+" ").replace(r.regex.spaces," ")),r.restoreHeaders(e),o.toggleClass(r.css.table+" "+l.tableClass+" tablesorter-"+l.theme,a===!1),e.hasInitialized=!1,delete e.config.cache,"function"==typeof i&&i(e),n&&console.log("tablesorter has been removed")}}};t.fn.tablesorter=function(e){return this.each(function(){var a=this,i=t.extend(!0,{},r.defaults,e,r.instanceMethods);i.originalSettings=e,!a.hasInitialized&&r.buildTable&&"TABLE"!==this.nodeName?r.buildTable(a,i):r.setup(a,i)})},window.console&&window.console.log||(r.logs=[],console={},console.log=console.warn=console.error=console.table=function(){var e=arguments.length>1?arguments:arguments[0];r.logs[r.logs.length]={date:Date.now(),log:e}}),r.addParser({id:"no-parser",is:function(){return!1},format:function(){return""},type:"text"}),r.addParser({id:"text",is:function(){return!0},format:function(e,a){var i=a.config;return e&&(e=t.trim(i.ignoreCase?e.toLocaleLowerCase():e),e=i.sortLocaleCompare?r.replaceAccents(e):e),e},type:"text"}),r.regex.nondigit=/[^\w,. \-()]/g,r.addParser({id:"digit",is:function(e){return r.isDigit(e)},format:function(e,a){var i=r.formatFloat((e||"").replace(r.regex.nondigit,""),a);return e&&"number"==typeof i?i:e?t.trim(e&&a.config.ignoreCase?e.toLocaleLowerCase():e):e},type:"numeric"}),r.regex.currencyReplace=/[+\-,. ]/g,r.regex.currencyTest=/^\(?\d+[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]|[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]\d+\)?$/,r.addParser({id:"currency",is:function(e){return e=(e||"").replace(r.regex.currencyReplace,""),r.regex.currencyTest.test(e)},format:function(e,a){var i=r.formatFloat((e||"").replace(r.regex.nondigit,""),a);return e&&"number"==typeof i?i:e?t.trim(e&&a.config.ignoreCase?e.toLocaleLowerCase():e):e},type:"numeric"}),r.regex.urlProtocolTest=/^(https?|ftp|file):\/\//,r.regex.urlProtocolReplace=/(https?|ftp|file):\/\/(www\.)?/,r.addParser({id:"url",is:function(e){return r.regex.urlProtocolTest.test(e)},format:function(e){return e?t.trim(e.replace(r.regex.urlProtocolReplace,"")):e},type:"text"}),r.regex.dash=/-/g,r.regex.isoDate=/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}/,r.addParser({id:"isoDate",is:function(e){return r.regex.isoDate.test(e)},format:function(e,t){var a=e?new Date(e.replace(r.regex.dash,"/")):e;return a instanceof Date&&isFinite(a)?a.getTime():e},type:"numeric"}),r.regex.percent=/%/g,r.regex.percentTest=/(\d\s*?%|%\s*?\d)/,r.addParser({id:"percent",is:function(e){return r.regex.percentTest.test(e)&&e.length<15},format:function(e,t){return e?r.formatFloat(e.replace(r.regex.percent,""),t):e},type:"numeric"}),r.addParser({id:"image",is:function(e,t,r,a){return a.find("img").length>0},format:function(e,r,a){return t(a).find("img").attr(r.config.imgAttr||"alt")||e},parsed:!0,type:"text"}),r.regex.dateReplace=/(\S)([AP]M)$/i,r.regex.usLongDateTest1=/^[A-Z]{3,10}\.?\s+\d{1,2},?\s+(\d{4})(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?$/i,r.regex.usLongDateTest2=/^\d{1,2}\s+[A-Z]{3,10}\s+\d{4}/i,r.addParser({id:"usLongDate",is:function(e){return r.regex.usLongDateTest1.test(e)||r.regex.usLongDateTest2.test(e)},format:function(e,t){var a=e?new Date(e.replace(r.regex.dateReplace,"$1 $2")):e;return a instanceof Date&&isFinite(a)?a.getTime():e},type:"numeric"}),r.regex.shortDateTest=/(^\d{1,2}[\/\s]\d{1,2}[\/\s]\d{4})|(^\d{4}[\/\s]\d{1,2}[\/\s]\d{1,2})/,r.regex.shortDateReplace=/[\-.,]/g,r.regex.shortDateXXY=/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,r.regex.shortDateYMD=/(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/,r.convertFormat=function(e,t){e=(e||"").replace(r.regex.spaces," ").replace(r.regex.shortDateReplace,"/"),"mmddyyyy"===t?e=e.replace(r.regex.shortDateXXY,"$3/$1/$2"):"ddmmyyyy"===t?e=e.replace(r.regex.shortDateXXY,"$3/$2/$1"):"yyyymmdd"===t&&(e=e.replace(r.regex.shortDateYMD,"$1/$2/$3"));var a=new Date(e);return a instanceof Date&&isFinite(a)?a.getTime():""},r.addParser({id:"shortDate",is:function(e){return e=(e||"").replace(r.regex.spaces," ").replace(r.regex.shortDateReplace,"/"),r.regex.shortDateTest.test(e)},format:function(e,t,a,i){if(e){var s=t.config,o=s.$headerIndexed[i],l=o.length&&o.data("dateFormat")||r.getData(o,r.getColumnData(t,s.headers,i),"dateFormat")||s.dateFormat;return o.length&&o.data("dateFormat",l),r.convertFormat(e,l)||e}return e},type:"numeric"}),r.regex.timeTest=/^(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)$|^((?:[01]\d|[2][0-4]):[0-5]\d)$/i,r.regex.timeMatch=/(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)|((?:[01]\d|[2][0-4]):[0-5]\d)/i,r.addParser({id:"time",is:function(e){return r.regex.timeTest.test(e)},format:function(e,t){var a,i=(e||"").match(r.regex.timeMatch),s=new Date(e),o=e&&(null!==i?i[0]:"00:00 AM"),l=o?new Date("2000/01/01 "+o.replace(r.regex.dateReplace,"$1 $2")):o;return l instanceof Date&&isFinite(l)?(a=s instanceof Date&&isFinite(s)?s.getTime():0,a?parseFloat(l.getTime()+"."+s.getTime()):l.getTime()):e},type:"numeric"}),r.addParser({id:"metadata",is:function(){return!1},format:function(e,r,a){var i=r.config,s=i.parserMetadataName?i.parserMetadataName:"sortValue";return t(a).metadata()[s]},type:"numeric"}),r.addWidget({id:"zebra",priority:90,format:function(e,r,a){var i,s,o,l,n,c,d,u=new RegExp(r.cssChildRow,"i"),f=r.$tbodies.add(t(r.namespace+"_extra_table").children("tbody:not(."+r.cssInfoBlock+")"));for(n=0;n<f.length;n++)for(o=0,i=f.eq(n).children("tr:visible").not(r.selectorRemove),d=i.length,c=0;c<d;c++)s=i.eq(c),u.test(s[0].className)||o++,l=o%2===0,s.removeClass(a.zebra[l?1:0]).addClass(a.zebra[l?0:1])},remove:function(e,t,a,i){if(!i){var s,o,l=t.$tbodies,n=(a.zebra||["even","odd"]).join(" ");for(s=0;s<l.length;s++)o=r.processTbody(e,l.eq(s),!0),o.children().removeClass(n),r.processTbody(e,o,!1)}}})}(e),function(e,t,r){"use strict";var a=e.tablesorter||{};a.storage=function(i,s,o,l){i=e(i)[0];var n,c,d,u=!1,f={},p=i.config,g=p&&p.widgetOptions,h=l&&l.useSessionStorage||g&&g.storage_useSessionStorage?"sessionStorage":"localStorage",m=e(i),b=l&&l.id||m.attr(l&&l.group||g&&g.storage_group||"data-table-group")||g&&g.storage_tableId||i.id||e(".tablesorter").index(m),y=l&&l.url||m.attr(l&&l.page||g&&g.storage_page||"data-table-page")||g&&g.storage_fixedUrl||p&&p.fixedUrl||t.location.pathname;if(e.extend(!0,a.defaults,{fixedUrl:"",widgetOptions:{storage_fixedUrl:"",storage_group:"",storage_page:"",storage_tableId:"",storage_useSessionStorage:""}}),h in t)try{t[h].setItem("_tmptest","temp"),u=!0,t[h].removeItem("_tmptest")}catch(w){p&&p.debug&&console.warn(h+" is not supported in this browser")}return e.parseJSON&&(u?f=e.parseJSON(t[h][s]||"null")||{}:(c=r.cookie.split(/[;\s|=]/),n=e.inArray(s,c)+1,f=0!==n?e.parseJSON(c[n]||"null")||{}:{})),"undefined"!=typeof o&&t.JSON&&JSON.hasOwnProperty("stringify")?(f[y]||(f[y]={}),f[y][b]=o,u?t[h][s]=JSON.stringify(f):(d=new Date,d.setTime(d.getTime()+31536e6),r.cookie=s+"="+JSON.stringify(f).replace(/\"/g,'"')+"; expires="+d.toGMTString()+"; path=/"),void 0):f&&f[y]?f[y][b]:""}}(e,window,document),function(e){"use strict";var t=e.tablesorter||{};t.themes={bootstrap:{table:"table table-bordered table-striped",caption:"caption",header:"bootstrap-header",sortNone:"",sortAsc:"",sortDesc:"",active:"",hover:"",icons:"",iconSortNone:"bootstrap-icon-unsorted",iconSortAsc:"icon-chevron-up glyphicon glyphicon-chevron-up",iconSortDesc:"icon-chevron-down glyphicon glyphicon-chevron-down",filterRow:"",footerRow:"",footerCells:"",even:"",odd:""},jui:{table:"ui-widget ui-widget-content ui-corner-all",caption:"ui-widget-content",header:"ui-widget-header ui-corner-all ui-state-default",sortNone:"",sortAsc:"",sortDesc:"",active:"ui-state-active",hover:"ui-state-hover",icons:"ui-icon",iconSortNone:"ui-icon-carat-2-n-s ui-icon-caret-2-n-s",iconSortAsc:"ui-icon-carat-1-n ui-icon-caret-1-n",iconSortDesc:"ui-icon-carat-1-s ui-icon-caret-1-s",filterRow:"",footerRow:"",footerCells:"",even:"ui-widget-content",odd:"ui-state-default"}},e.extend(t.css,{wrapper:"tablesorter-wrapper"}),t.addWidget({id:"uitheme",priority:10,format:function(r,a,i){var s,o,l,n,c,d,u,f,p,g,h,m,b,y=t.themes,w=a.$table.add(e(a.namespace+"_extra_table")),_=a.$headers.add(e(a.namespace+"_extra_headers")),v=a.theme||"jui",x=y[v]||{},C=e.trim([x.sortNone,x.sortDesc,x.sortAsc,x.active].join(" ")),$=e.trim([x.iconSortNone,x.iconSortDesc,x.iconSortAsc].join(" "));for(a.debug&&(c=new Date),w.hasClass("tablesorter-"+v)&&a.theme===a.appliedTheme&&i.uitheme_applied||(i.uitheme_applied=!0,g=y[a.appliedTheme]||{},b=!e.isEmptyObject(g),h=b?[g.sortNone,g.sortDesc,g.sortAsc,g.active].join(" "):"",m=b?[g.iconSortNone,g.iconSortDesc,g.iconSortAsc].join(" "):"",b&&(i.zebra[0]=e.trim(" "+i.zebra[0].replace(" "+g.even,"")),i.zebra[1]=e.trim(" "+i.zebra[1].replace(" "+g.odd,"")),a.$tbodies.children().removeClass([g.even,g.odd].join(" "))),x.even&&(i.zebra[0]+=" "+x.even),x.odd&&(i.zebra[1]+=" "+x.odd),w.children("caption").removeClass(g.caption||"").addClass(x.caption),f=w.removeClass((a.appliedTheme?"tablesorter-"+(a.appliedTheme||""):"")+" "+(g.table||"")).addClass("tablesorter-"+v+" "+(x.table||"")).children("tfoot"),a.appliedTheme=a.theme,f.length&&f.children("tr").removeClass(g.footerRow||"").addClass(x.footerRow).children("th, td").removeClass(g.footerCells||"").addClass(x.footerCells),_.removeClass((b?[g.header,g.hover,h].join(" "):"")||"").addClass(x.header).not(".sorter-false").unbind("mouseenter.tsuitheme mouseleave.tsuitheme").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(t){e(this)["mouseenter"===t.type?"addClass":"removeClass"](x.hover||"")}),_.each(function(){var r=e(this);r.find("."+t.css.wrapper).length||r.wrapInner('<div class="'+t.css.wrapper+'" style="position:relative;height:100%;width:100%"></div>')}),a.cssIcon&&_.find("."+t.css.icon).removeClass(b?[g.icons,m].join(" "):"").addClass(x.icons||""),t.hasWidget(a.table,"filter")&&(o=function(){w.children("thead").children("."+t.css.filterRow).removeClass(b?g.filterRow||"":"").addClass(x.filterRow||"")},i.filter_initialized?o():w.one("filterInit",function(){o()}))),s=0;s<a.columns;s++)d=a.$headers.add(e(a.namespace+"_extra_headers")).not(".sorter-false").filter('[data-column="'+s+'"]'),u=t.css.icon?d.find("."+t.css.icon):e(),p=_.not(".sorter-false").filter('[data-column="'+s+'"]:last'),p.length&&(d.removeClass(C),u.removeClass($),p[0].sortDisabled?u.removeClass(x.icons||""):(l=x.sortNone,n=x.iconSortNone,p.hasClass(t.css.sortAsc)?(l=[x.sortAsc,x.active].join(" "),n=x.iconSortAsc):p.hasClass(t.css.sortDesc)&&(l=[x.sortDesc,x.active].join(" "),n=x.iconSortDesc),d.addClass(l),u.addClass(n||"")));a.debug&&console.log("Applying "+v+" theme"+t.benchmark(c))},remove:function(e,r,a,i){if(a.uitheme_applied){var s=r.$table,o=r.appliedTheme||"jui",l=t.themes[o]||t.themes.jui,n=s.children("thead").children(),c=l.sortNone+" "+l.sortDesc+" "+l.sortAsc,d=l.iconSortNone+" "+l.iconSortDesc+" "+l.iconSortAsc;s.removeClass("tablesorter-"+o+" "+l.table),a.uitheme_applied=!1,i||(s.find(t.css.header).removeClass(l.header),n.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(l.hover+" "+c+" "+l.active).filter("."+t.css.filterRow).removeClass(l.filterRow),n.find("."+t.css.icon).removeClass(l.icons+" "+d))}}})}(e),function(e){"use strict";var t=e.tablesorter||{};t.addWidget({id:"columns",priority:30,options:{columns:["primary","secondary","tertiary"]},format:function(r,a,i){var s,o,l,n,c,d,u,f,p=a.$table,g=a.$tbodies,h=a.sortList,m=h.length,b=i&&i.columns||["primary","secondary","tertiary"],y=b.length-1;for(u=b.join(" "),o=0;o<g.length;o++)s=t.processTbody(r,g.eq(o),!0),l=s.children("tr"),l.each(function(){if(c=e(this),"none"!==this.style.display&&(d=c.children().removeClass(u),h&&h[0]&&(d.eq(h[0][0]).addClass(b[0]),m>1)))for(f=1;f<m;f++)d.eq(h[f][0]).addClass(b[f]||b[y])}),t.processTbody(r,s,!1);if(n=i.columns_thead!==!1?["thead tr"]:[],i.columns_tfoot!==!1&&n.push("tfoot tr"),n.length&&(l=p.find(n.join(",")).children().removeClass(u),m))for(f=0;f<m;f++)l.filter('[data-column="'+h[f][0]+'"]').addClass(b[f]||b[y])},remove:function(r,a,i){var s,o,l=a.$tbodies,n=(i.columns||["primary","secondary","tertiary"]).join(" ");for(a.$headers.removeClass(n),a.$table.children("tfoot").children("tr").children("th, td").removeClass(n),s=0;s<l.length;s++)o=t.processTbody(r,l.eq(s),!0),o.children("tr").each(function(){e(this).children().removeClass(n)}),t.processTbody(r,o,!1)}})}(e),function(e){"use strict";var t,r,a=e.tablesorter||{},i=a.css,s=a.keyCodes;e.extend(i,{filterRow:"tablesorter-filter-row",filter:"tablesorter-filter",filterDisabled:"disabled",filterRowHide:"hideme"}),e.extend(s,{backSpace:8,escape:27,space:32,left:37,down:40}),a.addWidget({id:"filter",priority:50,options:{filter_cellFilter:"",filter_childRows:!1,filter_childByColumn:!1,filter_childWithSibs:!0,filter_columnAnyMatch:!0,filter_columnFilters:!0,filter_cssFilter:"",filter_defaultAttrib:"data-value",filter_defaultFilter:{},filter_excludeFilter:{},filter_external:"",filter_filteredRow:"filtered",filter_formatter:null,filter_functions:null,filter_hideEmpty:!0,filter_hideFilters:!1,filter_ignoreCase:!0,filter_liveSearch:!0,filter_matchType:{input:"exact",select:"exact"},filter_onlyAvail:"filter-onlyAvail",filter_placeholder:{search:"",select:""},filter_reset:null,filter_resetOnEsc:!0,filter_saveFilters:!1,filter_searchDelay:300,filter_searchFiltered:!0,filter_selectSource:null,filter_selectSourceSeparator:"|",filter_serversideFiltering:!1,filter_startsWith:!1,filter_useParsedData:!1},format:function(e,r,a){r.$table.hasClass("hasFilters")||t.init(e,r,a)},remove:function(t,r,s,o){var l,n,c=r.$table,d=r.$tbodies,u="addRows updateCell update updateRows updateComplete appendCache filterReset filterEnd search ".split(" ").join(r.namespace+"filter ");if(c.removeClass("hasFilters").unbind(u.replace(a.regex.spaces," ")).find("."+i.filterRow).remove(),s.filter_initialized=!1,!o){for(l=0;l<d.length;l++)n=a.processTbody(t,d.eq(l),!0),n.children().removeClass(s.filter_filteredRow).show(),a.processTbody(t,n,!1);s.filter_reset&&e(document).undelegate(s.filter_reset,"click"+r.namespace+"filter")}}}),t=a.filter={regex:{regex:/^\/((?:\\\/|[^\/])+)\/([migyu]{0,5})?$/,child:/tablesorter-childRow/,filtered:/filtered/,type:/undefined|number/,exact:/(^[\"\'=]+)|([\"\'=]+$)/g,operators:/[<>=]/g,query:"(q|query)",wild01:/\?/g,wild0More:/\*/g,quote:/\"/g,isNeg1:/(>=?\s*-\d)/,isNeg2:/(<=?\s*\d)/},types:{or:function(a,i,s){if((r.orTest.test(i.iFilter)||r.orSplit.test(i.filter))&&!r.regex.test(i.filter)){var o,l,n,c,d=e.extend({},i),u=i.filter.split(r.orSplit),f=i.iFilter.split(r.orSplit),p=u.length;for(o=0;o<p;o++){d.nestedFilters=!0,d.filter=""+(t.parseFilter(a,u[o],i)||""),d.iFilter=""+(t.parseFilter(a,f[o],i)||""),n="("+(t.parseFilter(a,d.filter,i)||"")+")";try{if(c=new RegExp(i.isMatch?n:"^"+n+"$",a.widgetOptions.filter_ignoreCase?"i":""),l=c.test(d.exact)||t.processTypes(a,d,s))return l}catch(g){return null}}return l||!1}return null},and:function(a,i,s){if(r.andTest.test(i.filter)){var o,l,n,c,d,u=e.extend({},i),f=i.filter.split(r.andSplit),p=i.iFilter.split(r.andSplit),g=f.length;for(o=0;o<g;o++){u.nestedFilters=!0,u.filter=""+(t.parseFilter(a,f[o],i)||""),u.iFilter=""+(t.parseFilter(a,p[o],i)||""),c=("("+(t.parseFilter(a,u.filter,i)||"")+")").replace(r.wild01,"\\S{1}").replace(r.wild0More,"\\S*");try{d=new RegExp(i.isMatch?c:"^"+c+"$",a.widgetOptions.filter_ignoreCase?"i":""),n=d.test(u.exact)||t.processTypes(a,u,s),l=0===o?n:l&&n}catch(h){return null}}return l||!1}return null},regex:function(e,t){if(r.regex.test(t.filter)){var a,i=t.filter_regexCache[t.index]||r.regex.exec(t.filter),s=i instanceof RegExp;try{s||(t.filter_regexCache[t.index]=i=new RegExp(i[1],i[2])),a=i.test(t.exact)}catch(o){a=!1}return a}return null},operators:function(i,s){if(r.operTest.test(s.iFilter)&&""!==s.iExact){var o,l,n,c=i.table,d=s.parsed[s.index],u=a.formatFloat(s.iFilter.replace(r.operators,""),c),f=i.parsers[s.index]||{},p=u;return(d||"numeric"===f.type)&&(n=e.trim(""+s.iFilter.replace(r.operators,"")),l=t.parseFilter(i,n,s,!0),u="number"!=typeof l||""===l||isNaN(l)?u:l),!d&&"numeric"!==f.type||isNaN(u)||"undefined"==typeof s.cache?(n=isNaN(s.iExact)?s.iExact.replace(a.regex.nondigit,""):s.iExact,o=a.formatFloat(n,c)):o=s.cache,r.gtTest.test(s.iFilter)?l=r.gteTest.test(s.iFilter)?o>=u:o>u:r.ltTest.test(s.iFilter)&&(l=r.lteTest.test(s.iFilter)?o<=u:o<u),l||""!==p||(l=!0),l}return null},notMatch:function(a,i){if(r.notTest.test(i.iFilter)){var s,o=i.iFilter.replace("!",""),l=t.parseFilter(a,o,i)||"";return r.exact.test(l)?(l=l.replace(r.exact,""),""===l||e.trim(l)!==i.iExact):(s=i.iExact.search(e.trim(l)),""===l||(i.anyMatch?s<0:!(a.widgetOptions.filter_startsWith?0===s:s>=0)))}return null},exact:function(a,i){if(r.exact.test(i.iFilter)){var s=i.iFilter.replace(r.exact,""),o=t.parseFilter(a,s,i)||"";return i.anyMatch?e.inArray(o,i.rowArray)>=0:o==i.iExact}return null},range:function(e,i){if(r.toTest.test(i.iFilter)){var s,o,l,n,c=e.table,d=i.index,u=i.parsed[d],f=i.iFilter.split(r.toSplit);return o=f[0].replace(a.regex.nondigit,"")||"",l=a.formatFloat(t.parseFilter(e,o,i),c),o=f[1].replace(a.regex.nondigit,"")||"",n=a.formatFloat(t.parseFilter(e,o,i),c),(u||"numeric"===e.parsers[d].type)&&(s=e.parsers[d].format(""+f[0],c,e.$headers.eq(d),d),l=""===s||isNaN(s)?l:s,s=e.parsers[d].format(""+f[1],c,e.$headers.eq(d),d),n=""===s||isNaN(s)?n:s),!u&&"numeric"!==e.parsers[d].type||isNaN(l)||isNaN(n)?(o=isNaN(i.iExact)?i.iExact.replace(a.regex.nondigit,""):i.iExact,s=a.formatFloat(o,c)):s=i.cache,l>n&&(o=l,l=n,n=o),s>=l&&s<=n||""===l||""===n}return null},wild:function(e,a){if(r.wildOrTest.test(a.iFilter)){var i=""+(t.parseFilter(e,a.iFilter,a)||"");!r.wildTest.test(i)&&a.nestedFilters&&(i=a.isMatch?i:"^("+i+")$");try{return new RegExp(i.replace(r.wild01,"\\S{1}").replace(r.wild0More,"\\S*"),e.widgetOptions.filter_ignoreCase?"i":"").test(a.exact)}catch(s){return null}}return null},fuzzy:function(e,a){if(r.fuzzyTest.test(a.iFilter)){var i,s=0,o=a.iExact.length,l=a.iFilter.slice(1),n=t.parseFilter(e,l,a)||"";for(i=0;i<o;i++)a.iExact[i]===n[s]&&(s+=1);return s===n.length}return null}},init:function(s){a.language=e.extend(!0,{},{to:"to",or:"or",and:"and"},a.language);var o,l,n,c,d,u,f,p,g=s.config,h=g.widgetOptions;if(g.$table.addClass("hasFilters"),g.lastSearch=[],h.filter_searchTimer=null,h.filter_initTimer=null,h.filter_formatterCount=0,h.filter_formatterInit=[],h.filter_anyColumnSelector='[data-column="all"],[data-column="any"]',h.filter_multipleColumnSelector='[data-column*="-"],[data-column*=","]',u="\\{"+r.query+"\\}",e.extend(r,{child:new RegExp(g.cssChildRow),filtered:new RegExp(h.filter_filteredRow),alreadyFiltered:new RegExp("(\\s+("+a.language.or+"|-|"+a.language.to+")\\s+)","i"),toTest:new RegExp("\\s+(-|"+a.language.to+")\\s+","i"),toSplit:new RegExp("(?:\\s+(?:-|"+a.language.to+")\\s+)","gi"),andTest:new RegExp("\\s+("+a.language.and+"|&&)\\s+","i"),andSplit:new RegExp("(?:\\s+(?:"+a.language.and+"|&&)\\s+)","gi"),orTest:new RegExp("(\\||\\s+"+a.language.or+"\\s+)","i"),orSplit:new RegExp("(?:\\s+(?:"+a.language.or+")\\s+|\\|)","gi"),iQuery:new RegExp(u,"i"),igQuery:new RegExp(u,"ig"),operTest:/^[<>]=?/,gtTest:/>/,gteTest:/>=/,ltTest:/</,lteTest:/<=/,notTest:/^\!/,wildOrTest:/[\?\*\|]/,wildTest:/\?\*/,fuzzyTest:/^~/,exactTest:/[=\"\|!]/}),u=g.$headers.filter(".filter-false, .parser-false").length,h.filter_columnFilters!==!1&&u!==g.$headers.length&&t.buildRow(s,g,h),n="addRows updateCell update updateRows updateComplete appendCache filterReset "+"filterResetSaved filterEnd search ".split(" ").join(g.namespace+"filter "),g.$table.bind(n,function(r,o){return u=h.filter_hideEmpty&&e.isEmptyObject(g.cache)&&!(g.delayInit&&"appendCache"===r.type),g.$table.find("."+i.filterRow).toggleClass(h.filter_filteredRow,u),/(search|filter)/.test(r.type)||(r.stopPropagation(),t.buildDefault(s,!0)),"filterReset"===r.type?(g.$table.find("."+i.filter).add(h.filter_$externalFilters).val(""),t.searching(s,[])):"filterResetSaved"===r.type?a.storage(s,"tablesorter-filters",""):"filterEnd"===r.type?t.buildDefault(s,!0):(o="search"===r.type?o:"updateComplete"===r.type?g.$table.data("lastSearch"):"",/(update|add)/.test(r.type)&&"updateComplete"!==r.type&&(g.lastCombinedFilter=null,g.lastSearch=[],setTimeout(function(){g.$table.triggerHandler("filterFomatterUpdate")},100)),t.searching(s,o,!0)),!1}),h.filter_reset&&(h.filter_reset instanceof e?h.filter_reset.click(function(){g.$table.triggerHandler("filterReset")}):e(h.filter_reset).length&&e(document).undelegate(h.filter_reset,"click"+g.namespace+"filter").delegate(h.filter_reset,"click"+g.namespace+"filter",function(){g.$table.triggerHandler("filterReset")})),h.filter_functions)for(d=0;d<g.columns;d++)if(f=a.getColumnData(s,h.filter_functions,d))if(c=g.$headerIndexed[d].removeClass("filter-select"),p=!(c.hasClass("filter-false")||c.hasClass("parser-false")),o="",f===!0&&p)t.buildSelect(s,d);else if("object"==typeof f&&p){for(l in f)"string"==typeof l&&(o+=""===o?'<option value="">'+(c.data("placeholder")||c.attr("data-placeholder")||h.filter_placeholder.select||"")+"</option>":"",u=l,n=l,l.indexOf(h.filter_selectSourceSeparator)>=0&&(u=l.split(h.filter_selectSourceSeparator),n=u[1],u=u[0]),o+="<option "+(n===u?"":'data-function-name="'+l+'" ')+'value="'+u+'">'+n+"</option>");g.$table.find("thead").find("select."+i.filter+'[data-column="'+d+'"]').append(o),n=h.filter_selectSource,f="function"==typeof n||a.getColumnData(s,n,d),f&&t.buildSelect(g.table,d,"",!0,c.hasClass(h.filter_onlyAvail))}t.buildDefault(s,!0),t.bindSearch(s,g.$table.find("."+i.filter),!0),h.filter_external&&t.bindSearch(s,h.filter_external),h.filter_hideFilters&&t.hideFilters(g),g.showProcessing&&(n="filterStart filterEnd ".split(" ").join(g.namespace+"filter "),g.$table.unbind(n.replace(a.regex.spaces," ")).bind(n,function(t,r){c=r?g.$table.find("."+i.header).filter("[data-column]").filter(function(){return""!==r[e(this).data("column")]}):"",a.isProcessing(s,"filterStart"===t.type,r?c:"")})),g.filteredRows=g.totalRows,n="tablesorter-initialized pagerBeforeInitialized ".split(" ").join(g.namespace+"filter "),g.$table.unbind(n.replace(a.regex.spaces," ")).bind(n,function(){t.completeInit(this)}),g.pager&&g.pager.initialized&&!h.filter_initialized?(g.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){t.filterInitComplete(g)},100)):h.filter_initialized||t.completeInit(s)},completeInit:function(e){var r=e.config,i=r.widgetOptions,s=t.setDefaults(e,r,i)||[];s.length&&(r.delayInit&&""===s.join("")||a.setFilters(e,s,!0)),r.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){i.filter_initialized||t.filterInitComplete(r)},100)},formatterUpdated:function(e,t){var r=e&&e.closest("table")[0].config.widgetOptions;r&&!r.filter_initialized&&(r.filter_formatterInit[t]=1)},filterInitComplete:function(r){var a,i,s=r.widgetOptions,o=0,l=function(){s.filter_initialized=!0,r.lastSearch=r.$table.data("lastSearch"),r.$table.triggerHandler("filterInit",r),t.findRows(r.table,r.lastSearch||[])};if(e.isEmptyObject(s.filter_formatter))l();else{for(i=s.filter_formatterInit.length,a=0;a<i;a++)1===s.filter_formatterInit[a]&&o++;clearTimeout(s.filter_initTimer),s.filter_initialized||o!==s.filter_formatterCount?s.filter_initialized||(s.filter_initTimer=setTimeout(function(){l()},500)):l()}},processFilters:function(e,t){var r,a=[],i=t?encodeURIComponent:decodeURIComponent,s=e.length;for(r=0;r<s;r++)e[r]&&(a[r]=i(e[r]));return a},setDefaults:function(r,i,s){var o,l,n,c,d,u=a.getFilters(r)||[];if(s.filter_saveFilters&&a.storage&&(l=a.storage(r,"tablesorter-filters")||[],o=e.isArray(l),o&&""===l.join("")||!o||(u=t.processFilters(l))),""===u.join(""))for(d=i.$headers.add(s.filter_$externalFilters).filter("["+s.filter_defaultAttrib+"]"),n=0;n<=i.columns;n++)c=n===i.columns?"all":n,u[n]=d.filter('[data-column="'+c+'"]').attr(s.filter_defaultAttrib)||u[n]||"";return i.$table.data("lastSearch",u),u},parseFilter:function(e,t,r,a){return a||r.parsed[r.index]?e.parsers[r.index].format(t,e.table,[],r.index):t},buildRow:function(r,s,o){var l,n,c,d,u,f,p,g,h,m=o.filter_cellFilter,b=s.columns,y=e.isArray(m),w='<tr role="row" class="'+i.filterRow+" "+s.cssIgnoreRow+'">';for(c=0;c<b;c++)s.$headerIndexed[c].length&&(h=s.$headerIndexed[c]&&s.$headerIndexed[c][0].colSpan||0,w+=h>1?'<td data-column="'+c+"-"+(c+h-1)+'" colspan="'+h+'"':'<td data-column="'+c+'"',w+=y?m[c]?' class="'+m[c]+'"':"":""!==m?' class="'+m+'"':"",w+="></td>");for(s.$filters=e(w+="</tr>").appendTo(s.$table.children("thead").eq(0)).children("td"),c=0;c<b;c++)f=!1,d=s.$headerIndexed[c],d&&d.length&&(l=t.getColumnElm(s,s.$filters,c),g=a.getColumnData(r,o.filter_functions,c),u=o.filter_functions&&g&&"function"!=typeof g||d.hasClass("filter-select"),n=a.getColumnData(r,s.headers,c),f="false"===a.getData(d[0],n,"filter")||"false"===a.getData(d[0],n,"parser"),u?w=e("<select>").appendTo(l):(g=a.getColumnData(r,o.filter_formatter,c),g?(o.filter_formatterCount++,w=g(l,c),w&&0===w.length&&(w=l.children("input")),w&&(0===w.parent().length||w.parent().length&&w.parent()[0]!==l[0])&&l.append(w)):w=e('<input type="search">').appendTo(l),w&&(h=d.data("placeholder")||d.attr("data-placeholder")||o.filter_placeholder.search||"",w.attr("placeholder",h))),w&&(p=(e.isArray(o.filter_cssFilter)?"undefined"!=typeof o.filter_cssFilter[c]?o.filter_cssFilter[c]||"":"":o.filter_cssFilter)||"",w.addClass(i.filter+" "+p).attr("data-column",l.attr("data-column")),f&&(w.attr("placeholder","").addClass(i.filterDisabled)[0].disabled=!0)))},bindSearch:function(r,i,o){if(r=e(r)[0],i=e(i),i.length){var l,n=r.config,c=n.widgetOptions,d=n.namespace+"filter",u=c.filter_$externalFilters;o!==!0&&(l=c.filter_anyColumnSelector+","+c.filter_multipleColumnSelector,c.filter_$anyMatch=i.filter(l),u&&u.length?c.filter_$externalFilters=c.filter_$externalFilters.add(i):c.filter_$externalFilters=i,a.setFilters(r,n.$table.data("lastSearch")||[],o===!1)),l="keypress keyup keydown search change input ".split(" ").join(d+" "),i.attr("data-lastSearchTime",(new Date).getTime()).unbind(l.replace(a.regex.spaces," ")).bind("keydown"+d,function(e){if(e.which===s.escape&&!r.config.widgetOptions.filter_resetOnEsc)return!1}).bind("keyup"+d,function(i){c=r.config.widgetOptions;var o=parseInt(e(this).attr("data-column"),10),l="boolean"==typeof c.filter_liveSearch?c.filter_liveSearch:a.getColumnData(r,c.filter_liveSearch,o);if("undefined"==typeof l&&(l=c.filter_liveSearch.fallback||!1),e(this).attr("data-lastSearchTime",(new Date).getTime()),i.which===s.escape)this.value=c.filter_resetOnEsc?"":n.lastSearch[o];else{if(l===!1)return;if(""!==this.value&&("number"==typeof l&&this.value.length<l||i.which!==s.enter&&i.which!==s.backSpace&&(i.which<s.space||i.which>=s.left&&i.which<=s.down)))return}t.searching(r,!0,!0,o)}).bind("search change keypress input ".split(" ").join(d+" "),function(i){var o=parseInt(e(this).attr("data-column"),10),l="boolean"==typeof c.filter_liveSearch?c.filter_liveSearch:a.getColumnData(r,c.filter_liveSearch,o);!r.config.widgetOptions.filter_initialized||i.which!==s.enter&&"search"!==i.type&&("change"!==i.type&&"input"!==i.type||l!==!0||this.value===n.lastSearch[o])||(i.preventDefault(),
e(this).attr("data-lastSearchTime",(new Date).getTime()),t.searching(r,"keypress"!==i.type,!0,o))})}},searching:function(e,r,i,s){var o,l=e.config.widgetOptions;"undefined"==typeof s?o=!1:(o="boolean"==typeof l.filter_liveSearch?l.filter_liveSearch:a.getColumnData(e,l.filter_liveSearch,s),"undefined"==typeof o&&(o=l.filter_liveSearch.fallback||!1)),clearTimeout(l.filter_searchTimer),"undefined"==typeof r||r===!0?l.filter_searchTimer=setTimeout(function(){t.checkFilters(e,r,i)},o?l.filter_searchDelay:10):t.checkFilters(e,r,i)},checkFilters:function(r,s,o){var l=r.config,n=l.widgetOptions,c=e.isArray(s),d=c?s:a.getFilters(r,!0),u=(d||[]).join("");return e.isEmptyObject(l.cache)?void(l.delayInit&&(!l.pager||l.pager&&l.pager.initialized)&&a.updateCache(l,function(){t.checkFilters(r,!1,o)})):(c&&(a.setFilters(r,d,!1,o!==!0),n.filter_initialized||(l.lastCombinedFilter="")),n.filter_hideFilters&&l.$table.find("."+i.filterRow).triggerHandler(t.hideFiltersCheck(l)?"mouseleave":"mouseenter"),l.lastCombinedFilter!==u||s===!1?(s===!1&&(l.lastCombinedFilter=null,l.lastSearch=[]),d=d||[],d=Array.prototype.map?d.map(String):d.join("<22>").split("<22>"),n.filter_initialized&&l.$table.triggerHandler("filterStart",[d]),l.showProcessing?void setTimeout(function(){return t.findRows(r,d,u),!1},30):(t.findRows(r,d,u),!1)):void 0)},hideFiltersCheck:function(e){if("function"==typeof e.widgetOptions.filter_hideFilters){var t=e.widgetOptions.filter_hideFilters(e);if("boolean"==typeof t)return t}return""===a.getFilters(e.$table).join("")},hideFilters:function(r,a){var s;(a||r.$table).find("."+i.filterRow).addClass(i.filterRowHide).bind("mouseenter mouseleave",function(a){var o=a,l=e(this);clearTimeout(s),s=setTimeout(function(){/enter|over/.test(o.type)?l.removeClass(i.filterRowHide):e(document.activeElement).closest("tr")[0]!==l[0]&&l.toggleClass(i.filterRowHide,t.hideFiltersCheck(r))},200)}).find("input, select").bind("focus blur",function(a){var o=a,l=e(this).closest("tr");clearTimeout(s),s=setTimeout(function(){clearTimeout(s),l.toggleClass(i.filterRowHide,t.hideFiltersCheck(r)&&"focus"!==o.type)},200)})},defaultFilter:function(t,a){if(""===t)return t;var i=r.iQuery,s=a.match(r.igQuery).length,o=s>1?e.trim(t).split(/\s/):[e.trim(t)],l=o.length-1,n=0,c=a;for(l<1&&s>1&&(o[1]=o[0]);i.test(c);)c=c.replace(i,o[n++]||""),i.test(c)&&n<l&&""!==(o[n]||"")&&(c=a.replace(i,c));return c},getLatestSearch:function(t){return t?t.sort(function(t,r){return e(r).attr("data-lastSearchTime")-e(t).attr("data-lastSearchTime")}):t||e()},findRange:function(e,t,r){var a,i,s,o,l,n,c,d,u,f=[];if(/^[0-9]+$/.test(t))return[parseInt(t,10)];if(!r&&/-/.test(t))for(i=t.match(/(\d+)\s*-\s*(\d+)/g),u=i?i.length:0,d=0;d<u;d++){for(s=i[d].split(/\s*-\s*/),o=parseInt(s[0],10)||0,l=parseInt(s[1],10)||e.columns-1,o>l&&(a=o,o=l,l=a),l>=e.columns&&(l=e.columns-1);o<=l;o++)f[f.length]=o;t=t.replace(i[d],"")}if(!r&&/,/.test(t))for(n=t.split(/\s*,\s*/),u=n.length,c=0;c<u;c++)""!==n[c]&&(d=parseInt(n[c],10),d<e.columns&&(f[f.length]=d));if(!f.length)for(d=0;d<e.columns;d++)f[f.length]=d;return f},getColumnElm:function(r,a,i){return a.filter(function(){var a=t.findRange(r,e(this).attr("data-column"));return e.inArray(i,a)>-1})},multipleColumns:function(r,a){var i=r.widgetOptions,s=i.filter_initialized||!a.filter(i.filter_anyColumnSelector).length,o=e.trim(t.getLatestSearch(a).attr("data-column")||"");return t.findRange(r,o,!s)},processTypes:function(r,a,i){var s,o=null,l=null;for(s in t.types)e.inArray(s,i.excludeMatch)<0&&null===l&&(l=t.types[s](r,a,i),null!==l&&(o=l));return o},matchType:function(e,t){var r,a=e.widgetOptions,s=e.$headerIndexed[t];return s.hasClass("filter-exact")?r=!1:s.hasClass("filter-match")?r=!0:(a.filter_columnFilters?s=e.$filters.find("."+i.filter).add(a.filter_$externalFilters).filter('[data-column="'+t+'"]'):a.filter_$externalFilters&&(s=a.filter_$externalFilters.filter('[data-column="'+t+'"]')),r=!!s.length&&"match"===e.widgetOptions.filter_matchType[(s[0].nodeName||"").toLowerCase()]),r},processRow:function(i,s,o){var l,n,c,d,u,f=i.widgetOptions,p=!0,g=f.filter_$anyMatch&&f.filter_$anyMatch.length,h=f.filter_$anyMatch&&f.filter_$anyMatch.length?t.multipleColumns(i,f.filter_$anyMatch):[];if(s.$cells=s.$row.children(),s.anyMatchFlag&&h.length>1||s.anyMatchFilter&&!g){if(s.anyMatch=!0,s.isMatch=!0,s.rowArray=s.$cells.map(function(t){if(e.inArray(t,h)>-1||s.anyMatchFilter&&!g)return s.parsed[t]?u=s.cacheArray[t]:(u=s.rawArray[t],u=e.trim(f.filter_ignoreCase?u.toLowerCase():u),i.sortLocaleCompare&&(u=a.replaceAccents(u))),u}).get(),s.filter=s.anyMatchFilter,s.iFilter=s.iAnyMatchFilter,s.exact=s.rowArray.join(" "),s.iExact=f.filter_ignoreCase?s.exact.toLowerCase():s.exact,s.cache=s.cacheArray.slice(0,-1).join(" "),o.excludeMatch=o.noAnyMatch,n=t.processTypes(i,s,o),null!==n)p=n;else if(f.filter_startsWith)for(p=!1,h=Math.min(i.columns,s.rowArray.length);!p&&h>0;)h--,p=p||0===s.rowArray[h].indexOf(s.iFilter);else p=(s.iExact+s.childRowText).indexOf(s.iFilter)>=0;if(s.anyMatch=!1,s.filters.join("")===s.filter)return p}for(h=0;h<i.columns;h++)s.filter=s.filters[h],s.index=h,o.excludeMatch=o.excludeFilter[h],s.filter&&(s.cache=s.cacheArray[h],l=s.parsed[h]?s.cache:s.rawArray[h]||"",s.exact=i.sortLocaleCompare?a.replaceAccents(l):l,s.iExact=!r.type.test(typeof s.exact)&&f.filter_ignoreCase?s.exact.toLowerCase():s.exact,s.isMatch=t.matchType(i,h),l=p,d=f.filter_columnFilters?i.$filters.add(f.filter_$externalFilters).filter('[data-column="'+h+'"]').find("select option:selected").attr("data-function-name")||"":"",i.sortLocaleCompare&&(s.filter=a.replaceAccents(s.filter)),f.filter_defaultFilter&&r.iQuery.test(o.defaultColFilter[h])&&(s.filter=t.defaultFilter(s.filter,o.defaultColFilter[h])),s.iFilter=f.filter_ignoreCase?(s.filter||"").toLowerCase():s.filter,c=o.functions[h],n=null,c&&(c===!0?n=s.isMatch?(""+s.iExact).search(s.iFilter)>=0:s.filter===s.exact:"function"==typeof c?n=c(s.exact,s.cache,s.filter,h,s.$row,i,s):"function"==typeof c[d||s.filter]&&(u=d||s.filter,n=c[u](s.exact,s.cache,s.filter,h,s.$row,i,s))),null===n?(n=t.processTypes(i,s,o),null!==n?l=n:(u=(s.iExact+s.childRowText).indexOf(t.parseFilter(i,s.iFilter,s)),l=!f.filter_startsWith&&u>=0||f.filter_startsWith&&0===u)):l=n,p=!!l&&p);return p},findRows:function(i,s,o){if(i.config.lastCombinedFilter!==o&&i.config.widgetOptions.filter_initialized){var l,n,c,d,u,f,p,g,h,m,b,y,w,_,v,x,C,$,S,F,R,z,T,k,I=e.extend([],s),A=i.config,D=A.widgetOptions,E={anyMatch:!1,filters:s,filter_regexCache:[]},H={noAnyMatch:["range","operators"],functions:[],excludeFilter:[],defaultColFilter:[],defaultAnyFilter:a.getColumnData(i,D.filter_defaultFilter,A.columns,!0)||""};for(E.parsed=[],h=0;h<A.columns;h++)E.parsed[h]=D.filter_useParsedData||A.parsers&&A.parsers[h]&&A.parsers[h].parsed||a.getData&&"parsed"===a.getData(A.$headerIndexed[h],a.getColumnData(i,A.headers,h),"filter")||A.$headerIndexed[h].hasClass("filter-parsed"),H.functions[h]=a.getColumnData(i,D.filter_functions,h)||A.$headerIndexed[h].hasClass("filter-select"),H.defaultColFilter[h]=a.getColumnData(i,D.filter_defaultFilter,h)||"",H.excludeFilter[h]=(a.getColumnData(i,D.filter_excludeFilter,h,!0)||"").split(/\s+/);for(A.debug&&(console.log("Filter: Starting filter widget search",s),v=new Date),A.filteredRows=0,A.totalRows=0,o=(I||[]).join(""),p=0;p<A.$tbodies.length;p++){if(g=a.processTbody(i,A.$tbodies.eq(p),!0),h=A.columns,n=A.cache[p].normalized,d=e(e.map(n,function(e){return e[h].$row.get()})),""===o||D.filter_serversideFiltering)d.removeClass(D.filter_filteredRow).not("."+A.cssChildRow).css("display","");else{if(d=d.not("."+A.cssChildRow),l=d.length,(D.filter_$anyMatch&&D.filter_$anyMatch.length||"undefined"!=typeof s[A.columns])&&(E.anyMatchFlag=!0,E.anyMatchFilter=""+(s[A.columns]||D.filter_$anyMatch&&t.getLatestSearch(D.filter_$anyMatch).val()||""),D.filter_columnAnyMatch)){for(F=E.anyMatchFilter.split(r.andSplit),R=!1,C=0;C<F.length;C++)z=F[C].split(":"),z.length>1&&(isNaN(z[0])?e.each(A.headerContent,function(e,t){t.toLowerCase().indexOf(z[0])>-1&&(T=e,s[T]=z[1])}):T=parseInt(z[0],10)-1,T>=0&&T<A.columns&&(s[T]=z[1],F.splice(C,1),C--,R=!0));R&&(E.anyMatchFilter=F.join(" && "))}if(S=D.filter_searchFiltered,y=A.lastSearch||A.$table.data("lastSearch")||[],S)for(C=0;C<h+1;C++)x=s[C]||"",S||(C=h),S=S&&y.length&&0===x.indexOf(y[C]||"")&&!r.alreadyFiltered.test(x)&&!r.exactTest.test(x)&&!(r.isNeg1.test(x)||r.isNeg2.test(x))&&!(""!==x&&A.$filters&&A.$filters.filter('[data-column="'+C+'"]').find("select").length&&!t.matchType(A,C));for($=d.not("."+D.filter_filteredRow).length,S&&0===$&&(S=!1),A.debug&&console.log("Filter: Searching through "+(S&&$<l?$:"all")+" rows"),E.anyMatchFlag&&(A.sortLocaleCompare&&(E.anyMatchFilter=a.replaceAccents(E.anyMatchFilter)),D.filter_defaultFilter&&r.iQuery.test(H.defaultAnyFilter)&&(E.anyMatchFilter=t.defaultFilter(E.anyMatchFilter,H.defaultAnyFilter),S=!1),E.iAnyMatchFilter=D.filter_ignoreCase&&A.ignoreCase?E.anyMatchFilter.toLowerCase():E.anyMatchFilter),f=0;f<l;f++)if(k=d[f].className,m=f&&r.child.test(k),!(m||S&&r.filtered.test(k))){if(E.$row=d.eq(f),E.rowIndex=f,E.cacheArray=n[f],c=E.cacheArray[A.columns],E.rawArray=c.raw,E.childRowText="",!D.filter_childByColumn){for(k="",b=c.child,C=0;C<b.length;C++)k+=" "+b[C].join(" ")||"";E.childRowText=D.filter_childRows?D.filter_ignoreCase?k.toLowerCase():k:""}if(w=!1,_=t.processRow(A,E,H),u=c.$row,x=!!_,b=c.$row.filter(":gt(0)"),D.filter_childRows&&b.length){if(D.filter_childByColumn)for(D.filter_childWithSibs||(b.addClass(D.filter_filteredRow),u=u.eq(0)),C=0;C<b.length;C++)E.$row=b.eq(C),E.cacheArray=c.child[C],E.rawArray=E.cacheArray,x=t.processRow(A,E,H),w=w||x,!D.filter_childWithSibs&&x&&b.eq(C).removeClass(D.filter_filteredRow);w=w||_}else w=x;u.toggleClass(D.filter_filteredRow,!w)[0].display=w?"":"none"}}A.filteredRows+=d.not("."+D.filter_filteredRow).length,A.totalRows+=d.length,a.processTbody(i,g,!1)}A.lastCombinedFilter=o,A.lastSearch=I,A.$table.data("lastSearch",I),D.filter_saveFilters&&a.storage&&a.storage(i,"tablesorter-filters",t.processFilters(I,!0)),A.debug&&console.log("Completed filter widget search"+a.benchmark(v)),D.filter_initialized&&(A.$table.triggerHandler("filterBeforeEnd",A),A.$table.triggerHandler("filterEnd",A)),setTimeout(function(){a.applyWidget(A.table)},0)}},getOptionSource:function(r,i,s){r=e(r)[0];var o=r.config,l=o.widgetOptions,n=!1,c=l.filter_selectSource,d=o.$table.data("lastSearch")||[],u="function"==typeof c||a.getColumnData(r,c,i);if(s&&""!==d[i]&&(s=!1),u===!0)n=c(r,i,s);else{if(u instanceof e||"string"===e.type(u)&&u.indexOf("</option>")>=0)return u;e.isArray(u)?n=u:"object"===e.type(c)&&u&&(n=u(r,i,s))}return n===!1&&(n=t.getOptions(r,i,s)),t.processOptions(r,i,n)},processOptions:function(t,r,i){if(!e.isArray(i))return!1;t=e(t)[0];var s,o,l,n,c,d,u=t.config,f="undefined"!=typeof r&&null!==r&&r>=0&&r<u.columns,p=!!f&&u.$headerIndexed[r].hasClass("filter-select-sort-desc"),g=[];if(i=e.grep(i,function(t,r){return!!t.text||e.inArray(t,i)===r}),f&&u.$headerIndexed[r].hasClass("filter-select-nosort"))return i;for(n=i.length,l=0;l<n;l++)o=i[l],d=o.text?o.text:o,c=(f&&u.parsers&&u.parsers.length&&u.parsers[r].format(d,t,[],r)||d).toString(),c=u.widgetOptions.filter_ignoreCase?c.toLowerCase():c,o.text?(o.parsed=c,g[g.length]=o):g[g.length]={text:o,parsed:c};for(s=u.textSorter||"",g.sort(function(e,i){var o=p?i.parsed:e.parsed,l=p?e.parsed:i.parsed;return f&&"function"==typeof s?s(o,l,!0,r,t):f&&"object"==typeof s&&s.hasOwnProperty(r)?s[r](o,l,!0,r,t):!a.sortNatural||a.sortNatural(o,l)}),i=[],n=g.length,l=0;l<n;l++)i[i.length]=g[l];return i},getOptions:function(t,r,i){t=e(t)[0];var s,o,l,n,c,d,u,f,p=t.config,g=p.widgetOptions,h=[];for(o=0;o<p.$tbodies.length;o++)for(c=p.cache[o],l=p.cache[o].normalized.length,s=0;s<l;s++)if(n=c.row?c.row[s]:c.normalized[s][p.columns].$row[0],!i||!n.className.match(g.filter_filteredRow))if(g.filter_useParsedData||p.parsers[r].parsed||p.$headerIndexed[r].hasClass("filter-parsed")){if(h[h.length]=""+c.normalized[s][r],g.filter_childRows&&g.filter_childByColumn)for(f=c.normalized[s][p.columns].$row.length-1,d=0;d<f;d++)h[h.length]=""+c.normalized[s][p.columns].child[d][r]}else if(h[h.length]=c.normalized[s][p.columns].raw[r],g.filter_childRows&&g.filter_childByColumn)for(f=c.normalized[s][p.columns].$row.length,d=1;d<f;d++)u=c.normalized[s][p.columns].$row.eq(d).children().eq(r),h[h.length]=""+a.getElementText(p,u,r);return h},buildSelect:function(a,s,o,l,n){if(a=e(a)[0],s=parseInt(s,10),a.config.cache&&!e.isEmptyObject(a.config.cache)){var c,d,u,f,p,g,h,m=a.config,b=m.widgetOptions,y=m.$headerIndexed[s],w='<option value="">'+(y.data("placeholder")||y.attr("data-placeholder")||b.filter_placeholder.select||"")+"</option>",_=m.$table.find("thead").find("select."+i.filter+'[data-column="'+s+'"]').val();if("undefined"!=typeof o&&""!==o||(o=t.getOptionSource(a,s,n)),e.isArray(o)){for(c=0;c<o.length;c++)if(h=o[c],h.text){h["data-function-name"]="undefined"==typeof h.value?h.text:h.value,w+="<option";for(d in h)h.hasOwnProperty(d)&&"text"!==d&&(w+=" "+d+'="'+h[d]+'"');h.value||(w+=' value="'+h.text+'"'),w+=">"+h.text+"</option>"}else""+h!="[object Object]"&&(u=h=(""+h).replace(r.quote,"&quot;"),d=u,u.indexOf(b.filter_selectSourceSeparator)>=0&&(f=u.split(b.filter_selectSourceSeparator),d=f[0],u=f[1]),w+=""!==h?"<option "+(d===u?"":'data-function-name="'+h+'" ')+'value="'+d+'">'+u+"</option>":"");o=[]}p=(m.$filters?m.$filters:m.$table.children("thead")).find("."+i.filter),b.filter_$externalFilters&&(p=p&&p.length?p.add(b.filter_$externalFilters):b.filter_$externalFilters),g=p.filter('select[data-column="'+s+'"]'),g.length&&(g[l?"html":"append"](w),e.isArray(o)||g.append(o).val(_),g.val(_))}},buildDefault:function(e,r){var i,s,o,l=e.config,n=l.widgetOptions,c=l.columns;for(i=0;i<c;i++)s=l.$headerIndexed[i],o=!(s.hasClass("filter-false")||s.hasClass("parser-false")),(s.hasClass("filter-select")||a.getColumnData(e,n.filter_functions,i)===!0)&&o&&t.buildSelect(e,i,"",r,s.hasClass(n.filter_onlyAvail))}},r=t.regex,a.getFilters=function(r,a,s,o){var l,n,c,d,u=[],f=r?e(r)[0].config:"",p=f?f.widgetOptions:"";if(a!==!0&&p&&!p.filter_columnFilters||e.isArray(s)&&s.join("")===f.lastCombinedFilter)return e(r).data("lastSearch");if(f&&(f.$filters&&(n=f.$filters.find("."+i.filter)),p.filter_$externalFilters&&(n=n&&n.length?n.add(p.filter_$externalFilters):p.filter_$externalFilters),n&&n.length))for(u=s||[],l=0;l<f.columns+1;l++)d=l===f.columns?p.filter_anyColumnSelector+","+p.filter_multipleColumnSelector:'[data-column="'+l+'"]',c=n.filter(d),c.length&&(c=t.getLatestSearch(c),e.isArray(s)?(o&&c.length>1&&(c=c.slice(1)),l===f.columns&&(d=c.filter(p.filter_anyColumnSelector),c=d.length?d:c),c.val(s[l]).trigger("change"+f.namespace)):(u[l]=c.val()||"",l===f.columns?c.slice(1).filter('[data-column*="'+c.attr("data-column")+'"]').val(u[l]):c.slice(1).val(u[l])),l===f.columns&&c.length&&(p.filter_$anyMatch=c));return u},a.setFilters=function(r,i,s,o){var l=r?e(r)[0].config:"",n=a.getFilters(r,!0,i,o);return"undefined"==typeof s&&(s=!0),l&&s&&(l.lastCombinedFilter=null,l.lastSearch=[],t.searching(l.table,i,o),l.$table.triggerHandler("filterFomatterUpdate")),0!==n.length}}(e),function(e,t){"use strict";var r=e.tablesorter||{};e.extend(r.css,{sticky:"tablesorter-stickyHeader",stickyVis:"tablesorter-sticky-visible",stickyHide:"tablesorter-sticky-hidden",stickyWrap:"tablesorter-sticky-wrapper"}),r.addHeaderResizeEvent=function(t,r,a){if(t=e(t)[0],t.config){var i={timer:250},s=e.extend({},i,a),o=t.config,l=o.widgetOptions,n=function(e){var t,r,a,i,s,n,c=o.$headers.length;for(l.resize_flag=!0,r=[],t=0;t<c;t++)a=o.$headers.eq(t),i=a.data("savedSizes")||[0,0],s=a[0].offsetWidth,n=a[0].offsetHeight,s===i[0]&&n===i[1]||(a.data("savedSizes",[s,n]),r.push(a[0]));r.length&&e!==!1&&o.$table.triggerHandler("resize",[r]),l.resize_flag=!1};if(clearInterval(l.resize_timer),r)return l.resize_flag=!1,!1;n(!1),l.resize_timer=setInterval(function(){l.resize_flag||n()},s.timer)}},r.addWidget({id:"stickyHeaders",priority:54,options:{stickyHeaders:"",stickyHeaders_appendTo:null,stickyHeaders_attachTo:null,stickyHeaders_xScroll:null,stickyHeaders_yScroll:null,stickyHeaders_offset:0,stickyHeaders_filteredToTop:!0,stickyHeaders_cloneId:"-sticky",stickyHeaders_addResizeEvent:!0,stickyHeaders_includeCaption:!0,stickyHeaders_zIndex:2},format:function(a,i,s){if(!(i.$table.hasClass("hasStickyHeaders")||e.inArray("filter",i.widgets)>=0&&!i.$table.hasClass("hasFilters"))){var o,l,n,c,d=i.$table,u=e(s.stickyHeaders_attachTo),f=i.namespace+"stickyheaders ",p=e(s.stickyHeaders_yScroll||s.stickyHeaders_attachTo||t),g=e(s.stickyHeaders_xScroll||s.stickyHeaders_attachTo||t),h=d.children("thead:first"),m=h.children("tr").not(".sticky-false").children(),b=d.children("tfoot"),y=isNaN(s.stickyHeaders_offset)?e(s.stickyHeaders_offset):"",w=y.length?y.height()||0:parseInt(s.stickyHeaders_offset,10)||0,_=d.parent().closest("."+r.css.table).hasClass("hasStickyHeaders")?d.parent().closest("table.tablesorter")[0].config.widgetOptions.$sticky.parent():[],v=_.length?_.height():0,x=s.$sticky=d.clone().addClass("containsStickyHeaders "+r.css.sticky+" "+s.stickyHeaders+" "+i.namespace.slice(1)+"_extra_table").wrap('<div class="'+r.css.stickyWrap+'">'),C=x.parent().addClass(r.css.stickyHide).css({position:u.length?"absolute":"fixed",padding:parseInt(x.parent().parent().css("padding-left"),10),top:w+v,left:0,visibility:"hidden",zIndex:s.stickyHeaders_zIndex||2}),$=x.children("thead:first"),S="",F=0,R=function(e,r){var a,i,s,o,l,n=e.filter(":visible"),c=n.length;for(a=0;a<c;a++)o=r.filter(":visible").eq(a),l=n.eq(a),"border-box"===l.css("box-sizing")?i=l.outerWidth():"collapse"===o.css("border-collapse")?t.getComputedStyle?i=parseFloat(t.getComputedStyle(l[0],null).width):(s=parseFloat(l.css("border-width")),i=l.outerWidth()-parseFloat(l.css("padding-left"))-parseFloat(l.css("padding-right"))-s):i=l.width(),o.css({width:i,"min-width":i,"max-width":i})},z=function(){w=y.length?y.height()||0:parseInt(s.stickyHeaders_offset,10)||0,F=0,C.css({left:u.length?parseInt(u.css("padding-left"),10)||0:d.offset().left-parseInt(d.css("margin-left"),10)-g.scrollLeft()-F,width:d.outerWidth()}),R(d,x),R(m,c)},T=function(t){if(d.is(":visible")){v=_.length?_.offset().top-p.scrollTop()+_.height():0;var a=d.offset(),i=e.isWindow(p[0]),o=e.isWindow(g[0]),l=u.length?i?p.scrollTop():p.offset().top:p.scrollTop(),n=s.stickyHeaders_includeCaption?0:d.children("caption").height()||0,c=l+w+v-n,f=d.height()-(C.height()+(b.height()||0))-n,h=c>a.top&&c<a.top+f?"visible":"hidden",m={visibility:h};u.length&&(m.top=i?c-u.offset().top:u.scrollTop()),o&&(m.left=d.offset().left-parseInt(d.css("margin-left"),10)-g.scrollLeft()-F),_.length&&(m.top=(m.top||0)+w+v),C.removeClass(r.css.stickyVis+" "+r.css.stickyHide).addClass("visible"===h?r.css.stickyVis:r.css.stickyHide).css(m),(h!==S||t)&&(z(),S=h)}};if(u.length&&!u.css("position")&&u.css("position","relative"),x.attr("id")&&(x[0].id+=s.stickyHeaders_cloneId),x.find("thead:gt(0), tr.sticky-false").hide(),x.find("tbody, tfoot").remove(),x.find("caption").toggle(s.stickyHeaders_includeCaption),c=$.children().children(),x.css({height:0,width:0,margin:0}),c.find("."+r.css.resizer).remove(),d.addClass("hasStickyHeaders").bind("pagerComplete"+f,function(){z()}),r.bindEvents(a,$.children().children("."+r.css.header)),s.stickyHeaders_appendTo?e(s.stickyHeaders_appendTo).append(C):d.after(C),i.onRenderHeader)for(n=$.children("tr").children(),l=n.length,o=0;o<l;o++)i.onRenderHeader.apply(n.eq(o),[o,i,x]);g.add(p).unbind("scroll resize ".split(" ").join(f).replace(/\s+/g," ")).bind("scroll resize ".split(" ").join(f),function(e){T("resize"===e.type)}),i.$table.unbind("stickyHeadersUpdate"+f).bind("stickyHeadersUpdate"+f,function(){T(!0)}),s.stickyHeaders_addResizeEvent&&r.addHeaderResizeEvent(a),d.hasClass("hasFilters")&&s.filter_columnFilters&&(d.bind("filterEnd"+f,function(){var a=e(document.activeElement).closest("td"),o=a.parent().children().index(a);C.hasClass(r.css.stickyVis)&&s.stickyHeaders_filteredToTop&&(t.scrollTo(0,d.position().top),o>=0&&i.$filters&&i.$filters.eq(o).find("a, select, input").filter(":visible").focus())}),r.filter.bindSearch(d,c.find("."+r.css.filter)),s.filter_hideFilters&&r.filter.hideFilters(i,x)),s.stickyHeaders_addResizeEvent&&d.bind("resize"+i.namespace+"stickyheaders",function(){z()}),d.triggerHandler("stickyHeadersInit")}},remove:function(a,i,s){var o=i.namespace+"stickyheaders ";i.$table.removeClass("hasStickyHeaders").unbind("pagerComplete resize filterEnd stickyHeadersUpdate ".split(" ").join(o).replace(/\s+/g," ")).next("."+r.css.stickyWrap).remove(),s.$sticky&&s.$sticky.length&&s.$sticky.remove(),e(t).add(s.stickyHeaders_xScroll).add(s.stickyHeaders_yScroll).add(s.stickyHeaders_attachTo).unbind("scroll resize ".split(" ").join(o).replace(/\s+/g," ")),r.addHeaderResizeEvent(a,!0)}})}(e,window),function(e,t){"use strict";var r=e.tablesorter||{};e.extend(r.css,{resizableContainer:"tablesorter-resizable-container",resizableHandle:"tablesorter-resizable-handle",resizableNoSelect:"tablesorter-disableSelection",resizableStorage:"tablesorter-resizable"}),e(function(){var t="<style>body."+r.css.resizableNoSelect+" { -ms-user-select: none; -moz-user-select: -moz-none;-khtml-user-select: none; -webkit-user-select: none; user-select: none; }."+r.css.resizableContainer+" { position: relative; height: 1px; }."+r.css.resizableHandle+" { position: absolute; display: inline-block; width: 8px;top: 1px; cursor: ew-resize; z-index: 3; user-select: none; -moz-user-select: none; }</style>";e("head").append(t)}),r.resizable={init:function(t,a){if(!t.$table.hasClass("hasResizable")){t.$table.addClass("hasResizable");var i,s,o,l,n,c=t.$table,d=c.parent(),u=parseInt(c.css("margin-top"),10),f=a.resizable_vars={useStorage:r.storage&&a.resizable!==!1,$wrap:d,mouseXPosition:0,$target:null,$next:null,overflow:"auto"===d.css("overflow")||"scroll"===d.css("overflow")||"auto"===d.css("overflow-x")||"scroll"===d.css("overflow-x"),storedSizes:[]};for(r.resizableReset(t.table,!0),f.tableWidth=c.width(),f.fullWidth=Math.abs(d.width()-f.tableWidth)<20,f.useStorage&&f.overflow&&(r.storage(t.table,"tablesorter-table-original-css-width",f.tableWidth),n=r.storage(t.table,"tablesorter-table-resized-width")||"auto",r.resizable.setWidth(c,n,!0)),a.resizable_vars.storedSizes=l=(f.useStorage?r.storage(t.table,r.css.resizableStorage):[])||[],r.resizable.setWidths(t,a,l),r.resizable.updateStoredSizes(t,a),a.$resizable_container=e('<div class="'+r.css.resizableContainer+'">').css({top:u}).insertBefore(c),o=0;o<t.columns;o++)s=t.$headerIndexed[o],n=r.getColumnData(t.table,t.headers,o),i="false"===r.getData(s,n,"resizable"),i||e('<div class="'+r.css.resizableHandle+'">').appendTo(a.$resizable_container).attr({"data-column":o,unselectable:"on"}).data("header",s).bind("selectstart",!1);r.resizable.bindings(t,a)}},updateStoredSizes:function(e,t){var r,a,i=e.columns,s=t.resizable_vars;for(s.storedSizes=[],r=0;r<i;r++)a=e.$headerIndexed[r],s.storedSizes[r]=a.is(":visible")?a.width():0},setWidth:function(e,t,r){e.css({width:t,"min-width":r?t:"","max-width":r?t:""})},setWidths:function(t,a,i){var s,o,l=a.resizable_vars,n=e(t.namespace+"_extra_headers"),c=t.$table.children("colgroup").children("col");if(i=i||l.storedSizes||[],i.length){for(s=0;s<t.columns;s++)r.resizable.setWidth(t.$headerIndexed[s],i[s],l.overflow),n.length&&(o=n.eq(s).add(c.eq(s)),r.resizable.setWidth(o,i[s],l.overflow));o=e(t.namespace+"_extra_table"),o.length&&!r.hasWidget(t.table,"scroller")&&r.resizable.setWidth(o,t.$table.outerWidth(),l.overflow)}},setHandlePosition:function(t,a){var i,s=t.$table.height(),o=a.$resizable_container.children(),l=Math.floor(o.width()/2);r.hasWidget(t.table,"scroller")&&(s=0,t.$table.closest("."+r.css.scrollerWrap).children().each(function(){var t=e(this);s+=t.filter('[style*="height"]').length?t.height():t.children("table").height()})),i=t.$table.position().left,o.each(function(){var r=e(this),o=parseInt(r.attr("data-column"),10),n=t.columns-1,c=r.data("header");c&&(c.is(":visible")?(o<n||o===n&&a.resizable_addLastColumn)&&r.css({display:"inline-block",height:s,left:c.position().left-i+c.outerWidth()-l}):r.hide())})},toggleTextSelection:function(t,a,i){var s=t.namespace+"tsresize";a.resizable_vars.disabled=i,e("body").toggleClass(r.css.resizableNoSelect,i),i?e("body").attr("unselectable","on").bind("selectstart"+s,!1):e("body").removeAttr("unselectable").unbind("selectstart"+s)},bindings:function(a,i){var s=a.namespace+"tsresize";i.$resizable_container.children().bind("mousedown",function(t){var s,o=i.resizable_vars,l=e(a.namespace+"_extra_headers"),n=e(t.target).data("header");s=parseInt(n.attr("data-column"),10),o.$target=n=n.add(l.filter('[data-column="'+s+'"]')),o.target=s,o.$next=t.shiftKey||i.resizable_targetLast?n.parent().children().not(".resizable-false").filter(":last"):n.nextAll(":not(.resizable-false)").eq(0),s=parseInt(o.$next.attr("data-column"),10),o.$next=o.$next.add(l.filter('[data-column="'+s+'"]')),o.next=s,o.mouseXPosition=t.pageX,r.resizable.updateStoredSizes(a,i),r.resizable.toggleTextSelection(a,i,!0)}),e(document).bind("mousemove"+s,function(e){var t=i.resizable_vars;t.disabled&&0!==t.mouseXPosition&&t.$target&&(i.resizable_throttle?(clearTimeout(t.timer),t.timer=setTimeout(function(){r.resizable.mouseMove(a,i,e)},isNaN(i.resizable_throttle)?5:i.resizable_throttle)):r.resizable.mouseMove(a,i,e))}).bind("mouseup"+s,function(){i.resizable_vars.disabled&&(r.resizable.toggleTextSelection(a,i,!1),r.resizable.stopResize(a,i),r.resizable.setHandlePosition(a,i))}),e(t).bind("resize"+s+" resizeEnd"+s,function(){r.resizable.setHandlePosition(a,i)}),a.$table.bind("columnUpdate"+s+" pagerComplete"+s,function(){r.resizable.setHandlePosition(a,i)}).find("thead:first").add(e(a.namespace+"_extra_table").find("thead:first")).bind("contextmenu"+s,function(){var e=0===i.resizable_vars.storedSizes.length;return r.resizableReset(a.table),r.resizable.setHandlePosition(a,i),i.resizable_vars.storedSizes=[],e})},mouseMove:function(t,a,i){if(0!==a.resizable_vars.mouseXPosition&&a.resizable_vars.$target){var s,o=0,l=a.resizable_vars,n=l.$next,c=l.storedSizes[l.target],d=i.pageX-l.mouseXPosition;if(l.overflow){if(c+d>0){for(l.storedSizes[l.target]+=d,r.resizable.setWidth(l.$target,l.storedSizes[l.target],!0),s=0;s<t.columns;s++)o+=l.storedSizes[s];r.resizable.setWidth(t.$table.add(e(t.namespace+"_extra_table")),o)}n.length||(l.$wrap[0].scrollLeft=t.$table.width())}else l.fullWidth?(l.storedSizes[l.target]+=d,l.storedSizes[l.next]-=d,r.resizable.setWidths(t,a)):(l.storedSizes[l.target]+=d,r.resizable.setWidths(t,a));l.mouseXPosition=i.pageX,t.$table.triggerHandler("stickyHeadersUpdate")}},stopResize:function(e,t){var a=t.resizable_vars;r.resizable.updateStoredSizes(e,t),a.useStorage&&(r.storage(e.table,r.css.resizableStorage,a.storedSizes),r.storage(e.table,"tablesorter-table-resized-width",e.$table.width())),a.mouseXPosition=0,a.$target=a.$next=null,e.$table.triggerHandler("stickyHeadersUpdate")}},r.addWidget({id:"resizable",priority:40,options:{resizable:!0,resizable_addLastColumn:!1,resizable_widths:[],resizable_throttle:!1,resizable_targetLast:!1,resizable_fullWidth:null},init:function(e,t,a,i){r.resizable.init(a,i)},format:function(e,t,a){r.resizable.setHandlePosition(t,a)},remove:function(t,a,i,s){if(i.$resizable_container){var o=a.namespace+"tsresize";a.$table.add(e(a.namespace+"_extra_table")).removeClass("hasResizable").children("thead").unbind("contextmenu"+o),i.$resizable_container.remove(),r.resizable.toggleTextSelection(a,i,!1),r.resizableReset(t,s),e(document).unbind("mousemove"+o+" mouseup"+o)}}}),r.resizableReset=function(t,a){e(t).each(function(){var e,i,s=this.config,o=s&&s.widgetOptions,l=o.resizable_vars;if(t&&s&&s.$headerIndexed.length){for(l.overflow&&l.tableWidth&&(r.resizable.setWidth(s.$table,l.tableWidth,!0),l.useStorage&&r.storage(t,"tablesorter-table-resized-width","auto")),e=0;e<s.columns;e++)i=s.$headerIndexed[e],o.resizable_widths&&o.resizable_widths[e]?r.resizable.setWidth(i,o.resizable_widths[e],l.overflow):i.hasClass("resizable-false")||r.resizable.setWidth(i,"",l.overflow);s.$table.triggerHandler("stickyHeadersUpdate"),r.storage&&!a&&r.storage(this,r.css.resizableStorage,{})}})}}(e,window),function(e){"use strict";var t=e.tablesorter||{};t.addWidget({id:"saveSort",priority:20,options:{saveSort:!0},init:function(e,t,r,a){t.format(e,r,a,!0)},format:function(r,a,i,s){var o,l,n=a.$table,c=i.saveSort!==!1,d={sortList:a.sortList};a.debug&&(l=new Date),n.hasClass("hasSaveSort")?c&&r.hasInitialized&&t.storage&&(t.storage(r,"tablesorter-savesort",d),a.debug&&console.log("saveSort widget: Saving last sort: "+a.sortList+t.benchmark(l))):(n.addClass("hasSaveSort"),d="",t.storage&&(o=t.storage(r,"tablesorter-savesort"),d=o&&o.hasOwnProperty("sortList")&&e.isArray(o.sortList)?o.sortList:"",a.debug&&console.log('saveSort: Last sort loaded: "'+d+'"'+t.benchmark(l)),n.bind("saveSortReset",function(e){e.stopPropagation(),t.storage(r,"tablesorter-savesort","")})),s&&d&&d.length>0?a.sortList=d:r.hasInitialized&&d&&d.length>0&&t.sortOn(a,d))},remove:function(e,r){r.$table.removeClass("hasSaveSort"),t.storage&&t.storage(e,"tablesorter-savesort","")}})}(e),e.tablesorter}),!function(e){"use strict";var t=e.tablesorter,r=t.grouping={types:{number:function(e,r,a,i){var s,o=r.hasClass(t.css.sortAsc);return i>1&&""!==a?(s=o?Math.floor(parseFloat(a)/i)*i:Math.ceil(parseFloat(a)/i)*i,s+=" - "+(s+(i-1)*(o?1:-1))):s=parseFloat(a)||a,s},separator:function(t,r,a,i){var s=(a+"").split(t.widgetOptions.group_separator);return e.trim(s[i-1]||"")},text:function(e,t,r){return r},word:function(e,t,r,a){var i=(r+" ").match(/\w+/g)||[];return i[a-1]||""},letter:function(e,t,r,a){return r?(r+" ").substring(0,a):""},date:function(e,t,a,i,s){var o,l,n=e.widgetOptions,c=new Date(a||"");return c instanceof Date&&isFinite(c)?(o=c.getFullYear(),l=r.findMonth(n,c.getMonth()),"year"===i?o:"month"===i?l:"monthyear"===i?l+" "+o:"day"===i?l+" "+c.getDate():"week"===i?r.findWeek(n,c.getDay()):"time"===i?r.findTime(n,c):"hour"===i?r.findTime(n,c,"hour"):n.group_dateString(c,e,t)):n.group_dateInvalid}},findMonth:function(e,t){return e.group_months[t+(""===(e.group_months[0]||"")?1:0)]},findWeek:function(t,r){if(e.isArray(t.group_week))return t.group_week[r];if(!e.isEmptyObject(t.group_week)){var a=["sun","mon","tue","wed","thu","fri","sat"];return t.group_week[a[r]]}},findTime:function(e,t,r){var a,i=e.group_time.am&&e.group_time.pm,s=t.getHours(),o=s>=12?1:0,l=e.group_time24Hour&&s>12?s-12:e.group_time24Hour&&0===s?s+12:s,n=("00"+l).slice(-2),c=("00"+t.getMinutes()).slice(-2);return a=e.group_time[i?["am","pm"][o]:o],"hour"===r?n:n+":"+c+(e.group_time24Hour?"":" "+(a||""))},update:function(t){if(!e.isEmptyObject(t.config.cache)){var a=t.config,i=a.widgetOptions,s="undefined"!=typeof a.sortList[0],o={},l=e.isArray(i.group_forceColumn)&&"undefined"!=typeof i.group_forceColumn[0]?i.group_enforceSort&&!s?-1:i.group_forceColumn[0]:s?a.sortList[0][0]:-1;a.$table.find("tr.group-hidden").removeClass("group-hidden").end().find("tr.group-header").remove(),i.group_collapsible&&a.$table.data("pagerSavedHeight",0),l>=0&&l<a.columns&&!a.$headerIndexed[l].hasClass("group-false")&&(i.group_collapsedGroup="",i.group_collapsedGroups={},o.column=l,o.groupClass=(a.$headerIndexed[l].attr("class")||"").match(/(group-\w+(-\w+)?)/g),o.grouping=o.groupClass?o.groupClass[0].split("-"):["group","letter",1],o.savedGroup=r.saveCurrentGrouping(a,i,o),r.findColumnGroups(a,i,o),r.processHeaders(a,i,o),a.$table.triggerHandler(i.group_complete))}},processHeaders:function(t,r,a){var i,s,o,l,n,c,d=t.$table.find("tr.group-header"),u=d.length;for(d.bind("selectstart",!1),i=0;i<u;i++)c=d.eq(i),n=c.nextUntil("tr.group-header").filter(":visible"),(r.group_count||e.isFunction(r.group_callback))&&(o=c.find(".group-count"),o.length&&(r.group_count&&o.html(r.group_count.toString().replace(/\{num\}/g,n.length)),
e.isFunction(r.group_callback)&&r.group_callback(c.find("td"),n,a.column,t.table))),r.group_saveGroups&&!e.isEmptyObject(r.group_collapsedGroups)&&r.group_collapsedGroups[r.group_collapsedGroup].length?(l=c.find(".group-name").text().toLowerCase()+c.attr("data-group-index"),s=e.inArray(l,r.group_collapsedGroups[r.group_collapsedGroup])>-1,c.toggleClass("collapsed",s),n.toggleClass("group-hidden",s)):r.group_collapsed&&r.group_collapsible&&(c.addClass("collapsed"),n.addClass("group-hidden"))},groupHeaderHTML:function(e,t,r){var a=(r.currentGroup||"").toString().replace(/</g,"&lt;").replace(/>/g,"&gt;");return'<tr class="group-header '+e.selectorRemove.slice(1)+'" unselectable="on" '+(e.tabIndex?'tabindex="0" ':"")+'data-group-index="'+r.groupIndex+'"><td colspan="'+e.columns+'">'+(t.group_collapsible?"<i/>":"")+'<span class="group-name">'+a+'</span><span class="group-count"></span></td></tr>'},saveCurrentGrouping:function(e,r,a){var i,s,o=!1;return r.group_collapsible&&r.group_saveGroups&&(r.group_collapsedGroups=t.storage&&t.storage(e.table,"tablesorter-groups")||{},s="dir"+e.sortList[0][1],i=r.group_collapsedGroup=""+e.sortList[0][0]+s+a.grouping.join(""),r.group_collapsedGroups[i]?o=!0:r.group_collapsedGroups[i]=[]),o},findColumnGroups:function(e,a,i){var s,o,l,n,c,d=t.hasWidget(e.table,"pager"),u=e.pager||{};for(i.groupIndex=0,s=0;s<e.$tbodies.length;s++)for(o=e.cache[s].normalized,i.group=c,l=d&&!u.ajax?u.startRow-1:0,n=d?u.endRow-(u.ajax?u.startRow:0):o.length;l<n;l++)i.rowData=o[l],i.rowData&&(i.$row=i.rowData[e.columns].$row,i.$row.is(":visible")&&r.types[i.grouping[1]]&&r.insertGroupHeader(e,a,i))},insertGroupHeader:function(t,a,i){var s=t.$headerIndexed[i.column],o=i.rowData[i.column],l=/date/.test(i.groupClass)?i.grouping[2]:parseInt(i.grouping[2]||1,10)||1;i.currentGroup=i.rowData?r.types[i.grouping[1]](t,s,o,l,i.group):i.currentGroup,i.group!==i.currentGroup&&(i.group=i.currentGroup,e.isFunction(a.group_formatter)&&(i.currentGroup=a.group_formatter((i.group||"").toString(),i.column,t.table,t,a,i)||i.group),i.$row.first().before(r.groupHeaderHTML(t,a,i)),a.group_saveGroups&&!i.savedGroup&&a.group_collapsed&&a.group_collapsible&&a.group_collapsedGroups[a.group_collapsedGroup].push(i.currentGroup+i.groupIndex),i.groupIndex++)},bindEvents:function(a,i,s){s.group_collapsible&&(s.group_collapsedGroups=[],i.$table.on("click toggleGroup keyup","tr.group-header",function(r){if(r.stopPropagation(),"keyup"!==r.type||13===r.which){var o,l,n,c=e(this),d=c.find(".group-name").text().toLowerCase()+c.attr("data-group-index");!r.shiftKey||"click"!==r.type&&"keyup"!==r.type||c.siblings(".group-header").trigger("toggleGroup"),c.toggleClass("collapsed"),c.nextUntil("tr.group-header").toggleClass("group-hidden",c.hasClass("collapsed")),o=c.hasClass("collapsed"),!o&&t.hasWidget(i.$table,"zebra")&&t.applyWidgetId(i.$table,"zebra"),s.group_saveGroups&&t.storage&&(l=i.$table.find(".group-header"),s.group_collapsedGroups[s.group_collapsedGroup]||(s.group_collapsedGroups[s.group_collapsedGroup]=[]),o&&s.group_collapsedGroup?s.group_collapsedGroups[s.group_collapsedGroup].push(d):s.group_collapsedGroup&&(n=e.inArray(d,s.group_collapsedGroups[s.group_collapsedGroup]),n>-1&&s.group_collapsedGroups[s.group_collapsedGroup].splice(n,1)),t.storage(a,"tablesorter-groups",s.group_collapsedGroups))}})),e(s.group_saveReset).on("click",function(){r.clearSavedGroups(a)}),i.$table.on("pagerChange.tsgrouping",function(){r.update(a)})},clearSavedGroups:function(e){e&&t.storage&&(t.storage(e,"tablesorter-groups",""),r.update(e))}};t.addWidget({id:"group",priority:100,options:{group_collapsible:!0,group_collapsed:!1,group_saveGroups:!0,group_saveReset:null,group_count:" ({num})",group_separator:"-",group_formatter:null,group_callback:null,group_complete:"groupingComplete",group_forceColumn:[],group_enforceSort:!0,group_checkbox:["checked","unchecked"],group_months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],group_week:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],group_time:["AM","PM"],group_time24Hour:!1,group_dateInvalid:"Invalid Date",group_dateString:function(e){return e.toLocaleString()}},init:function(e,t,a,i){r.bindEvents(e,a,i)},format:function(e,t,a){r.update(e)},remove:function(e,t,r){t.$table.off("click","tr.group-header").off("pagerChange.tsgrouping").find(".group-hidden").removeClass("group-hidden").end().find("tr.group-header").remove()}})}(jQuery),!function(e){"use strict";var t=e.tablesorter||{};t.themes={bootstrap:{table:"table table-bordered table-striped",caption:"caption",header:"bootstrap-header",sortNone:"",sortAsc:"",sortDesc:"",active:"",hover:"",icons:"",iconSortNone:"bootstrap-icon-unsorted",iconSortAsc:"icon-chevron-up glyphicon glyphicon-chevron-up",iconSortDesc:"icon-chevron-down glyphicon glyphicon-chevron-down",filterRow:"",footerRow:"",footerCells:"",even:"",odd:""},jui:{table:"ui-widget ui-widget-content ui-corner-all",caption:"ui-widget-content",header:"ui-widget-header ui-corner-all ui-state-default",sortNone:"",sortAsc:"",sortDesc:"",active:"ui-state-active",hover:"ui-state-hover",icons:"ui-icon",iconSortNone:"ui-icon-carat-2-n-s ui-icon-caret-2-n-s",iconSortAsc:"ui-icon-carat-1-n ui-icon-caret-1-n",iconSortDesc:"ui-icon-carat-1-s ui-icon-caret-1-s",filterRow:"",footerRow:"",footerCells:"",even:"ui-widget-content",odd:"ui-state-default"}},e.extend(t.css,{wrapper:"tablesorter-wrapper"}),t.addWidget({id:"uitheme",priority:10,format:function(r,a,i){var s,o,l,n,c,d,u,f,p,g,h,m,b,y=t.themes,w=a.$table.add(e(a.namespace+"_extra_table")),_=a.$headers.add(e(a.namespace+"_extra_headers")),v=a.theme||"jui",x=y[v]||{},C=e.trim([x.sortNone,x.sortDesc,x.sortAsc,x.active].join(" ")),$=e.trim([x.iconSortNone,x.iconSortDesc,x.iconSortAsc].join(" "));for(a.debug&&(c=new Date),w.hasClass("tablesorter-"+v)&&a.theme===a.appliedTheme&&i.uitheme_applied||(i.uitheme_applied=!0,g=y[a.appliedTheme]||{},b=!e.isEmptyObject(g),h=b?[g.sortNone,g.sortDesc,g.sortAsc,g.active].join(" "):"",m=b?[g.iconSortNone,g.iconSortDesc,g.iconSortAsc].join(" "):"",b&&(i.zebra[0]=e.trim(" "+i.zebra[0].replace(" "+g.even,"")),i.zebra[1]=e.trim(" "+i.zebra[1].replace(" "+g.odd,"")),a.$tbodies.children().removeClass([g.even,g.odd].join(" "))),x.even&&(i.zebra[0]+=" "+x.even),x.odd&&(i.zebra[1]+=" "+x.odd),w.children("caption").removeClass(g.caption||"").addClass(x.caption),f=w.removeClass((a.appliedTheme?"tablesorter-"+(a.appliedTheme||""):"")+" "+(g.table||"")).addClass("tablesorter-"+v+" "+(x.table||"")).children("tfoot"),a.appliedTheme=a.theme,f.length&&f.children("tr").removeClass(g.footerRow||"").addClass(x.footerRow).children("th, td").removeClass(g.footerCells||"").addClass(x.footerCells),_.removeClass((b?[g.header,g.hover,h].join(" "):"")||"").addClass(x.header).not(".sorter-false").unbind("mouseenter.tsuitheme mouseleave.tsuitheme").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(t){e(this)["mouseenter"===t.type?"addClass":"removeClass"](x.hover||"")}),_.each(function(){var r=e(this);r.find("."+t.css.wrapper).length||r.wrapInner('<div class="'+t.css.wrapper+'" style="position:relative;height:100%;width:100%"></div>')}),a.cssIcon&&_.find("."+t.css.icon).removeClass(b?[g.icons,m].join(" "):"").addClass(x.icons||""),t.hasWidget(a.table,"filter")&&(o=function(){w.children("thead").children("."+t.css.filterRow).removeClass(b?g.filterRow||"":"").addClass(x.filterRow||"")},i.filter_initialized?o():w.one("filterInit",function(){o()}))),s=0;s<a.columns;s++)d=a.$headers.add(e(a.namespace+"_extra_headers")).not(".sorter-false").filter('[data-column="'+s+'"]'),u=t.css.icon?d.find("."+t.css.icon):e(),p=_.not(".sorter-false").filter('[data-column="'+s+'"]:last'),p.length&&(d.removeClass(C),u.removeClass($),p[0].sortDisabled?u.removeClass(x.icons||""):(l=x.sortNone,n=x.iconSortNone,p.hasClass(t.css.sortAsc)?(l=[x.sortAsc,x.active].join(" "),n=x.iconSortAsc):p.hasClass(t.css.sortDesc)&&(l=[x.sortDesc,x.active].join(" "),n=x.iconSortDesc),d.addClass(l),u.addClass(n||"")));a.debug&&console.log("Applying "+v+" theme"+t.benchmark(c))},remove:function(e,r,a,i){if(a.uitheme_applied){var s=r.$table,o=r.appliedTheme||"jui",l=t.themes[o]||t.themes.jui,n=s.children("thead").children(),c=l.sortNone+" "+l.sortDesc+" "+l.sortAsc,d=l.iconSortNone+" "+l.iconSortDesc+" "+l.iconSortAsc;s.removeClass("tablesorter-"+o+" "+l.table),a.uitheme_applied=!1,i||(s.find(t.css.header).removeClass(l.header),n.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(l.hover+" "+c+" "+l.active).filter("."+t.css.filterRow).removeClass(l.filterRow),n.find("."+t.css.icon).removeClass(l.icons+" "+d))}}})}(jQuery),!function(e){"use strict";var t,r,a=e.tablesorter||{},i=a.css,s=a.keyCodes;e.extend(i,{filterRow:"tablesorter-filter-row",filter:"tablesorter-filter",filterDisabled:"disabled",filterRowHide:"hideme"}),e.extend(s,{backSpace:8,escape:27,space:32,left:37,down:40}),a.addWidget({id:"filter",priority:50,options:{filter_cellFilter:"",filter_childRows:!1,filter_childByColumn:!1,filter_childWithSibs:!0,filter_columnAnyMatch:!0,filter_columnFilters:!0,filter_cssFilter:"",filter_defaultAttrib:"data-value",filter_defaultFilter:{},filter_excludeFilter:{},filter_external:"",filter_filteredRow:"filtered",filter_formatter:null,filter_functions:null,filter_hideEmpty:!0,filter_hideFilters:!1,filter_ignoreCase:!0,filter_liveSearch:!0,filter_matchType:{input:"exact",select:"exact"},filter_onlyAvail:"filter-onlyAvail",filter_placeholder:{search:"",select:""},filter_reset:null,filter_resetOnEsc:!0,filter_saveFilters:!1,filter_searchDelay:300,filter_searchFiltered:!0,filter_selectSource:null,filter_selectSourceSeparator:"|",filter_serversideFiltering:!1,filter_startsWith:!1,filter_useParsedData:!1},format:function(e,r,a){r.$table.hasClass("hasFilters")||t.init(e,r,a)},remove:function(t,r,s,o){var l,n,c=r.$table,d=r.$tbodies,u="addRows updateCell update updateRows updateComplete appendCache filterReset filterEnd search ".split(" ").join(r.namespace+"filter ");if(c.removeClass("hasFilters").unbind(u.replace(a.regex.spaces," ")).find("."+i.filterRow).remove(),s.filter_initialized=!1,!o){for(l=0;l<d.length;l++)n=a.processTbody(t,d.eq(l),!0),n.children().removeClass(s.filter_filteredRow).show(),a.processTbody(t,n,!1);s.filter_reset&&e(document).undelegate(s.filter_reset,"click"+r.namespace+"filter")}}}),t=a.filter={regex:{regex:/^\/((?:\\\/|[^\/])+)\/([migyu]{0,5})?$/,child:/tablesorter-childRow/,filtered:/filtered/,type:/undefined|number/,exact:/(^[\"\'=]+)|([\"\'=]+$)/g,operators:/[<>=]/g,query:"(q|query)",wild01:/\?/g,wild0More:/\*/g,quote:/\"/g,isNeg1:/(>=?\s*-\d)/,isNeg2:/(<=?\s*\d)/},types:{or:function(e,a,i){if((r.orTest.test(a.iFilter)||r.orSplit.test(a.filter))&&!r.regex.test(a.filter)){var s,o,l,n,c=p.extend({},a),d=a.filter.split(r.orSplit),u=a.iFilter.split(r.orSplit),f=d.length;for(s=0;s<f;s++){c.nestedFilters=!0,c.filter=""+(t.parseFilter(e,d[s],a)||""),c.iFilter=""+(t.parseFilter(e,u[s],a)||""),l="("+(t.parseFilter(e,c.filter,a)||"")+")";try{if(n=new RegExp(a.isMatch?l:"^"+l+"$",e.widgetOptions.filter_ignoreCase?"i":""),o=n.test(c.exact)||t.processTypes(e,c,i))return o}catch(p){return null}}return o||!1}return null},and:function(e,a,i){if(r.andTest.test(a.filter)){var s,o,l,n,c,d=g.extend({},a),u=a.filter.split(r.andSplit),f=a.iFilter.split(r.andSplit),p=u.length;for(s=0;s<p;s++){d.nestedFilters=!0,d.filter=""+(t.parseFilter(e,u[s],a)||""),d.iFilter=""+(t.parseFilter(e,f[s],a)||""),n=("("+(t.parseFilter(e,d.filter,a)||"")+")").replace(r.wild01,"\\S{1}").replace(r.wild0More,"\\S*");try{c=new RegExp(a.isMatch?n:"^"+n+"$",e.widgetOptions.filter_ignoreCase?"i":""),l=c.test(d.exact)||t.processTypes(e,d,i),o=0===s?l:o&&l}catch(g){return null}}return o||!1}return null},regex:function(e,t){if(r.regex.test(t.filter)){var a,i=t.filter_regexCache[t.index]||r.regex.exec(t.filter),s=i instanceof RegExp;try{s||(t.filter_regexCache[t.index]=i=new RegExp(i[1],i[2])),a=i.test(t.exact)}catch(e){a=!1}return a}return null},operators:function(i,s){if(r.operTest.test(s.iFilter)&&""!==s.iExact){var o,l,n,c=i.table,d=s.parsed[s.index],u=a.formatFloat(s.iFilter.replace(r.operators,""),c),f=i.parsers[s.index]||{},p=u;return(d||"numeric"===f.type)&&(n=e.trim(""+s.iFilter.replace(r.operators,"")),l=t.parseFilter(i,n,s,!0),u="number"!=typeof l||""===l||isNaN(l)?u:l),!d&&"numeric"!==f.type||isNaN(u)||"undefined"==typeof s.cache?(n=isNaN(s.iExact)?s.iExact.replace(a.regex.nondigit,""):s.iExact,o=a.formatFloat(n,c)):o=s.cache,r.gtTest.test(s.iFilter)?l=r.gteTest.test(s.iFilter)?o>=u:o>u:r.ltTest.test(s.iFilter)&&(l=r.lteTest.test(s.iFilter)?o<=u:o<u),l||""!==p||(l=!0),l}return null},notMatch:function(a,i){if(r.notTest.test(i.iFilter)){var s,o=i.iFilter.replace("!",""),l=t.parseFilter(a,o,i)||"";return r.exact.test(l)?(l=l.replace(r.exact,""),""===l||e.trim(l)!==i.iExact):(s=i.iExact.search(e.trim(l)),""===l||(i.anyMatch?s<0:!(a.widgetOptions.filter_startsWith?0===s:s>=0)))}return null},exact:function(a,i){if(r.exact.test(i.iFilter)){var s=i.iFilter.replace(r.exact,""),o=t.parseFilter(a,s,i)||"";return i.anyMatch?e.inArray(o,i.rowArray)>=0:o==i.iExact}return null},range:function(e,i){if(r.toTest.test(i.iFilter)){var s,o,l,n,c=e.table,d=i.index,u=i.parsed[d],f=i.iFilter.split(r.toSplit);return o=f[0].replace(a.regex.nondigit,"")||"",l=a.formatFloat(t.parseFilter(e,o,i),c),o=f[1].replace(a.regex.nondigit,"")||"",n=a.formatFloat(t.parseFilter(e,o,i),c),(u||"numeric"===e.parsers[d].type)&&(s=e.parsers[d].format(""+f[0],c,e.$headers.eq(d),d),l=""===s||isNaN(s)?l:s,s=e.parsers[d].format(""+f[1],c,e.$headers.eq(d),d),n=""===s||isNaN(s)?n:s),!u&&"numeric"!==e.parsers[d].type||isNaN(l)||isNaN(n)?(o=isNaN(i.iExact)?i.iExact.replace(a.regex.nondigit,""):i.iExact,s=a.formatFloat(o,c)):s=i.cache,l>n&&(o=l,l=n,n=o),s>=l&&s<=n||""===l||""===n}return null},wild:function(e,a){if(r.wildOrTest.test(a.iFilter)){var i=""+(t.parseFilter(e,a.iFilter,a)||"");!r.wildTest.test(i)&&a.nestedFilters&&(i=a.isMatch?i:"^("+i+")$");try{return new RegExp(i.replace(r.wild01,"\\S{1}").replace(r.wild0More,"\\S*"),e.widgetOptions.filter_ignoreCase?"i":"").test(a.exact)}catch(e){return null}}return null},fuzzy:function(e,a){if(r.fuzzyTest.test(a.iFilter)){var i,s=0,o=a.iExact.length,l=a.iFilter.slice(1),n=t.parseFilter(e,l,a)||"";for(i=0;i<o;i++)a.iExact[i]===n[s]&&(s+=1);return s===n.length}return null}},init:function(s){a.language=e.extend(!0,{},{to:"to",or:"or",and:"and"},a.language);var o,l,n,c,d,u,f,p,g=s.config,h=g.widgetOptions;if(g.$table.addClass("hasFilters"),g.lastSearch=[],h.filter_searchTimer=null,h.filter_initTimer=null,h.filter_formatterCount=0,h.filter_formatterInit=[],h.filter_anyColumnSelector='[data-column="all"],[data-column="any"]',h.filter_multipleColumnSelector='[data-column*="-"],[data-column*=","]',u="\\{"+r.query+"\\}",e.extend(r,{child:new RegExp(g.cssChildRow),filtered:new RegExp(h.filter_filteredRow),alreadyFiltered:new RegExp("(\\s+("+a.language.or+"|-|"+a.language.to+")\\s+)","i"),toTest:new RegExp("\\s+(-|"+a.language.to+")\\s+","i"),toSplit:new RegExp("(?:\\s+(?:-|"+a.language.to+")\\s+)","gi"),andTest:new RegExp("\\s+("+a.language.and+"|&&)\\s+","i"),andSplit:new RegExp("(?:\\s+(?:"+a.language.and+"|&&)\\s+)","gi"),orTest:new RegExp("(\\||\\s+"+a.language.or+"\\s+)","i"),orSplit:new RegExp("(?:\\s+(?:"+a.language.or+")\\s+|\\|)","gi"),iQuery:new RegExp(u,"i"),igQuery:new RegExp(u,"ig"),operTest:/^[<>]=?/,gtTest:/>/,gteTest:/>=/,ltTest:/</,lteTest:/<=/,notTest:/^\!/,wildOrTest:/[\?\*\|]/,wildTest:/\?\*/,fuzzyTest:/^~/,exactTest:/[=\"\|!]/}),u=g.$headers.filter(".filter-false, .parser-false").length,h.filter_columnFilters!==!1&&u!==g.$headers.length&&t.buildRow(s,g,h),n="addRows updateCell update updateRows updateComplete appendCache filterReset "+"filterResetSaved filterEnd search ".split(" ").join(g.namespace+"filter "),g.$table.bind(n,function(r,o){return u=h.filter_hideEmpty&&e.isEmptyObject(g.cache)&&!(g.delayInit&&"appendCache"===r.type),g.$table.find("."+i.filterRow).toggleClass(h.filter_filteredRow,u),/(search|filter)/.test(r.type)||(r.stopPropagation(),t.buildDefault(s,!0)),"filterReset"===r.type?(g.$table.find("."+i.filter).add(h.filter_$externalFilters).val(""),t.searching(s,[])):"filterResetSaved"===r.type?a.storage(s,"tablesorter-filters",""):"filterEnd"===r.type?t.buildDefault(s,!0):(o="search"===r.type?o:"updateComplete"===r.type?g.$table.data("lastSearch"):"",/(update|add)/.test(r.type)&&"updateComplete"!==r.type&&(g.lastCombinedFilter=null,g.lastSearch=[],setTimeout(function(){g.$table.triggerHandler("filterFomatterUpdate")},100)),t.searching(s,o,!0)),!1}),h.filter_reset&&(h.filter_reset instanceof e?h.filter_reset.click(function(){g.$table.triggerHandler("filterReset")}):e(h.filter_reset).length&&e(document).undelegate(h.filter_reset,"click"+g.namespace+"filter").delegate(h.filter_reset,"click"+g.namespace+"filter",function(){g.$table.triggerHandler("filterReset")})),h.filter_functions)for(d=0;d<g.columns;d++)if(f=a.getColumnData(s,h.filter_functions,d))if(c=g.$headerIndexed[d].removeClass("filter-select"),p=!(c.hasClass("filter-false")||c.hasClass("parser-false")),o="",f===!0&&p)t.buildSelect(s,d);else if("object"==typeof f&&p){for(l in f)"string"==typeof l&&(o+=""===o?'<option value="">'+(c.data("placeholder")||c.attr("data-placeholder")||h.filter_placeholder.select||"")+"</option>":"",u=l,n=l,l.indexOf(h.filter_selectSourceSeparator)>=0&&(u=l.split(h.filter_selectSourceSeparator),n=u[1],u=u[0]),o+="<option "+(n===u?"":'data-function-name="'+l+'" ')+'value="'+u+'">'+n+"</option>");g.$table.find("thead").find("select."+i.filter+'[data-column="'+d+'"]').append(o),n=h.filter_selectSource,f="function"==typeof n||a.getColumnData(s,n,d),f&&t.buildSelect(g.table,d,"",!0,c.hasClass(h.filter_onlyAvail))}t.buildDefault(s,!0),t.bindSearch(s,g.$table.find("."+i.filter),!0),h.filter_external&&t.bindSearch(s,h.filter_external),h.filter_hideFilters&&t.hideFilters(g),g.showProcessing&&(n="filterStart filterEnd ".split(" ").join(g.namespace+"filter "),g.$table.unbind(n.replace(a.regex.spaces," ")).bind(n,function(t,r){c=r?g.$table.find("."+i.header).filter("[data-column]").filter(function(){return""!==r[e(this).data("column")]}):"",a.isProcessing(s,"filterStart"===t.type,r?c:"")})),g.filteredRows=g.totalRows,n="tablesorter-initialized pagerBeforeInitialized ".split(" ").join(g.namespace+"filter "),g.$table.unbind(n.replace(a.regex.spaces," ")).bind(n,function(){t.completeInit(this)}),g.pager&&g.pager.initialized&&!h.filter_initialized?(g.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){t.filterInitComplete(g)},100)):h.filter_initialized||t.completeInit(s)},completeInit:function(e){var r=e.config,i=r.widgetOptions,s=t.setDefaults(e,r,i)||[];s.length&&(r.delayInit&&""===s.join("")||a.setFilters(e,s,!0)),r.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){i.filter_initialized||t.filterInitComplete(r)},100)},formatterUpdated:function(e,t){var r=e&&e.closest("table")[0].config.widgetOptions;r&&!r.filter_initialized&&(r.filter_formatterInit[t]=1)},filterInitComplete:function(r){var a,i,s=r.widgetOptions,o=0,l=function(){s.filter_initialized=!0,r.lastSearch=r.$table.data("lastSearch"),r.$table.triggerHandler("filterInit",r),t.findRows(r.table,r.lastSearch||[])};if(e.isEmptyObject(s.filter_formatter))l();else{for(i=s.filter_formatterInit.length,a=0;a<i;a++)1===s.filter_formatterInit[a]&&o++;clearTimeout(s.filter_initTimer),s.filter_initialized||o!==s.filter_formatterCount?s.filter_initialized||(s.filter_initTimer=setTimeout(function(){l()},500)):l()}},processFilters:function(e,t){var r,a=[],i=t?encodeURIComponent:decodeURIComponent,s=e.length;for(r=0;r<s;r++)e[r]&&(a[r]=i(e[r]));return a},setDefaults:function(r,i,s){var o,l,n,c,d,u=a.getFilters(r)||[];if(s.filter_saveFilters&&a.storage&&(l=a.storage(r,"tablesorter-filters")||[],o=e.isArray(l),o&&""===l.join("")||!o||(u=t.processFilters(l))),""===u.join(""))for(d=i.$headers.add(s.filter_$externalFilters).filter("["+s.filter_defaultAttrib+"]"),n=0;n<=i.columns;n++)c=n===i.columns?"all":n,u[n]=d.filter('[data-column="'+c+'"]').attr(s.filter_defaultAttrib)||u[n]||"";return i.$table.data("lastSearch",u),u},parseFilter:function(e,t,r,a){return a||r.parsed[r.index]?e.parsers[r.index].format(t,e.table,[],r.index):t},buildRow:function(r,s,o){var l,n,c,d,u,f,p,g,h,m=o.filter_cellFilter,b=s.columns,y=e.isArray(m),w='<tr role="row" class="'+i.filterRow+" "+s.cssIgnoreRow+'">';for(c=0;c<b;c++)s.$headerIndexed[c].length&&(h=s.$headerIndexed[c]&&s.$headerIndexed[c][0].colSpan||0,w+=h>1?'<td data-column="'+c+"-"+(c+h-1)+'" colspan="'+h+'"':'<td data-column="'+c+'"',w+=y?m[c]?' class="'+m[c]+'"':"":""!==m?' class="'+m+'"':"",w+="></td>");for(s.$filters=e(w+="</tr>").appendTo(s.$table.children("thead").eq(0)).children("td"),c=0;c<b;c++)f=!1,d=s.$headerIndexed[c],d&&d.length&&(l=t.getColumnElm(s,s.$filters,c),g=a.getColumnData(r,o.filter_functions,c),u=o.filter_functions&&g&&"function"!=typeof g||d.hasClass("filter-select"),n=a.getColumnData(r,s.headers,c),f="false"===a.getData(d[0],n,"filter")||"false"===a.getData(d[0],n,"parser"),u?w=e("<select>").appendTo(l):(g=a.getColumnData(r,o.filter_formatter,c),g?(o.filter_formatterCount++,w=g(l,c),w&&0===w.length&&(w=l.children("input")),w&&(0===w.parent().length||w.parent().length&&w.parent()[0]!==l[0])&&l.append(w)):w=e('<input type="search">').appendTo(l),w&&(h=d.data("placeholder")||d.attr("data-placeholder")||o.filter_placeholder.search||"",w.attr("placeholder",h))),w&&(p=(e.isArray(o.filter_cssFilter)?"undefined"!=typeof o.filter_cssFilter[c]?o.filter_cssFilter[c]||"":"":o.filter_cssFilter)||"",w.addClass(i.filter+" "+p).attr("data-column",l.attr("data-column")),f&&(w.attr("placeholder","").addClass(i.filterDisabled)[0].disabled=!0)))},bindSearch:function(r,i,o){if(r=e(r)[0],i=e(i),i.length){var l,n=r.config,c=n.widgetOptions,d=n.namespace+"filter",u=c.filter_$externalFilters;o!==!0&&(l=c.filter_anyColumnSelector+","+c.filter_multipleColumnSelector,c.filter_$anyMatch=i.filter(l),u&&u.length?c.filter_$externalFilters=c.filter_$externalFilters.add(i):c.filter_$externalFilters=i,a.setFilters(r,n.$table.data("lastSearch")||[],o===!1)),l="keypress keyup keydown search change input ".split(" ").join(d+" "),i.attr("data-lastSearchTime",(new Date).getTime()).unbind(l.replace(a.regex.spaces," ")).bind("keydown"+d,function(e){if(e.which===s.escape&&!r.config.widgetOptions.filter_resetOnEsc)return!1}).bind("keyup"+d,function(i){c=r.config.widgetOptions;var o=parseInt(e(this).attr("data-column"),10),l="boolean"==typeof c.filter_liveSearch?c.filter_liveSearch:a.getColumnData(r,c.filter_liveSearch,o);if("undefined"==typeof l&&(l=c.filter_liveSearch.fallback||!1),e(this).attr("data-lastSearchTime",(new Date).getTime()),i.which===s.escape)this.value=c.filter_resetOnEsc?"":n.lastSearch[o];else{if(l===!1)return;if(""!==this.value&&("number"==typeof l&&this.value.length<l||i.which!==s.enter&&i.which!==s.backSpace&&(i.which<s.space||i.which>=s.left&&i.which<=s.down)))return}t.searching(r,!0,!0,o)}).bind("search change keypress input ".split(" ").join(d+" "),function(i){var o=parseInt(e(this).attr("data-column"),10),l="boolean"==typeof c.filter_liveSearch?c.filter_liveSearch:a.getColumnData(r,c.filter_liveSearch,o);!r.config.widgetOptions.filter_initialized||i.which!==s.enter&&"search"!==i.type&&("change"!==i.type&&"input"!==i.type||l!==!0||this.value===n.lastSearch[o])||(i.preventDefault(),e(this).attr("data-lastSearchTime",(new Date).getTime()),t.searching(r,"keypress"!==i.type,!0,o))})}},searching:function(e,r,i,s){var o,l=e.config.widgetOptions;"undefined"==typeof s?o=!1:(o="boolean"==typeof l.filter_liveSearch?l.filter_liveSearch:a.getColumnData(e,l.filter_liveSearch,s),"undefined"==typeof o&&(o=l.filter_liveSearch.fallback||!1)),clearTimeout(l.filter_searchTimer),"undefined"==typeof r||r===!0?l.filter_searchTimer=setTimeout(function(){t.checkFilters(e,r,i)},o?l.filter_searchDelay:10):t.checkFilters(e,r,i)},checkFilters:function(r,s,o){var l=r.config,n=l.widgetOptions,c=e.isArray(s),d=c?s:a.getFilters(r,!0),u=(d||[]).join("");return e.isEmptyObject(l.cache)?void(l.delayInit&&(!l.pager||l.pager&&l.pager.initialized)&&a.updateCache(l,function(){t.checkFilters(r,!1,o)})):(c&&(a.setFilters(r,d,!1,o!==!0),n.filter_initialized||(l.lastCombinedFilter="")),n.filter_hideFilters&&l.$table.find("."+i.filterRow).triggerHandler(t.hideFiltersCheck(l)?"mouseleave":"mouseenter"),l.lastCombinedFilter!==u||s===!1?(s===!1&&(l.lastCombinedFilter=null,l.lastSearch=[]),d=d||[],d=Array.prototype.map?d.map(String):d.join("<22>").split("<22>"),n.filter_initialized&&l.$table.triggerHandler("filterStart",[d]),l.showProcessing?void setTimeout(function(){return t.findRows(r,d,u),!1},30):(t.findRows(r,d,u),!1)):void 0)},hideFiltersCheck:function(e){if("function"==typeof e.widgetOptions.filter_hideFilters){var t=e.widgetOptions.filter_hideFilters(e);if("boolean"==typeof t)return t}return""===a.getFilters(e.$table).join("")},hideFilters:function(r,a){var s;(a||r.$table).find("."+i.filterRow).addClass(i.filterRowHide).bind("mouseenter mouseleave",function(a){var o=a,l=e(this);clearTimeout(s),s=setTimeout(function(){/enter|over/.test(o.type)?l.removeClass(i.filterRowHide):e(document.activeElement).closest("tr")[0]!==l[0]&&l.toggleClass(i.filterRowHide,t.hideFiltersCheck(r))},200)}).find("input, select").bind("focus blur",function(a){var o=a,l=e(this).closest("tr");clearTimeout(s),s=setTimeout(function(){clearTimeout(s),l.toggleClass(i.filterRowHide,t.hideFiltersCheck(r)&&"focus"!==o.type)},200)})},defaultFilter:function(t,a){if(""===t)return t;var i=r.iQuery,s=a.match(r.igQuery).length,o=s>1?e.trim(t).split(/\s/):[e.trim(t)],l=o.length-1,n=0,c=a;for(l<1&&s>1&&(o[1]=o[0]);i.test(c);)c=c.replace(i,o[n++]||""),i.test(c)&&n<l&&""!==(o[n]||"")&&(c=a.replace(i,c));return c},getLatestSearch:function(t){return t?t.sort(function(t,r){return e(r).attr("data-lastSearchTime")-e(t).attr("data-lastSearchTime")}):t||e()},findRange:function(e,t,r){var a,i,s,o,l,n,c,d,u,f=[];if(/^[0-9]+$/.test(t))return[parseInt(t,10)];if(!r&&/-/.test(t))for(i=t.match(/(\d+)\s*-\s*(\d+)/g),u=i?i.length:0,d=0;d<u;d++){for(s=i[d].split(/\s*-\s*/),o=parseInt(s[0],10)||0,l=parseInt(s[1],10)||e.columns-1,o>l&&(a=o,o=l,l=a),l>=e.columns&&(l=e.columns-1);o<=l;o++)f[f.length]=o;t=t.replace(i[d],"")}if(!r&&/,/.test(t))for(n=t.split(/\s*,\s*/),u=n.length,c=0;c<u;c++)""!==n[c]&&(d=parseInt(n[c],10),d<e.columns&&(f[f.length]=d));if(!f.length)for(d=0;d<e.columns;d++)f[f.length]=d;return f},getColumnElm:function(r,a,i){return a.filter(function(){var a=t.findRange(r,e(this).attr("data-column"));return e.inArray(i,a)>-1})},multipleColumns:function(r,a){var i=r.widgetOptions,s=i.filter_initialized||!a.filter(i.filter_anyColumnSelector).length,o=e.trim(t.getLatestSearch(a).attr("data-column")||"");return t.findRange(r,o,!s)},processTypes:function(r,a,i){var s,o=null,l=null;for(s in t.types)e.inArray(s,i.excludeMatch)<0&&null===l&&(l=t.types[s](r,a,i),null!==l&&(o=l));return o},matchType:function(e,t){var r,a=e.widgetOptions,s=e.$headerIndexed[t];return s.hasClass("filter-exact")?r=!1:s.hasClass("filter-match")?r=!0:(a.filter_columnFilters?s=e.$filters.find("."+i.filter).add(a.filter_$externalFilters).filter('[data-column="'+t+'"]'):a.filter_$externalFilters&&(s=a.filter_$externalFilters.filter('[data-column="'+t+'"]')),r=!!s.length&&"match"===e.widgetOptions.filter_matchType[(s[0].nodeName||"").toLowerCase()]),r},processRow:function(i,s,o){var l,n,c,d,u,f=i.widgetOptions,p=!0,g=f.filter_$anyMatch&&f.filter_$anyMatch.length,h=f.filter_$anyMatch&&f.filter_$anyMatch.length?t.multipleColumns(i,f.filter_$anyMatch):[];if(s.$cells=s.$row.children(),s.anyMatchFlag&&h.length>1||s.anyMatchFilter&&!g){if(s.anyMatch=!0,s.isMatch=!0,s.rowArray=s.$cells.map(function(t){if(e.inArray(t,h)>-1||s.anyMatchFilter&&!g)return s.parsed[t]?u=s.cacheArray[t]:(u=s.rawArray[t],u=e.trim(f.filter_ignoreCase?u.toLowerCase():u),i.sortLocaleCompare&&(u=a.replaceAccents(u))),u}).get(),s.filter=s.anyMatchFilter,s.iFilter=s.iAnyMatchFilter,s.exact=s.rowArray.join(" "),s.iExact=f.filter_ignoreCase?s.exact.toLowerCase():s.exact,s.cache=s.cacheArray.slice(0,-1).join(" "),o.excludeMatch=o.noAnyMatch,n=t.processTypes(i,s,o),null!==n)p=n;else if(f.filter_startsWith)for(p=!1,h=Math.min(i.columns,s.rowArray.length);!p&&h>0;)h--,p=p||0===s.rowArray[h].indexOf(s.iFilter);else p=(s.iExact+s.childRowText).indexOf(s.iFilter)>=0;if(s.anyMatch=!1,s.filters.join("")===s.filter)return p}for(h=0;h<i.columns;h++)s.filter=s.filters[h],s.index=h,o.excludeMatch=o.excludeFilter[h],s.filter&&(s.cache=s.cacheArray[h],l=s.parsed[h]?s.cache:s.rawArray[h]||"",s.exact=i.sortLocaleCompare?a.replaceAccents(l):l,s.iExact=!r.type.test(typeof s.exact)&&f.filter_ignoreCase?s.exact.toLowerCase():s.exact,s.isMatch=t.matchType(i,h),l=p,d=f.filter_columnFilters?i.$filters.add(f.filter_$externalFilters).filter('[data-column="'+h+'"]').find("select option:selected").attr("data-function-name")||"":"",i.sortLocaleCompare&&(s.filter=a.replaceAccents(s.filter)),f.filter_defaultFilter&&r.iQuery.test(o.defaultColFilter[h])&&(s.filter=t.defaultFilter(s.filter,o.defaultColFilter[h])),s.iFilter=f.filter_ignoreCase?(s.filter||"").toLowerCase():s.filter,c=o.functions[h],n=null,c&&(c===!0?n=s.isMatch?(""+s.iExact).search(s.iFilter)>=0:s.filter===s.exact:"function"==typeof c?n=c(s.exact,s.cache,s.filter,h,s.$row,i,s):"function"==typeof c[d||s.filter]&&(u=d||s.filter,n=c[u](s.exact,s.cache,s.filter,h,s.$row,i,s))),null===n?(n=t.processTypes(i,s,o),null!==n?l=n:(u=(s.iExact+s.childRowText).indexOf(t.parseFilter(i,s.iFilter,s)),l=!f.filter_startsWith&&u>=0||f.filter_startsWith&&0===u)):l=n,p=!!l&&p);return p},findRows:function(i,s,o){if(i.config.lastCombinedFilter!==o&&i.config.widgetOptions.filter_initialized){var l,n,c,d,u,f,p,g,h,m,b,y,w,_,v,x,C,$,S,F,R,z,T,k,I=e.extend([],s),A=i.config,D=A.widgetOptions,E={anyMatch:!1,filters:s,filter_regexCache:[]},H={noAnyMatch:["range","operators"],functions:[],excludeFilter:[],defaultColFilter:[],defaultAnyFilter:a.getColumnData(i,D.filter_defaultFilter,A.columns,!0)||""};for(E.parsed=[],h=0;h<A.columns;h++)E.parsed[h]=D.filter_useParsedData||A.parsers&&A.parsers[h]&&A.parsers[h].parsed||a.getData&&"parsed"===a.getData(A.$headerIndexed[h],a.getColumnData(i,A.headers,h),"filter")||A.$headerIndexed[h].hasClass("filter-parsed"),H.functions[h]=a.getColumnData(i,D.filter_functions,h)||A.$headerIndexed[h].hasClass("filter-select"),H.defaultColFilter[h]=a.getColumnData(i,D.filter_defaultFilter,h)||"",H.excludeFilter[h]=(a.getColumnData(i,D.filter_excludeFilter,h,!0)||"").split(/\s+/);for(A.debug&&(console.log("Filter: Starting filter widget search",s),v=new Date),A.filteredRows=0,A.totalRows=0,o=(I||[]).join(""),p=0;p<A.$tbodies.length;p++){if(g=a.processTbody(i,A.$tbodies.eq(p),!0),h=A.columns,n=A.cache[p].normalized,d=e(e.map(n,function(e){return e[h].$row.get()})),""===o||D.filter_serversideFiltering)d.removeClass(D.filter_filteredRow).not("."+A.cssChildRow).css("display","");else{if(d=d.not("."+A.cssChildRow),l=d.length,(D.filter_$anyMatch&&D.filter_$anyMatch.length||"undefined"!=typeof s[A.columns])&&(E.anyMatchFlag=!0,E.anyMatchFilter=""+(s[A.columns]||D.filter_$anyMatch&&t.getLatestSearch(D.filter_$anyMatch).val()||""),D.filter_columnAnyMatch)){for(F=E.anyMatchFilter.split(r.andSplit),R=!1,C=0;C<F.length;C++)z=F[C].split(":"),z.length>1&&(isNaN(z[0])?e.each(A.headerContent,function(e,t){t.toLowerCase().indexOf(z[0])>-1&&(T=e,s[T]=z[1])}):T=parseInt(z[0],10)-1,T>=0&&T<A.columns&&(s[T]=z[1],F.splice(C,1),C--,R=!0));R&&(E.anyMatchFilter=F.join(" && "))}if(S=D.filter_searchFiltered,y=A.lastSearch||A.$table.data("lastSearch")||[],S)for(C=0;C<h+1;C++)x=s[C]||"",S||(C=h),S=S&&y.length&&0===x.indexOf(y[C]||"")&&!r.alreadyFiltered.test(x)&&!r.exactTest.test(x)&&!(r.isNeg1.test(x)||r.isNeg2.test(x))&&!(""!==x&&A.$filters&&A.$filters.filter('[data-column="'+C+'"]').find("select").length&&!t.matchType(A,C));
for($=d.not("."+D.filter_filteredRow).length,S&&0===$&&(S=!1),A.debug&&console.log("Filter: Searching through "+(S&&$<l?$:"all")+" rows"),E.anyMatchFlag&&(A.sortLocaleCompare&&(E.anyMatchFilter=a.replaceAccents(E.anyMatchFilter)),D.filter_defaultFilter&&r.iQuery.test(H.defaultAnyFilter)&&(E.anyMatchFilter=t.defaultFilter(E.anyMatchFilter,H.defaultAnyFilter),S=!1),E.iAnyMatchFilter=D.filter_ignoreCase&&A.ignoreCase?E.anyMatchFilter.toLowerCase():E.anyMatchFilter),f=0;f<l;f++)if(k=d[f].className,m=f&&r.child.test(k),!(m||S&&r.filtered.test(k))){if(E.$row=d.eq(f),E.rowIndex=f,E.cacheArray=n[f],c=E.cacheArray[A.columns],E.rawArray=c.raw,E.childRowText="",!D.filter_childByColumn){for(k="",b=c.child,C=0;C<b.length;C++)k+=" "+b[C].join(" ")||"";E.childRowText=D.filter_childRows?D.filter_ignoreCase?k.toLowerCase():k:""}if(w=!1,_=t.processRow(A,E,H),u=c.$row,x=!!_,b=c.$row.filter(":gt(0)"),D.filter_childRows&&b.length){if(D.filter_childByColumn)for(D.filter_childWithSibs||(b.addClass(D.filter_filteredRow),u=u.eq(0)),C=0;C<b.length;C++)E.$row=b.eq(C),E.cacheArray=c.child[C],E.rawArray=E.cacheArray,x=t.processRow(A,E,H),w=w||x,!D.filter_childWithSibs&&x&&b.eq(C).removeClass(D.filter_filteredRow);w=w||_}else w=x;u.toggleClass(D.filter_filteredRow,!w)[0].display=w?"":"none"}}A.filteredRows+=d.not("."+D.filter_filteredRow).length,A.totalRows+=d.length,a.processTbody(i,g,!1)}A.lastCombinedFilter=o,A.lastSearch=I,A.$table.data("lastSearch",I),D.filter_saveFilters&&a.storage&&a.storage(i,"tablesorter-filters",t.processFilters(I,!0)),A.debug&&console.log("Completed filter widget search"+a.benchmark(v)),D.filter_initialized&&(A.$table.triggerHandler("filterBeforeEnd",A),A.$table.triggerHandler("filterEnd",A)),setTimeout(function(){a.applyWidget(A.table)},0)}},getOptionSource:function(r,i,s){r=e(r)[0];var o=r.config,l=o.widgetOptions,n=!1,c=l.filter_selectSource,d=o.$table.data("lastSearch")||[],u="function"==typeof c||a.getColumnData(r,c,i);if(s&&""!==d[i]&&(s=!1),u===!0)n=c(r,i,s);else{if(u instanceof e||"string"===e.type(u)&&u.indexOf("</option>")>=0)return u;e.isArray(u)?n=u:"object"===e.type(c)&&u&&(n=u(r,i,s))}return n===!1&&(n=t.getOptions(r,i,s)),t.processOptions(r,i,n)},processOptions:function(t,r,i){if(!e.isArray(i))return!1;t=e(t)[0];var s,o,l,n,c,d,u=t.config,f="undefined"!=typeof r&&null!==r&&r>=0&&r<u.columns,p=!!f&&u.$headerIndexed[r].hasClass("filter-select-sort-desc"),g=[];if(i=e.grep(i,function(t,r){return!!t.text||e.inArray(t,i)===r}),f&&u.$headerIndexed[r].hasClass("filter-select-nosort"))return i;for(n=i.length,l=0;l<n;l++)o=i[l],d=o.text?o.text:o,c=(f&&u.parsers&&u.parsers.length&&u.parsers[r].format(d,t,[],r)||d).toString(),c=u.widgetOptions.filter_ignoreCase?c.toLowerCase():c,o.text?(o.parsed=c,g[g.length]=o):g[g.length]={text:o,parsed:c};for(s=u.textSorter||"",g.sort(function(e,i){var o=p?i.parsed:e.parsed,l=p?e.parsed:i.parsed;return f&&"function"==typeof s?s(o,l,!0,r,t):f&&"object"==typeof s&&s.hasOwnProperty(r)?s[r](o,l,!0,r,t):!a.sortNatural||a.sortNatural(o,l)}),i=[],n=g.length,l=0;l<n;l++)i[i.length]=g[l];return i},getOptions:function(t,r,i){t=e(t)[0];var s,o,l,n,c,d,u,f,p=t.config,g=p.widgetOptions,h=[];for(o=0;o<p.$tbodies.length;o++)for(c=p.cache[o],l=p.cache[o].normalized.length,s=0;s<l;s++)if(n=c.row?c.row[s]:c.normalized[s][p.columns].$row[0],!i||!n.className.match(g.filter_filteredRow))if(g.filter_useParsedData||p.parsers[r].parsed||p.$headerIndexed[r].hasClass("filter-parsed")){if(h[h.length]=""+c.normalized[s][r],g.filter_childRows&&g.filter_childByColumn)for(f=c.normalized[s][p.columns].$row.length-1,d=0;d<f;d++)h[h.length]=""+c.normalized[s][p.columns].child[d][r]}else if(h[h.length]=c.normalized[s][p.columns].raw[r],g.filter_childRows&&g.filter_childByColumn)for(f=c.normalized[s][p.columns].$row.length,d=1;d<f;d++)u=c.normalized[s][p.columns].$row.eq(d).children().eq(r),h[h.length]=""+a.getElementText(p,u,r);return h},buildSelect:function(a,s,o,l,n){if(a=e(a)[0],s=parseInt(s,10),a.config.cache&&!e.isEmptyObject(a.config.cache)){var c,d,u,f,p,g,h,m=a.config,b=m.widgetOptions,y=m.$headerIndexed[s],w='<option value="">'+(y.data("placeholder")||y.attr("data-placeholder")||b.filter_placeholder.select||"")+"</option>",_=m.$table.find("thead").find("select."+i.filter+'[data-column="'+s+'"]').val();if("undefined"!=typeof o&&""!==o||(o=t.getOptionSource(a,s,n)),e.isArray(o)){for(c=0;c<o.length;c++)if(h=o[c],h.text){h["data-function-name"]="undefined"==typeof h.value?h.text:h.value,w+="<option";for(d in h)h.hasOwnProperty(d)&&"text"!==d&&(w+=" "+d+'="'+h[d]+'"');h.value||(w+=' value="'+h.text+'"'),w+=">"+h.text+"</option>"}else""+h!="[object Object]"&&(u=h=(""+h).replace(r.quote,"&quot;"),d=u,u.indexOf(b.filter_selectSourceSeparator)>=0&&(f=u.split(b.filter_selectSourceSeparator),d=f[0],u=f[1]),w+=""!==h?"<option "+(d===u?"":'data-function-name="'+h+'" ')+'value="'+d+'">'+u+"</option>":"");o=[]}p=(m.$filters?m.$filters:m.$table.children("thead")).find("."+i.filter),b.filter_$externalFilters&&(p=p&&p.length?p.add(b.filter_$externalFilters):b.filter_$externalFilters),g=p.filter('select[data-column="'+s+'"]'),g.length&&(g[l?"html":"append"](w),e.isArray(o)||g.append(o).val(_),g.val(_))}},buildDefault:function(e,r){var i,s,o,l=e.config,n=l.widgetOptions,c=l.columns;for(i=0;i<c;i++)s=l.$headerIndexed[i],o=!(s.hasClass("filter-false")||s.hasClass("parser-false")),(s.hasClass("filter-select")||a.getColumnData(e,n.filter_functions,i)===!0)&&o&&t.buildSelect(e,i,"",r,s.hasClass(n.filter_onlyAvail))}},r=t.regex,a.getFilters=function(r,a,s,o){var l,n,c,d,u=[],f=r?e(r)[0].config:"",p=f?f.widgetOptions:"";if(a!==!0&&p&&!p.filter_columnFilters||e.isArray(s)&&s.join("")===f.lastCombinedFilter)return e(r).data("lastSearch");if(f&&(f.$filters&&(n=f.$filters.find("."+i.filter)),p.filter_$externalFilters&&(n=n&&n.length?n.add(p.filter_$externalFilters):p.filter_$externalFilters),n&&n.length))for(u=s||[],l=0;l<f.columns+1;l++)d=l===f.columns?p.filter_anyColumnSelector+","+p.filter_multipleColumnSelector:'[data-column="'+l+'"]',c=n.filter(d),c.length&&(c=t.getLatestSearch(c),e.isArray(s)?(o&&c.length>1&&(c=c.slice(1)),l===f.columns&&(d=c.filter(p.filter_anyColumnSelector),c=d.length?d:c),c.val(s[l]).trigger("change"+f.namespace)):(u[l]=c.val()||"",l===f.columns?c.slice(1).filter('[data-column*="'+c.attr("data-column")+'"]').val(u[l]):c.slice(1).val(u[l])),l===f.columns&&c.length&&(p.filter_$anyMatch=c));return u},a.setFilters=function(r,i,s,o){var l=r?e(r)[0].config:"",n=a.getFilters(r,!0,i,o);return"undefined"==typeof s&&(s=!0),l&&s&&(l.lastCombinedFilter=null,l.lastSearch=[],t.searching(l.table,i,o),l.$table.triggerHandler("filterFomatterUpdate")),0!==n.length}}(jQuery),!function(e){"use strict";var t=e.tablesorter,r=".tscolsel",a=t.columnSelector={queryAll:"@media only all { [columns] { display: none; } } ",queryBreak:"@media all and (min-width: [size]) { [columns] { display: table-cell; } } ",init:function(t,i,s){var o,l;return o=e(s.columnSelector_layout),o.find("input").add(o.filter("input")).length?(i.$table.addClass(i.namespace.slice(1)+"columnselector"),l=i.selector={$container:e(s.columnSelector_container||"<div>")},l.$style=e("<style></style>").prop("disabled",!0).appendTo("head"),l.$breakpoints=e("<style></style>").prop("disabled",!0).appendTo("head"),l.isInitializing=!0,a.setUpColspan(i,s),a.setupSelector(i,s),s.columnSelector_mediaquery&&a.setupBreakpoints(i,s),l.isInitializing=!1,l.$container.length?a.updateCols(i,s):i.debug&&console.warn("ColumnSelector: >> container not found"),void i.$table.off("refreshColumnSelector"+r).on("refreshColumnSelector"+r,function(e,t,r){a.refreshColumns(this.config,t,r)})):void(i.debug&&console.error("ColumnSelector: >> ERROR: Column Selector aborting, no input found in the layout! ***"))},refreshColumns:function(t,r,i){var s,o,l,n,c=t.selector,d=e.isArray(i||r),u=t.widgetOptions;if("undefined"!=typeof r&&null!==r&&c.$container.length){if("selectors"===r&&(c.$container.empty(),a.setupSelector(t,u),a.setupBreakpoints(t,u),"undefined"==typeof i&&null!==i&&(i=c.auto)),d)for(o=i||r,e.each(o,function(e,t){o[e]=parseInt(t,10)}),s=0;s<t.columns;s++)n=e.inArray(s,o)>=0,l=c.$container.find("input[data-column="+s+"]"),l.length&&(l.prop("checked",n),c.states[s]=n);n=i===!0||r===!0||"auto"===r&&i!==!1,l=c.$container.find('input[data-column="auto"]').prop("checked",n),a.updateAuto(t,u,l)}else a.updateBreakpoints(t,u),a.updateCols(t,u);a.saveValues(t,u),a.adjustColspans(t,u)},setupSelector:function(r,i){var s,o,l,n,c,d,u,f=r.selector,p=f.$container,g=i.columnSelector_saveColumns&&t.storage,h=g?t.storage(r.table,"tablesorter-columnSelector"):[],m=g?t.storage(r.table,"tablesorter-columnSelector-auto"):{};for(f.auto=e.isEmptyObject(m)||"boolean"!==e.type(m.auto)?i.columnSelector_mediaqueryState:m.auto,f.states=[],f.$column=[],f.$wrapper=[],f.$checkbox=[],s=0;s<r.columns;s++)l=r.$headerIndexed[s],n=l.attr(i.columnSelector_priority)||1,d=l.attr("data-column"),c=t.getColumnData(r.table,r.headers,d),m=t.getData(l,c,"columnSelector"),isNaN(n)&&n.length>0||"disable"===m||i.columnSelector_columns[d]&&"disable"===i.columnSelector_columns[d]?f.states[d]=null:(f.states[d]=h&&"undefined"!=typeof h[d]&&null!==h[d]?h[d]:"undefined"!=typeof i.columnSelector_columns[d]&&null!==i.columnSelector_columns[d]?i.columnSelector_columns[d]:"true"===m||"false"!==m,f.$column[d]=e(this),p.length&&(o=l.attr(i.columnSelector_name)||l.text().trim(),"function"==typeof i.columnSelector_layoutCustomizer&&(u=l.find("."+t.css.headerIn),o=i.columnSelector_layoutCustomizer(u.length?u:l,o,parseInt(d,10))),f.$wrapper[d]=e(i.columnSelector_layout.replace(/\{name\}/g,o)).appendTo(p),f.$checkbox[d]=f.$wrapper[d].find("input").add(f.$wrapper[d].filter("input")).attr("data-column",d).toggleClass(i.columnSelector_cssChecked,f.states[d]).prop("checked",f.states[d]).on("change",function(){if(!f.isInitializing){var t=e(this).attr("data-column");if(!a.checkChange(r,this.checked))return this.checked=!this.checked,!1;r.selector.states[t]=this.checked,a.updateCols(r,i)}}).change()))},checkChange:function(e,t){for(var r=e.widgetOptions,a=r.columnSelector_maxVisible,i=r.columnSelector_minVisible,s=e.selector.states,o=s.length,l=0;o-- >=0;)s[o]&&l++;return!(t&null!==a&&l>=a||!t&&null!==i&&l<=i)},setupBreakpoints:function(t,i){var s=t.selector;i.columnSelector_mediaquery&&(s.lastIndex=-1,a.updateBreakpoints(t,i),t.$table.off("updateAll"+r).on("updateAll"+r,function(){a.setupSelector(t,i),a.setupBreakpoints(t,i),a.updateBreakpoints(t,i),a.updateCols(t,i)})),s.$container.length&&(i.columnSelector_mediaquery&&(s.$auto=e(i.columnSelector_layout.replace(/\{name\}/g,i.columnSelector_mediaqueryName)).prependTo(s.$container),s.$auto.find("input").add(s.$auto.filter("input")).attr("data-column","auto").prop("checked",s.auto).toggleClass(i.columnSelector_cssChecked,s.auto).on("change",function(){a.updateAuto(t,i,e(this))}).change()),t.$table.off("update"+r).on("update"+r,function(){a.updateCols(t,i)}))},updateAuto:function(t,r,i){var s=t.selector;s.auto=i.prop("checked")||!1,e.each(s.$checkbox,function(e,t){t&&(t[0].disabled=s.auto,s.$wrapper[e].toggleClass("disabled",s.auto))}),r.columnSelector_mediaquery&&a.updateBreakpoints(t,r),a.updateCols(t,r),t.selector.$popup&&t.selector.$popup.find(".tablesorter-column-selector").html(s.$container.html()).find("input").each(function(){var t=e(this).attr("data-column");e(this).prop("checked","auto"===t?s.auto:s.states[t])}),a.saveValues(t,r),a.adjustColspans(t,r),s.auto&&t.$table.triggerHandler(r.columnSelector_updated)},addSelectors:function(e,t){var r=[],a=" col:nth-child("+t+")";return r.push(e+a+","+e+"_extra_table"+a),a=' tr:not(.hasSpan) th[data-column="'+(t-1)+'"]',r.push(e+a+","+e+"_extra_table"+a),a=" tr:not(.hasSpan) td:nth-child("+t+")",r.push(e+a+","+e+"_extra_table"+a),a=" tr td:not("+e+'HasSpan)[data-column="'+(t-1)+'"]',r.push(e+a+","+e+"_extra_table"+a),r},updateBreakpoints:function(r,i){var s,o,l,n,c=[],d=r.selector,u=r.namespace+"columnselector",f=[],p="";if(i.columnSelector_mediaquery&&!d.auto)return d.$breakpoints.prop("disabled",!0),void d.$style.prop("disabled",!1);if(i.columnSelector_mediaqueryHidden)for(l=0;l<r.columns;l++)o=t.getColumnData(r.table,r.headers,l),c[l+1]="false"===t.getData(r.$headerIndexed[l],o,"columnSelector"),c[l+1]&&(f=f.concat(a.addSelectors(u,l+1)));for(s=0;s<i.columnSelector_maxPriorities;s++)n=[],r.$headers.filter("["+i.columnSelector_priority+"="+(s+1)+"]").each(function(){l=parseInt(e(this).attr("data-column"),10)+1,c[l]||(n=n.concat(a.addSelectors(u,l)))}),n.length&&(f=f.concat(n),p+=a.queryBreak.replace(/\[size\]/g,i.columnSelector_breakpoints[s]).replace(/\[columns\]/g,n.join(",")));d.$style&&d.$style.prop("disabled",!0),f.length&&d.$breakpoints.prop("disabled",!1).text(a.queryAll.replace(/\[columns\]/g,f.join(","))+p)},updateCols:function(t,r){if(!(r.columnSelector_mediaquery&&t.selector.auto||t.selector.isInitializing)){var i,s=t.selector,o=[],l=t.namespace+"columnselector";s.$container.find("input[data-column]").filter('[data-column!="auto"]').each(function(){this.checked||(i=parseInt(e(this).attr("data-column"),10)+1,o=o.concat(a.addSelectors(l,i))),e(this).toggleClass(r.columnSelector_cssChecked,this.checked)}),r.columnSelector_mediaquery&&s.$breakpoints.prop("disabled",!0),s.$style&&s.$style.prop("disabled",!1).text(o.length?o.join(",")+" { display: none; }":""),a.saveValues(t,r),a.adjustColspans(t,r),t.$table.triggerHandler(r.columnSelector_updated)}},setUpColspan:function(r,i){var s,o,l,n=e(window),c=!1,d=r.$table.add(e(r.namespace+"_extra_table")).children().children("tr").children("th, td"),u=d.length;for(s=0;s<u;s++)o=d[s].colSpan,o>1&&(c=!0,d.eq(s).addClass(r.namespace.slice(1)+"columnselectorHasSpan").attr("data-col-span",o),t.computeColumnIndex(d.eq(s).parent().addClass("hasSpan")));c&&i.columnSelector_mediaquery&&(l=r.namespace+"columnselector",n.off(l).on("resize"+l,t.window_resize).on("resizeEnd"+l,function(){n.off("resize"+l,t.window_resize),a.adjustColspans(r,i),n.on("resize"+l,t.window_resize)}))},adjustColspans:function(t,r){var a,i,s,o,l,n,c=t.selector,d=r.filter_filteredRow||"filtered",u=r.columnSelector_mediaquery&&c.auto,f=t.$table.children("thead, tfoot").children().children().add(e(t.namespace+"_extra_table").children("thead, tfoot").children().children()),p=f.length;for(a=0;a<p;a++)if(n=f.eq(a),s=parseInt(n.attr("data-column"),10)||n[0].cellIndex,o=parseInt(n.attr("data-col-span"),10)||1,l=s+o,o>1){for(i=s;i<l;i++)(!u&&c.states[i]===!1||u&&t.$headerIndexed[i]&&!t.$headerIndexed[i].is(":visible"))&&o--;o?n.removeClass(d)[0].colSpan=o:n.addClass(d)}else"undefined"!=typeof c.states[s]&&null!==c.states[s]&&n.toggleClass(d,!c.states[s])},saveValues:function(e,r){if(r.columnSelector_saveColumns&&t.storage){var a=e.selector;t.storage(e.$table[0],"tablesorter-columnSelector-auto",{auto:a.auto}),t.storage(e.$table[0],"tablesorter-columnSelector",a.states)}},attachTo:function(t,r){t=e(t)[0];var i,s,o,l=t.config,n=e(r);n.length&&l&&(n.find(".tablesorter-column-selector").length||n.append('<span class="tablesorter-column-selector"></span>'),i=l.selector,s=l.widgetOptions,n.find(".tablesorter-column-selector").html(i.$container.html()).find("input").each(function(){var t=e(this).attr("data-column"),r="auto"===t?i.auto:i.states[t];e(this).toggleClass(s.columnSelector_cssChecked,r).prop("checked",r)}),i.$popup=n.on("change","input",function(){if(!i.isInitializing){if(!a.checkChange(l,this.checked))return this.checked=!this.checked,!1;o=e(this).toggleClass(s.columnSelector_cssChecked,this.checked).attr("data-column"),i.$container.find('input[data-column="'+o+'"]').prop("checked",this.checked).trigger("change")}}))}};t.window_resize=function(){t.timer_resize&&clearTimeout(t.timer_resize),t.timer_resize=setTimeout(function(){e(window).trigger("resizeEnd")},250)},t.addWidget({id:"columnSelector",priority:10,options:{columnSelector_container:null,columnSelector_columns:{},columnSelector_saveColumns:!0,columnSelector_layout:'<label><input type="checkbox">{name}</label>',columnSelector_layoutCustomizer:null,columnSelector_name:"data-selector-name",columnSelector_mediaquery:!0,columnSelector_mediaqueryName:"Auto: ",columnSelector_mediaqueryState:!0,columnSelector_mediaqueryHidden:!1,columnSelector_maxVisible:null,columnSelector_minVisible:null,columnSelector_breakpoints:["20em","30em","40em","50em","60em","70em"],columnSelector_maxPriorities:6,columnSelector_priority:"data-priority",columnSelector_cssChecked:"checked",columnSelector_updated:"columnUpdate"},init:function(e,t,r,i){a.init(e,r,i)},remove:function(t,a,i,s){var o=a.selector;o&&o.$container.empty(),!s&&o&&(o.$popup&&o.$popup.empty(),o.$style.remove(),o.$breakpoints.remove(),e(a.namespace+"columnselectorHasSpan").removeClass(i.filter_filteredRow||"filtered"),a.$table.off("updateAll"+r+" update"+r))}})}(jQuery);
//# sourceMappingURL=tablesorter.min.js.map