webdriverio-automation
Version:
WebdriverIO-Automation android ios project
114 lines (109 loc) • 73.8 kB
JavaScript
function(){return function(){var h,aa=this;function l(a){return void 0!==a}function n(a){return"string"==typeof a}function ba(a){return"number"==typeof a}function ca(a,b){a=a.split(".");var c=aa;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&l(b)?c[d]=b:c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}}
function da(a){var b=typeof a;if("object"==b)if(a){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 return"null";
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ea(a){var b=da(a);return"array"==b||"object"==b&&"number"==typeof a.length}function fa(a){return"function"==da(a)}function ga(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}var ha="closure_uid_"+(1E9*Math.random()>>>0),ia=0;function ja(a,b,c){return a.call.apply(a.bind,arguments)}
function ka(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}function la(a,b,c){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?la=ja:la=ka;return la.apply(null,arguments)}
function ma(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}}var na=Date.now||function(){return+new Date};function p(a,b){function c(){}c.prototype=b.prototype;a.aa=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.$=function(a,c,f){for(var d=Array(arguments.length-2),e=2;e<arguments.length;e++)d[e-2]=arguments[e];return b.prototype[c].apply(a,d)}};var oa=window;var qa;function ra(a){var b=a.length-1;return 0<=b&&a.indexOf(" ",b)==b}var sa=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};
function ta(a,b){var c=0;a=sa(String(a)).split(".");b=sa(String(b)).split(".");for(var d=Math.max(a.length,b.length),e=0;!c&&e<d;e++){var f=a[e]||"",g=b[e]||"";do{f=/(\d*)(\D*)(.*)/.exec(f)||["","","",""];g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""];if(0==f[0].length&&0==g[0].length)break;c=ua(0==f[1].length?0:parseInt(f[1],10),0==g[1].length?0:parseInt(g[1],10))||ua(0==f[2].length,0==g[2].length)||ua(f[2],g[2]);f=f[3];g=g[3]}while(!c)}return c}function ua(a,b){return a<b?-1:a>b?1:0}
function va(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};function wa(a,b){if(n(a))return n(b)&&1==b.length?a.indexOf(b,0):-1;for(var c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1}function q(a,b,c){for(var d=a.length,e=n(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)}function xa(a,b){for(var c=a.length,d=[],e=0,f=n(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var k=f[g];b.call(void 0,k,g,a)&&(d[e++]=k)}return d}function ya(a,b){for(var c=a.length,d=Array(c),e=n(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d}
function za(a,b,c){var d=c;q(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}function Aa(a,b){for(var c=a.length,d=n(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a))return!0;return!1}function Ba(a,b){for(var c=a.length,d=n(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&!b.call(void 0,d[e],e,a))return!1;return!0}function Ca(a,b){a:{for(var c=a.length,d=n(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){b=e;break a}b=-1}return 0>b?null:n(a)?a.charAt(b):a[b]}
function Da(a){return Array.prototype.concat.apply([],arguments)}function Ea(a,b,c){return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)};var Fa={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",
darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",
ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",
lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",
moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",
seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};var Ga="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),Ha=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,Ia=/^#(?:[0-9a-f]{3}){1,2}$/i,Ja=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,Ka=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function r(a,b){this.code=a;this.a=u[a]||La;this.message=b||"";a=this.a.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")});b=a.length-5;if(0>b||a.indexOf("Error",b)!=b)a+="Error";this.name=a;a=Error(this.message);a.name=this.name;this.stack=a.stack||""}p(r,Error);var La="unknown error",u={15:"element not selectable",11:"element not visible"};u[31]=La;u[30]=La;u[24]="invalid cookie domain";u[29]="invalid element coordinates";u[12]="invalid element state";
u[32]="invalid selector";u[51]="invalid selector";u[52]="invalid selector";u[17]="javascript error";u[405]="unsupported operation";u[34]="move target out of bounds";u[27]="no such alert";u[7]="no such element";u[8]="no such frame";u[23]="no such window";u[28]="script timeout";u[33]="session not created";u[10]="stale element reference";u[21]="timeout";u[25]="unable to set cookie";u[26]="unexpected alert open";u[13]=La;u[9]="unknown command";r.prototype.toString=function(){return this.name+": "+this.message};var Ma;a:{var Na=aa.navigator;if(Na){var Oa=Na.userAgent;if(Oa){Ma=Oa;break a}}Ma=""}function w(a){return-1!=Ma.indexOf(a)};function Pa(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function Qa(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function Ra(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function Sa(a,b){return null!==a&&b in a}function Ta(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};function Ua(){return(w("Chrome")||w("CriOS"))&&!w("Edge")};function Va(){return w("iPhone")&&!w("iPod")&&!w("iPad")};function Wa(a,b){var c=Xa;return Object.prototype.hasOwnProperty.call(c,a)?c[a]:c[a]=b(a)};var Za=w("Opera"),x=w("Trident")||w("MSIE"),$a=w("Edge"),y=w("Gecko")&&!(-1!=Ma.toLowerCase().indexOf("webkit")&&!w("Edge"))&&!(w("Trident")||w("MSIE"))&&!w("Edge"),z=-1!=Ma.toLowerCase().indexOf("webkit")&&!w("Edge"),ab=z&&w("Mobile"),bb=w("Macintosh"),cb=w("Windows");function db(){var a=aa.document;return a?a.documentMode:void 0}var eb;
a:{var fb="",gb=function(){var a=Ma;if(y)return/rv\:([^\);]+)(\)|;)/.exec(a);if($a)return/Edge\/([\d\.]+)/.exec(a);if(x)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(z)return/WebKit\/(\S+)/.exec(a);if(Za)return/(?:Version)[ \/]?(\S+)/.exec(a)}();gb&&(fb=gb?gb[1]:"");if(x){var hb=db();if(null!=hb&&hb>parseFloat(fb)){eb=String(hb);break a}}eb=fb}var Xa={};function ib(a){return Wa(a,function(){return 0<=ta(eb,a)})}var jb;var kb=aa.document;
jb=kb&&x?db()||("CSS1Compat"==kb.compatMode?parseInt(eb,10):5):void 0;var lb=w("Firefox"),mb=Va()||w("iPod"),nb=w("iPad"),ob=w("Android")&&!(Ua()||w("Firefox")||w("Opera")||w("Silk")),pb=Ua(),qb=w("Safari")&&!(Ua()||w("Coast")||w("Opera")||w("Edge")||w("Silk")||w("Android"))&&!(Va()||w("iPad")||w("iPod"));function rb(a){return(a=a.exec(Ma))?a[1]:""}var sb=function(){if(lb)return rb(/Firefox\/([0-9.]+)/);if(x||$a||Za)return eb;if(pb)return Va()||w("iPad")||w("iPod")?rb(/CriOS\/([0-9.]+)/):rb(/Chrome\/([0-9.]+)/);if(qb&&!(Va()||w("iPad")||w("iPod")))return rb(/Version\/([0-9.]+)/);if(mb||nb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Ma);if(a)return a[1]+"."+a[2]}else if(ob)return(a=rb(/Android\s+([0-9.]+)/))?a:rb(/Version\/([0-9.]+)/);return""}();var tb,ub;function vb(a){return wb?tb(a):x?0<=ta(jb,a):ib(a)}function xb(a){return wb?ub(a):ob?0<=ta(yb,a):0<=ta(sb,a)}
var wb=function(){if(!y)return!1;var a=aa.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(f){return!1}var b=a.classes,a=a.interfaces,c=b["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),b=b["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo),d=b.platformVersion,e=b.version;tb=function(a){return 0<=c.compare(d,""+a)};ub=function(a){return 0<=c.compare(e,""+a)};return!0}(),zb=nb||mb,Ab;
if(ob){var Bb=/Android\s+([0-9\.]+)/.exec(Ma);Ab=Bb?Bb[1]:"0"}else Ab="0";var yb=Ab,Cb=x&&!(8<=Number(jb)),Db=x&&!(9<=Number(jb));ob&&xb(2.3);ob&&xb(4);qb&&xb(6);function Eb(a,b){this.x=l(a)?a:0;this.y=l(b)?b:0}h=Eb.prototype;h.toString=function(){return"("+this.x+", "+this.y+")"};h.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};h.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};h.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};h.scale=function(a,b){b=ba(b)?b:a;this.x*=a;this.y*=b;return this};function Fb(a,b){this.width=a;this.height=b}h=Fb.prototype;h.toString=function(){return"("+this.width+" x "+this.height+")"};h.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};h.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};h.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};h.scale=function(a,b){b=ba(b)?b:a;this.width*=a;this.height*=b;return this};function Gb(a){return a?new Hb(B(a)):qa||(qa=new Hb)}function Ib(a){return a?a.parentWindow||a.defaultView:window}function Jb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}function Kb(a,b){if(!a||!b)return!1;if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||!!(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a}
function Lb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(x&&!(9<=Number(jb))){if(9==a.nodeType)return-1;if(9==b.nodeType)return 1}if("sourceIndex"in a||a.parentNode&&"sourceIndex"in a.parentNode){var c=1==a.nodeType,d=1==b.nodeType;if(c&&d)return a.sourceIndex-b.sourceIndex;var e=a.parentNode,f=b.parentNode;return e==f?Mb(a,b):!c&&Kb(e,b)?-1*Nb(a,b):!d&&Kb(f,a)?Nb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=B(a);c=d.createRange();
c.selectNode(a);c.collapse(!0);a=d.createRange();a.selectNode(b);a.collapse(!0);return c.compareBoundaryPoints(aa.Range.START_TO_END,a)}function Nb(a,b){var c=a.parentNode;if(c==b)return-1;for(;b.parentNode!=c;)b=b.parentNode;return Mb(b,a)}function Mb(a,b){for(;b=b.previousSibling;)if(b==a)return-1;return 1}function B(a){return 9==a.nodeType?a:a.ownerDocument||a.document}var Ob={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Pb={IMG:" ",BR:"\n"};
function Qb(a,b,c){if(!(a.nodeName in Ob))if(3==a.nodeType)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in Pb)b.push(Pb[a.nodeName]);else for(a=a.firstChild;a;)Qb(a,b,c),a=a.nextSibling}function Rb(a,b,c){a&&!c&&(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null}function Hb(a){this.a=a||aa.document||document}Hb.prototype.getElementsByTagName=function(a,b){return(b||this.a).getElementsByTagName(String(a))};
function Sb(a,b,c,d){a=d||a.a;var e=b&&"*"!=b?String(b).toUpperCase():"";if(a.querySelectorAll&&a.querySelector&&(e||c))c=a.querySelectorAll(e+(c?"."+c:""));else if(c&&a.getElementsByClassName)if(d=a.getElementsByClassName(c),e){a={};for(var f=b=0,g;g=d[f];f++)e==g.nodeName&&(a[b++]=g);a.length=b;c=a}else c=d;else if(d=a.getElementsByTagName(e||"*"),c){a={};for(f=b=0;g=d[f];f++){var e=g.className,k;if(k="function"==typeof e.split)k=0<=wa(e.split(/\s+/),c);k&&(a[b++]=g)}a.length=b;c=a}else c=d;return c}
Hb.prototype.contains=Kb;function Tb(a,b){b=b.toLowerCase();return"style"==b?Ub(a.style.cssText):Cb&&"value"==b&&C(a,"INPUT")?a.value:Db&&!0===a[b]?String(a.getAttribute(b)):(a=a.getAttributeNode(b))&&a.specified?a.value:null}var Vb=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/;
function Ub(a){var b=[];q(a.split(Vb),function(a){var c=a.indexOf(":");0<c&&(a=[a.slice(0,c),a.slice(c+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");return b=";"==b.charAt(b.length-1)?b:b+";"}function Wb(a,b){Cb&&"value"==b&&C(a,"OPTION")&&null===Tb(a,"value")?(b=[],Qb(a,b,!1),a=b.join("")):a=a[b];return a}function C(a,b){b&&"string"!==typeof b&&(b=b.toString());return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)};/*
The MIT License
Copyright (c) 2007 Cybozu Labs, Inc.
Copyright (c) 2012 Google Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
*/
function Xb(a,b,c){this.a=a;this.b=b||1;this.f=c||1};var Yb=x&&!(9<=Number(jb)),Zb=x&&!(8<=Number(jb));function $b(a,b,c,d){this.a=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.parentNode=this.ownerElement=b}function ac(a,b){var c=Zb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new $b(b,a,b.nodeName,c)};function bc(a){this.b=a;this.a=0}function cc(a){a=a.match(dc);for(var b=0;b<a.length;b++)ec.test(a[b])&&a.splice(b,1);return new bc(a)}var dc=/\$?(?:(?![0-9-\.])(?:\*|[\w-\.]+):)?(?![0-9-\.])(?:\*|[\w-\.]+)|\/\/|\.\.|::|\d+(?:\.\d*)?|\.\d+|"[^"]*"|'[^']*'|[!<>]=|\s+|./g,ec=/^\s/;function D(a,b){return a.b[a.a+(b||0)]}bc.prototype.next=function(){return this.b[this.a++]};function fc(a){return a.b.length<=a.a};function E(a){var b=null,c=a.nodeType;1==c&&(b=a.textContent,b=void 0==b||null==b?a.innerText:b,b=void 0==b||null==b?"":b);if("string"!=typeof b)if(Yb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Yb&&"title"==a.nodeName.toLowerCase()&&(b+=a.text),d[c++]=a;while(a=a.firstChild);for(;c&&!(a=d[--c].nextSibling););}}else b=a.nodeValue;return""+b}
function gc(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}Zb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function hc(a,b,c,d,e){return(Yb?ic:jc).call(null,a,b,n(c)?c:null,n(d)?d:null,e||new F)}
function ic(a,b,c,d,e){if(a instanceof kc||8==a.b||c&&null===a.b){var f=b.all;if(!f)return e;var g=lc(a);if("*"!=g&&(f=b.getElementsByTagName(g),!f))return e;if(c){var k=[];for(a=0;b=f[a++];)gc(b,c,d)&&k.push(b);f=k}for(a=0;b=f[a++];)"*"==g&&"!"==b.tagName||G(e,b);return e}mc(a,b,c,d,e);return e}
function jc(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!x?(b=b.getElementsByName(d),q(b,function(b){a.a(b)&&G(e,b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),q(b,function(b){b.className==d&&a.a(b)&&G(e,b)})):a instanceof nc?mc(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.f()),q(b,function(a){gc(a,c,d)&&G(e,a)}));return e}
function oc(a,b,c,d,e){var f;if((a instanceof kc||8==a.b||c&&null===a.b)&&(f=b.childNodes)){var g=lc(a);if("*"!=g&&(f=xa(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=xa(f,function(a){return gc(a,c,d)}));q(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||G(e,a)});return e}return pc(a,b,c,d,e)}function pc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)gc(b,c,d)&&a.a(b)&&G(e,b);return e}
function mc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)gc(b,c,d)&&a.a(b)&&G(e,b),mc(a,b,c,d,e)}function lc(a){if(a instanceof nc){if(8==a.b)return"!";if(null===a.b)return"*"}return a.f()};function F(){this.b=this.a=null;this.o=0}function qc(a){this.node=a;this.next=this.a=null}function rc(a,b){if(!a.a)return b;if(!b.a)return a;var c=a.a;b=b.a;for(var d=null,e,f=0;c&&b;){e=c.node;var g=b.node;e==g||e instanceof $b&&g instanceof $b&&e.a==g.a?(e=c,c=c.next,b=b.next):0<Lb(c.node,b.node)?(e=b,b=b.next):(e=c,c=c.next);(e.a=d)?d.next=e:a.a=e;d=e;f++}for(e=c||b;e;)e.a=d,d=d.next=e,f++,e=e.next;a.b=d;a.o=f;return a}function sc(a,b){b=new qc(b);b.next=a.a;a.b?a.a.a=b:a.a=a.b=b;a.a=b;a.o++}
function G(a,b){b=new qc(b);b.a=a.b;a.a?a.b.next=b:a.a=a.b=b;a.b=b;a.o++}function tc(a){return(a=a.a)?a.node:null}function uc(a){return(a=tc(a))?E(a):""}F.prototype.iterator=function(a){return new vc(this,!!a)};function vc(a,b){this.f=a;this.b=(this.B=b)?a.b:a.a;this.a=null}vc.prototype.next=function(){var a=this.b;if(a){var b=this.a=a;this.b=this.B?a.a:a.next;return b.node}return null};function H(a){this.l=a;this.b=this.i=!1;this.f=null}function I(a){return"\n "+a.toString().split("\n").join("\n ")}function wc(a,b){a.i=b}function xc(a,b){a.b=b}function J(a,b){a=a.a(b);return a instanceof F?+uc(a):+a}function K(a,b){a=a.a(b);return a instanceof F?uc(a):""+a}function yc(a,b){a=a.a(b);return a instanceof F?!!a.o:!!a};function zc(a,b,c){H.call(this,a.l);this.c=a;this.j=b;this.w=c;this.i=b.i||c.i;this.b=b.b||c.b;this.c==Ac&&(c.b||c.i||4==c.l||0==c.l||!b.f?b.b||b.i||4==b.l||0==b.l||!c.f||(this.f={name:c.f.name,C:b}):this.f={name:b.f.name,C:c})}p(zc,H);
function Bc(a,b,c,d,e){b=b.a(d);c=c.a(d);var f;if(b instanceof F&&c instanceof F){b=b.iterator();for(d=b.next();d;d=b.next())for(e=c.iterator(),f=e.next();f;f=e.next())if(a(E(d),E(f)))return!0;return!1}if(b instanceof F||c instanceof F){b instanceof F?(e=b,d=c):(e=c,d=b);f=e.iterator();for(var g=typeof d,k=f.next();k;k=f.next()){switch(g){case "number":k=+E(k);break;case "boolean":k=!!E(k);break;case "string":k=E(k);break;default:throw Error("Illegal primitive type for comparison.");}if(e==b&&a(k,
d)||e==c&&a(d,k))return!0}return!1}return e?"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}zc.prototype.a=function(a){return this.c.u(this.j,this.w,a)};zc.prototype.toString=function(){var a="Binary Expression: "+this.c,a=a+I(this.j);return a+=I(this.w)};function Cc(a,b,c,d){this.Y=a;this.R=b;this.l=c;this.u=d}Cc.prototype.toString=function(){return this.Y};var Dc={};
function L(a,b,c,d){if(Dc.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new Cc(a,b,c,d);return Dc[a.toString()]=a}L("div",6,1,function(a,b,c){return J(a,c)/J(b,c)});L("mod",6,1,function(a,b,c){return J(a,c)%J(b,c)});L("*",6,1,function(a,b,c){return J(a,c)*J(b,c)});L("+",5,1,function(a,b,c){return J(a,c)+J(b,c)});L("-",5,1,function(a,b,c){return J(a,c)-J(b,c)});L("<",4,2,function(a,b,c){return Bc(function(a,b){return a<b},a,b,c)});
L(">",4,2,function(a,b,c){return Bc(function(a,b){return a>b},a,b,c)});L("<=",4,2,function(a,b,c){return Bc(function(a,b){return a<=b},a,b,c)});L(">=",4,2,function(a,b,c){return Bc(function(a,b){return a>=b},a,b,c)});var Ac=L("=",3,2,function(a,b,c){return Bc(function(a,b){return a==b},a,b,c,!0)});L("!=",3,2,function(a,b,c){return Bc(function(a,b){return a!=b},a,b,c,!0)});L("and",2,2,function(a,b,c){return yc(a,c)&&yc(b,c)});L("or",1,2,function(a,b,c){return yc(a,c)||yc(b,c)});function Ec(a,b){if(b.a.length&&4!=a.l)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");H.call(this,a.l);this.c=a;this.j=b;this.i=a.i;this.b=a.b}p(Ec,H);Ec.prototype.a=function(a){a=this.c.a(a);return Fc(this.j,a)};Ec.prototype.toString=function(){var a="Filter:"+I(this.c);return a+=I(this.j)};function Gc(a,b){if(b.length<a.O)throw Error("Function "+a.m+" expects at least"+a.O+" arguments, "+b.length+" given");if(null!==a.I&&b.length>a.I)throw Error("Function "+a.m+" expects at most "+a.I+" arguments, "+b.length+" given");a.X&&q(b,function(b,d){if(4!=b.l)throw Error("Argument "+d+" to function "+a.m+" is not of type Nodeset: "+b);});H.call(this,a.l);this.F=a;this.c=b;wc(this,a.i||Aa(b,function(a){return a.i}));xc(this,a.W&&!b.length||a.V&&!!b.length||Aa(b,function(a){return a.b}))}
p(Gc,H);Gc.prototype.a=function(a){return this.F.u.apply(null,Da(a,this.c))};Gc.prototype.toString=function(){var a="Function: "+this.F;if(this.c.length)var b=za(this.c,function(a,b){return a+I(b)},"Arguments:"),a=a+I(b);return a};function Hc(a,b,c,d,e,f,g,k,m){this.m=a;this.l=b;this.i=c;this.W=d;this.V=e;this.u=f;this.O=g;this.I=l(k)?k:g;this.X=!!m}Hc.prototype.toString=function(){return this.m};var Ic={};
function M(a,b,c,d,e,f,g,k){if(Ic.hasOwnProperty(a))throw Error("Function already created: "+a+".");Ic[a]=new Hc(a,b,c,d,!1,e,f,g,k)}M("boolean",2,!1,!1,function(a,b){return yc(b,a)},1);M("ceiling",1,!1,!1,function(a,b){return Math.ceil(J(b,a))},1);M("concat",3,!1,!1,function(a,b){return za(Ea(arguments,1),function(b,d){return b+K(d,a)},"")},2,null);M("contains",2,!1,!1,function(a,b,c){b=K(b,a);a=K(c,a);return-1!=b.indexOf(a)},2);M("count",1,!1,!1,function(a,b){return b.a(a).o},1,1,!0);
M("false",2,!1,!1,function(){return!1},0);M("floor",1,!1,!1,function(a,b){return Math.floor(J(b,a))},1);M("id",4,!1,!1,function(a,b){function c(a){if(Yb){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return Ca(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.a,e=9==d.nodeType?d:d.ownerDocument;a=K(b,a).split(/\s+/);var f=[];q(a,function(a){a=c(a);!a||0<=wa(f,a)||f.push(a)});f.sort(Lb);var g=new F;q(f,function(a){G(g,a)});return g},1);
M("lang",2,!1,!1,function(){return!1},1);M("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.f},0);M("local-name",3,!1,!0,function(a,b){return(a=b?tc(b.a(a)):a.a)?a.localName||a.nodeName.toLowerCase():""},0,1,!0);M("name",3,!1,!0,function(a,b){return(a=b?tc(b.a(a)):a.a)?a.nodeName.toLowerCase():""},0,1,!0);M("namespace-uri",3,!0,!1,function(){return""},0,1,!0);
M("normalize-space",3,!1,!0,function(a,b){return(b?K(b,a):E(a.a)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);M("not",2,!1,!1,function(a,b){return!yc(b,a)},1);M("number",1,!1,!0,function(a,b){return b?J(b,a):+E(a.a)},0,1);M("position",1,!0,!1,function(a){return a.b},0);M("round",1,!1,!1,function(a,b){return Math.round(J(b,a))},1);M("starts-with",2,!1,!1,function(a,b,c){b=K(b,a);a=K(c,a);return!b.lastIndexOf(a,0)},2);M("string",3,!1,!0,function(a,b){return b?K(b,a):E(a.a)},0,1);
M("string-length",1,!1,!0,function(a,b){return(b?K(b,a):E(a.a)).length},0,1);M("substring",3,!1,!1,function(a,b,c,d){c=J(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?J(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=K(b,a);return Infinity==d?a.substring(e):a.substring(e,c+Math.round(d))},2,3);M("substring-after",3,!1,!1,function(a,b,c){b=K(b,a);a=K(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2);
M("substring-before",3,!1,!1,function(a,b,c){b=K(b,a);a=K(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);M("sum",1,!1,!1,function(a,b){a=b.a(a).iterator();b=0;for(var c=a.next();c;c=a.next())b+=+E(c);return b},1,1,!0);M("translate",3,!1,!1,function(a,b,c,d){b=K(b,a);c=K(c,a);var e=K(d,a);d={};for(var f=0;f<c.length;f++)a=c.charAt(f),a in d||(d[a]=e.charAt(f));c="";for(f=0;f<b.length;f++)a=b.charAt(f),c+=a in d?d[a]:a;return c},3);M("true",2,!1,!1,function(){return!0},0);function nc(a,b){this.j=a;this.c=l(b)?b:null;this.b=null;switch(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 Jc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}nc.prototype.a=function(a){return null===this.b||this.b==a.nodeType};nc.prototype.f=function(){return this.j};
nc.prototype.toString=function(){var a="Kind Test: "+this.j;null===this.c||(a+=I(this.c));return a};function Kc(a){H.call(this,3);this.c=a.substring(1,a.length-1)}p(Kc,H);Kc.prototype.a=function(){return this.c};Kc.prototype.toString=function(){return"Literal: "+this.c};function kc(a,b){this.m=a.toLowerCase();a="*"==this.m?"*":"http://www.w3.org/1999/xhtml";this.c=b?b.toLowerCase():a}kc.prototype.a=function(a){var b=a.nodeType;if(1!=b&&2!=b)return!1;b=l(a.localName)?a.localName:a.nodeName;return"*"!=this.m&&this.m!=b.toLowerCase()?!1:"*"==this.c?!0:this.c==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};kc.prototype.f=function(){return this.m};
kc.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.c?"":this.c+":")+this.m};function Lc(a){H.call(this,1);this.c=a}p(Lc,H);Lc.prototype.a=function(){return this.c};Lc.prototype.toString=function(){return"Number: "+this.c};function Mc(a,b){H.call(this,a.l);this.j=a;this.c=b;this.i=a.i;this.b=a.b;1==this.c.length&&(a=this.c[0],a.G||a.c!=Nc||(a=a.w,"*"!=a.f()&&(this.f={name:a.f(),C:null})))}p(Mc,H);function Oc(){H.call(this,4)}p(Oc,H);Oc.prototype.a=function(a){var b=new F;a=a.a;9==a.nodeType?G(b,a):G(b,a.ownerDocument);return b};Oc.prototype.toString=function(){return"Root Helper Expression"};function Pc(){H.call(this,4)}p(Pc,H);Pc.prototype.a=function(a){var b=new F;G(b,a.a);return b};Pc.prototype.toString=function(){return"Context Helper Expression"};
function Qc(a){return"/"==a||"//"==a}Mc.prototype.a=function(a){var b=this.j.a(a);if(!(b instanceof F))throw Error("Filter expression must evaluate to nodeset.");a=this.c;for(var c=0,d=a.length;c<d&&b.o;c++){var e=a[c],f=b.iterator(e.c.B);if(e.i||e.c!=Rc)if(e.i||e.c!=Sc){var g=f.next();for(b=e.a(new Xb(g));g=f.next();)g=e.a(new Xb(g)),b=rc(b,g)}else g=f.next(),b=e.a(new Xb(g));else{for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.a(new Xb(g))}}return b};
Mc.prototype.toString=function(){var a="Path Expression:"+I(this.j);if(this.c.length){var b=za(this.c,function(a,b){return a+I(b)},"Steps:");a+=I(b)}return a};function Tc(a,b){this.a=a;this.B=!!b}
function Fc(a,b,c){for(c=c||0;c<a.a.length;c++)for(var d=a.a[c],e=b.iterator(),f=b.o,g,k=0;g=e.next();k++){var m=a.B?f-k:k+1;g=d.a(new Xb(g,m,f));if("number"==typeof g)m=m==g;else if("string"==typeof g||"boolean"==typeof g)m=!!g;else if(g instanceof F)m=0<g.o;else throw Error("Predicate.evaluate returned an unexpected type.");if(!m){m=e;g=m.f;var v=m.a;if(!v)throw Error("Next must be called at least once before remove.");var t=v.a,v=v.next;t?t.next=v:g.a=v;v?v.a=t:g.b=t;g.o--;m.a=null}}return b}
Tc.prototype.toString=function(){return za(this.a,function(a,b){return a+I(b)},"Predicates:")};function Uc(a,b,c,d){H.call(this,4);this.c=a;this.w=b;this.j=c||new Tc([]);this.G=!!d;b=this.j;b=0<b.a.length?b.a[0].f:null;a.Z&&b&&(a=b.name,a=Yb?a.toLowerCase():a,this.f={name:a,C:b.C});a:{a=this.j;for(b=0;b<a.a.length;b++)if(c=a.a[b],c.i||1==c.l||0==c.l){a=!0;break a}a=!1}this.i=a}p(Uc,H);
Uc.prototype.a=function(a){var b=a.a,c=this.f,d=null,e=null,f=0;c&&(d=c.name,e=c.C?K(c.C,a):null,f=1);if(this.G)if(this.i||this.c!=Vc)if(b=(new Uc(Wc,new nc("node"))).a(a).iterator(),c=b.next())for(a=this.u(c,d,e,f);c=b.next();)a=rc(a,this.u(c,d,e,f));else a=new F;else a=hc(this.w,b,d,e),a=Fc(this.j,a,f);else a=this.u(a.a,d,e,f);return a};Uc.prototype.u=function(a,b,c,d){a=this.c.F(this.w,a,b,c);return a=Fc(this.j,a,d)};
Uc.prototype.toString=function(){var a="Step:"+I("Operator: "+(this.G?"//":"/"));this.c.m&&(a+=I("Axis: "+this.c));a+=I(this.w);if(this.j.a.length){var b=za(this.j.a,function(a,b){return a+I(b)},"Predicates:");a+=I(b)}return a};function Xc(a,b,c,d){this.m=a;this.F=b;this.B=c;this.Z=d}Xc.prototype.toString=function(){return this.m};var Yc={};function N(a,b,c,d){if(Yc.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new Xc(a,b,c,!!d);return Yc[a]=b}
N("ancestor",function(a,b){for(var c=new F;b=b.parentNode;)a.a(b)&&sc(c,b);return c},!0);N("ancestor-or-self",function(a,b){var c=new F;do a.a(b)&&sc(c,b);while(b=b.parentNode);return c},!0);
var Nc=N("attribute",function(a,b){var c=new F,d=a.f();if("style"==d&&Yb&&b.style)return G(c,new $b(b.style,b,"style",b.style.cssText)),c;var e=b.attributes;if(e)if(a instanceof nc&&null===a.b||"*"==d)for(d=0;a=e[d];d++)Yb?a.nodeValue&&G(c,ac(b,a)):G(c,a);else(a=e.getNamedItem(d))&&(Yb?a.nodeValue&&G(c,ac(b,a)):G(c,a));return c},!1),Vc=N("child",function(a,b,c,d,e){return(Yb?oc:pc).call(null,a,b,n(c)?c:null,n(d)?d:null,e||new F)},!1,!0);N("descendant",hc,!1,!0);
var Wc=N("descendant-or-self",function(a,b,c,d){var e=new F;gc(b,c,d)&&a.a(b)&&G(e,b);return hc(a,b,c,d,e)},!1,!0),Rc=N("following",function(a,b,c,d){var e=new F;do for(var f=b;f=f.nextSibling;)gc(f,c,d)&&a.a(f)&&G(e,f),e=hc(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);N("following-sibling",function(a,b){for(var c=new F;b=b.nextSibling;)a.a(b)&&G(c,b);return c},!1);N("namespace",function(){return new F},!1);
var Zc=N("parent",function(a,b){var c=new F;if(9==b.nodeType)return c;if(2==b.nodeType)return G(c,b.ownerElement),c;b=b.parentNode;a.a(b)&&G(c,b);return c},!1),Sc=N("preceding",function(a,b,c,d){var e=new F,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,k=f.length;g<k;g++){var m=[];for(b=f[g];b=b.previousSibling;)m.unshift(b);for(var v=0,t=m.length;v<t;v++)b=m[v],gc(b,c,d)&&a.a(b)&&G(e,b),e=hc(a,b,c,d,e)}return e},!0,!0);
N("preceding-sibling",function(a,b){for(var c=new F;b=b.previousSibling;)a.a(b)&&sc(c,b);return c},!0);var $c=N("self",function(a,b){var c=new F;a.a(b)&&G(c,b);return c},!1);function ad(a){H.call(this,1);this.c=a;this.i=a.i;this.b=a.b}p(ad,H);ad.prototype.a=function(a){return-J(this.c,a)};ad.prototype.toString=function(){return"Unary Expression: -"+I(this.c)};function bd(a){H.call(this,4);this.c=a;wc(this,Aa(this.c,function(a){return a.i}));xc(this,Aa(this.c,function(a){return a.b}))}p(bd,H);bd.prototype.a=function(a){var b=new F;q(this.c,function(c){c=c.a(a);if(!(c instanceof F))throw Error("Path expression must evaluate to NodeSet.");b=rc(b,c)});return b};bd.prototype.toString=function(){return za(this.c,function(a,b){return a+I(b)},"Union Expression:")};function cd(a,b){this.a=a;this.b=b}function dd(a){for(var b,c=[];;){O(a,"Missing right hand side of binary expression.");b=ed(a);var d=a.a.next();if(!d)break;var e=(d=Dc[d]||null)&&d.R;if(!e){a.a.a--;break}for(;c.length&&e<=c[c.length-1].R;)b=new zc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new zc(c.pop(),c.pop(),b);return b}function O(a,b){if(fc(a.a))throw Error(b);}function fd(a,b){a=a.a.next();if(a!=b)throw Error("Bad token, expected: "+b+" got: "+a);}
function gd(a){a=a.a.next();if(")"!=a)throw Error("Bad token: "+a);}function hd(a){a=a.a.next();if(2>a.length)throw Error("Unclosed literal string");return new Kc(a)}
function id(a){var b=[];if(Qc(D(a.a))){var c=a.a.next();var d=D(a.a);if("/"==c&&(fc(a.a)||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Oc;d=new Oc;O(a,"Missing next location step.");c=jd(a,c);b.push(c)}else{a:{c=D(a.a);d=c.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":a.a.next();c=dd(a);O(a,'unclosed "("');fd(a,")");break;case '"':case "'":c=hd(a);break;default:if(isNaN(+c))if(!Jc(c)&&/(?![0-9])[\w]/.test(d)&&"("==D(a.a,
1)){c=a.a.next();c=Ic[c]||null;a.a.next();for(d=[];")"!=D(a.a);){O(a,"Missing function argument list.");d.push(dd(a));if(","!=D(a.a))break;a.a.next()}O(a,"Unclosed function argument list.");gd(a);c=new Gc(c,d)}else{c=null;break a}else c=new Lc(+a.a.next())}"["==D(a.a)&&(d=new Tc(kd(a)),c=new Ec(c,d))}if(c)if(Qc(D(a.a)))d=c;else return c;else c=jd(a,"/"),d=new Pc,b.push(c)}for(;Qc(D(a.a));)c=a.a.next(),O(a,"Missing next location step."),c=jd(a,c),b.push(c);return new Mc(d,b)}
function jd(a,b){if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==D(a.a)){var c=new Uc($c,new nc("node"));a.a.next();return c}if(".."==D(a.a))return c=new Uc(Zc,new nc("node")),a.a.next(),c;if("@"==D(a.a)){var d=Nc;a.a.next();O(a,"Missing attribute name")}else if("::"==D(a.a,1)){if(!/(?![0-9])[\w]/.test(D(a.a).charAt(0)))throw Error("Bad token: "+a.a.next());var e=a.a.next();d=Yc[e]||null;if(!d)throw Error("No axis with name: "+e);a.a.next();O(a,"Missing node name")}else d=
Vc;e=D(a.a);if(/(?![0-9])[\w\*]/.test(e.charAt(0)))if("("==D(a.a,1)){if(!Jc(e))throw Error("Invalid node type: "+e);e=a.a.next();if(!Jc(e))throw Error("Invalid type name: "+e);fd(a,"(");O(a,"Bad nodetype");var f=D(a.a).charAt(0),g=null;if('"'==f||"'"==f)g=hd(a);O(a,"Bad nodetype");gd(a);e=new nc(e,g)}else if(e=a.a.next(),f=e.indexOf(":"),-1==f)e=new kc(e);else{var g=e.substring(0,f);if("*"==g)var k="*";else if(k=a.b(g),!k)throw Error("Namespace prefix not declared: "+g);e=e.substr(f+1);e=new kc(e,
k)}else throw Error("Bad token: "+a.a.next());a=new Tc(kd(a),d.B);return c||new Uc(d,e,a,"//"==b)}function kd(a){for(var b=[];"["==D(a.a);){a.a.next();O(a,"Missing predicate expression.");var c=dd(a);b.push(c);O(a,"Unclosed predicate expression.");fd(a,"]")}return b}function ed(a){if("-"==D(a.a))return a.a.next(),new ad(ed(a));var b=id(a);if("|"!=D(a.a))a=b;else{for(b=[b];"|"==a.a.next();)O(a,"Missing next union location path."),b.push(id(a));a.a.a--;a=new bd(b)}return a};function ld(a){switch(a.nodeType){case 1:return ma(md,a);case 9:return ld(a.documentElement);case 11:case 10:case 6:case 12:return nd;default:return a.parentNode?ld(a.parentNode):nd}}function nd(){return null}function md(a,b){if(a.prefix==b)return a.namespaceURI||"http://www.w3.org/1999/xhtml";var c=a.getAttributeNode("xmlns:"+b);return c&&c.specified?c.value||null:a.parentNode&&9!=a.parentNode.nodeType?md(a.parentNode,b):null};function od(a,b){if(!a.length)throw Error("Empty XPath expression.");a=cc(a);if(fc(a))throw Error("Invalid XPath expression.");b?fa(b)||(b=la(b.lookupNamespaceURI,b)):b=function(){return null};var c=dd(new cd(a,b));if(!fc(a))throw Error("Bad token: "+a.next());this.evaluate=function(a,b){a=c.a(new Xb(a));return new P(a,b)}}
function P(a,b){if(!b)if(a instanceof F)b=4;else if("string"==typeof a)b=2;else if("number"==typeof a)b=1;else if("boolean"==typeof a)b=3;else throw Error("Unexpected evaluation result.");if(2!=b&&1!=b&&3!=b&&!(a instanceof F))throw Error("value could not be converted to the specified type");this.resultType=b;switch(b){case 2:this.stringValue=a instanceof F?uc(a):""+a;break;case 1:this.numberValue=a instanceof F?+uc(a):+a;break;case 3:this.booleanValue=a instanceof F?0<a.o:!!a;break;case 4:case 5:case 6:case 7:var c=
a.iterator();var d=[];for(var e=c.next();e;e=c.next())d.push(e instanceof $b?e.a:e);this.snapshotLength=a.o;this.invalidIteratorState=!1;break;case 8:case 9:a=tc(a);this.singleNodeValue=a instanceof $b?a.a:a;break;default:throw Error("Unknown XPathResult type.");}var f=0;this.iterateNext=function(){if(4!=b&&5!=b)throw Error("iterateNext called with wrong result type");return f>=d.length?null:d[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");
return a>=d.length||0>a?null:d[a]}}P.ANY_TYPE=0;P.NUMBER_TYPE=1;P.STRING_TYPE=2;P.BOOLEAN_TYPE=3;P.UNORDERED_NODE_ITERATOR_TYPE=4;P.ORDERED_NODE_ITERATOR_TYPE=5;P.UNORDERED_NODE_SNAPSHOT_TYPE=6;P.ORDERED_NODE_SNAPSHOT_TYPE=7;P.ANY_UNORDERED_NODE_TYPE=8;P.FIRST_ORDERED_NODE_TYPE=9;function pd(a){this.lookupNamespaceURI=ld(a)}
function qd(a,b){a=a||aa;var c=a.Document&&a.Document.prototype||a.document;if(!c.evaluate||b)a.XPathResult=P,c.evaluate=function(a,b,c,g){return(new od(a,c)).evaluate(b,g)},c.createExpression=function(a,b){return new od(a,b)},c.createNSResolver=function(a){return new pd(a)}}ca("wgxpath.install",qd);var Q={};Q.K=function(){var a={ba:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}();
Q.u=function(a,b,c){var d=B(a);if(!d.documentElement)return null;(x||ob)&&qd(Ib(d));try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):Q.K;if(x&&!ib(7))return d.evaluate.call(d,b,a,e,c,null);if(!x||9<=Number(jb)){for(var f={},g=d.getElementsByTagName("*"),k=0;k<g.length;++k){var m=g[k],v=m.namespaceURI;if(v&&!f[v]){var t=m.lookupPrefix(v);if(!t)var A=v.match(".*/(\\w+)/?$"),t=A?A[1]:"xhtml";f[v]=t}}var Z={},pa;for(pa in f)Z[f[pa]]=pa;e=function(a){return Z[a]||null}}try{return d.evaluate(b,
a,e,c,null)}catch(Ya){if("TypeError"===Ya.name)return e=d.createNSResolver?d.createNSResolver(d.documentElement):Q.K,d.evaluate(b,a,e,c,null);throw Ya;}}catch(Ya){if(!y||"NS_ERROR_ILLEGAL_VALUE"!=Ya.name)throw new r(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+Ya);}};Q.L=function(a,b){if(!a||1!=a.nodeType)throw new r(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element.");};
Q.v=function(a,b){var c=function(){var c=Q.u(b,a,9);return c?c.singleNodeValue||null:b.selectSingleNode?(c=B(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();null===c||Q.L(c,a);return c};
Q.s=function(a,b){var c=function(){var c=Q.u(b,a,7);if(c){for(var e=c.snapshotLength,f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=B(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();q(c,function(b){Q.L(b,a)});return c};function rd(a,b,c,d){this.b=a;this.f=b;this.c=c;this.a=d}h=rd.prototype;h.toString=function(){return"("+this.b+"t, "+this.f+"r, "+this.c+"b, "+this.a+"l)"};h.contains=function(a){return this&&a?a instanceof rd?a.a>=this.a&&a.f<=this.f&&a.b>=this.b&&a.c<=this.c:a.x>=this.a&&a.x<=this.f&&a.y>=this.b&&a.y<=this.c:!1};h.ceil=function(){this.b=Math.ceil(this.b);this.f=Math.ceil(this.f);this.c=Math.ceil(this.c);this.a=Math.ceil(this.a);return this};
h.floor=function(){this.b=Math.floor(this.b);this.f=Math.floor(this.f);this.c=Math.floor(this.c);this.a=Math.floor(this.a);return this};h.round=function(){this.b=Math.round(this.b);this.f=Math.round(this.f);this.c=Math.round(this.c);this.a=Math.round(this.a);return this};h.scale=function(a,b){b=ba(b)?b:a;this.a*=a;this.f*=a;this.b*=b;this.c*=b;return this};function R(a,b,c,d){this.a=a;this.b=b;this.width=c;this.height=d}h=R.prototype;h.toString=function(){return"("+this.a+", "+this.b+" - "+this.width+"w x "+this.height+"h)"};h.contains=function(a){return a instanceof Eb?a.x>=this.a&&a.x<=this.a+this.width&&a.y>=this.b&&a.y<=this.b+this.height:this.a<=a.a&&this.a+this.width>=a.a+a.width&&this.b<=a.b&&this.b+this.height>=a.b+a.height};
h.ceil=function(){this.a=Math.ceil(this.a);this.b=Math.ceil(this.b);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};h.floor=function(){this.a=Math.floor(this.a);this.b=Math.floor(this.b);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};h.round=function(){this.a=Math.round(this.a);this.b=Math.round(this.b);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};
h.scale=function(a,b){b=ba(b)?b:a;this.a*=a;this.width*=a;this.b*=b;this.height*=b;return this};function sd(a,b){var c=B(a);return c.defaultView&&c.defaultView.getComputedStyle&&(a=c.defaultView.getComputedStyle(a,null))?a[b]||a.getPropertyValue(b)||"":""}var td={thin:2,medium:4,thick:6};
function ud(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null;if(c in td)a=td[c];else if(/^\d+px?$/.test(c))a=parseInt(c,10);else{b=a.style.left;var d=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=b;a.runtimeStyle.left=d;a=+c}return a};var vd="function"===typeof ShadowRoot;function wd(a){a:{a=B(a);try{var b=a&&a.activeElement;break a}catch(c){}b=null}return x&&b&&"undefined"===typeof b.nodeType?null:b}function xd(a){var b;if(b=yd(a,!0)&&zd(a))b=!(x||y&&!vb("1.9.2")?0:"none"==S(a,"pointer-events"));return b}var Ad="A AREA BUTTON INPUT LABEL SELECT TEXTAREA".split(" ");function Bd(a){return Aa(Ad,function(b){return C(a,b)})||null!=Tb(a,"tabindex")&&0<=Number(Wb(a,"tabIndex"))||Cd(a)}var Dd="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" ");
function zd(a){return Aa(Dd,function(b){return C(a,b)})?Wb(a,"disabled")?!1:a.parentNode&&1==a.parentNode.nodeType&&C(a,"OPTGROUP")||C(a,"OPTION")?zd(a.parentNode):!Rb(a,function(a){var b=a.parentNode;if(b&&C(b,"FIELDSET")&&Wb(b,"disabled")){if(!C(a,"LEGEND"))return!0;for(;a=l(a.previousElementSibling)?a.previousElementSibling:Jb(a.previousSibling);)if(C(a,"LEGEND"))return!0}return!1},!0):!0}var Ed="text search tel url email password number".split(" ");
function Fd(a){function b(a){return"inherit"==a.contentEditable?(a=Gd(a))?b(a):!1:"true"==a.contentEditable}return l(a.contentEditable)?!x&&l(a.isContentEditable)?a.isContentEditable:b(a):!1}function Cd(a){var b;(b=(C(a,"TEXTAREA")?!0:C(a,"INPUT")?0<=wa(Ed,a.type.toLowerCase()):Fd(a)?!0:!1)||(C(a,"INPUT")?"file"==a.type.toLowerCase():!1))||(b=C(a,"INPUT")?"range"==a.type.toLowerCase():!1);return b&&!Wb(a,"readOnly")}
function Gd(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return C(a)?a:null}
function S(a,b){b=va(b);if("float"==b||"cssFloat"==b||"styleFloat"==b)b=Db?"styleFloat":"cssFloat";a=sd(a,b)||Hd(a,b);if(null===a)a=null;else if(0<=wa(Ga,b)){b:{var c=a.match(Ja);if(c){b=Number(c[1]);var d=Number(c[2]),e=Number(c[3]),c=Number(c[4]);if(0<=b&&255>=b&&0<=d&&255>=d&&0<=e&&255>=e&&0<=c&&1>=c){b=[b,d,e,c];break b}}b=null}if(!b)b:{if(e=a.match(Ka))if(b=Number(e[1]),d=Number(e[2]),e=Number(e[3]),0<=b&&255>=b&&0<=d&&255>=d&&0<=e&&255>=e){b=[b,d,e,1];break b}b=null}if(!b)b:{b=a.toLowerCase();
d=Fa[b.toLowerCase()];if(!d&&(d="#"==b.charAt(0)?b:"#"+b,4==d.length&&(d=d.replace(Ha,"#$1$1$2$2$3$3")),!Ia.test(d))){b=null;break b}b=[parseInt(d.substr(1,2),16),parseInt(d.substr(3,2),16),parseInt(d.substr(5,2),16),1]}a=b?"rgba("+b.join(", ")+")":a}return a}function Hd(a,b){var c=a.currentStyle||a.style,d=c[b];!l(d)&&fa(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?l(d)?d:null:(a=Gd(a))?Hd(a,b):null}
function Id(a,b,c){function d(a){var b=Jd(a);return 0<b.height&&0<b.width?!0:C(a,"PATH")&&(0<b.height||0<b.width)?(a=S(a,"stroke-width"),!!a&&0<parseInt(a,10)):"hidden"!=S(a,"overflow")&&Aa(a.childNodes,function(a){return 3==a.nodeType||C(a)&&d(a)})}function e(a){return Kd(a)==Ld&&Ba(a.childNodes,function(a){return!C(a)||e(a)||!d(a)})}if(!C(a))throw Error("Argument to isShown must be of type Element");if(C(a,"BODY"))return!0;if(C(a,"OPTION")||C(a,"OPTGROUP"))return a=Rb(a,function(a){return C(a,"SELECT")}),
!!a&&Id(a,!0,c);var f=Md(a);if(f)return!!f.M&&0<f.rect.width&&0<f.rect.height&&Id(f.M,b,c);if(C(a,"INPUT")&&"hidden"==a.type.toLowerCase()||C(a,"NOSCRIPT"))return!1;f=S(a,"visibility");return"collapse"!=f&&"hidden"!=f&&c(a)&&(b||Nd(a))&&d(a)?!e(a):!1}
function yd(a,b){function c(a){if(C(a)&&"none"==S(a,"display"))return!1;var b;(b=a.parentNode)&&b.shadowRoot&&void 0!==a.assignedSlot?b=a.assignedSlot?a.assignedSlot.parentNode:null:a.getDestinationInsertionPoints&&(a=a.getDestinationInsertionPoints(),0<a.length&&(b=a[a.length-1]));if(vd&&b instanceof ShadowRoot){if(b.host.shadowRoot!==b)return!1;b=b.host}return!b||9!=b.nodeType&&11!=b.nodeType?b&&c(b):!0}return Id(a,!!b,c)}var Ld="hidden";
function Kd(a,b){function c(a){function b(a){return a==g?!0:!S(a,"display").lastIndexOf("inline",0)||"absolute"==c&&"static"==S(a,"position")?!1:!0}var c=S(a,"position");if("fixed"==c)return v=!0,a==g?null:g;for(a=Gd(a);a&&!b(a);)a=Gd(a);return a}function d(a){var b=a;if("visible"==m)if(a==g&&k)b=k;else if(a==k)return{x:"visible",y:"visible"};b={x:S(b,"overflow-x"),y:S(b,"overflow-y")};a==g&&(b.x="visible"==b.x?"auto":b.x,b.y="visible"==b.y?"auto":b.y);return b}function e(a){if(a==g){var b=(new Hb(f)).a;
a=b.scrollingElement?b.scrollingElement:z||"CSS1Compat"!=b.compatMode?b.body||b.documentElement:b.documentElement;b=b.parentWindow||b.defaultView;a=x&&ib("10")&&b.pageYOffset!=a.scrollTop?new Eb(a.scrollLeft,a.scrollTop):new Eb(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new Eb(a.scrollLeft,a.scrollTop);return a}b=Od(a,b);var f=B(a),g=f.documentElement,k=f.body,m=S(g,"overflow"),v;for(a=c(a);a;a=c(a)){var t=d(a);if("visible"!=t.x||"visible"!=t.y){var A=Jd(a);if(!A.width||!A.height)return Ld;
var Z=b.f<A.a,pa=b.c<A.b;if(Z&&"hidden"==t.x||pa&&"hidden"==t.y)return Ld;if(Z&&"visible"!=t.x||pa&&"visible"!=t.y){Z=e(a);pa=b.c<A.b-Z.y;if(b.f<A.a-Z.x&&"visible"!=t.x||pa&&"visible"!=t.x)return Ld;b=Kd(a);return b==Ld?Ld:"scroll"}Z=b.a>=A.a+A.width;A=b.b>=A.b+A.height;if(Z&&"hidden"==t.x||A&&"hidden"==t.y)return Ld;if(Z&&"visible"!=t.x||A&&"visible"!=t.y){if(v&&(t=e(a),b.a>=g.scrollWidth-t.x||b.f>=g.scrollHeight-t.y))return Ld;b=Kd(a);return b==Ld?Ld:"scroll"}}}return"none"}
function Jd(a){var b=Md(a);if(b)return b.rect;if(C(a,"HTML"))return a=B(a),a=(Ib(a)||window).document,a="CSS1Compat"==a.compatMode?a.documentElement:a.body,a=new Fb(a.clientWidth,a.clientHeight),new R(0,0,a.width,a.height);try{var c=a.getBoundingClientRect()}catch(d){return new R(0,0,0,0)}b=new R(c.left,c.top,c.right-c.left,c.bottom-c.top);x&&a.ownerDocument.body&&(a=B(a),b.a-=a.documentElement.clientLeft+a.body.clientLeft,b.b-=a.documentElement.clientTop+a.body.clientTop);return b}
function Md(a){var b=C(a,"MAP");if(!b&&!C(a,"AREA"))return null;var c=b?a:C(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;c&&c.name&&(d=Q.v('/descendant::*[@usemap = "#'+c.name+'"]',B(c)))&&(e=Jd(d),b||"default"==a.shape.toLowerCase()||(a=Pd(a),b=Math.min(Math.max(a.a,0),e.width),c=Math.min(Math.max(a.b,0),e.height),e=new R(b+e.a,c+e.b,Math.min(a.width,e.width-b),Math.min(a.height,e.height-c))));return{M:d,rect:e||new R(0,0,0,0)}}
function Pd(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){var b=a[0],c=a[1];return new R(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new R(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){for(var b=a[0],c=a[1],d=b,e=c,f=2;f+1<a.length;f+=2)b=Math.min(b,a[f]),d=Math.max(d,a[f]),c=Math.min(c,a[f+1]),e=Math.max(e,a[f+1]);return new R(b,c,d-b,e-c)}return new R(0,0,0,0)}
function Od(a,b){a=Jd(a);a=new rd(a.b,a.a+a.width,a.b+a.height,a.a);b&&(b=b instanceof R?b:new R(b.x,b.y,1,1),a.a=Math.min(Math.max(a.a+b.a,a.a),a.f),a.b=Math.min(Math.max(a.b+b.b,a.b),a.c),a.f=Math.min(Math.max(a.a+b.width,a.a),a.f),a.c=Math.min(Math.max(a.b+b.height,a.b),a.c));return a}function Qd(a){return a.replace(/^[^\S\xa0]+|[^\S\xa0]+$/g,"")}function Rd(a){var b=[];vd?Sd(a,b):Td(a,b);a=ya(b,Qd);return Qd(a.join("\n")).replace(/\xa0/g," ")}
function Ud(a,b,c){var d=yd;if(C(a,"BR"))b.push("");else{var e=C(a,"TD"),f=S(a,"display"),g=!e&&!(0<=wa(Vd,f)),k=l(a.previousElementSibling)?a.previousElementSibling:Jb(