;function on(t,n){return new Promise(function(e,r){function o(n){return V[n]=void 0,t[n]}function i(t){return"[object Array]"===R.call(t)}function u(t){return"[object Object]"===R.call(t)}function a(t){return k.call(t,0)}function c(t){return i(t)?t:[t]}function s(t,n){var e=document.createElement("script"),r=document.documentElement;n=JSON.stringify(n||[]).slice(1,-1),e.textContent="("+t+")("+n+");",r.appendChild(e),r.removeChild(e)}function l(n,e){history.pushState.armed||(s(function(t){function n(){var t=document.createEvent("Events");t.initEvent("history.pushState",!1,!1),document.dispatchEvent(t)}var e=history.pushState;history.pushState=function(){return t&&window.$&&$.pjax?$(document).one(t,n):setTimeout(n,0),e.apply(this,arguments)}},[e]),history.pushState.armed=e),A=function(){V=Object.create(t),V.pushstate=void 0,on(V).then(n)},document.addEventListener("history.pushState",function(){I&&console.log("on.pushstate",location.pathname),A()},!1)}function f(t){var n=h(this===on||this===window?location.search:this);if(t===!0||null==t)return n;throw Error("bad query type "+typeof t+": "+t)}function h(t){var n={};return(t||"").replace(/\+/g,"%20").split("&").forEach(function(t){if(t=/^\??([^=&]*)(?:=(.*))?/.exec(t)){var e,r,o=t[1],i=t[2];try{e=decodeURIComponent(o)}catch(u){e=unescape(o)}if(null!=(r=i))try{r=decodeURIComponent(i)}catch(u){r=unescape(i)}n[e]=r}}),n}function p(t){i(t)||(t=c(t));var n=t.shift();if("string"==typeof n&&(n=RegExp(n)),!(n instanceof RegExp))throw Error(typeof n+" was not a regexp: "+n);var e=n.exec(this===on||this===window?location.pathname:this);if(null===e)return q;if(!t.length)return e;var r={};for(e.shift();t.length;)r[t.shift()]=e.shift();return r}function d(t){return function(){var n=t.apply(this,arguments);return n||q}}function m(t){return function(){var n=t.apply(this,arguments);return null!==n?n:q}}function y(t){return function(){var n=t.apply(this,arguments);return n.length?n:q}}function v(t){return a(this.querySelectorAll(t))}function g(t){return this.querySelector(t)}function w(t){var n,e=this.evaluate?this:this.ownerDocument,r=e.evaluate(t,this,null,0,null),o=[];switch(r.resultType){case 1:return r.numberValue;case 2:return r.stringValue;case 3:return r.booleanValue;default:for(;n=r.iterateNext();)o.push(n);return o}}function x(t){var n=w.call(this,t);return n instanceof Array?n[0]||null:n}function E(t){return(t+"").replace(/([-$(-+.?[-^{|}])/g,"\\$1")}function b(t,n){function e(t){switch(typeof t){case"string":break;case"object":if("nodeType"in t||t.length)return t;default:throw Error("non-String dom match rule: "+t)}on._parse_dom_rule||(on._parse_dom_rule=RegExp("^("+Object.keys(on.dom).map(E).join("|")+")\\s*(.*)"));var n,e,r=on._parse_dom_rule.exec(t);if(r&&(n=r[1],t=r[2],e=b[n]),!e)throw Error("unknown dom match rule "+n+": "+t);return e.call(this,t)}var r,o,a,c;if(void 0===n&&(n=this===on||this===window?document:this),null===n||n===q)return q;if(i(n)){for(r=[],a=0;a