| Current Path : /home/pteabiscqq/www/libraries/quix/assets/js/ |
| Current File : /home/pteabiscqq/www/libraries/quix/assets/js/parallax.js |
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquery")):"function"==typeof define&&define.amd?define("uikit",["jquery"],e):t.qxUIkit=e(t.jQuery)}(this,function(t){"use strict";function e(){return"complete"===document.readyState||"loading"!==document.readyState&&!qt.doScroll}function n(t){var n=function(){o(document,"DOMContentLoaded",n),o(window,"load",n),t()};e()?t():(i(document,"DOMContentLoaded",n),i(window,"load",n))}function i(t,e,n,i){void 0===i&&(i=!1),e.split(" ").forEach(function(e){return R(t).addEventListener(e,n,i)})}function o(t,e,n,i){void 0===i&&(i=!1),e.split(" ").forEach(function(e){return R(t).removeEventListener(e,n,i)})}function r(t,e,n,r,s){e.split(" ").forEach(function(e){var a=function(i){var u=!s||s(i);u&&(o(t,e,a,r),n(D(u)?i:u))};i(t,e,a,r)})}function s(t,e){var n=p(e);return R(t).dispatchEvent(n),n}function a(e,n,i,o){void 0===o&&(o=!1);var r=t.Event(n);return Mt(e)[o?"triggerHandler":"trigger"](r,i),r}function u(t,e,n,i){return void 0===n&&(n=400),void 0===i&&(i="linear"),k(function(o,r){t=Mt(t);for(var s in e)t.css(s,t.css(s));var a=setTimeout(function(){return t.trigger(oe)},n);t.one(oe,function(e,n){clearTimeout(a),t.removeClass("qx-transition").css("transition",""),n?r():o()}).addClass("qx-transition").css("transition","all "+n+"ms "+i).css(e)})}function c(t,e,n,i,o){void 0===n&&(n=200);var r=k(function(s){function a(){t.css("animation-duration","").removeClass(u+" "+e)}var u=o?"qx-animation-leave":"qx-animation-enter";t=Mt(t),0===e.lastIndexOf("qx-animation-",0)&&(i&&(e+=" qx-animation-"+i),o&&(e+=" qx-animation-reverse")),a(),t.one(se||"animationend",function(t){t.promise=r,r.then(a),s()}).css("animation-duration",n+"ms").addClass(e).addClass(u),se||Xt(function(){return Ft.cancel(t)})});return r}function l(t){return t instanceof Mt}function f(t,e){return t=Mt(t),!!t.is(e)||(I(e)?t.parents(e).length:R(e).contains(t[0]))}function h(t,e,n,i){return t=Mt(t),t.attr(e,function(t,e){return e?e.replace(n,i):e})}function d(t,e){return h(t,"class",new RegExp("(^|\\s)"+e+"(?!\\S)","g"),"")}function p(t,e,n,i){if(void 0===e&&(e=!0),void 0===n&&(n=!1),void 0===i&&(i=!1),I(t)){var o=document.createEvent("Event");o.initEvent(t,e,n),t=o}return i&&Wt(t,i),t}function m(t,e,n){void 0===e&&(e=0),void 0===n&&(n=0);var i=R(t).getBoundingClientRect();return i.bottom>=-1*e&&i.right>=-1*n&&i.top<=window.innerHeight+e&&i.left<=window.innerWidth+n}function g(t){t=R(t);var e=t.offsetHeight,n=v(t),i=window.innerHeight,o=i+Math.min(0,n-i),r=Math.max(0,i-(y()-(n+e)));return J((o+window.pageYOffset-n)/((o+(e-(r<i?r:0)))/100)/100)}function v(t){var e=0;do e+=t.offsetTop;while(t=t.offsetParent);return e}function y(){return Math.max(qt.offsetHeight,qt.scrollHeight)}function b(t,e,n){void 0===n&&(n=0),e=Mt(e);var i=Mt(e).length;return t=(j(t)?t:"next"===t?n+1:"previous"===t?n-1:I(t)?parseInt(t,10):e.index(t))%i,t<0?t+i:t}function w(t){return Ht[R(t).tagName.toLowerCase()]}function _(t,e){var n=H(t);return n?n.reduce(function(t,e){return L(e,t)},e):L(t)}function x(){var t=setTimeout(function(){return s(Dt,"click")},0);r(Dt,"click",function(e){e.preventDefault(),e.stopImmediatePropagation(),clearTimeout(t)},!0)}function $(t,e){t=R(t);for(var n=0,i=[e,"data-"+e];n<i.length;n++)if(t.hasAttribute(i[n]))return t.getAttribute(i[n])}function E(t,e){return function(n){var i=arguments.length;return i?i>1?t.apply(e,arguments):t.call(e,n):t.call(e)}}function C(t,e){return Rt.call(t,e)}function k(t){if(Gt)return new Promise(t);var e=Mt.Deferred();return t(e.resolve,e.reject),e}function O(t){return t.replace(/(?:^|[-_\/])(\w)/g,function(t,e){return e?e.toUpperCase():""})}function T(t){return t.replace(/([a-z\d])([A-Z])/g,"$1-$2").toLowerCase()}function P(t){return t.replace(Bt,N)}function N(t,e){return e?e.toUpperCase():""}function M(t){return"function"==typeof t}function q(t){return null!==t&&"object"==typeof t}function A(t){return q(t)&&Object.getPrototypeOf(t)===Object.prototype}function D(t){return"boolean"==typeof t}function I(t){return"string"==typeof t}function j(t){return"number"==typeof t}function S(t){return void 0===t}function F(t){return I(t)&&t.match(/^[!>+-]/)}function H(t){return F(t)&&t.split(/(?=\s[!>+-])/g).map(function(t){return t.trim()})}function L(t,e){if(t===!0)return null;try{if(e&&F(t)&&">"!==t[0]){var n=zt[t[0]],i=t.substr(1);e=Mt(e),"closest"===n&&(e=e.parent(),i=i||"*"),t=e[n](i)}else t=Mt(t,e)}catch(o){return null}return t.length?t:null}function R(t){return t&&(l(t)?t[0]:t)}function B(t){return D(t)?t:"true"===t||"1"===t||""===t||"false"!==t&&"0"!==t&&t}function U(t){var e=Number(t);return!isNaN(e)&&e}function z(e){return Ut(e)?e:I(e)?e.split(",").map(function(e){return t.isNumeric(e)?U(e):B(e.trim())}):[e]}function V(t){if(I(t))if("@"===t[0]){var e="media-"+t.substr(1);t=Vt[e]||(Vt[e]=parseFloat(K(e)))}else if(t.match(/^\(min-width:/))return t;return!(!t||isNaN(t))&&"(min-width: "+t+"px)"}function W(t,e,n){return t===Boolean?B(e):t===Number?U(e):"jQuery"===t?_(e,n):"list"===t?z(e):"media"===t?V(e):t?t(e):e}function Y(t){return t?"ms"===t.substr(-2)?parseFloat(t):1e3*parseFloat(t):0}function X(t,e,n){return t.replace(new RegExp(e+"|"+n,"mg"),function(t){return t===e?n:e})}function J(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=1),Math.min(Math.max(t,e),n)}function Q(){}function G(t,e,n){return(window.getComputedStyle(R(t),n)||{})[e]}function K(t){var e,n=document.documentElement,i=n.appendChild(document.createElement("div"));i.classList.add("var-"+t);try{e=G(i,"content",":before").replace(/^["'](.*)["']$/,"$1"),e=JSON.parse(e)}catch(o){}return n.removeChild(i),e||void 0}function Z(t){return k(function(e,n){var i=new Image;i.onerror=n,i.onload=function(){return e(i)},i.src=t})}function tt(t,e){var n,i=O(t),o=O(e).toLowerCase(),r=O(e),s=document.body||document.documentElement,a=(n={},n["Webkit"+i]="webkit"+r,n["Moz"+i]=o,n["o"+i]="o"+r+" o"+o,n[t]=o,n);for(t in a)if(void 0!==s.style[t])return a[t]}function et(){ae.scheduled||(ae.scheduled=!0,Xt(ae.flush.bind(ae)))}function nt(t){for(var e;e=t.shift();)e()}function it(t,e){var n=t.indexOf(e);return!!~n&&!!t.splice(n,1)}function ot(){}function rt(t,e){return(e.y-t.y)/(e.x-t.x)}function st(t,e){function n(n){o[n]=(ue[n]||ce)(t[n],e[n])}var i,o={};if(e.mixins)for(var r=0,s=e.mixins.length;r<s;r++)t=st(t,e.mixins[r]);for(i in t)n(i);for(i in e)C(t,i)||n(i);return o}function at(t,e){t.contentWindow.postMessage(JSON.stringify(Wt({event:"command"},e)),"*")}function ut(t){return k(function(e){r(window,"message",function(t){return e(t)},!1,function(e){var n=e.data;if(n&&I(n)){try{n=JSON.parse(n)}catch(i){return}return n&&t(n)}})})}function ct(e,n,i,o,r,s,a,u){i=pt(i),o=pt(o);var c={element:i,target:o};if(!e)return c;var l=lt(e),f=lt(n),h=f;return dt(h,i,l,-1),dt(h,o,f,1),r=mt(r,l.width,l.height),s=mt(s,f.width,f.height),r.x+=s.x,r.y+=s.y,h.left+=r.x,h.top+=r.y,u=lt(u||window),a&&t.each(ve,function(t,e){function n(e,n){var i=h[d]+e+n-2*r[t];if(i>=u[d]&&i+l[s]<=u[p])return h[d]=i,["element","target"].forEach(function(n){c[n][t]=e?c[n][t]===ve[t][1]?ve[t][2]:ve[t][1]:c[n][t]}),!0}var s=e[0],d=e[1],p=e[2];if(a===!0||~a.indexOf(t)){var m=i[t]===d?-l[s]:i[t]===p?l[s]:0,g=o[t]===d?f[s]:o[t]===p?-f[s]:0;if(h[d]<u[d]||h[d]+l[s]>u[p]){var v=l[s]/2,y="center"===o[t]?-f[s]/2:0;"center"===i[t]&&(n(v,y)||n(-v,-y))||n(m,g)}}}),Mt(e).offset({left:h.left,top:h.top}),c}function lt(t){t=R(t);var e=ht(t),n=e.pageYOffset,i=e.pageXOffset;if(!t.ownerDocument)return{top:n,left:i,height:e.innerHeight,width:e.innerWidth,bottom:n+e.innerHeight,right:i+e.innerWidth};var o=!1;t.offsetHeight||(o=t.style.display,t.style.display="block");var r=t.getBoundingClientRect();return o!==!1&&(t.style.display=o),{height:r.height,width:r.width,top:r.top+n,left:r.left+i,bottom:r.bottom+n,right:r.right+i}}function ft(t){return t=R(t),t.getBoundingClientRect().top+ht(t).pageYOffset}function ht(t){return t&&t.ownerDocument?t.ownerDocument.defaultView:window}function dt(e,n,i,o){t.each(ve,function(t,r){var s=r[0],a=r[1],u=r[2];n[t]===u?e[a]+=i[s]*o:"center"===n[t]&&(e[a]+=i[s]*o/2)})}function pt(t){var e=/left|center|right/,n=/top|center|bottom/;return t=(t||"").split(" "),1===t.length&&(t=e.test(t[0])?t.concat(["center"]):n.test(t[0])?["center"].concat(t):["center","center"]),{x:e.test(t[0])?t[0]:"center",y:n.test(t[1])?t[1]:"center"}}function mt(t,e,n){return t=(t||"").split(" "),{x:t[0]?parseFloat(t[0])*("%"===t[0][t[0].length-1]?e/100:1):0,y:t[1]?parseFloat(t[1])*("%"===t[1][t[1].length-1]?n/100:1):0}}function gt(t){switch(t){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";default:return t}}function vt(t,e,n,i){return Math.abs(t-e)>=Math.abs(n-i)?t-e>0?"Left":"Right":n-i>0?"Up":"Down"}function yt(){he&&clearTimeout(he),de&&clearTimeout(de),pe&&clearTimeout(pe),he=de=pe=null,ye={}}function bt(t){return be||"touch"===(t.originalEvent||t).pointerType}function wt(t){function e(t){return new Function("return function "+O(t)+" (options) { this._init(options); }")()}function n(t,e){if(t.nodeType===Node.ELEMENT_NODE)for(e(t),t=t.firstChild;t;)n(t,e),t=t.nextSibling}function i(t,e){if(t)for(var n in t)t[n]._isReady&&t[n]._callUpdate(e)}var o=t.data;t.use=function(t){if(!t.installed)return t.call(null,this),t.installed=!0,this},t.mixin=function(e,n){n=(I(n)?t.components[n]:n)||this,e=st({},e),e.mixins=n.options.mixins,delete n.options.mixins,n.options=st(e,n.options)},t.extend=function(t){t=t||{};var n=this,i=t.name||n.options.name,o=e(i||"qxUIkitComponent");return o.prototype=Object.create(n.prototype),o.prototype.constructor=o,o.options=st(n.options,t),o["super"]=n,o.extend=n.extend,o},t.update=function(e,r,s){if(void 0===s&&(s=!1),e=p(e||"update"),!r)return void i(t.instances,e);if(r=R(r),s){do i(r[o],e),r=r.parentNode;while(r)}else n(r,function(t){return i(t[o],e)})};var r;Object.defineProperty(t,"container",{get:function(){return r||document.body},set:function(t){r=t}})}function _t(t){t.prototype._callHook=function(t){var e=this,n=this.$options[t];n&&n.forEach(function(t){return t.call(e)})},t.prototype._callReady=function(){this._isReady||(this._isReady=!0,this._callHook("ready"),this._callUpdate())},t.prototype._callConnected=function(){var e=this;this._connected||(~t.elements.indexOf(this.$options.el)||t.elements.push(this.$options.el),t.instances[this._uid]=this,this._initEvents(),this._callHook("connected"),this._connected=!0,this._initObserver(),this._isReady||n(function(){return e._callReady()}),this._callUpdate())},t.prototype._callDisconnected=function(){if(this._connected){this._observer&&(this._observer.disconnect(),this._observer=null);var e=t.elements.indexOf(this.$options.el);~e&&t.elements.splice(e,1),delete t.instances[this._uid],this._initEvents(!0),this._callHook("disconnected"),this._connected=!1}},t.prototype._callUpdate=function(t){var e=this;t=p(t||"update"),"update"===t.type&&(this._computeds={});var n=this.$options.update;n&&n.forEach(function(n,i){("update"===t.type||n.events&&~n.events.indexOf(t.type))&&(n.read&&!~ae.reads.indexOf(e._frames.reads[i])&&(e._frames.reads[i]=ae.measure(function(){n.read.call(e,t),delete e._frames.reads[i]})),n.write&&!~ae.writes.indexOf(e._frames.writes[i])&&(e._frames.writes[i]=ae.mutate(function(){n.write.call(e,t),delete e._frames.writes[i]})))})}}function xt(t){function e(t,e,n){Object.defineProperty(t,e,{enumerable:!0,get:function(){return C(t._computeds,e)||(t._computeds[e]=n.call(t)),t._computeds[e]},set:function(n){t._computeds[e]=n}})}function n(t,e,n,o){A(n)||(n={name:o,handler:n});var r=n.name,s=n.el,a=n.delegate,u=n.self,c=n.filter,l=n.handler,f="."+t.$options.name+"."+t._uid;if(s=s&&s.call(t)||t.$el,r=r.split(" ").map(function(t){return t+"."+f}).join(" "),e)s.off(r);else{if(c&&!c.call(t))return;l=I(l)?t[l]:E(l,t),u&&(l=i(l,t)),a?s.on(r,I(a)?a:a.call(t),l):s.on(r,l)}}function i(t,e){return function(n){if(n.target===n.currentTarget)return t.call(e,n)}}function o(t,e){return t.every(function(t){return!t||!C(t,e)})}function r(t,e){return S(t)||t===e||l(t)&&l(e)&&t.is(e)}var s=0;t.prototype.props={},t.prototype._init=function(e){e=e||{},e=this.$options=st(this.constructor.options,e,this),this.$el=null,this.$name=t.prefix+T(this.$options.name),this.$props={},this._frames={reads:{},writes:{}},this._uid=s++,this._initData(),this._initMethods(),this._initComputeds(),this._callHook("created"),e.el&&this.$mount(e.el)},t.prototype._initData=function(){var t=this,e=this.$options,n=e.defaults,i=e.data;void 0===i&&(i={});var o=e.args;void 0===o&&(o=[]);var r=e.props;void 0===r&&(r={});var s=e.el;o.length&&Ut(i)&&(i=i.slice(0,o.length).reduce(function(t,e,n){return A(e)?Wt(t,e):t[o[n]]=e,t},{}));for(var a in n)t.$props[a]=t[a]=C(i,a)&&!S(i[a])?W(r[a],i[a],s):Ut(n[a])?n[a].concat():n[a]},t.prototype._initMethods=function(){var t=this,e=this.$options.methods;if(e)for(var n in e)t[n]=E(e[n],t)},t.prototype._initComputeds=function(){var t=this,n=this.$options.computed;if(this._computeds={},n)for(var i in n)e(t,i,n[i])},t.prototype._initProps=function(t){var e=this;this._computeds={},Wt(this.$props,t||this._getProps());var n=[this.$options.computed,this.$options.methods];for(var i in e.$props)o(n,i)&&(e[i]=e.$props[i])},t.prototype._initEvents=function(t){var e=this,i=this.$options.events;i&&i.forEach(function(i){if(C(i,"handler"))n(e,t,i);else for(var o in i)n(e,t,i[o],o)})},t.prototype._initObserver=function(){var t=this,e=this.$options,n=e.attrs,i=e.props,o=e.el;!this._observer&&i&&n&&Yt&&(n=Ut(n)?n:Object.keys(i).map(function(t){return T(t)}),this._observer=new Yt(function(){var e=t._getProps();n.some(function(n){return!r(e[n],t.$props[n])})&&t.$reset(e)}),this._observer.observe(o,{attributes:!0,attributeFilter:n.concat([this.$name,"data-"+this.$name])}))},t.prototype._getProps=function(){var t={},e=this.$options,n=e.args;void 0===n&&(n=[]);var i=e.props;void 0===i&&(i={});var o,r,s=e.el,a=$(s,this.$name);if(!i)return t;for(o in i)if(r=T(o),s.hasAttribute(r)){var u=W(i[o],s.getAttribute(r),s);if("target"===r&&(!u||0===u.lastIndexOf("_",0)))continue;t[o]=u}if(!a)return t;if("{"===a[0])try{a=JSON.parse(a)}catch(c){console.warn("Invalid JSON."),a={}}else if(n.length&&!~a.indexOf(":")){l={},l[n[0]]=a,a=l;var l}else{var f={};a.split(";").forEach(function(t){var e=t.split(/:(.+)/),n=e[0],i=e[1];n&&i&&(f[n.trim()]=i.trim())}),a=f}for(o in a||{})r=P(o),void 0!==i[r]&&(t[r]=W(i[r],a[o],s));return t}}function $t(t){var e=t.data;t.prototype.$mount=function(t){var n=this.$options.name;t[e]||(t[e]={}),t[e][n]||(t[e][n]=this,this.$options.el=this.$options.el||t,this.$el=Mt(t),this._initProps(),this._callHook("init"),document.documentElement.contains(t)&&this._callConnected())},t.prototype.$emit=function(t){this._callUpdate(t)},t.prototype.$update=function(e,n){t.update(e,this.$options.el,n)},t.prototype.$reset=function(t){this._callDisconnected(),this._initProps(t),this._callConnected()},t.prototype.$destroy=function(t){void 0===t&&(t=!1);var n=this.$options,i=n.el,o=n.name;i&&this._callDisconnected(),this._callHook("destroy"),i&&i[e]&&(delete i[e][o],Object.keys(i[e]).length||delete i[e],t&&this.$el.remove())}}function Et(t){var e=t.data;t.components={},t.component=function(e,n){var i=P(e);if(A(n))n.name=i,n=t.extend(n);else{if(S(n))return t.components[i];n.options.name=i}return t.components[i]=n,t[i]=function(e,n){function o(e){return t.getComponent(e,i)||new t.components[i]({el:e,data:n||{}})}for(var r=arguments.length,s=Array(r);r--;)s[r]=arguments[r];return A(e)?new t.components[i]({data:e}):t.components[i].options.functional?new t.components[i]({data:[].concat(s)}):e&&e.nodeType?o(e):Mt(e).toArray().map(o)[0]},t._initialized&&!n.options.functional&&ae.measure(function(){return t[i]("[qx-"+e+"],[data-qx-"+e+"]")}),t.components[i]},t.getComponents=function(t){return t&&(t=l(t)?t[0]:t)&&t[e]||{}},t.getComponent=function(e,n){return t.getComponents(e)[n]},t.connect=function(n){var i;if(n[e])for(i in n[e])n[e][i]._callConnected();for(var o=0;o<n.attributes.length;o++)i=n.attributes[o].name,0!==i.lastIndexOf("qx-",0)&&0!==i.lastIndexOf("data-qx-",0)||(i=P(i.replace("data-qx-","").replace("qx-","")),t[i]&&t[i](n))},t.disconnect=function(t){for(var n in t[e])t[e][n]._callDisconnected()}}function Ct(t){function e(t,e,i){(e=n(e,t))&&(we?e[0][i].apply(e[0],e.slice(1)):e.slice(1).forEach(function(t){return e[0][i](t)}))}function n(t,e){return I(t[0])&&t.unshift(e),t[0]=R(t[0]).classList,t.forEach(function(e,n){return n>0&&I(e)&&~e.indexOf(" ")&&Array.prototype.splice.apply(t,[n,1].concat(t[n].split(" ")))}),!!(t[1]&&t.length>1)&&t}t.prototype.$addClass=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];e(this.$options.el,t,"add")},t.prototype.$removeClass=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];e(this.$options.el,t,"remove")},t.prototype.$hasClass=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return(t=n(t,this.$options.el))&&t[0].contains(t[1])},t.prototype.$toggleClass=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];t=n(t,this.$options.el);for(var i=t&&!I(t[t.length-1])?t.pop():void 0,o=1;o<t.length;o++)t[0]&&_e?t[0].toggle(t[o],i):t[0][(S(i)?!t[0].contains(t[o]):i)?"add":"remove"](t[o])}}function kt(t){Dt.on((e={},e["click."+t]=function(t){Ee&&Ee.bgClose&&!t.isDefaultPrevented()&&!f(t.target,Ee.panel)&&Ee.hide()},e["keydown."+t]=function(t){27===t.keyCode&&Ee&&Ee.escClose&&(t.preventDefault(),Ee.hide())},e));var e}function Ot(t){Dt.off("click."+t).off("keydown."+t)}function Tt(t){t.mixin["class"]=Ce,t.mixin.modal=Oe,t.mixin.position=Te,t.mixin.togglable=ke}function Pt(t){var e=0,n=0;i(window,"load resize",t.update),i(window,"scroll",function(n){n.dir=e<window.pageYOffset?"down":"up",e=window.pageYOffset,t.update(n),ae.flush()}),i(document,re,function(t){var e=t.target;(G(e,"animationName")||"").match(/^qx-.*(left|right)/)&&(n++,document.body.style.overflowX="hidden",setTimeout(function(){--n||(document.body.style.overflowX="")},Y(G(e,"animationDuration"))+100))},!0)}function Nt(t){function e(){o(document.body,s),ae.flush(),new Yt(function(e){return e.forEach(function(e){for(var n=e.addedNodes,i=e.removedNodes,r=e.target,u=0;u<n.length;u++)o(n[u],s);for(u=0;u<i.length;u++)o(i[u],a);t.update("update",r,!0)})}).observe(r,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["href"]}),t._initialized=!0}function o(t,e){if(t.nodeType===Node.ELEMENT_NODE&&!t.hasAttribute("qx-no-boot"))for(e(t),t=t.firstChild;t;){var n=t.nextSibling;o(t,e),t=n}}var r=document.documentElement,s=t.connect,a=t.disconnect;Yt?document.body?e():new Yt(function(){document.body&&(this.disconnect(),e())}).observe(r,{childList:!0,subtree:!0}):n(function(){o(document.body,s),i(r,"DOMNodeInserted",function(t){return o(t.target,s)}),i(r,"DOMNodeRemoved",function(t){return o(t.target,a)})})}var Mt="default"in t?t["default"]:t,qt=document.documentElement,At=Mt(window),Dt=Mt(document),It=Mt(qt),jt="rtl"===qt.getAttribute("dir"),St={start:u,stop:function(t,e){return a(t,oe,[e],!0),k.resolve()},cancel:function(t){return this.stop(t,!0)},inProgress:function(t){return Mt(t).hasClass("qx-transition")}},Ft={"in":function(t,e,n,i){return c(t,e,n,i,!1)},out:function(t,e,n,i){return c(t,e,n,i,!0)},inProgress:function(t){return Mt(t).hasClass("qx-animation-enter")||Mt(t).hasClass("qx-animation-leave")},cancel:function(t){var e=a(t,se||"animationend",null,!0);return e.promise||k.resolve()}},Ht={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,menuitem:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Lt={ratio:function(t,e,n){var i="width"===e?"height":"width";return o={},o[i]=Math.round(n*t[i]/t[e]),o[e]=n,o;var o},contain:function(e,n){var i=this;return e=Wt({},e),t.each(e,function(t){return e=e[t]>n[t]?i.ratio(e,t,n[t]):e}),e},cover:function(e,n){var i=this;return e=this.contain(e,n),t.each(e,function(t){return e=e[t]<n[t]?i.ratio(e,t,n[t]):e}),e}},Rt=Object.prototype.hasOwnProperty;k.resolve=function(t){return k(function(e){e(t)})},k.reject=function(t){return k(function(e,n){n(t)})},k.all=function(t){return Gt?Promise.all(t):Mt.when.apply(Mt,t)};var Bt=/-(\w)/g,Ut=Array.isArray,zt={"!":"closest","+":"nextAll","-":"prevAll"},Vt={},Wt=Object.assign||function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];t=Object(t);for(var i=0;i<e.length;i++){var o=e[i];if(null!==o)for(var r in o)C(o,r)&&(t[r]=o[r])}return t},Yt=window.MutationObserver||window.WebKitMutationObserver,Xt=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},Jt="ontouchstart"in window,Qt=window.PointerEvent,Gt="Promise"in window,Kt="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch||navigator.msPointerEnabled&&navigator.msMaxTouchPoints||navigator.pointerEnabled&&navigator.maxTouchPoints,Zt=Kt?"mousedown "+(Jt?"touchstart":"pointerdown"):"mousedown",te=Kt?"mousemove "+(Jt?"touchmove":"pointermove"):"mousemove",ee=Kt?"mouseup "+(Jt?"touchend":"pointerup"):"mouseup",ne=Kt&&Qt?"pointerenter":"mouseenter",ie=Kt&&Qt?"pointerleave":"mouseleave",oe=tt("transition","transition-end"),re=tt("animation","animation-start"),se=tt("animation","animation-end"),ae={reads:[],writes:[],measure:function(t){return this.reads.push(t),et(),t},mutate:function(t){return this.writes.push(t),et(),t},clear:function(t){return it(this.reads,t)||it(this.writes,t)},flush:function(){nt(this.reads),nt(this.writes.splice(0,this.writes.length)),this.scheduled=!1,(this.reads.length||this.writes.length)&&et()}};ot.prototype={positions:[],position:null,init:function(){var t=this;this.positions=[],this.position=null;var e=!1;this.handler=function(n){e||setTimeout(function(){var i=Date.now(),o=t.positions.length;o&&i-t.positions[o-1].time>100&&t.positions.splice(0,o),t.positions.push({time:i,x:n.pageX,y:n.pageY}),t.positions.length>5&&t.positions.shift(),e=!1},5),e=!0},Dt.on("mousemove",this.handler)},cancel:function(){this.handler&&Dt.off("mousemove",this.handler)},movesTo:function(t){if(this.positions.length<2)return!1;var e=lt(t),n=this.positions[this.positions.length-1],i=this.positions[0];if(e.left<=n.x&&n.x<=e.right&&e.top<=n.y&&n.y<=e.bottom)return!1;var o=[[{x:e.left,y:e.top},{x:e.right,y:e.bottom}],[{x:e.right,y:e.top},{x:e.left,y:e.bottom}]];return e.right<=n.x||(e.left>=n.x?(o[0].reverse(),o[1].reverse()):e.bottom<=n.y?o[0].reverse():e.top>=n.y&&o[1].reverse()),!!o.reduce(function(t,e){return t+(rt(i,e[0])<rt(n,e[0])&&rt(i,e[1])>rt(n,e[1]))},0)}};var ue={};ue.args=ue.created=ue.events=ue.init=ue.ready=ue.connected=ue.disconnected=ue.destroy=function(t,e){return t=t&&!Ut(t)?[t]:t,e?t?t.concat(e):Ut(e)?e:[e]:t},ue.update=function(t,e){return ue.args(t,M(e)?{read:e}:e)},ue.props=function(t,e){return Ut(e)&&(e=e.reduce(function(t,e){return t[e]=String,t},{})),ue.methods(t,e)},ue.computed=ue.defaults=ue.methods=function(t,e){return e?t?Wt({},t,e):e:t};var ce=function(t,e){return S(e)?t:e},le=0,fe=function(t){this.id=++le,this.el=R(t)};fe.prototype.isVideo=function(){return this.isYoutube()||this.isVimeo()||this.isHTML5()},fe.prototype.isHTML5=function(){return"VIDEO"===this.el.tagName},fe.prototype.isIFrame=function(){return"IFRAME"===this.el.tagName},fe.prototype.isYoutube=function(){return this.isIFrame()&&!!this.el.src.match(/\/\/.*?youtube\.[a-z]+\/(watch\?v=[^&\s]+|embed)|youtu\.be\/.*/)},fe.prototype.isVimeo=function(){return this.isIFrame()&&!!this.el.src.match(/vimeo\.com\/video\/.*/)},fe.prototype.enableApi=function(){var t=this;if(this.ready)return this.ready;var e,n=this.isYoutube(),i=this.isVimeo();return n||i?this.ready=k(function(o){r(t.el,"load",function(){if(n){var i=function(){return at(t.el,{event:"listening",id:t.id})};e=setInterval(i,100),i()}}),ut(function(e){return n&&e.id===t.id&&"onReady"===e.event||i&&Number(e.player_id)===t.id}).then(function(){o(),e&&clearInterval(e)}),t.el.setAttribute("src",""+t.el.src+(~t.el.src.indexOf("?")?"&":"?")+(n?"enablejsapi=1":"api=1&player_id="+le))}):k.resolve()},fe.prototype.play=function(){var t=this;this.isVideo()&&(this.isIFrame()?this.enableApi().then(function(){return at(t.el,{func:"playVideo",method:"play"})}):this.isHTML5()&&this.el.play())},fe.prototype.pause=function(){var t=this;this.isVideo()&&(this.isIFrame()?this.enableApi().then(function(){return at(t.el,{func:"pauseVideo",method:"pause"})}):this.isHTML5()&&this.el.pause())},fe.prototype.mute=function(){var t=this;this.isVideo()&&(this.isIFrame()?this.enableApi().then(function(){return at(t.el,{func:"mute",method:"setVolume",value:0})}):this.isHTML5()&&this.el.setAttribute("muted",""))};var he,de,pe,me,ge,ve={x:["width","left","right"],y:["height","top","bottom"]},ye={};n(function(){var e,n,o=0,r=0;"MSGesture"in window&&(me=new MSGesture,me.target=document.body),i(document,"click",function(){return ge=!0},!0),i(document,"MSGestureEnd gestureend",function(t){var e=t.velocityX>1?"Right":t.velocityX<-1?"Left":t.velocityY>1?"Down":t.velocityY<-1?"Up":null;e&&void 0!==ye.el&&(ye.el.trigger("swipe"),ye.el.trigger("swipe"+e))}),i(document,Zt,function(t){var i=t.touches?t.touches[0]:t,o=i.target,r=i.pageX,s=i.pageY;e=Date.now(),n=e-(ye.last||e),ye.el=Mt("tagName"in o?o:o.parentNode),he&&clearTimeout(he),ye.x1=r,ye.y1=s,n>0&&n<=250&&(ye.isDoubleTap=!0),ye.last=e,!me||"pointerdown"!==t.type&&"touchstart"!==t.type||me.addPointer(t.pointerId),ge=t.button>0}),i(document,te,function(t){var e=t.touches?t.touches[0]:t,n=e.pageX,i=e.pageY;ye.x2=n,ye.y2=i,o+=Math.abs(ye.x1-ye.x2),r+=Math.abs(ye.y1-ye.y2)}),i(document,ee,function(){ye.x2&&Math.abs(ye.x1-ye.x2)>30||ye.y2&&Math.abs(ye.y1-ye.y2)>30?pe=setTimeout(function(){void 0!==ye.el&&(ye.el.trigger("swipe"),ye.el.trigger("swipe"+vt(ye.x1,ye.x2,ye.y1,ye.y2))),ye={}}):"last"in ye&&(isNaN(o)||o<30&&r<30?de=setTimeout(function(){var e=t.Event("tap");e.cancelTouch=yt,void 0!==ye.el&&ye.el.trigger(e),ye.isDoubleTap?(void 0!==ye.el&&ye.el.trigger("doubleTap"),ye={}):he=setTimeout(function(){he=null,void 0!==ye.el&&(ye.el.trigger("singleTap"),ge||ye.el.trigger("click")),ye={}},350)}):ye={},o=r=0)}),i(document,"touchcancel",yt),i(window,"scroll",yt)});var be=!1;i(document,"touchstart",function(){return be=!0},!0),i(document,"click",function(){be=!1}),i(document,"touchcancel",function(){return be=!1},!0);var we,_e,xe=Object.freeze({win:At,doc:Dt,docElement:It,isRtl:jt,isReady:e,ready:n,on:i,off:o,one:r,trigger:s,$trigger:a,transition:u,Transition:St,animate:c,Animation:Ft,isJQuery:l,isWithin:f,attrFilter:h,removeClass:d,createEvent:p,isInView:m,scrolledOver:g,docHeight:y,getIndex:b,isVoidElement:w,Dimensions:Lt,query:_,preventClick:x,getData:$,Observer:Yt,requestAnimationFrame:Xt,hasPromise:Gt,hasTouch:Kt,pointerDown:Zt,pointerMove:te,pointerUp:ee,pointerEnter:ne,pointerLeave:ie,transitionend:oe,animationstart:re,animationend:se,getStyle:G,getCssVar:K,getImage:Z,fastdom:ae,$:Mt,bind:E,hasOwn:C,promise:k,classify:O,hyphenate:T,camelize:P,isArray:Ut,isFunction:M,isObject:q,isPlainObject:A,isBoolean:D,isString:I,isNumber:j,isUndefined:S,isContextSelector:F,getContextSelectors:H,toJQuery:L,toNode:R,toBoolean:B,toNumber:U,toList:z,toMedia:V,coerce:W,toMs:Y,swap:X,assign:Wt,clamp:J,noop:Q,ajax:t.ajax,each:t.each,Event:t.Event,isNumeric:t.isNumeric,MouseTracker:ot,mergeOptions:st,Player:fe,position:ct,getDimensions:lt,offsetTop:ft,flipPosition:gt,isTouch:bt});!function(){var t=document.createElement("_").classList;t.add("a","b"),t.toggle("c",!1),we=t.contains("b"),_e=!t.contains("c"),t=null}();var $e=function(t){this._init(t)};$e.util=xe,$e.data="__uikit__",$e.prefix="qx-",$e.options={},$e.instances={},$e.elements=[],wt($e),_t($e),xt($e),$t($e),Et($e),Ct($e);var Ee,Ce={init:function(){this.$addClass(this.$name)}},ke={props:{cls:Boolean,animation:"list",duration:Number,origin:String,transition:String,queued:Boolean},defaults:{cls:!1,animation:[!1],duration:200,origin:!1,transition:"linear",queued:!1,initProps:{overflow:"",height:"",paddingTop:"",paddingBottom:"",marginTop:"",marginBottom:""},hideProps:{overflow:"hidden",height:0,paddingTop:0,paddingBottom:0,marginTop:0,marginBottom:0}},computed:{hasAnimation:function(){return!!this.animation[0]},hasTransition:function(){return this.hasAnimation&&this.animation[0]===!0}},methods:{toggleElement:function(t,e,n){var i,o=this,r=document.body,s=r.scrollTop,a=function(t){return k.all(t.toArray().map(function(t){return o._toggleElement(t,e,n)})).then(null,Q)},u=function(t){var e=a(t);return o._queued=null,r.scrollTop=s,e};return t=Mt(t),!this.hasAnimation||!this.queued||t.length<2?a(t):this._queued?u(t.not(this._queued)):(this._queued=t.not(i=t.filter(function(t,e){return o.isToggled(e)})),a(i).then(function(){return o._queued&&u(o._queued)}))},toggleNow:function(t,e){var n=this;return k.all(Mt(t).toArray().map(function(t){return n._toggleElement(t,e,!1)})).then(null,Q)},isToggled:function(t){return t=t&&Mt(t)||this.$el,this.cls?t.hasClass(this.cls.split(" ")[0]):!t.attr("hidden")},updateAria:function(t){this.cls===!1&&t.attr("aria-hidden",!this.isToggled(t))},_toggleElement:function(t,e,n){var i=this;if(t=Mt(t),Ft.inProgress(t))return Ft.cancel(t).then(function(){return i._toggleElement(t,e,n)});if(e=D(e)?e:!this.isToggled(t),a(t,"before"+(e?"show":"hide"),[this]).result===!1)return k.reject();var o=(n!==!1&&this.hasAnimation?this.hasTransition?this._toggleHeight:this._toggleAnimation:this._toggleImmediate)(t,e);return t.trigger(e?"show":"hide",[this]),o.then(function(){t.trigger(e?"shown":"hidden",[i]),$e.update(null,t)})},_toggle:function(t,e){t=Mt(t),this.cls?t.toggleClass(this.cls,~this.cls.indexOf(" ")?void 0:e):t.attr("hidden",!e),t.find("[autofocus]:visible").focus(),this.updateAria(t),$e.update(null,t)},_toggleImmediate:function(t,e){return this._toggle(t,e),k.resolve()},_toggleHeight:function(t,e){var n,i=this,o=St.inProgress(t),r=parseFloat(t.children().first().css("margin-top"))+parseFloat(t.children().last().css("margin-bottom")),s=t[0].offsetHeight?t.height()+(o?0:r):0;return St.cancel(t).then(function(){return i.isToggled(t)||i._toggle(t,!0),t.height(""),k(function(a){return Xt(function(){n=t.height()+(o?0:r),t.height(s),(e?St.start(t,Wt(i.initProps,{overflow:"hidden",height:n}),Math.round(i.duration*(1-s/n)),i.transition):St.start(t,i.hideProps,Math.round(i.duration*(s/n)),i.transition).then(function(){i._toggle(t,!1),t.css(i.initProps)})).then(a)})})})},_toggleAnimation:function(t,e){var n=this;return e?(this._toggle(t,!0),Ft["in"](t,this.animation[0],this.duration,this.origin)):Ft.out(t,this.animation[1]||this.animation[0],this.duration,this.origin).then(function(){return n._toggle(t,!1)})}}},Oe={mixins:[Ce,ke],props:{clsPanel:String,selClose:String,escClose:Boolean,bgClose:Boolean,stack:Boolean,container:Boolean},defaults:{cls:"qx-open",escClose:!0,bgClose:!0,overlay:!0,stack:!1,container:!0},computed:{body:function(){return Mt(document.body)},panel:function(){return this.$el.find("."+this.clsPanel)},container:function(){return R(this.$props.container===!0&&$e.container||this.$props.container&&L(this.$props.container))},transitionElement:function(){return this.panel},transitionDuration:function(){return Y(this.transitionElement.css("transition-duration"))}},events:[{name:"click",delegate:function(){return this.selClose},handler:function(t){t.preventDefault(),this.hide()}},{name:"toggle",handler:function(t){t.preventDefault(),this.toggle()}},{name:"beforeshow",self:!0,handler:function(){var t=this;if(this.isToggled())return!1;var e=Ee&&Ee!==this&&Ee;if(Ee=this,e){if(!this.stack)return e.hide().then(this.show),!1;this.prev=e}else Xt(function(){return kt(t.$options.name)});e||(this.scrollbarWidth=window.innerWidth-It[0].offsetWidth,this.body.css("overflow-y",this.scrollbarWidth&&this.overlay?"scroll":"")),It.addClass(this.clsPage)}},{name:"beforehide",self:!0,handler:function(){return!!this.isToggled()&&(Ee=Ee&&Ee!==this&&Ee||this.prev,void(Ee||Ot(this.$options.name)))}},{name:"hidden",self:!0,handler:function(){Ee||(It.removeClass(this.clsPage),this.body.css("overflow-y",""))}}],
methods:{toggle:function(){return this.isToggled()?this.hide():this.show()},show:function(){var t=this;return this.container&&!this.$el.parent().is(this.container)?(this.container.appendChild(this.$el[0]),k(function(e){return Xt(function(){return e(t.show())})})):this.toggleNow(this.$el,!0)},hide:function(){return this.toggleNow(this.$el,!1)},getActive:function(){return Ee},_toggleImmediate:function(t,e){var n=this;return this._toggle(t,e),this.transitionDuration?k(function(t,e){n._transition&&(n.transitionElement.off(oe,n._transition.handler),n._transition.reject()),n._transition={reject:e,handler:function(){t(),n._transition=null}},n.transitionElement.one(oe,n._transition.handler)}):k.resolve()}}},Te={props:{pos:String,offset:null,flip:Boolean,clsPos:String},defaults:{pos:jt?"bottom-right":"bottom-left",flip:!0,offset:!1,clsPos:""},computed:{pos:function(){return(this.$props.pos+(~this.$props.pos.indexOf("-")?"":"-center")).split("-")},dir:function(){return this.pos[0]},align:function(){return this.pos[1]}},methods:{positionAt:function(t,e,n){d(t,this.clsPos+"-(top|bottom|left|right)(-[a-z]+)?").css({top:"",left:""});var i=U(this.offset)||0,o=this.getAxis(),r=ct(t,e,"x"===o?gt(this.dir)+" "+this.align:this.align+" "+gt(this.dir),"x"===o?this.dir+" "+this.align:this.align+" "+this.dir,"x"===o?""+("left"===this.dir?-1*i:i):" "+("top"===this.dir?-1*i:i),null,this.flip,n);this.dir="x"===o?r.target.x:r.target.y,this.align="x"===o?r.target.y:r.target.x,t.toggleClass(this.clsPos+"-"+this.dir+"-"+this.align,this.offset===!1)},getAxis:function(){return"top"===this.dir||"bottom"===this.dir?"y":"x"}}};return $e.version="3.0.0-beta.25",Tt($e),Pt($e),Nt($e),$e}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define("uikitparallax",e):t.qxUIkitParallax=e()}(this,function(){"use strict";function t(e){function n(t){return t.split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(function(t){return parseFloat(t)})}function i(t,e){var n=!1;return Object.keys(t).reduce(function(i,r){var s=t[r],a=o(s,e);switch(r){case"x":case"y":if(n)break;var u=["x","y"].map(function(n){return r===n?a+s.unit:t[n]?o(t[n],e)+t[n].unit:0}),c=u[0],l=u[1];n=i.transform+=" translate3d("+c+", "+l+", 0)";break;case"rotate":i.transform+=" rotate("+a+"deg)";break;case"scale":i.transform+=" scale("+a+")";break;case"bgy":case"bgx":i["background-position-"+r[2]]="calc("+s.pos+" + "+(a+s.unit)+")";break;case"color":case"backgroundColor":case"borderColor":i[r]="rgba("+s.start.map(function(t,n){return t+=e*(s.end[n]-t),3===n?parseFloat(t):parseInt(t,10)}).join(",")+")";break;case"blur":i.filter+=" blur("+a+"px)";break;case"hue":i.filter+=" hue-rotate("+a+"deg)";break;case"fopacity":i.filter+=" opacity("+a+"%)";break;case"grayscale":case"invert":case"saturate":case"sepia":i.filter+=" "+r+"("+a+"%)";break;default:i[r]=a}return i},{transform:"",filter:""})}function o(t,e){return+(l(t.diff)?+t.end:t.start+t.diff*e*(t.start<t.end?1:-1)).toFixed(2)}if(!t.installed){var r=e.util,s=(r.$,r.assign),a=r.clamp,u=r.Dimensions,c=r.getImage,l=r.isUndefined,f=r.scrolledOver,h=r.query,d=["x","y","bgx","bgy","rotate","scale","color","backgroundColor","borderColor","opacity","blur","hue","grayscale","invert","saturate","sepia","fopacity"];e.component("parallax",{props:d.reduce(function(t,e){return t[e]="list",t},{easing:Number,target:String,viewport:Number,media:"media"}),defaults:d.reduce(function(t,e){return t[e]=void 0,t},{easing:1,target:!1,viewport:1,media:!1}),computed:{target:function(){return this.$props.target&&h(this.$props.target,this.$el)||this.$el},props:function(){var t=this;return d.reduce(function(e,i){if(l(t.$props[i]))return e;var o=i.match(/color/i),r=o||"opacity"===i,a=t.$props[i];r&&t.$el.css(i,"");var u,c=(l(a[1])?"scale"===i?1:r?t.$el.css(i):0:a[0])||0,f=l(a[1])?a[0]:a[1],h=~a.join("").indexOf("%")?"%":"px";if(o){var d=t.$el[0].style.color;t.$el[0].style.color=c,c=n(t.$el.css("color")),t.$el[0].style.color=f,f=n(t.$el.css("color")),t.$el[0].style.color=d}else c=parseFloat(c),f=parseFloat(f),u=Math.abs(c-f);if(e[i]={start:c,end:f,diff:u,unit:h},i.match(/^bg/)){var p="background-position-"+i[2];e[i].pos=t.$el.css(p,"").css(p),t.covers&&s(e[i],{start:0,end:c<=f?u:-u})}return e},{})},bgProps:function(){var t=this;return["bgx","bgy"].filter(function(e){return e in t.props})},covers:function(){return"cover"===this.$el.css("backgroundSize","").css("backgroundSize")}},disconnected:function(){delete this._prev,delete this._image},update:[{read:function(){var t=this;if(delete this._prev,delete this._computeds.props,this._active=!this.media||window.matchMedia(this.media).matches,this._image&&(this._image.dimEl={width:this.$el[0].offsetWidth,height:this.$el[0].offsetHeight}),l(this._image)&&this.covers&&this.bgProps.length){var e=this.$el.css("backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");e&&(this._image=!1,c(e).then(function(e){t._image={width:e.naturalWidth,height:e.naturalHeight},t.$emit()}))}},write:function(){var t=this;if(this._image){if(!this._active)return void this.$el.css({backgroundSize:"",backgroundRepeat:""});var e=this._image,n=e.dimEl,i=u.cover(e,n);this.bgProps.forEach(function(o){var r=t.props[o],s=r.start,c=r.end,l=r.pos,f=r.diff,h="bgy"===o?"height":"width",d=i[h]-n[h];if(l.match(/%$/)){if(s>=c)d<f?(n[h]=i[h]+f-d,t.props[o].pos="0px"):(l=-1*d/100*parseFloat(l),l=a(l,f-d,0),t.props[o].pos=l+"px");else{if(d<f)n[h]=i[h]+f-d;else if(d/100*parseFloat(l)>f)return;t.props[o].pos="-"+f+"px"}i=u.cover(e,n)}}),this.$el.css({backgroundSize:i.width+"px "+i.height+"px",backgroundRepeat:"no-repeat"})}},events:["load","resize"]},{read:function(){var t=f(this.target)/(this.viewport||1);this._percent=a(t*(1-(this.easing-this.easing*t)))},write:function(){var t=this;return this._active?void(this._prev!==this._percent&&(this.$el.css(i(this.props,this._percent)),this._prev=this._percent)):void Object.keys(i(this.props,0)).forEach(function(e){return t.$el.css(e,"")})},events:["scroll","load","resize"]}]})}}return"undefined"!=typeof window&&window.qxUIkit&&window.qxUIkit.use(t),t});