{"size": 3080, "ext": "js", "max_stars_repo_path": "build/Tab.min.js", "max_stars_repo_name": "fafaz/fafaz-tab", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "build/Tab.min.js", "max_issues_repo_name": "fafaz/fafaz-tab", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "build/Tab.min.js", "max_forks_repo_name": "fafaz/fafaz-tab", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 440.0, "max_line_length": 587, "alphanum_fraction": 0.7204545455}
(function(g,a){"object"===typeof exports&&"object"===typeof module?module.exports=a():"function"===typeof define&&define.amd?define([],a):"object"===typeof exports?exports.Tab=a():(g.fafaz=g.fafaz||{},g.fafaz.Tab=a())})("undefined"!==typeof self?self:this,function(){return function(g){function a(f){if(h[f])return h[f].exports;var c=h[f]={i:f,l:!1,exports:{}};g[f].call(c.exports,c,c.exports,a);c.l=!0;return c.exports}var h={};a.m=g;a.c=h;a.d=function(f,c,k){a.o(f,c)||Object.defineProperty(f,c,{configurable:!1,
enumerable:!0,get:k})};a.n=function(f){var c=f&&f.__esModule?function(){return f["default"]}:function(){return f};a.d(c,"a",c);return c};a.o=function(a,c){return Object.prototype.hasOwnProperty.call(a,c)};a.p="";return a(a.s=0)}([function(g,a,h){Object.defineProperty(a,"__esModule",{value:!0});var f=Object.assign||function(a){for(var d=1;d<arguments.length;d++){var b=arguments[d],e;for(e in b)Object.prototype.hasOwnProperty.call(b,e)&&(a[e]=b[e])}return a},c=function(){function a(a,b){for(var e=0;e<
b.length;e++){var d=b[e];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in d&&(d.writable=!0);Object.defineProperty(a,d.key,d)}}return function(d,b,e){b&&a(d.prototype,b);e&&a(d,e);return d}}();g=function(){function a(){var d=0<arguments.length&&void 0!==arguments[0]?arguments[0]:void 0,b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");this.VERSION="1.0.0";this.state={lastIdx:0};this.handlerList={};
if(!document.getElementById("stylesheet-tab")){var e=document.createElement("style");e.id="stylesheet-tab";e.innerText=".tab-header{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-bottom:2px solid rgba(200,200,200,0.2)}.tab-header__item{line-height:1;padding:0 0 .5rem;margin-right:.5rem;cursor:pointer}.tab-header__activeLine{position:absolute;top:100%;left:0;height:2px;width:auto;background-color:#443f54;}.tab-body__item{display:none}";
document.head.appendChild(e)}this.config=f({},b);this.container=document.querySelector(d);this.container.removeAttribute("hidden");this.init()}c(a,[{key:"init",value:function(){var a=this,b=this.container.querySelectorAll(".tab-header__item"),e=this.container.querySelectorAll(".tab-body__item"),c=document.createElement("div");c.classList.add("tab-header__activeLine");c.style.cssText="width:"+b[0].offsetWidth+"px; left: "+b[0].offsetLeft+"px;";b[0].parentNode.appendChild(c);e[0].style.display="block";
b.forEach(function(d,b){d.addEventListener("click",function(){a.state.lastIdx!==b&&(e[a.state.lastIdx].style.display="",a.state.lastIdx=b,e[b].style.display="block",c.style.cssText="width:"+d.offsetWidth+"px; left: "+d.offsetLeft+"px;",a._trigger("change",{idx:b,container:e[b]}))})})}},{key:"_trigger",value:function(a,b){void 0!==this.handlerList[a]&&this.handlerList[a](b)}},{key:"on",value:function(a,b){this.handlerList[a]=b}}]);return a}();a.default=g}])});
