/* * FooTable v3 - FooTable is a jQuery plugin that aims to make HTML tables on smaller devices look awesome. * @version 3.0.10 * * @copyright Steven Usher & Brad Vincent 2015 * @license Released under the GPLv3 license. */ (function(n,t){window.console=window.console||{log:function(){},error:function(){}};n.fn.footable=function(n,i){return n=n||{},this.filter("table").each(function(r,u){t.init(u,n,i)})};var i={events:[]};t.__debug__=JSON.parse(localStorage.getItem("footable_debug"))||!1;t.__debug_options__=JSON.parse(localStorage.getItem("footable_debug_options"))||i;t.debug=function(r,u){if(!t.is.boolean(r))return t.__debug__;t.__debug__=r;t.__debug__?(localStorage.setItem("footable_debug",JSON.stringify(t.__debug__)),t.__debug_options__=n.extend(!0,{},i,u||{}),t.is.hash(u)&&localStorage.setItem("footable_debug_options",JSON.stringify(t.__debug_options__))):(localStorage.removeItem("footable_debug"),localStorage.removeItem("footable_debug_options"))};t.get=function(t){return n(t).first().data("__FooTable__")};t.init=function(n,i,r){var u=t.get(n);return u instanceof t.Table&&u.destroy(),new t.Table(n,i,r)}})(jQuery,FooTable=window.FooTable||{}),function(n){var t=function(){return!0};n.arr={};n.arr.each=function(t,i){if(n.is.array(t)&&n.is.fn(i))for(var r=0,u=t.length;r0};n.is.moment=function(t){return n.is.defined(window.moment)&&n.is.object(t)&&n.is.boolean(t._isAMomentObject)};n.is.emptyObject=function(t){if(!n.is.hash(t))return!1;for(var i in t)if(t.hasOwnProperty(i))return!1;return!0};n.is.emptyArray=function(t){return n.is.array(t)?t.length===0:!0};n.is.emptyString=function(t){return n.is.string(t)?t.length===0:!0};n.is.mobile=function(n){return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(n)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(n.substr(0,4))}(navigator.userAgent||navigator.vendor||window.opera)}(FooTable),function(n){n.str={};n.str.contains=function(t,i,r){return!n.is.emptyString(t)&&!n.is.emptyString(i)&&i.length<=t.length&&(r?t.toUpperCase().indexOf(i.toUpperCase()):t.indexOf(i))!==-1};n.str.containsWord=function(t,i,r){var f,u,e;if(n.is.emptyString(t)||n.is.emptyString(i)||t.length1)throw Error("Second argument not supported");if(!n.is.object(i))throw TypeError("Argument must be an object");t.prototype=i;return t.prototype=null,{}}}());var i=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;t.__extend__=function(t,r,u,f){t[r]=n.is.fn(f)&&i.test(u)?function(n,t){return function(){var n,i;return n=this._super,this._super=f,i=t.apply(this,arguments),this._super=n,i}}(r,u):u};t.extend=function(r,u){function h(t,r,u,f){t[r]=n.is.fn(f)&&i.test(u)?function(n,t,i){return function(){var n,r;return n=this._super,this._super=i,r=t.apply(this,arguments),this._super=n,r}}(r,u,f):u}var s=Array.prototype.slice.call(arguments),f,c,e,o;if(r=s.shift(),u=s.shift(),n.is.hash(r)){f=Object.create(this.prototype);c=this.prototype;for(e in r)e!=="__ctor__"&&h(f,e,r[e],c[e]);return o=n.is.fn(f.__ctor__)?f.__ctor__:function(){if(!n.is.fn(this.construct))throw new SyntaxError('FooTable class objects must be constructed with the "new" keyword.');this.construct.apply(this,arguments)},f.construct=n.is.fn(f.construct)?f.construct:function(){},o.prototype=f,f.constructor=o,o.extend=t.extend,o}n.is.string(r)&&n.is.fn(u)&&h(this.prototype,r,u,this.prototype[r])};n.Class=t;n.ClassFactory=n.Class.extend({construct:function(){this.registered={}},contains:function(t){return n.is.defined(this.registered[t])},names:function(){var n=[];for(var t in this.registered)this.registered.hasOwnProperty(t)&&n.push(t);return n},register:function(t,i,r){if(n.is.string(t)&&n.is.fn(i)){var u=this.registered[t];this.registered[t]={name:t,klass:i,priority:n.is.number(r)?r:n.is.defined(u)?u.priority:0}}},load:function(){var t=this,f=Array.prototype.slice.call(arguments),i=[],r=[];for(var u in t.registered)t.registered.hasOwnProperty(u)&&i.push(t.registered[u]);return i.sort(function(n,t){return t.priority-n.priority}),n.arr.each(i,function(i){n.is.fn(i.klass)&&r.push(t._make(i.klass,f))}),r},make:function(t){var r=this,u=Array.prototype.slice.call(arguments),i;return(t=u.shift(),i=r.registered[t],n.is.fn(i.klass))?r._make(i.klass,u):null},_make:function(n,t){function i(){return n.apply(this,t)}return i.prototype=n.prototype,new i}})}(FooTable),function(n,t){t.css2json=function(i){var u,f,e,o,s,r,h;if(t.is.emptyString(i))return{};for(u={},f=i.split(";"),r=0,h=f.length;r")).data("value",this.value).contents().detach().end().append(this.format(this.value)),this._setClasses(this.$el),this._setStyle(this.$el),this.$detail=n("").addClass(this.row.classes.join(" ")).data("__FooTableCell__",this).append(n("")).append(n("")),this.created=!0)},collapse:function(){this.created&&(this.$detail.children("th").html(this.column.title),this.$detail.children("td").first().attr("class",this.$el.attr("class")).attr("style",this.$el.attr("style")).css("display","table-cell").append(this.$el.contents().detach()),t.is.jq(this.$detail.parent())||this.$detail.appendTo(this.row.$details.find(".footable-details > tbody")))},restore:function(){if(this.created){if(t.is.jq(this.$detail.parent())){var n=this.$detail.children("td").first();this.$el.attr("class",n.attr("class")).attr("style",n.attr("style")).css("display",this.column.hidden||!this.column.visible?"none":"table-cell").append(n.contents().detach())}this.$detail.detach()}},parse:function(){return this.column.parser.call(this.column,this.$el,this.ft.o)},format:function(n){return this.column.formatter.call(this.column,n,this.ft.o)},val:function(i,r){var f,e,o,u;if(t.is.undef(i))return this.value;f=this;e=t.is.hash(i)&&t.is.hash(i.options)&&t.is.defined(i.value);this.o=n.extend(!0,{classes:f.classes,style:f.style},e?i.options:{});this.value=e?i.value:i;this.classes=t.is.array(this.o.classes)?this.o.classes:t.is.string(this.o.classes)?this.o.classes.match(/\S+/g):[];this.style=t.is.hash(this.o.style)?this.o.style:t.is.string(this.o.style)?t.css2json(this.o.style):{};this.created&&(this.$el.data("value",this.value).empty(),o=this.$detail.children("td").first().empty(),u=t.is.jq(this.$detail.parent())?o:this.$el,u.append(this.format(this.value)),this._setClasses(u),this._setStyle(u),(t.is.boolean(r)?r:!0)&&this.row.draw())},_setClasses:function(n){var r=!t.is.emptyArray(this.column.classes),u=!t.is.emptyArray(this.classes),i=null;(n.removeAttr("class"),r||u)&&(r&&u?i=this.classes.concat(this.column.classes).join(" "):r?i=this.column.classes.join(" "):u&&(i=this.classes.join(" ")),t.is.emptyString(i)||n.addClass(i))},_setStyle:function(i){var u=!t.is.emptyObject(this.column.style),f=!t.is.emptyObject(this.style),r=null;(i.removeAttr("style"),u||f)&&(u&&f?r=n.extend({},this.column.style,this.style):u?r=this.column.style:f&&(r=this.style),t.is.hash(r)&&i.css(r))}})}(jQuery,FooTable),function(n,t){t.Column=t.Class.extend({construct:function(n,i,r){this.ft=n;this.type=t.is.emptyString(r)?"text":r;this.virtual=t.is.boolean(i.virtual)?i.virtual:!1;this.$el=t.is.jq(i.$el)?i.$el:null;this.index=t.is.number(i.index)?i.index:-1;this.define(i);this.$create()},define:function(n){this.hidden=t.is.boolean(n.hidden)?n.hidden:!1;this.visible=t.is.boolean(n.visible)?n.visible:!0;this.name=t.is.string(n.name)?n.name:null;this.name==null&&(this.name="col"+(n.index+1));this.title=t.is.string(n.title)?n.title:null;!this.virtual&&this.title==null&&t.is.jq(this.$el)&&(this.title=this.$el.html());this.title==null&&(this.title="Column "+(n.index+1));this.style=t.is.hash(n.style)?n.style:t.is.string(n.style)?t.css2json(n.style):{};this.classes=t.is.array(n.classes)?n.classes:t.is.string(n.classes)?n.classes.match(/\S+/g):[];this.parser=t.checkFnValue(this,n.parser,this.parser);this.formatter=t.checkFnValue(this,n.formatter,this.formatter)},$create:function(){(this.$el=!this.virtual&&t.is.jq(this.$el)?this.$el:n("")).html(this.title)},parser:function(i){return t.is.element(i)||t.is.jq(i)?n(i).data("value")||n(i).text():t.is.defined(i)&&i!=null?i+"":null},formatter:function(n){return n==null?"":n},createCell:function(n){var i=t.is.jq(n.$el)?n.$el.children("td,th").get(this.index):null,r=t.is.hash(n.value)?n.value[this.name]:null;return new t.Cell(this.ft,n,this,i||r)}});t.columns=new t.ClassFactory;t.columns.register("text",t.Column)}(jQuery,FooTable),function(n,t){t.Defaults=function(){this.stopPropagation=!1;this.on=null};t.defaults=new t.Defaults}(jQuery,FooTable),function(n,t){t.Row=t.Class.extend({construct:function(n,t,i){this.ft=n;this.columns=t;this.created=!1;this.define(i)},define:function(i){var u,f,r;this.$el=t.is.element(i)||t.is.jq(i)?n(i):null;this.$toggle=n("",{"class":"footable-toggle fooicon fooicon-plus"});u=t.is.hash(i);f=u&&t.is.hash(i.options)&&t.is.hash(i.value);this.value=u?f?i.value:i:null;this.o=n.extend(!0,{expanded:!1,classes:null,style:null},f?i.options:{});this.expanded=t.is.jq(this.$el)?this.$el.data("expanded")||this.o.expanded:this.o.expanded;this.classes=t.is.jq(this.$el)&&this.$el.attr("class")?this.$el.attr("class").match(/\S+/g):t.is.array(this.o.classes)?this.o.classes:t.is.string(this.o.classes)?this.o.classes.match(/\S+/g):[];this.style=t.is.jq(this.$el)&&this.$el.attr("style")?t.css2json(this.$el.attr("style")):t.is.hash(this.o.style)?this.o.style:t.is.string(this.o.style)?t.css2json(this.o.style):{};this.cells=this.createCells();r=this;r.value={};t.arr.each(r.cells,function(n){r.value[n.column.name]=n.val()})},$create:function(){if(!this.created){(this.$el=t.is.jq(this.$el)?this.$el:n("")).data("__FooTableRow__",this);this._setClasses(this.$el);this._setStyle(this.$el);this.ft.rows.toggleColumn=="last"&&this.$toggle.addClass("last-column");this.$details=n("",{"class":"footable-detail-row"}).append(n("",{colspan:this.ft.columns.visibleColspan}).append(n("",{"class":"footable-details "+this.ft.classes.join(" ")}).append("")));var i=this;t.arr.each(i.cells,function(n){n.created||n.$create();i.$el.append(n.$el)});i.$el.off("click.ft.row").on("click.ft.row",{self:i},i._onToggle);this.created=!0}},createCells:function(){var n=this;return t.arr.map(n.columns,function(t){return t.createCell(n)})},val:function(i){var r=this,u,f;if(!t.is.hash(i))return(!t.is.hash(this.value)||t.is.emptyObject(this.value))&&(this.value={},t.arr.each(this.cells,function(n){r.value[n.column.name]=n.val()})),this.value;this.collapse(!1);u=t.is.hash(i);f=u&&t.is.hash(i.options)&&t.is.hash(i.value);this.o=n.extend(!0,{expanded:r.expanded,classes:r.classes,style:r.style},f?i.options:{});this.expanded=this.o.expanded;this.classes=t.is.array(this.o.classes)?this.o.classes:t.is.string(this.o.classes)?this.o.classes.match(/\S+/g):[];this.style=t.is.hash(this.o.style)?this.o.style:t.is.string(this.o.style)?t.css2json(this.o.style):{};this.value=u?f?i.value:i:null;t.arr.each(this.cells,function(n){t.is.defined(r.value[n.column.name])&&n.val(r.value[n.column.name],!1)});this.created&&(this._setClasses(this.$el),this._setStyle(this.$el),this.draw())},_setClasses:function(n){var r=!t.is.emptyArray(this.classes),i=null;if(n.removeAttr("class"),r)i=this.classes.join(" ");else return;t.is.emptyString(i)||n.addClass(i)},_setStyle:function(n){var r=!t.is.emptyObject(this.style),i=null;if(n.removeAttr("style"),r)i=this.style;else return;t.is.hash(i)&&n.css(i)},expand:function(){if(this.created){var n=this;n.ft.raise("expand.ft.row").then(function(){n.__hidden__=t.arr.map(n.cells,function(n){return n.column.hidden&&n.column.visible?n:null});n.__hidden__.length>0&&(n.$details.insertAfter(n.$el).children("td").first().attr("colspan",n.ft.columns.visibleColspan),t.arr.each(n.__hidden__,function(n){n.collapse()}));n.$el.attr("data-expanded",!0);n.$toggle.removeClass("fooicon-plus").addClass("fooicon-minus");n.expanded=!0})}},collapse:function(n){if(this.created){var i=this;i.ft.raise("collapse.ft.row").then(function(){t.arr.each(i.__hidden__,function(n){n.restore()});i.$details.detach();i.$el.removeAttr("data-expanded");i.$toggle.removeClass("fooicon-minus").addClass("fooicon-plus");(t.is.boolean(n)?n:!0)&&(i.expanded=!1)})}},predraw:function(){this.created&&(this.expanded&&this.collapse(!1),this.$toggle.detach(),this.$el.detach())},draw:function(n){this.created||this.$create();t.is.jq(n)&&n.append(this.$el);var i=this;t.arr.each(i.cells,function(n){n.$el.css("display",n.column.hidden||!n.column.visible?"none":"table-cell");i.ft.rows.showToggle&&i.ft.columns.hasHidden&&(i.ft.rows.toggleColumn=="first"&&n.column.index==i.ft.columns.firstVisibleIndex||i.ft.rows.toggleColumn=="last"&&n.column.index==i.ft.columns.lastVisibleIndex)&&n.$el.prepend(i.$toggle)});this.expanded&&this.expand()},toggle:function(){this.created&&this.ft.columns.hasHidden&&(this.expanded?this.collapse():this.expand())},_onToggle:function(t){var i=t.data.self;n(t.target).is(i.ft.rows.toggleSelector)&&i.toggle()}})}(jQuery,FooTable),function(n,t){t.instances=[];t.Table=t.Class.extend({construct:function(i,r,u){this._resizeTimeout=null;this.id=t.instances.push(this);this.initialized=!1;this.$el=(t.is.jq(i)?i:n(i)).first();this.o=n.extend(!0,{},t.defaults,r);this.classes=[];this.components={internal:t.components.internal.load(this),core:t.components.core.load(this),custom:t.components.load(this)};this.breakpoints=this.use(FooTable.Breakpoints);this.columns=this.use(FooTable.Columns);this.rows=this.use(FooTable.Rows);this._construct(u)},_construct:function(n){var i=this;this._preinit().then(function(){return i._init()}).always(function(r){if(t.is.error(r))console.error("FooTable: unhandled error thrown during initialization.",r);else return i.raise("ready.ft.table").then(function(){t.is.fn(n)&&n.call(i,i)})})},_preinit:function(){var i=this;return this.raise("preinit.ft.table").then(function(){var f=i.$el.attr("class").match(/\S+/g),u=i.$el.data()||{},r,o,e;for(i.o.ajax=t.checkFnValue(i,u.ajax,i.o.ajax),i.o.stopPropagation=t.is.boolean(u.stopPropagation)?u.stopPropagation:i.o.stopPropagation,r=0,o=f.length;r",{"class":"footable-loader"}).append(n("",{"class":"fooicon fooicon-loader"})),i.$el.hide().after(e),i.execute(!1,!1,"preinit",u).always(function(){i.$el.show();e.remove()})})},_init:function(){var i=this;return i.raise("init.ft.table").then(function(){var r=i.$el.children("thead"),f=i.$el.children("tbody"),u=i.$el.children("tfoot");if(i.$el.addClass("footable footable-"+i.id),t.is.hash(i.o.on))i.$el.on(i.o.on);return u.length==0&&i.$el.append(u=n("")),f.length==0&&i.$el.append(""),r.length==0&&i.$el.prepend(r=n("")),i.execute(!1,!0,"init").then(function(){return i.$el.data("__FooTable__",i),u.children("tr").length==0&&u.remove(),r.children("tr").length==0&&r.remove(),i.raise("postinit.ft.table").then(function(){return i.draw()}).always(function(){n(window).off("resize.ft"+i.id,i._onWindowResize).on("resize.ft"+i.id,{self:i},i._onWindowResize);i.initialized=!0})})})},destroy:function(){var n=this;return n.raise("destroy.ft.table").then(function(){return n.execute(!0,!0,"destroy").then(function(){n.$el.removeData("__FooTable__").removeClass("footable-"+n.id);t.is.hash(n.o.on)&&n.$el.off(n.o.on);n.initialized=!1})}).fail(function(n){t.is.error(n)&&console.error("FooTable: unhandled error thrown while destroying the plugin.",n)})},raise:function(i,r){var u=this,f=t.__debug__&&(t.is.emptyArray(t.__debug_options__.events)||t.arr.any(t.__debug_options__.events,function(n){return t.str.contains(i,n)}));return r=r||[],r.unshift(this),n.Deferred(function(t){var e=n.Event(i);if(u.o.stopPropagation==!0)u.$el.one(i,function(n){n.stopPropagation()});f&&console.log("FooTable:"+i+": ",r);u.$el.trigger(e,r);e.isDefaultPrevented()?(f&&console.log('FooTable: default prevented for the "'+i+'" event.'),t.reject(e)):t.resolve(e)})},use:function(n){for(var i=this.components.internal.concat(this.components.core,this.components.custom),t=0,r=i.length;t3&&(t[0]=t[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,this.thousandSeparator)),t.join(this.decimalSeparator)}});t.columns.register("number",t.NumberColumn)}(jQuery,FooTable),function(n,t){t.Component=t.Class.extend({construct:function(n,i){if(!(n instanceof t.Table))throw new TypeError("The instance parameter must be an instance of FooTable.Table.");this.ft=n;this.enabled=t.is.boolean(i)?i:!1},preinit:null,init:null,destroy:null,predraw:null,draw:null,postdraw:null});t.components=new t.ClassFactory;t.components.core=new t.ClassFactory;t.components.internal=new t.ClassFactory}(jQuery,FooTable),function(n,t){t.Breakpoint=t.Class.extend({construct:function(n,t){this.name=n;this.width=t}})}(jQuery,FooTable),function(n,t){t.Breakpoints=t.Component.extend({construct:function(n){this._super(n,!0);this.o=n.o;this.current=null;this.array=[];this.cascade=this.o.cascade;this.useParentWidth=this.o.useParentWidth;this.hidden=null;this._classNames="";this.getWidth=t.checkFnValue(this,this.o.getWidth,this.getWidth)},preinit:function(n){var i=this;return this.ft.raise("preinit.ft.breakpoints",[n]).then(function(){i.cascade=t.is.boolean(n.cascade)?n.cascade:i.cascade;i.o.breakpoints=t.is.hash(n.breakpoints)?n.breakpoints:i.o.breakpoints;i.getWidth=t.checkFnValue(i,n.getWidth,i.getWidth);i.o.breakpoints==null&&(i.o.breakpoints={xs:480,sm:768,md:992,lg:1200});for(var r in i.o.breakpoints)i.o.breakpoints.hasOwnProperty(r)&&(i.array.push(new t.Breakpoint(r,i.o.breakpoints[r])),i._classNames+="breakpoint-"+r+" ");i.array.sort(function(n,t){return t.width-n.width})})},init:function(){var n=this;return this.ft.raise("init.ft.breakpoints").then(function(){n.current=n.get()})},draw:function(){this.ft.$el.removeClass(this._classNames).addClass("breakpoint-"+this.current.name)},calculate:function(){for(var r=this,n=null,f=[],i,e=null,o=r.getWidth(),u=0,s=r.array.length;u=i.width&&(e instanceof t.Breakpoint?o=0&&nu&&(u=n.index)}),u++,f=0;f tr:last:has([data-breakpoints])"));u.length==0&&(u=i.ft.$el.find("tbody > tr:first:has([data-breakpoints])"));u.length>0&&(s=u.parent().is("tbody")&&u.children().length==u.children("td").length,s||(i.$header=u.addClass("footable-header")),u.children("td,th").each(function(t,i){c=n(i);e=c.data();e.index=t;e.$el=c;e.virtual=s;o.push(e)}),s&&(i.showHeader=!1));t.is.array(i.o.columns)?(t.arr.each(i.o.columns,function(n,t){n.index=t;f.push(n)}),i.parseFinalize(r,h(f,o))):t.is.promise(i.o.columns)?i.o.columns.then(function(n){t.arr.each(n,function(n,t){n.index=t;f.push(n)});i.parseFinalize(r,h(f,o))},function(n){r.reject(Error("Columns ajax request error: "+n.status+" ("+n.statusText+")"))}):i.parseFinalize(r,h(f,o))})},parseFinalize:function(n,i){var u=this,r=[],f;t.arr.each(i,function(n){(f=t.columns.contains(n.type)?t.columns.make(n.type,u.ft,n):new t.Column(u.ft,n))&&r.push(f)});t.is.emptyArray(r)?n.reject(Error("No columns supplied.")):(r.sort(function(n,t){return n.index-t.index}),n.resolve(r))},preinit:function(n){var i=this;return i.ft.raise("preinit.ft.columns",[n]).then(function(){return i.parse(n).then(function(r){i.array=r;i.showHeader=t.is.boolean(n.showHeader)?n.showHeader:i.showHeader})})},init:function(){var n=this;return this.ft.raise("init.ft.columns",[n.array]).then(function(){n.$create()})},predraw:function(){var n=this,i=!0;n.visibleColspan=0;n.firstVisibleIndex=0;n.lastVisibleIndex=0;n.hasHidden=!1;t.arr.each(n.array,function(t){t.hidden=!n.ft.breakpoints.visible(t.breakpoints);!t.hidden&&t.visible&&(i&&(n.firstVisibleIndex=t.index,i=!1),n.lastVisibleIndex=t.index,n.visibleColspan++);t.hidden&&(n.hasHidden=!0)})},draw:function(){t.arr.each(this.array,function(n){n.$el.css("display",n.hidden||!n.visible?"none":"table-cell")});!this.showHeader&&t.is.jq(this.$header.parent())&&this.$header.detach()},$create:function(){var i=this;i.$header=t.is.jq(i.$header)?i.$header:n("",{"class":"footable-header"});i.$header.children("th,td").detach();t.arr.each(i.array,function(n){i.$header.append(n.$el)});i.showHeader&&!t.is.jq(i.$header.parent())&&i.ft.$el.children("thead").append(i.$header)},get:function(n){return n instanceof t.Column?n:t.is.string(n)?t.arr.first(this.array,function(t){return t.name==n}):t.is.number(n)?t.arr.first(this.array,function(t){return t.index==n}):t.is.fn(n)?t.arr.get(this.array,n):null},ensure:function(n){var r=this,i=[];return t.is.array(n)?(t.arr.each(n,function(n){i.push(r.get(n))}),i):i}});t.components.internal.register("columns",t.Columns,5)}(jQuery,FooTable),function(n){n.Defaults.prototype.columns=[];n.Defaults.prototype.showHeader=!0}(FooTable),function(n,t){t.Rows=t.Component.extend({construct:function(n){this._super(n,!0);this.o=n.o;this.array=[];this.all=[];this.showToggle=n.o.showToggle;this.toggleSelector=n.o.toggleSelector;this.toggleColumn=n.o.toggleColumn;this.emptyString=n.o.empty;this.expandFirst=n.o.expandFirst;this.$empty=null},parse:function(){var i=this;return n.Deferred(function(n){var r=i.ft.$el.children("tbody").children("tr");t.is.jq(r)?(i.parseFinalize(n,r),r.detach()):t.is.array(i.o.rows)&&i.o.rows.length>0?i.parseFinalize(n,i.o.rows):t.is.promise(i.o.rows)?i.o.rows.then(function(t){i.parseFinalize(n,t)},function(t){n.reject(Error("Rows ajax request error: "+t.status+" ("+t.statusText+")"))}):i.parseFinalize(n,[])})},parseFinalize:function(i,r){var u=this,f=n.map(r,function(n){return new t.Row(u.ft,u.ft.columns.array,n)});i.resolve(f)},preinit:function(n){var i=this;return i.ft.raise("preinit.ft.rows",[n]).then(function(){return i.parse().then(function(r){i.all=r;i.array=i.all.slice(0);i.showToggle=t.is.boolean(n.showToggle)?n.showToggle:i.showToggle;i.toggleSelector=t.is.string(n.toggleSelector)?n.toggleSelector:i.toggleSelector;i.toggleColumn=t.is.string(n.toggleColumn)?n.toggleColumn:i.toggleColumn;i.toggleColumn!="first"&&i.toggleColumn!="last"&&(i.toggleColumn="first");i.emptyString=t.is.string(n.empty)?n.empty:i.emptyString;i.expandFirst=t.is.boolean(n.expandFirst)?n.expandFirst:i.expandFirst})})},init:function(){var n=this;return n.ft.raise("init.ft.rows",[n.all]).then(function(){n.$create()})},predraw:function(){t.arr.each(this.array,function(n){n.predraw()});this.array=this.all.slice(0)},$create:function(){this.$empty=n("",{"class":"footable-empty"}).append(n("",{"class":"footable-filtering"}).prependTo(i.ft.$el.children("thead")),i.$cell=n(""),this.ft.$el.append(t));this.$row.appendTo(t);this.detached=!1}this.$cell.attr("colspan",this.ft.columns.visibleColspan);this._createLinks();this._setVisible(this.current,this.current>this._previous);this._setNavigation(!0)}},$create:function(){var i="footable-paging-center",t;switch(this.position){case"left":i="footable-paging-left";break;case"right":i="footable-paging-right"}this.ft.$el.addClass("footable-paging").addClass(i);this.$cell=n(""),this.ft.$el.append(t));this.$row=n("",{"class":"footable-paging"}).append(this.$cell).appendTo(t);this.$pagination=n(""),t.ft.$el.append(i));t.$row=n("",{"class":"footable-editing"}).append(t.$cell).appendTo(i)},$buttonShow:function(){return'
").text(this.emptyString))},draw:function(){var n=this,i=n.ft.$el.children("tbody"),r=!0;n.array.length>0?(n.$empty.detach(),t.arr.each(n.array,function(t){n.expandFirst&&r&&(t.expanded=!0,r=!1);t.draw(i)})):(n.$empty.children("td").attr("colspan",n.ft.columns.visibleColspan),i.append(n.$empty))}});t.components.internal.register("rows",t.Rows,0)}(jQuery,FooTable),function(n){n.Defaults.prototype.rows=[];n.Defaults.prototype.empty="No results";n.Defaults.prototype.showToggle=!0;n.Defaults.prototype.toggleSelector="tr,td,.footable-toggle";n.Defaults.prototype.toggleColumn="first";n.Defaults.prototype.expandFirst=!1}(FooTable),function(n){n.Filter=n.Class.extend({construct:function(t,i,r,u,f){this.name=t;this.space=n.is.string(u)&&(u=="OR"||u=="AND")?u:"AND";this.connectors=n.is.boolean(f)?f:!0;this.query=new n.Query(i,this.space,this.connectors);this.columns=r},match:function(t){return n.is.string(t)?(n.is.string(this.query)&&(this.query=new n.Query(this.query,this.space,this.connectors)),this.query instanceof n.Query?this.query.match(t):!1):!1},matchRow:function(t){var i=this,r=n.arr.map(t.cells,function(t){return n.arr.contains(i.columns,t.column)?t.filterValue:null}).join(" ");return i.match(r)}})}(FooTable),function(n,t){t.Filtering=t.Component.extend({construct:function(n){this._super(n,n.o.filtering.enabled);this.filters=n.o.filtering.filters;this.delay=n.o.filtering.delay;this.min=n.o.filtering.min;this.space=n.o.filtering.space;this.connectors=n.o.filtering.connectors;this.placeholder=n.o.filtering.placeholder;this.position=n.o.filtering.position;this.$row=null;this.$cell=null;this.$dropdown=null;this.$input=null;this.$button=null;this._filterTimeout=null},preinit:function(n){var i=this;this.ft.raise("preinit.ft.filtering").then(function(){(i.ft.$el.hasClass("footable-filtering")&&(i.enabled=!0),i.enabled=t.is.boolean(n.filtering)?n.filtering:i.enabled,i.enabled)&&(i.space=t.is.string(n.filterSpace)?n.filterSpace:i.space,i.min=t.is.number(n.filterMin)?n.filterMin:i.min,i.connectors=t.is.boolean(n.filterConnectors)?n.filterConnectors:i.connectors,i.delay=t.is.number(n.filterDelay)?n.filterDelay:i.delay,i.placeholder=t.is.string(n.filterPlaceholder)?n.filterPlaceholder:i.placeholder,i.filters=t.is.array(n.filterFilters)?i.ensure(n.filterFilters):i.ensure(i.filters),i.ft.$el.hasClass("footable-filtering-left")&&(i.position="left"),i.ft.$el.hasClass("footable-filtering-center")&&(i.position="center"),i.ft.$el.hasClass("footable-filtering-right")&&(i.position="right"),i.position=t.is.string(n.filterPosition)?n.filterPosition:i.position)},function(){i.enabled=!1})},init:function(){var n=this;this.ft.raise("init.ft.filtering").then(function(){n.$create()},function(){n.enabled=!1})},destroy:function(){var n=this;this.ft.raise("destroy.ft.filtering").then(function(){n.ft.$el.removeClass("footable-filtering").find("thead > tr.footable-filtering").remove()})},$create:function(){var i=this,u=n("
",{"class":"form-group"}).append(n("
").attr("colspan",i.ft.columns.visibleColspan).appendTo(i.$row),i.$form=n("
",{"class":"form-inline"}).append(u).appendTo(i.$cell),i.$input=n("",{type:"text","class":"form-control",placeholder:i.placeholder}),i.$button=n("
").attr("colspan",this.ft.columns.visibleColspan);t=this.ft.$el.children("tfoot");t.length==0&&(t=n("
").attr("colspan",t.ft.columns.visibleColspan).append(t.$buttonShow()).append(t.$buttonAdd()).append(t.$buttonHide());t.alwaysShow&&t.ft.$el.addClass("footable-editing-always-show");i=t.ft.$el.children("tfoot");i.length==0&&(i=n("
").append(u);return t.is.jq(i.$el)&&(this.index===0?r.prependTo(i.$el):r.insertAfter(i.$el.children().eq(this.index-1))),new t.Cell(this.ft,i,this,r||r.html())}});t.columns.register("editing",t.EditingColumn)}(jQuery,FooTable),function(n,t){t.Defaults.prototype.editing={enabled:!1,pageToNew:!0,position:"right",alwaysShow:!1,addRow:function(){},editRow:function(){},deleteRow:function(){},showText:'