File "wow.js"
Full Path: /home/stylijtl/public_html/wp-content/themes/acens/js/wow.js
File size: 16.2 KB
MIME-type: text/plain
Charset: utf-8
/*! WOW wow.js - v1.3.0 - 2016-10-04
* https://wowjs.uk
* Copyright (c) 2016 Thomas Grainger; Licensed MIT */
!function(t,e){if("function"==typeof define&&define.amd)define(["module","exports"],e);else if("undefined"!=typeof exports)e(module,exports);else{var i={exports:{}};e(i,i.exports),t.WOW=i.exports}}(this,function(t,e){"use strict";function i(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}function n(t,e){return e.indexOf(t)>=0}function s(t,e,i){null!=t.addEventListener?t.addEventListener(e,i,!1):null!=t.attachEvent?t.attachEvent("on"+e,i):t[e]=i}function r(t,e,i){null!=t.removeEventListener?t.removeEventListener(e,i,!1):null!=t.detachEvent?t.detachEvent("on"+e,i):delete t[e]}Object.defineProperty(e,"__esModule",{value:!0});var a,o,l=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),c=window.WeakMap||window.MozWeakMap||function(){function t(){i(this,t),this.keys=[],this.values=[]}return l(t,[{key:"get",value:function(t){for(var e=0;e<this.keys.length;e++)if(this.keys[e]===t)return this.values[e]}},{key:"set",value:function(t,e){for(var i=0;i<this.keys.length;i++)if(this.keys[i]===t)return this.values[i]=e,this;return this.keys.push(t),this.values.push(e),this}}]),t}(),u=window.MutationObserver||window.WebkitMutationObserver||window.MozMutationObserver||(o=a=function(){function t(){i(this,t),"undefined"!=typeof console&&null!==console&&(console.warn("MutationObserver is not supported by your browser."),console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content."))}return l(t,[{key:"observe",value:function(){}}]),t}(),a.notSupported=!0,o),h=window.getComputedStyle||function(t){var e=/(\-([a-z]){1})/g;return{getPropertyValue:function(i){"float"===i&&(i="styleFloat"),e.test(i)&&i.replace(e,function(t,e){return e.toUpperCase()});var n=t.currentStyle;return(null!=n?n[i]:void 0)||null}}},f=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];i(this,t),this.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null,scrollContainer:null,resetAnimation:!0},this.animate="requestAnimationFrame"in window?function(t){return window.requestAnimationFrame(t)}:function(t){return t()},this.vendors=["moz","webkit"],this.start=this.start.bind(this),this.resetAnimation=this.resetAnimation.bind(this),this.scrollHandler=this.scrollHandler.bind(this),this.scrollCallback=this.scrollCallback.bind(this),this.scrolled=!0,this.config=function t(e,i){for(var n in i)if(null==e[n]){var s=i[n];e[n]=s}return e}(e,this.defaults),null!=e.scrollContainer&&(this.config.scrollContainer=document.querySelector(e.scrollContainer)),this.animationNameCache=new c,this.wowEvent=function t(e){var i=!(arguments.length<=1)&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length<=2)&&void 0!==arguments[2]&&arguments[2],s=arguments.length<=3||void 0===arguments[3]?null:arguments[3],r=void 0;return null!=document.createEvent?(r=document.createEvent("CustomEvent")).initCustomEvent(e,i,n,s):null!=document.createEventObject?(r=document.createEventObject()).eventType=e:r.eventName=e,r}(this.config.boxClass)}return l(t,[{key:"init",value:function(){this.element=window.document.documentElement,n(document.readyState,["interactive","complete"])?this.start():s(document,"DOMContentLoaded",this.start),this.finished=[]}},{key:"start",value:function(){var t=this;if(this.stopped=!1,this.boxes=[].slice.call(this.element.querySelectorAll("."+this.config.boxClass)),this.all=this.boxes.slice(0),this.boxes.length){if(this.disabled())this.resetStyle();else for(var e=0;e<this.boxes.length;e++){var i=this.boxes[e];this.applyStyle(i,!0)}}this.disabled()||(s(this.config.scrollContainer||window,"scroll",this.scrollHandler),s(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live&&new u(function(e){for(var i=0;i<e.length;i++)for(var n=e[i],s=0;s<n.addedNodes.length;s++){var r=n.addedNodes[s];t.doSync(r)}}).observe(document.body,{childList:!0,subtree:!0})}},{key:"stop",value:function(){this.stopped=!0,r(this.config.scrollContainer||window,"scroll",this.scrollHandler),r(window,"resize",this.scrollHandler),null!=this.interval&&clearInterval(this.interval)}},{key:"sync",value:function(){u.notSupported&&this.doSync(this.element)}},{key:"doSync",value:function(t){if(null!=t||(t=this.element),1===t.nodeType){t=t.parentNode||t;for(var e=t.querySelectorAll("."+this.config.boxClass),i=0;i<e.length;i++){var s=e[i];n(s,this.all)||(this.boxes.push(s),this.all.push(s),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(s,!0),this.scrolled=!0)}}}},{key:"show",value:function(t){var e,i;return this.applyStyle(t),t.className=t.className+" "+this.config.animateClass,null!=this.config.callback&&this.config.callback(t),e=t,i=this.wowEvent,null!=e.dispatchEvent?e.dispatchEvent(i):i in(null!=e)?e[i]():"on"+i in(null!=e)&&e["on"+i](),this.config.resetAnimation&&(s(t,"animationend",this.resetAnimation),s(t,"oanimationend",this.resetAnimation),s(t,"webkitAnimationEnd",this.resetAnimation),s(t,"MSAnimationEnd",this.resetAnimation)),t}},{key:"applyStyle",value:function(t,e){var i=this,n=t.getAttribute("data-wow-duration"),s=t.getAttribute("data-wow-delay"),r=t.getAttribute("data-wow-iteration");return this.animate(function(){return i.customStyle(t,e,n,s,r)})}},{key:"resetStyle",value:function(){for(var t=0;t<this.boxes.length;t++)this.boxes[t].style.visibility="visible"}},{key:"resetAnimation",value:function(t){if(t.type.toLowerCase().indexOf("animationend")>=0){var e=t.target||t.srcElement;e.className=e.className.replace(this.config.animateClass,"").trim()}}},{key:"customStyle",value:function(t,e,i,n,s){return e&&this.cacheAnimationName(t),t.style.visibility=e?"hidden":"visible",i&&this.vendorSet(t.style,{animationDuration:i}),n&&this.vendorSet(t.style,{animationDelay:n}),s&&this.vendorSet(t.style,{animationIterationCount:s}),this.vendorSet(t.style,{animationName:e?"none":this.cachedAnimationName(t)}),t}},{key:"vendorSet",value:function(t,e){for(var i in e)if(e.hasOwnProperty(i)){var n=e[i];t[""+i]=n;for(var s=0;s<this.vendors.length;s++)t[""+this.vendors[s]+i.charAt(0).toUpperCase()+i.substr(1)]=n}}},{key:"vendorCSS",value:function(t,e){for(var i=h(t),n=i.getPropertyCSSValue(e),s=0;s<this.vendors.length;s++){var r=this.vendors[s];n=n||i.getPropertyCSSValue("-"+r+"-"+e)}return n}},{key:"animationName",value:function(t){var e=void 0;try{e=this.vendorCSS(t,"animation-name").cssText}catch(i){e=h(t).getPropertyValue("animation-name")}return"none"===e?"":e}},{key:"cacheAnimationName",value:function(t){return this.animationNameCache.set(t,this.animationName(t))}},{key:"cachedAnimationName",value:function(t){return this.animationNameCache.get(t)}},{key:"scrollHandler",value:function(){this.scrolled=!0}},{key:"scrollCallback",value:function(){if(this.scrolled){this.scrolled=!1;for(var t=[],e=0;e<this.boxes.length;e++){var i=this.boxes[e];if(i){if(this.isVisible(i)){this.show(i);continue}t.push(i)}}this.boxes=t,this.boxes.length||this.config.live||this.stop()}}},{key:"offsetTop",value:function(t){for(;void 0===t.offsetTop;)t=t.parentNode;for(var e=t.offsetTop;t.offsetParent;)e+=(t=t.offsetParent).offsetTop;return e}},{key:"isVisible",value:function(t){var e=t.getAttribute("data-wow-offset")||this.config.offset,i=this.config.scrollContainer&&this.config.scrollContainer.scrollTop||window.pageYOffset,n=i+Math.min(this.element.clientHeight,"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight)-e,s=this.offsetTop(t),r=s+t.clientHeight;return n>=s&&r>=i}},{key:"disabled",value:function(){var t;return!this.config.mobile&&(t=navigator.userAgent,/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t))}}]),t}();e.default=f,t.exports=e.default}),function(t){t.fn.parallaxie=function(e){return e=t.extend({speed:.2,repeat:"no-repeat",size:"cover",pos_x:"center",offset:0},e),this.each(function(){var i=t(this),n=i.data("parallaxie");"object"!=typeof n&&(n={}),n=t.extend({},e,n);var s=i.data("image");if(void 0===s){if(!(s=i.css("background-image")))return;var r=n.offset+(i.offset().top-t(window).scrollTop())*(1-n.speed);i.css({"background-image":s,"background-size":n.size,"background-repeat":n.repeat,"background-attachment":"fixed","background-position":n.pos_x+" "+r+"px"}),t(window).scroll(function(){var e=n.offset+(i.offset().top-t(window).scrollTop())*(1-n.speed);i.data("pos_y",e),i.css("background-position",n.pos_x+" "+e+"px")})}}),this}}(jQuery),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Splitting=e()}(this,function(){"use strict";var t=document,e=t.createTextNode.bind(t);function i(t,e,i){t.style.setProperty(e,i)}function n(t,e){return t.appendChild(e)}function s(e,i,s,r){var a=t.createElement("span");return i&&(a.className=i),s&&(r||a.setAttribute("data-"+i,s),a.textContent=s),e&&n(e,a)||a}function r(t,e){return t.getAttribute("data-"+e)}function a(e,i){return e&&0!=e.length?e.nodeName?[e]:[].slice.call(e[0].nodeName?e:(i||t).querySelectorAll(e)):[]}function o(t){for(var e=[];t--;)e[t]=[];return e}function l(t,e){t&&t.some(e)}function c(t){return function(e){return t[e]}}var u={};function h(t,e,i,n){return{by:t,depends:e,key:i,split:n}}function f(t){u[t.by]=t}function d(t,i,r,o,c){t.normalize();var u=[],h=document.createDocumentFragment();o&&u.push(t.previousSibling);var f=[];return a(t.childNodes).some(function(t){if(!t.tagName||t.hasChildNodes()){if(t.childNodes&&t.childNodes.length)return f.push(t),void u.push.apply(u,d(t,i,r,o,c));var n=t.wholeText||"",a=n.trim();a.length&&(" "===n[0]&&f.push(e(" ")),l(a.split(r),function(t,e){e&&c&&f.push(s(h,"whitespace"," ",c));var n=s(h,i,t);u.push(n),f.push(n)})," "===n[n.length-1]&&f.push(e(" ")))}else f.push(t)}),l(f,function(t){n(h,t)}),t.innerHTML="",n(t,h),u}var v="words",p=h(v,0,"word",function(t){return d(t,"word",/\s+/,0,1)}),m="chars",g=h(m,[v],"char",function(t,e,i){var n=[];return l(i[v],function(t,i){n.push.apply(n,d(t,"char","",e.whitespace&&i))}),n});function y(t){var e=(t=t||{}).key;return a(t.target||"[data-splitting]").map(function(n){var s,a=n["\xf0Ÿ\x8dŒ"];if(!t.force&&a)return a;a=n["\xf0Ÿ\x8dŒ"]={el:n};var o=(function t(e,i,n){var s=n.indexOf(e);if(-1==s)n.unshift(e),l(u[e].depends,function(i){t(i,e,n)});else{var r=n.indexOf(0);n.splice(s,1),n.splice(r,0,e)}return n})(s=t.by||r(n,"splitting")||m,0,[]).map(c(u)),h=function(t,e){for(var i in e)t[i]=e[i];return t}({},t);return l(o,function(t){if(t.split){var s,r,o,c,u=t.by,f=(e?"-"+e:"")+t.key,d=t.split(n,h,a);f&&(s=n,c=(o="--"+f)+"-index",l(r=d,function(t,e){Array.isArray(t)?l(t,function(t){i(t,c,e)}):i(t,c,e)}),i(s,o+"-total",r.length)),a[u]=d,n.classList.add(u)}}),n.classList.add("splitting"),a})}function b(t,e,i){var n=a(e.matching||t.children,t),s={};return l(n,function(t){var e=Math.round(t[i]);(s[e]||(s[e]=[])).push(t)}),Object.keys(s).map(Number).sort($).map(c(s))}function $(t,e){return t-e}y.html=function(t){var e=(t=t||{}).target=s();return e.innerHTML=t.content,y(t),e.outerHTML},y.add=f;var w=h("lines",[v],"line",function(t,e,i){return b(t,{matching:i[v]},"offsetTop")}),k=h("items",0,"item",function(t,e){return a(e.matching||t.children,t)}),x=h("rows",0,"row",function(t,e){return b(t,e,"offsetTop")}),C=h("cols",0,"col",function(t,e){return b(t,e,"offsetLeft")}),S=h("grid",["rows","cols"]),A="layout",_=h(A,0,0,function(t,e){var o=e.rows=+(e.rows||r(t,"rows")||1),l=e.columns=+(e.columns||r(t,"columns")||1);if(e.image=e.image||r(t,"image")||t.currentSrc||t.src,e.image){var c=a("img",t)[0];e.image=c&&(c.currentSrc||c.src)}e.image&&i(t,"background-image","url("+e.image+")");for(var u=o*l,h=[],f=s(0,"cell-grid");u--;){var d=s(f,"cell");s(d,"cell-inner"),h.push(d)}return n(t,f),h}),P=h("cellRows",[A],"row",function(t,e,i){var n=e.rows,s=o(n);return l(i[A],function(t,e,i){s[Math.floor(e/(i.length/n))].push(t)}),s}),E=h("cellColumns",[A],"col",function(t,e,i){var n=e.columns,s=o(n);return l(i[A],function(t,e){s[e%n].push(t)}),s}),N=h("cells",["cellRows","cellColumns"],"cell",function(t,e,i){return i[A]});return f(p),f(g),f(w),f(k),f(x),f(C),f(S),f(_),f(P),f(E),f(N),y}),function(t){if("function"==typeof define&&define.amd)define(["jquery"],t);else if("object"==typeof module&&module.exports){var e=require("jquery");t(e),module.exports=e}else t(jQuery)}(function(t){function e(t){this.init(t)}e.prototype={value:0,size:100,startAngle:-Math.PI,thickness:"auto",fill:{gradient:["#3aeabb","#fdd250"]},emptyFill:"rgba(0, 0, 0, .1)",animation:{duration:1200,easing:"circleProgressEasing"},animationStartValue:0,reverse:!1,lineCap:"butt",insertMode:"prepend",constructor:e,el:null,canvas:null,ctx:null,radius:0,arcFill:null,lastFrameValue:0,init:function(e){t.extend(this,e),this.radius=this.size/2,this.initWidget(),this.initFill(),this.draw(),this.el.trigger("circle-inited")},initWidget:function(){this.canvas||(this.canvas=t("<canvas>")["prepend"==this.insertMode?"prependTo":"appendTo"](this.el)[0]);var e=this.canvas;if(e.width=this.size,e.height=this.size,this.ctx=e.getContext("2d"),window.devicePixelRatio>1){var i=window.devicePixelRatio;e.style.width=e.style.height=this.size+"px",e.width=e.height=this.size*i,this.ctx.scale(i,i)}},initFill:function(){function e(){var e=t("<canvas>")[0];e.width=n.size,e.height=n.size,e.getContext("2d").drawImage(i,0,0,a,a),n.arcFill=n.ctx.createPattern(e,"no-repeat"),n.drawFrame(n.lastFrameValue)}var i,n=this,s=this.fill,r=this.ctx,a=this.size;if(!s)throw Error("The fill is not specified!");if("string"==typeof s&&(s={color:s}),s.color&&(this.arcFill=s.color),s.gradient){var o=s.gradient;if(1==o.length)this.arcFill=o[0];else if(o.length>1){for(var l=s.gradientAngle||0,c=s.gradientDirection||[a/2*(1-Math.cos(l)),a/2*(1+Math.sin(l)),a/2*(1+Math.cos(l)),a/2*(1-Math.sin(l))],u=r.createLinearGradient.apply(r,c),h=0;h<o.length;h++){var f=o[h],d=h/(o.length-1);t.isArray(f)&&(d=f[1],f=f[0]),u.addColorStop(d,f)}this.arcFill=u}}s.image&&(s.image instanceof Image?i=s.image:(i=new Image).src=s.image,i.complete?e():i.onload=e)},draw:function(){this.animation?this.drawAnimated(this.value):this.drawFrame(this.value)},drawFrame:function(t){this.lastFrameValue=t,this.ctx.clearRect(0,0,this.size,this.size),this.drawEmptyArc(t),this.drawArc(t)},drawArc:function(t){if(0!==t){var e=this.ctx,i=this.radius,n=this.getThickness(),s=this.startAngle;e.save(),e.beginPath(),this.reverse?e.arc(i,i,i-n/2,s-2*Math.PI*t,s):e.arc(i,i,i-n/2,s,s+2*Math.PI*t),e.lineWidth=n,e.lineCap=this.lineCap,e.strokeStyle=this.arcFill,e.stroke(),e.restore()}},drawEmptyArc:function(t){var e=this.ctx,i=this.radius,n=this.getThickness(),s=this.startAngle;t<1&&(e.save(),e.beginPath(),t<=0?e.arc(i,i,i-n/2,0,2*Math.PI):this.reverse?e.arc(i,i,i-n/2,s,s-2*Math.PI*t):e.arc(i,i,i-n/2,s+2*Math.PI*t,s),e.lineWidth=n,e.strokeStyle=this.emptyFill,e.stroke(),e.restore())},drawAnimated:function(e){var i=this,n=this.el,s=t(this.canvas);s.stop(!0,!1),n.trigger("circle-animation-start"),s.css({animationProgress:0}).animate({animationProgress:1},t.extend({},this.animation,{step:function(t){var s=i.animationStartValue*(1-t)+e*t;i.drawFrame(s),n.trigger("circle-animation-progress",[t,s])}})).promise().always(function(){n.trigger("circle-animation-end")})},getThickness:function(){return t.isNumeric(this.thickness)?this.thickness:this.size/14},getValue:function(){return this.value},setValue:function(t){this.animation&&(this.animationStartValue=this.lastFrameValue),this.value=t,this.draw()}},t.circleProgress={defaults:e.prototype},t.easing.circleProgressEasing=function(t){return t<.5?.5*(t*=2)*t*t:1-.5*(t=2-2*t)*t*t},t.fn.circleProgress=function(i,n){var s="circle-progress",r=this.data(s);if("widget"==i){if(!r)throw Error('Calling "widget" method on not initialized instance is forbidden');return r.canvas}if("value"==i){if(!r)throw Error('Calling "value" method on not initialized instance is forbidden');if(void 0===n)return r.getValue();var a=arguments[1];return this.each(function(){t(this).data(s).setValue(a)})}return this.each(function(){var n=t(this),r=n.data(s),a=t.isPlainObject(i)?i:{};if(r)r.init(a);else{var o=t.extend({},n.data());"string"==typeof o.fill&&(o.fill=JSON.parse(o.fill)),"string"==typeof o.animation&&(o.animation=JSON.parse(o.animation)),(a=t.extend(o,a)).el=n,r=new e(a),n.data(s,r)}})}});