mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
2 lines
95 KiB
JavaScript
2 lines
95 KiB
JavaScript
/*! tablesorter (FORK) - updated 2018-07-10 (v2.30.7)*/
|
||
!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(e){"use strict";var t=e.tablesorter={version:"2.30.7",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:"",cssIconDisabled:"",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(r,a){if(r&&r.tHead&&0!==r.tBodies.length&&!0!==r.hasInitialized){var s="",i=e(r),o=e.metadata;r.hasInitialized=!1,r.isProcessing=!0,r.config=a,e.data(r,"tablesorter",a),t.debug(a,"core")&&(console[console.group?"group":"log"]("Initializing tablesorter v"+t.version),e.data(r,"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}(e.fn.jquery.split(".")),a.emptyTo=a.emptyTo.toLowerCase(),a.stringTo=a.stringTo.toLowerCase(),a.last={sortList:[],clickedIndex:-1},/tablesorter\-/.test(i.attr("class"))||(s=""!==a.theme?" tablesorter-"+a.theme:""),a.namespace?a.namespace="."+a.namespace.replace(t.regex.nonWord,""):a.namespace=".tablesorter"+Math.random().toString(16).slice(2),a.table=r,a.$table=i.addClass(t.css.table+" "+a.tableClass+s+" "+a.namespace.slice(1)).attr("role","grid"),a.$headers=i.find(a.selectorHeaders),a.$table.children().children("tr").attr("role","row"),a.$tbodies=i.children("tbody:not(."+a.cssInfoBlock+")").attr({"aria-live":"polite","aria-relevant":"all"}),a.$table.children("caption").length&&((s=a.$table.children("caption")[0]).id||(s.id=a.namespace.slice(1)+"caption"),a.$table.attr("aria-labelledby",s.id)),a.widgetInit={},a.textExtraction=a.$table.attr("data-text-extraction")||a.textExtraction||"basic",t.buildHeaders(a),t.fixColumnWidth(r),t.addWidgetFromClass(r),t.applyWidgetOptions(r),t.setupParsers(a),a.totalRows=0,a.debug&&t.validateOptions(a),a.delayInit||t.buildCache(a),t.bindEvents(r,a.$headers,!0),t.bindMethods(a),a.supportsDataObject&&void 0!==i.data().sortlist?a.sortList=i.data().sortlist:o&&i.metadata()&&i.metadata().sortlist&&(a.sortList=i.metadata().sortlist),t.applyWidget(r,!0),a.sortList.length>0?t.sortOn(a,a.sortList,{},!a.initWidgets):(t.setHeadersCss(a),a.initWidgets&&t.applyWidget(r,!1)),a.showProcessing&&i.unbind("sortBegin"+a.namespace+" sortEnd"+a.namespace).bind("sortBegin"+a.namespace+" sortEnd"+a.namespace,function(e){clearTimeout(a.timerProcessing),t.isProcessing(r),"sortBegin"===e.type&&(a.timerProcessing=setTimeout(function(){t.isProcessing(r,!0)},500))}),r.hasInitialized=!0,r.isProcessing=!1,t.debug(a,"core")&&(console.log("Overall initialization time:"+t.benchmark(e.data(r,"startoveralltimer"))),t.debug(a,"core")&&console.groupEnd&&console.groupEnd()),i.triggerHandler("tablesorter-initialized",r),"function"==typeof a.initialized&&a.initialized(r)}else t.debug(a,"core")&&(r.hasInitialized?console.warn("Stopping initialization. Tablesorter has already been initialized"):console.error("Stopping initialization! No table, thead or tbody",r))},bindMethods:function(r){var a=r.$table,s=r.namespace,i="sortReset update updateRows updateAll updateHeaders addRows updateCell updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave ".split(" ").join(s+" ");a.unbind(i.replace(t.regex.spaces," ")).bind("sortReset"+s,function(e,r){e.stopPropagation(),t.sortReset(this.config,function(e){e.isApplyingWidgets?setTimeout(function(){t.applyWidget(e,"",r)},100):t.applyWidget(e,"",r)})}).bind("updateAll"+s,function(e,r,a){e.stopPropagation(),t.updateAll(this.config,r,a)}).bind("update"+s+" updateRows"+s,function(e,r,a){e.stopPropagation(),t.update(this.config,r,a)}).bind("updateHeaders"+s,function(e,r){e.stopPropagation(),t.updateHeaders(this.config,r)}).bind("updateCell"+s,function(e,r,a,s){e.stopPropagation(),t.updateCell(this.config,r,a,s)}).bind("addRows"+s,function(e,r,a,s){e.stopPropagation(),t.addRows(this.config,r,a,s)}).bind("updateComplete"+s,function(){this.isUpdating=!1}).bind("sorton"+s,function(e,r,a,s){e.stopPropagation(),t.sortOn(this.config,r,a,s)}).bind("appendCache"+s,function(r,a,s){r.stopPropagation(),t.appendCache(this.config,s),e.isFunction(a)&&a(this)}).bind("updateCache"+s,function(e,r,a){e.stopPropagation(),t.updateCache(this.config,r,a)}).bind("applyWidgetId"+s,function(e,r){e.stopPropagation(),t.applyWidgetId(this,r)}).bind("applyWidgets"+s,function(e,r){e.stopPropagation(),t.applyWidget(this,!1,r)}).bind("refreshWidgets"+s,function(e,r,a){e.stopPropagation(),t.refreshWidgets(this,r,a)}).bind("removeWidget"+s,function(e,r,a){e.stopPropagation(),t.removeWidget(this,r,a)}).bind("destroy"+s,function(e,r,a){e.stopPropagation(),t.destroy(this,r,a)}).bind("resetToLoadState"+s,function(a){a.stopPropagation(),t.removeWidget(this,!0,!1);var s=e.extend(!0,{},r.originalSettings);(r=e.extend(!0,{},t.defaults,s)).originalSettings=s,this.hasInitialized=!1,t.setup(this,r)})},bindEvents:function(r,a,s){var i,o=(r=e(r)[0]).config,n=o.namespace,l=null;!0!==s&&(a.addClass(n.slice(1)+"_extra_headers"),(i=t.getClosest(a,"table")).length&&"TABLE"===i[0].nodeName&&i[0]!==r&&e(i[0]).addClass(n.slice(1)+"_extra_table")),i=(o.pointerDown+" "+o.pointerUp+" "+o.pointerClick+" sort keyup ").replace(t.regex.spaces," ").split(" ").join(n+" "),a.find(o.selectorSort).add(a.filter(o.selectorSort)).unbind(i).bind(i,function(r,a){var s,i,n,c=e(r.target),d=" "+r.type+" ";if(!(1!==(r.which||r.button)&&!d.match(" "+o.pointerClick+" | sort | keyup ")||" keyup "===d&&r.which!==t.keyCodes.enter||d.match(" "+o.pointerClick+" ")&&void 0!==r.which||d.match(" "+o.pointerUp+" ")&&l!==r.target&&!0!==a)){if(d.match(" "+o.pointerDown+" "))return l=r.target,void("1"===(n=c.jquery.split("."))[0]&&n[1]<4&&r.preventDefault());if(l=null,s=t.getClosest(e(this),"."+t.css.header),t.regex.formElements.test(r.target.nodeName)||c.hasClass(o.cssNoSort)||c.parents("."+o.cssNoSort).length>0||s.hasClass("sorter-false")||c.parents("button").length>0)return!o.cancelSelection;o.delayInit&&t.isEmptyObject(o.cache)&&t.buildCache(o),o.last.clickedIndex=s.attr("data-column")||s.index(),(i=o.$headerIndexed[o.last.clickedIndex][0])&&!i.sortDisabled&&t.initSort(o,i,r)}}),o.cancelSelection&&a.attr("unselectable","on").bind("selectstart",!1).css({"user-select":"none",MozUserSelect:"none"})},buildHeaders:function(r){var a,s,i,o;for(r.headerList=[],r.headerContent=[],r.sortVars=[],t.debug(r,"core")&&(i=new Date),r.columns=t.computeColumnIndex(r.$table.children("thead, tfoot").children("tr")),s=r.cssIcon?'<i class="'+(r.cssIcon===t.css.icon?t.css.icon:r.cssIcon+" "+t.css.icon)+'"></i>':"",r.$headers=e(e.map(r.$table.find(r.selectorHeaders),function(a,i){var o,n,l,c,d,f=e(a);if(!t.getClosest(f,"tr").hasClass(r.cssIgnoreRow))return/(th|td)/i.test(a.nodeName)||(d=t.getClosest(f,"th, td"),f.attr("data-column",d.attr("data-column"))),o=t.getColumnData(r.table,r.headers,i,!0),r.headerContent[i]=f.html(),""===r.headerTemplate||f.find("."+t.css.headerIn).length||(c=r.headerTemplate.replace(t.regex.templateContent,f.html()).replace(t.regex.templateIcon,f.find("."+t.css.icon).length?"":s),r.onRenderTemplate&&(n=r.onRenderTemplate.apply(f,[i,c]))&&"string"==typeof n&&(c=n),f.html('<div class="'+t.css.headerIn+'">'+c+"</div>")),r.onRenderHeader&&r.onRenderHeader.apply(f,[i,r,r.$table]),l=parseInt(f.attr("data-column"),10),a.column=l,d=t.getOrder(t.getData(f,o,"sortInitialOrder")||r.sortInitialOrder),r.sortVars[l]={count:-1,order:d?r.sortReset?[1,0,2]:[1,0]:r.sortReset?[0,1,2]:[0,1],lockedOrder:!1,sortedBy:""},void 0!==(d=t.getData(f,o,"lockedOrder")||!1)&&!1!==d&&(r.sortVars[l].lockedOrder=!0,r.sortVars[l].order=t.getOrder(d)?[1,1]:[0,0]),r.headerList[i]=a,f.addClass(t.css.header+" "+r.cssHeader),t.getClosest(f,"tr").addClass(t.css.headerRow+" "+r.cssHeaderRow).attr("role","row"),r.tabIndex&&f.attr("tabindex",0),a})),r.$headerIndexed=[],o=0;o<r.columns;o++)t.isEmptyObject(r.sortVars[o])&&(r.sortVars[o]={}),a=r.$headers.filter('[data-column="'+o+'"]'),r.$headerIndexed[o]=a.length?a.not(".sorter-false").length?a.not(".sorter-false").filter(":last"):a.filter(":last"):e();r.$table.find(r.selectorHeaders).attr({scope:"col",role:"columnheader"}),t.updateHeader(r),t.debug(r,"core")&&(console.log("Built headers:"+t.benchmark(i)),console.log(r.$headers))},addInstanceMethods:function(r){e.extend(t.instanceMethods,r)},setupParsers:function(e,r){var a,s,i,o,n,l,c,d,f,u,g,p,h,m,b=e.table,y=0,v=t.debug(e,"core"),w={};if(e.$tbodies=e.$table.children("tbody:not(."+e.cssInfoBlock+")"),h=void 0===r?e.$tbodies:r,0===(m=h.length))return v?console.warn("Warning: *Empty table!* Not building a parser cache"):"";for(v&&(p=new Date,console[console.group?"group":"log"]("Detecting parsers for each column")),s={extractors:[],parsers:[]};y<m;){if((a=h[y].rows).length)for(n=0,o=e.columns,l=0;l<o;l++){if((c=e.$headerIndexed[n])&&c.length&&(d=t.getColumnData(b,e.headers,n),g=t.getParserById(t.getData(c,d,"extractor")),u=t.getParserById(t.getData(c,d,"sorter")),f="false"===t.getData(c,d,"parser"),e.empties[n]=(t.getData(c,d,"empty")||e.emptyTo||(e.emptyToBottom?"bottom":"top")).toLowerCase(),e.strings[n]=(t.getData(c,d,"string")||e.stringTo||"max").toLowerCase(),f&&(u=t.getParserById("no-parser")),g||(g=!1),u||(u=t.detectParserForColumn(e,a,-1,n)),v&&(w["("+n+") "+c.text()]={parser:u.id,extractor:g?g.id:"none",string:e.strings[n],empty:e.empties[n]}),s.parsers[n]=u,s.extractors[n]=g,(i=c[0].colSpan-1)>0))for(n+=i,o+=i;i+1>0;)s.parsers[n-i]=u,s.extractors[n-i]=g,i--;n++}y+=s.parsers.length?m:1}v&&(t.isEmptyObject(w)?console.warn(" No parsers detected!"):console[console.table?"table":"log"](w),console.log("Completed detecting parsers"+t.benchmark(p)),console.groupEnd&&console.groupEnd()),e.parsers=s.parsers,e.extractors=s.extractors},addParser:function(e){var r,a=t.parsers.length,s=!0;for(r=0;r<a;r++)t.parsers[r].id.toLowerCase()===e.id.toLowerCase()&&(s=!1);s&&(t.parsers[t.parsers.length]=e)},getParserById:function(e){if("false"==e)return!1;var r,a=t.parsers.length;for(r=0;r<a;r++)if(t.parsers[r].id.toLowerCase()===e.toString().toLowerCase())return t.parsers[r];return!1},detectParserForColumn:function(r,a,s,i){for(var o,n,l,c=t.parsers.length,d=!1,f="",u=t.debug(r,"core"),g=!0;""===f&&g;)(l=a[++s])&&s<50?l.className.indexOf(t.cssIgnoreRow)<0&&(d=a[s].cells[i],f=t.getElementText(r,d,i),n=e(d),u&&console.log("Checking if value was empty on row "+s+", column: "+i+': "'+f+'"')):g=!1;for(;--c>=0;)if((o=t.parsers[c])&&"text"!==o.id&&o.is&&o.is(f,r.table,d,n))return o;return t.getParserById("text")},getElementText:function(r,a,s){if(!a)return"";var i,o=r.textExtraction||"",n=a.jquery?a:e(a);return"string"==typeof o?"basic"===o&&void 0!==(i=n.attr(r.textAttribute))?e.trim(i):e.trim(a.textContent||n.text()):"function"==typeof o?e.trim(o(n[0],r.table,s)):"function"==typeof(i=t.getColumnData(r.table,o,s))?e.trim(i(n[0],r.table,s)):e.trim(n[0].textContent||n.text())},getParsedText:function(e,r,a,s){void 0===s&&(s=t.getElementText(e,r,a));var i=""+s,o=e.parsers[a],n=e.extractors[a];return o&&(n&&"function"==typeof n.format&&(s=n.format(s,e.table,r,a)),i="no-parser"===o.id?"":o.format(""+s,e.table,r,a),e.ignoreCase&&"string"==typeof i&&(i=i.toLowerCase())),i},buildCache:function(r,a,s){var i,o,n,l,c,d,f,u,g,p,h,m,b,y,v,w,x,C,_,$,S,z,F=r.table,R=r.parsers,T=t.debug(r,"core");if(r.$tbodies=r.$table.children("tbody:not(."+r.cssInfoBlock+")"),f=void 0===s?r.$tbodies:s,r.cache={},r.totalRows=0,!R)return T?console.warn("Warning: *Empty table!* Not building a cache"):"";for(T&&(m=new Date),r.showProcessing&&t.isProcessing(F,!0),d=0;d<f.length;d++){for(w=[],i=r.cache[d]={normalized:[]},b=f[d]&&f[d].rows.length||0,l=0;l<b;++l)if(y={child:[],raw:[]},u=e(f[d].rows[l]),g=[],!u.hasClass(r.selectorRemove.slice(1)))if(u.hasClass(r.cssChildRow)&&0!==l)for(S=i.normalized.length-1,(v=i.normalized[S][r.columns]).$row=v.$row.add(u),u.prev().hasClass(r.cssChildRow)||u.prev().addClass(t.css.cssHasChild),p=u.children("th, td"),S=v.child.length,v.child[S]=[],C=0,$=r.columns,c=0;c<$;c++)(h=p[c])&&(v.child[S][c]=t.getParsedText(r,h,c),(x=p[c].colSpan-1)>0&&(C+=x,$+=x)),C++;else{for(y.$row=u,y.order=l,C=0,$=r.columns,c=0;c<$;++c){if((h=u[0].cells[c])&&C<r.columns&&(!(_=void 0!==R[C])&&T&&console.warn("No parser found for row: "+l+", column: "+c+'; cell containing: "'+e(h).text()+'"; does it have a header?'),o=t.getElementText(r,h,C),y.raw[C]=o,n=t.getParsedText(r,h,C,o),g[C]=n,_&&"numeric"===(R[C].type||"").toLowerCase()&&(w[C]=Math.max(Math.abs(n)||0,w[C]||0)),(x=h.colSpan-1)>0)){for(z=0;z<=x;)n=r.duplicateSpan||0===z?o:"string"!=typeof r.textExtraction?t.getElementText(r,h,C+z)||"":"",y.raw[C+z]=n,g[C+z]=n,z++;C+=x,$+=x}C++}g[r.columns]=y,i.normalized[i.normalized.length]=g}i.colMax=w,r.totalRows+=i.normalized.length}if(r.showProcessing&&t.isProcessing(F),T){for(S=Math.min(5,r.cache[0].normalized.length),console[console.group?"group":"log"]("Building cache for "+r.totalRows+" rows (showing "+S+" rows in log) and "+r.columns+" columns"+t.benchmark(m)),o={},c=0;c<r.columns;c++)for(C=0;C<S;C++)o["row: "+C]||(o["row: "+C]={}),o["row: "+C][r.$headerIndexed[c].text()]=r.cache[0].normalized[C][c];console[console.table?"table":"log"](o),console.groupEnd&&console.groupEnd()}e.isFunction(a)&&a(F)},getColumnText:function(r,a,s,i){var o,n,l,c,d,f,u,g,p,h,m="function"==typeof s,b="all"===a,y={raw:[],parsed:[],$cell:[]},v=(r=e(r)[0]).config;if(!t.isEmptyObject(v)){for(d=v.$tbodies.length,o=0;o<d;o++)for(f=(l=v.cache[o].normalized).length,n=0;n<f;n++)c=l[n],i&&!c[v.columns].$row.is(i)||(h=!0,g=b?c.slice(0,v.columns):c[a],c=c[v.columns],u=b?c.raw:c.raw[a],p=b?c.$row.children():c.$row.children().eq(a),m&&(h=s({tbodyIndex:o,rowIndex:n,parsed:g,raw:u,$row:c.$row,$cell:p})),!1!==h&&(y.parsed[y.parsed.length]=g,y.raw[y.raw.length]=u,y.$cell[y.$cell.length]=p));return y}t.debug(v,"core")&&console.warn("No cache found - aborting getColumnText function!")},setHeadersCss:function(r){var a,s,i=r.sortList,o=i.length,n=t.css.sortNone+" "+r.cssNone,l=[t.css.sortAsc+" "+r.cssAsc,t.css.sortDesc+" "+r.cssDesc],c=[r.cssIconAsc,r.cssIconDesc,r.cssIconNone],d=["ascending","descending"],f=function(e,r){e.removeClass(n).addClass(l[r]).attr("aria-sort",d[r]).find("."+t.css.icon).removeClass(c[2]).addClass(c[r])},u=r.$table.find("tfoot tr").children("td, th").add(e(r.namespace+"_extra_headers")).removeClass(l.join(" ")),g=r.$headers.add(e("thead "+r.namespace+"_extra_headers")).removeClass(l.join(" ")).addClass(n).attr("aria-sort","none").find("."+t.css.icon).removeClass(c.join(" ")).end();for(g.not(".sorter-false").find("."+t.css.icon).addClass(c[2]),r.cssIconDisabled&&g.filter(".sorter-false").find("."+t.css.icon).addClass(r.cssIconDisabled),a=0;a<o;a++)if(2!==i[a][1]){if(g=r.$headers.filter(function(e){for(var a=!0,s=r.$headers.eq(e),i=parseInt(s.attr("data-column"),10),o=i+t.getClosest(s,"th, td")[0].colSpan;i<o;i++)a=!!a&&(a||t.isValueInArray(i,r.sortList)>-1);return a}),(g=g.not(".sorter-false").filter('[data-column="'+i[a][0]+'"]'+(1===o?":last":""))).length)for(s=0;s<g.length;s++)g[s].sortDisabled||f(g.eq(s),i[a][1]);u.length&&f(u.filter('[data-column="'+i[a][0]+'"]'),i[a][1])}for(o=r.$headers.length,a=0;a<o;a++)t.setColumnAriaLabel(r,r.$headers.eq(a))},getClosest:function(t,r){return e.fn.closest?t.closest(r):t.is(r)?t:t.parents(r).filter(":first")},setColumnAriaLabel:function(r,a,s){if(a.length){var i=parseInt(a.attr("data-column"),10),o=r.sortVars[i],n=a.hasClass(t.css.sortAsc)?"sortAsc":a.hasClass(t.css.sortDesc)?"sortDesc":"sortNone",l=e.trim(a.text())+": "+t.language[n];a.hasClass("sorter-false")||!1===s?l+=t.language.sortDisabled:(n=(o.count+1)%o.order.length,s=o.order[n],l+=t.language[0===s?"nextAsc":1===s?"nextDesc":"nextNone"]),a.attr("aria-label",l),o.sortedBy?a.attr("data-sortedBy",o.sortedBy):a.removeAttr("data-sortedBy")}},updateHeader:function(e){var r,a,s,i,o=e.table,n=e.$headers.length;for(r=0;r<n;r++)s=e.$headers.eq(r),i=t.getColumnData(o,e.headers,r,!0),a="false"===t.getData(s,i,"sorter")||"false"===t.getData(s,i,"parser"),t.setColumnSort(e,s,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(r,a){var s,i,o,n,l,c,d,f,u=a||r.sortList,g=u.length;for(r.sortList=[],n=0;n<g;n++)if(d=u[n],(s=parseInt(d[0],10))<r.columns){switch(r.sortVars[s].order||(f=t.getOrder(r.sortInitialOrder)?r.sortReset?[1,0,2]:[1,0]:r.sortReset?[0,1,2]:[0,1],r.sortVars[s].order=f,r.sortVars[s].count=0),f=r.sortVars[s].order,i=(""+d[1]).match(/^(1|d|s|o|n)/),i=i?i[0]:""){case"1":case"d":i=1;break;case"s":i=l||0;break;case"o":i=0===(c=f[(l||0)%f.length])?1:1===c?0:2;break;case"n":i=f[++r.sortVars[s].count%f.length];break;default:i=0}l=0===n?i:l,o=[s,parseInt(i,10)||0],r.sortList[r.sortList.length]=o,i=e.inArray(o[1],f),r.sortVars[s].count=i>=0?i:o[1]%f.length}},updateAll:function(e,r,a){var s=e.table;s.isUpdating=!0,t.refreshWidgets(s,!0,!0),t.buildHeaders(e),t.bindEvents(s,e.$headers,!0),t.bindMethods(e),t.commonUpdate(e,r,a)},update:function(e,r,a){e.table.isUpdating=!0,t.updateHeader(e),t.commonUpdate(e,r,a)},updateHeaders:function(e,r){e.table.isUpdating=!0,t.buildHeaders(e),t.bindEvents(e.table,e.$headers,!0),t.resortComplete(e,r)},updateCell:function(r,a,s,i){if(e(a).closest("tr").hasClass(r.cssChildRow))console.warn('Tablesorter Warning! "updateCell" for child row content has been disabled, use "update" instead');else{if(t.isEmptyObject(r.cache))return t.updateHeader(r),void t.commonUpdate(r,s,i);r.table.isUpdating=!0,r.$table.find(r.selectorRemove).remove();var o,n,l,c,d,f,u=r.$tbodies,g=e(a),p=u.index(t.getClosest(g,"tbody")),h=r.cache[p],m=t.getClosest(g,"tr");if(a=g[0],u.length&&p>=0){if(l=u.eq(p).find("tr").not("."+r.cssChildRow).index(m),d=h.normalized[l],(f=m[0].cells.length)!==r.columns)for(c=0,o=!1,n=0;n<f;n++)o||m[0].cells[n]===a?o=!0:c+=m[0].cells[n].colSpan;else c=g.index();o=t.getElementText(r,a,c),d[r.columns].raw[c]=o,o=t.getParsedText(r,a,c,o),d[c]=o,"numeric"===(r.parsers[c].type||"").toLowerCase()&&(h.colMax[c]=Math.max(Math.abs(o)||0,h.colMax[c]||0)),!1!==(o="undefined"!==s?s:r.resort)?t.checkResort(r,o,i):t.resortComplete(r,i)}else t.debug(r,"core")&&console.error("updateCell aborted, tbody missing or not within the indicated table"),r.table.isUpdating=!1}},addRows:function(r,a,s,i){var o,n,l,c,d,f,u,g,p,h,m,b,y,v="string"==typeof a&&1===r.$tbodies.length&&/<tr/.test(a||""),w=r.table;if(v)a=e(a),r.$tbodies.append(a);else if(!(a&&a instanceof e&&t.getClosest(a,"table")[0]===r.table))return t.debug(r,"core")&&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(w.isUpdating=!0,t.isEmptyObject(r.cache))t.updateHeader(r),t.commonUpdate(r,s,i);else{for(d=a.filter("tr").attr("role","row").length,l=r.$tbodies.index(a.parents("tbody").filter(":first")),r.parsers&&r.parsers.length||t.setupParsers(r),c=0;c<d;c++){for(p=0,u=a[c].cells.length,g=r.cache[l].normalized.length,m=[],h={child:[],raw:[],$row:a.eq(c),order:g},f=0;f<u;f++)b=a[c].cells[f],o=t.getElementText(r,b,p),h.raw[p]=o,n=t.getParsedText(r,b,p,o),m[p]=n,"numeric"===(r.parsers[p].type||"").toLowerCase()&&(r.cache[l].colMax[p]=Math.max(Math.abs(n)||0,r.cache[l].colMax[p]||0)),(y=b.colSpan-1)>0&&(p+=y),p++;m[r.columns]=h,r.cache[l].normalized[g]=m}t.checkResort(r,s,i)}},updateCache:function(e,r,a){e.parsers&&e.parsers.length||t.setupParsers(e,a),t.buildCache(e,r,a)},appendCache:function(e,r){var a,s,i,o,n,l,c,d=e.table,f=e.$tbodies,u=[],g=e.cache;if(t.isEmptyObject(g))return e.appender?e.appender(d,u):d.isUpdating?e.$table.triggerHandler("updateComplete",d):"";for(t.debug(e,"core")&&(c=new Date),l=0;l<f.length;l++)if((i=f.eq(l)).length){for(o=t.processTbody(d,i,!0),s=(a=g[l].normalized).length,n=0;n<s;n++)u[u.length]=a[n][e.columns].$row,e.appender&&(!e.pager||e.pager.removeRows||e.pager.ajax)||o.append(a[n][e.columns].$row);t.processTbody(d,o,!1)}e.appender&&e.appender(d,u),t.debug(e,"core")&&console.log("Rebuilt table"+t.benchmark(c)),r||e.appender||t.applyWidget(d),d.isUpdating&&e.$table.triggerHandler("updateComplete",d)},commonUpdate:function(e,r,a){e.$table.find(e.selectorRemove).remove(),t.setupParsers(e),t.buildCache(e),t.checkResort(e,r,a)},initSort:function(r,a,s){if(r.table.isUpdating)return setTimeout(function(){t.initSort(r,a,s)},50);var i,o,n,l,c,d,f,u=!s[r.sortMultiSortKey],g=r.table,p=r.$headers.length,h=t.getClosest(e(a),"th, td"),m=parseInt(h.attr("data-column"),10),b="mouseup"===s.type?"user":s.type,y=r.sortVars[m].order;if(h=h[0],r.$table.triggerHandler("sortStart",g),d=(r.sortVars[m].count+1)%y.length,r.sortVars[m].count=s[r.sortResetKey]?2:d,r.sortRestart)for(n=0;n<p;n++)f=r.$headers.eq(n),m!==(d=parseInt(f.attr("data-column"),10))&&(u||f.hasClass(t.css.sortNone))&&(r.sortVars[d].count=-1);if(u){if(e.each(r.sortVars,function(e){r.sortVars[e].sortedBy=""}),r.sortList=[],r.last.sortList=[],null!==r.sortForce)for(i=r.sortForce,o=0;o<i.length;o++)i[o][0]!==m&&(r.sortList[r.sortList.length]=i[o],r.sortVars[i[o][0]].sortedBy="sortForce");if((l=y[r.sortVars[m].count])<2&&(r.sortList[r.sortList.length]=[m,l],r.sortVars[m].sortedBy=b,h.colSpan>1))for(o=1;o<h.colSpan;o++)r.sortList[r.sortList.length]=[m+o,l],r.sortVars[m+o].count=e.inArray(l,y),r.sortVars[m+o].sortedBy=b}else if(r.sortList=e.extend([],r.last.sortList),t.isValueInArray(m,r.sortList)>=0)for(r.sortVars[m].sortedBy=b,o=0;o<r.sortList.length;o++)(d=r.sortList[o])[0]===m&&(d[1]=y[r.sortVars[m].count],2===d[1]&&(r.sortList.splice(o,1),r.sortVars[m].count=-1));else if(l=y[r.sortVars[m].count],r.sortVars[m].sortedBy=b,l<2&&(r.sortList[r.sortList.length]=[m,l],h.colSpan>1))for(o=1;o<h.colSpan;o++)r.sortList[r.sortList.length]=[m+o,l],r.sortVars[m+o].count=e.inArray(l,y),r.sortVars[m+o].sortedBy=b;if(r.last.sortList=e.extend([],r.sortList),r.sortList.length&&r.sortAppend&&(i=e.isArray(r.sortAppend)?r.sortAppend:r.sortAppend[r.sortList[0][0]],!t.isEmptyObject(i)))for(o=0;o<i.length;o++)if(i[o][0]!==m&&t.isValueInArray(i[o][0],r.sortList)<0){if(l=i[o][1],c=(""+l).match(/^(a|d|s|o|n)/))switch(d=r.sortList[0][1],c[0]){case"d":l=1;break;case"s":l=d;break;case"o":l=0===d?1:0;break;case"n":l=(d+1)%y.length;break;default:l=0}r.sortList[r.sortList.length]=[i[o][0],l],r.sortVars[i[o][0]].sortedBy="sortAppend"}r.$table.triggerHandler("sortBegin",g),setTimeout(function(){t.setHeadersCss(r),t.multisort(r),t.appendCache(r),r.$table.triggerHandler("sortBeforeEnd",g),r.$table.triggerHandler("sortEnd",g)},1)},multisort:function(e){var r,a,s,i,o=e.table,n=[],l=0,c=e.textSorter||"",d=e.sortList,f=d.length,u=e.$tbodies.length;if(!e.serverSideSorting&&!t.isEmptyObject(e.cache)){if(t.debug(e,"core")&&(a=new Date),"object"==typeof c)for(s=e.columns;s--;)"function"==typeof(i=t.getColumnData(o,c,s))&&(n[s]=i);for(r=0;r<u;r++)s=e.cache[r].colMax,e.cache[r].normalized.sort(function(r,a){var i,u,g,p,h,m,b;for(i=0;i<f;i++){if(g=d[i][0],p=d[i][1],l=0===p,e.sortStable&&r[g]===a[g]&&1===f)return r[e.columns].order-a[e.columns].order;if(u=/n/i.test(t.getSortType(e.parsers,g)),u&&e.strings[g]?(u="boolean"==typeof t.string[e.strings[g]]?(l?1:-1)*(t.string[e.strings[g]]?-1:1):e.strings[g]?t.string[e.strings[g]]||0:0,h=e.numberSorter?e.numberSorter(r[g],a[g],l,s[g],o):t["sortNumeric"+(l?"Asc":"Desc")](r[g],a[g],u,s[g],g,e)):(m=l?r:a,b=l?a:r,h="function"==typeof c?c(m[g],b[g],l,g,o):"function"==typeof n[g]?n[g](m[g],b[g],l,g,o):t["sortNatural"+(l?"Asc":"Desc")](r[g]||"",a[g]||"",g,e)),h)return h}return r[e.columns].order-a[e.columns].order});t.debug(e,"core")&&console.log("Applying sort "+d.toString()+t.benchmark(a))}},resortComplete:function(t,r){t.table.isUpdating&&t.$table.triggerHandler("updateComplete",t.table),e.isFunction(r)&&r(t.table)},checkResort:function(r,a,s){var i=e.isArray(a)?a:r.sortList;!1===(void 0===a?r.resort:a)||r.serverSideSorting||r.table.isProcessing?(t.resortComplete(r,s),t.applyWidget(r.table,!1)):i.length?t.sortOn(r,i,function(){t.resortComplete(r,s)},!0):t.sortReset(r,function(){t.resortComplete(r,s),t.applyWidget(r.table,!1)})},sortOn:function(r,a,s,i){var o,n=r.table;for(r.$table.triggerHandler("sortStart",n),o=0;o<r.columns;o++)r.sortVars[o].sortedBy=t.isValueInArray(o,a)>-1?"sorton":"";t.updateHeaderSortCount(r,a),t.setHeadersCss(r),r.delayInit&&t.isEmptyObject(r.cache)&&t.buildCache(r),r.$table.triggerHandler("sortBegin",n),t.multisort(r),t.appendCache(r,i),r.$table.triggerHandler("sortBeforeEnd",n),r.$table.triggerHandler("sortEnd",n),t.applyWidget(n),e.isFunction(s)&&s(n)},sortReset:function(r,a){r.sortList=[];var s;for(s=0;s<r.columns;s++)r.sortVars[s].count=-1,r.sortVars[s].sortedBy="";t.setHeadersCss(r),t.multisort(r),t.appendCache(r),e.isFunction(a)&&a(r.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,r){if(e===r)return 0;e=(e||"").toString(),r=(r||"").toString();var a,s,i,o,n,l,c=t.regex;if(c.hex.test(r)){if(a=parseInt(e.match(c.hex),16),s=parseInt(r.match(c.hex),16),a<s)return-1;if(a>s)return 1}for(a=e.replace(c.chunk,"\\0$1\\0").replace(c.chunks,"").split("\\0"),s=r.replace(c.chunk,"\\0$1\\0").replace(c.chunks,"").split("\\0"),l=Math.max(a.length,s.length),n=0;n<l;n++){if(i=isNaN(a[n])?a[n]||0:parseFloat(a[n])||0,o=isNaN(s[n])?s[n]||0:parseFloat(s[n])||0,isNaN(i)!==isNaN(o))return isNaN(i)?1:-1;if(typeof i!=typeof o&&(i+="",o+=""),i<o)return-1;if(i>o)return 1}return 0},sortNaturalAsc:function(e,r,a,s){if(e===r)return 0;var i=t.string[s.empties[a]||s.emptyTo];return""===e&&0!==i?"boolean"==typeof i?i?-1:1:-i||-1:""===r&&0!==i?"boolean"==typeof i?i?1:-1:i||1:t.sortNatural(e,r)},sortNaturalDesc:function(e,r,a,s){if(e===r)return 0;var i=t.string[s.empties[a]||s.emptyTo];return""===e&&0!==i?"boolean"==typeof i?i?-1:1:i||1:""===r&&0!==i?"boolean"==typeof i?i?1:-1:-i||-1:t.sortNatural(r,e)},sortText:function(e,t){return e>t?1:e<t?-1:0},getTextValue:function(e,t,r){if(r){var a,s=e?e.length:0,i=r+t;for(a=0;a<s;a++)i+=e.charCodeAt(a);return t*i}return 0},sortNumericAsc:function(e,r,a,s,i,o){if(e===r)return 0;var n=t.string[o.empties[i]||o.emptyTo];return""===e&&0!==n?"boolean"==typeof n?n?-1:1:-n||-1:""===r&&0!==n?"boolean"==typeof n?n?1:-1:n||1:(isNaN(e)&&(e=t.getTextValue(e,a,s)),isNaN(r)&&(r=t.getTextValue(r,a,s)),e-r)},sortNumericDesc:function(e,r,a,s,i,o){if(e===r)return 0;var n=t.string[o.empties[i]||o.emptyTo];return""===e&&0!==n?"boolean"==typeof n?n?-1:1:n||1:""===r&&0!==n?"boolean"==typeof n?n?1:-1:-n||-1:(isNaN(e)&&(e=t.getTextValue(e,a,s)),isNaN(r)&&(r=t.getTextValue(r,a,s)),r-e)},sortNumeric:function(e,t){return e-t},addWidget:function(e){e.id&&!t.isEmptyObject(t.getWidgetById(e.id))&&console.warn('"'+e.id+'" widget was loaded more than once!'),t.widgets[t.widgets.length]=e},hasWidget:function(t,r){return(t=e(t)).length&&t[0].config&&t[0].config.widgetInit[r]||!1},getWidgetById:function(e){var r,a,s=t.widgets.length;for(r=0;r<s;r++)if((a=t.widgets[r])&&a.id&&a.id.toLowerCase()===e.toLowerCase())return a},applyWidgetOptions:function(r){var a,s,i,o=r.config,n=o.widgets.length;if(n)for(a=0;a<n;a++)(s=t.getWidgetById(o.widgets[a]))&&s.options&&(i=e.extend(!0,{},s.options),o.widgetOptions=e.extend(!0,i,o.widgetOptions),e.extend(!0,t.defaults.widgetOptions,s.options))},addWidgetFromClass:function(e){var r,a,s=e.config,i="^"+s.widgetClass.replace(t.regex.templateName,"(\\S+)+")+"$",o=new RegExp(i,"g"),n=(e.className||"").split(t.regex.spaces);if(n.length)for(r=n.length,a=0;a<r;a++)n[a].match(o)&&(s.widgets[s.widgets.length]=n[a].replace(o,"$1"))},applyWidgetId:function(r,a,s){var i,o,n,l=(r=e(r)[0]).config,c=l.widgetOptions,d=t.debug(l,"core"),f=t.getWidgetById(a);f&&(n=f.id,i=!1,e.inArray(n,l.widgets)<0&&(l.widgets[l.widgets.length]=n),d&&(o=new Date),!s&&l.widgetInit[n]||(l.widgetInit[n]=!0,r.hasInitialized&&t.applyWidgetOptions(r),"function"==typeof f.init&&(i=!0,d&&console[console.group?"group":"log"]("Initializing "+n+" widget"),f.init(r,f,l,c))),s||"function"!=typeof f.format||(i=!0,d&&console[console.group?"group":"log"]("Updating "+n+" widget"),f.format(r,l,c,!1)),d&&i&&(console.log("Completed "+(s?"initializing ":"applying ")+n+" widget"+t.benchmark(o)),console.groupEnd&&console.groupEnd()))},applyWidget:function(r,a,s){var i,o,n,l,c,d=(r=e(r)[0]).config,f=t.debug(d,"core"),u=[];if(!1===a||!r.hasInitialized||!r.isApplyingWidgets&&!r.isUpdating){if(f&&(c=new Date),t.addWidgetFromClass(r),clearTimeout(d.timerReady),d.widgets.length){for(r.isApplyingWidgets=!0,d.widgets=e.grep(d.widgets,function(t,r){return e.inArray(t,d.widgets)===r}),o=(n=d.widgets||[]).length,i=0;i<o;i++)(l=t.getWidgetById(n[i]))&&l.id?(l.priority||(l.priority=10),u[i]=l):f&&console.warn('"'+n[i]+'" was enabled, but the widget code has not been loaded!');for(u.sort(function(e,t){return e.priority<t.priority?-1:e.priority===t.priority?0:1}),o=u.length,f&&console[console.group?"group":"log"]("Start "+(a?"initializing":"applying")+" widgets"),i=0;i<o;i++)(l=u[i])&&l.id&&t.applyWidgetId(r,l.id,a);f&&console.groupEnd&&console.groupEnd()}d.timerReady=setTimeout(function(){r.isApplyingWidgets=!1,e.data(r,"lastWidgetApplication",new Date),d.$table.triggerHandler("tablesorter-ready"),a||"function"!=typeof s||s(r),f&&(l=d.widgets.length,console.log("Completed "+(!0===a?"initializing ":"applying ")+l+" widget"+(1!==l?"s":"")+t.benchmark(c)))},10)}},removeWidget:function(r,a,s){var i,o,n,l,c=(r=e(r)[0]).config;if(!0===a)for(a=[],l=t.widgets.length,n=0;n<l;n++)(o=t.widgets[n])&&o.id&&(a[a.length]=o.id);else a=(e.isArray(a)?a.join(","):a||"").toLowerCase().split(/[\s,]+/);for(l=a.length,i=0;i<l;i++)o=t.getWidgetById(a[i]),(n=e.inArray(a[i],c.widgets))>=0&&!0!==s&&c.widgets.splice(n,1),o&&o.remove&&(t.debug(c,"core")&&console.log((s?"Refreshing":"Removing")+' "'+a[i]+'" widget'),o.remove(r,c,c.widgetOptions,s),c.widgetInit[a[i]]=!1);c.$table.triggerHandler("widgetRemoveEnd",r)},refreshWidgets:function(r,a,s){var i,o,n=(r=e(r)[0]).config.widgets,l=t.widgets,c=l.length,d=[],f=function(t){e(t).triggerHandler("refreshComplete")};for(i=0;i<c;i++)(o=l[i])&&o.id&&(a||e.inArray(o.id,n)<0)&&(d[d.length]=o.id);t.removeWidget(r,d.join(","),!0),!0!==s?(t.applyWidget(r,a||!1,f),a&&t.applyWidget(r,!1,f)):f(r)},benchmark:function(e){return" ("+((new Date).getTime()-e.getTime())+" ms)"},log:function(){console.log(arguments)},debug:function(e,t){return e&&(!0===e.debug||"string"==typeof e.debug&&e.debug.indexOf(t)>-1)},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(r,a){if("string"!=typeof r||""===r)return r;var s;return r=(a&&a.config?!1!==a.config.usNumberFormat:void 0===a||a)?r.replace(t.regex.comma,""):r.replace(t.regex.digitNonUS,"").replace(t.regex.comma,"."),t.regex.digitNegativeTest.test(r)&&(r=r.replace(t.regex.digitNegativeReplace,"-$1")),s=parseFloat(r),isNaN(s)?e.trim(r):s},isDigit:function(e){return isNaN(e)?t.regex.digitTest.test(e.toString().replace(t.regex.digitReplace,"")):""!==e},computeColumnIndex:function(r,a){var s,i,o,n,l,c,d,f,u,g,p=a&&a.columns||0,h=[],m=new Array(p);for(s=0;s<r.length;s++)for(c=r[s].cells,i=0;i<c.length;i++){for(d=s,f=(l=c[i]).rowSpan||1,u=l.colSpan||1,void 0===h[d]&&(h[d]=[]),o=0;o<h[d].length+1;o++)if(void 0===h[d][o]){g=o;break}for(p&&l.cellIndex===g||(l.setAttribute?l.setAttribute("data-column",g):e(l).attr("data-column",g)),o=d;o<d+f;o++)for(void 0===h[o]&&(h[o]=[]),m=h[o],n=g;n<g+u;n++)m[n]="x"}return t.checkColumnCount(r,h,m.length),m.length},checkColumnCount:function(e,t,r){var a,s,i=!0,o=[];for(a=0;a<t.length;a++)if(t[a]&&(s=t[a].length,t[a].length!==r)){i=!1;break}i||(e.each(function(e,t){var r=t.parentElement.nodeName;o.indexOf(r)<0&&o.push(r)}),console.error("Invalid or incorrect number of columns in the "+o.join(" or ")+"; expected "+r+", but found "+s+" columns"))},fixColumnWidth:function(r){var a,s,i,o,n,l=(r=e(r)[0]).config,c=l.$table.children("colgroup");if(c.length&&c.hasClass(t.css.colgroup)&&c.remove(),l.widthFixed&&0===l.$table.children("colgroup").length){for(c=e('<colgroup class="'+t.css.colgroup+'">'),a=l.$table.width(),o=(i=l.$tbodies.find("tr:first").children(":visible")).length,n=0;n<o;n++)s=parseInt(i.eq(n).width()/a*1e3,10)/10+"%",c.append(e("<col>").css("width",s));l.$table.prepend(c)}},getData:function(t,r,a){var s,i,o="",n=e(t);return n.length?(s=!!e.metadata&&n.metadata(),i=" "+(n.attr("class")||""),void 0!==n.data(a)||void 0!==n.data(a.toLowerCase())?o+=n.data(a)||n.data(a.toLowerCase()):s&&void 0!==s[a]?o+=s[a]:r&&void 0!==r[a]?o+=r[a]:" "!==i&&i.match(" "+a+"-")&&(o=i.match(new RegExp("\\s"+a+"-([\\w-]+)"))[1]||""),e.trim(o)):""},getColumnData:function(t,r,a,s,i){if("object"!=typeof r||null===r)return r;var o,n=(t=e(t)[0]).config,l=i||n.$headers,c=n.$headerIndexed&&n.$headerIndexed[a]||l.find('[data-column="'+a+'"]:last');if(void 0!==r[a])return s?r[a]:r[l.index(c)];for(o in r)if("string"==typeof o&&c.filter(o).add(c.find(o)).length)return r[o]},isProcessing:function(r,a,s){var i=(r=e(r))[0].config,o=s||r.find("."+t.css.header);a?(void 0!==s&&i.sortList.length>0&&(o=o.filter(function(){return!this.sortDisabled&&t.isValueInArray(parseFloat(e(this).attr("data-column")),i.sortList)>=0})),r.add(o).addClass(t.css.processing+" "+i.cssProcessing)):r.add(o).removeClass(t.css.processing+" "+i.cssProcessing)},processTbody:function(t,r,a){if(t=e(t)[0],a)return t.isProcessing=!0,r.before('<colgroup class="tablesorter-savemyplace"/>'),e.fn.detach?r.detach():r.remove();var s=e(t).find("colgroup.tablesorter-savemyplace");r.insertAfter(s),s.remove(),t.isProcessing=!1},clearTableBody:function(t){e(t)[0].config.$tbodies.children().detach()},characterEquivalents:{a:"áàâãäąå",A:"ÁÀÂÃÄĄÅ",c:"çćč",C:"ÇĆČ",e:"éèêëěę",E:"ÉÈÊËĚĘ",i:"íìİîïı",I:"ÍÌİÎÏ",o:"óòôõöō",O:"ÓÒÔÕÖŌ",ss:"ß",SS:"ẞ",u:"úùûüů",U:"ÚÙÛÜŮ"},replaceAccents:function(e){var r,a="[",s=t.characterEquivalents;if(!t.characterRegex){t.characterRegexArray={};for(r in s)"string"==typeof r&&(a+=s[r],t.characterRegexArray[r]=new RegExp("["+s[r]+"]","g"));t.characterRegex=new RegExp(a+"]")}if(t.characterRegex.test(e))for(r in s)"string"==typeof r&&(e=e.replace(t.characterRegexArray[r],r));return e},validateOptions:function(r){var a,s,i,o,n="headers sortForce sortList sortAppend widgets".split(" "),l=r.originalSettings;if(l){t.debug(r,"core")&&(o=new Date);for(a in l)if("undefined"===(i=typeof t.defaults[a]))console.warn('Tablesorter Warning! "table.config.'+a+'" option not recognized');else if("object"===i)for(s in l[a])i=t.defaults[a]&&typeof t.defaults[a][s],e.inArray(a,n)<0&&"undefined"===i&&console.warn('Tablesorter Warning! "table.config.'+a+"."+s+'" option not recognized');t.debug(r,"core")&&console.log("validate options time:"+t.benchmark(o))}},restoreHeaders:function(r){var a,s,i=e(r)[0].config,o=i.$table.find(i.selectorHeaders),n=o.length;for(a=0;a<n;a++)(s=o.eq(a)).find("."+t.css.headerIn).length&&s.html(i.headerContent[a])},destroy:function(r,a,s){if((r=e(r)[0]).hasInitialized){t.removeWidget(r,!0,!1);var i,o=e(r),n=r.config,l=o.find("thead:first"),c=l.find("tr."+t.css.headerRow).removeClass(t.css.headerRow+" "+n.cssHeaderRow),d=o.find("tfoot:first > tr").children("th, td");!1===a&&e.inArray("uitheme",n.widgets)>=0&&(o.triggerHandler("applyWidgetId",["uitheme"]),o.triggerHandler("applyWidgetId",["zebra"])),l.find("tr").not(c).remove(),i="sortReset update updateRows updateAll updateHeaders updateCell addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets removeWidget destroy mouseup mouseleave "+"keypress sortBegin sortEnd resetToLoadState ".split(" ").join(n.namespace+" "),o.removeData("tablesorter").unbind(i.replace(t.regex.spaces," ")),n.$headers.add(d).removeClass([t.css.header,n.cssHeader,n.cssAsc,n.cssDesc,t.css.sortAsc,t.css.sortDesc,t.css.sortNone].join(" ")).removeAttr("data-column").removeAttr("aria-label").attr("aria-disabled","true"),c.find(n.selectorSort).unbind("mousedown mouseup keypress ".split(" ").join(n.namespace+" ").replace(t.regex.spaces," ")),t.restoreHeaders(r),o.toggleClass(t.css.table+" "+n.tableClass+" tablesorter-"+n.theme,!1===a),o.removeClass(n.namespace.slice(1)),r.hasInitialized=!1,delete r.config.cache,"function"==typeof s&&s(r),t.debug(n,"core")&&console.log("tablesorter has been removed")}}};e.fn.tablesorter=function(r){return this.each(function(){var a=this,s=e.extend(!0,{},t.defaults,r,t.instanceMethods);s.originalSettings=r,!a.hasInitialized&&t.buildTable&&"TABLE"!==this.nodeName?t.buildTable(a,s):t.setup(a,s)})},window.console&&window.console.log||(t.logs=[],console={},console.log=console.warn=console.error=console.table=function(){var e=arguments.length>1?arguments:arguments[0];t.logs[t.logs.length]={date:Date.now(),log:e}}),t.addParser({id:"no-parser",is:function(){return!1},format:function(){return""},type:"text"}),t.addParser({id:"text",is:function(){return!0},format:function(r,a){var s=a.config;return r&&(r=e.trim(s.ignoreCase?r.toLocaleLowerCase():r),r=s.sortLocaleCompare?t.replaceAccents(r):r),r},type:"text"}),t.regex.nondigit=/[^\w,. \-()]/g,t.addParser({id:"digit",is:function(e){return t.isDigit(e)},format:function(r,a){var s=t.formatFloat((r||"").replace(t.regex.nondigit,""),a);return r&&"number"==typeof s?s:r?e.trim(r&&a.config.ignoreCase?r.toLocaleLowerCase():r):r},type:"numeric"}),t.regex.currencyReplace=/[+\-,. ]/g,t.regex.currencyTest=/^\(?\d+[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]|[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]\d+\)?$/,t.addParser({id:"currency",is:function(e){return e=(e||"").replace(t.regex.currencyReplace,""),t.regex.currencyTest.test(e)},format:function(r,a){var s=t.formatFloat((r||"").replace(t.regex.nondigit,""),a);return r&&"number"==typeof s?s:r?e.trim(r&&a.config.ignoreCase?r.toLocaleLowerCase():r):r},type:"numeric"}),t.regex.urlProtocolTest=/^(https?|ftp|file):\/\//,t.regex.urlProtocolReplace=/(https?|ftp|file):\/\/(www\.)?/,t.addParser({id:"url",is:function(e){return t.regex.urlProtocolTest.test(e)},format:function(r){return r?e.trim(r.replace(t.regex.urlProtocolReplace,"")):r},type:"text"}),t.regex.dash=/-/g,t.regex.isoDate=/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}/,t.addParser({id:"isoDate",is:function(e){return t.regex.isoDate.test(e)},format:function(e){var r=e?new Date(e.replace(t.regex.dash,"/")):e;return r instanceof Date&&isFinite(r)?r.getTime():e},type:"numeric"}),t.regex.percent=/%/g,t.regex.percentTest=/(\d\s*?%|%\s*?\d)/,t.addParser({id:"percent",is:function(e){return t.regex.percentTest.test(e)&&e.length<15},format:function(e,r){return e?t.formatFloat(e.replace(t.regex.percent,""),r):e},type:"numeric"}),t.addParser({id:"image",is:function(e,t,r,a){return a.find("img").length>0},format:function(t,r,a){return e(a).find("img").attr(r.config.imgAttr||"alt")||t},parsed:!0,type:"text"}),t.regex.dateReplace=/(\S)([AP]M)$/i,t.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,t.regex.usLongDateTest2=/^\d{1,2}\s+[A-Z]{3,10}\s+\d{4}/i,t.addParser({id:"usLongDate",is:function(e){return t.regex.usLongDateTest1.test(e)||t.regex.usLongDateTest2.test(e)},format:function(e){var r=e?new Date(e.replace(t.regex.dateReplace,"$1 $2")):e;return r instanceof Date&&isFinite(r)?r.getTime():e},type:"numeric"}),t.regex.shortDateTest=/(^\d{1,2}[\/\s]\d{1,2}[\/\s]\d{4})|(^\d{4}[\/\s]\d{1,2}[\/\s]\d{1,2})/,t.regex.shortDateReplace=/[\-.,]/g,t.regex.shortDateXXY=/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,t.regex.shortDateYMD=/(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/,t.convertFormat=function(e,r){e=(e||"").replace(t.regex.spaces," ").replace(t.regex.shortDateReplace,"/"),"mmddyyyy"===r?e=e.replace(t.regex.shortDateXXY,"$3/$1/$2"):"ddmmyyyy"===r?e=e.replace(t.regex.shortDateXXY,"$3/$2/$1"):"yyyymmdd"===r&&(e=e.replace(t.regex.shortDateYMD,"$1/$2/$3"));var a=new Date(e);return a instanceof Date&&isFinite(a)?a.getTime():""},t.addParser({id:"shortDate",is:function(e){return e=(e||"").replace(t.regex.spaces," ").replace(t.regex.shortDateReplace,"/"),t.regex.shortDateTest.test(e)},format:function(e,r,a,s){if(e){var i=r.config,o=i.$headerIndexed[s],n=o.length&&o.data("dateFormat")||t.getData(o,t.getColumnData(r,i.headers,s),"dateFormat")||i.dateFormat;return o.length&&o.data("dateFormat",n),t.convertFormat(e,n)||e}return e},type:"numeric"}),t.regex.timeTest=/^(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)$|^((?:[01]\d|[2][0-4]):[0-5]\d)$/i,t.regex.timeMatch=/(0?[1-9]|1[0-2]):([0-5]\d)(\s[AP]M)|((?:[01]\d|[2][0-4]):[0-5]\d)/i,t.addParser({id:"time",is:function(e){return t.regex.timeTest.test(e)},format:function(e){var r,a=(e||"").match(t.regex.timeMatch),s=new Date(e),i=e&&(null!==a?a[0]:"00:00 AM"),o=i?new Date("2000/01/01 "+i.replace(t.regex.dateReplace,"$1 $2")):i;return o instanceof Date&&isFinite(o)?(r=s instanceof Date&&isFinite(s)?s.getTime():0,r?parseFloat(o.getTime()+"."+s.getTime()):o.getTime()):e},type:"numeric"}),t.addParser({id:"metadata",is:function(){return!1},format:function(t,r,a){var s=r.config,i=s.parserMetadataName?s.parserMetadataName:"sortValue";return e(a).metadata()[i]},type:"numeric"}),t.addWidget({id:"zebra",priority:90,format:function(t,r,a){var s,i,o,n,l,c,d,f=new RegExp(r.cssChildRow,"i"),u=r.$tbodies.add(e(r.namespace+"_extra_table").children("tbody:not(."+r.cssInfoBlock+")"));for(l=0;l<u.length;l++)for(o=0,d=(s=u.eq(l).children("tr:visible").not(r.selectorRemove)).length,c=0;c<d;c++)i=s.eq(c),f.test(i[0].className)||o++,n=o%2==0,i.removeClass(a.zebra[n?1:0]).addClass(a.zebra[n?0:1])},remove:function(e,r,a,s){if(!s){var i,o,n=r.$tbodies,l=(a.zebra||["even","odd"]).join(" ");for(i=0;i<n.length;i++)(o=t.processTbody(e,n.eq(i),!0)).children().removeClass(l),t.processTbody(e,o,!1)}}})}(e),function(e,t,r){"use strict";var a=e.tablesorter||{};e.extend(!0,a.defaults,{fixedUrl:"",widgetOptions:{storage_fixedUrl:"",storage_group:"",storage_page:"",storage_storageType:"",storage_tableId:"",storage_useSessionStorage:""}}),a.storage=function(s,i,o,n){var l,c,d,f=!1,u={},g=(s=e(s)[0]).config,p=g&&g.widgetOptions,h=a.debug(g,"storage"),m=(n&&n.storageType||p&&p.storage_storageType).toString().charAt(0).toLowerCase(),b=m?"":n&&n.useSessionStorage||p&&p.storage_useSessionStorage,y=e(s),v=n&&n.id||y.attr(n&&n.group||p&&p.storage_group||"data-table-group")||p&&p.storage_tableId||s.id||e(".tablesorter").index(y),w=n&&n.url||y.attr(n&&n.page||p&&p.storage_page||"data-table-page")||p&&p.storage_fixedUrl||g&&g.fixedUrl||t.location.pathname;if("c"!==m&&(m="s"===m||b?"sessionStorage":"localStorage")in t)try{t[m].setItem("_tmptest","temp"),f=!0,t[m].removeItem("_tmptest")}catch(e){console.warn(m+" is not supported in this browser")}if(h&&console.log("Storage >> Using",f?m:"cookies"),e.parseJSON&&(f?u=e.parseJSON(t[m][i]||"null")||{}:(c=r.cookie.split(/[;\s|=]/),u=0!==(l=e.inArray(i,c)+1)?e.parseJSON(c[l]||"null")||{}:{})),void 0===o||!t.JSON||!JSON.hasOwnProperty("stringify"))return u&&u[w]?u[w][v]:"";u[w]||(u[w]={}),u[w][v]=o,f?t[m][i]=JSON.stringify(u):((d=new Date).setTime(d.getTime()+31536e6),r.cookie=i+"="+JSON.stringify(u).replace(/\"/g,'"')+"; expires="+d.toGMTString()+"; path=/")}}(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:"glyphicon glyphicon-chevron-up",iconSortDesc:"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,s){var i,o,n,l,c,d,f,u,g,p,h,m,b,y=t.themes,v=a.$table.add(e(a.namespace+"_extra_table")),w=a.$headers.add(e(a.namespace+"_extra_headers")),x=a.theme||"jui",C=y[x]||{},_=e.trim([C.sortNone,C.sortDesc,C.sortAsc,C.active].join(" ")),$=e.trim([C.iconSortNone,C.iconSortDesc,C.iconSortAsc].join(" ")),S=t.debug(a,"uitheme");for(S&&(c=new Date),v.hasClass("tablesorter-"+x)&&a.theme===a.appliedTheme&&s.uitheme_applied||(s.uitheme_applied=!0,p=y[a.appliedTheme]||{},h=(b=!e.isEmptyObject(p))?[p.sortNone,p.sortDesc,p.sortAsc,p.active].join(" "):"",m=b?[p.iconSortNone,p.iconSortDesc,p.iconSortAsc].join(" "):"",b&&(s.zebra[0]=e.trim(" "+s.zebra[0].replace(" "+p.even,"")),s.zebra[1]=e.trim(" "+s.zebra[1].replace(" "+p.odd,"")),a.$tbodies.children().removeClass([p.even,p.odd].join(" "))),C.even&&(s.zebra[0]+=" "+C.even),C.odd&&(s.zebra[1]+=" "+C.odd),v.children("caption").removeClass(p.caption||"").addClass(C.caption),u=v.removeClass((a.appliedTheme?"tablesorter-"+(a.appliedTheme||""):"")+" "+(p.table||"")).addClass("tablesorter-"+x+" "+(C.table||"")).children("tfoot"),a.appliedTheme=a.theme,u.length&&u.children("tr").removeClass(p.footerRow||"").addClass(C.footerRow).children("th, td").removeClass(p.footerCells||"").addClass(C.footerCells),w.removeClass((b?[p.header,p.hover,h].join(" "):"")||"").addClass(C.header).not(".sorter-false").unbind("mouseenter.tsuitheme mouseleave.tsuitheme").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(t){e(this)["mouseenter"===t.type?"addClass":"removeClass"](C.hover||"")}),w.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&&w.find("."+t.css.icon).removeClass(b?[p.icons,m].join(" "):"").addClass(C.icons||""),t.hasWidget(a.table,"filter")&&(o=function(){v.children("thead").children("."+t.css.filterRow).removeClass(b?p.filterRow||"":"").addClass(C.filterRow||"")},s.filter_initialized?o():v.one("filterInit",function(){o()}))),i=0;i<a.columns;i++)d=a.$headers.add(e(a.namespace+"_extra_headers")).not(".sorter-false").filter('[data-column="'+i+'"]'),f=t.css.icon?d.find("."+t.css.icon):e(),(g=w.not(".sorter-false").filter('[data-column="'+i+'"]:last')).length&&(d.removeClass(_),f.removeClass($),g[0].sortDisabled?f.removeClass(C.icons||""):(n=C.sortNone,l=C.iconSortNone,g.hasClass(t.css.sortAsc)?(n=[C.sortAsc,C.active].join(" "),l=C.iconSortAsc):g.hasClass(t.css.sortDesc)&&(n=[C.sortDesc,C.active].join(" "),l=C.iconSortDesc),d.addClass(n),f.addClass(l||"")));S&&console.log("uitheme >> Applied "+x+" theme"+t.benchmark(c))},remove:function(e,r,a,s){if(a.uitheme_applied){var i=r.$table,o=r.appliedTheme||"jui",n=t.themes[o]||t.themes.jui,l=i.children("thead").children(),c=n.sortNone+" "+n.sortDesc+" "+n.sortAsc,d=n.iconSortNone+" "+n.iconSortDesc+" "+n.iconSortAsc;i.removeClass("tablesorter-"+o+" "+n.table),a.uitheme_applied=!1,s||(i.find(t.css.header).removeClass(n.header),l.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(n.hover+" "+c+" "+n.active).filter("."+t.css.filterRow).removeClass(n.filterRow),l.find("."+t.css.icon).removeClass(n.icons+" "+d))}}})}(e),function(e){"use strict";var t=e.tablesorter||{};t.addWidget({id:"columns",priority:65,options:{columns:["primary","secondary","tertiary"]},format:function(r,a,s){var i,o,n,l,c,d,f,u,g=a.$table,p=a.$tbodies,h=a.sortList,m=h.length,b=s&&s.columns||["primary","secondary","tertiary"],y=b.length-1;for(f=b.join(" "),o=0;o<p.length;o++)(n=(i=t.processTbody(r,p.eq(o),!0)).children("tr")).each(function(){if(c=e(this),"none"!==this.style.display&&(d=c.children().removeClass(f),h&&h[0]&&(d.eq(h[0][0]).addClass(b[0]),m>1)))for(u=1;u<m;u++)d.eq(h[u][0]).addClass(b[u]||b[y])}),t.processTbody(r,i,!1);if(l=!1!==s.columns_thead?["thead tr"]:[],!1!==s.columns_tfoot&&l.push("tfoot tr"),l.length&&(n=g.find(l.join(",")).children().removeClass(f),m))for(u=0;u<m;u++)n.filter('[data-column="'+h[u][0]+'"]').addClass(b[u]||b[y])},remove:function(r,a,s){var i,o,n=a.$tbodies,l=(s.columns||["primary","secondary","tertiary"]).join(" ");for(a.$headers.removeClass(l),a.$table.children("tfoot").children("tr").children("th, td").removeClass(l),i=0;i<n.length;i++)(o=t.processTbody(r,n.eq(i),!0)).children("tr").each(function(){e(this).children().removeClass(l)}),t.processTbody(r,o,!1)}})}(e),function(e){"use strict";var t,r,a=e.tablesorter||{},s=a.css,i=a.keyCodes;e.extend(s,{filterRow:"tablesorter-filter-row",filter:"tablesorter-filter",filterDisabled:"disabled",filterRowHide:"hideme"}),e.extend(i,{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_filterLabel:'Filter "{{label}}" column by...',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,i,o){var n,l,c=r.$table,d=r.$tbodies,f="addRows updateCell update updateRows updateComplete appendCache filterReset filterAndSortReset filterFomatterUpdate filterEnd search stickyHeadersInit ".split(" ").join(r.namespace+"filter ");if(c.removeClass("hasFilters").unbind(f.replace(a.regex.spaces," ")).find("."+s.filterRow).remove(),i.filter_initialized=!1,!o){for(n=0;n<d.length;n++)(l=a.processTbody(t,d.eq(n),!0)).children().removeClass(i.filter_filteredRow).show(),a.processTbody(t,l,!1);i.filter_reset&&e(document).undelegate(i.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,s,i){if((r.orTest.test(s.iFilter)||r.orSplit.test(s.filter))&&!r.regex.test(s.filter)){var o,n,l,c,d=e.extend({},s),f=s.filter.split(r.orSplit),u=s.iFilter.split(r.orSplit),g=f.length;for(o=0;o<g;o++){d.nestedFilters=!0,d.filter=""+(t.parseFilter(a,f[o],s)||""),d.iFilter=""+(t.parseFilter(a,u[o],s)||""),l="("+(t.parseFilter(a,d.filter,s)||"")+")";try{if(c=new RegExp(s.isMatch?l:"^"+l+"$",a.widgetOptions.filter_ignoreCase?"i":""),n=c.test(d.exact)||t.processTypes(a,d,i))return n}catch(e){return null}}return n||!1}return null},and:function(a,s,i){if(r.andTest.test(s.filter)){var o,n,l,c,d=e.extend({},s),f=s.filter.split(r.andSplit),u=s.iFilter.split(r.andSplit),g=f.length;for(o=0;o<g;o++){d.nestedFilters=!0,d.filter=""+(t.parseFilter(a,f[o],s)||""),d.iFilter=""+(t.parseFilter(a,u[o],s)||""),c=("("+(t.parseFilter(a,d.filter,s)||"")+")").replace(r.wild01,"\\S{1}").replace(r.wild0More,"\\S*");try{l=new RegExp(s.isMatch?c:"^"+c+"$",a.widgetOptions.filter_ignoreCase?"i":"").test(d.exact)||t.processTypes(a,d,i),n=0===o?l:n&&l}catch(e){return null}}return n||!1}return null},regex:function(e,t){if(r.regex.test(t.filter)){var a,s=t.filter_regexCache[t.index]||r.regex.exec(t.filter),i=s instanceof RegExp;try{i||(t.filter_regexCache[t.index]=s=new RegExp(s[1],s[2])),a=s.test(t.exact)}catch(e){a=!1}return a}return null},operators:function(s,i){if(r.operTest.test(i.iFilter)&&""!==i.iExact){var o,n,l,c=s.table,d=i.parsed[i.index],f=a.formatFloat(i.iFilter.replace(r.operators,""),c),u=s.parsers[i.index]||{},g=f;return(d||"numeric"===u.type)&&(l=e.trim(""+i.iFilter.replace(r.operators,"")),f="number"!=typeof(n=t.parseFilter(s,l,i,!0))||""===n||isNaN(n)?f:n),!d&&"numeric"!==u.type||isNaN(f)||void 0===i.cache?(l=isNaN(i.iExact)?i.iExact.replace(a.regex.nondigit,""):i.iExact,o=a.formatFloat(l,c)):o=i.cache,r.gtTest.test(i.iFilter)?n=r.gteTest.test(i.iFilter)?o>=f:o>f:r.ltTest.test(i.iFilter)&&(n=r.lteTest.test(i.iFilter)?o<=f:o<f),n||""!==g||(n=!0),n}return null},notMatch:function(a,s){if(r.notTest.test(s.iFilter)){var i,o=s.iFilter.replace("!",""),n=t.parseFilter(a,o,s)||"";return r.exact.test(n)?""===(n=n.replace(r.exact,""))||e.trim(n)!==s.iExact:(i=s.iExact.search(e.trim(n)),""===n||(s.anyMatch?i<0:!(a.widgetOptions.filter_startsWith?0===i:i>=0)))}return null},exact:function(a,s){if(r.exact.test(s.iFilter)){var i=s.iFilter.replace(r.exact,""),o=t.parseFilter(a,i,s)||"";return s.anyMatch?e.inArray(o,s.rowArray)>=0:o==s.iExact}return null},range:function(e,s){if(r.toTest.test(s.iFilter)){var i,o,n,l,c=e.table,d=s.index,f=s.parsed[d],u=s.iFilter.split(r.toSplit);return o=u[0].replace(a.regex.nondigit,"")||"",n=a.formatFloat(t.parseFilter(e,o,s),c),o=u[1].replace(a.regex.nondigit,"")||"",l=a.formatFloat(t.parseFilter(e,o,s),c),(f||"numeric"===e.parsers[d].type)&&(n=""===(i=e.parsers[d].format(""+u[0],c,e.$headers.eq(d),d))||isNaN(i)?n:i,l=""===(i=e.parsers[d].format(""+u[1],c,e.$headers.eq(d),d))||isNaN(i)?l:i),!f&&"numeric"!==e.parsers[d].type||isNaN(n)||isNaN(l)?(o=isNaN(s.iExact)?s.iExact.replace(a.regex.nondigit,""):s.iExact,i=a.formatFloat(o,c)):i=s.cache,n>l&&(o=n,n=l,l=o),i>=n&&i<=l||""===n||""===l}return null},wild:function(e,a){if(r.wildOrTest.test(a.iFilter)){var s=""+(t.parseFilter(e,a.iFilter,a)||"");!r.wildTest.test(s)&&a.nestedFilters&&(s=a.isMatch?s:"^("+s+")$");try{return new RegExp(s.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 s,i=0,o=a.iExact.length,n=a.iFilter.slice(1),l=t.parseFilter(e,n,a)||"";for(s=0;s<o;s++)a.iExact[s]===l[i]&&(i+=1);return i===l.length}return null}},init:function(i){a.language=e.extend(!0,{},{to:"to",or:"or",and:"and"},a.language);var o,n,l,c,d,f,u,g,p=i.config,h=p.widgetOptions,m=function(e,t,r){return t=t.trim(),""===t?"":(e||"")+t+(r||"")};if(p.$table.addClass("hasFilters"),p.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*=","]',f="\\{"+r.query+"\\}",e.extend(r,{child:new RegExp(p.cssChildRow),filtered:new RegExp(h.filter_filteredRow),alreadyFiltered:new RegExp("(\\s+(-"+m("|",a.language.or)+m("|",a.language.to)+")\\s+)","i"),toTest:new RegExp("\\s+(-"+m("|",a.language.to)+")\\s+","i"),toSplit:new RegExp("(?:\\s+(?:-"+m("|",a.language.to)+")\\s+)","gi"),andTest:new RegExp("\\s+("+m("",a.language.and,"|")+"&&)\\s+","i"),andSplit:new RegExp("(?:\\s+(?:"+m("",a.language.and,"|")+"&&)\\s+)","gi"),orTest:new RegExp("(\\|"+m("|\\s+",a.language.or,"\\s+")+")","i"),orSplit:new RegExp("(?:\\|"+m("|\\s+(?:",a.language.or,")\\s+")+")","gi"),iQuery:new RegExp(f,"i"),igQuery:new RegExp(f,"ig"),operTest:/^[<>]=?/,gtTest:/>/,gteTest:/>=/,ltTest:/</,lteTest:/<=/,notTest:/^\!/,wildOrTest:/[\?\*\|]/,wildTest:/\?\*/,fuzzyTest:/^~/,exactTest:/[=\"\|!]/}),f=p.$headers.filter(".filter-false, .parser-false").length,!1!==h.filter_columnFilters&&f!==p.$headers.length&&t.buildRow(i,p,h),l="addRows updateCell update updateRows updateComplete appendCache filterReset "+"filterAndSortReset filterResetSaved filterEnd search ".split(" ").join(p.namespace+"filter "),p.$table.bind(l,function(r,o){return f=h.filter_hideEmpty&&e.isEmptyObject(p.cache)&&!(p.delayInit&&"appendCache"===r.type),p.$table.find("."+s.filterRow).toggleClass(h.filter_filteredRow,f),/(search|filter)/.test(r.type)||(r.stopPropagation(),t.buildDefault(i,!0)),"filterReset"===r.type||"filterAndSortReset"===r.type?(p.$table.find("."+s.filter).add(h.filter_$externalFilters).val(""),"filterAndSortReset"===r.type?a.sortReset(this.config,function(){t.searching(i,[])}):t.searching(i,[])):"filterResetSaved"===r.type?a.storage(i,"tablesorter-filters",""):"filterEnd"===r.type?t.buildDefault(i,!0):(o="search"===r.type?o:"updateComplete"===r.type?p.$table.data("lastSearch"):"",/(update|add)/.test(r.type)&&"updateComplete"!==r.type&&(p.lastCombinedFilter=null,p.lastSearch=[],setTimeout(function(){p.$table.triggerHandler("filterFomatterUpdate")},100)),t.searching(i,o,!0)),!1}),h.filter_reset&&(h.filter_reset instanceof e?h.filter_reset.click(function(){p.$table.triggerHandler("filterReset")}):e(h.filter_reset).length&&e(document).undelegate(h.filter_reset,"click"+p.namespace+"filter").delegate(h.filter_reset,"click"+p.namespace+"filter",function(){p.$table.triggerHandler("filterReset")})),h.filter_functions)for(d=0;d<p.columns;d++)if(u=a.getColumnData(i,h.filter_functions,d))if(c=p.$headerIndexed[d].removeClass("filter-select"),g=!(c.hasClass("filter-false")||c.hasClass("parser-false")),o="",!0===u&&g)t.buildSelect(i,d);else if("object"==typeof u&&g){for(n in u)"string"==typeof n&&(o+=""===o?'<option value="">'+(c.data("placeholder")||c.attr("data-placeholder")||h.filter_placeholder.select||"")+"</option>":"",f=n,l=n,n.indexOf(h.filter_selectSourceSeparator)>=0&&(l=(f=n.split(h.filter_selectSourceSeparator))[1],f=f[0]),o+="<option "+(l===f?"":'data-function-name="'+n+'" ')+'value="'+f+'">'+l+"</option>");p.$table.find("thead").find("select."+s.filter+'[data-column="'+d+'"]').append(o),(u="function"==typeof(l=h.filter_selectSource)||a.getColumnData(i,l,d))&&t.buildSelect(p.table,d,"",!0,c.hasClass(h.filter_onlyAvail))}t.buildDefault(i,!0),t.bindSearch(i,p.$table.find("."+s.filter),!0),h.filter_external&&t.bindSearch(i,h.filter_external),h.filter_hideFilters&&t.hideFilters(p),p.showProcessing&&(l="filterStart filterEnd ".split(" ").join(p.namespace+"filter-sp "),p.$table.unbind(l.replace(a.regex.spaces," ")).bind(l,function(t,r){c=r?p.$table.find("."+s.header).filter("[data-column]").filter(function(){return""!==r[e(this).data("column")]}):"",a.isProcessing(i,"filterStart"===t.type,r?c:"")})),p.filteredRows=p.totalRows,l="tablesorter-initialized pagerBeforeInitialized ".split(" ").join(p.namespace+"filter "),p.$table.unbind(l.replace(a.regex.spaces," ")).bind(l,function(){t.completeInit(this)}),p.pager&&p.pager.initialized&&!h.filter_initialized?(p.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){t.filterInitComplete(p)},100)):h.filter_initialized||t.completeInit(i)},completeInit:function(e){var r=e.config,s=r.widgetOptions,i=t.setDefaults(e,r,s)||[];i.length&&(r.delayInit&&""===i.join("")||a.setFilters(e,i,!0)),r.$table.triggerHandler("filterFomatterUpdate"),setTimeout(function(){s.filter_initialized||t.filterInitComplete(r)},100)},formatterUpdated:function(e,t){var r=e&&e.closest("table"),a=r.length&&r[0].config,s=a&&a.widgetOptions;s&&!s.filter_initialized&&(s.filter_formatterInit[t]=1)},filterInitComplete:function(r){var s,i,o=r.widgetOptions,n=0,l=function(){o.filter_initialized=!0,r.lastSearch=r.$table.data("lastSearch"),r.$table.triggerHandler("filterInit",r),t.findRows(r.table,r.lastSearch||[]),a.debug(r,"filter")&&console.log("Filter >> Widget initialized")};if(e.isEmptyObject(o.filter_formatter))l();else{for(i=o.filter_formatterInit.length,s=0;s<i;s++)1===o.filter_formatterInit[s]&&n++;clearTimeout(o.filter_initTimer),o.filter_initialized||n!==o.filter_formatterCount?o.filter_initialized||(o.filter_initTimer=setTimeout(function(){l()},500)):l()}},processFilters:function(e,t){var r,a=[],s=t?encodeURIComponent:decodeURIComponent,i=e.length;for(r=0;r<i;r++)e[r]&&(a[r]=s(e[r]));return a},setDefaults:function(r,s,i){var o,n,l,c,d,f=a.getFilters(r)||[];if(i.filter_saveFilters&&a.storage&&(n=a.storage(r,"tablesorter-filters")||[],(o=e.isArray(n))&&""===n.join("")||!o||(f=t.processFilters(n))),""===f.join(""))for(d=s.$headers.add(i.filter_$externalFilters).filter("["+i.filter_defaultAttrib+"]"),l=0;l<=s.columns;l++)c=l===s.columns?"all":l,f[l]=d.filter('[data-column="'+c+'"]').attr(i.filter_defaultAttrib)||f[l]||"";return s.$table.data("lastSearch",f),f},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,i,o){var n,l,c,d,f,u,g,p,h,m=o.filter_cellFilter,b=i.columns,y=e.isArray(m),v='<tr role="search" class="'+s.filterRow+" "+i.cssIgnoreRow+'">';for(c=0;c<b;c++)i.$headerIndexed[c].length&&(v+=(h=i.$headerIndexed[c]&&i.$headerIndexed[c][0].colSpan||0)>1?'<td data-column="'+c+"-"+(c+h-1)+'" colspan="'+h+'"':'<td data-column="'+c+'"',v+=y?m[c]?' class="'+m[c]+'"':"":""!==m?' class="'+m+'"':"",v+="></td>");for(i.$filters=e(v+="</tr>").appendTo(i.$table.children("thead").eq(0)).children("td"),c=0;c<b;c++)u=!1,(d=i.$headerIndexed[c])&&d.length&&(n=t.getColumnElm(i,i.$filters,c),p=a.getColumnData(r,o.filter_functions,c),f=o.filter_functions&&p&&"function"!=typeof p||d.hasClass("filter-select"),l=a.getColumnData(r,i.headers,c),u="false"===a.getData(d[0],l,"filter")||"false"===a.getData(d[0],l,"parser"),f?v=e("<select>").appendTo(n):((p=a.getColumnData(r,o.filter_formatter,c))?(o.filter_formatterCount++,(v=p(n,c))&&0===v.length&&(v=n.children("input")),v&&(0===v.parent().length||v.parent().length&&v.parent()[0]!==n[0])&&n.append(v)):v=e('<input type="search">').appendTo(n),v&&(h=d.data("placeholder")||d.attr("data-placeholder")||o.filter_placeholder.search||"",v.attr("placeholder",h))),v&&(g=(e.isArray(o.filter_cssFilter)?void 0!==o.filter_cssFilter[c]?o.filter_cssFilter[c]||"":"":o.filter_cssFilter)||"",v.addClass(s.filter+" "+g),(h=(g=o.filter_filterLabel).match(/{{([^}]+?)}}/g))||(h=["{{label}}"]),e.each(h,function(t,r){var a=new RegExp(r,"g"),s=d.attr("data-"+r.replace(/{{|}}/g,"")),i=void 0===s?d.text():s;g=g.replace(a,e.trim(i))}),v.attr({"data-column":n.attr("data-column"),"aria-label":g}),u&&(v.attr("placeholder","").addClass(s.filterDisabled)[0].disabled=!0)))},bindSearch:function(r,s,o){if(r=e(r)[0],(s=e(s)).length){var n,l=r.config,c=l.widgetOptions,d=l.namespace+"filter",f=c.filter_$externalFilters;!0!==o&&(n=c.filter_anyColumnSelector+","+c.filter_multipleColumnSelector,c.filter_$anyMatch=s.filter(n),f&&f.length?c.filter_$externalFilters=c.filter_$externalFilters.add(s):c.filter_$externalFilters=s,a.setFilters(r,l.$table.data("lastSearch")||[],!1===o)),n="keypress keyup keydown search change input ".split(" ").join(d+" "),s.attr("data-lastSearchTime",(new Date).getTime()).unbind(n.replace(a.regex.spaces," ")).bind("keydown"+d,function(e){if(e.which===i.escape&&!r.config.widgetOptions.filter_resetOnEsc)return!1}).bind("keyup"+d,function(s){c=r.config.widgetOptions;var o=parseInt(e(this).attr("data-column"),10),n="boolean"==typeof c.filter_liveSearch?c.filter_liveSearch:a.getColumnData(r,c.filter_liveSearch,o);if(void 0===n&&(n=c.filter_liveSearch.fallback||!1),e(this).attr("data-lastSearchTime",(new Date).getTime()),s.which===i.escape)this.value=c.filter_resetOnEsc?"":l.lastSearch[o];else{if(""!==this.value&&("number"==typeof n&&this.value.length<n||s.which!==i.enter&&s.which!==i.backSpace&&(s.which<i.space||s.which>=i.left&&s.which<=i.down)))return;if(!1===n&&""!==this.value&&s.which!==i.enter)return}t.searching(r,!0,!0,o)}).bind("search change keypress input blur ".split(" ").join(d+" "),function(s){var o=parseInt(e(this).attr("data-column"),10),n=s.type,d="boolean"==typeof c.filter_liveSearch?c.filter_liveSearch:a.getColumnData(r,c.filter_liveSearch,o);!r.config.widgetOptions.filter_initialized||s.which!==i.enter&&"search"!==n&&"blur"!==n&&("change"!==n&&"input"!==n||!0!==d&&(!0===d||"INPUT"===s.target.nodeName)||this.value===l.lastSearch[o])||(s.preventDefault(),e(this).attr("data-lastSearchTime",(new Date).getTime()),t.searching(r,"keypress"!==n,!0,o))})}},searching:function(e,r,s,i){var o,n=e.config.widgetOptions;void 0===i?o=!1:void 0===(o="boolean"==typeof n.filter_liveSearch?n.filter_liveSearch:a.getColumnData(e,n.filter_liveSearch,i))&&(o=n.filter_liveSearch.fallback||!1),clearTimeout(n.filter_searchTimer),void 0===r||!0===r?n.filter_searchTimer=setTimeout(function(){t.checkFilters(e,r,s)},o?n.filter_searchDelay:10):t.checkFilters(e,r,s)},equalFilters:function(t,r,a){var s,i=[],o=[],n=t.columns+1;for(r=e.isArray(r)?r:[],a=e.isArray(a)?a:[],s=0;s<n;s++)i[s]=r[s]||"",o[s]=a[s]||"";return i.join(",")===o.join(",")},checkFilters:function(r,i,o){var n=r.config,l=n.widgetOptions,c=e.isArray(i),d=c?i:a.getFilters(r,!0),f=d||[];if(e.isEmptyObject(n.cache))n.delayInit&&(!n.pager||n.pager&&n.pager.initialized)&&a.updateCache(n,function(){t.checkFilters(r,!1,o)});else if(c&&(a.setFilters(r,d,!1,!0!==o),l.filter_initialized||(n.lastSearch=[],n.lastCombinedFilter="")),l.filter_hideFilters&&n.$table.find("."+s.filterRow).triggerHandler(t.hideFiltersCheck(n)?"mouseleave":"mouseenter"),!t.equalFilters(n,n.lastSearch,f)||!1===i){if(!1===i&&(n.lastCombinedFilter="",n.lastSearch=[]),d=d||[],d=Array.prototype.map?d.map(String):d.join("<22>").split("<22>"),l.filter_initialized&&n.$table.triggerHandler("filterStart",[d]),!n.showProcessing)return t.findRows(r,d,f),!1;setTimeout(function(){return t.findRows(r,d,f),!1},30)}},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 i;(a||r.$table).find("."+s.filterRow).addClass(s.filterRowHide).bind("mouseenter mouseleave",function(a){var o=a,n=e(this);clearTimeout(i),i=setTimeout(function(){/enter|over/.test(o.type)?n.removeClass(s.filterRowHide):e(document.activeElement).closest("tr")[0]!==n[0]&&n.toggleClass(s.filterRowHide,t.hideFiltersCheck(r))},200)}).find("input, select").bind("focus blur",function(a){var o=a,n=e(this).closest("tr");clearTimeout(i),i=setTimeout(function(){clearTimeout(i),n.toggleClass(s.filterRowHide,t.hideFiltersCheck(r)&&"focus"!==o.type)},200)})},defaultFilter:function(t,a){if(""===t)return t;var s=r.iQuery,i=a.match(r.igQuery).length,o=i>1?e.trim(t).split(/\s/):[e.trim(t)],n=o.length-1,l=0,c=a;for(n<1&&i>1&&(o[1]=o[0]);s.test(c);)c=c.replace(s,o[l++]||""),s.test(c)&&l<n&&""!==(o[l]||"")&&(c=a.replace(s,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,s,i,o,n,l,c,d,f,u=[];if(/^[0-9]+$/.test(t))return[parseInt(t,10)];if(!r&&/-/.test(t))for(f=(s=t.match(/(\d+)\s*-\s*(\d+)/g))?s.length:0,d=0;d<f;d++){for(i=s[d].split(/\s*-\s*/),(o=parseInt(i[0],10)||0)>(n=parseInt(i[1],10)||e.columns-1)&&(a=o,o=n,n=a),n>=e.columns&&(n=e.columns-1);o<=n;o++)u[u.length]=o;t=t.replace(s[d],"")}if(!r&&/,/.test(t))for(f=(l=t.split(/\s*,\s*/)).length,c=0;c<f;c++)""!==l[c]&&(d=parseInt(l[c],10))<e.columns&&(u[u.length]=d);if(!u.length)for(d=0;d<e.columns;d++)u[u.length]=d;return u},getColumnElm:function(r,a,s){return a.filter(function(){var a=t.findRange(r,e(this).attr("data-column"));return e.inArray(s,a)>-1})},multipleColumns:function(r,a){var s=r.widgetOptions,i=s.filter_initialized||!a.filter(s.filter_anyColumnSelector).length,o=e.trim(t.getLatestSearch(a).attr("data-column")||"");return t.findRange(r,o,!i)},processTypes:function(r,a,s){var i,o=null,n=null;for(i in t.types)e.inArray(i,s.excludeMatch)<0&&null===n&&null!==(n=t.types[i](r,a,s))&&(a.matchedOn=i,o=n);return o},matchType:function(e,t){var r,a=e.widgetOptions,i=e.$headerIndexed[t];return i.hasClass("filter-exact")?r=!1:i.hasClass("filter-match")?r=!0:(a.filter_columnFilters?i=e.$filters.find("."+s.filter).add(a.filter_$externalFilters).filter('[data-column="'+t+'"]'):a.filter_$externalFilters&&(i=a.filter_$externalFilters.filter('[data-column="'+t+'"]')),r=!!i.length&&"match"===e.widgetOptions.filter_matchType[(i[0].nodeName||"").toLowerCase()]),r},processRow:function(s,i,o){var n,l,c,d,f,u=s.widgetOptions,g=!0,p=u.filter_$anyMatch&&u.filter_$anyMatch.length,h=u.filter_$anyMatch&&u.filter_$anyMatch.length?t.multipleColumns(s,u.filter_$anyMatch):[];if(i.$cells=i.$row.children(),i.matchedOn=null,i.anyMatchFlag&&h.length>1||i.anyMatchFilter&&!p){if(i.anyMatch=!0,i.isMatch=!0,i.rowArray=i.$cells.map(function(t){if(e.inArray(t,h)>-1||i.anyMatchFilter&&!p)return i.parsed[t]?f=i.cacheArray[t]:(f=i.rawArray[t],f=e.trim(u.filter_ignoreCase?f.toLowerCase():f),s.sortLocaleCompare&&(f=a.replaceAccents(f))),f}).get(),i.filter=i.anyMatchFilter,i.iFilter=i.iAnyMatchFilter,i.exact=i.rowArray.join(" "),i.iExact=u.filter_ignoreCase?i.exact.toLowerCase():i.exact,i.cache=i.cacheArray.slice(0,-1).join(" "),o.excludeMatch=o.noAnyMatch,null!==(l=t.processTypes(s,i,o)))g=l;else if(u.filter_startsWith)for(g=!1,h=Math.min(s.columns,i.rowArray.length);!g&&h>0;)h--,g=g||0===i.rowArray[h].indexOf(i.iFilter);else g=(i.iExact+i.childRowText).indexOf(i.iFilter)>=0;if(i.anyMatch=!1,i.filters.join("")===i.filter)return g}for(h=0;h<s.columns;h++)i.filter=i.filters[h],i.index=h,o.excludeMatch=o.excludeFilter[h],i.filter&&(i.cache=i.cacheArray[h],n=i.parsed[h]?i.cache:i.rawArray[h]||"",i.exact=s.sortLocaleCompare?a.replaceAccents(n):n,i.iExact=!r.type.test(typeof i.exact)&&u.filter_ignoreCase?i.exact.toLowerCase():i.exact,i.isMatch=t.matchType(s,h),n=g,d=u.filter_columnFilters?s.$filters.add(u.filter_$externalFilters).filter('[data-column="'+h+'"]').find("select option:selected").attr("data-function-name")||"":"",s.sortLocaleCompare&&(i.filter=a.replaceAccents(i.filter)),u.filter_defaultFilter&&r.iQuery.test(o.defaultColFilter[h])&&(i.filter=t.defaultFilter(i.filter,o.defaultColFilter[h])),i.iFilter=u.filter_ignoreCase?(i.filter||"").toLowerCase():i.filter,l=null,(c=o.functions[h])&&("function"==typeof c?l=c(i.exact,i.cache,i.filter,h,i.$row,s,i):"function"==typeof c[d||i.filter]&&(l=c[f=d||i.filter](i.exact,i.cache,i.filter,h,i.$row,s,i))),null===l?(l=t.processTypes(s,i,o),f=!0===c&&("and"===i.matchedOn||"or"===i.matchedOn),null===l||f?!0===c?n=i.isMatch?(""+i.iExact).search(i.iFilter)>=0:i.filter===i.exact:(f=(i.iExact+i.childRowText).indexOf(t.parseFilter(s,i.iFilter,i)),n=!u.filter_startsWith&&f>=0||u.filter_startsWith&&0===f):n=l):n=l,g=!!n&&g);return g},findRows:function(s,i,o){if(!t.equalFilters(s.config,s.config.lastSearch,o)&&s.config.widgetOptions.filter_initialized){var n,l,c,d,f,u,g,p,h,m,b,y,v,w,x,C,_,$,S,z,F,R,T,I=e.extend([],i),k=s.config,A=k.widgetOptions,D=a.debug(k,"filter"),H={anyMatch:!1,filters:i,filter_regexCache:[]},N={noAnyMatch:["range","operators"],functions:[],excludeFilter:[],defaultColFilter:[],defaultAnyFilter:a.getColumnData(s,A.filter_defaultFilter,k.columns,!0)||""};for(H.parsed=[],h=0;h<k.columns;h++)H.parsed[h]=A.filter_useParsedData||k.parsers&&k.parsers[h]&&k.parsers[h].parsed||a.getData&&"parsed"===a.getData(k.$headerIndexed[h],a.getColumnData(s,k.headers,h),"filter")||k.$headerIndexed[h].hasClass("filter-parsed"),N.functions[h]=a.getColumnData(s,A.filter_functions,h)||k.$headerIndexed[h].hasClass("filter-select"),N.defaultColFilter[h]=a.getColumnData(s,A.filter_defaultFilter,h)||"",N.excludeFilter[h]=(a.getColumnData(s,A.filter_excludeFilter,h,!0)||"").split(/\s+/);for(D&&(console.log("Filter >> Starting filter widget search",i),w=new Date),k.filteredRows=0,k.totalRows=0,o=I||[],g=0;g<k.$tbodies.length;g++){if(p=a.processTbody(s,k.$tbodies.eq(g),!0),h=k.columns,l=k.cache[g].normalized,d=e(e.map(l,function(e){return e[h].$row.get()})),""===o.join("")||A.filter_serversideFiltering)d.removeClass(A.filter_filteredRow).not("."+k.cssChildRow).css("display","");else{if(d=d.not("."+k.cssChildRow),n=d.length,(A.filter_$anyMatch&&A.filter_$anyMatch.length||void 0!==i[k.columns])&&(H.anyMatchFlag=!0,H.anyMatchFilter=""+(i[k.columns]||A.filter_$anyMatch&&t.getLatestSearch(A.filter_$anyMatch).val()||""),A.filter_columnAnyMatch)){for(S=H.anyMatchFilter.split(r.andSplit),z=!1,C=0;C<S.length;C++)(F=S[C].split(":")).length>1&&(isNaN(F[0])?e.each(k.headerContent,function(e,t){t.toLowerCase().indexOf(F[0])>-1&&(i[R=e]=F[1])}):R=parseInt(F[0],10)-1,R>=0&&R<k.columns&&(i[R]=F[1],S.splice(C,1),C--,z=!0));z&&(H.anyMatchFilter=S.join(" && "))}if($=A.filter_searchFiltered,b=k.lastSearch||k.$table.data("lastSearch")||[],$)for(C=0;C<h+1;C++)x=i[C]||"",$||(C=h),$=$&&b.length&&0===x.indexOf(b[C]||"")&&!r.alreadyFiltered.test(x)&&!r.exactTest.test(x)&&!(r.isNeg1.test(x)||r.isNeg2.test(x))&&!(""!==x&&k.$filters&&k.$filters.filter('[data-column="'+C+'"]').find("select").length&&!t.matchType(k,C));for(_=d.not("."+A.filter_filteredRow).length,$&&0===_&&($=!1),D&&console.log("Filter >> Searching through "+($&&_<n?_:"all")+" rows"),H.anyMatchFlag&&(k.sortLocaleCompare&&(H.anyMatchFilter=a.replaceAccents(H.anyMatchFilter)),A.filter_defaultFilter&&r.iQuery.test(N.defaultAnyFilter)&&(H.anyMatchFilter=t.defaultFilter(H.anyMatchFilter,N.defaultAnyFilter),$=!1),H.iAnyMatchFilter=A.filter_ignoreCase&&k.ignoreCase?H.anyMatchFilter.toLowerCase():H.anyMatchFilter),u=0;u<n;u++)if(T=d[u].className,!(u&&r.child.test(T)||$&&r.filtered.test(T))){if(H.$row=d.eq(u),H.rowIndex=u,H.cacheArray=l[u],c=H.cacheArray[k.columns],H.rawArray=c.raw,H.childRowText="",!A.filter_childByColumn){for(T="",m=c.child,C=0;C<m.length;C++)T+=" "+m[C].join(" ")||"";H.childRowText=A.filter_childRows?A.filter_ignoreCase?T.toLowerCase():T:""}if(y=!1,v=t.processRow(k,H,N),f=c.$row,x=!!v,m=c.$row.filter(":gt(0)"),A.filter_childRows&&m.length){if(A.filter_childByColumn)for(A.filter_childWithSibs||(m.addClass(A.filter_filteredRow),f=f.eq(0)),C=0;C<m.length;C++)H.$row=m.eq(C),H.cacheArray=c.child[C],H.rawArray=H.cacheArray,x=t.processRow(k,H,N),y=y||x,!A.filter_childWithSibs&&x&&m.eq(C).removeClass(A.filter_filteredRow);y=y||v}else y=x;f.toggleClass(A.filter_filteredRow,!y)[0].display=y?"":"none"}}k.filteredRows+=d.not("."+A.filter_filteredRow).length,k.totalRows+=d.length,a.processTbody(s,p,!1)}k.lastCombinedFilter=I.join(""),k.lastSearch=I,k.$table.data("lastSearch",I),A.filter_saveFilters&&a.storage&&a.storage(s,"tablesorter-filters",t.processFilters(I,!0)),D&&console.log("Filter >> Completed search"+a.benchmark(w)),A.filter_initialized&&(k.$table.triggerHandler("filterBeforeEnd",k),k.$table.triggerHandler("filterEnd",k)),setTimeout(function(){a.applyWidget(k.table)},0)}},getOptionSource:function(r,s,i){var o=(r=e(r)[0]).config,n=!1,l=o.widgetOptions.filter_selectSource,c=o.$table.data("lastSearch")||[],d="function"==typeof l||a.getColumnData(r,l,s);if(i&&""!==c[s]&&(i=!1),!0===d)n=l(r,s,i);else{if(d instanceof e||"string"===e.type(d)&&d.indexOf("</option>")>=0)return d;if(e.isArray(d))n=d;else if("object"===e.type(l)&&d&&null===(n=d(r,s,i)))return null}return!1===n&&(n=t.getOptions(r,s,i)),t.processOptions(r,s,n)},processOptions:function(t,r,s){if(!e.isArray(s))return!1;var i,o,n,l,c,d,f=(t=e(t)[0]).config,u=void 0!==r&&null!==r&&r>=0&&r<f.columns,g=!!u&&f.$headerIndexed[r].hasClass("filter-select-sort-desc"),p=[];if(s=e.grep(s,function(t,r){return!!t.text||e.inArray(t,s)===r}),u&&f.$headerIndexed[r].hasClass("filter-select-nosort"))return s;for(l=s.length,n=0;n<l;n++)d=(o=s[n]).text?o.text:o,c=(u&&f.parsers&&f.parsers.length&&f.parsers[r].format(d,t,[],r)||d).toString(),c=f.widgetOptions.filter_ignoreCase?c.toLowerCase():c,o.text?(o.parsed=c,p[p.length]=o):p[p.length]={text:o,parsed:c};for(i=f.textSorter||"",p.sort(function(e,s){var o=g?s.parsed:e.parsed,n=g?e.parsed:s.parsed;return u&&"function"==typeof i?i(o,n,!0,r,t):u&&"object"==typeof i&&i.hasOwnProperty(r)?i[r](o,n,!0,r,t):!a.sortNatural||a.sortNatural(o,n)}),s=[],l=p.length,n=0;n<l;n++)s[s.length]=p[n];return s},getOptions:function(t,r,s){var i,o,n,l,c,d,f,u,g=(t=e(t)[0]).config,p=g.widgetOptions,h=[];for(o=0;o<g.$tbodies.length;o++)for(c=g.cache[o],n=g.cache[o].normalized.length,i=0;i<n;i++)if(l=c.row?c.row[i]:c.normalized[i][g.columns].$row[0],!s||!l.className.match(p.filter_filteredRow))if(p.filter_useParsedData||g.parsers[r].parsed||g.$headerIndexed[r].hasClass("filter-parsed")){if(h[h.length]=""+c.normalized[i][r],p.filter_childRows&&p.filter_childByColumn)for(u=c.normalized[i][g.columns].$row.length-1,d=0;d<u;d++)h[h.length]=""+c.normalized[i][g.columns].child[d][r]}else if(h[h.length]=c.normalized[i][g.columns].raw[r],p.filter_childRows&&p.filter_childByColumn)for(u=c.normalized[i][g.columns].$row.length,d=1;d<u;d++)f=c.normalized[i][g.columns].$row.eq(d).children().eq(r),h[h.length]=""+a.getElementText(g,f,r);return h},buildSelect:function(a,i,o,n,l){if(a=e(a)[0],i=parseInt(i,10),a.config.cache&&!e.isEmptyObject(a.config.cache)){var c,d,f,u,g,p,h,m=a.config,b=m.widgetOptions,y=m.$headerIndexed[i],v='<option value="">'+(y.data("placeholder")||y.attr("data-placeholder")||b.filter_placeholder.select||"")+"</option>",w=m.$table.find("thead").find("select."+s.filter+'[data-column="'+i+'"]').val();if(void 0!==o&&""!==o||null!==(o=t.getOptionSource(a,i,l))){if(e.isArray(o)){for(c=0;c<o.length;c++)if((h=o[c]).text){h["data-function-name"]=void 0===h.value?h.text:h.value,v+="<option";for(d in h)h.hasOwnProperty(d)&&"text"!==d&&(v+=" "+d+'="'+h[d].replace(r.quote,""")+'"');h.value||(v+=' value="'+h.text.replace(r.quote,""")+'"'),v+=">"+h.text.replace(r.quote,""")+"</option>"}else""+h!="[object Object]"&&(d=f=h=(""+h).replace(r.quote,"""),f.indexOf(b.filter_selectSourceSeparator)>=0&&(d=(u=f.split(b.filter_selectSourceSeparator))[0],f=u[1]),v+=""!==h?"<option "+(d===f?"":'data-function-name="'+h+'" ')+'value="'+d+'">'+f+"</option>":"");o=[]}g=(m.$filters?m.$filters:m.$table.children("thead")).find("."+s.filter),b.filter_$externalFilters&&(g=g&&g.length?g.add(b.filter_$externalFilters):b.filter_$externalFilters),(p=g.filter('select[data-column="'+i+'"]')).length&&(p[n?"html":"append"](v),e.isArray(o)||p.append(o).val(w),p.val(w))}}},buildDefault:function(e,r){var s,i,o,n=e.config,l=n.widgetOptions,c=n.columns;for(s=0;s<c;s++)o=!((i=n.$headerIndexed[s]).hasClass("filter-false")||i.hasClass("parser-false")),(i.hasClass("filter-select")||!0===a.getColumnData(e,l.filter_functions,s))&&o&&t.buildSelect(e,s,"",r,i.hasClass(l.filter_onlyAvail))}},r=t.regex,a.getFilters=function(r,a,i,o){var n,l,c,d,f=[],u=r?e(r)[0].config:"",g=u?u.widgetOptions:"";if(!0!==a&&g&&!g.filter_columnFilters||e.isArray(i)&&t.equalFilters(u,i,u.lastSearch))return e(r).data("lastSearch")||[];if(u&&(u.$filters&&(l=u.$filters.find("."+s.filter)),g.filter_$externalFilters&&(l=l&&l.length?l.add(g.filter_$externalFilters):g.filter_$externalFilters),l&&l.length))for(f=i||[],n=0;n<u.columns+1;n++)d=n===u.columns?g.filter_anyColumnSelector+","+g.filter_multipleColumnSelector:'[data-column="'+n+'"]',(c=l.filter(d)).length&&(c=t.getLatestSearch(c),e.isArray(i)?(o&&c.length>1&&(c=c.slice(1)),n===u.columns&&(c=(d=c.filter(g.filter_anyColumnSelector)).length?d:c),c.val(i[n]).trigger("change"+u.namespace)):(f[n]=c.val()||"",n===u.columns?c.slice(1).filter('[data-column*="'+c.attr("data-column")+'"]').val(f[n]):c.slice(1).val(f[n])),n===u.columns&&c.length&&(g.filter_$anyMatch=c));return f},a.setFilters=function(r,s,i,o){var n=r?e(r)[0].config:"",l=a.getFilters(r,!0,s,o);return void 0===i&&(i=!0),n&&i&&(n.lastCombinedFilter=null,n.lastSearch=[],t.searching(n.table,s,o),n.$table.triggerHandler("filterFomatterUpdate")),0!==l.length}}(e),function(e,t){"use strict";function r(t,r){var a=isNaN(r.stickyHeaders_offset)?e(r.stickyHeaders_offset):[];return a.length?a.height()||0:parseInt(r.stickyHeaders_offset,10)||0}var a=e.tablesorter||{};e.extend(a.css,{sticky:"tablesorter-stickyHeader",stickyVis:"tablesorter-sticky-visible",stickyHide:"tablesorter-sticky-hidden",stickyWrap:"tablesorter-sticky-wrapper"}),a.addHeaderResizeEvent=function(t,r,a){if((t=e(t)[0]).config){var s={timer:250},i=e.extend({},s,a),o=t.config,n=o.widgetOptions,l=function(e){var t,r,a,s,i,l,c=o.$headers.length;for(n.resize_flag=!0,r=[],t=0;t<c;t++)s=(a=o.$headers.eq(t)).data("savedSizes")||[0,0],i=a[0].offsetWidth,l=a[0].offsetHeight,i===s[0]&&l===s[1]||(a.data("savedSizes",[i,l]),r.push(a[0]));r.length&&!1!==e&&o.$table.triggerHandler("resize",[r]),n.resize_flag=!1};if(clearInterval(n.resize_timer),r)return n.resize_flag=!1,!1;l(!1),n.resize_timer=setInterval(function(){n.resize_flag||l()},i.timer)}},a.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(s,i,o){if(!(i.$table.hasClass("hasStickyHeaders")||e.inArray("filter",i.widgets)>=0&&!i.$table.hasClass("hasFilters"))){var n,l,c,d,f=i.$table,u=e(o.stickyHeaders_attachTo||o.stickyHeaders_appendTo),g=i.namespace+"stickyheaders ",p=e(o.stickyHeaders_yScroll||o.stickyHeaders_attachTo||t),h=e(o.stickyHeaders_xScroll||o.stickyHeaders_attachTo||t),m=f.children("thead:first").children("tr").not(".sticky-false").children(),b=f.children("tfoot"),y=r(i,o),v=f.parent().closest("."+a.css.table).hasClass("hasStickyHeaders")?f.parent().closest("table.tablesorter")[0].config.widgetOptions.$sticky.parent():[],w=v.length?v.height():0,x=o.$sticky=f.clone().addClass("containsStickyHeaders "+a.css.sticky+" "+o.stickyHeaders+" "+i.namespace.slice(1)+"_extra_table").wrap('<div class="'+a.css.stickyWrap+'">'),C=x.parent().addClass(a.css.stickyHide).css({position:u.length?"absolute":"fixed",padding:parseInt(x.parent().parent().css("padding-left"),10),top:y+w,left:0,visibility:"hidden",zIndex:o.stickyHeaders_zIndex||2}),_=x.children("thead:first"),$="",S=function(e,r){var a,s,i,o,n,l=e.filter(":visible"),c=l.length;for(a=0;a<c;a++)o=r.filter(":visible").eq(a),"border-box"===(n=l.eq(a)).css("box-sizing")?s=n.outerWidth():"collapse"===o.css("border-collapse")?t.getComputedStyle?s=parseFloat(t.getComputedStyle(n[0],null).width):(i=parseFloat(n.css("border-width")),s=n.outerWidth()-parseFloat(n.css("padding-left"))-parseFloat(n.css("padding-right"))-i):s=n.width(),o.css({width:s,"min-width":s,"max-width":s})},z=function(r){return!1===r&&v.length?f.position().left:u.length?parseInt(u.css("padding-left"),10)||0:f.offset().left-parseInt(f.css("margin-left"),10)-e(t).scrollLeft()},F=function(){C.css({left:z(),width:f.outerWidth()}),S(f,x),S(m,d)},R=function(t){if(f.is(":visible")){w=v.length?v.offset().top-p.scrollTop()+v.height():0;var s,n=f.offset(),l=r(i,o),c=e.isWindow(p[0]),d=c?p.scrollTop():v.length?parseInt(v[0].style.top,10):p.offset().top,g=u.length?d:p.scrollTop(),h=o.stickyHeaders_includeCaption?0:f.children("caption").height()||0,m=g+l+w-h,y=f.height()-(C.height()+(b.height()||0))-h,x=m>n.top&&m<n.top+y?"visible":"hidden",_="visible"===x?a.css.stickyVis:a.css.stickyHide,S=!C.hasClass(_),R={visibility:x};u.length&&(S=!0,R.top=c?m-u.offset().top:u.scrollTop()),(s=z(c))!==parseInt(C.css("left"),10)&&(S=!0,R.left=s),R.top=(R.top||0)+(!c&&v.length?v.height():l+w),S&&C.removeClass(a.css.stickyVis+" "+a.css.stickyHide).addClass(_).css(R),(x!==$||t)&&(F(),$=x)}};if(u.length&&!u.css("position")&&u.css("position","relative"),x.attr("id")&&(x[0].id+=o.stickyHeaders_cloneId),x.find("> thead:gt(0), tr.sticky-false").hide(),x.find("> tbody, > tfoot").remove(),x.find("caption").toggle(o.stickyHeaders_includeCaption),d=_.children().children(),x.css({height:0,width:0,margin:0}),d.find("."+a.css.resizer).remove(),f.addClass("hasStickyHeaders").bind("pagerComplete"+g,function(){F()}),a.bindEvents(s,_.children().children("."+a.css.header)),o.stickyHeaders_appendTo?e(o.stickyHeaders_appendTo).append(C):f.after(C),i.onRenderHeader)for(l=(c=_.children("tr").children()).length,n=0;n<l;n++)i.onRenderHeader.apply(c.eq(n),[n,i,x]);h.add(p).unbind("scroll resize ".split(" ").join(g).replace(/\s+/g," ")).bind("scroll resize ".split(" ").join(g),function(e){R("resize"===e.type)}),i.$table.unbind("stickyHeadersUpdate"+g).bind("stickyHeadersUpdate"+g,function(){R(!0)}),o.stickyHeaders_addResizeEvent&&a.addHeaderResizeEvent(s),f.hasClass("hasFilters")&&o.filter_columnFilters&&(f.bind("filterEnd"+g,function(){var r=e(document.activeElement).closest("td"),s=r.parent().children().index(r);C.hasClass(a.css.stickyVis)&&o.stickyHeaders_filteredToTop&&(t.scrollTo(0,f.position().top),s>=0&&i.$filters&&i.$filters.eq(s).find("a, select, input").filter(":visible").focus())}),a.filter.bindSearch(f,d.find("."+a.css.filter)),o.filter_hideFilters&&a.filter.hideFilters(i,x)),o.stickyHeaders_addResizeEvent&&f.bind("resize"+i.namespace+"stickyheaders",function(){F()}),R(!0),f.triggerHandler("stickyHeadersInit")}},remove:function(r,s,i){var o=s.namespace+"stickyheaders ";s.$table.removeClass("hasStickyHeaders").unbind("pagerComplete resize filterEnd stickyHeadersUpdate ".split(" ").join(o).replace(/\s+/g," ")).next("."+a.css.stickyWrap).remove(),i.$sticky&&i.$sticky.length&&i.$sticky.remove(),e(t).add(i.stickyHeaders_xScroll).add(i.stickyHeaders_yScroll).add(i.stickyHeaders_attachTo).unbind("scroll resize ".split(" ").join(o).replace(/\s+/g," ")),a.addHeaderResizeEvent(r,!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 s,i,o,n,l=t.$table,c=l.parent(),d=parseInt(l.css("margin-top"),10),f=a.resizable_vars={useStorage:r.storage&&!1!==a.resizable,$wrap:c,mouseXPosition:0,$target:null,$next:null,overflow:"auto"===c.css("overflow")||"scroll"===c.css("overflow")||"auto"===c.css("overflow-x")||"scroll"===c.css("overflow-x"),storedSizes:[]};for(r.resizableReset(t.table,!0),f.tableWidth=l.width(),f.fullWidth=Math.abs(c.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(l,n,!0)),a.resizable_vars.storedSizes=o=(f.useStorage?r.storage(t.table,r.css.resizableStorage):[])||[],r.resizable.setWidths(t,a,o),r.resizable.updateStoredSizes(t,a),a.$resizable_container=e('<div class="'+r.css.resizableContainer+'">').css({top:d}).insertBefore(l),i=0;i<t.columns;i++)s=t.$headerIndexed[i],n=r.getColumnData(t.table,t.headers,i),"false"===r.getData(s,n,"resizable")||e('<div class="'+r.css.resizableHandle+'">').appendTo(a.$resizable_container).attr({"data-column":i,unselectable:"on"}).data("header",s).bind("selectstart",!1);r.resizable.bindings(t,a)}},updateStoredSizes:function(e,t){var r,a,s=e.columns,i=t.resizable_vars;for(i.storedSizes=[],r=0;r<s;r++)a=e.$headerIndexed[r],i.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,s){var i,o,n=a.resizable_vars,l=e(t.namespace+"_extra_headers"),c=t.$table.children("colgroup").children("col");if((s=s||n.storedSizes||[]).length){for(i=0;i<t.columns;i++)r.resizable.setWidth(t.$headerIndexed[i],s[i],n.overflow),l.length&&(o=l.eq(i).add(c.eq(i)),r.resizable.setWidth(o,s[i],n.overflow));(o=e(t.namespace+"_extra_table")).length&&!r.hasWidget(t.table,"scroller")&&r.resizable.setWidth(o,t.$table.outerWidth(),n.overflow)}},setHandlePosition:function(t,a){var s,i=t.$table.height(),o=a.$resizable_container.children(),n=Math.floor(o.width()/2);r.hasWidget(t.table,"scroller")&&(i=0,t.$table.closest("."+r.css.scrollerWrap).children().each(function(){var t=e(this);i+=t.filter('[style*="height"]').length?t.height():t.children("table").height()})),!a.resizable_includeFooter&&t.$table.children("tfoot").length&&(i-=t.$table.children("tfoot").height()),s=parseFloat(e.fn.jquery)>=3.3?0:t.$table.position().left,o.each(function(){var o=e(this),l=parseInt(o.attr("data-column"),10),c=t.columns-1,d=o.data("header");d&&(!d.is(":visible")||!a.resizable_addLastColumn&&r.resizable.checkVisibleColumns(t,l)?o.hide():(l<c||l===c&&a.resizable_addLastColumn)&&o.css({display:"inline-block",height:i,left:d.position().left-s+d.outerWidth()-n}))})},checkVisibleColumns:function(e,t){var r,a=0;for(r=t+1;r<e.columns;r++)a+=e.$headerIndexed[r].is(":visible")?1:0;return 0===a},toggleTextSelection:function(t,a,s){var i=t.namespace+"tsresize";a.resizable_vars.disabled=s,e("body").toggleClass(r.css.resizableNoSelect,s),s?e("body").attr("unselectable","on").bind("selectstart"+i,!1):e("body").removeAttr("unselectable").unbind("selectstart"+i)},bindings:function(a,s){var i=a.namespace+"tsresize";s.$resizable_container.children().bind("mousedown",function(t){var i,o=s.resizable_vars,n=e(a.namespace+"_extra_headers"),l=e(t.target).data("header");i=parseInt(l.attr("data-column"),10),o.$target=l=l.add(n.filter('[data-column="'+i+'"]')),o.target=i,o.$next=t.shiftKey||s.resizable_targetLast?l.parent().children().not(".resizable-false").filter(":last"):l.nextAll(":not(.resizable-false)").eq(0),i=parseInt(o.$next.attr("data-column"),10),o.$next=o.$next.add(n.filter('[data-column="'+i+'"]')),o.next=i,o.mouseXPosition=t.pageX,r.resizable.updateStoredSizes(a,s),r.resizable.toggleTextSelection(a,s,!0)}),e(document).bind("mousemove"+i,function(e){var t=s.resizable_vars;t.disabled&&0!==t.mouseXPosition&&t.$target&&(s.resizable_throttle?(clearTimeout(t.timer),t.timer=setTimeout(function(){r.resizable.mouseMove(a,s,e)},isNaN(s.resizable_throttle)?5:s.resizable_throttle)):r.resizable.mouseMove(a,s,e))}).bind("mouseup"+i,function(){s.resizable_vars.disabled&&(r.resizable.toggleTextSelection(a,s,!1),r.resizable.stopResize(a,s),r.resizable.setHandlePosition(a,s))}),e(t).bind("resize"+i+" resizeEnd"+i,function(){r.resizable.setHandlePosition(a,s)}),a.$table.bind("columnUpdate pagerComplete resizableUpdate ".split(" ").join(i+" "),function(){r.resizable.setHandlePosition(a,s)}).bind("resizableReset"+i,function(){r.resizableReset(a.table)}).find("thead:first").add(e(a.namespace+"_extra_table").find("thead:first")).bind("contextmenu"+i,function(){var e=0===s.resizable_vars.storedSizes.length;return r.resizableReset(a.table),r.resizable.setHandlePosition(a,s),s.resizable_vars.storedSizes=[],e})},mouseMove:function(t,a,s){if(0!==a.resizable_vars.mouseXPosition&&a.resizable_vars.$target){var i,o=0,n=a.resizable_vars,l=n.$next,c=n.storedSizes[n.target],d=s.pageX-n.mouseXPosition;if(n.overflow){if(c+d>0){for(n.storedSizes[n.target]+=d,r.resizable.setWidth(n.$target,n.storedSizes[n.target],!0),i=0;i<t.columns;i++)o+=n.storedSizes[i];r.resizable.setWidth(t.$table.add(e(t.namespace+"_extra_table")),o)}l.length||(n.$wrap[0].scrollLeft=t.$table.width())}else n.fullWidth?(n.storedSizes[n.target]+=d,n.storedSizes[n.next]-=d,r.resizable.setWidths(t,a)):(n.storedSizes[n.target]+=d,r.resizable.setWidths(t,a));n.mouseXPosition=s.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"),e.$table.triggerHandler("resizableComplete")}},r.addWidget({id:"resizable",priority:40,options:{resizable:!0,resizable_addLastColumn:!1,resizable_includeFooter:!0,resizable_widths:[],resizable_throttle:!1,resizable_targetLast:!1},init:function(e,t,a,s){r.resizable.init(a,s)},format:function(e,t,a){r.resizable.setHandlePosition(t,a)},remove:function(t,a,s,i){if(s.$resizable_container){var o=a.namespace+"tsresize";a.$table.add(e(a.namespace+"_extra_table")).removeClass("hasResizable").children("thead").unbind("contextmenu"+o),s.$resizable_container.remove(),r.resizable.toggleTextSelection(a,s,!1),r.resizableReset(t,i),e(document).unbind("mousemove"+o+" mouseup"+o)}}}),r.resizableReset=function(t,a){e(t).each(function(){var e,s,i=this.config,o=i&&i.widgetOptions,n=o.resizable_vars;if(t&&i&&i.$headerIndexed.length){for(n.overflow&&n.tableWidth&&(r.resizable.setWidth(i.$table,n.tableWidth,!0),n.useStorage&&r.storage(t,"tablesorter-table-resized-width",n.tableWidth)),e=0;e<i.columns;e++)s=i.$headerIndexed[e],o.resizable_widths&&o.resizable_widths[e]?r.resizable.setWidth(s,o.resizable_widths[e],n.overflow):s.hasClass("resizable-false")||r.resizable.setWidth(s,"",n.overflow);i.$table.triggerHandler("stickyHeadersUpdate"),r.storage&&!a&&r.storage(this,r.css.resizableStorage,[])}})}}(e,window),function(e){"use strict";function t(t){var r=a.storage(t.table,"tablesorter-savesort");return r&&r.hasOwnProperty("sortList")&&e.isArray(r.sortList)?r.sortList:[]}function r(e,r){return(r||t(e)).join(",")!==e.sortList.join(",")}var a=e.tablesorter||{};a.addWidget({id:"saveSort",priority:20,options:{saveSort:!0},init:function(e,t,r,a){t.format(e,r,a,!0)},format:function(e,s,i,o){var n,l=s.$table,c=!1!==i.saveSort,d={sortList:s.sortList},f=a.debug(s,"saveSort");f&&(n=new Date),l.hasClass("hasSaveSort")?c&&e.hasInitialized&&a.storage&&r(s)&&(a.storage(e,"tablesorter-savesort",d),f&&console.log("saveSort >> Saving last sort: "+s.sortList+a.benchmark(n))):(l.addClass("hasSaveSort"),d="",a.storage&&(d=t(s),f&&console.log('saveSort >> Last sort loaded: "'+d+'"'+a.benchmark(n)),l.bind("saveSortReset",function(t){t.stopPropagation(),a.storage(e,"tablesorter-savesort","")})),o&&d&&d.length>0?s.sortList=d:e.hasInitialized&&d&&d.length>0&&r(s,d)&&a.sortOn(s,d))},remove:function(e,t){t.$table.removeClass("hasSaveSort"),a.storage&&a.storage(e,"tablesorter-savesort","")}})}(e),e.tablesorter}); |