<commit_before>/*
 * 
 * pjax
 * 
 * ---
 * @Copyright(c) 2012, falsandtru
 * @license MIT http://opensource.org/licenses/mit-license.php
 * @version 1.31.10
 * @updated 2014/02/22
 * @author falsandtru https://github.com/falsandtru/
 * @Compressor Closure Compiler
 */
(function(k,l,z,v){function D(b,d,f,r,e,a){var n=this;switch(!0){case "object"===typeof a:n=n instanceof b?n:b(f);n=e.setProperties.call(n,a.ns||"",null);if(!a.area&&!a.scope)return n;break;default:return n=n instanceof b?n:b[e.name],e.setProperties.call(n,null,null)}var c;c=b.extend(!0,{id:0,gns:e.name,ns:null,area:null,link:"a:not([target])",filter:function(){return/(\/|\.html?|\.php)([#?].*)?$/.test(this.href)},form:null,scope:null,state:null,scrollTop:0,scrollLeft:0,ajax:{},contentType:"text/html",
cache:{click:!1,submit:!1,popstate:!1,get:!0,post:!0,length:9,size:1048576,expire:18E5},callback:function(){},callbacks:{ajax:{},update:{url:{},title:{},content:{},scroll:{},css:{},script:{},cache:{load:{},save:{}},rendering:{},verify:{}},async:!1},parameter:null,load:{css:!1,script:!1,execute:!0,reload:"",reject:"",sync:!0,ajax:{dataType:"script"},rewrite:null},interval:300,wait:0,scroll:{delay:300},fix:{location:!0,history:!0,scroll:!0,reset:!1},hashquery:!1,fallback:!0,database:!0,server:{query:"pjax"}},
a);c.location=b("<a/>",{href:e.canonicalizeURL(d.location.href)})[0];c.destination=b("<a/>",{href:e.canonicalizeURL(d.location.href)})[0];c.nss={array:[e.name].concat(c.ns&&String(c.ns).split(".")||[])};b.extend(!0,c=c.scope&&e.scope(c)||c,{nss:{name:c.ns||"",event:c.nss.array.join("."),alias:e.alias?[e.alias].concat(c.nss.array.slice(1)).join("."):!1,click:["click"].concat(c.nss.array.join(":")).join("."),submit:["submit"].concat(c.nss.array.join(":")).join("."),popstate:["popstate"].concat(c.nss.array.join(":")).join("."),
scroll:["scroll"].concat(c.nss.array.join(":")).join("."),data:c.nss.array.join("-"),class4html:c.nss.array.join("-"),requestHeader:["X",c.nss.array[0].replace(/^\w/,function(c){return c.toUpperCase()})].join("-")},areaback:c.area,fix:/Mobile(\/\w+)? Safari/i.test(d.navigator.userAgent)?{}:{location:!1,reset:!1},contentType:c.contentType.replace(/\s*[,;]\s*/g,"|").toLowerCase(),scroll:{record:!0,queue:[]},log:{script:{},speed:{}},history:{config:c.cache,order:[],data:{},size:0},timestamp:(new Date).getTime(),
disable:!1,landing:e.canonicalizeURL(d.location.href),retry:!0,xhr:null,relay:null,speed:{now:function(){return(new Date).getTime()}},option:a});e.check()&&e.registrate.call(n,b,d,f,r,e,c);return n}var h;h={name:"pjax",alias:"",ids:[],settings:[0],count:0,setAlias:function(b){h.alias="string"===typeof b?b:h.alias;h.name===h.alias||k[h.alias]||(k[h.name][h.alias]=k.fn[h.name],k.fn[h.alias]=k[h.alias]=k.fn[h.name])},IDBFactory:l.indexedDB||l.webkitIndexedDB||l.mozIndexedDB||l.msIndexedDB,IDBDatabase:null,
IDBKeyRange:l.IDBKeyRange||l.webkitIDBKeyRange||l.mozIDBKeyRange||l.msIDBKeyRange,parseHTML:null,setProperties:function(b,d){var f=this;if(f instanceof k||f===k[h.name])f=f instanceof k&&d!==v?f.add(d):f,f[h.name]=k[h.name],f.on=function(){h.settings[1].disable=!1},f.off=function(){h.settings[1].disable=!0},f.click=function(b,e){var a;switch(!0){case "object"===typeof b:a=k(b);break;case !!b:e=e||{};e.href=b;a=k("<a/>",e);break;default:return this}return a.first().one("click",1,h.click).click()},
f.submit=function(b,e,a){var n=z.createDocumentFragment(),c;switch(!0){case "object"===typeof b:e=k(b);break;case !!a:e=e||{};e.action=b;b=a instanceof Array&&Array||a instanceof Object&&Object||v;for(var d in a){c=a[d];switch(b){case Object:c=k("<textarea/>",{name:d}).val(c);break;case Array:c.attr=c.attr||{};c.attr.name=c.name;c=k(c.tag.indexOf("<")?"<"+c.tag+"/>":c.tag,c.attr||{}).val(c.value);break;default:continue}n.appendChild(c[0])}e=k("<form/>",e).append(n);break;default:return this}return e.first().one("submit",
1,h.submit).submit()},f.setCache=function(b,e,a,n){var c=h.settings[1];if(!c||!c.history)return!1;var d,f,u;d=c.history;b=h.canonicalizeURL(b||l.location.href);b=c.hashquery?b:b.replace(/#.*/,"");switch(arguments.length){case 0:case 1:return arguments.callee.call(this,b,h.trim(z.documentElement.outerHTML));default:d.order.unshift(b);for(f=1;u=d.order[f];f++)b===u&&d.order.splice(f,1);d.size>d.config.size&&k[h.name].cleanCache();k[h.name].getCache(b);f=k("<span/>").html(h.find((e||"")+((n||{}).responseText||
"")+"<title></title>",/<title[^>]*?>([^<]*?)<\/title>/i).shift()).text();u=parseInt(1.8*((e||"").length+((n||{}).responseText||"").length)||1048576,10);d.size=d.size||0;d.size+=u;d.data[b]=k.extend(!0,d.data[b]||{},{XMLHttpRequest:n,textStatus:a,data:e,size:u,timestamp:(new Date).getTime()});c.database&&c.fix.history&&h.dbTitle(b,f)}return d.data[b]},f.getCache=function(b){var e=h.settings[1];if(!e||!e.history)return!1;var a;a=e.history;b=h.canonicalizeURL(b||l.location.href);b=e.hashquery?b:b.replace(/#.*/,
"");a.data[b]&&e.timestamp>a.data[b].timestamp+a.config.expire&&k[h.name].removeCache(b);return a.data[b]},f.removeCache=function(b){var e=h.settings[1];if(!e||!e.history)return!1;var a;a=e.history;b=h.canonicalizeURL(b||l.location.href);b=e.hashquery?b:b.replace(/#.*/,"");for(var e=0,d;d=a.order[e];e++)b===d&&(a.order.splice(e,1),a.size-=a.data[d].size,a.data[d]=null,delete a.data[d]);return!0},f.clearCache=function(){var b=h.settings[1];if(!b||!b.history)return!1;for(var b=b.history,e=b.order.length,
a;a=b.order[--e];)b.order.splice(e,1),b.size-=b.data[a].size,delete b.data[a];return!0},f.cleanCache=function(){var b=h.settings[1];if(!b||!b.history)return!1;for(var e=b.history,a=e.order.length,d;d=e.order[--a];)if(a>=e.config.length||d in e.data&&b.timestamp>e.data[d].timestamp+e.config.expire)e.order.splice(a,1),e.size-=e.data[d].size,delete e.data[d];return!0},f.relay=function(b,e){var a=h.settings[1];return a&&k.when?(a.relay=e,k.when(e).done(function(){a.xhr&&4>a.xhr.readyState&&a.xhr.abort();
k[h.name].setCache(b,v,v,e)}).always(function(){a.relay=null}),k[h.name].click(b),!0):!1};return f},check:function(){return h.supportPushState()},supportPushState:function(){return"pushState"in l.history&&l.history.pushState},registrate:function(b,d,f,h,e,a){a.id=1;e.ids.push(a.id);e.settings[a.id]=a;e.share();a.load.script&&b("script").each(function(){var d=this,c,d="function"===typeof a.load.rewrite?e.fire(a.load.rewrite,null,[d.cloneNode()])||d:d;(c=d.src)&&c in a.log.script||!c||a.load.reload&&
b(d).is(a.load.reload)||(a.log.script[c]=!0)});a.database&&(e.database(),a.fix.scroll&&b(d).unbind(a.nss.scroll).bind(a.nss.scroll,a.id,function(a,c){var f=e.settings[1],h;if(f.scroll.delay){for(;h=f.scroll.queue.shift();)clearTimeout(h);h=setTimeout(function(){for(;h=f.scroll.queue.shift();)clearTimeout(h);e.dbScroll(b(d).scrollLeft(),b(d).scrollTop())},f.scroll.delay);f.scroll.queue.push(h)}else e.dbScroll(b(d).scrollLeft(),b(d).scrollTop())}));a.link&&b(this).undelegate(a.link,a.nss.click).delegate(a.link,
a.nss.click,a.id,e.click=function(a){a.timeStamp=(new Date).getTime();var c=e.settings[1];if(!(!b(this).filter(c.filter).length||c.disable||a.isDefaultPrevented()||(c.location.href=e.canonicalizeURL(d.location.href),c.destination.href=e.canonicalizeURL(this.href),c.location.protocol!==c.destination.protocol||c.location.host!==c.destination.host||1<a.which||a.metaKey||a.ctrlKey||a.shiftKey||a.altKey))){var k,q;k=c.destination.href;c.area=e.fire(c.areaback,null,[a,c.parameter,c.destination.href,c.location.href]);
c.timestamp=a.timeStamp;c.landing&&(c.landing=!1);if(b(c.area).length&&(!c.scope||e.scope(c)))return c.database&&e.dbScroll(b(d).scrollLeft(),b(d).scrollTop()),c.cache[a.type.toLowerCase()]&&(q=b[e.name].getCache(k)),e.drive(b,d,f,h,e,c,a,k,!0,q),a.preventDefault()}});a.form&&b(this).undelegate(a.form,a.nss.submit).delegate(a.form,a.nss.submit,a.id,e.submit=function(a){a.timeStamp=(new Date).getTime();var c=e.settings[1];if(!(c.disable||a.isDefaultPrevented()||(c.location.href=e.canonicalizeURL(d.location.href),
c.destination.href=e.canonicalizeURL(this.action),c.location.protocol!==c.destination.protocol||c.location.host!==c.destination.host||1<a.which||a.metaKey||a.ctrlKey||a.shiftKey||a.altKey))){var k,q;k=c.destination.href=e.canonicalizeURL(c.destination.href.replace(/[?#].*/,"")+("GET"===a.target.method.toUpperCase()?"?"+b(a.target).serialize():""));c.area=e.fire(c.areaback,null,[a,c.parameter,c.destination.href,c.location.href]);c.timestamp=a.timeStamp;c.landing&&(c.landing=!1);if(b(c.area).length&&
(!c.scope||e.scope(c)))return c.database&&e.dbScroll(b(d).scrollLeft(),b(d).scrollTop()),c.cache[a.type.toLowerCase()]&&c.cache[a.target.method.toLowerCase()]&&(q=b[e.name].getCache(k)),e.drive(b,d,f,h,e,c,a,k,!0,q),a.preventDefault()}});b(d).unbind(a.nss.popstate).bind(a.nss.popstate,a.id,e.popstate=function(a){a.timeStamp=(new Date).getTime();var c=e.settings[1];if(!c.disable&&!a.isDefaultPrevented()){c.destination.href=e.canonicalizeURL(d.location.href);if(c.location.href===c.destination.href)return a.preventDefault();
var k,q;if(c.location.hash!==c.destination.hash&&c.location.pathname+c.location.search===c.destination.pathname+c.destination.search&&!c.hashquery)return a.preventDefault();k=c.destination.href;c.area=e.fire(c.areaback,null,[a,c.parameter,c.destination.href,c.location.href]);c.timestamp=a.timeStamp;if(c.landing){if(c.landing.href===k){c.landing=!1;return}c.landing=!1}if(b(c.area).length)return c.database&&c.fix.history&&e.dbTitle(k),c.cache[a.type.toLowerCase()]&&(q=b[e.name].getCache(k)),e.drive(b,
d,f,h,e,c,a,k,!1,q),a.preventDefault()}});(function(){function a(c){try{var e=c&&c("<body><noscript>DOMParser</noscript></body>");return"DOMParser"===b(e).find("noscript").text()}catch(d){}}var c=d.DOMParser;e.parseHTML=function(b){return c&&c.prototype&&(new c).parseFromString(b,"text/html")};a(e.parseHTML)||(e.parseHTML=function(b){var a;f.implementation&&f.implementation.createHTMLDocument&&(a=f.implementation.createHTMLDocument(""),"object"===typeof a.activeElement&&(a.open(),a.write(b),a.close()));
return a},a(e.parseHTML)||(e.parseHTML=!1))})()},drive:function(b,d,f,h,e,a,k,c,m,q){function u(a,b,e,d,f,g,h,k){a:{var r=g.callbacks.update;if(!1!==f.fire(r.before,null,[h,g.parameter,s,t,p,k],g.callbacks.async)){var n,l,u;try{g.relay&&4>g.relay.readyState&&g.relay.abort();if(!k&&-1===(p.getResponseHeader("Content-Type")||"").toLowerCase().search(g.contentType))throw Error("throw: content-type mismatch");k&&!1!==f.fire(r.cache.load.before,null,[h,g.parameter,k],g.callbacks.async)&&(p=k.XMLHttpRequest||
p,s=p.responseText,t=k.textStatus||t,l=k.css,u=k.script,f.fire(r.cache.load.after,null,[h,g.parameter,k],g.callbacks.async));var q,x,v,w,y,C,E;C=g.area.split(/\s*,\s*/);x=(p.responseText||"").replace(/<noscript[^>]*>(?:.|[\n\r])*?<\/noscript>/gim,function(a){return a.replace(/<script(?:.|[\n\r])*?<\/script>/gim,"")});if(k&&k.data){w=k.data;v=a(f.parseHTML&&w&&f.parseHTML(w)||w);x=x.replace(/<title[^>]*?>([^<]*?)<\/title>/i,function(a){return f.find(w,/(<title[^>]*?>[^<]*?<\/title>)/i).shift()||a});
q=a(f.parseHTML&&x&&f.parseHTML(x)||x);for(var A=0,B,z;B=C[A++];)q.find(B).add(y?"":q.filter(B)).html(v.find(B).add(y?"":v.filter(B)).contents())}else q=a(f.parseHTML&&x&&f.parseHTML(x)||x);switch(!0){case !!q.find("html")[0]:y=1;q.find("noscript").each(function(){this.children.length&&a(this).text(this.innerHTML)});break;case !!q.filter("title")[0]:y=0;break;default:y=!1}switch(y){case 1:n=q.find("title").text();break;case 0:n=q.filter("title").text();break;case !1:n=a("<span/>").html(f.find(x,/<title[^>]*?>([^<]*?)<\/title>/i).shift()).text()}if(!a(g.area).length||
!q.find(g.area).add(y?"":q.filter(g.area)).length)throw Error("throw: area length mismatch");a(b).trigger(g.gns+".unload");!1!==f.fire(r.url.before,null,[h,g.parameter,s,t,p],g.callbacks.async)&&(m&&c!==g.location.href&&b.history.pushState(f.fire(g.state,null,[h,g.parameter,g.destination.href,g.location.href]),b.opera||-1!==b.navigator.userAgent.toLowerCase().indexOf("opera")?n:e.title,c),g.location.href=c,m&&g.fix.location&&(a[f.name].off(),b.history.back(),b.history.forward(),a[f.name].on()),f.fire(r.url.after,
null,[h,g.parameter,s,t,p],g.callbacks.async));!1!==f.fire(r.title.before,null,[h,g.parameter,s,t,p],g.callbacks.async)&&(e.title=n,g.database&&g.fix.history&&f.dbTitle(c,n),f.fire(r.title.after,null,[h,g.parameter,s,t,p],g.callbacks.async));g.database&&f.dbCurrent();if(!1!==f.fire(r.content.before,null,[h,g.parameter,s,t,p],g.callbacks.async)){a(g.area).children("."+g.nss.class4html+"-check").remove();E=a("<div/>",{"class":g.nss.class4html+"-check",style:"background: none !important; display: block !important; visibility: hidden !important; position: absolute !important; top: 0 !important; left: 0 !important; z-index: -9999 !important; width: auto !important; height: 0 !important; margin: 0 !important; padding: 0 !important; border: none !important; font-size: 12px !important; text-indent: 0 !important;"}).text(g.gns);
for(A=0;B=C[A++];)z=q.find(B).add(y?"":q.filter(B)).clone().find("script").remove().end().contents(),a(B).html(z).append(E.clone());E=a(g.area).children("."+g.nss.class4html+"-check");a(e).trigger(g.gns+".DOMContentLoaded");f.fire(r.content.after,null,[h,g.parameter,s,t,p],g.callbacks.async)}var G=function(e){if(!1!==f.fire(r.scroll.before,null,[h,g.parameter],g.callbacks.async)){var c,d;switch(h.type.toLowerCase()){case "click":case "submit":c=e&&"function"===typeof g.scrollLeft?f.fire(g.scrollLeft,
null,[h,g.parameter,g.destination.href,g.location.href]):g.scrollLeft;c=0<=c?c:0;c=!1===c||null===c?a(b).scrollLeft():parseInt(Number(c),10);d=e&&"function"===typeof g.scrollTop?f.fire(g.scrollTop,null,[h,g.parameter,g.destination.href,g.location.href]):g.scrollTop;d=0<=d?d:0;d=!1===d||null===d?a(b).scrollTop():parseInt(Number(d),10);a(b).scrollTop()===d&&a(b).scrollLeft()===c||b.scrollTo(c,d);e&&g.database&&g.fix.scroll&&f.dbScroll(c,d);break;case "popstate":e&&g.database&&g.fix.scroll&&f.dbScroll()}f.fire(r.scroll.after,
null,[h,g.parameter],g.callbacks.async)}};G(!1);k&&k.XMLHttpRequest||!g.cache.click&&!g.cache.submit&&!g.cache.popstate||"submit"===h.type.toLowerCase()&&!g.cache[h.target.method.toLowerCase()]||!1===f.fire(r.cache.save.before,null,[h,g.parameter,k],g.callbacks.async)||(a[f.name].setCache(c,w||null,t,p),k=a[f.name].getCache(c),f.fire(r.cache.save.after,null,[h,g.parameter,k],g.callbacks.async));var H=function(b){if(!1!==f.fire(r.rendering.before,null,[h,g.parameter],g.callbacks.async)){var c=0;(function(){E.filter(function(){return this.clientWidth||
this.clientHeight||a(this).is(":hidden")}).length===E.length||100<=c?D(b):E.length&&(c++,setTimeout(arguments.callee,g.interval))})()}},D=function(c){E.remove();g.scroll.record=!0;f.hashscroll("popstate"===h.type.toLowerCase())||G(!0);a(b).trigger(g.gns+".load");f.fire(c);f.fire(r.rendering.after,null,[h,g.parameter],g.callbacks.async)};switch(y){case 1:case 0:q.find("noscript").remove();break;case !1:x=x.replace(/^(?:.|[\n\r])*<body[^>]*>.*[\n\r]*.*[\n\r]*/im,function(a){return a.replace(/\x3c!--\[(?:.|[\n\r])*?<!\[endif\]--\x3e/gim,
"")}),x=x.replace(/<noscript(?:.|[\n\r])*?<\/noscript>/gim,"")}var F=function(e){if(g.load.script&&!1!==f.fire(r.script.before,null,[h,g.parameter,s,t,p],g.callbacks.async)){var d;d=(k=a[f.name].getCache(c))&&!k.script;switch(u||y){case 1:case 0:u=q.find("script").add(y?"":q.filter("script")).clone().get();break;case !1:u=f.find(x,/(?:[^\'\"]|^\s*?)(<script[^>]*?>(?:.|[\n\r])*?<\/script>)(?:[^\'\"]|\s*?$)/gim)}u=a(u).not(g.load.reject);k&&k.script&&u&&u.length!==k.script.length&&(d=!0);d&&(k.script=
[]);for(var n=0,l,m;l=u[n];n++)if(l="object"===typeof l?d?a(l.outerHTML)[0]:l:a(l)[0],l="function"===typeof g.load.rewrite?f.fire(g.load.rewrite,null,[l.cloneNode()])||l:l,d&&(k.script[n]=l),a(l).is(e)&&(m=f.trim(l.src||""),!(m&&m in g.log.script||g.load.reject&&a(l).is(g.load.reject)))){!m||g.load.reload&&a(l).is(g.load.reload)||(g.log.script[m]=!0);try{m?a.ajax(a.extend(!0,{},g.ajax,g.load.ajax,{url:l.src,async:!!l.async,global:!1})):"object"!==typeof l||l.type&&-1===l.type.toLowerCase().indexOf("text/javascript")||
b.eval.call(b,(l.text||l.textContent||l.innerHTML||"").replace(/^\s*<!(?:\[CDATA\[|\-\-)/,"/*$0*/"))}catch(v){break}}f.fire(r.script.after,null,[h,g.parameter,s,t,p],g.callbacks.async)}};if(!1!==f.fire(r.verify.before,null,[h,g.parameter],g.callbacks.async)){if(c===f.canonicalizeURL(b.location.href))g.retry=!0;else if(g.retry)g.retry=!1,f.drive(a,b,e,d,f,g,h,b.location.href,!1,g.cache[h.type.toLowerCase()]&&a[f.name].getCache(f.canonicalizeURL(b.location.href)));else throw Error("throw: location mismatch");
f.fire(r.verify.after,null,[h,g.parameter],g.callbacks.async)}(function(){if(g.load.css&&!1!==f.fire(r.css.before,null,[h,g.parameter,s,t,p],g.callbacks.async)){var b,e=[],d=a('link[rel~="stylesheet"], style');b=(k=a[f.name].getCache(c))&&!k.css;switch(l||y){case 1:case 0:l=q.find('link[rel~="stylesheet"], style').add(y?"":q.filter('link[rel~="stylesheet"], style')).clone().get();break;case !1:l=f.find(x,/(<link[^>]*?rel=.[^"\']*?stylesheet[^>]*?>|<style[^>]*?>(?:.|[\n\r])*?<\/style>)/gim)}l=a(l).not(g.load.reject);
d=d.not(g.load.reload);k&&k.css&&l&&l.length!==k.css.length&&(b=!0);b&&(k.css=[]);for(var n=0,m,u;m=l[n];n++){m="object"===typeof m?b?a(m.outerHTML)[0]:m:a(m)[0];m="function"===typeof g.load.rewrite?f.fire(g.load.rewrite,null,[m.cloneNode()])||m:m;b&&(k.css[n]=m);u=f.trim(m.href||m.innerHTML||"");for(var v=0,w;w=d[v];v++)if(!e.length&&f.trim(w.href||w.innerHTML||"")===u){d=d.not(w);m=null;break}else if(!v&&e.length)break;m&&e.push(m)}d.remove();a("head").append(e);f.fire(r.css.after,null,[h,g.parameter,
s,t,p],g.callbacks.async)}})();a(e).trigger(g.gns+".ready");a(b).bind(g.gns+".rendering",function(b){a(b.target).unbind(b.type+".rendering",arguments.callee);F(":not([defer]), :not([src])");g.load.sync?H(function(){F("[src][defer]")}):(H(),F("[src][defer]"))}).trigger(g.gns+".rendering");if(!1===f.fire(r.success,null,[h,g.parameter,s,t,p],g.callbacks.async))break a;if(!1===f.fire(r.complete,null,[h,g.parameter,s,t,p],g.callbacks.async))break a;if(!1===f.fire(g.callback,null,[h,g.parameter,s,t,p],
g.callbacks.async))break a}catch(J){k&&a[f.name].removeCache(c);if(!1===f.fire(r.error,null,[h,g.parameter,s,t,p],g.callbacks.async))break a;if(!1===f.fire(r.complete,null,[h,g.parameter,s,t,p],g.callbacks.async))break a;if(g.fallback)return"function"===typeof g.fallback?f.fire(g.fallback,null,[h,g.parameter,g.destination.href,g.location.href]):f.fallback(h)}f.fire(r.after,null,[h,g.parameter,s,t,p],g.callbacks.async)}}}a.scroll.record=!1;a.fix.reset&&/click|submit/.test(k.type.toLowerCase())&&d.scrollTo(b(d).scrollLeft(),
0);if(!1!==e.fire(a.callbacks.before,null,[k,a.parameter],a.callbacks.async))if(q&&q.XMLHttpRequest)b.when?b.when(e.wait(e.fire(a.wait,null,[k,a.parameter,a.destination.href,a.location.href]))).done(function(){u(b,d,f,h,e,a,k,q)}):u(b,d,f,h,e,a,k,q);else if(a.relay)b.when(a.relay).done(function(){u(b,d,f,h,e,a,k,b[e.name].getCache(c))});else{var l,w,s,p,t,v;l={};switch(k.type.toLowerCase()){case "click":l.type="GET";break;case "submit":l.type=k.target.method.toUpperCase();"POST"===l.type&&(l.data=
b(k.target).serializeArray());break;case "popstate":l.type="GET"}w=b.when?b.Deferred():null;b.extend(!0,l,a.ajax,{xhr:a.callbacks.ajax.xhr?function(){p=e.fire(a.callbacks.ajax.xhr,null,[k,a.parameter],a.callbacks.async);return p="object"===typeof p&&p||b.ajaxSettings.xhr()}:h,beforeSend:function(b,c){p=b;a.xhr&&4>a.xhr.readyState&&a.xhr.abort();a.xhr=p;p.setRequestHeader(a.nss.requestHeader,"true");p.setRequestHeader(a.nss.requestHeader+"-Area",a.area);p.setRequestHeader(a.nss.requestHeader+"-CSS",
a.load.css);p.setRequestHeader(a.nss.requestHeader+"-Script",a.load.script);e.fire(a.callbacks.ajax.beforeSend,null,[k,a.parameter,p,c],a.callbacks.async)},dataFilter:a.callbacks.ajax.dataFilter?function(b,c){s=b;return e.fire(a.callbacks.ajax.dataFilter,null,[k,a.parameter,s,c],a.callbacks.async)||s}:h,success:function(b,c,d){s=b;t=c;p=d;e.fire(a.callbacks.ajax.success,null,[k,a.parameter,s,t,p],a.callbacks.async)},error:function(b,c,d){p=b;t=c;v=d;e.fire(a.callbacks.ajax.error,null,[k,a.parameter,
p,t,v],a.callbacks.async)},complete:function(c,l){p=c;t=l;e.fire(a.callbacks.ajax.complete,null,[k,a.parameter,p,t],a.callbacks.async);if(v){if(w&&w.reject(),a.fallback&&"abort"!==t)return"function"===typeof a.fallback?e.fire(a.fallback,null,[k,a.parameter,a.destination.href,a.location.href]):e.fallback(k)}else w&&w.resolve()||u(b,d,f,h,e,a,k,q)}});l.url=c.replace(/([^#]+)(#[^\s]*)?$/,"$1"+(a.server.query?(c.match(/\?/)?"&":"?")+encodeURIComponent(a.server.query)+"=1":"")+"$2");b.when&&b.when(w.promise(),
e.wait(e.fire(a.wait,null,[k,a.parameter,a.destination.href,a.location.href]))).done(function(){u(b,d,f,h,e,a,k,q)});b.ajax(l);e.fire(a.callbacks.after,null,[k,a.parameter],a.callbacks.async)}},canonicalizeURL:function(b){var d;d=h.trim(b);d=d.replace(/[<>"{}|\\^\[\]`\s].*/,"");d=/^https?:/i.test(d)?d:k("<a/>",{href:d})[0].href;d=encodeURI(decodeURI(d));return d=d.replace(/(?:%\w{2})+/g,function(d){return b.match(d.toLowerCase())||d})},trim:function(b){if(String.prototype.trim)b=String(b).trim();
else if(b=String(b).replace(/^\s+/,""))for(var d=b.length;--d;)if(/\S/.test(b.charAt(d))){b=b.substring(0,d+1);break}return b},fire:function(b,d,f,h){return"function"===typeof b?h?setTimeout(function(){b.apply(d,f)},0):b.apply(d,f):b},hashscroll:function(b){var d=h.settings[1].destination.hash.slice(1);return!(b||!d)&&k("#"+(d?d:", [name~="+d+"]")).first().each(function(){isFinite(k(this).offset().top)&&l.scrollTo(k(l).scrollLeft(),parseInt(Number(k(this).offset().top),10))}).length},wait:function(b){var d=
k.Deferred();if(!b)return d.resolve();setTimeout(function(){d.resolve()},b);return d.promise()},fallback:function(b){switch(b.type.toLowerCase()){case "click":l.location.href=b.currentTarget.href;break;case "submit":b.target.submit();break;case "popstate":l.location.reload()}},find:function(b,d){var f=[];b.replace(d,function(b,d){f.push(d)});return f},scope:function(b,d){var f,l,e,a,n,c,m,q,u,C,w,s,p,t;f=b.scope;e=b.location.href.replace(/.+?\w(\/[^#?]*).*/,"$1");a=b.destination.href.replace(/.+?\w(\/[^#?]*).*/,
"$1");l=e.replace(/^\//,"").replace(/([?#])/g,"/$1").split("/");c=(d||e).replace(/^\//,"").replace(/([?#])/g,"/$1").split("/");if(d){if(-1===d.indexOf("*"))return v;n=[];for(var A=c.length;A--;)"*"===c[A]&&n.unshift(l[A])}for(A=c.length+1;A--;)if(C=w=s=p=v,l=c.slice(0,A).join("/").replace(/\/([?#])/g,"$1"),(l="/"+l+("/"===(d||e).charAt(l.length+1)?"/":""))&&l in f){if(!f[l]||!f[l].length)return!1;for(var z=0;(m=f[l][z])&&!1!==s&&!1!==p;z++)if("rewrite"!==m||"function"!==typeof f.rewrite||d)if("inherit"===
m)w=!0;else if("string"===typeof m){m=(q="^"===m.charAt(0))?m.slice(1):m;m=(u="*"===m.charAt(0))?m.slice(1):m;if(d&&-1!==m.indexOf("/*/"))for(var D=0,I=n.length;D<I;D++)m=m.replace("/*/","/"+n[D]+"/");if(!(!q&&s||(u?e.search(m):e.indexOf(m)))){if(q)return!1;s=!0}if(!(!q&&p||(u?a.search(m):a.indexOf(m)))){if(q)return!1;p=!0}}else"object"===typeof m&&(t=m);else if(C=arguments.callee(b,h.fire(f.rewrite,null,[b.destination.href]))){s=p=!0;break}else if(!1===C)return!1;if(s&&p)return k.extend(!0,{},b,
("object"===typeof C?C:t)||{});if(!w)break}},database:function(b){var d=h.settings[1],f,r,e,a,n,c;f=d.gns;r=1;e=Math.floor(d.timestamp/864E5);a=h.IDBFactory;n=h.IDBDatabase;b=b||0;d.database=!1;if(!a||!f||5<b)return!1;try{var m=function(c){h.IDBDatabase=null;n&&n.close&&n.close();a.deleteDatabase(f);c?setTimeout(function(){h.database(++b)},c):h.database(++b)};r=parseInt(e-e%7+r,10);n=a.open(f);n.onblocked=function(){};n.onupgradeneeded=function(){var a=this.result;try{for(var b=a.objectStoreNames?
a.objectStoreNames.length:0;b--;)a.deleteObjectStore(a.objectStoreNames[b]);a.createObjectStore(d.gns,{keyPath:"id",autoIncrement:!1}).createIndex("date","date",{unique:!1})}catch(c){}};n.onsuccess=function(){try{n=this.result,h.IDBDatabase=n,(c=h.dbStore())?c.get("_version").onsuccess=function(){this.result&&r!==this.result.title?m():(h.dbVersion(r),h.dbCurrent(),h.dbTitle(d.location.href,z.title),h.dbScroll(k(l).scrollLeft(),k(l).scrollTop()),d.database=!0)}:m()}catch(a){m(1E3)}};n.onerror=function(a){m(1E3)}}catch(q){m(1E3)}},
dbStore:function(){for(var b=h.settings[1],d=h.IDBDatabase,f=d&&d.objectStoreNames?d.objectStoreNames.length:0;f--;)if(b.gns===d.objectStoreNames[f])return d&&d.transaction&&d.transaction(b.gns,"readwrite").objectStore(b.gns);return!1},dbCurrent:function(){var b=h.settings[1],d=h.dbStore();if(d){var f;f=h.canonicalizeURL(l.location.href);f=b.hashquery?f:f.replace(/#.*/,"");d.put({id:"_current",title:f})}},dbVersion:function(b){var d=h.dbStore();d&&d.put({id:"_version",title:b})},dbTitle:function(b,
d){var f=h.settings[1],l=h.dbStore();l&&(b=f.hashquery?b:b.replace(/#.*/,""),d?l.get(b).onsuccess=function(){l.put(k.extend(!0,{},this.result||{},{id:b,title:d,date:f.timestamp}));h.dbClean()}:l.get(b).onsuccess=function(){this.result&&this.result.title&&(z.title=this.result.title)})},dbScroll:function(b,d){var f=h.settings[1],r=h.dbStore(),e=f.location.href,a=arguments.length;f.scroll.record&&r&&(e=f.hashquery?e:e.replace(/#.*/,""),r.get("_current").onsuccess=function(){this.result&&this.result.title&&
e===this.result.title&&(a?r.get(e).onsuccess=function(){r.put(k.extend(!0,{},this.result||{},{scrollX:parseInt(Number(b),10),scrollY:parseInt(Number(d),10)}))}:r.get(e).onsuccess=function(){this.result&&isFinite(this.result.scrollX)&&isFinite(this.result.scrollY)&&l.scrollTo(parseInt(Number(this.result.scrollX),10),parseInt(Number(this.result.scrollY),10))})})},dbClean:function(){var b=h.settings[1],d=h.dbStore();d.count().onsuccess=function(){1E3<this.result&&(d.index("date").openCursor(h.IDBKeyRange.upperBound(b.timestamp-
2592E5)).onsuccess=function(){var b=this.result;b?(b["delete"](b.value.id),b["continue"]()):d.count().onsuccess=function(){1E3<this.result&&d.clear()}})}},share:function(){var b=h.settings[1];k.falsandtru||(k.fn.falsandtru=k.falsandtru=h.falsandtru);k.falsandtru("share","history",b.history);b.history=k.falsandtru("share","history")},falsandtru:function(b,d,f){var h;switch(!0){case d===v:h=k.falsandtru[b];break;case f===v:h=b in k.falsandtru?k.falsandtru[b][d]:v;break;case f!==v:k.falsandtru[b]instanceof
Object||(k.falsandtru[b]={}),k.falsandtru[b][d]instanceof Object&&f instanceof Object?k.extend(!0,k.falsandtru[b][d],f):k.falsandtru[b][d]=f,h=k.falsandtru[b][d]}return h}};(function(b,d,f,h,e){b.fn[e.name]=b[e.name]=function(){return D.apply(this,[b,d,f,h,e].concat([].slice.call(arguments)))};e.setProperties.call(b[e.name])}).apply(this,[].slice.call(arguments).concat([h]))})(jQuery,window,document,void 0);<commit_msg>Compress: jquery.pjax.js<commit_after>/*
 * 
 * pjax
 * 
 * ---
 * @Copyright(c) 2012, falsandtru
 * @license MIT http://opensource.org/licenses/mit-license.php
 * @version 1.31.10
 * @updated 2014/02/22
 * @author falsandtru https://github.com/falsandtru/
 * @Compressor Closure Compiler
 */
(function(k,l,z,v){function D(a,d,f,r,e,b){var n=this;switch(!0){case "object"===typeof b:n=n instanceof a?n:a(f);n=e.setProperties.call(n,b.ns||"",null);if(!b.area&&!b.scope)return n;break;default:return n=n instanceof a?n:a[e.name],e.setProperties.call(n,null,null)}var c;c=a.extend(!0,{id:0,gns:e.name,ns:null,area:null,link:"a:not([target])",filter:function(){return/(\/|\.html?|\.php)([#?].*)?$/.test(this.href)},form:null,scope:null,state:null,scrollTop:0,scrollLeft:0,ajax:{dataType:"text"},contentType:"text/html",
cache:{click:!1,submit:!1,popstate:!1,get:!0,post:!0,length:9,size:1048576,expire:18E5},callback:function(){},callbacks:{ajax:{},update:{url:{},title:{},content:{},scroll:{},css:{},script:{},cache:{load:{},save:{}},rendering:{},verify:{}},async:!1},parameter:null,load:{css:!1,script:!1,execute:!0,reload:"",reject:"",sync:!0,ajax:{dataType:"script"},rewrite:null},interval:300,wait:0,scroll:{delay:300},fix:{location:!0,history:!0,scroll:!0,reset:!1},hashquery:!1,fallback:!0,database:!0,server:{query:"pjax"}},
b);c.location=a("<a/>",{href:e.canonicalizeURL(d.location.href)})[0];c.destination=a("<a/>",{href:e.canonicalizeURL(d.location.href)})[0];c.nss={array:[e.name].concat(c.ns&&String(c.ns).split(".")||[])};a.extend(!0,c=c.scope&&e.scope(c)||c,{nss:{name:c.ns||"",event:c.nss.array.join("."),alias:e.alias?[e.alias].concat(c.nss.array.slice(1)).join("."):!1,click:["click"].concat(c.nss.array.join(":")).join("."),submit:["submit"].concat(c.nss.array.join(":")).join("."),popstate:["popstate"].concat(c.nss.array.join(":")).join("."),
scroll:["scroll"].concat(c.nss.array.join(":")).join("."),data:c.nss.array.join("-"),class4html:c.nss.array.join("-"),requestHeader:["X",c.nss.array[0].replace(/^\w/,function(c){return c.toUpperCase()})].join("-")},areaback:c.area,fix:/Mobile(\/\w+)? Safari/i.test(d.navigator.userAgent)?{}:{location:!1,reset:!1},contentType:c.contentType.replace(/\s*[,;]\s*/g,"|").toLowerCase(),scroll:{record:!0,queue:[]},log:{script:{},speed:{}},history:{config:c.cache,order:[],data:{},size:0},timestamp:(new Date).getTime(),
disable:!1,landing:e.canonicalizeURL(d.location.href),retry:!0,xhr:null,speed:{now:function(){return(new Date).getTime()}},option:b});e.check()&&e.registrate.call(n,a,d,f,r,e,c);return n}var h;h={name:"pjax",alias:"",ids:[],settings:[0],count:0,setAlias:function(a){h.alias="string"===typeof a?a:h.alias;h.name===h.alias||k[h.alias]||(k[h.name][h.alias]=k.fn[h.name],k.fn[h.alias]=k[h.alias]=k.fn[h.name])},IDBFactory:l.indexedDB||l.webkitIndexedDB||l.mozIndexedDB||l.msIndexedDB,IDBDatabase:null,IDBKeyRange:l.IDBKeyRange||
l.webkitIDBKeyRange||l.mozIDBKeyRange||l.msIDBKeyRange,parseHTML:null,setProperties:function(a,d){var f=this;if(f instanceof k||f===k[h.name])f=f instanceof k&&d!==v?f.add(d):f,f[h.name]=k[h.name],f.on=function(){h.settings[1].disable=!1},f.off=function(){h.settings[1].disable=!0},f.click=function(a,e){var b;switch(!0){case "object"===typeof a:b=k(a);break;case !!a:e=e||{};e.href=a;b=k("<a/>",e);break;default:return this}return b.first().one("click",1,h.click).click()},f.submit=function(a,e,b){var n=
z.createDocumentFragment(),c;switch(!0){case "object"===typeof a:e=k(a);break;case !!b:e=e||{};e.action=a;a=b instanceof Array&&Array||b instanceof Object&&Object||v;for(var d in b){c=b[d];switch(a){case Object:c=k("<textarea/>",{name:d}).val(c);break;case Array:c.attr=c.attr||{};c.attr.name=c.name;c=k(c.tag.indexOf("<")?"<"+c.tag+"/>":c.tag,c.attr||{}).val(c.value);break;default:continue}n.appendChild(c[0])}e=k("<form/>",e).append(n);break;default:return this}return e.first().one("submit",1,h.submit).submit()},
f.setCache=function(a,e,b,n){var c=h.settings[1];if(!c||!c.history)return!1;var d,f,u;d=c.history;a=h.canonicalizeURL(a||l.location.href);a=c.hashquery?a:a.replace(/#.*/,"");switch(arguments.length){case 0:case 1:return arguments.callee.call(this,a,h.trim(z.documentElement.outerHTML));default:d.order.unshift(a);for(f=1;u=d.order[f];f++)a===u&&d.order.splice(f,1);d.size>d.config.size&&k[h.name].cleanCache();k[h.name].getCache(a);f=k("<span/>").html(h.find((e||"")+((n||{}).responseText||"")+"<title></title>",
/<title[^>]*?>([^<]*?)<\/title>/i).shift()).text();u=parseInt(1.8*((e||"").length+((n||{}).responseText||"").length)||1048576,10);d.size=d.size||0;d.size+=u;d.data[a]=k.extend(!0,d.data[a]||{},{XMLHttpRequest:n,textStatus:b,data:e,size:u,timestamp:(new Date).getTime()});c.database&&c.fix.history&&h.dbTitle(a,f)}return d.data[a]},f.getCache=function(a){var e=h.settings[1];if(!e||!e.history)return!1;var b;b=e.history;a=h.canonicalizeURL(a||l.location.href);a=e.hashquery?a:a.replace(/#.*/,"");b.data[a]&&
e.timestamp>b.data[a].timestamp+b.config.expire&&k[h.name].removeCache(a);return b.data[a]},f.removeCache=function(a){var e=h.settings[1];if(!e||!e.history)return!1;var b;b=e.history;a=h.canonicalizeURL(a||l.location.href);a=e.hashquery?a:a.replace(/#.*/,"");for(var e=0,d;d=b.order[e];e++)a===d&&(b.order.splice(e,1),b.size-=b.data[d].size,b.data[d]=null,delete b.data[d]);return!0},f.clearCache=function(){var a=h.settings[1];if(!a||!a.history)return!1;for(var a=a.history,e=a.order.length,b;b=a.order[--e];)a.order.splice(e,
1),a.size-=a.data[b].size,delete a.data[b];return!0},f.cleanCache=function(){var a=h.settings[1];if(!a||!a.history)return!1;for(var e=a.history,b=e.order.length,d;d=e.order[--b];)if(b>=e.config.length||d in e.data&&a.timestamp>e.data[d].timestamp+e.config.expire)e.order.splice(b,1),e.size-=e.data[d].size,delete e.data[d];return!0},f.follow=function(a,e){var b=h.settings[1];return b&&k.when?(b.xhr=e,k.when(e).done(function(){b.xhr&&4>b.xhr.readyState&&b.xhr.abort();k[h.name].setCache(a,v,v,e)}).fail(function(){h.fallback({type:"click",
currentTarget:{href:a}})}),k[h.name].click(a),!0):!1};return f},check:function(){return h.supportPushState()},supportPushState:function(){return"pushState"in l.history&&l.history.pushState},registrate:function(a,d,f,h,e,b){b.id=1;e.ids.push(b.id);e.settings[b.id]=b;e.share();b.load.script&&a("script").each(function(){var d=this,c,d="function"===typeof b.load.rewrite?e.fire(b.load.rewrite,null,[d.cloneNode()])||d:d;(c=d.src)&&c in b.log.script||!c||b.load.reload&&a(d).is(b.load.reload)||(b.log.script[c]=
!0)});b.database&&(e.database(),b.fix.scroll&&a(d).unbind(b.nss.scroll).bind(b.nss.scroll,b.id,function(b,c){var f=e.settings[1],h;if(f.scroll.delay){for(;h=f.scroll.queue.shift();)clearTimeout(h);h=setTimeout(function(){for(;h=f.scroll.queue.shift();)clearTimeout(h);e.dbScroll(a(d).scrollLeft(),a(d).scrollTop())},f.scroll.delay);f.scroll.queue.push(h)}else e.dbScroll(a(d).scrollLeft(),a(d).scrollTop())}));b.link&&a(this).undelegate(b.link,b.nss.click).delegate(b.link,b.nss.click,b.id,e.click=function(b){b.timeStamp=
(new Date).getTime();var c=e.settings[1];if(!(!a(this).filter(c.filter).length||c.disable||b.isDefaultPrevented()||(c.location.href=e.canonicalizeURL(d.location.href),c.destination.href=e.canonicalizeURL(this.href),c.location.protocol!==c.destination.protocol||c.location.host!==c.destination.host||1<b.which||b.metaKey||b.ctrlKey||b.shiftKey||b.altKey))){var k,q;k=c.destination.href;c.area=e.fire(c.areaback,null,[b,c.parameter,c.destination.href,c.location.href]);c.timestamp=b.timeStamp;c.landing&&
(c.landing=!1);if(a(c.area).length&&(!c.scope||e.scope(c)))return c.database&&e.dbScroll(a(d).scrollLeft(),a(d).scrollTop()),c.cache[b.type.toLowerCase()]&&(q=a[e.name].getCache(k)),e.drive(a,d,f,h,e,c,b,k,!0,q),b.preventDefault()}});b.form&&a(this).undelegate(b.form,b.nss.submit).delegate(b.form,b.nss.submit,b.id,e.submit=function(b){b.timeStamp=(new Date).getTime();var c=e.settings[1];if(!(c.disable||b.isDefaultPrevented()||(c.location.href=e.canonicalizeURL(d.location.href),c.destination.href=
e.canonicalizeURL(this.action),c.location.protocol!==c.destination.protocol||c.location.host!==c.destination.host||1<b.which||b.metaKey||b.ctrlKey||b.shiftKey||b.altKey))){var k,q;k=c.destination.href=e.canonicalizeURL(c.destination.href.replace(/[?#].*/,"")+("GET"===b.target.method.toUpperCase()?"?"+a(b.target).serialize():""));c.area=e.fire(c.areaback,null,[b,c.parameter,c.destination.href,c.location.href]);c.timestamp=b.timeStamp;c.landing&&(c.landing=!1);if(a(c.area).length&&(!c.scope||e.scope(c)))return c.database&&
e.dbScroll(a(d).scrollLeft(),a(d).scrollTop()),c.cache[b.type.toLowerCase()]&&c.cache[b.target.method.toLowerCase()]&&(q=a[e.name].getCache(k)),e.drive(a,d,f,h,e,c,b,k,!0,q),b.preventDefault()}});a(d).unbind(b.nss.popstate).bind(b.nss.popstate,b.id,e.popstate=function(b){b.timeStamp=(new Date).getTime();var c=e.settings[1];if(!c.disable&&!b.isDefaultPrevented()){c.destination.href=e.canonicalizeURL(d.location.href);if(c.location.href===c.destination.href)return b.preventDefault();var k,q;if(c.location.hash!==
c.destination.hash&&c.location.pathname+c.location.search===c.destination.pathname+c.destination.search&&!c.hashquery)return b.preventDefault();k=c.destination.href;c.area=e.fire(c.areaback,null,[b,c.parameter,c.destination.href,c.location.href]);c.timestamp=b.timeStamp;if(c.landing){if(c.landing.href===k){c.landing=!1;return}c.landing=!1}if(a(c.area).length)return c.database&&c.fix.history&&e.dbTitle(k),c.cache[b.type.toLowerCase()]&&(q=a[e.name].getCache(k)),e.drive(a,d,f,h,e,c,b,k,!1,q),b.preventDefault()}});
(function(){function b(c){try{var e=c&&c("<body><noscript>DOMParser</noscript></body>");return"DOMParser"===a(e).find("noscript").text()}catch(d){}}var c=d.DOMParser;e.parseHTML=function(a){return c&&c.prototype&&(new c).parseFromString(a,"text/html")};b(e.parseHTML)||(e.parseHTML=function(a){var b;f.implementation&&f.implementation.createHTMLDocument&&(b=f.implementation.createHTMLDocument(""),"object"===typeof b.activeElement&&(b.open(),b.write(a),b.close()));return b},b(e.parseHTML)||(e.parseHTML=
!1))})()},drive:function(a,d,f,h,e,b,k,c,m,q){function u(a,b,e,d,f,g,h,k){a:{var r=g.callbacks.update;if(!1!==f.fire(r.before,null,[h,g.parameter,s,t,p,k],g.callbacks.async)){var n,l,u;try{g.xhr&&4>g.xhr.readyState&&g.xhr.abort();g.xhr=null;if(!k&&-1===(p.getResponseHeader("Content-Type")||"").toLowerCase().search(g.contentType))throw Error("throw: content-type mismatch");k&&!1!==f.fire(r.cache.load.before,null,[h,g.parameter,k],g.callbacks.async)&&(p=k.XMLHttpRequest||p,s=p.responseText,t=k.textStatus||
t,l=k.css,u=k.script,f.fire(r.cache.load.after,null,[h,g.parameter,k],g.callbacks.async));var q,x,v,w,y,C,E;C=g.area.split(/\s*,\s*/);x=(p.responseText||"").replace(/<noscript[^>]*>(?:.|[\n\r])*?<\/noscript>/gim,function(a){return a.replace(/<script(?:.|[\n\r])*?<\/script>/gim,"")});if(k&&k.data){w=k.data;v=a(f.parseHTML&&w&&f.parseHTML(w)||w);x=x.replace(/<title[^>]*?>([^<]*?)<\/title>/i,function(a){return f.find(w,/(<title[^>]*?>[^<]*?<\/title>)/i).shift()||a});q=a(f.parseHTML&&x&&f.parseHTML(x)||
x);for(var A=0,B,z;B=C[A++];)q.find(B).add(y?"":q.filter(B)).html(v.find(B).add(y?"":v.filter(B)).contents())}else q=a(f.parseHTML&&x&&f.parseHTML(x)||x);switch(!0){case !!q.find("html")[0]:y=1;q.find("noscript").each(function(){this.children.length&&a(this).text(this.innerHTML)});break;case !!q.filter("title")[0]:y=0;break;default:y=!1}switch(y){case 1:n=q.find("title").text();break;case 0:n=q.filter("title").text();break;case !1:n=a("<span/>").html(f.find(x,/<title[^>]*?>([^<]*?)<\/title>/i).shift()).text()}if(!a(g.area).length||
!q.find(g.area).add(y?"":q.filter(g.area)).length)throw Error("throw: area length mismatch");a(b).trigger(g.gns+".unload");!1!==f.fire(r.url.before,null,[h,g.parameter,s,t,p],g.callbacks.async)&&(m&&c!==g.location.href&&b.history.pushState(f.fire(g.state,null,[h,g.parameter,g.destination.href,g.location.href]),b.opera||-1!==b.navigator.userAgent.toLowerCase().indexOf("opera")?n:e.title,c),g.location.href=c,m&&g.fix.location&&(a[f.name].off(),b.history.back(),b.history.forward(),a[f.name].on()),f.fire(r.url.after,
null,[h,g.parameter,s,t,p],g.callbacks.async));!1!==f.fire(r.title.before,null,[h,g.parameter,s,t,p],g.callbacks.async)&&(e.title=n,g.database&&g.fix.history&&f.dbTitle(c,n),f.fire(r.title.after,null,[h,g.parameter,s,t,p],g.callbacks.async));g.database&&f.dbCurrent();if(!1!==f.fire(r.content.before,null,[h,g.parameter,s,t,p],g.callbacks.async)){a(g.area).children("."+g.nss.class4html+"-check").remove();E=a("<div/>",{"class":g.nss.class4html+"-check",style:"background: none !important; display: block !important; visibility: hidden !important; position: absolute !important; top: 0 !important; left: 0 !important; z-index: -9999 !important; width: auto !important; height: 0 !important; margin: 0 !important; padding: 0 !important; border: none !important; font-size: 12px !important; text-indent: 0 !important;"}).text(g.gns);
for(A=0;B=C[A++];)z=q.find(B).add(y?"":q.filter(B)).clone().find("script").remove().end().contents(),a(B).html(z).append(E.clone());E=a(g.area).children("."+g.nss.class4html+"-check");a(e).trigger(g.gns+".DOMContentLoaded");f.fire(r.content.after,null,[h,g.parameter,s,t,p],g.callbacks.async)}var G=function(e){if(!1!==f.fire(r.scroll.before,null,[h,g.parameter],g.callbacks.async)){var c,d;switch(h.type.toLowerCase()){case "click":case "submit":c=e&&"function"===typeof g.scrollLeft?f.fire(g.scrollLeft,
null,[h,g.parameter,g.destination.href,g.location.href]):g.scrollLeft;c=0<=c?c:0;c=!1===c||null===c?a(b).scrollLeft():parseInt(Number(c),10);d=e&&"function"===typeof g.scrollTop?f.fire(g.scrollTop,null,[h,g.parameter,g.destination.href,g.location.href]):g.scrollTop;d=0<=d?d:0;d=!1===d||null===d?a(b).scrollTop():parseInt(Number(d),10);a(b).scrollTop()===d&&a(b).scrollLeft()===c||b.scrollTo(c,d);e&&g.database&&g.fix.scroll&&f.dbScroll(c,d);break;case "popstate":e&&g.database&&g.fix.scroll&&f.dbScroll()}f.fire(r.scroll.after,
null,[h,g.parameter],g.callbacks.async)}};G(!1);k&&k.XMLHttpRequest||!g.cache.click&&!g.cache.submit&&!g.cache.popstate||"submit"===h.type.toLowerCase()&&!g.cache[h.target.method.toLowerCase()]||!1===f.fire(r.cache.save.before,null,[h,g.parameter,k],g.callbacks.async)||(a[f.name].setCache(c,w||null,t,p),k=a[f.name].getCache(c),f.fire(r.cache.save.after,null,[h,g.parameter,k],g.callbacks.async));var H=function(b){if(!1!==f.fire(r.rendering.before,null,[h,g.parameter],g.callbacks.async)){var c=0;(function(){E.filter(function(){return this.clientWidth||
this.clientHeight||a(this).is(":hidden")}).length===E.length||100<=c?D(b):E.length&&(c++,setTimeout(arguments.callee,g.interval))})()}},D=function(c){E.remove();g.scroll.record=!0;f.hashscroll("popstate"===h.type.toLowerCase())||G(!0);a(b).trigger(g.gns+".load");f.fire(c);f.fire(r.rendering.after,null,[h,g.parameter],g.callbacks.async)};switch(y){case 1:case 0:q.find("noscript").remove();break;case !1:x=x.replace(/^(?:.|[\n\r])*<body[^>]*>.*[\n\r]*.*[\n\r]*/im,function(a){return a.replace(/\x3c!--\[(?:.|[\n\r])*?<!\[endif\]--\x3e/gim,
"")}),x=x.replace(/<noscript(?:.|[\n\r])*?<\/noscript>/gim,"")}var F=function(e){if(g.load.script&&!1!==f.fire(r.script.before,null,[h,g.parameter,s,t,p],g.callbacks.async)){var d;d=(k=a[f.name].getCache(c))&&!k.script;switch(u||y){case 1:case 0:u=q.find("script").add(y?"":q.filter("script")).clone().get();break;case !1:u=f.find(x,/(?:[^\'\"]|^\s*?)(<script[^>]*?>(?:.|[\n\r])*?<\/script>)(?:[^\'\"]|\s*?$)/gim)}u=a(u).not(g.load.reject);k&&k.script&&u&&u.length!==k.script.length&&(d=!0);d&&(k.script=
[]);for(var n=0,l,m;l=u[n];n++)if(l="object"===typeof l?d?a(l.outerHTML)[0]:l:a(l)[0],l="function"===typeof g.load.rewrite?f.fire(g.load.rewrite,null,[l.cloneNode()])||l:l,d&&(k.script[n]=l),a(l).is(e)&&(m=f.trim(l.src||""),!(m&&m in g.log.script||g.load.reject&&a(l).is(g.load.reject)))){!m||g.load.reload&&a(l).is(g.load.reload)||(g.log.script[m]=!0);try{m?a.ajax(a.extend(!0,{},g.ajax,g.load.ajax,{url:l.src,async:!!l.async,global:!1})):"object"!==typeof l||l.type&&-1===l.type.toLowerCase().indexOf("text/javascript")||
b.eval.call(b,(l.text||l.textContent||l.innerHTML||"").replace(/^\s*<!(?:\[CDATA\[|\-\-)/,"/*$0*/"))}catch(v){break}}f.fire(r.script.after,null,[h,g.parameter,s,t,p],g.callbacks.async)}};if(!1!==f.fire(r.verify.before,null,[h,g.parameter],g.callbacks.async)){if(c===f.canonicalizeURL(b.location.href))g.retry=!0;else if(g.retry)g.retry=!1,f.drive(a,b,e,d,f,g,h,b.location.href,!1,g.cache[h.type.toLowerCase()]&&a[f.name].getCache(f.canonicalizeURL(b.location.href)));else throw Error("throw: location mismatch");
f.fire(r.verify.after,null,[h,g.parameter],g.callbacks.async)}(function(){if(g.load.css&&!1!==f.fire(r.css.before,null,[h,g.parameter,s,t,p],g.callbacks.async)){var b,e=[],d=a('link[rel~="stylesheet"], style');b=(k=a[f.name].getCache(c))&&!k.css;switch(l||y){case 1:case 0:l=q.find('link[rel~="stylesheet"], style').add(y?"":q.filter('link[rel~="stylesheet"], style')).clone().get();break;case !1:l=f.find(x,/(<link[^>]*?rel=.[^"\']*?stylesheet[^>]*?>|<style[^>]*?>(?:.|[\n\r])*?<\/style>)/gim)}l=a(l).not(g.load.reject);
d=d.not(g.load.reload);k&&k.css&&l&&l.length!==k.css.length&&(b=!0);b&&(k.css=[]);for(var n=0,m,u;m=l[n];n++){m="object"===typeof m?b?a(m.outerHTML)[0]:m:a(m)[0];m="function"===typeof g.load.rewrite?f.fire(g.load.rewrite,null,[m.cloneNode()])||m:m;b&&(k.css[n]=m);u=f.trim(m.href||m.innerHTML||"");for(var v=0,w;w=d[v];v++)if(!e.length&&f.trim(w.href||w.innerHTML||"")===u){d=d.not(w);m=null;break}else if(!v&&e.length)break;m&&e.push(m)}d.remove();a("head").append(e);f.fire(r.css.after,null,[h,g.parameter,
s,t,p],g.callbacks.async)}})();a(e).trigger(g.gns+".ready");a(b).bind(g.gns+".rendering",function(b){a(b.target).unbind(b.type+".rendering",arguments.callee);F(":not([defer]), :not([src])");g.load.sync?H(function(){F("[src][defer]")}):(H(),F("[src][defer]"))}).trigger(g.gns+".rendering");if(!1===f.fire(r.success,null,[h,g.parameter,s,t,p],g.callbacks.async))break a;if(!1===f.fire(r.complete,null,[h,g.parameter,s,t,p],g.callbacks.async))break a;if(!1===f.fire(g.callback,null,[h,g.parameter,s,t,p],
g.callbacks.async))break a}catch(J){k&&a[f.name].removeCache(c);if(!1===f.fire(r.error,null,[h,g.parameter,s,t,p],g.callbacks.async))break a;if(!1===f.fire(r.complete,null,[h,g.parameter,s,t,p],g.callbacks.async))break a;if(g.fallback)return"function"===typeof g.fallback?f.fire(g.fallback,null,[h,g.parameter,g.destination.href,g.location.href]):f.fallback(h)}f.fire(r.after,null,[h,g.parameter,s,t,p],g.callbacks.async)}}}b.scroll.record=!1;b.fix.reset&&/click|submit/.test(k.type.toLowerCase())&&d.scrollTo(a(d).scrollLeft(),
0);if(!1!==e.fire(b.callbacks.before,null,[k,b.parameter],b.callbacks.async))if(q&&q.XMLHttpRequest)a.when?a.when(e.wait(e.fire(b.wait,null,[k,b.parameter,b.destination.href,b.location.href]))).done(function(){u(a,d,f,h,e,b,k,q)}):u(a,d,f,h,e,b,k,q);else if(b.xhr&&b.xhr.promise)a.when(b.xhr).done(function(){u(a,d,f,h,e,b,k,a[e.name].getCache(c))});else{var l,w,s,p,t,v;l={};switch(k.type.toLowerCase()){case "click":l.type="GET";break;case "submit":l.type=k.target.method.toUpperCase();"POST"===l.type&&
(l.data=a(k.target).serializeArray());break;case "popstate":l.type="GET"}w=a.when?a.Deferred():null;a.extend(!0,l,b.ajax,{xhr:b.callbacks.ajax.xhr?function(){p=e.fire(b.callbacks.ajax.xhr,null,[k,b.parameter],b.callbacks.async);return p="object"===typeof p&&p||a.ajaxSettings.xhr()}:h,beforeSend:function(a,c){p=a;b.xhr&&4>b.xhr.readyState&&b.xhr.abort();b.xhr=p;p.setRequestHeader(b.nss.requestHeader,"true");p.setRequestHeader(b.nss.requestHeader+"-Area",b.area);p.setRequestHeader(b.nss.requestHeader+
"-CSS",b.load.css);p.setRequestHeader(b.nss.requestHeader+"-Script",b.load.script);e.fire(b.callbacks.ajax.beforeSend,null,[k,b.parameter,p,c],b.callbacks.async)},dataFilter:b.callbacks.ajax.dataFilter?function(a,c){s=a;return e.fire(b.callbacks.ajax.dataFilter,null,[k,b.parameter,s,c],b.callbacks.async)||s}:h,success:function(a,c,d){s=a;t=c;p=d;e.fire(b.callbacks.ajax.success,null,[k,b.parameter,s,t,p],b.callbacks.async)},error:function(a,c,d){p=a;t=c;v=d;e.fire(b.callbacks.ajax.error,null,[k,b.parameter,
p,t,v],b.callbacks.async)},complete:function(c,l){p=c;t=l;e.fire(b.callbacks.ajax.complete,null,[k,b.parameter,p,t],b.callbacks.async);if(v){if(w&&w.reject(),b.fallback&&"abort"!==t)return"function"===typeof b.fallback?e.fire(b.fallback,null,[k,b.parameter,b.destination.href,b.location.href]):e.fallback(k)}else w&&w.resolve()||u(a,d,f,h,e,b,k,q)}});l.url=c.replace(/([^#]+)(#[^\s]*)?$/,"$1"+(b.server.query?(c.match(/\?/)?"&":"?")+encodeURIComponent(b.server.query)+"=1":"")+"$2");a.when&&a.when(w.promise(),
e.wait(e.fire(b.wait,null,[k,b.parameter,b.destination.href,b.location.href]))).done(function(){u(a,d,f,h,e,b,k,q)});a.ajax(l);e.fire(b.callbacks.after,null,[k,b.parameter],b.callbacks.async)}},canonicalizeURL:function(a){var d;d=h.trim(a);d=d.replace(/[<>"{}|\\^\[\]`\s].*/,"");d=/^https?:/i.test(d)?d:k("<a/>",{href:d})[0].href;d=encodeURI(decodeURI(d));return d=d.replace(/(?:%\w{2})+/g,function(d){return a.match(d.toLowerCase())||d})},trim:function(a){if(String.prototype.trim)a=String(a).trim();
else if(a=String(a).replace(/^\s+/,""))for(var d=a.length;--d;)if(/\S/.test(a.charAt(d))){a=a.substring(0,d+1);break}return a},fire:function(a,d,f,h){return"function"===typeof a?h?setTimeout(function(){a.apply(d,f)},0):a.apply(d,f):a},hashscroll:function(a){var d=h.settings[1].destination.hash.slice(1);return!(a||!d)&&k("#"+(d?d:", [name~="+d+"]")).first().each(function(){isFinite(k(this).offset().top)&&l.scrollTo(k(l).scrollLeft(),parseInt(Number(k(this).offset().top),10))}).length},wait:function(a){var d=
k.Deferred();if(!a)return d.resolve();setTimeout(function(){d.resolve()},a);return d.promise()},fallback:function(a){switch(a.type.toLowerCase()){case "click":l.location.href=a.currentTarget.href;break;case "submit":a.target.submit();break;case "popstate":l.location.reload()}},find:function(a,d){var f=[];a.replace(d,function(a,d){f.push(d)});return f},scope:function(a,d){var f,l,e,b,n,c,m,q,u,C,w,s,p,t;f=a.scope;e=a.location.href.replace(/.+?\w(\/[^#?]*).*/,"$1");b=a.destination.href.replace(/.+?\w(\/[^#?]*).*/,
"$1");l=e.replace(/^\//,"").replace(/([?#])/g,"/$1").split("/");c=(d||e).replace(/^\//,"").replace(/([?#])/g,"/$1").split("/");if(d){if(-1===d.indexOf("*"))return v;n=[];for(var A=c.length;A--;)"*"===c[A]&&n.unshift(l[A])}for(A=c.length+1;A--;)if(C=w=s=p=v,l=c.slice(0,A).join("/").replace(/\/([?#])/g,"$1"),(l="/"+l+("/"===(d||e).charAt(l.length+1)?"/":""))&&l in f){if(!f[l]||!f[l].length)return!1;for(var z=0;(m=f[l][z])&&!1!==s&&!1!==p;z++)if("rewrite"!==m||"function"!==typeof f.rewrite||d)if("inherit"===
m)w=!0;else if("string"===typeof m){m=(q="^"===m.charAt(0))?m.slice(1):m;m=(u="*"===m.charAt(0))?m.slice(1):m;if(d&&-1!==m.indexOf("/*/"))for(var D=0,I=n.length;D<I;D++)m=m.replace("/*/","/"+n[D]+"/");if(!(!q&&s||(u?e.search(m):e.indexOf(m)))){if(q)return!1;s=!0}if(!(!q&&p||(u?b.search(m):b.indexOf(m)))){if(q)return!1;p=!0}}else"object"===typeof m&&(t=m);else if(C=arguments.callee(a,h.fire(f.rewrite,null,[a.destination.href]))){s=p=!0;break}else if(!1===C)return!1;if(s&&p)return k.extend(!0,{},a,
("object"===typeof C?C:t)||{});if(!w)break}},database:function(a){var d=h.settings[1],f,r,e,b,n,c;f=d.gns;r=1;e=Math.floor(d.timestamp/864E5);b=h.IDBFactory;n=h.IDBDatabase;a=a||0;d.database=!1;if(!b||!f||5<a)return!1;try{var m=function(c){h.IDBDatabase=null;n&&n.close&&n.close();b.deleteDatabase(f);c?setTimeout(function(){h.database(++a)},c):h.database(++a)};r=parseInt(e-e%7+r,10);n=b.open(f);n.onblocked=function(){};n.onupgradeneeded=function(){var a=this.result;try{for(var b=a.objectStoreNames?
a.objectStoreNames.length:0;b--;)a.deleteObjectStore(a.objectStoreNames[b]);a.createObjectStore(d.gns,{keyPath:"id",autoIncrement:!1}).createIndex("date","date",{unique:!1})}catch(c){}};n.onsuccess=function(){try{n=this.result,h.IDBDatabase=n,(c=h.dbStore())?c.get("_version").onsuccess=function(){this.result&&r!==this.result.title?m():(h.dbVersion(r),h.dbCurrent(),h.dbTitle(d.location.href,z.title),h.dbScroll(k(l).scrollLeft(),k(l).scrollTop()),d.database=!0)}:m()}catch(a){m(1E3)}};n.onerror=function(a){m(1E3)}}catch(q){m(1E3)}},
dbStore:function(){for(var a=h.settings[1],d=h.IDBDatabase,f=d&&d.objectStoreNames?d.objectStoreNames.length:0;f--;)if(a.gns===d.objectStoreNames[f])return d&&d.transaction&&d.transaction(a.gns,"readwrite").objectStore(a.gns);return!1},dbCurrent:function(){var a=h.settings[1],d=h.dbStore();if(d){var f;f=h.canonicalizeURL(l.location.href);f=a.hashquery?f:f.replace(/#.*/,"");d.put({id:"_current",title:f})}},dbVersion:function(a){var d=h.dbStore();d&&d.put({id:"_version",title:a})},dbTitle:function(a,
d){var f=h.settings[1],l=h.dbStore();l&&(a=f.hashquery?a:a.replace(/#.*/,""),d?l.get(a).onsuccess=function(){l.put(k.extend(!0,{},this.result||{},{id:a,title:d,date:f.timestamp}));h.dbClean()}:l.get(a).onsuccess=function(){this.result&&this.result.title&&(z.title=this.result.title)})},dbScroll:function(a,d){var f=h.settings[1],r=h.dbStore(),e=f.location.href,b=arguments.length;f.scroll.record&&r&&(e=f.hashquery?e:e.replace(/#.*/,""),r.get("_current").onsuccess=function(){this.result&&this.result.title&&
e===this.result.title&&(b?r.get(e).onsuccess=function(){r.put(k.extend(!0,{},this.result||{},{scrollX:parseInt(Number(a),10),scrollY:parseInt(Number(d),10)}))}:r.get(e).onsuccess=function(){this.result&&isFinite(this.result.scrollX)&&isFinite(this.result.scrollY)&&l.scrollTo(parseInt(Number(this.result.scrollX),10),parseInt(Number(this.result.scrollY),10))})})},dbClean:function(){var a=h.settings[1],d=h.dbStore();d.count().onsuccess=function(){1E3<this.result&&(d.index("date").openCursor(h.IDBKeyRange.upperBound(a.timestamp-
2592E5)).onsuccess=function(){var a=this.result;a?(a["delete"](a.value.id),a["continue"]()):d.count().onsuccess=function(){1E3<this.result&&d.clear()}})}},share:function(){var a=h.settings[1];k.falsandtru||(k.fn.falsandtru=k.falsandtru=h.falsandtru);k.falsandtru("share","history",a.history);a.history=k.falsandtru("share","history")},falsandtru:function(a,d,f){var h;switch(!0){case d===v:h=k.falsandtru[a];break;case f===v:h=a in k.falsandtru?k.falsandtru[a][d]:v;break;case f!==v:k.falsandtru[a]instanceof
Object||(k.falsandtru[a]={}),k.falsandtru[a][d]instanceof Object&&f instanceof Object?k.extend(!0,k.falsandtru[a][d],f):k.falsandtru[a][d]=f,h=k.falsandtru[a][d]}return h}};(function(a,d,f,h,e){a.fn[e.name]=a[e.name]=function(){return D.apply(this,[a,d,f,h,e].concat([].slice.call(arguments)))};e.setProperties.call(a[e.name])}).apply(this,[].slice.call(arguments).concat([h]))})(jQuery,window,document,void 0);
{'fraction_non_alphanumeric': 0.31162920824396156, 'fraction_numerical': 0.012048866921570455, 'mean_word_length': 11.305714941473491, 'pattern_counts': {'":': 52, '<': 109, '<?xml version=': 0, '>': 107, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5129966', 'n_tokens_mistral': 23811, 'n_tokens_neox': 23549, 'n_words': 692}