File: /var/www/bellecouture/wp-content/themes/yena/assets/js/lib/pace.min.js
(function(){function t(t,e){for(var r in e)Y.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t}var u,c,e,r,o,n,s,i,a,v,l,p,w,h,d,f,g,b,S,m,y,k,q,x,L,P,T,R,E,j,O,A,M,N,_,F,C,U,W,X,D,H,I,z,G,B,J,K,Q,V=[].slice,Y={}.hasOwnProperty,Z=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1};function $(){}for(y={catchupTime:100,initialRate:.03,minTime:250,ghostTime:100,maxProgressPerFrame:20,easeFactor:1.25,startOnPageLoad:!0,restartOnPushState:!0,restartOnRequestAfter:500,target:"body",elements:{checkInterval:100,selectors:["body"]},eventLag:{minSamples:10,sampleCount:3,lagThreshold:3},ajax:{trackMethods:["GET"],trackWebSockets:!0,ignoreURLs:[]}},E=function(){var t;return null!=(t="undefined"!=typeof performance&&null!==performance&&"function"==typeof performance.now?performance.now():void 0)?t:+new Date},O=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,m=window.cancelAnimationFrame||window.mozCancelAnimationFrame,null==O&&(O=function(t){return setTimeout(t,50)},m=function(t){return clearTimeout(t)}),M=function(e){var r,n;return r=E(),(n=function(){var t;return 33<=(t=E()-r)?(r=E(),e(t,function(){return O(n)})):setTimeout(n,33-t)})()},A=function(){var t,e,r;return r=arguments[0],e=arguments[1],t=3<=arguments.length?V.call(arguments,2):[],"function"==typeof r[e]?r[e].apply(r,t):r[e]},k=function(){var t,e,r,n,s,o,i;for(e=arguments[0],o=0,i=(n=2<=arguments.length?V.call(arguments,1):[]).length;o<i;o++)if(r=n[o])for(t in r)Y.call(r,t)&&(s=r[t],null!=e[t]&&"object"==typeof e[t]&&null!=s&&"object"==typeof s?k(e[t],s):e[t]=s);return e},g=function(t){var e,r,n,s,o;for(r=e=0,s=0,o=t.length;s<o;s++)n=t[s],r+=Math.abs(n),e++;return r/e},x=function(t,e){var r,n;if(null==t&&(t="options"),null==e&&(e=!0),n=document.querySelector("[data-pace-"+t+"]")){if(r=n.getAttribute("data-pace-"+t),!e)return r;try{return JSON.parse(r)}catch(t){return"undefined"!=typeof console&&null!==console?console.error("Error parsing inline pace options",t):void 0}}},$.prototype.on=function(t,e,r,n){var s;return null==n&&(n=!1),null==this.bindings&&(this.bindings={}),null==(s=this.bindings)[t]&&(s[t]=[]),this.bindings[t].push({handler:e,ctx:r,once:n})},$.prototype.once=function(t,e,r){return this.on(t,e,r,!0)},$.prototype.off=function(t,e){var r,n,s;if(null!=(null!=(n=this.bindings)?n[t]:void 0)){if(null==e)return delete this.bindings[t];for(r=0,s=[];r<this.bindings[t].length;)this.bindings[t][r].handler===e?s.push(this.bindings[t].splice(r,1)):s.push(r++);return s}},$.prototype.trigger=function(){var t,e,r,n,s,o,i,a,u;if(r=arguments[0],t=2<=arguments.length?V.call(arguments,1):[],null!=(i=this.bindings)?i[r]:void 0){for(s=0,u=[];s<this.bindings[r].length;)n=(a=this.bindings[r][s]).handler,e=a.ctx,o=a.once,n.apply(null!=e?e:this,t),o?u.push(this.bindings[r].splice(s,1)):u.push(s++);return u}},s=$,v=window.Pace||{},window.Pace=v,k(v,s.prototype),j=v.options=k({},y,window.paceOptions,x()),I=0,G=(J=["ajax","document","eventLag","elements"]).length;I<G;I++)!0===j[C=J[I]]&&(j[C]=y[C]);function tt(){return tt.__super__.constructor.apply(this,arguments)}function et(){this.progress=0}function rt(){this.bindings={}}function nt(){var r,o=this;nt.__super__.constructor.apply(this,arguments),r=function(n){var s;return s=n.open,n.open=function(t,e,r){return F(t)&&o.trigger("request",{type:t,url:e,request:n}),s.apply(n,arguments)}},window.XMLHttpRequest=function(t){var e;return e=new H(t),r(e),e};try{q(window.XMLHttpRequest,H)}catch(t){}if(null!=D){window.XDomainRequest=function(){var t;return t=new D,r(t),t};try{q(window.XDomainRequest,D)}catch(t){}}if(null!=X&&j.ajax.trackWebSockets){window.WebSocket=function(t,e){var r;return r=null!=e?new X(t,e):new X(t),F("socket")&&o.trigger("request",{type:"socket",url:t,protocols:e,request:r}),r};try{q(window.WebSocket,X)}catch(t){}}}function st(){var t=this;this.elements=[],L().on("request",function(){return t.watch.apply(t,arguments)})}function ot(t){this.selector=t,this.progress=0,this.check()}function it(){var t,e,r=this;this.progress=null!=(e=this.states[document.readyState])?e:100,t=document.onreadystatechange,document.onreadystatechange=function(){return null!=r.states[document.readyState]&&(r.progress=r.states[document.readyState]),"function"==typeof t?t.apply(null,arguments):void 0}}function at(t){this.source=t,this.last=this.sinceLastUpdate=0,this.rate=j.initialRate,this.catchup=0,this.progress=this.lastProgress=0,null!=this.source&&(this.progress=A(this.source,"progress"))}Q=Error,t(tt,Q),a=tt,et.prototype.getElement=function(){var t;if(null==this.el){if(!(t=document.querySelector(j.target)))throw new a;this.el=document.createElement("div"),this.el.className="pace pace-active",document.body.className=document.body.className.replace(/pace-done/g,""),document.body.className+=" pace-running",this.el.innerHTML='<div class="pace-progress">\n <div class="pace-progress-inner"></div>\n</div>\n<div class="pace-activity"></div>',null!=t.firstChild?t.insertBefore(this.el,t.firstChild):t.appendChild(this.el)}return this.el},et.prototype.finish=function(){var t;return(t=this.getElement()).className=t.className.replace("pace-active",""),t.className+=" pace-inactive",document.body.className=document.body.className.replace("pace-running",""),document.body.className+=" pace-done"},et.prototype.update=function(t){return this.progress=t,this.render()},et.prototype.destroy=function(){try{this.getElement().parentNode.removeChild(this.getElement())}catch(t){a=t}return this.el=void 0},et.prototype.render=function(){var t,e,r,n,s,o,i;if(null==document.querySelector(j.target))return!1;for(t=this.getElement(),n="translate3d("+this.progress+"%, 0, 0)",s=0,o=(i=["webkitTransform","msTransform","transform"]).length;s<o;s++)e=i[s],t.children[0].style[e]=n;if(!this.lastRenderedProgress||this.lastRenderedProgress|0!==this.progress|0){document.documentElement.style.setProperty("--theme-loading-progress",(0|this.progress)+"%");var a=document.querySelector(".la-loader-ss");a&&"body"==j.target&&a.setAttribute("data-progress-text",(0|this.progress)+"%"),t.children[0].setAttribute("data-progress-text",(0|this.progress)+"%"),100<=this.progress?r="99":(r=this.progress<10?"0":"",r+=0|this.progress),t.children[0].setAttribute("data-progress",""+r)}return this.lastRenderedProgress=this.progress},et.prototype.done=function(){return 100<=this.progress},c=et,rt.prototype.trigger=function(t,e){var r,n,s,o,i;if(null!=this.bindings[t]){for(i=[],n=0,s=(o=this.bindings[t]).length;n<s;n++)r=o[n],i.push(r.call(this,e));return i}},rt.prototype.on=function(t,e){var r;return null==(r=this.bindings)[t]&&(r[t]=[]),this.bindings[t].push(e)},i=rt,H=window.XMLHttpRequest,D=window.XDomainRequest,X=window.WebSocket,q=function(t,e){var r,n;for(r in n=[],e.prototype)try{null==t[r]&&"function"!=typeof e[r]?"function"==typeof Object.defineProperty?n.push(Object.defineProperty(t,r,{get:function(){return e.prototype[r]},configurable:!0,enumerable:!0})):n.push(t[r]=e.prototype[r]):n.push(void 0)}catch(t){t}return n},T=[],v.ignore=function(){var t,e,r;return e=arguments[0],t=2<=arguments.length?V.call(arguments,1):[],T.unshift("ignore"),r=e.apply(null,t),T.shift(),r},v.track=function(){var t,e,r;return e=arguments[0],t=2<=arguments.length?V.call(arguments,1):[],T.unshift("track"),r=e.apply(null,t),T.shift(),r},F=function(t){var e;if(null==t&&(t="GET"),"track"===T[0])return"force";if(!T.length&&j.ajax){if("socket"===t&&j.ajax.trackWebSockets)return!0;if(e=t.toUpperCase(),0<=Z.call(j.ajax.trackMethods,e))return!0}return!1},t(nt,i),l=nt,z=null,_=function(t){var e,r,n,s;for(r=0,n=(s=j.ajax.ignoreURLs).length;r<n;r++)if("string"==typeof(e=s[r])){if(-1!==t.indexOf(e))return!0}else if(e.test(t))return!0;return!1},(L=function(){return null==z&&(z=new l),z})().on("request",function(t){var e,o,i,a,r;if(a=t.type,i=t.request,r=t.url,!_(r))return v.running||!1===j.restartOnRequestAfter&&"force"!==F(a)?void 0:(o=arguments,"boolean"==typeof(e=j.restartOnRequestAfter||0)&&(e=0),setTimeout(function(){var t,e,r,n,s;if("socket"===a?i.readyState<2:0<(r=i.readyState)&&r<4){for(v.restart(),s=[],t=0,e=(n=v.sources).length;t<e;t++){if((C=n[t])instanceof u){C.watch.apply(C,o);break}s.push(void 0)}return s}},e))}),st.prototype.watch=function(t){var e,r,n,s;if(n=t.type,e=t.request,s=t.url,!_(s))return r="socket"===n?new h(e):new d(e),this.elements.push(r)},u=st,d=function(e){var t,r,n,s,o,i=this;if(this.progress=0,null!=window.ProgressEvent)for(e.addEventListener("progress",function(t){return t.lengthComputable?i.progress=100*t.loaded/t.total:i.progress=i.progress+(100-i.progress)/2},!1),r=0,n=(o=["load","abort","timeout","error"]).length;r<n;r++)t=o[r],e.addEventListener(t,function(){return i.progress=100},!1);else s=e.onreadystatechange,e.onreadystatechange=function(){var t;return 0===(t=e.readyState)||4===t?i.progress=100:3===e.readyState&&(i.progress=50),"function"==typeof s?s.apply(null,arguments):void 0}},h=function(t){var e,r,n,s,o=this;for(r=this.progress=0,n=(s=["error","open"]).length;r<n;r++)e=s[r],t.addEventListener(e,function(){return o.progress=100},!1)},r=function(t){var e,r,n,s;for(null==t&&(t={}),this.elements=[],null==t.selectors&&(t.selectors=[]),r=0,n=(s=t.selectors).length;r<n;r++)e=s[r],this.elements.push(new o(e))},ot.prototype.check=function(){var t=this;return document.querySelector(this.selector)?this.done():setTimeout(function(){return t.check()},j.elements.checkInterval)},ot.prototype.done=function(){return this.progress=100},o=ot,it.prototype.states={loading:0,interactive:50,complete:100},e=it,n=function(){var e,r,n,s,o,i=this;this.progress=0,o=[],s=e=0,n=E(),r=setInterval(function(){var t;return t=E()-n-50,n=E(),o.push(t),o.length>j.eventLag.sampleCount&&o.shift(),e=g(o),++s>=j.eventLag.minSamples&&e<j.eventLag.lagThreshold?(i.progress=100,clearInterval(r)):i.progress=3/(e+3)*100},50)},at.prototype.tick=function(t,e){var r;return null==e&&(e=A(this.source,"progress")),100<=e&&(this.done=!0),e===this.last?this.sinceLastUpdate+=t:(this.sinceLastUpdate&&(this.rate=(e-this.last)/this.sinceLastUpdate),this.catchup=(e-this.progress)/j.catchupTime,this.sinceLastUpdate=0,this.last=e),e>this.progress&&(this.progress+=this.catchup*t),r=1-Math.pow(this.progress/100,j.easeFactor),this.progress+=r*this.rate*t,this.progress=Math.min(this.lastProgress+j.maxProgressPerFrame,this.progress),this.progress=Math.max(0,this.progress),this.progress=Math.min(100,this.progress),this.lastProgress=this.progress,this.progress},w=at,S=f=W=b=N=U=null,v.running=!1,P=function(){if(j.restartOnPushState)return v.restart()},null!=window.history.pushState&&(B=window.history.pushState,window.history.pushState=function(){return P(),B.apply(window.history,arguments)}),null!=window.history.replaceState&&(K=window.history.replaceState,window.history.replaceState=function(){return P(),K.apply(window.history,arguments)}),p={ajax:u,elements:r,document:e,eventLag:n},(R=function(){var t,e,r,n,s,o,i,a;for(v.sources=U=[],e=0,n=(o=["ajax","elements","document","eventLag"]).length;e<n;e++)!1!==j[t=o[e]]&&U.push(new p[t](j[t]));for(r=0,s=(a=null!=(i=j.extraSources)?i:[]).length;r<s;r++)C=a[r],U.push(new C(j));return v.bar=b=new c,N=[],W=new w})(),v.stop=function(){return v.trigger("stop"),v.running=!1,b.destroy(),S=!0,null!=f&&("function"==typeof m&&m(f),f=null),R()},v.restart=function(){return v.trigger("restart"),v.stop(),v.start()},v.go=function(){var y;return v.running=!0,b.render(),y=E(),S=!1,f=M(function(t,e){var r,n,s,o,i,a,u,c,l,p,h,d,f,g,m;for(100-b.progress,n=p=0,s=!0,a=h=0,f=U.length;h<f;a=++h)for(C=U[a],l=null!=N[a]?N[a]:N[a]=[],u=d=0,g=(i=null!=(m=C.elements)?m:[C]).length;d<g;u=++d)o=i[u],s&=(c=null!=l[u]?l[u]:l[u]=new w(o)).done,c.done||(n++,p+=c.tick(t));return r=p/n,b.update(W.tick(t,r)),b.done()||s||S?(b.update(100),v.trigger("done"),setTimeout(function(){return b.finish(),v.running=!1,v.trigger("hide")},Math.max(j.ghostTime,Math.max(j.minTime-(E()-y),0)))):e()})},v.start=function(t){k(j,t),v.running=!0;try{b.render()}catch(t){a=t}return document.querySelector(".pace")?(v.trigger("start"),v.go()):setTimeout(v.start,50)},"function"==typeof define&&define.amd?define(["pace"],function(){return v}):"object"==typeof exports?module.exports=v:j.startOnPageLoad&&v.start()}).call(this);