!function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e(require,exports,module):t.ScrollReveal=e()}(this,function(t,e,n){return function(){var t,e,n;this.ScrollReveal=function(){function i(n){return window==this?new i(n):(e=this,e.tools=new t,e.tools.extend(e.defaults,n||{}),e.tools.isMobile()&&!e.defaults.mobile?!1:e.tools.isSupported("transform")&&e.tools.isSupported("transition")?(e.store={elements:{},containers:[]},e.history=[],e.counter=0,e.running=!1,e.initialized=!1,e):console.warn("ScrollReveal is not supported in this browser."))}return i.prototype.defaults={origin:"bottom",distance:"20px",duration:500,delay:0,rotate:{x:0,y:0,z:0},opacity:0,scale:.9,easing:"cubic-bezier( 0.6, 0.2, 0.1, 1 )",container:null,mobile:!0,reset:!1,useDelay:"always",viewFactor:.2,viewOffset:{top:0,right:0,bottom:0,left:0},afterReveal:function(t){},afterReset:function(t){}},i.prototype.reveal=function(t,n,i){var o,r,s,a;if(r=n&&n.container?n.container:e.defaults.container?e.defaults.container:window.document.documentElement,o=Array.prototype.slice.call(r.querySelectorAll(t)),!o.length)return console.warn("reveal('"+t+"') failed: no elements found."),e;for(var l=0;le&&i>p&&n>g&&w>o}function i(){return"fixed"===window.getComputedStyle(t.domEl).position}var o=e.getOffset(t.domEl),r=e.getContainer(t.config.container),s=e.getScrolled(t.config.container),a=t.config.viewFactor,l=o.height,c=o.width,f=o.top,d=o.left,u=f+l,y=d+c;return n()||i()},i.prototype.sync=function(){if(e.history.length){for(var t=0;t