   !function(t){var e=Array.prototype.slice;function i(){}function n(t){if(t){var n="undefined"==typeof console?i:function(t){console.error(t)};return t.bridget=function(i,o){!function(e){e.prototype.option||(e.prototype.option=function(e){t.isPlainObject(e)&&(this.options=t.extend(!0,this.options,e))})}(o),function(i,o){t.fn[i]=function(r){if("string"==typeof r){for(var s=e.call(arguments,1),a=0,u=this.length;a<u;a++){var h=this[a],c=t.data(h,i);if(c)if(t.isFunction(c[r])&&"_"!==r.charAt(0)){var p=c[r].apply(c,s);if(void 0!==p)return p}else n("no such method '"+r+"' for "+i+" instance");else n("cannot call methods on "+i+" prior to initialization; attempted to call '"+r+"'")}return this}return this.each(function(){var e=t.data(this,i);e?(e.option(r),e._init()):(e=new o(this,r),t.data(this,i,e))})}}(i,o)},t.bridget}}"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],n):"object"==typeof exports?n(require("jquery")):n(t.jQuery)}(window),function(t){var e=document.documentElement,i=function(){};function n(e){var i=t.event;return i.target=i.target||i.srcElement||e,i}e.addEventListener?i=function(t,e,i){t.addEventListener(e,i,!1)}:e.attachEvent&&(i=function(t,e,i){t[e+i]=i.handleEvent?function(){var e=n(t);i.handleEvent.call(i,e)}:function(){var e=n(t);i.call(t,e)},t.attachEvent("on"+e,t[e+i])});var o=function(){};e.removeEventListener?o=function(t,e,i){t.removeEventListener(e,i,!1)}:e.detachEvent&&(o=function(t,e,i){t.detachEvent("on"+e,t[e+i]);try{delete t[e+i]}catch(n){t[e+i]=void 0}});var r={bind:i,unbind:o};"function"==typeof define&&define.amd?define("eventie/eventie",r):"object"==typeof exports?module.exports=r:t.eventie=r}(window),function(){function t(){}var e=t.prototype,i=this,n=i.EventEmitter;function o(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function r(t){return function(){return this[t].apply(this,arguments)}}e.getListeners=function(t){var e,i,n=this._getEvents();if(t instanceof RegExp)for(i in e={},n)n.hasOwnProperty(i)&&t.test(i)&&(e[i]=n[i]);else e=n[t]||(n[t]=[]);return e},e.flattenListeners=function(t){var e,i=[];for(e=0;e<t.length;e+=1)i.push(t[e].listener);return i},e.getListenersAsObject=function(t){var e,i=this.getListeners(t);return i instanceof Array&&((e={})[t]=i),e||i},e.addListener=function(t,e){var i,n=this.getListenersAsObject(t),r="object"==typeof e;for(i in n)n.hasOwnProperty(i)&&-1===o(n[i],e)&&n[i].push(r?e:{listener:e,once:!1});return this},e.on=r("addListener"),e.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},e.once=r("addOnceListener"),e.defineEvent=function(t){return this.getListeners(t),this},e.defineEvents=function(t){for(var e=0;e<t.length;e+=1)this.defineEvent(t[e]);return this},e.removeListener=function(t,e){var i,n,r=this.getListenersAsObject(t);for(n in r)r.hasOwnProperty(n)&&-1!==(i=o(r[n],e))&&r[n].splice(i,1);return this},e.off=r("removeListener"),e.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},e.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},e.manipulateListeners=function(t,e,i){var n,o,r=t?this.removeListener:this.addListener,s=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(n=i.length;n--;)r.call(this,e,i[n]);else for(n in e)e.hasOwnProperty(n)&&(o=e[n])&&("function"==typeof o?r.call(this,n,o):s.call(this,n,o));return this},e.removeEvent=function(t){var e,i=typeof t,n=this._getEvents();if("string"===i)delete n[t];else if(t instanceof RegExp)for(e in n)n.hasOwnProperty(e)&&t.test(e)&&delete n[e];else delete this._events;return this},e.removeAllListeners=r("removeEvent"),e.emitEvent=function(t,e){var i,n,o,r=this.getListenersAsObject(t);for(o in r)if(r.hasOwnProperty(o))for(n=r[o].length;n--;)!0===(i=r[o][n]).once&&this.removeListener(t,i.listener),i.listener.apply(this,e||[])===this._getOnceReturnValue()&&this.removeListener(t,i.listener);return this},e.trigger=r("emitEvent"),e.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},e.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},e._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},e._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return i.EventEmitter=n,t},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return t}):"object"==typeof module&&module.exports?module.exports=t:i.EventEmitter=t}.call(this),function(t){var e="Webkit Moz ms Ms O".split(" "),i=document.documentElement.style;function n(t){if(t){if("string"==typeof i[t])return t;var n;t=t.charAt(0).toUpperCase()+t.slice(1);for(var o=0,r=e.length;o<r;o++)if(n=e[o]+t,"string"==typeof i[n])return n}}"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return n}):"object"==typeof exports?module.exports=n:t.getStyleProperty=n}(window),function(t,e){function i(t){var e=parseFloat(t);return-1===t.indexOf("%")&&!isNaN(e)&&e}var n="undefined"==typeof console?function(){}:function(t){console.error(t)},o=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];function r(e){var r,s,a,u=!1;function h(e,i){if(t.getComputedStyle||-1===i.indexOf("%"))return i;var n=e.style,o=n.left,r=e.runtimeStyle,s=r&&r.left;return s&&(r.left=e.currentStyle.left),n.left=i,i=n.pixelLeft,n.left=o,s&&(r.left=s),i}return function(c){if(function(){if(!u){u=!0;var o,h=t.getComputedStyle;if(o=h?function(t){return h(t,null)}:function(t){return t.currentStyle},r=function(t){var e=o(t);return e||n("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),e},s=e("boxSizing")){var c=document.createElement("div");c.style.width="200px",c.style.padding="1px 2px 3px 4px",c.style.borderStyle="solid",c.style.borderWidth="1px 2px 3px 4px",c.style[s]="border-box";var p=document.body||document.documentElement;p.appendChild(c);var l=r(c);a=200===i(l.width),p.removeChild(c)}}}(),"string"==typeof c&&(c=document.querySelector(c)),c&&"object"==typeof c&&c.nodeType){var p=r(c);if("none"===p.display)return function(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0,i=o.length;e<i;e++)t[o[e]]=0;return t}();var l={};l.width=c.offsetWidth,l.height=c.offsetHeight;for(var f=l.isBorderBox=!(!s||!p[s]||"border-box"!==p[s]),d=0,m=o.length;d<m;d++){var y=o[d],v=p[y];v=h(c,v);var g=parseFloat(v);l[y]=isNaN(g)?0:g}var T=l.paddingLeft+l.paddingRight,E=l.paddingTop+l.paddingBottom,b=l.marginLeft+l.marginRight,_=l.marginTop+l.marginBottom,z=l.borderLeftWidth+l.borderRightWidth,I=l.borderTopWidth+l.borderBottomWidth,x=f&&a,S=i(p.width);!1!==S&&(l.width=S+(x?0:T+z));var L=i(p.height);return!1!==L&&(l.height=L+(x?0:E+I)),l.innerWidth=l.width-(T+z),l.innerHeight=l.height-(E+I),l.outerWidth=l.width+b,l.outerHeight=l.height+_,l}}}"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],r):"object"==typeof exports?module.exports=r(require("desandro-get-style-property")):t.getSize=r(t.getStyleProperty)}(window),function(t){var e=t.document,i=[];function n(t){"function"==typeof t&&(n.isReady?t():i.push(t))}function o(t){var i="readystatechange"===t.type&&"complete"!==e.readyState;n.isReady||i||r()}function r(){n.isReady=!0;for(var t=0,e=i.length;t<e;t++){(0,i[t])()}}function s(i){return"complete"===e.readyState?r():(i.bind(e,"DOMContentLoaded",o),i.bind(e,"readystatechange",o),i.bind(t,"load",o)),n}n.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],s):"object"==typeof exports?module.exports=s(require("eventie")):t.docReady=s(t.eventie)}(window),function(t){var e,i=function(){if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0,n=e.length;i<n;i++){var o=e[i]+"MatchesSelector";if(t[o])return o}}();function n(t,e){return t[i](e)}function o(t){t.parentNode||document.createDocumentFragment().appendChild(t)}if(i){var r=n(document.createElement("div"),"div");e=r?n:function(t,e){return o(t),n(t,e)}}else e=function(t,e){o(t);for(var i=t.parentNode.querySelectorAll(e),n=0,r=i.length;n<r;n++)if(i[n]===t)return!0;return!1};"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return e}):"object"==typeof exports?module.exports=e:window.matchesSelector=e}(Element.prototype),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(i,n){return e(t,i,n)}):"object"==typeof exports?module.exports=e(t,require("doc-ready"),require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.docReady,t.matchesSelector)}(window,function(t,e,i){var n={extend:function(t,e){for(var i in e)t[i]=e[i];return t},modulo:function(t,e){return(t%e+e)%e}},o=Object.prototype.toString;n.isArray=function(t){return"[object Array]"==o.call(t)},n.makeArray=function(t){var e=[];if(n.isArray(t))e=t;else if(t&&"number"==typeof t.length)for(var i=0,o=t.length;i<o;i++)e.push(t[i]);else e.push(t);return e},n.indexOf=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},n.removeFrom=function(t,e){var i=n.indexOf(t,e);-1!=i&&t.splice(i,1)},n.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(t){return t instanceof HTMLElement}:function(t){return t&&"object"==typeof t&&1==t.nodeType&&"string"==typeof t.nodeName},n.setText=function(){var t;return function(e,i){e[t=t||(void 0!==document.documentElement.textContent?"textContent":"innerText")]=i}}(),n.getParent=function(t,e){for(;t!=document.body;)if(t=t.parentNode,i(t,e))return t},n.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},n.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},n.filterFindElements=function(t,e){for(var o=[],r=0,s=(t=n.makeArray(t)).length;r<s;r++){var a=t[r];if(n.isElement(a))if(e){i(a,e)&&o.push(a);for(var u=a.querySelectorAll(e),h=0,c=u.length;h<c;h++)o.push(u[h])}else o.push(a)}return o},n.debounceMethod=function(t,e,i){var n=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o];t&&clearTimeout(t);var e=arguments,r=this;this[o]=setTimeout(function(){n.apply(r,e),delete r[o]},i||100)}},n.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var r=t.console;return n.htmlInit=function(i,o){e(function(){for(var e=n.toDashed(o),s=document.querySelectorAll(".js-"+e),a="data-"+e+"-options",u=0,h=s.length;u<h;u++){var c,p=s[u],l=p.getAttribute(a);try{c=l&&JSON.parse(l)}catch(t){r&&r.error("Error parsing "+a+" on "+p.nodeName.toLowerCase()+(p.id?"#"+p.id:"")+": "+t);continue}var f=new i(p,c),d=t.jQuery;d&&d.data(p,o,f)}})},n}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(i,n,o,r){return e(t,i,n,o,r)}):"object"==typeof exports?module.exports=e(t,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(t.Outlayer={},t.Outlayer.Item=e(t,t.EventEmitter,t.getSize,t.getStyleProperty,t.fizzyUIUtils))}(window,function(t,e,i,n,o){var r=t.getComputedStyle,s=r?function(t){return r(t,null)}:function(t){return t.currentStyle};var a=n("transition"),u=n("transform"),h=a&&u,c=!!n("perspective"),p={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[a],l=["transform","transition","transitionDuration","transitionProperty"],f=function(){for(var t={},e=0,i=l.length;e<i;e++){var o=l[e],r=n(o);r&&r!==o&&(t[o]=r)}return t}();function d(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}o.extend(d.prototype,e.prototype),d.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},d.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},d.prototype.getSize=function(){this.size=i(this.element)},d.prototype.css=function(t){var e=this.element.style;for(var i in t){e[f[i]||i]=t[i]}},d.prototype.getPosition=function(){var t=s(this.element),e=this.layout.options,i=e.isOriginLeft,n=e.isOriginTop,o=t[i?"left":"right"],r=t[n?"top":"bottom"],a=parseInt(o,10),u=parseInt(r,10),h=this.layout.size;a=-1!=o.indexOf("%")?a/100*h.width:a,u=-1!=r.indexOf("%")?u/100*h.height:u,a=isNaN(a)?0:a,u=isNaN(u)?0:u,a-=i?h.paddingLeft:h.paddingRight,u-=n?h.paddingTop:h.paddingBottom,this.position.x=a,this.position.y=u},d.prototype.layoutPosition=function(){var t=this.layout.size,e=this.layout.options,i={},n=e.isOriginLeft?"paddingLeft":"paddingRight",o=e.isOriginLeft?"left":"right",r=e.isOriginLeft?"right":"left",s=this.position.x+t[n];i[o]=this.getXValue(s),i[r]="";var a=e.isOriginTop?"paddingTop":"paddingBottom",u=e.isOriginTop?"top":"bottom",h=e.isOriginTop?"bottom":"top",c=this.position.y+t[a];i[u]=this.getYValue(c),i[h]="",this.css(i),this.emitEvent("layout",[this])},d.prototype.getXValue=function(t){var e=this.layout.options;return e.percentPosition&&!e.isHorizontal?t/this.layout.size.width*100+"%":t+"px"},d.prototype.getYValue=function(t){var e=this.layout.options;return e.percentPosition&&e.isHorizontal?t/this.layout.size.height*100+"%":t+"px"},d.prototype._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=parseInt(t,10),r=parseInt(e,10),s=o===this.position.x&&r===this.position.y;if(this.setPosition(t,e),!s||this.isTransitioning){var a=t-i,u=e-n,h={};h.transform=this.getTranslate(a,u),this.transition({to:h,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})}else this.layoutPosition()},d.prototype.getTranslate=function(t,e){var i=this.layout.options;return t=i.isOriginLeft?t:-t,e=i.isOriginTop?e:-e,t=this.getXValue(t),e=this.getYValue(e),c?"translate3d("+t+", "+e+", 0)":"translate("+t+", "+e+")"},d.prototype.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},d.prototype.moveTo=h?d.prototype._transitionTo:d.prototype.goTo,d.prototype.setPosition=function(t,e){this.position.x=parseInt(t,10),this.position.y=parseInt(e,10)},d.prototype._nonTransition=function(t){for(var e in this.css(t.to),t.isCleaning&&this._removeStyles(t.to),t.onTransitionEnd)t.onTransitionEnd[e].call(this)},d.prototype._transition=function(t){if(parseFloat(this.layout.options.transitionDuration)){var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);this.element.offsetHeight;null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0}else this._nonTransition(t)};var m="opacity,"+(f.transform||"transform").replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()});d.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:m,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(p,this,!1))},d.prototype.transition=d.prototype[a?"_transition":"_nonTransition"],d.prototype.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},d.prototype.onotransitionend=function(t){this.ontransitionend(t)};var y={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};d.prototype.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,i=y[t.propertyName]||t.propertyName;if(delete e.ingProperties[i],function(t){for(var e in t)return!1;return!0}(e.ingProperties)&&this.disableTransition(),i in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[i]),i in e.onEnd)e.onEnd[i].call(this),delete e.onEnd[i];this.emitEvent("transitionEnd",[this])}},d.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(p,this,!1),this.isTransitioning=!1},d.prototype._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var v={transitionProperty:"",transitionDuration:""};return d.prototype.removeTransitionStyles=function(){this.css(v)},d.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},d.prototype.remove=function(){if(a&&parseFloat(this.layout.options.transitionDuration)){var t=this;this.once("transitionEnd",function(){t.removeElem()}),this.hide()}else this.removeElem()},d.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("visibleStyle")]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},d.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},d.prototype.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},d.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("hiddenStyle")]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},d.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},d.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},d}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,n,o,r,s){return e(t,i,n,o,r,s)}):"object"==typeof exports?module.exports=e(t,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.eventie,t.EventEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,n,o,r){var s=t.console,a=t.jQuery,u=function(){},h=0,c={};function p(t,e){var i=o.getQueryElement(t);if(i){this.element=i,a&&(this.$element=a(this.element)),this.options=o.extend({},this.constructor.defaults),this.option(e);var n=++h;this.element.outlayerGUID=n,c[n]=this,this._create(),this.options.isInitLayout&&this.layout()}else s&&s.error("Bad element for "+this.constructor.namespace+": "+(i||t))}return p.namespace="outlayer",p.Item=r,p.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},o.extend(p.prototype,i.prototype),p.prototype.option=function(t){o.extend(this.options,t)},p.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),o.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},p.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},p.prototype._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],o=0,r=e.length;o<r;o++){var s=new i(e[o],this);n.push(s)}return n},p.prototype._filterFindItemElements=function(t){return o.filterFindElements(t,this.options.itemSelector)},p.prototype.getItemElements=function(){for(var t=[],e=0,i=this.items.length;e<i;e++)t.push(this.items[e].element);return t},p.prototype.layout=function(){this._resetLayout(),this._manageStamps();var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,t),this._isLayoutInited=!0},p.prototype._init=p.prototype.layout,p.prototype._resetLayout=function(){this.getSize()},p.prototype.getSize=function(){this.size=n(this.element)},p.prototype._getMeasurement=function(t,e){var i,r=this.options[t];r?("string"==typeof r?i=this.element.querySelector(r):o.isElement(r)&&(i=r),this[t]=i?n(i)[e]:r):this[t]=0},p.prototype.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},p.prototype._getItemsForLayout=function(t){for(var e=[],i=0,n=t.length;i<n;i++){var o=t[i];o.isIgnored||e.push(o)}return e},p.prototype._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){for(var i=[],n=0,o=t.length;n<o;n++){var r=t[n],s=this._getItemLayoutPosition(r);s.item=r,s.isInstant=e||r.isLayoutInstant,i.push(s)}this._processLayoutQueue(i)}},p.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},p.prototype._processLayoutQueue=function(t){for(var e=0,i=t.length;e<i;e++){var n=t[e];this._positionItem(n.item,n.x,n.y,n.isInstant)}},p.prototype._positionItem=function(t,e,i,n){n?t.goTo(e,i):t.moveTo(e,i)},p.prototype._postLayout=function(){this.resizeContainer()},p.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var t=this._getContainerSize();t&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))}},p.prototype._getContainerSize=u,p.prototype._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},p.prototype._emitCompleteOnItems=function(t,e){var i=this;function n(){i.dispatchEvent(t+"Complete",null,[e])}var o=e.length;if(e&&o)for(var r=0,s=0,a=e.length;s<a;s++){e[s].once(t,u)}else n();function u(){++r===o&&n()}},p.prototype.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;if(this.emitEvent(t,n),a)if(this.$element=this.$element||a(this.element),e){var o=a.Event(e);o.type=t,this.$element.trigger(o,i)}else this.$element.trigger(t,i)},p.prototype.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},p.prototype.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},p.prototype.stamp=function(t){if(t=this._find(t)){this.stamps=this.stamps.concat(t);for(var e=0,i=t.length;e<i;e++){var n=t[e];this.ignore(n)}}},p.prototype.unstamp=function(t){if(t=this._find(t))for(var e=0,i=t.length;e<i;e++){var n=t[e];o.removeFrom(this.stamps,n),this.unignore(n)}},p.prototype._find=function(t){if(t)return"string"==typeof t&&(t=this.element.querySelectorAll(t)),t=o.makeArray(t)},p.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var t=0,e=this.stamps.length;t<e;t++){var i=this.stamps[t];this._manageStamp(i)}}},p.prototype._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},p.prototype._manageStamp=u,p.prototype._getElementOffset=function(t){var e=t.getBoundingClientRect(),i=this._boundingRect,o=n(t);return{left:e.left-i.left-o.marginLeft,top:e.top-i.top-o.marginTop,right:i.right-e.right-o.marginRight,bottom:i.bottom-e.bottom-o.marginBottom}},p.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},p.prototype.bindResize=function(){this.isResizeBound||(e.bind(t,"resize",this),this.isResizeBound=!0)},p.prototype.unbindResize=function(){this.isResizeBound&&e.unbind(t,"resize",this),this.isResizeBound=!1},p.prototype.onresize=function(){this.resizeTimeout&&clearTimeout(this.resizeTimeout);var t=this;this.resizeTimeout=setTimeout(function(){t.resize(),delete t.resizeTimeout},100)},p.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},p.prototype.needsResizeLayout=function(){var t=n(this.element);return this.size&&t&&t.innerWidth!==this.size.innerWidth},p.prototype.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},p.prototype.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},p.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},p.prototype.reveal=function(t){this._emitCompleteOnItems("reveal",t);for(var e=t&&t.length,i=0;e&&i<e;i++){t[i].reveal()}},p.prototype.hide=function(t){this._emitCompleteOnItems("hide",t);for(var e=t&&t.length,i=0;e&&i<e;i++){t[i].hide()}},p.prototype.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},p.prototype.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},p.prototype.getItem=function(t){for(var e=0,i=this.items.length;e<i;e++){var n=this.items[e];if(n.element===t)return n}},p.prototype.getItems=function(t){for(var e=[],i=0,n=(t=o.makeArray(t)).length;i<n;i++){var r=t[i],s=this.getItem(r);s&&e.push(s)}return e},p.prototype.remove=function(t){var e=this.getItems(t);if(this._emitCompleteOnItems("remove",e),e&&e.length)for(var i=0,n=e.length;i<n;i++){var r=e[i];r.remove(),o.removeFrom(this.items,r)}},p.prototype.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="";for(var e=0,i=this.items.length;e<i;e++){this.items[e].destroy()}this.unbindResize();var n=this.element.outlayerGUID;delete c[n],delete this.element.outlayerGUID,a&&a.removeData(this.element,this.constructor.namespace)},p.data=function(t){var e=(t=o.getQueryElement(t))&&t.outlayerGUID;return e&&c[e]},p.create=function(t,e){function i(){p.apply(this,arguments)}return Object.create?i.prototype=Object.create(p.prototype):o.extend(i.prototype,p.prototype),i.prototype.constructor=i,i.defaults=o.extend({},p.defaults),o.extend(i.defaults,e),i.prototype.settings={},i.namespace=t,i.data=p.data,i.Item=function(){r.apply(this,arguments)},i.Item.prototype=new r,o.htmlInit(i,t),a&&a.bridget&&a.bridget(t,i),i},p.Item=r,p}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","fizzy-ui-utils/utils"],e):"object"==typeof exports?module.exports=e(require("outlayer"),require("get-size"),require("fizzy-ui-utils")):t.Masonry=e(t.Outlayer,t.getSize,t.fizzyUIUtils)}(window,function(t,e,i){var n=t.create("masonry");return n.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var t=this.cols;for(this.colYs=[];t--;)this.colYs.push(0);this.maxY=0},n.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var n=this.columnWidth+=this.gutter,o=this.containerWidth+this.gutter,r=o/n,s=n-o%n;r=Math[s&&s<1?"round":"floor"](r),this.cols=Math.max(r,1)},n.prototype.getContainerWidth=function(){var t=this.options.isFitWidth?this.element.parentNode:this.element,i=e(t);this.containerWidth=i&&i.innerWidth},n.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,n=Math[e&&e<1?"round":"ceil"](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this._getColGroup(n),r=Math.min.apply(Math,o),s=i.indexOf(o,r),a={x:this.columnWidth*s,y:r},u=r+t.size.outerHeight,h=this.cols+1-o.length,c=0;c<h;c++)this.colYs[s+c]=u;return a},n.prototype._getColGroup=function(t){if(t<2)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;n<i;n++){var o=this.colYs.slice(n,n+t);e[n]=Math.max.apply(Math,o)}return e},n.prototype._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this.options.isOriginLeft?n.left:n.right,r=o+i.outerWidth,s=Math.floor(o/this.columnWidth);s=Math.max(0,s);var a=Math.floor(r/this.columnWidth);a-=r%this.columnWidth?0:1,a=Math.min(this.cols-1,a);for(var u=(this.options.isOriginTop?n.top:n.bottom)+i.outerHeight,h=s;h<=a;h++)this.colYs[h]=Math.max(u,this.colYs[h])},n.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this.options.isFitWidth&&(t.width=this._getContainerFitWidth()),t},n.prototype._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.prototype.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!==this.containerWidth},n}),function(t,e,i,n){"use strict";function o(t,e,i){return setTimeout(h(t,i),e)}function r(t,e,i){return!!Array.isArray(t)&&(s(t,i[e],i),!0)}function s(t,e,i){var o;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==n)for(o=0;o<t.length;)e.call(i,t[o],o,t),o++;else for(o in t)t.hasOwnProperty(o)&&e.call(i,t[o],o,t)}function a(e,i,n){var o="DEPRECATED METHOD: "+i+"\n"+n+" AT \n";return function(){var i=new Error("get-stack-trace"),n=i&&i.stack?i.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=t.console&&(t.console.warn||t.console.log);return r&&r.call(t.console,o,n),e.apply(this,arguments)}}function u(t,e,i){var n,o=e.prototype;(n=t.prototype=Object.create(o)).constructor=t,n._super=o,i&&K(n,i)}function h(t,e){return function(){return t.apply(e,arguments)}}function c(t,e){return typeof t==it?t.apply(e&&e[0]||n,e):t}function p(t,e){return t===n?e:t}function l(t,e,i){s(y(e),function(e){t.addEventListener(e,i,!1)})}function f(t,e,i){s(y(e),function(e){t.removeEventListener(e,i,!1)})}function d(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function m(t,e){return t.indexOf(e)>-1}function y(t){return t.trim().split(/\s+/g)}function v(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;n<t.length;){if(i&&t[n][i]==e||!i&&t[n]===e)return n;n++}return-1}function g(t){return Array.prototype.slice.call(t,0)}function T(t,e,i){for(var n=[],o=[],r=0;r<t.length;){var s=e?t[r][e]:t[r];v(o,s)<0&&n.push(t[r]),o[r]=s,r++}return i&&(n=e?n.sort(function(t,i){return t[e]>i[e]}):n.sort()),n}function E(t,e){for(var i,o,r=e[0].toUpperCase()+e.slice(1),s=0;s<tt.length;){if((o=(i=tt[s])?i+r:e)in t)return o;s++}return n}function b(e){var i=e.ownerDocument||e;return i.defaultView||i.parentWindow||t}function _(t,e){var i=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){c(t.options.enable,[t])&&i.handler(e)},this.init()}function z(t,e,i){var n=i.pointers.length,o=i.changedPointers.length,r=e&mt&&n-o==0,s=e&(vt|gt)&&n-o==0;i.isFirst=!!r,i.isFinal=!!s,r&&(t.session={}),i.eventType=e,function(t,e){var i=t.session,n=e.pointers,o=n.length;i.firstInput||(i.firstInput=x(e)),o>1&&!i.firstMultiple?i.firstMultiple=x(e):1===o&&(i.firstMultiple=!1);var r=i.firstInput,s=i.firstMultiple,a=s?s.center:r.center,u=e.center=S(n);e.timeStamp=rt(),e.deltaTime=e.timeStamp-r.timeStamp,e.angle=C(a,u),e.distance=w(a,u),function(t,e){var i=e.center,n=t.offsetDelta||{},o=t.prevDelta||{},r=t.prevInput||{};e.eventType!==mt&&r.eventType!==vt||(o=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=o.x+(i.x-n.x),e.deltaY=o.y+(i.y-n.y)}(i,e),e.offsetDirection=O(e.deltaX,e.deltaY);var h=L(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=h.x,e.overallVelocityY=h.y,e.overallVelocity=ot(h.x)>ot(h.y)?h.x:h.y,e.scale=s?function(t,e){return w(e[0],e[1],Ot)/w(t[0],t[1],Ot)}(s.pointers,n):1,e.rotation=s?function(t,e){return C(e[1],e[0],Ot)+C(t[1],t[0],Ot)}(s.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,I(i,e);var c=t.element;d(e.srcEvent.target,c)&&(c=e.srcEvent.target),e.target=c}(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function I(t,e){var i,o,r,s,a=t.lastInterval||e,u=e.timeStamp-a.timeStamp;if(e.eventType!=gt&&(u>dt||a.velocity===n)){var h=e.deltaX-a.deltaX,c=e.deltaY-a.deltaY,p=L(u,h,c);o=p.x,r=p.y,i=ot(p.x)>ot(p.y)?p.x:p.y,s=O(h,c),t.lastInterval=e}else i=a.velocity,o=a.velocityX,r=a.velocityY,s=a.direction;e.velocity=i,e.velocityX=o,e.velocityY=r,e.direction=s}function x(t){for(var e=[],i=0;i<t.pointers.length;)e[i]={clientX:nt(t.pointers[i].clientX),clientY:nt(t.pointers[i].clientY)},i++;return{timeStamp:rt(),pointers:e,center:S(e),deltaX:t.deltaX,deltaY:t.deltaY}}function S(t){var e=t.length;if(1===e)return{x:nt(t[0].clientX),y:nt(t[0].clientY)};for(var i=0,n=0,o=0;e>o;)i+=t[o].clientX,n+=t[o].clientY,o++;return{x:nt(i/e),y:nt(n/e)}}function L(t,e,i){return{x:e/t||0,y:i/t||0}}function O(t,e){return t===e?Tt:ot(t)>=ot(e)?0>t?Et:bt:0>e?_t:zt}function w(t,e,i){i||(i=Lt);var n=e[i[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return Math.sqrt(n*n+o*o)}function C(t,e,i){i||(i=Lt);var n=e[i[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return 180*Math.atan2(o,n)/Math.PI}function R(){this.evEl=Ct,this.evWin=Rt,this.pressed=!1,_.apply(this,arguments)}function P(){this.evEl=At,this.evWin=Mt,_.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function W(){this.evTarget=qt,this.evWin=Nt,this.started=!1,_.apply(this,arguments)}function A(){this.evTarget=Ft,this.targetIds={},_.apply(this,arguments)}function M(){_.apply(this,arguments);var t=h(this.handler,this);this.touch=new A(this.manager,t),this.mouse=new R(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function D(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var i={x:e.clientX,y:e.clientY};this.lastTouches.push(i);var n=this.lastTouches;setTimeout(function(){var t=n.indexOf(i);t>-1&&n.splice(t,1)},Yt)}}function q(t,e){this.manager=t,this.set(e)}function N(t){this.options=K({},this.defaults,t||{}),this.id=ut++,this.manager=null,this.options.enable=p(this.options.enable,!0),this.state=Jt,this.simultaneous={},this.requireFail=[]}function j(t){return t&ne?"cancel":t&ee?"end":t&te?"move":t&Kt?"start":""}function F(t){return t==zt?"down":t==_t?"up":t==Et?"left":t==bt?"right":""}function Y(t,e){var i=e.manager;return i?i.get(t):t}function H(){N.apply(this,arguments)}function B(){H.apply(this,arguments),this.pX=null,this.pY=null}function X(){H.apply(this,arguments)}function k(){N.apply(this,arguments),this._timer=null,this._input=null}function U(){H.apply(this,arguments)}function V(){H.apply(this,arguments)}function G(){N.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Q(t,e){return(e=e||{}).recognizers=p(e.recognizers,Q.defaults.preset),new $(t,e)}function $(t,e){this.options=K({},Q.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=function(t){var e=t.options.inputClass;return new(e||(ct?P:pt?A:ht?M:R))(t,z)}(this),this.touchAction=new q(this,this.options.touchAction),Z(this,!0),s(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function Z(t,e){var i,n=t.element;n.style&&(s(t.options.cssProps,function(o,r){i=E(n.style,r),e?(t.oldCssProps[i]=n.style[i],n.style[i]=o):n.style[i]=t.oldCssProps[i]||""}),e||(t.oldCssProps={}))}function J(t,i){var n=e.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=i,i.target.dispatchEvent(n)}var K,tt=["","webkit","Moz","MS","ms","o"],et=e.createElement("div"),it="function",nt=Math.round,ot=Math.abs,rt=Date.now;K="function"!=typeof Object.assign?function(t){if(t===n||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var o=arguments[i];if(o!==n&&null!==o)for(var r in o)o.hasOwnProperty(r)&&(e[r]=o[r])}return e}:Object.assign;var st=a(function(t,e,i){for(var o=Object.keys(e),r=0;r<o.length;)(!i||i&&t[o[r]]===n)&&(t[o[r]]=e[o[r]]),r++;return t},"extend","Use `assign`."),at=a(function(t,e){return st(t,e,!0)},"merge","Use `assign`."),ut=1,ht="ontouchstart"in t,ct=E(t,"PointerEvent")!==n,pt=ht&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),lt="touch",ft="mouse",dt=25,mt=1,yt=2,vt=4,gt=8,Tt=1,Et=2,bt=4,_t=8,zt=16,It=Et|bt,xt=_t|zt,St=It|xt,Lt=["x","y"],Ot=["clientX","clientY"];_.prototype={handler:function(){},init:function(){this.evEl&&l(this.element,this.evEl,this.domHandler),this.evTarget&&l(this.target,this.evTarget,this.domHandler),this.evWin&&l(b(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&f(this.element,this.evEl,this.domHandler),this.evTarget&&f(this.target,this.evTarget,this.domHandler),this.evWin&&f(b(this.element),this.evWin,this.domHandler)}};var wt={mousedown:mt,mousemove:yt,mouseup:vt},Ct="mousedown",Rt="mousemove mouseup";u(R,_,{handler:function(t){var e=wt[t.type];e&mt&&0===t.button&&(this.pressed=!0),e&yt&&1!==t.which&&(e=vt),this.pressed&&(e&vt&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:ft,srcEvent:t}))}});var Pt={pointerdown:mt,pointermove:yt,pointerup:vt,pointercancel:gt,pointerout:gt},Wt={2:lt,3:"pen",4:ft,5:"kinect"},At="pointerdown",Mt="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(At="MSPointerDown",Mt="MSPointerMove MSPointerUp MSPointerCancel"),u(P,_,{handler:function(t){var e=this.store,i=!1,n=t.type.toLowerCase().replace("ms",""),o=Pt[n],r=Wt[t.pointerType]||t.pointerType,s=r==lt,a=v(e,t.pointerId,"pointerId");o&mt&&(0===t.button||s)?0>a&&(e.push(t),a=e.length-1):o&(vt|gt)&&(i=!0),0>a||(e[a]=t,this.callback(this.manager,o,{pointers:e,changedPointers:[t],pointerType:r,srcEvent:t}),i&&e.splice(a,1))}});var Dt={touchstart:mt,touchmove:yt,touchend:vt,touchcancel:gt},qt="touchstart",Nt="touchstart touchmove touchend touchcancel";u(W,_,{handler:function(t){var e=Dt[t.type];if(e===mt&&(this.started=!0),this.started){var i=function(t,e){var i=g(t.touches),n=g(t.changedTouches);return e&(vt|gt)&&(i=T(i.concat(n),"identifier",!0)),[i,n]}.call(this,t,e);e&(vt|gt)&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:lt,srcEvent:t})}}});var jt={touchstart:mt,touchmove:yt,touchend:vt,touchcancel:gt},Ft="touchstart touchmove touchend touchcancel";u(A,_,{handler:function(t){var e=jt[t.type],i=function(t,e){var i=g(t.touches),n=this.targetIds;if(e&(mt|yt)&&1===i.length)return n[i[0].identifier]=!0,[i,i];var o,r,s=g(t.changedTouches),a=[],u=this.target;if(r=i.filter(function(t){return d(t.target,u)}),e===mt)for(o=0;o<r.length;)n[r[o].identifier]=!0,o++;for(o=0;o<s.length;)n[s[o].identifier]&&a.push(s[o]),e&(vt|gt)&&delete n[s[o].identifier],o++;return a.length?[T(r.concat(a),"identifier",!0),a]:void 0}.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:lt,srcEvent:t})}});var Yt=2500,Ht=25;u(M,_,{handler:function(t,e,i){var n=i.pointerType==lt,o=i.pointerType==ft;if(!(o&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(n)(function(t,e){t&mt?(this.primaryTouch=e.changedPointers[0].identifier,D.call(this,e)):t&(vt|gt)&&D.call(this,e)}).call(this,e,i);else if(o&&function(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var o=this.lastTouches[n],r=Math.abs(e-o.x),s=Math.abs(i-o.y);if(Ht>=r&&Ht>=s)return!0}return!1}.call(this,i))return;this.callback(t,e,i)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Bt=E(et.style,"touchAction"),Xt=Bt!==n,kt="compute",Ut="auto",Vt="manipulation",Gt="none",Qt="pan-x",$t="pan-y",Zt=function(){if(!Xt)return!1;var e={},i=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(n){e[n]=!i||t.CSS.supports("touch-action",n)}),e}();q.prototype={set:function(t){t==kt&&(t=this.compute()),Xt&&this.manager.element.style&&Zt[t]&&(this.manager.element.style[Bt]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return s(this.manager.recognizers,function(e){c(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),function(t){if(m(t,Gt))return Gt;var e=m(t,Qt),i=m(t,$t);return e&&i?Gt:e||i?e?Qt:$t:m(t,Vt)?Vt:Ut}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,i=t.offsetDirection;if(!this.manager.session.prevented){var n=this.actions,o=m(n,Gt)&&!Zt[Gt],r=m(n,$t)&&!Zt[$t],s=m(n,Qt)&&!Zt[Qt];if(o){var a=1===t.pointers.length,u=t.distance<2,h=t.deltaTime<250;if(a&&u&&h)return}return s&&r?void 0:o||r&&i&It||s&&i&xt?this.preventSrc(e):void 0}e.preventDefault()},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var Jt=1,Kt=2,te=4,ee=8,ie=ee,ne=16;N.prototype={defaults:{},set:function(t){return K(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(r(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=Y(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return r(t,"dropRecognizeWith",this)?this:(t=Y(t,this),delete this.simultaneous[t.id],this)},requireFailure:function(t){if(r(t,"requireFailure",this))return this;var e=this.requireFail;return-1===v(e,t=Y(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(r(t,"dropRequireFailure",this))return this;t=Y(t,this);var e=v(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){i.manager.emit(e,t)}var i=this,n=this.state;ee>n&&e(i.options.event+j(n)),e(i.options.event),t.additionalEvent&&e(t.additionalEvent),n>=ee&&e(i.options.event+j(n))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=32)},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(32|Jt)))return!1;t++}return!0},recognize:function(t){var e=K({},t);return c(this.options.enable,[this,e])?(this.state&(ie|ne|32)&&(this.state=Jt),this.state=this.process(e),void(this.state&(Kt|te|ee|ne)&&this.tryEmit(e))):(this.reset(),void(this.state=32))},process:function(t){},getTouchAction:function(){},reset:function(){}},u(H,N,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,i=t.eventType,n=e&(Kt|te),o=this.attrTest(t);return n&&(i&gt||!o)?e|ne:n||o?i&vt?e|ee:e&Kt?e|te:Kt:32}}),u(B,H,{defaults:{event:"pan",threshold:10,pointers:1,direction:St},getTouchAction:function(){var t=this.options.direction,e=[];return t&It&&e.push($t),t&xt&&e.push(Qt),e},directionTest:function(t){var e=this.options,i=!0,n=t.distance,o=t.direction,r=t.deltaX,s=t.deltaY;return o&e.direction||(e.direction&It?(o=0===r?Tt:0>r?Et:bt,i=r!=this.pX,n=Math.abs(t.deltaX)):(o=0===s?Tt:0>s?_t:zt,i=s!=this.pY,n=Math.abs(t.deltaY))),t.direction=o,i&&n>e.threshold&&o&e.direction},attrTest:function(t){return H.prototype.attrTest.call(this,t)&&(this.state&Kt||!(this.state&Kt)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=F(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),u(X,H,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Gt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&Kt)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),u(k,N,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Ut]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance<e.threshold,r=t.deltaTime>e.time;if(this._input=t,!n||!i||t.eventType&(vt|gt)&&!r)this.reset();else if(t.eventType&mt)this.reset(),this._timer=o(function(){this.state=ie,this.tryEmit()},e.time,this);else if(t.eventType&vt)return ie;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===ie&&(t&&t.eventType&vt?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=rt(),this.manager.emit(this.options.event,this._input)))}}),u(U,H,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Gt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&Kt)}}),u(V,H,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:It|xt,pointers:1},getTouchAction:function(){return B.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(It|xt)?e=t.overallVelocity:i&It?e=t.overallVelocityX:i&xt&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&ot(e)>this.options.velocity&&t.eventType&vt},emit:function(t){var e=F(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),u(G,N,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Vt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance<e.threshold,r=t.deltaTime<e.time;if(this.reset(),t.eventType&mt&&0===this.count)return this.failTimeout();if(n&&r&&i){if(t.eventType!=vt)return this.failTimeout();var s=!this.pTime||t.timeStamp-this.pTime<e.interval,a=!this.pCenter||w(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,a&&s?this.count+=1:this.count=1,this._input=t,0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=o(function(){this.state=ie,this.tryEmit()},e.interval,this),Kt):ie}return 32},failTimeout:function(){return this._timer=o(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==ie&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Q.VERSION="2.0.8",Q.defaults={domEvents:!1,touchAction:kt,enable:!0,inputTarget:null,inputClass:null,preset:[[U,{enable:!1}],[X,{enable:!1},["rotate"]],[V,{direction:It}],[B,{direction:It},["swipe"]],[G],[G,{event:"doubletap",taps:2},["tap"]],[k]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};$.prototype={set:function(t){return K(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){this.touchAction.preventDefaults(t);var i,n=this.recognizers,o=e.curRecognizer;(!o||o&&o.state&ie)&&(o=e.curRecognizer=null);for(var r=0;r<n.length;)i=n[r],2===e.stopped||o&&i!=o&&!i.canRecognizeWith(o)?i.reset():i.recognize(t),!o&&i.state&(Kt|te|ee)&&(o=e.curRecognizer=i),r++}},get:function(t){if(t instanceof N)return t;for(var e=this.recognizers,i=0;i<e.length;i++)if(e[i].options.event==t)return e[i];return null},add:function(t){if(r(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(r(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,i=v(e,t);-1!==i&&(e.splice(i,1),this.touchAction.update())}return this},on:function(t,e){if(t!==n&&e!==n){var i=this.handlers;return s(y(t),function(t){i[t]=i[t]||[],i[t].push(e)}),this}},off:function(t,e){if(t!==n){var i=this.handlers;return s(y(t),function(t){e?i[t]&&i[t].splice(v(i[t],e),1):delete i[t]}),this}},emit:function(t,e){this.options.domEvents&&J(t,e);var i=this.handlers[t]&&this.handlers[t].slice();if(i&&i.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var n=0;n<i.length;)i[n](e),n++}},destroy:function(){this.element&&Z(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},K(Q,{INPUT_START:mt,INPUT_MOVE:yt,INPUT_END:vt,INPUT_CANCEL:gt,STATE_POSSIBLE:Jt,STATE_BEGAN:Kt,STATE_CHANGED:te,STATE_ENDED:ee,STATE_RECOGNIZED:ie,STATE_CANCELLED:ne,STATE_FAILED:32,DIRECTION_NONE:Tt,DIRECTION_LEFT:Et,DIRECTION_RIGHT:bt,DIRECTION_UP:_t,DIRECTION_DOWN:zt,DIRECTION_HORIZONTAL:It,DIRECTION_VERTICAL:xt,DIRECTION_ALL:St,Manager:$,Input:_,TouchAction:q,TouchInput:A,MouseInput:R,PointerEventInput:P,TouchMouseInput:M,SingleTouchInput:W,Recognizer:N,AttrRecognizer:H,Tap:G,Pan:B,Swipe:V,Pinch:X,Rotate:U,Press:k,on:l,off:f,each:s,merge:at,extend:st,assign:K,inherit:u,bindFn:h,prefixed:E}),(void 0!==t?t:"undefined"!=typeof self?self:{}).Hammer=Q,"function"==typeof define&&define.amd?define(function(){return Q}):"undefined"!=typeof module&&module.exports?module.exports=Q:t.Hammer=Q}(window,document);   