/*! * PEP v0.4.3 | https://github.com/jquery/PEP * Copyright jQuery Foundation and other contributors | http://jquery.org/license */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.PointerEventsPolyfill=e()}(this,function(){"use strict";function r(t,e){e=e||Object.create(null);var n=document.createEvent("Event");n.initEvent(t,e.bubbles||!1,e.cancelable||!1);for(var i,r=2;r=i.length){var r=[];k.forEach(function(t,e){if(1!==e&&!this.findTouch(i,e-2)){var n=t.out;r.push(n)}},this),r.forEach(this.cancelOut,this)}},touchstart:function(t){this.vacuumTouches(t),this.setPrimaryTouch(t.changedTouches[0]),this.dedupSynthMouse(t),this.scrolling||(this.clickCount++,this.processTouches(t,this.overDown))},overDown:function(t){k.set(t.pointerId,{target:t.target,out:t,outTarget:t.target}),m.enterOver(t),m.down(t)},touchmove:function(t){this.scrolling||(this.shouldScroll(t)?(this.scrolling=!0,this.touchcancel(t)):(t.preventDefault(),this.processTouches(t,this.moveOverOut)))},moveOverOut:function(t){var e=t,n=k.get(e.pointerId);if(n){var i=n.out,r=n.outTarget;m.move(e),i&&r!==e.target&&(i.relatedTarget=e.target,e.relatedTarget=r,i.target=r,e.target?(m.leaveOut(i),m.enterOver(e)):(e.target=r,e.relatedTarget=null,this.cancelOut(e))),n.out=e,n.outTarget=e.target}},touchend:function(t){this.dedupSynthMouse(t),this.processTouches(t,this.upOut)},upOut:function(t){this.scrolling||(m.up(t),m.leaveOut(t)),this.cleanUpPointer(t)},touchcancel:function(t){this.processTouches(t,this.cancelOut)},cancelOut:function(t){m.cancel(t),m.leaveOut(t),this.cleanUpPointer(t)},cleanUpPointer:function(t){k.delete(t.pointerId),this.removePrimaryPointer(t)},dedupSynthMouse:function(t){var e=_.lastTouches,n=t.changedTouches[0];if(this.isPrimaryTouch(n)){var i={x:n.clientX,y:n.clientY};e.push(i);var r=function(t,e){var n=t.indexOf(e);-1