(function(){var t,e,n,r,s,o,i,u,a,c,l,p,h,g,f,d,m,y,v,w,b,k,S,q,L,x,T,R,P,E,j,M,A,N,O,_,F,C,U,W,X,I,D,H,z,B,G,J,Q,K=[].slice,V={}.hasOwnProperty,Y=function(t,e){function n(){this.constructor=t}for(var r in e)V.call(e,r)&&(t=e);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},Z=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this===t)return e;return-1};for(b={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:},eventLag:{minSamples:10,sampleCount:3,lagThreshold:3},ajax:{trackMethods:,trackWebSockets:!0,ignoreURLs:[]}},P=function(){var t;return null!=(t=“undefined”!=typeof performance&&null!==performance&&“function”==typeof performance.now?performance.now():void 0)?t:+new Date},j=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,w=window.cancelAnimationFrame||window.mozCancelAnimationFrame,null==j&&(j=function(t){return setTimeout(t,50)},w=function(t){return clearTimeout(t)}),A=function(t){var e,n;return e=P(),(n=function(){var r;return r=P()-e,r>=33?(e=P(),t(r,function(){return j(n)})):setTimeout(n,33-r)})()},M=function(){var t,e,n;return n=arguments,e=arguments,t=3<=arguments.length?K.call(arguments,2):[],“function”==typeof n?n.apply(n,t):n},k=function(){var t,e,n,r,s,o,i;for(e=arguments,r=2<=arguments.length?K.call(arguments,1):[],o=0,i=r.length;i>o;o++)if(n=r)for(t in n)V.call(n,t)&&(s=n,null!=e&&“object”==typeof e&&null!=s&&“object”==typeof s?k(e,s):e=s);return e},m=function(t){var e,n,r,s,o;for(n=e=0,s=0,o=t.length;o>s;s++)r=t,n+=Math.abs®,e++;return n/e},q=function(t,e){var n,r,s;if(null==t&&(t=“options”),null==e&&(e=!0),s=document.querySelector(“[data-pace-”t
“]”)){if(n=s.getAttribute(“data-pace-”+t),!e)return n;try{return JSON.parse(n)}catch(o){return r=o,“undefined”!=typeof console&&null!==console?console.error(“Error parsing inline pace options”,r):void 0}}},i=function(){function t(){}return t.prototype.on=function(t,e,n,r){var s;return null==r&&(r=!1),null==this.bindings&&(this.bindings={}),null==(s=this.bindings)&&(s=[]),this.bindings.push({handler:e,ctx:n,once:r})},t.prototype.once=function(t,e,n){return this.on(t,e,n,!0)},t.prototype.off=function(t,e){var n,r,s;if(null!=(null!=(r=this.bindings)?r:void 0)){if(null==e)return delete this.bindings;for(n=0,s=[];nthis.progress
“%, 0, 0)”,i=,s=0,o=i.length;o>s;s++)e=i,t.children.style=r;var u=document.getElementById(“form-progress”);return“undefined”!=typeof u&&null!=u&&(u.value=0|this.progress,jQuery(u).change()),(!this.lastRenderedProgress||this.lastRenderedProgress|0!==this.progress|0)&&(t.children.setAttribute(“data-progress-text”,“”+(0|this.progress)+“%”),this.progress>=100?n=“99”:(n=this.progress<10?"0":"",n+=0|this.progress),t.children.setAttribute(“data-progress”,“”+n)),this.lastRenderedProgress=this.progress},t.prototype.done=function(){return this.progress>=100},t}(),u=function(){function t(){this.bindings={}}return t.prototype.trigger=function(t,e){var n,r,s,o,i;if(null!=this.bindings){for(o=this.bindings,i=[],r=0,s=o.length;s>r;r++)n=o,i.push(n.call(this,e));return i}},t.prototype.on=function(t,e){var n;return null==(n=this.bindings)&&(n=[]),this.bindings.push(e)},t}(),I=window.XMLHttpRequest,X=window.XDomainRequest,W=window.WebSocket,S=function(t,e){var n,r,s,o;o=[];for(r in e.prototype)try{s=e.prototype,o.push(null==t&&“function”!=typeof s?t=s:void 0)}catch(i){n=i}return o},T=[],c.ignore=function(){var t,e,n;return e=arguments,t=2<=arguments.length?K.call(arguments,1):[],T.unshift(“ignore”),n=e.apply(null,t),T.shift(),n},c.track=function(){var t,e,n;return e=arguments,t=2<=arguments.length?K.call(arguments,1):[],T.unshift(“track”),n=e.apply(null,t),T.shift(),n},_=function(t){var e;if(null==t&&(t=“GET”),“track”===T)return“force”;if(!T.length&&E.ajax){if(“socket”===t&&E.ajax.trackWebSockets)return!0;if(e=t.toUpperCase(),Z.call(E.ajax.trackMethods,e)>=0)return!0}return!1},l=function(t){function e(){var t,n=this;e.__super__.constructor.apply(this,arguments),t=function(t){var e;return e=t.open,t.open=function(r,s){return _®&&n.trigger(“request”,{type:r,url:s,request:t}),e.apply(t,arguments)}},window.XMLHttpRequest=function(e){var n;return n=new I(e),t(n),n};try{S(window.XMLHttpRequest,I)}catch®{}if(null!=X){window.XDomainRequest=function(){var e;return e=new X,t(e),e};try{S(window.XDomainRequest,X)}catch®{}}if(null!=W&&E.ajax.trackWebSockets){window.WebSocket=function(t,e){var r;return r=null!=e?new W(t,e):new W(t),_(“socket”)&&n.trigger(“request”,{type:“socket”,url:t,protocols:e,request:r}),r};try{S(window.WebSocket,W)}catch®{}}}return Y(e,t),e}(u),H=null,L=function(){return null==H&&(H=new l),H},O=function(t){var e,n,r,s;for(s=E.ajax.ignoreURLs,n=0,r=s.length;r>n;n++)if(e=s,“string”==typeof e){if(-1!==t.indexOf(e))return!0}else if(e.test(t))return!0;return!1},L().on(“request”,function(e){var n,r,s,o,i;return o=e.type,s=e.request,i=e.url,O(i)?void 0:c.running||E.restartOnRequestAfter===!1&&“force”!==_(o)?void 0:(r=arguments,n=E.restartOnRequestAfter||0,“boolean”==typeof n&&(n=0),setTimeout(function(){var e,n,i,u,a,l;if(e=“socket”===o?s.readyState<2:0<(u=s.readyState)&&4>u){for(c.restart(),a=c.sources,l=[],n=0,i=a.length;i>n;n++){if(F=a,F instanceof t){F.watch.apply(F,r);break}l.push(void 0)}return l}},n))}),t=function(){function t(){var t=this;this.elements=[],L().on(“request”,function(){return t.watch.apply(t,arguments)})}return t.prototype.watch=function(t){var e,n,r,s;return r=t.type,e=t.request,s=t.url,O(s)?void 0:(n=“socket”===r?new g(e):new f(e),this.elements.push(n))},t}(),f=function(){function t(t){var e,n,r,s,o,i,u=this;if(this.progress=0,null!=window.ProgressEvent)for(n=null,t.addEventListener(“progress”,function(t){return u.progress=t.lengthComputable?100*t.loaded/t.total:u.progress+(100-u.progress)/2},!1),i=,r=0,s=i.length;s>r;r++)e=i,t.addEventListener(e,function(){return u.progress=100},!1);else o=t.onreadystatechange,t.onreadystatechange=function(){var e;return 0===(e=t.readyState)||4===e?u.progress=100:3===t.readyState&&(u.progress=50),“function”==typeof o?o.apply(null,arguments):void 0}}return t}(),g=function(){function t(t){var e,n,r,s,o=this;for(this.progress=0,s=,n=0,r=s.length;r>n;n++)e=s,t.addEventListener(e,function(){return o.progress=100},!1)}return t}(),r=function(){function t(t){var e,n,r,o;for(null==t&&(t={}),this.elements=[],null==t.selectors&&(t.selectors=),o=t.selectors,n=0,r=o.length;r>n;n++)e=o,this.elements.push(new s(e))}return t}(),s=function(){function t(t){this.selector=t,this.progress=0,this.check()}return t.prototype.check=function(){var t=this;return document.querySelector(this.selector)?this.done():setTimeout(function(){return t.check()},E.elements.checkInterval)},t.prototype.done=function(){return this.progress=100},t}(),n=function(){function t(){var t,e,n=this;this.progress=null!=(e=this.states)?e:100,t=document.onreadystatechange,document.onreadystatechange=function(){return null!=n.states&&(n.progress=n.states),“function”==typeof t?t.apply(null,arguments):void 0}}return t.prototype.states={loading:0,interactive:50,complete:100},t}(),o=function(){function t(){var t,e,n,r,s,o=this;this.progress=0,t=0,s=[],r=0,n=P(),e=setInterval(function(){var i;return i=P()-n-50,n=P(),s.push(i),s.length>E.eventLag.sampleCount&&s.shift(),t=m(s),++r>=E.eventLag.minSamples&&t<E.eventLag.lagThreshold?(o.progress=100,clearInterval(e)):o.progress=100*(3/(t+3))},50)}return t}(),h=function(){function t(t){this.source=t,this.last=this.sinceLastUpdate=0,this.rate=E.initialRate,this.catchup=0,this.progress=this.lastProgress=0,null!=this.source&&(this.progress=M(this.source,“progress”))}return t.prototype.tick=function(t,e){var n;return null==e&&(e=M(this.source,“progress”)),e>=100&&(this.done=!0),e===this.last?this.sinceLastUpdate+=t:(this.sinceLastUpdate&&(this.rate=(e-this.last)/this.sinceLastUpdate),this.catchup=(e-this.progress)/E.catchupTime,this.sinceLastUpdate=0,this.last=e),e>this.progress&&(this.progress+=this.catchup*t),n=1-Math.pow(this.progress/100,E.easeFactor),this.progress+=n*this.rate*t,this.progress=Math.min(this.lastProgress+E.maxProgressPerFrame,this.progress),this.progress=Math.max(0,this.progress),this.progress=Math.min(100,this.progress),this.lastProgress=this.progress,this.progress},t}(),C=null,N=null,y=null,U=null,d=null,v=null,c.running=!1,x=function(){return E.restartOnPushState?c.restart():void 0},null!=window.history.pushState&&(B=window.history.pushState,window.history.pushState=function(){return x(),B.apply(window.history,arguments)}),null!=window.history.replaceState&&(Q=window.history.replaceState,window.history.replaceState=function(){return x(),Q.apply(window.history,arguments)}),p={ajax:t,elements:r,document:n,eventLag:o},(R=function(){var t,n,r,s,o,i,u,a;for(c.sources=C=[],i=,n=0,s=i.length;s>n;n++)t=i,E!==!1&&C.push(new p(E));for(a=null!=(u=E.extraSources)?u:[],r=0,o=a.length;o>r;r++)F=a,C.push(new F(E));return c.bar=y=new e,N=[],U=new h})(),c.stop=function(){return c.trigger(“stop”),c.running=!1,y.destroy(),v=!0,null!=d&&(“function”==typeof w&&w(d),d=null),R()},c.restart=function(){return c.trigger(“restart”),c.stop(),c.start()},c.go=function(){var t;return c.running=!0,y.render(),t=P(),v=!1,d=A(function(e,n){var r,s,o,i,u,a,l,p,g,f,d,m,w,b,k,S;for(p=100-y.progress,s=d=0,o=!0,a=m=0,b=C.length;b>m;a=++m)for(F=C,f=null!=N?N:N=[],u=null!=(S=F.elements)?S:,l=w=0,k=u.length;k>w;l=++w)i=u,g=null!=f?f:f=new h(i),o&=g.done,g.done||(s++,d+=g.tick(e));return r=d/s,y.update(U.tick(e,r)),y.done()||o||v?(y.update(100),c.trigger(“done”),setTimeout(function(){return y.finish(),c.running=!1,c.trigger(“hide”)},Math.max(E.ghostTime,Math.max(E.minTime-(P()-t),0)))):n()})},c.start=function(t){k(E,t),c.running=!0;try{y.render()}catch(e){a=e}return document.querySelector(“.pace”)?(c.trigger(“start”),c.go()):setTimeout(c.start,50)},“function”==typeof define&&define.amd?define(function(){return c}):“object”==typeof exports?module.exports=c:E.startOnPageLoad&&c.start()}).call(this);