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\n * jQuery UI Touch Punch 0.2.2\r\n *\r\n * Copyright 2011, Dave Furfero\r\n * Dual licensed under the MIT or GPL Version 2 licenses.\r\n *\r\n * Depends:\r\n * jquery.ui.widget.js\r\n * jquery.ui.mouse.js\r\n */\r\n(function ($) {\r\n\r\n // Detect touch support\r\n $.support.touch = 'ontouchend' in document;\r\n\r\n // Ignore browsers without touch support\r\n if (!$.support.touch) {\r\n return;\r\n }\r\n\r\n var mouseProto = $.ui.mouse.prototype,\r\n _mouseInit = mouseProto._mouseInit,\r\n touchHandled;\r\n\r\n /**\r\n * Simulate a mouse event based on a corresponding touch event\r\n * @param {Object} event A touch event\r\n * @param {String} simulatedType The corresponding mouse event\r\n */\r\n function simulateMouseEvent (event, simulatedType) {\r\n\r\n // Ignore multi-touch events\r\n if (event.originalEvent.touches.length > 1) {\r\n return;\r\n }\r\n\r\n event.preventDefault();\r\n\r\n var touch = event.originalEvent.changedTouches[0],\r\n simulatedEvent = document.createEvent('MouseEvents');\r\n \r\n // Initialize the simulated mouse event using the touch event's coordinates\r\n simulatedEvent.initMouseEvent(\r\n simulatedType, // type\r\n true, // bubbles \r\n true, // cancelable \r\n window, // view \r\n 1, // detail \r\n touch.screenX, // screenX \r\n touch.screenY, // screenY \r\n touch.clientX, // clientX \r\n touch.clientY, // clientY \r\n false, // ctrlKey \r\n false, // altKey \r\n false, // shiftKey \r\n false, // metaKey \r\n 0, // button \r\n null // relatedTarget \r\n );\r\n\r\n // Dispatch the simulated event to the target element\r\n event.target.dispatchEvent(simulatedEvent);\r\n }\r\n\r\n /**\r\n * Handle the jQuery UI widget's touchstart events\r\n * @param {Object} event The widget element's touchstart event\r\n */\r\n mouseProto._touchStart = function (event) {\r\n\r\n var self = this;\r\n\r\n // Ignore the event if another widget is already being handled\r\n if (touchHandled || !self._mouseCapture(event.originalEvent.changedTouches[0])) {\r\n return;\r\n }\r\n\r\n // Set the flag to prevent other widgets from inheriting the touch event\r\n touchHandled = true;\r\n\r\n // Track movement to determine if interaction was a click\r\n self._touchMoved = false;\r\n\r\n // Simulate the mouseover event\r\n simulateMouseEvent(event, 'mouseover');\r\n\r\n // Simulate the mousemove event\r\n simulateMouseEvent(event, 'mousemove');\r\n\r\n // Simulate the mousedown event\r\n simulateMouseEvent(event, 'mousedown');\r\n };\r\n\r\n /**\r\n * Handle the jQuery UI widget's touchmove events\r\n * @param {Object} event The document's touchmove event\r\n */\r\n mouseProto._touchMove = function (event) {\r\n\r\n // Ignore event if not handled\r\n if (!touchHandled) {\r\n return;\r\n }\r\n\r\n // Interaction was not a click\r\n this._touchMoved = true;\r\n\r\n // Simulate the mousemove event\r\n simulateMouseEvent(event, 'mousemove');\r\n };\r\n\r\n /**\r\n * Handle the jQuery UI widget's touchend events\r\n * @param {Object} event The document's touchend event\r\n */\r\n mouseProto._touchEnd = function (event) {\r\n\r\n // Ignore event if not handled\r\n if (!touchHandled) {\r\n return;\r\n }\r\n\r\n // Simulate the mouseup event\r\n simulateMouseEvent(event, 'mouseup');\r\n\r\n // Simulate the mouseout event\r\n simulateMouseEvent(event, 'mouseout');\r\n\r\n // If the touch interaction did not move, it should trigger a click\r\n if (!this._touchMoved) {\r\n\r\n // Simulate the click event\r\n simulateMouseEvent(event, 'click');\r\n }\r\n\r\n // Unset the flag to allow other widgets to inherit the touch event\r\n touchHandled = false;\r\n };\r\n\r\n /**\r\n * A duck punch of the $.ui.mouse _mouseInit method to support touch events.\r\n * This method extends the widget with bound touch event handlers that\r\n * translate touch events to mouse events and pass them to the widget's\r\n * original mouse event handling methods.\r\n */\r\n mouseProto._mouseInit = function () {\r\n \r\n var self = this;\r\n\r\n // Delegate the touch handlers to the widget's element\r\n self.element\r\n .bind('touchstart', $.proxy(self, '_touchStart'))\r\n .bind('touchmove', $.proxy(self, '_touchMove'))\r\n .bind('touchend', $.proxy(self, '_touchEnd'));\r\n\r\n // Call the original $.ui.mouse init method\r\n _mouseInit.call(self);\r\n };\r\n\r\n})(jQuery);"],"names":["$","support","touch","document","touchHandled","mouseProto","ui","mouse","prototype","_mouseInit","_touchStart","event","this","_mouseCapture","originalEvent","changedTouches","_touchMoved","simulateMouseEvent","_touchMove","_touchEnd","self","element","bind","proxy","call","simulatedType","touches","length","preventDefault","simulatedEvent","createEvent","initMouseEvent","window","screenX","screenY","clientX","clientY","target","dispatchEvent","jQuery"],"version":3,"file":"index.2d2a66bd.js.map"}