text: /*!
   * @fileOverview TouchSwipe - jQuery Plugin
   * @version 1.6.18
   *
   * @author Matt Bryson http://www.github.com/mattbryson
   * @see https://github.com/mattbryson/TouchSwipe-Jquery-Plugin
   * @see http://labs.rampinteractive.co.uk/touchSwipe/
   * @see http://plugins.jquery.com/project/touchSwipe
   * @license
   * Copyright (c) 2010-2015 Matt Bryson
   * Dual licensed under the MIT or GPL Version 2 licenses.
   *
   */
  !function(e){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e("undefined"!=typeof module&&module.exports?require("jquery"):jQuery)}(function(e){"use strict";function t(t){return!t||void 0!==t.allowPageScroll||void 0===t.swipe&&void 0===t.swipeStatus||(t.allowPageScroll=d),void 0!==t.click&&void 0===t.tap&&(t.tap=t.click),t||(t={}),t=e.extend({},e.fn.swipe.defaults,t),this.each(function(){var n=e(this),o=n.data(A);o||(o=new i(this,t),n.data(A,o))})}function i(t,i){function n(t){if(!(ct()||e(t.target).closest(i.excludedElements,Vt).length>0)){var n=t.originalEvent?t.originalEvent:t;if(!n.pointerType||"mouse"!=n.pointerType||0!=i.fallbackToMouseEvents){var o,s=n.touches,r=s?s[0]:n;return Xt=x,s?Qt=s.length:i.preventDefaultEvents!==!1&&t.preventDefault(),It=0,Ht=null,Lt=null,Wt=null,Dt=0,qt=0,Nt=0,Ft=1,_t=0,Bt=mt(),at(),ut(0,r),!s||Qt===i.fingers||i.fingers===b||W()?(Ut=kt(),2==Qt&&(ut(1,s[1]),qt=Nt=bt(Yt[0].start,Yt[1].start)),(i.swipeStatus||i.pinchStatus)&&(o=I(n,Xt))):o=!1,o===!1?(Xt=C,I(n,Xt),o):(i.hold&&(ti=setTimeout(e.proxy(function(){Vt.trigger("hold",[n.target]),i.hold&&(o=i.hold.call(Vt,n,n.target))},this),i.longTapThreshold)),dt(!0),null)}}}function j(e){var t=e.originalEvent?e.originalEvent:e;if(Xt!==T&&Xt!==C&&!lt()){var n,o=t.touches,s=o?o[0]:t,r=ht(s);if(Gt=kt(),o&&(Qt=o.length),i.hold&&clearTimeout(ti),Xt=$,2==Qt&&(0==qt?(ut(1,o[1]),qt=Nt=bt(Yt[0].start,Yt[1].start)):(ht(o[1]),Nt=bt(Yt[0].end,Yt[1].end),Wt=xt(Yt[0].end,Yt[1].end)),Ft=wt(qt,Nt),_t=Math.abs(qt-Nt)),Qt===i.fingers||i.fingers===b||!o||W()){if(Ht=Ct(r.start,r.end),Lt=Ct(r.last,r.end),F(e,Lt),It=$t(r.start,r.end),Dt=yt(),ft(Ht,It),n=I(t,Xt),!i.triggerOnTouchEnd||i.triggerOnTouchLeave){var a=!0;if(i.triggerOnTouchLeave){var l=St(this);a=Et(r.end,l)}!i.triggerOnTouchEnd&&a?Xt=R($):i.triggerOnTouchLeave&&!a&&(Xt=R(T)),Xt!=C&&Xt!=T||I(t,Xt)}}else Xt=C,I(t,Xt);n===!1&&(Xt=C,I(t,Xt))}}function O(e){var t=e.originalEvent?e.originalEvent:e,n=t.touches;if(n){if(n.length&&!lt())return rt(t),!0;if(n.length&&lt())return!0}return lt()&&(Qt=Kt),Gt=kt(),Dt=yt(),D()||!L()?(Xt=C,I(t,Xt)):i.triggerOnTouchEnd||i.triggerOnTouchEnd===!1&&Xt===$?(i.preventDefaultEvents!==!1&&e.preventDefault(),Xt=T,I(t,Xt)):!i.triggerOnTouchEnd&&G()?(Xt=T,H(t,Xt,f)):Xt===$&&(Xt=C,I(t,Xt)),dt(!1),null}function z(){Qt=0,Gt=0,Ut=0,qt=0,Nt=0,Ft=1,at(),dt(!1)}function P(e){var t=e.originalEvent?e.originalEvent:e;i.triggerOnTouchLeave&&(Xt=R(T),I(t,Xt))}function M(){Vt.unbind(Ot,n),Vt.unbind(Rt,z),Vt.unbind(zt,j),Vt.unbind(Pt,O),Mt&&Vt.unbind(Mt,P),dt(!1)}function R(e){var t=e,n=N(),o=L(),s=D();return!n||s?t=C:!o||e!=$||i.triggerOnTouchEnd&&!i.triggerOnTouchLeave?!o&&e==T&&i.triggerOnTouchLeave&&(t=C):t=T,t}function I(e,t){var i,n=e.touches;return(Q()||X())&&(i=H(e,t,h)),(B()||W())&&i!==!1&&(i=H(e,t,p)),ot()&&i!==!1?i=H(e,t,g):st()&&i!==!1?i=H(e,t,m):nt()&&i!==!1&&(i=H(e,t,f)),t===C&&z(e),t===T&&(n?n.length||z(e):z(e)),i}function H(t,n,d){var u;if(d==h){if(Vt.trigger("swipeStatus",[n,Ht||null,It||0,Dt||0,Qt,Yt,Lt]),i.swipeStatus&&(u=i.swipeStatus.call(Vt,t,n,Ht||null,It||0,Dt||0,Qt,Yt,Lt),u===!1))return!1;if(n==T&&V()){if(clearTimeout(ei),clearTimeout(ti),Vt.trigger("swipe",[Ht,It,Dt,Qt,Yt,Lt]),i.swipe&&(u=i.swipe.call(Vt,t,Ht,It,Dt,Qt,Yt,Lt),u===!1))return!1;switch(Ht){case o:Vt.trigger("swipeLeft",[Ht,It,Dt,Qt,Yt,Lt]),i.swipeLeft&&(u=i.swipeLeft.call(Vt,t,Ht,It,Dt,Qt,Yt,Lt));break;case s:Vt.trigger("swipeRight",[Ht,It,Dt,Qt,Yt,Lt]),i.swipeRight&&(u=i.swipeRight.call(Vt,t,Ht,It,Dt,Qt,Yt,Lt));break;case r:Vt.trigger("swipeUp",[Ht,It,Dt,Qt,Yt,Lt]),i.swipeUp&&(u=i.swipeUp.call(Vt,t,Ht,It,Dt,Qt,Yt,Lt));break;case a:Vt.trigger("swipeDown",[Ht,It,Dt,Qt,Yt,Lt]),i.swipeDown&&(u=i.swipeDown.call(Vt,t,Ht,It,Dt,Qt,Yt,Lt))}}}if(d==p){if(Vt.trigger("pinchStatus",[n,Wt||null,_t||0,Dt||0,Qt,Ft,Yt]),i.pinchStatus&&(u=i.pinchStatus.call(Vt,t,n,Wt||null,_t||0,Dt||0,Qt,Ft,Yt),u===!1))return!1;if(n==T&&_())switch(Wt){case l:Vt.trigger("pinchIn",[Wt||null,_t||0,Dt||0,Qt,Ft,Yt]),i.pinchIn&&(u=i.pinchIn.call(Vt,t,Wt||null,_t||0,Dt||0,Qt,Ft,Yt));break;case c:Vt.trigger("pinchOut",[Wt||null,_t||0,Dt||0,Qt,Ft,Yt]),i.pinchOut&&(u=i.pinchOut.call(Vt,t,Wt||null,_t||0,Dt||0,Qt,Ft,Yt))}}return d==f?n!==C&&n!==T||(clearTimeout(ei),clearTimeout(ti),Z()&&!et()?(Jt=kt(),ei=setTimeout(e.proxy(function(){Jt=null,Vt.trigger("tap",[t.target]),i.tap&&(u=i.tap.call(Vt,t,t.target))},this),i.doubleTapThreshold)):(Jt=null,Vt.trigger("tap",[t.target]),i.tap&&(u=i.tap.call(Vt,t,t.target)))):d==g?n!==C&&n!==T||(clearTimeout(ei),clearTimeout(ti),Jt=null,Vt.trigger("doubletap",[t.target]),i.doubleTap&&(u=i.doubleTap.call(Vt,t,t.target))):d==m&&(n!==C&&n!==T||(clearTimeout(ei),Jt=null,Vt.trigger("longtap",[t.target]),i.longTap&&(u=i.longTap.call(Vt,t,t.target)))),u}function L(){var e=!0;return null!==i.threshold&&(e=It>=i.threshold),e}function D(){var e=!1;return null!==i.cancelThreshold&&null!==Ht&&(e=gt(Ht)-It>=i.cancelThreshold),e}function q(){return null!==i.pinchThreshold?_t>=i.pinchThreshold:!0}function N(){var e;return e=i.maxTimeThreshold?!(Dt>=i.maxTimeThreshold):!0}function F(e,t){if(i.preventDefaultEvents!==!1)if(i.allowPageScroll===d)e.preventDefault();else{var n=i.allowPageScroll===u;switch(t){case o:(i.swipeLeft&&n||!n&&i.allowPageScroll!=v)&&e.preventDefault();break;case s:(i.swipeRight&&n||!n&&i.allowPageScroll!=v)&&e.preventDefault();break;case r:(i.swipeUp&&n||!n&&i.allowPageScroll!=y)&&e.preventDefault();break;case a:(i.swipeDown&&n||!n&&i.allowPageScroll!=y)&&e.preventDefault();break;case d:}}}function _(){var e=Y(),t=U(),i=q();return e&&t&&i}function W(){return!!(i.pinchStatus||i.pinchIn||i.pinchOut)}function B(){return!(!_()||!W())}function V(){var e=N(),t=L(),i=Y(),n=U(),o=D(),s=!o&&n&&i&&t&&e;return s}function X(){return!!(i.swipe||i.swipeStatus||i.swipeLeft||i.swipeRight||i.swipeUp||i.swipeDown)}function Q(){return!(!V()||!X())}function Y(){return Qt===i.fingers||i.fingers===b||!k}function U(){return 0!==Yt[0].end.x}function G(){return!!i.tap}function Z(){return!!i.doubleTap}function K(){return!!i.longTap}function J(){if(null==Jt)return!1;var e=kt();return Z()&&e-Jt<=i.doubleTapThreshold}function et(){return J()}function tt(){return(1===Qt||!k)&&(isNaN(It)||It<i.threshold)}function it(){return Dt>i.longTapThreshold&&w>It}function nt(){return!(!tt()||!G())}function ot(){return!(!J()||!Z())}function st(){return!(!it()||!K())}function rt(e){Zt=kt(),Kt=e.touches.length+1}function at(){Zt=0,Kt=0}function lt(){var e=!1;if(Zt){var t=kt()-Zt;t<=i.fingerReleaseThreshold&&(e=!0)}return e}function ct(){return!(Vt.data(A+"_intouch")!==!0)}function dt(e){Vt&&(e===!0?(Vt.bind(zt,j),Vt.bind(Pt,O),Mt&&Vt.bind(Mt,P)):(Vt.unbind(zt,j,!1),Vt.unbind(Pt,O,!1),Mt&&Vt.unbind(Mt,P,!1)),Vt.data(A+"_intouch",e===!0))}function ut(e,t){var i={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return i.start.x=i.last.x=i.end.x=t.pageX||t.clientX,i.start.y=i.last.y=i.end.y=t.pageY||t.clientY,Yt[e]=i,i}function ht(e){var t=void 0!==e.identifier?e.identifier:0,i=pt(t);return null===i&&(i=ut(t,e)),i.last.x=i.end.x,i.last.y=i.end.y,i.end.x=e.pageX||e.clientX,i.end.y=e.pageY||e.clientY,i}function pt(e){return Yt[e]||null}function ft(e,t){e!=d&&(t=Math.max(t,gt(e)),Bt[e].distance=t)}function gt(e){return Bt[e]?Bt[e].distance:void 0}function mt(){var e={};return e[o]=vt(o),e[s]=vt(s),e[r]=vt(r),e[a]=vt(a),e}function vt(e){return{direction:e,distance:0}}function yt(){return Gt-Ut}function bt(e,t){var i=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);return Math.round(Math.sqrt(i*i+n*n))}function wt(e,t){var i=t/e*1;return i.toFixed(2)}function xt(){return 1>Ft?c:l}function $t(e,t){return Math.round(Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)))}function Tt(e,t){var i=e.x-t.x,n=t.y-e.y,o=Math.atan2(n,i),s=Math.round(180*o/Math.PI);return 0>s&&(s=360-Math.abs(s)),s}function Ct(e,t){if(At(e,t))return d;var i=Tt(e,t);return 45>=i&&i>=0?o:360>=i&&i>=315?o:i>=135&&225>=i?s:i>45&&135>i?a:r}function kt(){var e=new Date;return e.getTime()}function St(t){t=e(t);var i=t.offset(),n={left:i.left,right:i.left+t.outerWidth(),top:i.top,bottom:i.top+t.outerHeight()};return n}function Et(e,t){return e.x>t.left&&e.x<t.right&&e.y>t.top&&e.y<t.bottom}function At(e,t){return e.x==t.x&&e.y==t.y}var i=e.extend({},i),jt=k||E||!i.fallbackToMouseEvents,Ot=jt?E?S?"MSPointerDown":"pointerdown":"touchstart":"mousedown",zt=jt?E?S?"MSPointerMove":"pointermove":"touchmove":"mousemove",Pt=jt?E?S?"MSPointerUp":"pointerup":"touchend":"mouseup",Mt=jt?E?"mouseleave":null:"mouseleave",Rt=E?S?"MSPointerCancel":"pointercancel":"touchcancel",It=0,Ht=null,Lt=null,Dt=0,qt=0,Nt=0,Ft=1,_t=0,Wt=0,Bt=null,Vt=e(t),Xt="start",Qt=0,Yt={},Ut=0,Gt=0,Zt=0,Kt=0,Jt=0,ei=null,ti=null;try{Vt.bind(Ot,n),Vt.bind(Rt,z)}catch(ii){e.error("events not supported "+Ot+","+Rt+" on jQuery.swipe")}this.enable=function(){return this.disable(),Vt.bind(Ot,n),Vt.bind(Rt,z),Vt},this.disable=function(){return M(),Vt},this.destroy=function(){M(),Vt.data(A,null),Vt=null},this.option=function(t,n){if("object"==typeof t)i=e.extend(i,t);else if(void 0!==i[t]){if(void 0===n)return i[t];i[t]=n}else{if(!t)return i;e.error("Option "+t+" does not exist on jQuery.swipe.options")}return null}}var n="1.6.18",o="left",s="right",r="up",a="down",l="in",c="out",d="none",u="auto",h="swipe",p="pinch",f="tap",g="doubletap",m="longtap",v="horizontal",y="vertical",b="all",w=10,x="start",$="move",T="end",C="cancel",k="ontouchstart"in window,S=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled&&!k,E=(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&!k,A="TouchSwipe",j={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:".noSwipe",preventDefaultEvents:!0};e.fn.swipe=function(i){var n=e(this),o=n.data(A);if(o&&"string"==typeof i){if(o[i])return o[i].apply(o,Array.prototype.slice.call(arguments,1));e.error("Method "+i+" does not exist on jQuery.swipe")}else if(o&&"object"==typeof i)o.option.apply(o,arguments);else if(!(o||"object"!=typeof i&&i))return t.apply(this,arguments);return n},e.fn.swipe.version=n,e.fn.swipe.defaults=j,e.fn.swipe.phases={PHASE_START:x,PHASE_MOVE:$,PHASE_END:T,PHASE_CANCEL:C},e.fn.swipe.directions={LEFT:o,RIGHT:s,UP:r,DOWN:a,IN:l,OUT:c},e.fn.swipe.pageScroll={NONE:d,HORIZONTAL:v,VERTICAL:y,AUTO:u},e.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:b}});