!function($){"use strict";var e=$.module("ngTouch",[]);function n(n,t){var o=!1,c=!1;this.ngClickOverrideEnabled=function(e){return $.isDefined(e)?(e&&!c&&(c=!0,i.$$moduleName="ngTouch",t.directive("ngClick",i),n.decorator("ngClickDirective",["$delegate",function(e){if(o)e.shift();else for(var n=e.length-1;0<=n;){if("ngTouch"===e[n].$$moduleName){e.splice(n,1);break}n--}return e}])),o=e,this):o},this.$get=function(){return{ngClickOverrideEnabled:function(){return o}}}}e.provider("$touch",n),n.$inject=["$provide","$compileProvider"],e.factory("$swipe",[function(){var o={mouse:{start:"mousedown",move:"mousemove",end:"mouseup"},touch:{start:"touchstart",move:"touchmove",end:"touchend",cancel:"touchcancel"}};function s(e){var n=e.originalEvent||e,e=n.touches&&n.touches.length?n.touches:[n],e=n.changedTouches&&n.changedTouches[0]||e[0];return{x:e.clientX,y:e.clientY}}function l(e,n){var t=[];return $.forEach(e,function(e){e=o[e][n];e&&t.push(e)}),t.join(" ")}return{bind:function(e,t,n){var o,c,i,u,r=!1;e.on(l(n=n||["mouse","touch"],"start"),function(e){i=s(e),r=!0,c=o=0,u=i,t.start&&t.start(i,e)});var a=l(n,"cancel");a&&e.on(a,function(e){r=!1,t.cancel&&t.cancel(e)}),e.on(l(n,"move"),function(e){var n;r&&i&&(n=s(e),o+=Math.abs(n.x-u.x),c+=Math.abs(n.y-u.y),u=n,o<10&&c<10||(o<c?(r=!1,t.cancel&&t.cancel(e)):(e.preventDefault(),t.move&&t.move(n,e))))}),e.on(l(n,"end"),function(e){r&&(r=!1,t.end&&t.end(s(e),e))})}}}]);var i=["$parse","$timeout","$rootElement",function(e,o,d){var v,g,c,i=2500,a=25,n="ng-click-active";function p(e,n,t){for(var o,c,i,u,r=0;r<e.length;r+=2)if(o=e[r],c=e[r+1],i=n,u=t,Math.abs(o-i)<a&&Math.abs(c-u)<a)return e.splice(r,r+2),1}function m(e){var n,t,o;Date.now()-v>i||(n=(o=e.touches&&e.touches.length?e.touches:[e])[0].clientX,t=o[0].clientY,n<1&&t<1||c&&c[0]===n&&c[1]===t||(c=c&&null,"label"===(o=e.target,$.lowercase(o.nodeName||o[0]&&o[0].nodeName))&&(c=[n,t]),p(g,n,t)||(e.stopPropagation(),e.preventDefault(),e.target&&e.target.blur&&e.target.blur())))}function w(e){var e=e.touches&&e.touches.length?e.touches:[e],n=e[0].clientX,t=e[0].clientY;g.push(n,t),o(function(){for(var e=0;e<g.length;e+=2)if(g[e]==n&&g[e+1]==t)return void g.splice(e,e+2)},i,!1)}return function(t,i,u){var r,a,s,l,o=e(u.ngClick),h=!1;function f(){h=!1,i.removeClass(n)}i.on("touchstart",function(e){h=!0,3==(r=e.target||e.srcElement).nodeType&&(r=r.parentNode),i.addClass(n),a=Date.now();e=e.originalEvent||e,e=(e.touches&&e.touches.length?e.touches:[e])[0];s=e.clientX,l=e.clientY}),i.on("touchcancel",function(e){f()}),i.on("touchend",function(e){var n=Date.now()-a,t=e.originalEvent||e,o=(t.changedTouches&&t.changedTouches.length?t.changedTouches:t.touches&&t.touches.length?t.touches:[t])[0],c=o.clientX,t=o.clientY,o=Math.sqrt(Math.pow(c-s,2)+Math.pow(t-l,2));h&&n<750&&o<12&&(c=c,t=t,g||(d[0].addEventListener("click",m,!0),d[0].addEventListener("touchstart",w,!0),g=[]),v=Date.now(),p(g,c,t),r&&r.blur(),$.isDefined(u.disabled)&&!1!==u.disabled||i.triggerHandler("click",[e])),f()}),i.onclick=function(e){},i.on("click",function(e,n){t.$apply(function(){o(t,{$event:n||e})})}),i.on("mousedown",function(e){i.addClass(n)}),i.on("mousemove mouseup",function(e){i.removeClass(n)})}}];function t(s,l,h){e.directive(s,["$parse","$swipe",function(r,a){return function(t,o,e){var c,i,u=r(e[s]);var n=["touch"];$.isDefined(e.ngSwipeDisableMouse)||n.push("mouse"),a.bind(o,{start:function(e,n){c=e,i=!0},cancel:function(e){i=!1},end:function(e,n){!function(e){if(c){var n=Math.abs(e.y-c.y),e=(e.x-c.x)*l;return i&&n<75&&0<e&&30<e&&n/e<.3}}(e)||t.$apply(function(){o.triggerHandler(h),u(t,{$event:n})})}},n)}}])}t("ngSwipeLeft",-1,"swipeleft"),t("ngSwipeRight",1,"swiperight")}((window,window.angular));