<commit_before>/*!
 * jQuery triangle-menu Plugin v0.1.0
 * Released: 2013-09-08
 * jQuery plugin that creates a dynamic menu with a triangle pointer based on clip-path
 * https://github.com/andrusieczko/triangle-menu
 * 
 * Copyright 2013 <NAME>
 * Released under MIT license
 */
var jQuery=jQuery||require&&require("jquery");(function(a){var b=function(a,b,c){this.$el=b,this.$=a,this._processOptions(c)};if("undefined"!=typeof exports)"undefined"!=typeof module&&module.exports&&(exports=module.exports=b),exports.TriangleMenu=b;else{var c=window||root;c.TriangleMenu=b}b.prototype={$:null,$el:null,triangleMenuSelector:".triangle-menu",menuItemSelector:".menu-item",triangleWidth:25,triangleHeight:20,selectItem:function(a){var b=this._createPolygonPoints(a);this.$el.clipPath(b),this._colorIcons(this._getMenuItem(a)),this.$el.trigger("activate",a)},_getMenuItem:function(a){return this.$el.find(this.menuItemSelector+":nth-child("+a+")")},_createPolygonPoints:function(a){var b=this.$el.width(),c=this.$el.height(),d=this._getMenuItem(a),e=this._getCenterOfMenuItem(d),f=e-this.triangleWidth,g=e+this.triangleWidth;return this._buildPolygonPoints(e,f,g,b,c)},_buildPolygonPoints:function(a,b,c,d,e){var f=[[0,0],[b,0],[a,this.triangleHeight],[c,0],[d,0],[d,e],[0,e]];return f},_getCenterOfMenuItem:function(a){var b=parseInt(a.css("padding-left"),10),c=a.offset().left-this.$el.offset().left+b,d=a.width(),e=c+d/2;return e},_colorIcons:function(a){var b=a.parents(this.triangleMenuSelector);b.find(this.menuItemSelector).removeClass("active"),a.addClass("active")},onHoverAction:function(a){var b=this.$(a.target);b.hasClass(this.menuItemSelector.substr(1))||(b=b.parents(this.menuItemSelector));var c=b.parent().children(this.menuItemSelector).index(b)+1;this.selectItem(c)},_isFunction:function(a){return"function"==typeof a},_processOptions:function(a){if(this.triangleHeight=a&&a.triangleHeight||this.triangleHeight,this.triangleWidth=a&&a.triangleWidth||this.triangleWidth,a&&a.activate){if(!this._isFunction(a.activate))throw new Error("activate argument should be a function");this.$el.on("activate",a.activate.bind(this))}}},a.fn.triangleMenu=function(c){return this.each(function(){var d=a(this),e=new b(a,d,c);d.find(e.menuItemSelector).bind("mouseover",e.onHoverAction.bind(e)),e.selectItem(1)})}}).call(this,jQuery);<commit_msg>new uglified file<commit_after>/*!
 * jQuery triangle-menu Plugin v0.1.1
 * Released: 2013-12-28
 * jQuery plugin that creates a dynamic menu with a triangle pointer based on clip-path
 * https://github.com/andrusieczko/triangle-menu
 * 
 * Copyright 2013 <NAME>
 * Released under MIT license
 */
var jQuery=jQuery||require&&require("jquery");(function(a){var b=function(a,b,c){this.$el=b,this.$=a,this._processOptions(c)};if("undefined"!=typeof exports)"undefined"!=typeof module&&module.exports&&(exports=module.exports=b),exports.TriangleMenu=b;else{var c=window||root;c.TriangleMenu=b}b.prototype={$:null,$el:null,triangleMenuSelector:".triangle-menu",menuItemSelector:".menu-item",triangleWidth:25,triangleHeight:20,selectItem:function(a){var b=this._createPolygonPoints(a);this.$el.clipPath(b),this._colorIcons(this._getMenuItem(a)),this.$el.trigger("activate",a)},_getMenuItem:function(a){return this.$el.find(this.menuItemSelector+":nth-child("+a+")")},_createPolygonPoints:function(a){var b=this.$el.width(),c=this.$el.height(),d=this._getMenuItem(a),e=this._getCenterOfMenuItem(d),f=e-this.triangleWidth,g=e+this.triangleWidth;return this._buildPolygonPoints(e,f,g,b,c)},_buildPolygonPoints:function(a,b,c,d,e){var f=[[0,0],[b,0],[a,this.triangleHeight],[c,0],[d,0],[d,e],[0,e]];return f},_getCenterOfMenuItem:function(a){var b=parseInt(a.css("padding-left"),10),c=a.offset().left-this.$el.offset().left+b,d=a.width(),e=c+d/2;return e},_colorIcons:function(a){var b=a.parents(this.triangleMenuSelector);b.find(this.menuItemSelector).removeClass("active"),a.addClass("active")},onHoverAction:function(a){var b=this.$(a.target);b.hasClass(this.menuItemSelector.substr(1))||(b=b.parents(this.menuItemSelector));var c=b.parent().children(this.menuItemSelector).index(b)+1;this.selectItem(c)},_isFunction:function(a){return"function"==typeof a},_processOptions:function(a){if(this.triangleHeight=a&&a.triangleHeight||this.triangleHeight,this.triangleWidth=a&&a.triangleWidth||this.triangleWidth,a&&a.activate){if(!this._isFunction(a.activate))throw new Error("activate argument should be a function");this.$el.on("activate",a.activate.bind(this))}}},a.fn.triangleMenu=function(c){return this.each(function(){var d=a(this),e=new b(a,d,c);d.find(e.menuItemSelector).bind("mouseover",e.onHoverAction.bind(e)),e.selectItem(1)})}}).call(this,jQuery);
{'fraction_non_alphanumeric': 0.20911413969335604, 'fraction_numerical': 0.013202725724020443, 'mean_word_length': 12.536023054755043, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2069613', 'n_tokens_mistral': 1699, 'n_tokens_neox': 1622, 'n_words': 115}