!function(){function a(a){return function(){return this[a]}}function b(a){return function(){return a}}function d(a){var b=typeof a;if("object"==b){if(!a)return"null";if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function e(a){return"string"==typeof a}function f(a,b,c){return a.call.apply(a.bind,arguments)}function g(a,b,c){if(!a)throw Error();if(2b?1:0}function u(a,b){var c;a:{c=a.length;for(var d=e(a)?a.split(""):a,f=0;fc?null:e(a)?a.charAt(c):a[c]}function v(a){return o.concat.apply(o,arguments)}function w(a,b,c){return 2>=arguments.length?o.slice.call(a,b):o.slice.call(a,b,c)}function x(a){var b=arguments.length;if(1==b&&"array"==d(arguments[0]))return x.apply(null,arguments[0]);for(var c={},e=0;e=a)}function R(a,b,c,d){this.a=a,this.nodeName=c,this.nodeValue=d,this.nodeType=2,this.parentNode=this.ownerElement=b}function S(a,b){var c=Q&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new R(b,a,b.nodeName,c)}function T(a){this.b=a,this.a=0}function U(a){a=a.match(V);for(var b=0;ba.n)throw Error("Function "+a.h+" expects at most "+a.n+" arguments, "+b.length+" given");a.s&&q(b,function(b,c){if(4!=b.g)throw Error("Argument "+c+" to function "+a.h+" is not of type Nodeset: "+b)}),ya.call(this,a.g),this.f=a,this.c=b,Aa(this,a.e||t(b,function(a){return a.e})),Ba(this,a.r&&!b.length||a.q&&!!b.length||t(b,function(a){return a.b}))}function Na(a,b,c,d,e,f,g,h,i){this.h=a,this.g=b,this.e=c,this.r=d,this.q=e,this.j=f,this.o=g,this.n=void 0!==h?h:g,this.s=!!i}function Pa(a,b,c,d,e,f,g,h){if(Oa.hasOwnProperty(a))throw Error("Function already created: "+a+".");Oa[a]=new Na(a,b,c,d,!1,e,f,g,h)}function Qa(a,b){switch(this.f=a,this.c=void 0!==b?b:null,this.b=null,a){case"comment":this.b=8;break;case"text":this.b=3;break;case"processing-instruction":this.b=7;break;case"node":break;default:throw Error("Unexpected argument")}}function Ra(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}function Sa(a){ya.call(this,3),this.c=a.substring(1,a.length-1)}function Ta(a,b){this.h=a.toLowerCase(),this.c=b?b.toLowerCase():"http://www.w3.org/1999/xhtml"}function Ua(a){ya.call(this,1),this.c=a}function Va(a,b){if(ya.call(this,a.g),this.f=a,this.c=b,this.e=a.e,this.b=a.b,1==this.c.length){var c=this.c[0];c.m||c.c!=db||(c=c.k,"*"!=c.d()&&(this.d={name:c.d(),l:null}))}}function Wa(){ya.call(this,4)}function Xa(){ya.call(this,4)}function Ya(a){return"/"==a||"//"==a}function Za(a,b){this.a=a,this.b=!!b}function $a(a,b,c){for(c=c||0;ca.length)throw Error("Unclosed literal string");return new Sa(a)}function sb(a){var b=Y(a.a),c=b.indexOf(":");if(-1==c)return new Ta(b);var d=b.substring(0,c);if(a=a.b(d),!a)throw Error("Namespace prefix not declared: "+d);return b=b.substr(c+1),new Ta(b,a)}function tb(a){var b,d,c=[];if(Ya(X(a.a))){if(b=Y(a.a),d=X(a.a),"/"==b&&(Z(a.a)||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Wa;d=new Wa,ob(a,"Missing next location step."),b=ub(a,b),c.push(b)}else{a:{switch(b=X(a.a),d=b.charAt(0)){case"$":throw Error("Variable reference not allowed in HTML XPath");case"(":Y(a.a),b=nb(a),ob(a,'unclosed "("'),pb(a,")");break;case'"':case"'":b=rb(a);break;default:if(isNaN(+b)){if(Ra(b)||!/(?![0-9])[\w]/.test(d)||"("!=X(a.a,1)){b=null;break a}for(b=Y(a.a),b=Oa[b]||null,Y(a.a),d=[];")"!=X(a.a)&&(ob(a,"Missing function argument list."),d.push(nb(a)),","==X(a.a));)Y(a.a);ob(a,"Unclosed function argument list."),qb(a),b=new Ma(b,d)}else b=new Ua(+Y(a.a))}"["==X(a.a)&&(d=new Za(vb(a)),b=new La(b,d))}if(b){if(!Ya(X(a.a)))return b;d=b}else b=ub(a,"/"),d=new Xa,c.push(b)}for(;Ya(X(a.a));)b=Y(a.a),ob(a,"Missing next location step."),b=ub(a,b),c.push(b);return new Va(d,c)}function ub(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==X(a.a))return d=new _a(jb,new Qa("node")),Y(a.a),d;if(".."==X(a.a))return d=new _a(hb,new Qa("node")),Y(a.a),d;var f;if("@"==X(a.a))f=db,Y(a.a),ob(a,"Missing attribute name");else if("::"==X(a.a,1)){if(!/(?![0-9])[\w]/.test(X(a.a).charAt(0)))throw Error("Bad token: "+Y(a.a));if(c=Y(a.a),f=bb[c]||null,!f)throw Error("No axis with name: "+c);Y(a.a),ob(a,"Missing node name")}else f=eb;if(c=X(a.a),/(?![0-9])[\w]/.test(c.charAt(0)))if("("==X(a.a,1)){if(!Ra(c))throw Error("Invalid node type: "+c);if(c=Y(a.a),!Ra(c))throw Error("Invalid type name: "+c);pb(a,"("),ob(a,"Bad nodetype"),e=X(a.a).charAt(0);var g=null;'"'!=e&&"'"!=e||(g=rb(a)),ob(a,"Bad nodetype"),qb(a),c=new Qa(c,g)}else c=sb(a);else{if("*"!=c)throw Error("Bad token: "+Y(a.a));c=sb(a)}return e=new Za(vb(a),f.a),d||new _a(f,c,e,"//"==b)}function vb(a){for(var b=[];"["==X(a.a);){Y(a.a),ob(a,"Missing predicate expression.");var c=nb(a);b.push(c),ob(a,"Unclosed predicate expression."),pb(a,"]")}return b}function wb(a){if("-"==X(a.a))return Y(a.a),new kb(wb(a));var b=tb(a);if("|"!=X(a.a))a=b;else{for(b=[b];"|"==Y(a.a);)ob(a,"Missing next union location path."),b.push(tb(a));a.a.a--,a=new lb(b)}return a}function xb(a,c){if(!a.length)throw Error("Empty XPath expression.");var e=U(a);if(Z(e))throw Error("Invalid XPath expression.");c?"function"==d(c)||(c=h(c.lookupNamespaceURI,c)):c=b(null);var f=nb(new mb(e,c));if(!Z(e))throw Error("Bad token: "+Y(e));this.evaluate=function(a,b){var c=f.a(new k(a));return new yb(c,b)}}function yb(a,b){if(0==b)if(a instanceof la)b=4;else if("string"==typeof a)b=2;else if("number"==typeof a)b=1;else{if("boolean"!=typeof a)throw Error("Unexpected evaluation result.");b=3}if(2!=b&&1!=b&&3!=b&&!(a instanceof la))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof la?ra(a):""+a;break;case 1:this.numberValue=a instanceof la?+ra(a):+a;break;case 3:this.booleanValue=a instanceof la?0=c.length?null:c[f++]},this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>=c.length||0>a?null:c[a]}}function zb(a){this.lookupNamespaceURI=va(a)}function Ab(a){a=a||c;var b=a.document;b.evaluate||(a.XPathResult=yb,b.evaluate=function(a,b,c,d){return new xb(a,c).evaluate(b,d)},b.createExpression=function(a,b){return new xb(a,b)},b.createNSResolver=function(a){return new zb(a)})}var c=this;Function.prototype.bind=Function.prototype.bind||function(a,b){if(1c?Math.max(0,a.length+c):c,e(a))return e(b)&&1==b.length?a.indexOf(b,c):-1;for(;cparseFloat(a))?String(b):a}(),J={},M=c.document,N=H(),O=!M||!D||!N&&B()?void 0:N||("CSS1Compat"==M.compatMode?parseInt(I,10):5),P=D&&!L(9),Q=D&&!L(8),V=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),W=/^\s/;x("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),!E&&!D||D&&L(9)||E&&K("1.9.1"),D&&K("9"),j(Fa),Fa.prototype.a=function(a){return this.c.j(this.f,this.k,a)},Fa.prototype.toString=function(){var a="Binary Expression: "+this.c,a=a+za(this.f);return a+=za(this.k)},Ha.prototype.toString=a("a");var Ia={};Ja("div",6,1,function(a,b,c){return Ca(a,c)/Ca(b,c)}),Ja("mod",6,1,function(a,b,c){return Ca(a,c)%Ca(b,c)}),Ja("*",6,1,function(a,b,c){return Ca(a,c)*Ca(b,c)}),Ja("+",5,1,function(a,b,c){return Ca(a,c)+Ca(b,c)}),Ja("-",5,1,function(a,b,c){return Ca(a,c)-Ca(b,c)}),Ja("<",4,2,function(a,b,c){return Ga(function(a,b){return a",4,2,function(a,b,c){return Ga(function(a,b){return a>b},a,b,c)}),Ja("<=",4,2,function(a,b,c){return Ga(function(a,b){return a<=b},a,b,c)}),Ja(">=",4,2,function(a,b,c){return Ga(function(a,b){return a>=b},a,b,c)});var Ka=Ja("=",3,2,function(a,b,c){return Ga(function(a,b){return a==b},a,b,c,!0)});Ja("!=",3,2,function(a,b,c){return Ga(function(a,b){return a!=b},a,b,c,!0)}),Ja("and",2,2,function(a,b,c){return Ea(a,c)&&Ea(b,c)}),Ja("or",1,2,function(a,b,c){return Ea(a,c)||Ea(b,c)}),j(La),La.prototype.a=function(a){return a=this.c.a(a),$a(this.f,a)},La.prototype.toString=function(){var a;return a="Filter:"+za(this.c),a+=za(this.f)},j(Ma),Ma.prototype.a=function(a){return this.f.j.apply(null,v(a,this.c))},Ma.prototype.toString=function(){var a="Function: "+this.f;if(this.c.length)var b=s(this.c,function(a,b){return a+za(b)},"Arguments:"),a=a+za(b);return a},Na.prototype.toString=a("h");var Oa={};Pa("boolean",2,!1,!1,function(a,b){return Ea(b,a)},1),Pa("ceiling",1,!1,!1,function(a,b){return Math.ceil(Ca(b,a))},1),Pa("concat",3,!1,!1,function(a,b){var c=w(arguments,1);return s(c,function(b,c){return b+Da(c,a)},"")},2,null),Pa("contains",2,!1,!1,function(a,b,c){return m(Da(b,a),Da(c,a))},2),Pa("count",1,!1,!1,function(a,b){return b.a(a).i},1,1,!0),Pa("false",2,!1,!1,b(!1),0),Pa("floor",1,!1,!1,function(a,b){return Math.floor(Ca(b,a))},1),Pa("id",4,!1,!1,function(a,b){function c(a){if(P){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return u(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.a,e=9==d.nodeType?d:d.ownerDocument,d=Da(b,a).split(/\s+/),f=[];q(d,function(a){a=c(a),!a||0<=p(f,a)||f.push(a)}),f.sort(_);var g=new la;return q(f,function(a){pa(g,a)}),g},1),Pa("lang",2,!1,!1,b(!1),1),Pa("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.d},0),Pa("local-name",3,!1,!0,function(a,b){var c=b?qa(b.a(a)):a.a;return c?c.localName||c.nodeName.toLowerCase():""},0,1,!0),Pa("name",3,!1,!0,function(a,b){var c=b?qa(b.a(a)):a.a;return c?c.nodeName.toLowerCase():""},0,1,!0),Pa("namespace-uri",3,!0,!1,b(""),0,1,!0),Pa("normalize-space",3,!1,!0,function(a,b){return(b?Da(b,a):ca(a.a)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1),Pa("not",2,!1,!1,function(a,b){return!Ea(b,a)},1),Pa("number",1,!1,!0,function(a,b){return b?Ca(b,a):+ca(a.a)},0,1),Pa("position",1,!0,!1,function(a){return a.b},0),Pa("round",1,!1,!1,function(a,b){return Math.round(Ca(b,a))},1),Pa("starts-with",2,!1,!1,function(a,b,c){return b=Da(b,a),a=Da(c,a),0==b.lastIndexOf(a,0)},2),Pa("string",3,!1,!0,function(a,b){return b?Da(b,a):ca(a.a)},0,1),Pa("string-length",1,!1,!0,function(a,b){return(b?Da(b,a):ca(a.a)).length},0,1),Pa("substring",3,!1,!1,function(a,b,c,d){if(c=Ca(c,a),isNaN(c)||1/0==c||-(1/0)==c)return"";if(d=d?Ca(d,a):1/0,isNaN(d)||-(1/0)===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);return a=Da(b,a),1/0==d?a.substring(e):(b=Math.round(d),a.substring(e,c+b))},2,3),Pa("substring-after",3,!1,!1,function(a,b,c){return b=Da(b,a),a=Da(c,a),c=b.indexOf(a),-1==c?"":b.substring(c+a.length)},2),Pa("substring-before",3,!1,!1,function(a,b,c){return b=Da(b,a),a=Da(c,a),a=b.indexOf(a),-1==a?"":b.substring(0,a)},2),Pa("sum",1,!1,!1,function(a,b){for(var c=sa(b.a(a)),d=0,e=ua(c);e;e=ua(c))d+=+ca(e);return d},1,1,!0),Pa("translate",3,!1,!1,function(a,b,c,d){b=Da(b,a),c=Da(c,a);var e=Da(d,a);for(a=[],d=0;d