(function(){if("ontouchstart"in window&&!/chrome/i.test(navigator.userAgent)){var d={},f=function(a,c){return 5<Math.abs(a[0]-c[0])||5<Math.abs(a[1]-c[1])},l=function(a,c){for(var b=a,d=c.toUpperCase();b!==document.body;){if(!b||b.nodeName===d)return b;b=b.parentNode}return null};document.addEventListener("touchstart",function(a){this.startXY=[a.touches[0].clientX,a.touches[0].clientY];this.threshold=!1},!1);document.addEventListener("touchmove",function(a){if(this.threshold)return!1;this.threshold=
f(this.startXY,[a.touches[0].clientX,a.touches[0].clientY])},!1);document.addEventListener("touchend",function(a){if(!this.threshold&&!f(this.startXY,[a.changedTouches[0].clientX,a.changedTouches[0].clientY])){var c=a.changedTouches[0],b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null);b.simulated=!0;a.target.dispatchEvent(b)}},!1);document.addEventListener("click",function(a){var c=Date.now(),b=c-d.time,f=a.clientX,
h=a.clientY,k=[Math.abs(d.x-f),Math.abs(d.y-h)],e=l(a.target,"A")||a.target,g="A"===e.nodeName,g=window.navigator.standalone&&g&&a.target.getAttribute("href");d.time=c;d.x=f;d.y=h;if(!a.simulated&&(500>b||1500>b&&50>k[0]&&50>k[1])||g)if(a.preventDefault(),a.stopPropagation(),!g)return!1;g&&(window.location=e.getAttribute("href"));e&&e.classList&&(e.classList.add("energize-focus"),window.setTimeout(function(){e.classList.remove("energize-focus")},150))},!0)}})();