text: /*! ngTable v0.2.2 by Vitalii Savchuk(esvit666@gmail.com) - https://github.com/esvit/ng-table - New BSD License */
  !function(a,b){return"function"==typeof define&&define.amd?(define("ngTable",["jquery","angular"],function(a,c){return b(c)}),void 0):b(a)}(angular||null,function(a){"use strict";a.module("ngTable",[]).directive("ngTable",["$compile","$q","$parse","$http","ngTableParams",function(b,c,d,e,f){return{restrict:"A",priority:1001,scope:!0,controller:["$scope","$timeout",function(b){var c;return b.params=b.params||{page:1,count:10},b.$watch("params.filter",function(a){return b.params.$liveFiltering?(c({filter:a}),b.goToPage(1)):void 0},!0),b.$watch("params.sorting",function(a){return c({sorting:a})},!0),c=function(c){return c=a.extend(b.params,c),b.paramsModel&&b.paramsModel.assign(b.$parent,new f(c)),b.params=a.copy(c)},b.goToPage=function(a){return a>0&&b.params.page!==a&&b.params.count*(a-1)<=b.params.total?c({page:a}):void 0},b.changeCount=function(a){return c({page:1,count:a})},b.doFilter=function(){return c({page:1})},b.sortBy=function(a){var d,e;if(a.sortable)return d=b.params.sorting&&b.params.sorting[a.sortable]&&"desc"===b.params.sorting[a.sortable],e={},e[a.sortable]=d?"asc":"desc",c({sorting:e})}}],compile:function(c){var e,f;return f=0,e=[],a.forEach(c.find("tr").eq(0).find("td"),function(b){var c,g,h,i,j;return c=a.element(b),c.attr("ignore-cell")&&"true"===c.attr("ignore-cell")?void 0:(j=function(a){return d(c.attr("x-data-title")||c.attr("data-title")||c.attr("title"))(a,{$columns:e})||" "},c.attr("data-title-text",j()),i=function(a){return d(c.attr("x-data-header")||c.attr("data-header")||c.attr("header"))(a,{$columns:e})||!1},g=c.attr("filter")?d(c.attr("filter"))():!1,h=!1,g&&g.templateURL&&(h=g.templateURL,delete g.templateURL),e.push({id:f++,title:j,sortable:c.attr("sortable")?c.attr("sortable"):!1,filter:g,filterTemplateURL:h,headerTemplateURL:i,filterData:c.attr("filter-data")?c.attr("filter-data"):null,show:c.attr("ng-show")?function(a){return d(c.attr("ng-show"))(a)}:function(){return!0}}))}),function(c,g,h){var i,j,k,l;return c.columns=e,i=function(a,b,c){var d,e,g,h,i,j;if(d=11,j=[],i=Math.ceil(b/c),i>1){for(j.push({type:"prev",number:Math.max(1,a-1),active:a>1}),j.push({type:"first",number:1,active:a>1}),g=Math.round((d-5)/2),h=Math.max(2,a-g),e=Math.min(i-1,a+2*g-(a-h)),h=Math.max(2,h-(2*g-(e-h))),f=h;e>=f;)f===h&&2!==f||f===e&&f!==i-1?j.push({type:"more"}):j.push({type:"page",number:f,active:a!==f}),f++;j.push({type:"last",number:i,active:a!==i}),j.push({type:"next",number:Math.min(i,a+1),active:i>a})}return j},c.$parent.$watch(h.ngTable,function(b){return a.isUndefined(b)?void 0:(c.paramsModel=d(h.ngTable),c.pages=i(b.page,b.total,b.count),c.params=a.copy(b))},!0),c.parse=function(a){return a(c)},h.showFilter&&c.$parent.$watch(h.showFilter,function(a){return c.show_filter=a}),a.forEach(e,function(b){var e;if(b.filterData){if(e=d(b.filterData)(c,{$column:b}),!a.isObject(e)||!a.isObject(e.promise))throw new Error("Function "+b.filterData+" must be instance of $q.defer()");return delete b.filterData,e.promise.then(function(c){return a.isArray(c)||(c=[]),c.unshift({title:"-",id:""}),b.data=c})}}),g.hasClass("ng-table")?void 0:(c.templates={header:h.templateHeader?h.templateHeader:"ng-table/header.html",pagination:h.templatePagination?h.templatePagination:"ng-table/pager.html"},j=b('<thead ng-include="templates.header"></thead>')(c),k=b('<div ng-include="templates.pagination"></div>')(c),g.find("thead").remove(),l=g.find("tbody"),l[0]?a.element(l[0]).before(j):g.prepend(j),g.addClass("ng-table"),g.after(k))}}}}]);var b={}.hasOwnProperty,c=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};return a.module("ngTable").factory("ngTableParams",function(){var d,e;return d=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},e=function(e){var f,g,h,i,j,k,l,m,n,o;f=["total","counts","$liveFiltering"],this.page=1,this.count=1,this.counts=[10,25,50,100],this.filter={},this.sorting={};for(g in e)if(l=e[g],g.indexOf("[")>=0){for(j=g.split(/\[(.*)\]/),h="",o=j.reverse(),m=0,n=o.length;n>m;m++)i=o[m],""!==i&&(k=l,l={},l[h=i]=d(k)?parseFloat(k):k);"sorting"===h&&(this[h]={}),this[h]=a.extend(this[h]||{},l[h])}else this[g]=d(e[g])?parseFloat(e[g]):e[g];return this.orderBy=function(){var a,c,d,e;d=[],e=this.sorting;for(a in e)b.call(e,a)&&(c=e[a],d.push(("asc"===c?"+":"-")+a));return d},this.url=function(b){var d,e,h,j;b=b||!1,e=b?[]:{};for(g in this)if(this.hasOwnProperty(g)){if(c.call(f,g)>=0)continue;if(d=this[g],i=encodeURIComponent(g),"object"==typeof d)for(j in d)a.isUndefined(d[j])||""===d[j]||(h=i+"["+encodeURIComponent(j)+"]",b?e.push(h+"="+encodeURIComponent(d[j])):e[h]=encodeURIComponent(d[j]));else a.isFunction(d)||a.isUndefined(d)||""===d||(b?e.push(i+"="+encodeURIComponent(d)):e[i]=encodeURIComponent(d))}return e},this}}),a.module("ngTable").run(["$templateCache",function(a){a.put("ng-table/filters/button.html",'<button ng-click="doFilter()" ng-show="filter==\'button\'" class="btn btn-primary btn-block">Filter</button>'),a.put("ng-table/filters/select.html",'<select ng-options="data.id as data.title for data in column.data" ng-model="params.filter[name]" ng-show="filter==\'select\'" class="filter filter-select"></select>'),a.put("ng-table/filters/text.html",'<input type="text" ng-model="params.filter[name]" ng-show="filter==\'text\'" class="input-filter"/>'),a.put("ng-table/header.html",'<tr><th ng-class="{sortable: column.sortable,\'sort-asc\': params.sorting[column.sortable]==\'asc\', \'sort-desc\': params.sorting[column.sortable]==\'desc\'}" ng-click="sortBy(column)" ng-repeat="column in columns" ng-show="column.show(this)" ng-init="template=column.headerTemplateURL(this)" class="header {{column.class}}"><div ng-if="!template" ng-bind="parse(column.title)"></div><div ng-if="template" ng-include="template"></div></th></tr><tr ng-show="show_filter" class="ng-table-filters"><th ng-repeat="column in columns" ng-show="column.show(this)" data-title-text="{{column.title}}" class="filter"><form ng-submit="doFilter()"><input type="submit" tabindex="-1" style="position: absolute; left: -9999px; width: 1px; height: 1px;"/><div ng-repeat="(name, filter) in column.filter"><div ng-if="column.filterTemplateURL"><div ng-include="column.filterTemplateURL"></div></div><div ng-if="!column.filterTemplateURL"><div ng-include="\'ng-table/filters/\' + filter + \'.html\'"></div></div></div></form></th></tr>'),a.put("ng-table/pager.html",'<div class="pagination ng-cloak"><ul class="pagination"><li ng-class="{\'disabled\': !page.active}" ng-repeat="page in pages" ng-switch="page.type"><a ng-switch-when="prev" ng-click="goToPage(page.number)" href="">«</a><a ng-switch-when="first" ng-click="goToPage(page.number)" href="">{{page.number}}</a><a ng-switch-when="page" ng-click="goToPage(page.number)" href="">{{page.number}}</a><a ng-switch-when="more" ng-click="goToPage(page.number)" href="">…</a><a ng-switch-when="last" ng-click="goToPage(page.number)" href="">{{page.number}}</a><a ng-switch-when="next" ng-click="goToPage(page.number)" href="">»</a></li></ul><div ng-show="params.counts.length" class="btn-group pull-right"><button ng-repeat="count in params.counts" type="button" ng-class="{\'active\':params.count==count}" ng-click="changeCount(count)" class="btn btn-mini">{{count}}</button></div></div>')}]),a.module("ngTable")});
  //# sourceMappingURL=ng-table.map