/*!
Select for DataTables 1.2.2
2015-2016 SpryMedia Ltd - datatables.net/license/mit
*/
(function(e){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(j){return e(j,window,document)}):"object"===typeof exports?module.exports=function(j,m){j||(j=window);if(!m||!m.fn.dataTable)m=require("datatables.net")(j,m).$;return e(m,j,j.document)}:e(jQuery,window,document)})(function(e,j,m,h){function v(b,c,a){var d;d=function(a,c){if(a>c)var d=c,c=a,a=d;var f=!1;return b.columns(":visible").indexes().filter(function(b){b===a&&(f=!0);return b===c?(f=!1,!0):f})};var f=
function(a,c){var d=b.rows({search:"applied"}).indexes();if(d.indexOf(a)>d.indexOf(c))var f=c,c=a,a=f;var e=!1;return d.filter(function(b){b===a&&(e=!0);return b===c?(e=!1,!0):e})};!b.cells({selected:!0}).any()&&!a?(d=d(0,c.column),a=f(0,c.row)):(d=d(a.column,c.column),a=f(a.row,c.row));a=b.cells(a,d).flatten();b.cells(c,{selected:!0}).any()?b.cells(a).deselect():b.cells(a).select()}function r(b){var c=b.settings()[0]._select.selector;e(b.table().container()).off("mousedown.dtSelect",c).off("mouseup.dtSelect",
c).off("click.dtSelect",c);e("body").off("click.dtSelect"+b.table().node().id)}function x(b){var c=e(b.table().container()),a=b.settings()[0],d=a._select.selector;c.on("mousedown.dtSelect",d,function(a){if(a.shiftKey||a.metaKey||a.ctrlKey)c.css("-moz-user-select","none").one("selectstart.dtSelect",d,function(){return!1})}).on("mouseup.dtSelect",d,function(){c.css("-moz-user-select","")}).on("click.dtSelect",d,function(a){var c=b.select.items();if(!j.getSelection||!e.trim(j.getSelection().toString())){var d=
b.settings()[0];if(e(a.target).closest("div.dataTables_wrapper")[0]==b.table().container()){var k=b.cell(e(a.target).closest("td, th"));if(k.any()){var g=e.Event("user-select.dt");i(b,g,[c,k,a]);g.isDefaultPrevented()||(g=k.index(),"row"===c?(c=g.row,s(a,b,d,"row",c)):"column"===c?(c=k.index().column,s(a,b,d,"column",c)):"cell"===c&&(c=k.index(),s(a,b,d,"cell",c)),d._select_lastCell=g)}}}});e("body").on("click.dtSelect"+b.table().node().id,function(c){a._select.blurable&&!e(c.target).parents().filter(b.table().container()).length&&
(c.target.getRootNode()===m&&!e(c.target).parents("div.DTE").length)&&p(a,!0)})}function i(b,c,a,d){if(!d||b.flatten().length)"string"===typeof c&&(c+=".dt"),a.unshift(b),e(b.table().node()).trigger(c,a)}function y(b){var c=b.settings()[0];if(c._select.info&&c.aanFeatures.i){var a=b.rows({selected:!0}).flatten().length,d=b.columns({selected:!0}).flatten().length,f=b.cells({selected:!0}).flatten().length,l=function(a,c,d){a.append(e('').append(b.i18n("select."+c+"s",{_:"%d "+
c+"s selected","0":"",1:"1 "+c+" selected"},d)))};e.each(c.aanFeatures.i,function(c,b){var b=e(b),g=e('');l(g,"row",a);l(g,"column",d);l(g,"cell",f);var h=b.children("span.select-info");h.length&&h.remove();""!==g.text()&&b.append(g)})}}function z(b,c,a,d){var f=b[c+"s"]({search:"applied"}).indexes(),d=e.inArray(d,f),l=e.inArray(a,f);if(!b[c+"s"]({selected:!0}).any()&&-1===d)f.splice(e.inArray(a,f)+1,f.length);else{if(d>l)var g=l,l=d,d=g;f.splice(l+1,f.length);f.splice(0,
d)}b[c](a,{selected:!0}).any()?(f.splice(e.inArray(a,f),1),b[c+"s"](f).deselect()):b[c+"s"](f).select()}function p(b,c){if(c||"single"===b._select.style){var a=new g.Api(b);a.rows({selected:!0}).deselect();a.columns({selected:!0}).deselect();a.cells({selected:!0}).deselect()}}function s(b,c,a,d,f){var e=c.select.style(),g=c[d](f,{selected:!0}).any();"os"===e?b.ctrlKey||b.metaKey?c[d](f).select(!g):b.shiftKey?"cell"===d?v(c,f,a._select_lastCell||null):z(c,d,f,a._select_lastCell?a._select_lastCell[d]:
null):(b=c[d+"s"]({selected:!0}),g&&1===b.flatten().length?c[d](f).deselect():(b.deselect(),c[d](f).select())):"multi+shift"==e?b.shiftKey?"cell"===d?v(c,f,a._select_lastCell||null):z(c,d,f,a._select_lastCell?a._select_lastCell[d]:null):c[d](f).select(!g):c[d](f).select(!g)}function q(b,c){return function(a){return a.i18n("buttons."+b,c)}}function t(b){b=b._eventNamespace;return"draw.dt.DT"+b+" select.dt.DT"+b+" deselect.dt.DT"+b}var g=e.fn.dataTable;g.select={};g.select.version="1.2.2";g.select.init=
function(b){var c=b.settings()[0],a=c.oInit.select,d=g.defaults.select,a=a===h?d:a,d="row",f="api",l=!1,w=!0,k="td, th",j="selected",i=!1;c._select={};if(!0===a)f="os",i=!0;else if("string"===typeof a)f=a,i=!0;else if(e.isPlainObject(a)&&(a.blurable!==h&&(l=a.blurable),a.info!==h&&(w=a.info),a.items!==h&&(d=a.items),a.style!==h&&(f=a.style,i=!0),a.selector!==h&&(k=a.selector),a.className!==h))j=a.className;b.select.selector(k);b.select.items(d);b.select.style(f);b.select.blurable(l);b.select.info(w);
c._select.className=j;e.fn.dataTable.ext.order["select-checkbox"]=function(a,c){return this.api().column(c,{order:"index"}).nodes().map(function(c){return"row"===a._select.items?e(c).parent().hasClass(a._select.className):"cell"===a._select.items?e(c).hasClass(a._select.className):!1})};!i&&e(b.table().node()).hasClass("selectable")&&b.select.style("os")};e.each([{type:"row",prop:"aoData"},{type:"column",prop:"aoColumns"}],function(b,c){g.ext.selector[c.type].push(function(a,b,f){var b=b.selected,
e,g=[];if(b===h)return f;for(var k=0,i=f.length;k