text: /**
   * angular-tab
   * @version v0.1.5 - 2014-05-05
   * @link https://github.com/ariesjia/angular-tab
   * @author Chenjia <ariesjia00@hotmail.com>
   * @license MIT License, http://www.opensource.org/licenses/MIT
   */
  angular.module("quark.tab",["quark.tab.module"]),angular.module("quark.tab.module",[]).constant("quarkTabConfig",{locationType:["url","path","hash","search"],defaultSearchName:"tab"}).factory("location",["$location","$route","$rootScope",function(a,b,c){return a.skipReload=function(){var d=b.current,e=c.$on("$locationChangeSuccess",function(){b.current=d,e()});return a},a}]).directive("quarkTabSet",function(){return{restrict:"EA",replace:!0,transclude:!0,templateUrl:"src/tab-set.html",controller:["$scope","quarkTabConfig","$timeout","$filter","$attrs","$parse",function(a,b,c,d,e,f){var g=this,h=[],i=function(){var a=(e.tabLocationType||"").split(":"),c=a[0].toLowerCase();return c===b.locationType[3]&&(g.tabSearchName=a.length>1?a[1]:b.defaultSearchName),b.locationType.indexOf(c)>=0?c:"path"},j=function(b){if(e[b]){var c=f(e[b]);return function(b){return c(a,b)}}return null},k=j("tabChange");a.quarkTabSetTemplateUrl="",g.tabSkipReload=f(e.tabSkipReload)(a),g.tabLocationType=i(),g.selectTab=function(a){return a.selected?!0:(angular.forEach(h,function(a){a.selected=!1}),a.selected=!0,k&&k({tab:a}),this.setTabUrl(a.templateUrl),void 0)},g.setTabUrl=function(b){a.quarkTabSetTemplateUrl=b},g.addTab=function(a){h.push(a)},c(function(){var b=d("filter")(h,{selected:!0}),c=f(e.tabInitActive)(a)||0;!b.length&&angular.isNumber(c)&&c<h.length&&h[c].select()})}]}}).directive("quarkTab",["location",function(a){return{restrict:"EA",replace:!0,require:"^quarkTabSet",scope:{templateUrl:"@",tabMatch:"@",tabHref:"@"},transclude:!0,templateUrl:"src/tab.html",link:function(b,c,d,e){var f=e.tabLocationType,g=function(b){return"search"===f?b?a[f](e.tabSearchName,b):a[f]()[e.tabSearchName]:a[f](b)},h=g(),i=b.tabMatch||b.tabHref;e.addTab(b),b.select=function(c){var d=c||b.tabHref;e.selectTab(b),g()!=d&&b.tabHref&&(!c&&e.tabSkipReload&&a.skipReload(),g(d).replace())},i&&new RegExp(i).test(h)&&b.select(h)}}}]);