<commit_before>(function() {
	'use strict';

	var T = window.Touche,
		abs = Math.abs;

	/**
	 * Bind a swipe gesture. Supports a radius threshold that is used to measure when the gesture starts.
	 * Triggers `start`, `update` and `end` events.
	 * @name T.gestures.swipe
	 * @function
	 * @param {DOMElement} elem The element to bind the gesture to
	 * @param {Object} gesture Data to set up the gesture
	 */
	T.swipe = function(elem, gesture) {
		gesture = T.utils.extend({
			options: {
				radiusThreshold: 12,
				preventDefault: true
			},
			start: function() {},
			update: function() {},
			end: function() {},
			cancel: function() {}
		}, gesture);

		var inst = T.cache.get(elem),
			radiusThreshold = gesture.options.radiusThreshold,
			preventDefault = gesture.options.preventDefault;

		gesture.options.touches = 1;

		inst.context.addGesture(T.gesture(elem, 'swipe', {
			options: gesture.options,
			getSwipe: function(point) {
				this.swipe.currentPoint = point;
				this.swipe.currentTime = +new Date();
				this.swipe.deltaX = this.swipe.currentPoint.x - this.swipe.startPoint.x;
				this.swipe.deltaY = this.swipe.currentPoint.y - this.swipe.startPoint.y;
				this.swipe.velocity = T.utils.getVelocity(this.swipe.startPoint, this.swipe.currentPoint, this.swipe.startTime, this.swipe.currentTime);
				this.swipe.angle = T.utils.getAngle(this.swipe.startPoint, this.swipe.currentPoint);
				this.swipe.direction = T.utils.getDirection(this.swipe.angle);
				this.swipe.elementDistance = this.swipe.direction === 'left' || this.swipe.direction === 'right' ? this.rect.width : this.rect.height;
				this.swipe.distance = this.swipe.direction === 'left' || this.swipe.direction === 'right' ? abs(this.swipe.deltaX) : abs(this.swipe.deltaY);
				this.swipe.percentage = this.swipe.distance / this.swipe.elementDistance * 100;
				return this.swipe;
			},
			start: function(event, data) {
				this.swipe = {};
				this.swipestartFired = false;

				this.countTouches = 0;
				if(this.hasNotEqualTouches(event)) {
					inst.context.cancelGestures('swipe');
					return;
				}

				this.swipe.startPoint = data.points[0];
				this.swipe.startTime = +new Date();

				if(preventDefault) {
					event.preventDefault();
				}
			},
			update: function(event, data) {
				if(this.hasNotEqualTouches(event)) {
					inst.context.cancelGestures('swipe');
					return;
				}

				data.swipe = this.getSwipe(data.points[0]);

				if(!this.swipestartFired && this.swipe.startPoint.distanceTo(this.swipe.currentPoint) >= radiusThreshold) {
					inst.context.cancelGestures('tap').cancelGestures('rotate').cancelGestures('pinch');
					this.swipestartFired = true;
					gesture.start.call(this, event, data);
				} else if(this.swipestartFired) {
					gesture.update.call(this, event, data);
				}

				this.swipe.startTime = this.swipe.currentTime; //to calculate correct velocity
				if(preventDefault) {
					event.preventDefault();
				}
			},
			end: function(event, data) {
				if(this.swipestartFired) {
					gesture.end.call(this, event, data);
				}

				if(preventDefault) {
					event.preventDefault();
				}
			},
			cancel: function() {
				gesture.cancel.call(gesture);
			}
		}));
		return T;
	};
})();<commit_msg>fixed issue that data.swipe wasn't set<commit_after>(function() {
	'use strict';

	var T = window.Touche,
		abs = Math.abs;

	/**
	 * Bind a swipe gesture. Supports a radius threshold that is used to measure when the gesture starts.
	 * Triggers `start`, `update` and `end` events.
	 * @name T.gestures.swipe
	 * @function
	 * @param {DOMElement} elem The element to bind the gesture to
	 * @param {Object} gesture Data to set up the gesture
	 */
	T.swipe = function(elem, gesture) {
		gesture = T.utils.extend({
			options: {
				radiusThreshold: 12,
				preventDefault: true
			},
			start: function() {},
			update: function() {},
			end: function() {},
			cancel: function() {}
		}, gesture);

		var inst = T.cache.get(elem),
			radiusThreshold = gesture.options.radiusThreshold,
			preventDefault = gesture.options.preventDefault;

		gesture.options.touches = 1;

		inst.context.addGesture(T.gesture(elem, 'swipe', {
			options: gesture.options,
			setSwipe: function(point) {
				this.swipe.currentPoint = point;
				this.swipe.currentTime = +new Date();
				this.swipe.deltaX = this.swipe.currentPoint.x - this.swipe.startPoint.x;
				this.swipe.deltaY = this.swipe.currentPoint.y - this.swipe.startPoint.y;
				this.swipe.velocity = T.utils.getVelocity(this.swipe.startPoint, this.swipe.currentPoint, this.swipe.startTime, this.swipe.currentTime);
				this.swipe.angle = T.utils.getAngle(this.swipe.startPoint, this.swipe.currentPoint);
				this.swipe.direction = T.utils.getDirection(this.swipe.angle);
				this.swipe.elementDistance = this.swipe.direction === 'left' || this.swipe.direction === 'right' ? this.rect.width : this.rect.height;
				this.swipe.distance = this.swipe.direction === 'left' || this.swipe.direction === 'right' ? abs(this.swipe.deltaX) : abs(this.swipe.deltaY);
				this.swipe.percentage = this.swipe.distance / this.swipe.elementDistance * 100;
				return this.swipe;
			},
			start: function(event, data) {
				this.swipe = {};
				this.swipestartFired = false;

				this.countTouches = 0;
				if(this.hasNotEqualTouches(event)) {
					inst.context.cancelGestures('swipe');
					return;
				}

				this.swipe.startPoint = data.points[0];
				this.swipe.startTime = +new Date();

				if(preventDefault) {
					event.preventDefault();
				}
			},
			update: function(event, data) {
				if(this.hasNotEqualTouches(event)) {
					inst.context.cancelGestures('swipe');
					return;
				}

				this.setSwipe(data.points[0]);
				data.swipe = this.swipe;

				if(!this.swipestartFired && this.swipe.startPoint.distanceTo(this.swipe.currentPoint) >= radiusThreshold) {
					inst.context.cancelGestures('tap').cancelGestures('rotate').cancelGestures('pinch');
					this.swipestartFired = true;
					gesture.start.call(this, event, data);
				} else if(this.swipestartFired) {
					gesture.update.call(this, event, data);
				}

				this.swipe.startTime = this.swipe.currentTime; //to calculate correct velocity
				if(preventDefault) {
					event.preventDefault();
				}
			},
			end: function(event, data) {
				if(this.swipestartFired) {
					gesture.end.call(this, event, data);
				}

				if(preventDefault) {
					event.preventDefault();
				}
			},
			cancel: function() {
				gesture.cancel.call(gesture);
			}
		}));
		return T;
	};
})();
{'fraction_non_alphanumeric': 0.14788624135280554, 'fraction_numerical': 0.0027671022290545735, 'mean_word_length': 3.3929777177582716, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '5659743', 'n_tokens_mistral': 2647, 'n_tokens_neox': 2188, 'n_words': 386}