(function(){window.IPv6={best:function(n){var n=n.toLowerCase().split(":"),i=n.length,r=8,t,u;for(""===n[0]&&""===n[1]&&""===n[2]?(n.shift(),n.shift()):""===n[0]&&""===n[1]?n.shift():""===n[i-1]&&""===n[i-2]&&n.pop(),i=n.length,-1!==n[i-1].indexOf(".")&&(r=7),t=0;t<i&&!(""===n[t]);t++);if(t<r)for(n.splice(t,1,"0000");n.length<r;)n.splice(t,0,"0000");for(t=0;t<r;t++){for(i=n[t].split(""),u=0;3>u;u++)if("0"===i[0]&&1<i.length)i.splice(0,1);else break;n[t]=i.join("")}var i=-1,f=u=0,e=-1,o=!1;for(t=0;t<r;t++)o?"0"===n[t]?f+=1:(o=!1,f>u&&(i=e,u=f)):"0"==n[t]&&(o=!0,e=t,f=1);for(f>u&&(i=e,u=f),1<u&&n.splice(i,u,""),i=n.length,r="",""===n[0]&&(beststr=":"),t=0;t<i;t++){if(r+=n[t],t===i-1)break;r+=":"}return""===n[i-1]&&(r+=":"),r}}})(),function(n){function r(n){throw RangeError(et[n]);}function h(n,t){for(var i=n.length;i--;)n[i]=t(n[i]);return n}function y(n){for(var f=[],i=0,e=n.length,t,u;i<e;)t=n.charCodeAt(i++),55296==(t&63488)&&(u=n.charCodeAt(i++),(55296!=(t&64512)||56320!=(u&64512))&&r("ucs2decode"),t=((t&1023)<<10)+(u&1023)+65536),f.push(t);return f}function p(n){return h(n,function(n){var t="";return 55296==(n&63488)&&r("ucs2encode"),65535<n&&(n-=65536,t+=o(n>>>10&1023|55296),n=56320|n&1023),t+o(n)}).join("")}function w(n,r,u){for(var f=0,n=u?i(n/rt):n>>1,n=n+i(n/r);n>v*e>>1;f+=t)n=i(n/v);return i(f+(v+1)*n/(n+it))}function b(n){var v=[],tt=n.length,o,h=0,b=g,y=d,s,c,l,u,k;for(s=n.lastIndexOf(nt),0>s&&(s=0),c=0;c<s;++c)128<=n.charCodeAt(c)&&r("not-basic"),v.push(n.charCodeAt(c));for(s=0<s?s+1:0;s<tt;){for(c=h,o=1,l=t;;l+=t){if(s>=tt&&r("invalid-input"),u=n.charCodeAt(s++),u=10>u-48?u-22:26>u-65?u-65:26>u-97?u-97:t,(u>=t||u>i((f-h)/o))&&r("overflow"),h+=u*o,k=l<=y?a:l>=y+e?e:l-y,u<k)break;u=t-k,o>i(f/u)&&r("overflow"),o*=u}o=v.length+1,y=w(h-c,o,0==c),i(h/o)>f-b&&r("overflow"),b+=i(h/o),h%=o,v.splice(h++,0,b)}return p(v)}function k(n){var l,v,b,ut,k,s,h,c,u,p=[],tt,it,rt,n=y(n);for(tt=n.length,l=g,v=0,k=d,s=0;s<tt;++s)u=n[s],128>u&&p.push(o(u));for((b=ut=p.length)&&p.push(nt);b<tt;){for(h=f,s=0;s<tt;++s)u=n[s],u>=l&&u<h&&(h=u);for(it=b+1,h-l>i((f-v)/it)&&r("overflow"),v+=(h-l)*it,l=h,s=0;s<tt;++s)if(u=n[s],u<l&&++v>f&&r("overflow"),u==l){for(c=v,h=t;;h+=t){if(u=h<=k?a:h>=k+e?e:h-k,c<u)break;rt=c-u,c=t-u,p.push(o(u+rt%c+22+75*(26>u+rt%c)-0)),c=i(rt/c)}p.push(o(c+22+75*(26>c)-0)),k=w(v,it,b==ut),v=0,++b}++v,++l}return p.join("")}var u,tt="function"==typeof define&&"object"==typeof define.amd&&define.amd&&define,c="object"==typeof exports&&exports,l="object"==typeof module&&module,f=2147483647,t=36,a=1,e=26,it=38,rt=700,d=72,g=128,nt="-",ut=/[^ -~]/,ft=/^xn--/,et={overflow:"Overflow: input needs wider integers to process.",ucs2decode:"UCS-2(decode): illegal sequence",ucs2encode:"UCS-2(encode): illegal value","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},v=t-a,i=Math.floor,o=String.fromCharCode,s;if(u={version:"0.3.0",ucs2:{decode:y,encode:p},decode:b,encode:k,toASCII:function(n){return h(n.split("."),function(n){return ut.test(n)?"xn--"+k(n):n}).join(".")},toUnicode:function(n){return h(n.split("."),function(n){return ft.test(n)?b(n.slice(4).toLowerCase()):n}).join(".")}},c)if(l&&l.exports==c)l.exports=u;else for(s in u)u.hasOwnProperty(s)&&(c[s]=u[s]);else tt?define("punycode",u):n.punycode=u}(this),function(n){function e(n){return n.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function o(n){return"[object Array]"==""+Object.prototype.toString.call(n)}var i=function(t,r){return(this instanceof i)?(t===n&&(t=location.href+""),this.href(t),r!==n?this.absoluteTo(r):this):new i(t)},r=i.prototype,f,u,s;i.idn_expression=/[^a-z0-9\.-]/i,i.punycode_expression=/(xn--)/i,i.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,i.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,i.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/ig,i.defaultPorts={http:"80",https:"443",ftp:"21"},i.invalid_hostname_characters=/[^a-zA-Z0-9\.-]/,i.encode=encodeURIComponent,i.decode=decodeURIComponent,i.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}}},i.encodeQuery=function(n){return encodeURIComponent(n+"").replace(/%20/g,"+")},i.decodeQuery=function(n){return decodeURIComponent((n+"").replace(/\+/g,"%20"))},i.recodePath=function(n){for(var n=(n+"").split("/"),t=0,r=n.length;t<r;t++)n[t]=i.encodePathSegment(i.decode(n[t]));return n.join("/")},i.decodePath=function(n){for(var n=(n+"").split("/"),t=0,r=n.length;t<r;t++)n[t]=i.decodePathSegment(n[t]);return n.join("/")},f={encode:"encode",decode:"decode"};for(u in f)i[u+"PathSegment"]=function(n){return function(t){return window[n+"URIComponent"](t+"").replace(i.characters.pathname[n].expression,function(t){return i.characters.pathname[n].map[t]})}}(f[u]);i.parse=function(n){var t,r={};return t=n.indexOf("#"),-1<t&&(r.fragment=n.substring(t+1)||null,n=n.substring(0,t)),t=n.indexOf("?"),-1<t&&(r.query=n.substring(t+1)||null,n=n.substring(0,t)),t=n.indexOf("://"),-1<t&&(r.protocol=n.substring(0,t),n=n.substring(t+3),n=i.parseAuthority(n,r)),r.path=n,r},i.parseHost=function(n,i){var r=n.indexOf("/"),u;return-1===r&&(r=n.length),"["===n[0]?(u=n.indexOf("]"),i.hostname=n.substring(1,u)||null,i.port=n.substring(u+2,r)||null):n.indexOf(":")!==n.lastIndexOf(":")?(i.hostname=n.substring(0,r)||null,i.port=null):(t=n.substring(0,r).split(":"),i.hostname=t[0]||null,i.port=t[1]||null),i.hostname&&"/"!==n.substring(r)[0]&&(r++,n="/"+n),n.substring(r)||"/"},i.parseAuthority=function(n,r){var u=n.indexOf("@"),f=n.indexOf("/");return-1<u&&(-1===f||u<f)?(t=n.substring(0,u).split(":"),r.username=t[0]?i.decode(t[0]):null,r.password=t[1]?i.decode(t[1]):null,n=n.substring(u+1)):(r.username=null,r.password=null),i.parseHost(n,r)},i.parseQuery=function(n){if(!n)return{};if(n=n.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!n)return{};for(var t={},n=n.split("&"),e=n.length,f=0;f<e;f++){var r=n[f].split("="),u=i.decodeQuery(r.shift()),r=r.length?i.decodeQuery(r.join("=")):null;t[u]?("string"==typeof t[u]&&(t[u]=[t[u]]),t[u].push(r)):t[u]=r}return t},i.build=function(n){var t="";return"string"==typeof n.protocol&&n.protocol.length&&(t+=n.protocol+"://"),t+=i.buildAuthority(n)||"","string"==typeof n.path&&("/"!==n.path[0]&&"string"==typeof n.hostname&&(t+="/"),t+=n.path),"string"==typeof n.query&&(t+="?"+n.query),"string"==typeof n.fragment&&(t+="#"+n.fragment),t},i.buildHost=function(n){var t="";if(n.hostname)i.ip6_expression.test(n.hostname)?t=n.port?t+("["+n.hostname+"]:"+n.port):t+n.hostname:(t+=n.hostname,n.port&&(t+=":"+n.port));else return"";return t},i.buildAuthority=function(n){var t="";return n.username&&(t+=i.encode(n.username),n.password&&(t+=":"+i.encode(n.password)),t+="@"),t+i.buildHost(n)},i.buildQuery=function(t,r){var e="",u;for(u in t)if(Object.hasOwnProperty.call(t,u)&&u)if(o(t[u]))for(var s={},f=0,h=t[u].length;f<h;f++)t[u][f]!==n&&s[t[u][f]+""]===n&&(e+="&"+i.buildQueryParameter(u,t[u][f]),!0!==r&&(s[t[u][f]+""]=!0));else t[u]!==n&&(e+="&"+i.buildQueryParameter(u,t[u]));return e.substring(1)},i.buildQueryParameter=function(n,t){return i.encodeQuery(n)+(null!==t?"="+i.encodeQuery(t):"")},i.addQuery=function(t,r,u){if("object"==typeof r)for(var f in r)Object.prototype.hasOwnProperty.call(r,f)&&i.addQuery(t,f,r[f]);else if("string"==typeof r)t[r]===n?t[r]=u:("string"==typeof t[r]&&(t[r]=[t[r]]),o(u)||(u=[u]),t[r]=t[r].concat(u));else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");},i.removeQuery=function(t,r,u){var u,f,h,e,s;if(o(r))for(u=0,f=r.length;u<f;u++)t[r[u]]=n;else if("object"==typeof r)for(f in r)Object.prototype.hasOwnProperty.call(r,f)&&i.removeQuery(t,f,r[f]);else if("string"==typeof r)if(u!==n){if(t[r]===u)t[r]=n;else if(o(t[r])){if(f=t[r],h={},o(u))for(e=0,s=u.length;e<s;e++)h[u[e]]=!0;else h[u]=!0;for(e=0,s=f.length;e<s;e++)h[f[e]]!==n&&(f.splice(e,1),s--,e--);t[r]=f}}else t[r]=n;else throw new TypeError("URI.addQuery() accepts an object, string as the first parameter");},i.commonPath=function(n,t){for(var r=Math.min(n.length,t.length),i=0;i<r;i++)if(n[i]!==t[i]){i--;break}return 1>i?n[0]===t[0]&&"/"===n[0]?"/":"":("/"!==n[i]&&(i=n.substring(0,i).lastIndexOf("/")),n.substring(0,i+1))},i.withinString=function(n,t){return n.replace(i.find_uri_expression,t)},i.ensureValidHostname=function(n){if(n.match(i.invalid_hostname_characters)){if(!window.punycode)throw new TypeError("Hostname '"+n+"' contains characters other than [A-Z0-9.-] and Punycode.js is not available");if(punycode.toASCII(n).match(i.invalid_hostname_characters))throw new TypeError("Hostname '"+n+"' contains characters other than [A-Z0-9.-]");}},r.build=function(t){return!0===t?this._deferred_build=!0:(t===n||this._deferred_build)&&(this._string=i.build(this._parts),this._deferred_build=!1),this},r.toString=function(){return this.build(!1)._string},r.valueOf=function(){return this.toString()},f={protocol:"protocol",username:"username",password:"password",hostname:"hostname",port:"port"};for(u in f)r[u]=function(t){return function(i,r){return i===n?this._parts[t]||"":(this._parts[t]=i,this.build(!r),this)}}(f[u]);f={query:"?",fragment:"#"};for(u in f)r[u]=function(t,i){return function(r,u){return r===n?this._parts[t]||"":(null!==r&&(r+="",r[0]===i&&(r=r.substring(1))),this._parts[t]=r,this.build(!u),this)}}(u,f[u]);f={search:["?","query"],hash:["#","fragment"]};for(u in f)r[u]=function(n,t){return function(i,r){var u=this[n](i,r);return"string"==typeof u&&u.length?t+u:u}}(f[u][1],f[u][0]);r.pathname=function(t,r){if(t===n||!0===t){var u=this._parts.path||"/";return t?i.decodePath(u):u}return this._parts.path=t?i.recodePath(t):"/",this.build(!r),this},r.path=r.pathname,r.href=function(t,r){if(t===n)return this.toString();this._string="",this._parts={protocol:null,username:null,password:null,hostname:null,port:null,path:null,query:null,fragment:null};var u=t instanceof i,e="object"==typeof t&&(t.hostname||t.path),f;if("string"==typeof t)this._parts=i.parse(t);else if(u||e)for(f in u=u?t._parts:t,u)Object.hasOwnProperty.call(this._parts,f)&&(this._parts[f]=u[f]);else throw new TypeError("invalid input");return this.build(!r),this},r.is=function(n){var t=!1,r=!1,u=!1,f=!1,e=!1,o=!1,s=!0;this._parts.hostname&&(s=!1,r=i.ip4_expression.test(this._parts.hostname),u=i.ip6_expression.test(this._parts.hostname),t=r||u,e=(f=!t)&&i.idn_expression.test(this._parts.hostname),o=f&&i.punycode_expression.test(this._parts.hostname));switch(n.toLowerCase()){case"relative":return s;case"domain":case"name":return f;case"ip":return t;case"ip4":case"ipv4":case"inet4":return r;case"ip6":case"ipv6":case"inet6":return u;case"idn":return e;case"punycode":return o}return null};var h=r.protocol,c=r.port,l=r.hostname;r.protocol=function(t,i){if(t!==n&&t)if(":"===t[t.length-1])t=t.substring(0,t.length-1);else if(t.match(/[^a-zA-z0-9\.+-]/))throw new TypeError("Protocol '"+t+"' contains characters other than [A-Z0-9.+-]");return h.call(this,t,i)},r.port=function(t,i){if(t!==n&&(0===t&&(t=null),t&&(t+="",":"===t[0]&&(t=t.substring(1)),t.match(/[^0-9]/))))throw new TypeError("Port '"+t+"' contains characters other than [0-9]");return c.call(this,t,i)},r.hostname=function(t,r){if(t!==n){var u={};i.parseHost(t,u),t=u.hostname}return l.call(this,t,r)},r.host=function(t,r){return t===n?this._parts.hostname?i.buildHost(this._parts):"":(i.parseHost(t,this._parts),this.build(!r),this)},r.authority=function(t,r){return t===n?this._parts.hostname?i.buildAuthority(this._parts):"":(i.parseAuthority(t,this._parts),this.build(!r),this)},r.subdomain=function(t,r){if(t===n)return!this._parts.hostname||this.is("IP")?"":this._parts.hostname.substring(0,this._parts.hostname.length-this.domain().length-1)||"";var u=this._parts.hostname.substring(0,this._parts.hostname.length-this.domain().length),u=RegExp("^"+e(u));return t&&"."!==t[t.length-1]&&(t+="."),t&&i.ensureValidHostname(t),this._parts.hostname=this._parts.hostname.replace(u,t),this.build(!r),this},r.domain=function(t,r){if(t===n)return!this._parts.hostname||this.is("IP")?"":this._parts.hostname.match(/\.?([^\.]+\.[^\.]+)$/)[1]||this._parts.hostname;if(!t)throw new TypeError("cannot set domain empty");return i.ensureValidHostname(t),this._parts.hostname=!this._parts.hostname||this.is("IP")?t:this._parts.hostname.replace(RegExp(e(this.domain())+"$"),t),this.build(!r),this},r.tld=function(t,i){if(t===n)return!this._parts.hostname||this.is("IP")?"":this._parts.hostname.substring(this._parts.hostname.lastIndexOf(".")+1);if(t){if(t.match(/[^a-zA-Z0-9-]/))throw new TypeError("TLD '"+t+"' contains characters other than [A-Z0-9]");if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");this._parts.hostname=this._parts.hostname.replace(RegExp(e(this.tld())+"$"),t)}else throw new TypeError("cannot set TLD empty");return this.build(!i),this},r.directory=function(t,r){if(t===n||!0===t){if(!this._parts.path||"/"===this._parts.path)return"/";var u=this._parts.path.substring(0,this._parts.path.length-this.filename().length-1)||"/";return t?i.decodePath(u):u}return u=this._parts.path.substring(0,this._parts.path.length-this.filename().length),u=RegExp("^"+e(u)),this.is("relative")||(t||(t="/"),"/"!==t[0]&&(t="/"+t)),t&&"/"!==t[t.length-1]&&(t+="/"),t=i.recodePath(t),this._parts.path=this._parts.path.replace(u,t),this.build(!r),this},r.filename=function(t,r){var u,f,t;return t===n||!0===t?!this._parts.path||"/"===this._parts.path?"":(u=this._parts.path.substring(this._parts.path.lastIndexOf("/")+1),t?i.decodePathSegment(u):u):(u=!1,"/"===t[0]&&(t=t.substring(1)),t.match(/\.?\//)&&(u=!0),f=RegExp(e(this.filename())+"$"),t=i.recodePath(t),this._parts.path=this._parts.path.replace(f,t),u?this.normalizePath(r):this.build(!r),this)},r.suffix=function(t,r){if(t===n||!0===t){if(!this._parts.path||"/"===this._parts.path)return"";var u=this.filename(),f=u.lastIndexOf(".");return-1===f?"":(u=u.substring(f+1),res=/^[a-z0-9%]+$/i.test(u)?u:"",t?i.decodePathSegment(res):res)}if("."===t[0]&&(t=t.substring(1)),u=this.suffix())f=t?RegExp(e(u)+"$"):RegExp(e("."+u)+"$");else{if(!t)return this;this._parts.path+="."+i.recodePath(t)}return f&&(t=i.recodePath(t),this._parts.path=this._parts.path.replace(f,t)),this.build(!r),this},s=r.query,r.query=function(t,r){return!0===t?i.parseQuery(this._parts.query):t!==n&&"string"!=typeof t?(this._parts.query=i.buildQuery(t),this.build(!r),this):s.call(this,t,r)},r.addQuery=function(n,t,r){var u=i.parseQuery(this._parts.query);return i.addQuery(u,n,t),this._parts.query=i.buildQuery(u),"string"!=typeof n&&(r=t),this.build(!r),this},r.removeQuery=function(n,t,r){var u=i.parseQuery(this._parts.query);return i.removeQuery(u,n,t),this._parts.query=i.buildQuery(u),"string"!=typeof n&&(r=t),this.build(!r),this},r.addSearch=r.addQuery,r.removeSearch=r.removeQuery,r.normalize=function(){return this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},r.normalizeProtocol=function(n){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!n)),this},r.normalizeHostname=function(n){return this._parts.hostname&&(this.is("IDN")&&window.punycode?this._parts.hostname=punycode.toASCII(this._parts.hostname):this.is("IPv6")&&window.IPv6&&(this._parts.hostname=IPv6.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!n)),this},r.normalizePort=function(n){return"string"==typeof this._parts.protocol&&this._parts.port===i.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!n)),this},r.normalizePath=function(n){if(!this._parts.path||"/"===this._parts.path)return this;var e,f,t=this._parts.path,r,u;for("/"!==t[0]&&("."===t[0]&&(f=t.substring(0,t.indexOf("/"))),e=!0,t="/"+t),t=t.replace(/(\/(\.\/)+)|\/{2,}/g,"/");;){if(r=t.indexOf("/../"),-1===r)break;else if(0===r){t=t.substring(3);break}u=t.substring(0,r).lastIndexOf("/"),-1===u&&(u=r),t=t.substring(0,u)+t.substring(r+3)}return e&&this.is("relative")&&(t=f?f+t:t.substring(1)),t=i.recodePath(t),this._parts.path=t,this.build(!n),this},r.normalizePathname=r.normalizePath,r.normalizeQuery=function(n){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(i.parseQuery(this._parts.query)):this._parts.query=null,this.build(!n)),this},r.normalizeFragment=function(n){return this._parts.fragment||(this._parts.fragment=null,this.build(!n)),this},r.normalizeSearch=r.normalizeQuery,r.normalizeHash=r.normalizeFragment,r.readable=function(){var t=new i(this),r,f,u;if(t.username("").password("").normalize(),r="",t._parts.protocol&&(r+=t._parts.protocol+"://"),t._parts.hostname&&(t.is("punycode")&&window.punycode?(r+=punycode.toUnicode(t._parts.hostname),t._parts.port&&(r+=":"+t._parts.port)):r+=t.host()),t._parts.hostname&&t._parts.path&&"/"!==t._parts.path[0]&&(r+="/"),r+=t.path(!0),t._parts.query){for(var u="",e=0,o=t._parts.query.split("&"),s=o.length;e<s;e++)f=(o[e]||"").split("="),u=u+("&"+i.decodeQuery(f[0]).replace(/&/g,"%26")),f[1]!==n&&(u+="="+i.decodeQuery(f[1]).replace(/&/g,"%26"));r+="?"+u.substring(1)}return r+t.hash()},r.absoluteTo=function(n){if(!this.is("relative"))throw Error("Cannot resolve non-relative URL");n instanceof i||(n=new i(n));for(var t=new i(this),u=0,r;r=["protocol","username","password","hostname","port"][u];u++)t._parts[r]=n._parts[r];return"/"!==t.path()[0]&&(t._parts.path=n.directory()+"/"+t._parts.path,t.normalizePath()),t.build(),t},r.relativeTo=function(n){if(n instanceof i||(n=new i(n)),"/"!==this.path()[0]||"/"!==n.path()[0])throw Error("Cannot calculate common path from non-relative URLs");for(var t=new i(this),u=["protocol","username","password","hostname","port"],r=i.commonPath(t.path(),n.path()),n=n.directory(),f=0,o;o=u[f];f++)t._parts[o]=null;if(!r||"/"===r)return t;if(n+"/"===r)t._parts.path="./"+t.filename();else{for(u="../",r=RegExp("^"+e(r)),n=n.replace(r,"/").match(/\//g).length-1;n--;)u+="../";t._parts.path=t._parts.path.replace(r,u)}return t.build(),t},r.equals=function(n){var f=new i(this),e=new i(n),r={},u={},n={},t;if(f.normalize(),e.normalize(),f.toString()===e.toString())return!0;if((r=f.query(),u=e.query(),f.query(""),e.query(""),f.toString()!==e.toString())||r.length!==u.length)return!1;r=i.parseQuery(r),u=i.parseQuery(u);for(t in r)if(Object.prototype.hasOwnProperty.call(r,t)){if(o(r[t])){if(!o(u[t])||r[t].length!==u[t].length)return!1;for(r[t].sort(),u[t].sort(),f=0,e=r[t].length;f<e;f++)if(r[t][f]!==u[t][f])return!1}else if(r[t]!==u[t])return!1;n[t]=!0}for(t in u)if(Object.prototype.hasOwnProperty.call(u,t)&&!n[t])return!1;return!0},window.URI=i}();
/*!
 * jQuery hashchange event - v1.3 - 7/21/2010
 * http://benalman.com/projects/jquery-hashchange-plugin/
 * 
 * Copyright (c) 2010 "Cowboy" Ben Alman
 * Dual licensed under the MIT and GPL licenses.
 * http://benalman.com/about/license/
 */
(function($,n,t){function r(n){return n=n||location.href,"#"+n.replace(/^[^#]*#?(.*)$/,"$1")}var i="hashchange",u=document,f,o=$.event.special,s=u.documentMode,e="on"+i in n&&(s===t||s>7);$.fn[i]=function(n){return n?this.bind(i,n):this.trigger(i)},$.fn[i].delay=50,o[i]=$.extend(o[i],{setup:function(){if(e)return!1;$(f.start)},teardown:function(){if(e)return!1;$(f.stop)}}),f=function(){function l(){var u=r(),t=a(s);u!==s?(c(s=u,t),$(n).trigger(i)):t!==s&&(location.href=location.href.replace(/#.*/,"")+t),o=setTimeout(l,$.fn[i].delay)}var f={},o,s=r(),h=function(n){return n},c=h,a=h;return f.start=function(){o||l()},f.stop=function(){o&&clearTimeout(o),o=t},$("html").hasClass("lt-ie9")&&!e&&function(){var n,t;f.start=function(){n||(t=$.fn[i].src,t=t&&t+r(),n=$('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){t||c(r()),l()}).attr("src",t||"javascript:0").insertAfter("body")[0].contentWindow,u.onpropertychange=function(){try{event.propertyName==="title"&&(n.document.title=u.title)}catch(t){}})},f.stop=h,a=function(){return r(n.location.href)},c=function(t,r){var f=n.document,e=$.fn[i].domain;t!==r&&(f.title=u.title,f.open(),e&&f.write('<script>document.domain="'+e+'"<\/script>'),f.close(),n.location.hash=t)}}(),f}()})(jQuery,this)