Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updating Atoms.

  • Loading branch information...
commit 36448daa4aed09c7917f52c85717ef21d197e97e 1 parent e316942
@detro authored
Showing with 5,920 additions and 1,595 deletions.
  1. +47 −15 src/third_party/webdriver-atoms/active_element.js
  2. +6 −6 src/third_party/webdriver-atoms/back.js
  3. +126 −124 src/third_party/webdriver-atoms/clear.js
  4. +16 −15 src/third_party/webdriver-atoms/clear_local_storage.js
  5. +16 −15 src/third_party/webdriver-atoms/clear_session_storage.js
  6. +133 −131 src/third_party/webdriver-atoms/click.js
  7. +47 −15 src/third_party/webdriver-atoms/default_content.js
  8. +4,293 −114 src/third_party/webdriver-atoms/deps.js
  9. +116 −108 src/third_party/webdriver-atoms/double_click.js
  10. +115 −107 src/third_party/webdriver-atoms/drag.js
  11. +15 −16 src/third_party/webdriver-atoms/execute_async_script.js
  12. +13 −13 src/third_party/webdriver-atoms/execute_script.js
  13. +16 −15 src/third_party/webdriver-atoms/execute_sql.js
  14. +86 −43 src/third_party/webdriver-atoms/find_element.js
  15. +86 −43 src/third_party/webdriver-atoms/find_elements.js
  16. +98 −98 src/third_party/webdriver-atoms/focus_on_element.js
  17. +6 −6 src/third_party/webdriver-atoms/forward.js
  18. +87 −44 src/third_party/webdriver-atoms/frame_by_id_or_name.js
  19. +47 −15 src/third_party/webdriver-atoms/frame_by_index.js
  20. +15 −14 src/third_party/webdriver-atoms/get_appcache_status.js
  21. +54 −97 src/third_party/webdriver-atoms/get_attribute.js
  22. +60 −104 src/third_party/webdriver-atoms/get_attribute_value.js
  23. +7 −7 src/third_party/webdriver-atoms/get_current_position.js
  24. +7 −7 src/third_party/webdriver-atoms/get_element_from_cache.js
  25. +47 −15 src/third_party/webdriver-atoms/get_frame_window.js
  26. +40 −8 src/third_party/webdriver-atoms/get_in_view_location.js
  27. +16 −15 src/third_party/webdriver-atoms/get_local_storage_item.js
  28. +16 −15 src/third_party/webdriver-atoms/get_local_storage_keys.js
  29. +16 −15 src/third_party/webdriver-atoms/get_local_storage_size.js
  30. +9 −7 src/third_party/webdriver-atoms/get_location.js
  31. +16 −15 src/third_party/webdriver-atoms/get_session_storage_item.js
  32. +16 −15 src/third_party/webdriver-atoms/get_session_storage_keys.js
  33. +16 −15 src/third_party/webdriver-atoms/get_session_storage_size.js
  34. +61 −97 src/third_party/webdriver-atoms/get_size.js
  35. +92 −101 src/third_party/webdriver-atoms/get_text.js
  36. +63 −105 src/third_party/webdriver-atoms/get_top_left_coordinates.js
Sorry, we could not display the entire diff because it was too big.
View
62 src/third_party/webdriver-atoms/active_element.js
@@ -1,15 +1,47 @@
-function(){return function(){var g=void 0,h=!0,i=null,l=!1,m=this;
-function n(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 aa(a){var b=n(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){a=n(a);return"object"==a||"array"==a||"function"==a}var ca=Date.now||function(){return+new Date};function o(a,b){function c(){}c.prototype=b.prototype;a.h=b.prototype;a.prototype=new c};function da(a,b){for(var c=1;c<arguments.length;c++)var d=(""+arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a}
-function ea(a,b){for(var c=0,d=(""+a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=(""+b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),B=0;0==c&&B<f;B++){var ya=d[B]||"",za=e[B]||"",Aa=RegExp("(\\d*)(\\D*)","g"),Ba=RegExp("(\\d*)(\\D*)","g");do{var j=Aa.exec(ya)||["","",""],k=Ba.exec(za)||["","",""];if(0==j[0].length&&0==k[0].length)break;c=((0==j[1].length?0:parseInt(j[1],10))<(0==k[1].length?0:parseInt(k[1],10))?-1:(0==j[1].length?0:parseInt(j[1],10))>(0==k[1].length?
-0:parseInt(k[1],10))?1:0)||((0==j[2].length)<(0==k[2].length)?-1:(0==j[2].length)>(0==k[2].length)?1:0)||(j[2]<k[2]?-1:j[2]>k[2]?1:0)}while(0==c)}return c};var p,q,r,s;function t(){return m.navigator?m.navigator.userAgent:i}s=r=q=p=l;var u;if(u=t()){var fa=m.navigator;p=0==u.indexOf("Opera");q=!p&&-1!=u.indexOf("MSIE");r=!p&&-1!=u.indexOf("WebKit");s=!p&&!r&&"Gecko"==fa.product}var v=p,w=q,x=s,y=r,z;
-a:{var A="",C;if(v&&m.opera)var D=m.opera.version,A="function"==typeof D?D():D;else if(x?C=/rv\:([^\);]+)(\)|;)/:w?C=/MSIE\s+([^\);]+)(\)|;)/:y&&(C=/WebKit\/(\S+)/),C)var ga=C.exec(t()),A=ga?ga[1]:"";if(w){var E,ha=m.document;E=ha?ha.documentMode:g;if(E>parseFloat(A)){z=""+E;break a}}z=A}var ia={};function F(a){return ia[a]||(ia[a]=0<=ea(z,a))}var ja={};function ka(){return ja[9]||(ja[9]=w&&document.documentMode&&9<=document.documentMode)};var G=window;function H(a){this.stack=Error().stack||"";a&&(this.message=""+a)}o(H,Error);H.prototype.name="CustomError";function la(a,b){b.unshift(a);H.call(this,da.apply(i,b));b.shift()}o(la,H);la.prototype.name="AssertionError";function I(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d};!w||ka();!x&&!w||w&&ka()||x&&F("1.9.1");w&&F("9");function ma(a,b){var c={},d;for(d in a)b.call(g,a[d],d,a)&&(c[d]=a[d]);return c}function na(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c}function oa(a,b){for(var c in a)if(b.call(g,a[c],c,a))return c};var J,K,L,M,N,O,P;P=O=N=M=L=K=J=l;var Q=t();Q&&(-1!=Q.indexOf("Firefox")?J=h:-1!=Q.indexOf("Camino")?K=h:-1!=Q.indexOf("iPhone")||-1!=Q.indexOf("iPod")?L=h:-1!=Q.indexOf("iPad")?M=h:-1!=Q.indexOf("Android")?N=h:-1!=Q.indexOf("Chrome")?O=h:-1!=Q.indexOf("Safari")&&(P=h));var pa=K,qa=L,ra=M,sa=N,ta=O,ua=P;a:{var R;if(J)R=/Firefox\/([0-9.]+)/;else{if(w||v)break a;ta?R=/Chrome\/([0-9.]+)/:ua?R=/Version\/([0-9.]+)/:qa||ra?R=/Version\/(\S+).*Mobile\/(\S+)/:sa?R=/Android\s+([0-9.]+)(?:.*Version\/([0-9.]+))?/:pa&&(R=/Camino\/([0-9.]+)/)}R&&R.exec(t())};var va;function S(a){return wa?va(a):w?0<=ea(document.documentMode,a):F(a)}var wa=function(){if(!x)return l;var a=m.Components;if(!a)return l;try{if(!a.classes)return l}catch(b){return l}var c=a.classes,a=a.interfaces,d=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),e=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo).platformVersion;va=function(a){return 0<=d.i(e,""+a)};return h}();function T(a,b){this.code=a;this.message=b||"";this.name=xa[a]||xa[13];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}o(T,Error);
-var xa={7:"NoSuchElementError",8:"NoSuchFrameError",9:"UnknownCommandError",10:"StaleElementReferenceError",11:"ElementNotVisibleError",12:"InvalidElementStateError",13:"UnknownError",15:"ElementNotSelectableError",19:"XPathLookupError",23:"NoSuchWindowError",24:"InvalidCookieDomainError",25:"UnableToSetCookieError",26:"ModalDialogOpenedError",27:"NoModalDialogOpenError",28:"ScriptTimeoutError",32:"InvalidSelectorError",35:"SqlDatabaseError",34:"MoveTargetOutOfBoundsError"};
-T.prototype.toString=function(){return"["+this.name+"] "+this.message};!v&&(!y||S("533"));var U="StopIteration"in m?m.StopIteration:Error("StopIteration");function Ca(){}Ca.prototype.next=function(){throw U;};function V(a,b,c,d,e){this.a=!!b;a&&W(this,a,d);this.depth=e!=g?e:this.c||0;this.a&&(this.depth*=-1);this.g=!c}o(V,Ca);V.prototype.b=i;V.prototype.c=0;V.prototype.f=l;function W(a,b,c){if(a.b=b)a.c="number"==typeof c?c:1!=a.b.nodeType?0:a.a?-1:1}
-V.prototype.next=function(){var a;if(this.f){if(!this.b||this.g&&0==this.depth)throw U;a=this.b;var b=this.a?-1:1;if(this.c==b){var c=this.a?a.lastChild:a.firstChild;c?W(this,c):W(this,a,-1*b)}else(c=this.a?a.previousSibling:a.nextSibling)?W(this,c):W(this,a.parentNode,-1*b);this.depth+=this.c*(this.a?-1:1)}else this.f=h;a=this.b;if(!this.b)throw U;return a};
-V.prototype.splice=function(a){var b=this.b,c=this.a?1:-1;this.c==c&&(this.c=-1*c,this.depth+=this.c*(this.a?-1:1));this.a=!this.a;V.prototype.next.call(this);this.a=!this.a;for(var c=aa(arguments[0])?arguments[0]:arguments,d=c.length-1;0<=d;d--)b.parentNode&&b.parentNode.insertBefore(c[d],b.nextSibling);b&&b.parentNode&&b.parentNode.removeChild(b)};function Da(a,b,c,d){V.call(this,a,b,c,i,d)}o(Da,V);Da.prototype.next=function(){do Da.h.next.call(this);while(-1==this.c);return this.b};function Ea(){return document.activeElement||document.body};function Fa(){this.d=g}
-function Ga(a,b,c){switch(typeof b){case "string":Ha(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==i){c.push("null");break}if("array"==n(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Ga(a,a.d?a.d.call(b,""+f,e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ha(f,c),
-c.push(":"),Ga(a,a.d?a.d.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Ia={'"':'\\"',"\\":"\\\\","/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ja=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
-function Ha(a,b){b.push('"',a.replace(Ja,function(a){if(a in Ia)return Ia[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Ia[a]=e+b.toString(16)}),'"')};y||v||x&&S(3.5)||w&&S(8);function X(a){switch(n(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return I(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Ka(a);return b}if("document"in a)return b={},b.WINDOW=Ka(a),b;if(aa(a))return I(a,X);a=ma(a,function(a,b){return"number"==typeof b||"string"==typeof b});return na(a,X);default:return i}}
-function La(a,b){return"array"==n(a)?I(a,function(a){return La(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Ma(a.ELEMENT,b):"WINDOW"in a?Ma(a.WINDOW,b):na(a,function(a){return La(a,b)}):a}function Na(a){var a=a||document,b=a.$wdc_;b||(b=a.$wdc_={},b.e=ca());b.e||(b.e=ca());return b}function Ka(a){var b=Na(a.ownerDocument),c=oa(b,function(b){return b==a});c||(c=":wdc:"+b.e++,b[c]=a);return c}
-function Ma(a,b){var a=decodeURIComponent(a),c=b||document,d=Na(c);if(!(a in d))throw new T(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new T(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new T(10,"Element is no longer attached to the DOM");};function Oa(){var a=Ea,b=[],c;try{var a="string"==typeof a?new G.Function(a):G==window?a:new G.Function("return ("+a+").apply(null,arguments);"),d=La(b,G.document),e=a.apply(i,d);c={status:0,value:X(e)}}catch(f){c={status:"code"in f?f.code:13,value:{message:f.message}}}a=[];Ga(new Fa,c,a);return a.join("")}var Y=["_"],Z=m;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)!Y.length&&Oa!==g?Z[$]=Oa:Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null}, arguments);}
+function(){return function(){function h(a){throw a;}var i=void 0,j=!0,k=null,l=!1;function m(a){return function(){return this[a]}}function n(a){return function(){return a}}var p=this;
+function aa(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 q(a){return"string"==typeof a}Math.floor(2147483648*Math.random()).toString(36);var ba=Date.now||function(){return+new Date};function r(a,b){function c(){}c.prototype=b.prototype;a.da=b.prototype;a.prototype=new c};var ca=window;function s(a){Error.captureStackTrace?Error.captureStackTrace(this,s):this.stack=Error().stack||"";a&&(this.message=String(a))}r(s,Error);s.prototype.name="CustomError";function da(a,b){for(var c=1;c<arguments.length;c++)var d=String(arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a}
+function ea(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var o=d[g]||"",z=e[g]||"",A=RegExp("(\\d*)(\\D*)","g"),na=RegExp("(\\d*)(\\D*)","g");do{var D=A.exec(o)||["","",""],E=na.exec(z)||["","",""];if(0==D[0].length&&0==E[0].length)break;c=((0==D[1].length?0:parseInt(D[1],10))<(0==E[1].length?0:parseInt(E[1],10))?-1:(0==D[1].length?0:parseInt(D[1],10))>(0==E[1].length?
+0:parseInt(E[1],10))?1:0)||((0==D[2].length)<(0==E[2].length)?-1:(0==D[2].length)>(0==E[2].length)?1:0)||(D[2]<E[2]?-1:D[2]>E[2]?1:0)}while(0==c)}return c};function fa(a,b){b.unshift(a);s.call(this,da.apply(k,b));b.shift();this.aa=a}r(fa,s);fa.prototype.name="AssertionError";function ga(a,b,c){if(!a){var d=Array.prototype.slice.call(arguments,2),e="Assertion failed";if(b)var e=e+(": "+b),f=d;h(new fa(""+e,f||[]))}};var ha=Array.prototype;function t(a,b){for(var c=a.length,d=q(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(i,d[e],e,a)}function ia(a,b){for(var c=a.length,d=[],e=0,f=q(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var o=f[g];b.call(i,o,g,a)&&(d[e++]=o)}return d}function ja(a,b){for(var c=a.length,d=Array(c),e=q(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(i,e[f],f,a));return d}function ka(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;t(a,function(c,f){d=b.call(i,d,c,f,a)});return d}
+function la(a,b){for(var c=a.length,d=q(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(i,d[e],e,a))return j;return l}function ma(a){return ha.concat.apply(ha,arguments)}function oa(a,b,c){ga(a.length!=k);return 2>=arguments.length?ha.slice.call(a,b):ha.slice.call(a,b,c)};var u,pa,qa,ra;function v(){return p.navigator?p.navigator.userAgent:k}ra=qa=pa=u=l;var sa;if(sa=v()){var ta=p.navigator;u=0==sa.indexOf("Opera");pa=!u&&-1!=sa.indexOf("MSIE");qa=!u&&-1!=sa.indexOf("WebKit");ra=!u&&!qa&&"Gecko"==ta.product}var ua=u,w=pa,x=ra,va=qa,wa;
+a:{var xa="",y;if(ua&&p.opera)var ya=p.opera.version,xa="function"==typeof ya?ya():ya;else if(x?y=/rv\:([^\);]+)(\)|;)/:w?y=/MSIE\s+([^\);]+)(\)|;)/:va&&(y=/WebKit\/(\S+)/),y)var za=y.exec(v()),xa=za?za[1]:"";if(w){var Aa,Ba=p.document;Aa=Ba?Ba.documentMode:i;if(Aa>parseFloat(xa)){wa=String(Aa);break a}}wa=xa}var Ca={};function Da(a){return Ca[a]||(Ca[a]=0<=ea(wa,a))}var Ea={};function Fa(a){return Ea[a]||(Ea[a]=w&&!!document.documentMode&&document.documentMode>=a)};!w||Fa(9);!x&&!w||w&&Fa(9)||x&&Da("1.9.1");w&&Da("9");function Ga(a,b){var c={},d;for(d in a)c[d]=b.call(i,a[d],d,a);return c};function Ha(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a}
+function Ia(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if((9==a.nodeType||9==b.nodeType)&&w&&!Da(9)){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?Ja(a,b):!c&&Ha(e,b)?-1*Ka(a,b):!d&&Ha(f,a)?Ka(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=
+9==a.nodeType?a:a.ownerDocument||a.document;c=d.createRange();c.selectNode(a);c.collapse(j);d=d.createRange();d.selectNode(b);d.collapse(j);return c.compareBoundaryPoints(p.Range.START_TO_END,d)}function Ka(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Ja(d,a)}function Ja(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1};var La,Ma,Na,Oa,Pa,Qa,Ra;Ra=Qa=Pa=Oa=Na=Ma=La=l;var B=v();B&&(-1!=B.indexOf("Firefox")?La=j:-1!=B.indexOf("Camino")?Ma=j:-1!=B.indexOf("iPhone")||-1!=B.indexOf("iPod")?Na=j:-1!=B.indexOf("iPad")?Oa=j:-1!=B.indexOf("Android")?Pa=j:-1!=B.indexOf("Chrome")?Qa=j:-1!=B.indexOf("Safari")&&(Ra=j));var Sa=La,Ta=Ma,Ua=Na,Va=Oa,Wa=Pa,Xa=Qa,Ya=Ra;function C(a){return(a=a.exec(v()))?a[1]:""}(function(){if(Sa)return C(/Firefox\/([0-9.]+)/);if(w||ua)return wa;if(Xa)return C(/Chrome\/([0-9.]+)/);if(Ya)return C(/Version\/([0-9.]+)/);if(Ua||Va){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(v());if(a)return a[1]+"."+a[2]}else{if(Wa)return(a=C(/Android\s+([0-9.]+)/))?a:C(/Version\/([0-9.]+)/);if(Ta)return C(/Camino\/([0-9.]+)/)}return""})();var Za;function $a(a){return ab?Za(a):w?0<=ea(document.documentMode,a):Da(a)}var ab=function(){if(!x)return l;var a=p.Components;if(!a)return l;try{if(!a.classes)return l}catch(b){return l}var c=a.classes,a=a.interfaces,d=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),e=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo).platformVersion;Za=function(a){return 0<=d.$(e,""+a)};return j}();function F(a,b){this.code=a;this.message=b||"";this.name=bb[a]||bb[13];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}r(F,Error);
+var bb={7:"NoSuchElementError",8:"NoSuchFrameError",9:"UnknownCommandError",10:"StaleElementReferenceError",11:"ElementNotVisibleError",12:"InvalidElementStateError",13:"UnknownError",15:"ElementNotSelectableError",19:"XPathLookupError",23:"NoSuchWindowError",24:"InvalidCookieDomainError",25:"UnableToSetCookieError",26:"ModalDialogOpenedError",27:"NoModalDialogOpenError",28:"ScriptTimeoutError",32:"InvalidSelectorError",35:"SqlDatabaseError",34:"MoveTargetOutOfBoundsError"};
+F.prototype.toString=function(){return"["+this.name+"] "+this.message};function G(a,b,c){this.f=a;this.Y=b||1;this.h=c||1};var H=w&&!Fa(9),cb=w&&!Fa(8);function db(a,b,c,d,e){this.f=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.ba=e;this.parentNode=b}function eb(a,b,c){var d=cb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new db(b,a,b.nodeName,d,c)};function I(a){var b=k,c=a.nodeType;1==c&&(b=a.textContent,b=b==i||b==k?a.innerText:b,b=b==i||b==k?"":b);if("string"!=typeof b)if(H&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c)for(var a=9==c?a.documentElement:a.firstChild,c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),H&&"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 J(a,b,c){if(b===k)return j;try{if(!a.getAttribute)return l}catch(d){return l}cb&&"class"==b&&(b="className");return c==k?!!a.getAttribute(b):a.getAttribute(b,2)==c}function K(a,b,c,d,e){return(H?fb:gb).call(k,a,b,q(c)?c:k,q(d)?d:k,e||new L)}
+function fb(a,b,c,d,e){if(l||8==a.g||c&&a.g===k){var f=b.all;if(!f)return e;a=hb(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],o=0;b=f[o++];)J(b,c,d)&&g.push(b);f=g}for(o=0;b=f[o++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}ib(a,b,c,d,e);return e}
+function gb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!w?(b=b.getElementsByName(d),t(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),t(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof M?ib(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),t(b,function(a){J(a,c,d)&&e.add(a)}));return e}
+function jb(a,b,c,d,e){var f;if((l||8==a.g||c&&a.g===k)&&(f=b.childNodes)){var g=hb(a);if("*"!=g&&(f=ia(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=ia(f,function(a){return J(a,c,d)}));t(f,function(a){("*"!=g||"!"!=a.tagName&&!("*"==g&&1!=a.nodeType))&&e.add(a)});return e}return kb(a,b,c,d,e)}function kb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)J(b,c,d)&&a.matches(b)&&e.add(b);return e}
+function ib(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)J(b,c,d)&&a.matches(b)&&e.add(b),ib(a,b,c,d,e)}function hb(a){if(a instanceof M){if(8==a.g)return"!";if(a.g===k)return"*"}return a.getName()};function L(){this.h=this.e=k;this.r=0}function lb(a){this.j=a;this.next=this.p=k}function mb(a,b){if(a.e){if(!b.e)return a}else return b;for(var c=a.e,d=b.e,e=k,f=k,g=0;c&&d;)c.j==d.j||c.j instanceof db&&d.j instanceof db&&c.j.f==d.j.f?(f=c,c=c.next,d=d.next):0<Ia(c.j,d.j)?(f=d,d=d.next):(f=c,c=c.next),(f.p=e)?e.next=f:a.e=f,e=f,g++;for(f=c||d;f;)f.p=e,e=e.next=f,g++,f=f.next;a.h=e;a.r=g;return a}
+L.prototype.unshift=function(a){a=new lb(a);a.next=this.e;this.h?this.e.p=a:this.e=this.h=a;this.e=a;this.r++};L.prototype.add=function(a){a=new lb(a);a.p=this.h;this.e?this.h.next=a:this.e=this.h=a;this.h=a;this.r++};function nb(a){return(a=a.e)?a.j:k}L.prototype.n=m("r");function ob(a){return(a=nb(a))?I(a):""}function N(a,b){return new pb(a,!!b)}function pb(a,b){this.V=a;this.I=(this.t=b)?a.h:a.e;this.D=k}
+pb.prototype.next=function(){var a=this.I;if(a==k)return k;var b=this.D=a;this.I=this.t?a.p:a.next;return b.j};pb.prototype.remove=function(){var a=this.V,b=this.D;b||h(Error("Next must be called at least once before remove."));var c=b.p,b=b.next;c?c.next=b:a.e=b;b?b.p=c:a.h=c;a.r--;this.D=k};function O(a){this.d=a;this.c=this.i=l;this.s=k}O.prototype.b=m("i");O.prototype.l=m("s");function P(a,b){var c=a.evaluate(b);return c instanceof L?+ob(c):+c}function Q(a,b){var c=a.evaluate(b);return c instanceof L?ob(c):""+c}function R(a,b){var c=a.evaluate(b);return c instanceof L?!!c.n():!!c};function qb(a,b,c){O.call(this,a.d);this.H=a;this.L=b;this.P=c;this.i=b.b()||c.b();this.c=b.c||c.c;this.H==rb&&(!c.c&&!c.b()&&4!=c.d&&0!=c.d&&b.l()?this.s={name:b.l().name,q:c}:!b.c&&(!b.b()&&4!=b.d&&0!=b.d&&c.l())&&(this.s={name:c.l().name,q:b}))}r(qb,O);
+function S(a,b,c,d,e){var b=b.evaluate(d),c=c.evaluate(d),f;if(b instanceof L&&c instanceof L){f=N(b);for(b=f.next();b;b=f.next()){e=N(c);for(d=e.next();d;d=e.next())if(a(I(b),I(d)))return j}return l}if(b instanceof L||c instanceof L){b instanceof L?e=b:(e=c,c=b);e=N(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":f=+I(d);break;case "boolean":f=!!I(d);break;case "string":f=I(d);break;default:h(Error("Illegal primitive type for comparison."))}if(a(f,c))return j}return l}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)}qb.prototype.evaluate=function(a){return this.H.m(this.L,this.P,a)};qb.prototype.toString=function(a){var a=a||"",b=a+"binary expression: "+this.H+"\n",a=a+" ",b=b+(this.L.toString(a)+"\n");return b+=this.P.toString(a)};function sb(a,b,c,d){this.X=a;this.ca=b;this.d=c;this.m=d}sb.prototype.toString=m("X");var tb={};
+function T(a,b,c,d){a in tb&&h(Error("Binary operator already created: "+a));a=new sb(a,b,c,d);return tb[a.toString()]=a}T("div",6,1,function(a,b,c){return P(a,c)/P(b,c)});T("mod",6,1,function(a,b,c){return P(a,c)%P(b,c)});T("*",6,1,function(a,b,c){return P(a,c)*P(b,c)});T("+",5,1,function(a,b,c){return P(a,c)+P(b,c)});T("-",5,1,function(a,b,c){return P(a,c)-P(b,c)});T("<",4,2,function(a,b,c){return S(function(a,b){return a<b},a,b,c)});
+T(">",4,2,function(a,b,c){return S(function(a,b){return a>b},a,b,c)});T("<=",4,2,function(a,b,c){return S(function(a,b){return a<=b},a,b,c)});T(">=",4,2,function(a,b,c){return S(function(a,b){return a>=b},a,b,c)});var rb=T("=",3,2,function(a,b,c){return S(function(a,b){return a==b},a,b,c,j)});T("!=",3,2,function(a,b,c){return S(function(a,b){return a!=b},a,b,c,j)});T("and",2,2,function(a,b,c){return R(a,c)&&R(b,c)});T("or",1,2,function(a,b,c){return R(a,c)||R(b,c)});function ub(a,b){b.n()&&4!=a.d&&h(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));O.call(this,a.d);this.O=a;this.a=b;this.i=a.b();this.c=a.c}r(ub,O);ub.prototype.evaluate=function(a){a=this.O.evaluate(a);return vb(this.a,a)};ub.prototype.toString=function(a){var a=a||"",b=a+"Filter: \n",a=a+" ",b=b+this.O.toString(a);return b+=this.a.toString(a)};function wb(a,b){b.length<a.N&&h(Error("Function "+a.o+" expects at least"+a.N+" arguments, "+b.length+" given"));a.F!==k&&b.length>a.F&&h(Error("Function "+a.o+" expects at most "+a.F+" arguments, "+b.length+" given"));a.W&&t(b,function(b,d){4!=b.d&&h(Error("Argument "+d+" to function "+a.o+" is not of type Nodeset: "+b))});O.call(this,a.d);this.v=a;this.B=b;this.i=a.i||la(b,function(a){return a.b()});this.c=a.U&&!b.length||a.T&&!!b.length||la(b,function(a){return a.c})}r(wb,O);
+wb.prototype.evaluate=function(a){return this.v.m.apply(k,ma(a,this.B))};wb.prototype.toString=function(a){var b=a||"",a=b+"Function: "+this.v+"\n",b=b+" ";this.B.length&&(a+=b+"Arguments:",b+=" ",a=ka(this.B,function(a,d){return a+"\n"+d.toString(b)},a));return a};function xb(a,b,c,d,e,f,g,o,z){this.o=a;this.d=b;this.i=c;this.U=d;this.T=e;this.m=f;this.N=g;this.F=o!==i?o:g;this.W=!!z}xb.prototype.toString=m("o");var yb={};
+function U(a,b,c,d,e,f,g,o){a in yb&&h(Error("Function already created: "+a+"."));yb[a]=new xb(a,b,c,d,l,e,f,g,o)}U("boolean",2,l,l,function(a,b){return R(b,a)},1);U("ceiling",1,l,l,function(a,b){return Math.ceil(P(b,a))},1);U("concat",3,l,l,function(a,b){var c=oa(arguments,1);return ka(c,function(b,c){return b+Q(c,a)},"")},2,k);U("contains",2,l,l,function(a,b,c){b=Q(b,a);a=Q(c,a);return-1!=b.indexOf(a)},2);U("count",1,l,l,function(a,b){return b.evaluate(a).n()},1,1,j);U("false",2,l,l,n(l),0);
+U("floor",1,l,l,function(a,b){return Math.floor(P(b,a))},1);
+U("id",4,l,l,function(a,b){function c(a){if(H){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length){var c;a:{c=function(b){return a==b.id};for(var d=b.length,f=q(b)?b.split(""):b,g=0;g<d;g++)if(g in f&&c.call(i,f[g])){c=g;break a}c=-1}return 0>c?k:q(b)?b.charAt(c):b[c]}}return k}return e.getElementById(a)}var d=a.f,e=9==d.nodeType?d:d.ownerDocument,d=Q(b,a).split(/\s+/),f=[];t(d,function(a){var a=c(a),b;if(b=a){a:if(q(f))b=!q(a)||1!=a.length?-1:f.indexOf(a,0);else{for(b=0;b<f.length;b++)if(b in
+f&&f[b]===a)break a;b=-1}b=!(0<=b)}b&&f.push(a)});f.sort(Ia);var g=new L;t(f,function(a){g.add(a)});return g},1);U("lang",2,l,l,n(l),1);U("last",1,j,l,function(a){1!=arguments.length&&h(Error("Function last expects ()"));return a.h},0);U("local-name",3,l,j,function(a,b){var c=b?nb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,j);U("name",3,l,j,function(a,b){var c=b?nb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,j);U("namespace-uri",3,j,l,n(""),0,1,j);
+U("normalize-space",3,l,j,function(a,b){return(b?Q(b,a):I(a.f)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);U("not",2,l,l,function(a,b){return!R(b,a)},1);U("number",1,l,j,function(a,b){return b?P(b,a):+I(a.f)},0,1);U("position",1,j,l,function(a){return a.Y},0);U("round",1,l,l,function(a,b){return Math.round(P(b,a))},1);U("starts-with",2,l,l,function(a,b,c){b=Q(b,a);a=Q(c,a);return 0==b.lastIndexOf(a,0)},2);U("string",3,l,j,function(a,b){return b?Q(b,a):I(a.f)},0,1);
+U("string-length",1,l,j,function(a,b){return(b?Q(b,a):I(a.f)).length},0,1);U("substring",3,l,l,function(a,b,c,d){c=P(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?P(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";var c=Math.round(c)-1,e=Math.max(c,0),a=Q(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);U("substring-after",3,l,l,function(a,b,c){b=Q(b,a);a=Q(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2);
+U("substring-before",3,l,l,function(a,b,c){b=Q(b,a);a=Q(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);U("sum",1,l,l,function(a,b){for(var c=N(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+I(e);return d},1,1,j);U("translate",3,l,l,function(a,b,c,d){for(var b=Q(b,a),c=Q(c,a),e=Q(d,a),a=[],d=0;d<c.length;d++){var f=c.charAt(d);f in a||(a[f]=e.charAt(d))}c="";for(d=0;d<b.length;d++)f=b.charAt(d),c+=f in a?a[f]:f;return c},3);U("true",2,l,l,n(j),0);function M(a,b){this.R=a;this.M=b!==i?b:k;this.g=k;switch(a){case "comment":this.g=8;break;case "text":this.g=3;break;case "processing-instruction":this.g=7;break;case "node":break;default:h(Error("Unexpected argument"))}}M.prototype.matches=function(a){return this.g===k||this.g==a.nodeType};M.prototype.getName=m("R");M.prototype.toString=function(a){var a=a||"",b=a+"kindtest: "+this.R;this.M===k||(b+="\n"+this.M.toString(a+" "));return b};function zb(a){O.call(this,3);this.Q=a.substring(1,a.length-1)}r(zb,O);zb.prototype.evaluate=m("Q");zb.prototype.toString=function(a){return(a||"")+"literal: "+this.Q};function Ab(a){O.call(this,1);this.S=a}r(Ab,O);Ab.prototype.evaluate=m("S");Ab.prototype.toString=function(a){return(a||"")+"number: "+this.S};function Bb(a,b){O.call(this,a.d);this.K=a;this.u=b;this.i=a.b();this.c=a.c;if(1==this.u.length){var c=this.u[0];!c.C&&c.k==Cb&&(c=c.A,"*"!=c.getName()&&(this.s={name:c.getName(),q:k}))}}r(Bb,O);function Db(){O.call(this,4)}r(Db,O);Db.prototype.evaluate=function(a){var b=new L,a=a.f;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Db.prototype.toString=function(a){return a+"RootHelperExpr"};function Eb(){O.call(this,4)}r(Eb,O);Eb.prototype.evaluate=function(a){var b=new L;b.add(a.f);return b};
+Eb.prototype.toString=function(a){return a+"ContextHelperExpr"};
+Bb.prototype.evaluate=function(a){var b=this.K.evaluate(a);b instanceof L||h(Error("FilterExpr must evaluate to nodeset."));for(var a=this.u,c=0,d=a.length;c<d&&b.n();c++){var e=a[c],f=N(b,e.k.t),g;if(!e.b()&&e.k==Fb){for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new G(g))}else if(!e.b()&&e.k==Gb)g=f.next(),b=e.evaluate(new G(g));else{g=f.next();for(b=e.evaluate(new G(g));(g=f.next())!=k;)g=e.evaluate(new G(g)),b=mb(b,g)}}return b};
+Bb.prototype.toString=function(a){var b=a||"",c=b+"PathExpr:\n",b=b+" ",c=c+this.K.toString(b);this.u.length&&(c+=b+"Steps:\n",b+=" ",t(this.u,function(a){c+=a.toString(b)}));return c};function V(a,b){this.a=a;this.t=!!b}function vb(a,b,c){for(c=c||0;c<a.a.length;c++)for(var d=a.a[c],e=N(b),f=b.n(),g,o=0;g=e.next();o++){var z=a.t?f-o:o+1;g=d.evaluate(new G(g,z,f));var A;"number"==typeof g?A=z==g:"string"==typeof g||"boolean"==typeof g?A=!!g:g instanceof L?A=0<g.n():h(Error("Predicate.evaluate returned an unexpected type."));A||e.remove()}return b}V.prototype.l=function(){return 0<this.a.length?this.a[0].l():k};
+V.prototype.b=function(){for(var a=0;a<this.a.length;a++){var b=this.a[a];if(b.b()||1==b.d||0==b.d)return j}return l};V.prototype.n=function(){return this.a.length};V.prototype.toString=function(a){var b=a||"",a=b+"Predicates:",b=b+" ";return ka(this.a,function(a,d){return a+"\n"+b+d.toString(b)},a)};function W(a,b,c,d){O.call(this,4);this.k=a;this.A=b;this.a=c||new V([]);this.C=!!d;b=this.a.l();a.Z&&b&&(a=b.name,a=H?a.toLowerCase():a,this.s={name:a,q:b.q});this.i=this.a.b()}r(W,O);
+W.prototype.evaluate=function(a){var b=a.f,c=k,c=this.l(),d=k,e=k,f=0;c&&(d=c.name,e=c.q?Q(c.q,a):k,f=1);if(this.C)if(!this.b()&&this.k==Hb)c=K(this.A,b,d,e),c=vb(this.a,c,f);else if(a=N((new W(Ib,new M("node"))).evaluate(a)),b=a.next())for(c=this.m(b,d,e,f);(b=a.next())!=k;)c=mb(c,this.m(b,d,e,f));else c=new L;else c=this.m(a.f,d,e,f);return c};W.prototype.m=function(a,b,c,d){a=this.k.v(this.A,a,b,c);return a=vb(this.a,a,d)};
+W.prototype.toString=function(a){var a=a||"",b=a+"Step: \n",a=a+" ",b=b+(a+"Operator: "+(this.C?"//":"/")+"\n");this.k.o&&(b+=a+"Axis: "+this.k+"\n");b+=this.A.toString(a);if(this.a.length)for(var b=b+(a+"Predicates: \n"),c=0;c<this.a.length;c++)var d=c<this.a.length-1?", ":"",b=b+(this.a[c].toString(a)+d);return b};function Jb(a,b,c,d){this.o=a;this.v=b;this.t=c;this.Z=d}Jb.prototype.toString=m("o");var Kb={};
+function X(a,b,c,d){a in Kb&&h(Error("Axis already created: "+a));b=new Jb(a,b,c,!!d);return Kb[a]=b}X("ancestor",function(a,b){for(var c=new L,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},j);X("ancestor-or-self",function(a,b){var c=new L,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},j);
+var Cb=X("attribute",function(a,b){var c=new L,d=a.getName();if("style"==d&&b.style&&H)return c.add(new db(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof M&&a.g===k||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)H?g.nodeValue&&c.add(eb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(H?g.nodeValue&&c.add(eb(b,g,b.sourceIndex)):c.add(g));return c},l),Hb=X("child",function(a,b,c,d,e){return(H?jb:kb).call(k,a,b,q(c)?c:k,q(d)?d:k,e||new L)},l,j);
+X("descendant",K,l,j);var Ib=X("descendant-or-self",function(a,b,c,d){var e=new L;J(b,c,d)&&a.matches(b)&&e.add(b);return K(a,b,c,d,e)},l,j),Fb=X("following",function(a,b,c,d){var e=new L;do for(var f=b;f=f.nextSibling;)J(f,c,d)&&a.matches(f)&&e.add(f),e=K(a,f,c,d,e);while(b=b.parentNode);return e},l,j);X("following-sibling",function(a,b){for(var c=new L,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},l);X("namespace",function(){return new L},l);
+X("parent",function(a,b){var c=new L;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},l);var Gb=X("preceding",function(a,b,c,d){var e=new L,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,o=f.length;g<o;g++){for(var z=[],b=f[g];b=b.previousSibling;)z.unshift(b);for(var A=0,na=z.length;A<na;A++)b=z[A],J(b,c,d)&&a.matches(b)&&e.add(b),e=K(a,b,c,d,e)}return e},j,j);
+X("preceding-sibling",function(a,b){for(var c=new L,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},j);X("self",function(a,b){var c=new L;a.matches(b)&&c.add(b);return c},l);function Lb(a){O.call(this,1);this.J=a;this.i=a.b();this.c=a.c}r(Lb,O);Lb.prototype.evaluate=function(a){return-P(this.J,a)};Lb.prototype.toString=function(a){var a=a||"",b=a+"UnaryExpr: -\n";return b+=this.J.toString(a+" ")};function Mb(a){O.call(this,4);this.w=a;this.i=la(this.w,function(a){return a.b()});this.c=la(this.w,function(a){return a.c})}r(Mb,O);Mb.prototype.evaluate=function(a){var b=new L;t(this.w,function(c){c=c.evaluate(a);c instanceof L||h(Error("PathExpr must evaluate to NodeSet."));b=mb(b,c)});return b};Mb.prototype.toString=function(a){var b=a||"",c=b+"UnionExpr:\n",b=b+" ";t(this.w,function(a){c+=a.toString(b)+"\n"});return c.substring(0,c.length)};!ua&&(!va||$a("533"));function Nb(){return document.activeElement||document.body};function Ob(){this.z=i}
+function Pb(a,b,c){switch(typeof b){case "string":Qb(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==k){c.push("null");break}if("array"==aa(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Pb(a,a.z?a.z.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Qb(f,
+c),c.push(":"),Pb(a,a.z?a.z.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:h(Error("Unknown type: "+typeof b))}}var Rb={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Sb=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
+function Qb(a,b){b.push('"',a.replace(Sb,function(a){if(a in Rb)return Rb[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Rb[a]=e+b.toString(16)}),'"')};va||ua||x&&$a(3.5)||w&&$a(8);function Tb(a){switch(aa(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ja(a,Tb);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Ub(a);return b}if("document"in a)return b={},b.WINDOW=Ub(a),b;var c=aa(a);if("array"==c||"object"==c&&"number"==typeof a.length)return ja(a,Tb);var c=function(a,b){return"number"==typeof b||q(b)},d={};for(b in a)c.call(i,0,b)&&(d[b]=a[b]);return Ga(d,Tb);default:return k}}
+function Vb(a,b){var c;"array"==aa(a)?c=ja(a,function(a){return Vb(a,b)}):(c=typeof a,c="object"==c&&a!=k||"function"==c?"function"==typeof a?a:"ELEMENT"in a?Wb(a.ELEMENT,b):"WINDOW"in a?Wb(a.WINDOW,b):Ga(a,function(a){return Vb(a,b)}):a);return c}function Xb(a){var a=a||document,b=a.$wdc_;b||(b=a.$wdc_={},b.G=ba());b.G||(b.G=ba());return b}
+function Ub(a){var b=Xb(a.ownerDocument),c;a:{c=function(b){return b==a};for(var d in b)if(c.call(i,b[d])){c=d;break a}c=i}c||(c=":wdc:"+b.G++,b[c]=a);return c}
+function Wb(a,b){var a=decodeURIComponent(a),c=b||document,d=Xb(c);a in d||h(new F(10,"Element does not exist in cache"));var e=d[a];if("setInterval"in e)return e.closed&&(delete d[a],h(new F(23,"Window has been closed."))),e;for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];h(new F(10,"Element is no longer attached to the DOM"))};function Yb(){var a=Nb,b=[],c;try{var a=q(a)?new ca.Function(a):ca==window?a:new ca.Function("return ("+a+").apply(null,arguments);"),d=Vb(b,ca.document),e=a.apply(k,d);c={status:0,value:Tb(e)}}catch(f){c={status:"code"in f?f.code:13,value:{message:f.message}}}a=[];Pb(new Ob,c,a);return a.join("")}var Y=["_"],Z=p;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)!Y.length&&Yb!==i?Z[$]=Yb:Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null}, arguments);}
View
12 src/third_party/webdriver-atoms/back.js
@@ -1,6 +1,6 @@
-function(){return function(){var d=!0,g=!1,h=this;function i(a,c){function b(){}b.prototype=c.prototype;a.b=c.prototype;a.prototype=new b};function aa(a,c){for(var b=1;b<arguments.length;b++)var m=(""+arguments[b]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,m);return a}
-function j(a,c){for(var b=0,m=(""+a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),r=(""+c).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),ba=Math.max(m.length,r.length),s=0;0==b&&s<ba;s++){var ca=m[s]||"",da=r[s]||"",ea=RegExp("(\\d*)(\\D*)","g"),fa=RegExp("(\\d*)(\\D*)","g");do{var e=ea.exec(ca)||["","",""],f=fa.exec(da)||["","",""];if(0==e[0].length&&0==f[0].length)break;b=((0==e[1].length?0:parseInt(e[1],10))<(0==f[1].length?0:parseInt(f[1],10))?-1:(0==e[1].length?0:parseInt(e[1],10))>(0==
-f[1].length?0:parseInt(f[1],10))?1:0)||((0==e[2].length)<(0==f[2].length)?-1:(0==e[2].length)>(0==f[2].length)?1:0)||(e[2]<f[2]?-1:e[2]>f[2]?1:0)}while(0==b)}return b};var k,l,n,o;function p(){return h.navigator?h.navigator.userAgent:null}o=n=l=k=g;var q;if(q=p()){var ga=h.navigator;k=0==q.indexOf("Opera");l=!k&&-1!=q.indexOf("MSIE");n=!k&&-1!=q.indexOf("WebKit");o=!k&&!n&&"Gecko"==ga.product}var t=k,u=l,v=o,w=n,x;
-a:{var y="",z;if(t&&h.opera)var A=h.opera.version,y="function"==typeof A?A():A;else if(v?z=/rv\:([^\);]+)(\)|;)/:u?z=/MSIE\s+([^\);]+)(\)|;)/:w&&(z=/WebKit\/(\S+)/),z)var B=z.exec(p()),y=B?B[1]:"";if(u){var C,D=h.document;C=D?D.documentMode:void 0;if(C>parseFloat(y)){x=""+C;break a}}x=y}var E={};function F(a){E[a]||(E[a]=0<=j(x,a))}var G={};function H(){return G[9]||(G[9]=u&&document.documentMode&&9<=document.documentMode)};var I=window;function J(a,c){this.code=a;this.message=c||"";this.name=K[a]||K[13];var b=Error(this.message);b.name=this.name;this.stack=b.stack||""}i(J,Error);
-var K={7:"NoSuchElementError",8:"NoSuchFrameError",9:"UnknownCommandError",10:"StaleElementReferenceError",11:"ElementNotVisibleError",12:"InvalidElementStateError",13:"UnknownError",15:"ElementNotSelectableError",19:"XPathLookupError",23:"NoSuchWindowError",24:"InvalidCookieDomainError",25:"UnableToSetCookieError",26:"ModalDialogOpenedError",27:"NoModalDialogOpenError",28:"ScriptTimeoutError",32:"InvalidSelectorError",35:"SqlDatabaseError",34:"MoveTargetOutOfBoundsError"};
-J.prototype.toString=function(){return"["+this.name+"] "+this.message};var L,M,N,O,P,Q,R;R=Q=P=O=N=M=L=g;var S=p();S&&(-1!=S.indexOf("Firefox")?L=d:-1!=S.indexOf("Camino")?M=d:-1!=S.indexOf("iPhone")||-1!=S.indexOf("iPod")?N=d:-1!=S.indexOf("iPad")?O=d:-1!=S.indexOf("Android")?P=d:-1!=S.indexOf("Chrome")?Q=d:-1!=S.indexOf("Safari")&&(R=d));var ha=M,ia=N,ja=O,ka=P,la=Q,ma=R;a:{var T;if(L)T=/Firefox\/([0-9.]+)/;else{if(u||t)break a;la?T=/Chrome\/([0-9.]+)/:ma?T=/Version\/([0-9.]+)/:ia||ja?T=/Version\/(\S+).*Mobile\/(\S+)/:ka?T=/Android\s+([0-9.]+)(?:.*Version\/([0-9.]+))?/:ha&&(T=/Camino\/([0-9.]+)/)}T&&T.exec(p())};var U,na=function(){if(!v)return g;var a=h.Components;if(!a)return g;try{if(!a.classes)return g}catch(c){return g}var b=a.classes,a=a.interfaces,m=b["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),r=b["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo).platformVersion;U=function(a){m.a(r,""+a)};return d}();function V(a){this.stack=Error().stack||"";a&&(this.message=""+a)}i(V,Error);V.prototype.name="CustomError";function W(a,c){c.unshift(a);V.call(this,aa.apply(null,c));c.shift()}i(W,V);W.prototype.name="AssertionError";!u||H();!v&&!u||u&&H()||v&&F("1.9.1");u&&F("9");var oa=!u&&!t;!t&&w&&(na?U("533"):u?j(document.documentMode,"533"):F("533"));function X(a){var c=oa?I.history.length-1:I.history.length,a=void 0!==a?a:1;if(0>=a)throw new J(13,"number of pages must be positive");if(null!==c&&a>c)throw new J(13,"number of pages must be less than the length of the browser history");I.history.go(-a)}var Y=["_"],Z=h;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)!Y.length&&void 0!==X?Z[$]=X:Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null}, arguments);}
+function(){return function(){var f=!0,g=!1,h=this;function i(a,b){function c(){}c.prototype=b.prototype;a.c=b.prototype;a.prototype=new c};var j=window;function l(a,b){this.code=a;this.message=b||"";this.name=m[a]||m[13];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}i(l,Error);
+var m={7:"NoSuchElementError",8:"NoSuchFrameError",9:"UnknownCommandError",10:"StaleElementReferenceError",11:"ElementNotVisibleError",12:"InvalidElementStateError",13:"UnknownError",15:"ElementNotSelectableError",19:"XPathLookupError",23:"NoSuchWindowError",24:"InvalidCookieDomainError",25:"UnableToSetCookieError",26:"ModalDialogOpenedError",27:"NoModalDialogOpenError",28:"ScriptTimeoutError",32:"InvalidSelectorError",35:"SqlDatabaseError",34:"MoveTargetOutOfBoundsError"};
+l.prototype.toString=function(){return"["+this.name+"] "+this.message};function o(a,b){for(var c=1;c<arguments.length;c++)var n=String(arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,n);return a}
+function p(a){for(var b=0,a=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),c="533".replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),n=Math.max(a.length,c.length),k=0;0==b&&k<n;k++){var Y=a[k]||"",Z=c[k]||"",$=RegExp("(\\d*)(\\D*)","g"),aa=RegExp("(\\d*)(\\D*)","g");do{var d=$.exec(Y)||["","",""],e=aa.exec(Z)||["","",""];if(0==d[0].length&&0==e[0].length)break;b=((0==d[1].length?0:parseInt(d[1],10))<(0==e[1].length?0:parseInt(e[1],10))?-1:(0==d[1].length?0:parseInt(d[1],10))>(0==e[1].length?
+0:parseInt(e[1],10))?1:0)||((0==d[2].length)<(0==e[2].length)?-1:(0==d[2].length)>(0==e[2].length)?1:0)||(d[2]<e[2]?-1:d[2]>e[2]?1:0)}while(0==b)}return b};var q,r,s,t;function u(){return h.navigator?h.navigator.userAgent:null}t=s=r=q=g;var v;if(v=u()){var ba=h.navigator;q=0==v.indexOf("Opera");r=!q&&-1!=v.indexOf("MSIE");s=!q&&-1!=v.indexOf("WebKit");t=!q&&!s&&"Gecko"==ba.product}var w=q,x=r,y=t,z=s,A;
+a:{var B="",C;if(w&&h.opera)var D=h.opera.version,B="function"==typeof D?D():D;else if(y?C=/rv\:([^\);]+)(\)|;)/:x?C=/MSIE\s+([^\);]+)(\)|;)/:z&&(C=/WebKit\/(\S+)/),C)var E=C.exec(u()),B=E?E[1]:"";if(x){var F,G=h.document;F=G?G.documentMode:void 0;if(F>parseFloat(B)){A=String(F);break a}}A=B}var H={};var I,J,K,L,M,N,O;O=N=M=L=K=J=I=g;var P=u();P&&(-1!=P.indexOf("Firefox")?I=f:-1!=P.indexOf("Camino")?J=f:-1!=P.indexOf("iPhone")||-1!=P.indexOf("iPod")?K=f:-1!=P.indexOf("iPad")?L=f:-1!=P.indexOf("Android")?M=f:-1!=P.indexOf("Chrome")?N=f:-1!=P.indexOf("Safari")&&(O=f));var ca=I,da=J,ea=K,fa=L,ga=M,ha=N,ia=O;function Q(a){return(a=a.exec(u()))?a[1]:""}(function(){if(ca)return Q(/Firefox\/([0-9.]+)/);if(x||w)return A;if(ha)return Q(/Chrome\/([0-9.]+)/);if(ia)return Q(/Version\/([0-9.]+)/);if(ea||fa){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(u());if(a)return a[1]+"."+a[2]}else{if(ga)return(a=Q(/Android\s+([0-9.]+)/))?a:Q(/Version\/([0-9.]+)/);if(da)return Q(/Camino\/([0-9.]+)/)}return""})();var R,ja=function(){if(!y)return g;var a=h.Components;if(!a)return g;try{if(!a.classes)return g}catch(b){return g}var c=a.classes,a=a.interfaces,n=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),k=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo).platformVersion;R=function(a){n.a(k,""+a)};return f}();function S(a){Error.captureStackTrace?Error.captureStackTrace(this,S):this.stack=Error().stack||"";a&&(this.message=String(a))}i(S,Error);S.prototype.name="CustomError";function T(a,b){b.unshift(a);S.call(this,o.apply(null,b));b.shift();this.b=a}i(T,S);T.prototype.name="AssertionError";var ka=!x&&!w;!w&&z&&(ja?R("533"):x?p(document.documentMode):H["533"]||(H["533"]=0<=p(A)));function U(a){var b=ka?j.history.length-1:j.history.length,a=void 0!==a?a:1;if(0>=a)throw new l(13,"number of pages must be positive");if(null!==b&&a>b)throw new l(13,"number of pages must be less than the length of the browser history");j.history.go(-a)}var V=["_"],W=h;!(V[0]in W)&&W.execScript&&W.execScript("var "+V[0]);for(var X;V.length&&(X=V.shift());)!V.length&&void 0!==U?W[X]=U:W=W[X]?W[X]:W[X]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null}, arguments);}
View
250 src/third_party/webdriver-atoms/clear.js
126 additions, 124 deletions not shown
View
31 src/third_party/webdriver-atoms/clear_local_storage.js
@@ -1,16 +1,17 @@
-function(){return function(){var g=void 0,h=!0,i=null,j=!1,k=this;
+function(){return function(){var g=void 0,h=!0,i=null,j=!1,m=this;
function n(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 aa(a){var b=n(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){a=n(a);return"object"==a||"array"==a||"function"==a}var ca=Date.now||function(){return+new Date};function o(a,b){function c(){}c.prototype=b.prototype;a.e=b.prototype;a.prototype=new c};function da(a,b){for(var c=1;c<arguments.length;c++)var d=(""+arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a}
-function p(a,b){for(var c=0,d=(""+a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=(""+b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),D=0;0==c&&D<f;D++){var Ha=d[D]||"",Ia=e[D]||"",Ja=RegExp("(\\d*)(\\D*)","g"),Ka=RegExp("(\\d*)(\\D*)","g");do{var l=Ja.exec(Ha)||["","",""],m=Ka.exec(Ia)||["","",""];if(0==l[0].length&&0==m[0].length)break;c=((0==l[1].length?0:parseInt(l[1],10))<(0==m[1].length?0:parseInt(m[1],10))?-1:(0==l[1].length?0:parseInt(l[1],10))>(0==m[1].length?
-0:parseInt(m[1],10))?1:0)||((0==l[2].length)<(0==m[2].length)?-1:(0==l[2].length)>(0==m[2].length)?1:0)||(l[2]<m[2]?-1:l[2]>m[2]?1:0)}while(0==c)}return c};var q,r,s,t;function u(){return k.navigator?k.navigator.userAgent:i}t=s=r=q=j;var v;if(v=u()){var ea=k.navigator;q=0==v.indexOf("Opera");r=!q&&-1!=v.indexOf("MSIE");s=!q&&-1!=v.indexOf("WebKit");t=!q&&!s&&"Gecko"==ea.product}var w=q,x=r,y=t,fa=s,ga=k.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win"),z;
-a:{var A="",B;if(w&&k.opera)var C=k.opera.version,A="function"==typeof C?C():C;else if(y?B=/rv\:([^\);]+)(\)|;)/:x?B=/MSIE\s+([^\);]+)(\)|;)/:fa&&(B=/WebKit\/(\S+)/),B)var ia=B.exec(u()),A=ia?ia[1]:"";if(x){var E,ja=k.document;E=ja?ja.documentMode:g;if(E>parseFloat(A)){z=""+E;break a}}z=A}var ka={};function F(a){return ka[a]||(ka[a]=0<=p(z,a))}var la={};function ma(){return la[9]||(la[9]=x&&document.documentMode&&9<=document.documentMode)};var G=window;function na(a,b){var c={},d;for(d in a)b.call(g,a[d],d,a)&&(c[d]=a[d]);return c}function oa(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c}function pa(a,b){for(var c in a)if(b.call(g,a[c],c,a))return c};function H(a,b){this.code=a;this.message=b||"";this.name=qa[a]||qa[13];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}o(H,Error);
-var qa={7:"NoSuchElementError",8:"NoSuchFrameError",9:"UnknownCommandError",10:"StaleElementReferenceError",11:"ElementNotVisibleError",12:"InvalidElementStateError",13:"UnknownError",15:"ElementNotSelectableError",19:"XPathLookupError",23:"NoSuchWindowError",24:"InvalidCookieDomainError",25:"UnableToSetCookieError",26:"ModalDialogOpenedError",27:"NoModalDialogOpenError",28:"ScriptTimeoutError",32:"InvalidSelectorError",35:"SqlDatabaseError",34:"MoveTargetOutOfBoundsError"};
-H.prototype.toString=function(){return"["+this.name+"] "+this.message};var I,J,K,L,M,N,O;O=N=M=L=K=J=I=j;var P=u();P&&(-1!=P.indexOf("Firefox")?I=h:-1!=P.indexOf("Camino")?J=h:-1!=P.indexOf("iPhone")||-1!=P.indexOf("iPod")?K=h:-1!=P.indexOf("iPad")?L=h:-1!=P.indexOf("Android")?M=h:-1!=P.indexOf("Chrome")?N=h:-1!=P.indexOf("Safari")&&(O=h));var ra=J,sa=K,ta=L,Q=M,ua=N,R=O;var va;a:{var wa="",S,xa;if(I)S=/Firefox\/([0-9.]+)/;else{if(x||w){va=z;break a}ua?S=/Chrome\/([0-9.]+)/:R?S=/Version\/([0-9.]+)/:sa||ta?(S=/Version\/(\S+).*Mobile\/(\S+)/,xa=h):Q?S=/Android\s+([0-9.]+)(?:.*Version\/([0-9.]+))?/:ra&&(S=/Camino\/([0-9.]+)/)}if(S)var T=S.exec(u()),wa=T?xa?T[1]+"."+T[2]:T[2]||T[1]:"";va=wa};var ya,za;function U(a){return Aa?ya(a):x?0<=p(document.documentMode,a):F(a)}function V(a){return Aa?za(a):Q?0<=p(Ba,a):0<=p(va,a)}
-var Aa=function(){if(!y)return j;var a=k.Components;if(!a)return j;try{if(!a.classes)return j}catch(b){return j}var c=a.classes,a=a.interfaces,d=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),c=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo),e=c.platformVersion,f=c.version;ya=function(a){return 0<=d.c(e,""+a)};za=function(a){return 0<=d.c(f,""+a)};return h}(),Ca;if(Q){var Da=/Android\s+([0-9\.]+)/.exec(u());Ca=Da?Da[1]:"0"}else Ca="0";var Ba=Ca;function Ea(){this.a=g}
-function Fa(a,b,c){switch(typeof b){case "string":Ga(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==i){c.push("null");break}if("array"==n(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Fa(a,a.a?a.a.call(b,""+f,e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ga(f,c),
-c.push(":"),Fa(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var La={'"':'\\"',"\\":"\\\\","/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ma=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
-function Ga(a,b){b.push('"',a.replace(Ma,function(a){if(a in La)return La[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return La[a]=e+b.toString(16)}),'"')};fa||w||y&&U(3.5)||x&&U(8);function W(a){this.stack=Error().stack||"";a&&(this.message=""+a)}o(W,Error);W.prototype.name="CustomError";function Na(a,b){b.unshift(a);W.call(this,da.apply(i,b));b.shift()}o(Na,W);Na.prototype.name="AssertionError";function Oa(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d};!x||ma();!y&&!x||x&&ma()||y&&F("1.9.1");x&&F("9");function X(a){switch(n(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Oa(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Pa(a);return b}if("document"in a)return b={},b.WINDOW=Pa(a),b;if(aa(a))return Oa(a,X);a=na(a,function(a,b){return"number"==typeof b||"string"==typeof b});return oa(a,X);default:return i}}
-function Qa(a,b){return"array"==n(a)?Oa(a,function(a){return Qa(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Ra(a.ELEMENT,b):"WINDOW"in a?Ra(a.WINDOW,b):oa(a,function(a){return Qa(a,b)}):a}function Sa(a){var a=a||document,b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function Pa(a){var b=Sa(a.ownerDocument),c=pa(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c}
-function Ra(a,b){var a=decodeURIComponent(a),c=b||document,d=Sa(c);if(!(a in d))throw new H(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new H(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new H(10,"Element is no longer attached to the DOM");};var Ta=x&&U(8)&&!U(9),Ua=R&&V(4)&&!V(5),Va=Q&&V(2.2)&&!V(2.3),Wa=ha&&R&&V(4)&&!V(6);
-function Xa(){var a=G||G;switch("local_storage"){case "appcache":return Ta?j:a.applicationCache!=i;case "browser_connection":return a.navigator!=i&&a.navigator.onLine!=i;case "database":return Ua||Va?j:a.openDatabase!=i;case "location":return Wa?j:a.navigator!=i&&a.navigator.geolocation!=i;case "local_storage":return Ta?j:a.localStorage!=i;case "session_storage":return Ta?j:a.sessionStorage!=i&&a.sessionStorage.clear!=i;default:throw new H(13,"Unsupported API identifier provided as parameter");}}
-;function Ya(a){this.d=a}Ya.prototype.clear=function(){this.d.clear()};function Za(){if(!Xa())throw new H(13,"Local storage undefined");(new Ya(G.localStorage)).clear()};function $a(){var a=Za,b=[],c;try{var a="string"==typeof a?new G.Function(a):G==window?a:new G.Function("return ("+a+").apply(null,arguments);"),d=Qa(b,G.document),e=a.apply(i,d);c={status:0,value:X(e)}}catch(f){c={status:"code"in f?f.code:13,value:{message:f.message}}}a=[];Fa(new Ea,c,a);return a.join("")}var Y=["_"],Z=k;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)!Y.length&&$a!==g?Z[$]=$a:Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null}, arguments);}
+else if("function"==b&&"undefined"==typeof a.call)return"object";return b}var aa=Date.now||function(){return+new Date};function o(a,b){function c(){}c.prototype=b.prototype;a.f=b.prototype;a.prototype=new c};var p=window;function ba(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c};function q(a,b){this.code=a;this.message=b||"";this.name=ca[a]||ca[13];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}o(q,Error);
+var ca={7:"NoSuchElementError",8:"NoSuchFrameError",9:"UnknownCommandError",10:"StaleElementReferenceError",11:"ElementNotVisibleError",12:"InvalidElementStateError",13:"UnknownError",15:"ElementNotSelectableError",19:"XPathLookupError",23:"NoSuchWindowError",24:"InvalidCookieDomainError",25:"UnableToSetCookieError",26:"ModalDialogOpenedError",27:"NoModalDialogOpenError",28:"ScriptTimeoutError",32:"InvalidSelectorError",35:"SqlDatabaseError",34:"MoveTargetOutOfBoundsError"};
+q.prototype.toString=function(){return"["+this.name+"] "+this.message};function da(a,b){for(var c=1;c<arguments.length;c++)var d=String(arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a}
+function r(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),D=0;0==c&&D<f;D++){var Ca=d[D]||"",Da=e[D]||"",Ea=RegExp("(\\d*)(\\D*)","g"),Fa=RegExp("(\\d*)(\\D*)","g");do{var k=Ea.exec(Ca)||["","",""],l=Fa.exec(Da)||["","",""];if(0==k[0].length&&0==l[0].length)break;c=((0==k[1].length?0:parseInt(k[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==k[1].length?0:parseInt(k[1],10))>
+(0==l[1].length?0:parseInt(l[1],10))?1:0)||((0==k[2].length)<(0==l[2].length)?-1:(0==k[2].length)>(0==l[2].length)?1:0)||(k[2]<l[2]?-1:k[2]>l[2]?1:0)}while(0==c)}return c};var s,t,u,v;function w(){return m.navigator?m.navigator.userAgent:i}v=u=t=s=j;var x;if(x=w()){var ea=m.navigator;s=0==x.indexOf("Opera");t=!s&&-1!=x.indexOf("MSIE");u=!s&&-1!=x.indexOf("WebKit");v=!s&&!u&&"Gecko"==ea.product}var y=s,z=t,A=v,fa=u,ga=m.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win"),B;
+a:{var C="",E;if(y&&m.opera)var F=m.opera.version,C="function"==typeof F?F():F;else if(A?E=/rv\:([^\);]+)(\)|;)/:z?E=/MSIE\s+([^\);]+)(\)|;)/:fa&&(E=/WebKit\/(\S+)/),E)var ia=E.exec(w()),C=ia?ia[1]:"";if(z){var G,ja=m.document;G=ja?ja.documentMode:g;if(G>parseFloat(C)){B=String(G);break a}}B=C}var ka={};function H(a){return ka[a]||(ka[a]=0<=r(B,a))}var la={};function ma(){return la[9]||(la[9]=z&&!!document.documentMode&&9<=document.documentMode)};var I,J,K,L,M,N,O;O=N=M=L=K=J=I=j;var P=w();P&&(-1!=P.indexOf("Firefox")?I=h:-1!=P.indexOf("Camino")?J=h:-1!=P.indexOf("iPhone")||-1!=P.indexOf("iPod")?K=h:-1!=P.indexOf("iPad")?L=h:-1!=P.indexOf("Android")?M=h:-1!=P.indexOf("Chrome")?N=h:-1!=P.indexOf("Safari")&&(O=h));var na=I,oa=J,pa=K,qa=L,Q=M,ra=N,R=O;function S(a){return(a=a.exec(w()))?a[1]:""}var sa=function(){if(na)return S(/Firefox\/([0-9.]+)/);if(z||y)return B;if(ra)return S(/Chrome\/([0-9.]+)/);if(R)return S(/Version\/([0-9.]+)/);if(pa||qa){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(w());if(a)return a[1]+"."+a[2]}else{if(Q)return(a=S(/Android\s+([0-9.]+)/))?a:S(/Version\/([0-9.]+)/);if(oa)return S(/Camino\/([0-9.]+)/)}return""}();var ta,ua;function T(a){return va?ta(a):z?0<=r(document.documentMode,a):H(a)}function U(a){return va?ua(a):Q?0<=r(wa,a):0<=r(sa,a)}
+var va=function(){if(!A)return j;var a=m.Components;if(!a)return j;try{if(!a.classes)return j}catch(b){return j}var c=a.classes,a=a.interfaces,d=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),c=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo),e=c.platformVersion,f=c.version;ta=function(a){return 0<=d.c(e,""+a)};ua=function(a){return 0<=d.c(f,""+a)};return h}(),V;if(Q){var xa=/Android\s+([0-9\.]+)/.exec(w());V=xa?xa[1]:"0"}else V="0";var wa=V;function ya(){this.a=g}
+function za(a,b,c){switch(typeof b){case "string":Aa(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==i){c.push("null");break}if("array"==n(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],za(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Aa(f,
+c),c.push(":"),za(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Ba={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ga=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
+function Aa(a,b){b.push('"',a.replace(Ga,function(a){if(a in Ba)return Ba[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Ba[a]=e+b.toString(16)}),'"')};fa||y||A&&T(3.5)||z&&T(8);function W(a){Error.captureStackTrace?Error.captureStackTrace(this,W):this.stack=Error().stack||"";a&&(this.message=String(a))}o(W,Error);W.prototype.name="CustomError";function Ha(a,b){b.unshift(a);W.call(this,da.apply(i,b));b.shift();this.e=a}o(Ha,W);Ha.prototype.name="AssertionError";function Ia(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d};!z||ma();!A&&!z||z&&ma()||A&&H("1.9.1");z&&H("9");function X(a){switch(n(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ia(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Ja(a);return b}if("document"in a)return b={},b.WINDOW=Ja(a),b;var c=n(a);if("array"==c||"object"==c&&"number"==typeof a.length)return Ia(a,X);var c=function(a,b){return"number"==typeof b||"string"==typeof b},d={};for(b in a)c.call(g,0,b)&&(d[b]=a[b]);return ba(d,X);default:return i}}
+function Ka(a,b){var c;"array"==n(a)?c=Ia(a,function(a){return Ka(a,b)}):(c=typeof a,c="object"==c&&a!=i||"function"==c?"function"==typeof a?a:"ELEMENT"in a?La(a.ELEMENT,b):"WINDOW"in a?La(a.WINDOW,b):ba(a,function(a){return Ka(a,b)}):a);return c}function Ma(a){var a=a||document,b=a.$wdc_;b||(b=a.$wdc_={},b.b=aa());b.b||(b.b=aa());return b}
+function Ja(a){var b=Ma(a.ownerDocument),c;a:{c=function(b){return b==a};for(var d in b)if(c.call(g,b[d])){c=d;break a}c=g}c||(c=":wdc:"+b.b++,b[c]=a);return c}
+function La(a,b){var a=decodeURIComponent(a),c=b||document,d=Ma(c);if(!(a in d))throw new q(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new q(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new q(10,"Element is no longer attached to the DOM");};var Na=z&&T(8)&&!T(9),Oa=R&&U(4)&&!U(5),Pa=Q&&U(2.2)&&!U(2.3),Qa=ha&&R&&U(4)&&!U(6);
+function Ra(){var a=p||p;switch("local_storage"){case "appcache":return Na?j:a.applicationCache!=i;case "browser_connection":return a.navigator!=i&&a.navigator.onLine!=i;case "database":return Oa||Pa?j:a.openDatabase!=i;case "location":return Qa?j:a.navigator!=i&&a.navigator.geolocation!=i;case "local_storage":return Na?j:a.localStorage!=i;case "session_storage":return Na?j:a.sessionStorage!=i&&a.sessionStorage.clear!=i;default:throw new q(13,"Unsupported API identifier provided as parameter");}}
+;function Sa(a){this.d=a}Sa.prototype.clear=function(){this.d.clear()};function Ta(){if(!Ra())throw new q(13,"Local storage undefined");(new Sa(p.localStorage)).clear()};function Ua(){var a=Ta,b=[],c;try{var a="string"==typeof a?new p.Function(a):p==window?a:new p.Function("return ("+a+").apply(null,arguments);"),d=Ka(b,p.document),e=a.apply(i,d);c={status:0,value:X(e)}}catch(f){c={status:"code"in f?f.code:13,value:{message:f.message}}}a=[];za(new ya,c,a);return a.join("")}var Y=["_"],Z=m;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());){var Va;if(Va=!Y.length)Va=Ua!==g;Va?Z[$]=Ua:Z=Z[$]?Z[$]:Z[$]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null}, arguments);}
View
31 src/third_party/webdriver-atoms/clear_session_storage.js
@@ -1,16 +1,17 @@
-function(){return function(){var g=void 0,h=!0,i=null,j=!1,k=this;
+function(){return function(){var g=void 0,h=!0,i=null,j=!1,m=this;
function n(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 aa(a){var b=n(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){a=n(a);return"object"==a||"array"==a||"function"==a}var ca=Date.now||function(){return+new Date};function o(a,b){function c(){}c.prototype=b.prototype;a.e=b.prototype;a.prototype=new c};function da(a,b){for(var c=1;c<arguments.length;c++)var d=(""+arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a}
-function p(a,b){for(var c=0,d=(""+a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=(""+b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),D=0;0==c&&D<f;D++){var Ha=d[D]||"",Ia=e[D]||"",Ja=RegExp("(\\d*)(\\D*)","g"),Ka=RegExp("(\\d*)(\\D*)","g");do{var l=Ja.exec(Ha)||["","",""],m=Ka.exec(Ia)||["","",""];if(0==l[0].length&&0==m[0].length)break;c=((0==l[1].length?0:parseInt(l[1],10))<(0==m[1].length?0:parseInt(m[1],10))?-1:(0==l[1].length?0:parseInt(l[1],10))>(0==m[1].length?
-0:parseInt(m[1],10))?1:0)||((0==l[2].length)<(0==m[2].length)?-1:(0==l[2].length)>(0==m[2].length)?1:0)||(l[2]<m[2]?-1:l[2]>m[2]?1:0)}while(0==c)}return c};var q,r,s,t;function u(){return k.navigator?k.navigator.userAgent:i}t=s=r=q=j;var v;if(v=u()){var ea=k.navigator;q=0==v.indexOf("Opera");r=!q&&-1!=v.indexOf("MSIE");s=!q&&-1!=v.indexOf("WebKit");t=!q&&!s&&"Gecko"==ea.product}var w=q,x=r,y=t,fa=s,ga=k.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win"),z;
-a:{var A="",B;if(w&&k.opera)var C=k.opera.version,A="function"==typeof C?C():C;else if(y?B=/rv\:([^\);]+)(\)|;)/:x?B=/MSIE\s+([^\);]+)(\)|;)/:fa&&(B=/WebKit\/(\S+)/),B)var ia=B.exec(u()),A=ia?ia[1]:"";if(x){var E,ja=k.document;E=ja?ja.documentMode:g;if(E>parseFloat(A)){z=""+E;break a}}z=A}var ka={};function F(a){return ka[a]||(ka[a]=0<=p(z,a))}var la={};function ma(){return la[9]||(la[9]=x&&document.documentMode&&9<=document.documentMode)};var G=window;function na(a,b){var c={},d;for(d in a)b.call(g,a[d],d,a)&&(c[d]=a[d]);return c}function oa(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c}function pa(a,b){for(var c in a)if(b.call(g,a[c],c,a))return c};function H(a,b){this.code=a;this.message=b||"";this.name=qa[a]||qa[13];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}o(H,Error);
-var qa={7:"NoSuchElementError",8:"NoSuchFrameError",9:"UnknownCommandError",10:"StaleElementReferenceError",11:"ElementNotVisibleError",12:"InvalidElementStateError",13:"UnknownError",15:"ElementNotSelectableError",19:"XPathLookupError",23:"NoSuchWindowError",24:"InvalidCookieDomainError",25:"UnableToSetCookieError",26:"ModalDialogOpenedError",27:"NoModalDialogOpenError",28:"ScriptTimeoutError",32:"InvalidSelectorError",35:"SqlDatabaseError",34:"MoveTargetOutOfBoundsError"};
-H.prototype.toString=function(){return"["+this.name+"] "+this.message};var I,J,K,L,M,N,O;O=N=M=L=K=J=I=j;var P=u();P&&(-1!=P.indexOf("Firefox")?I=h:-1!=P.indexOf("Camino")?J=h:-1!=P.indexOf("iPhone")||-1!=P.indexOf("iPod")?K=h:-1!=P.indexOf("iPad")?L=h:-1!=P.indexOf("Android")?M=h:-1!=P.indexOf("Chrome")?N=h:-1!=P.indexOf("Safari")&&(O=h));var ra=J,sa=K,ta=L,Q=M,ua=N,R=O;var va;a:{var wa="",S,xa;if(I)S=/Firefox\/([0-9.]+)/;else{if(x||w){va=z;break a}ua?S=/Chrome\/([0-9.]+)/:R?S=/Version\/([0-9.]+)/:sa||ta?(S=/Version\/(\S+).*Mobile\/(\S+)/,xa=h):Q?S=/Android\s+([0-9.]+)(?:.*Version\/([0-9.]+))?/:ra&&(S=/Camino\/([0-9.]+)/)}if(S)var T=S.exec(u()),wa=T?xa?T[1]+"."+T[2]:T[2]||T[1]:"";va=wa};var ya,za;function U(a){return Aa?ya(a):x?0<=p(document.documentMode,a):F(a)}function V(a){return Aa?za(a):Q?0<=p(Ba,a):0<=p(va,a)}
-var Aa=function(){if(!y)return j;var a=k.Components;if(!a)return j;try{if(!a.classes)return j}catch(b){return j}var c=a.classes,a=a.interfaces,d=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),c=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo),e=c.platformVersion,f=c.version;ya=function(a){return 0<=d.c(e,""+a)};za=function(a){return 0<=d.c(f,""+a)};return h}(),Ca;if(Q){var Da=/Android\s+([0-9\.]+)/.exec(u());Ca=Da?Da[1]:"0"}else Ca="0";var Ba=Ca;function Ea(){this.a=g}
-function Fa(a,b,c){switch(typeof b){case "string":Ga(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==i){c.push("null");break}if("array"==n(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Fa(a,a.a?a.a.call(b,""+f,e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ga(f,c),
-c.push(":"),Fa(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var La={'"':'\\"',"\\":"\\\\","/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ma=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
-function Ga(a,b){b.push('"',a.replace(Ma,function(a){if(a in La)return La[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return La[a]=e+b.toString(16)}),'"')};fa||w||y&&U(3.5)||x&&U(8);function W(a){this.stack=Error().stack||"";a&&(this.message=""+a)}o(W,Error);W.prototype.name="CustomError";function Na(a,b){b.unshift(a);W.call(this,da.apply(i,b));b.shift()}o(Na,W);Na.prototype.name="AssertionError";function Oa(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d};!x||ma();!y&&!x||x&&ma()||y&&F("1.9.1");x&&F("9");function X(a){switch(n(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Oa(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Pa(a);return b}if("document"in a)return b={},b.WINDOW=Pa(a),b;if(aa(a))return Oa(a,X);a=na(a,function(a,b){return"number"==typeof b||"string"==typeof b});return oa(a,X);default:return i}}
-function Qa(a,b){return"array"==n(a)?Oa(a,function(a){return Qa(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Ra(a.ELEMENT,b):"WINDOW"in a?Ra(a.WINDOW,b):oa(a,function(a){return Qa(a,b)}):a}function Sa(a){var a=a||document,b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function Pa(a){var b=Sa(a.ownerDocument),c=pa(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c}
-function Ra(a,b){var a=decodeURIComponent(a),c=b||document,d=Sa(c);if(!(a in d))throw new H(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new H(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new H(10,"Element is no longer attached to the DOM");};var Ta=x&&U(8)&&!U(9),Ua=R&&V(4)&&!V(5),Va=Q&&V(2.2)&&!V(2.3),Wa=ha&&R&&V(4)&&!V(6);
-function Xa(){var a=G||G;switch("session_storage"){case "appcache":return Ta?j:a.applicationCache!=i;case "browser_connection":return a.navigator!=i&&a.navigator.onLine!=i;case "database":return Ua||Va?j:a.openDatabase!=i;case "location":return Wa?j:a.navigator!=i&&a.navigator.geolocation!=i;case "local_storage":return Ta?j:a.localStorage!=i;case "session_storage":return Ta?j:a.sessionStorage!=i&&a.sessionStorage.clear!=i;default:throw new H(13,"Unsupported API identifier provided as parameter");
-}};function Ya(a){this.d=a}Ya.prototype.clear=function(){this.d.clear()};function Za(){var a;if(Xa())a=new Ya(G.sessionStorage);else throw new H(13,"Session storage undefined");a.clear()};function $a(){var a=Za,b=[],c;try{var a="string"==typeof a?new G.Function(a):G==window?a:new G.Function("return ("+a+").apply(null,arguments);"),d=Qa(b,G.document),e=a.apply(i,d);c={status:0,value:X(e)}}catch(f){c={status:"code"in f?f.code:13,value:{message:f.message}}}a=[];Fa(new Ea,c,a);return a.join("")}var Y=["_"],Z=k;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)!Y.length&&$a!==g?Z[$]=$a:Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null}, arguments);}
+else if("function"==b&&"undefined"==typeof a.call)return"object";return b}var aa=Date.now||function(){return+new Date};function o(a,b){function c(){}c.prototype=b.prototype;a.f=b.prototype;a.prototype=new c};var p=window;function ba(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c};function q(a,b){this.code=a;this.message=b||"";this.name=ca[a]||ca[13];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}o(q,Error);
+var ca={7:"NoSuchElementError",8:"NoSuchFrameError",9:"UnknownCommandError",10:"StaleElementReferenceError",11:"ElementNotVisibleError",12:"InvalidElementStateError",13:"UnknownError",15:"ElementNotSelectableError",19:"XPathLookupError",23:"NoSuchWindowError",24:"InvalidCookieDomainError",25:"UnableToSetCookieError",26:"ModalDialogOpenedError",27:"NoModalDialogOpenError",28:"ScriptTimeoutError",32:"InvalidSelectorError",35:"SqlDatabaseError",34:"MoveTargetOutOfBoundsError"};
+q.prototype.toString=function(){return"["+this.name+"] "+this.message};function da(a,b){for(var c=1;c<arguments.length;c++)var d=String(arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a}
+function r(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),D=0;0==c&&D<f;D++){var Ca=d[D]||"",Da=e[D]||"",Ea=RegExp("(\\d*)(\\D*)","g"),Fa=RegExp("(\\d*)(\\D*)","g");do{var k=Ea.exec(Ca)||["","",""],l=Fa.exec(Da)||["","",""];if(0==k[0].length&&0==l[0].length)break;c=((0==k[1].length?0:parseInt(k[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==k[1].length?0:parseInt(k[1],10))>
+(0==l[1].length?0:parseInt(l[1],10))?1:0)||((0==k[2].length)<(0==l[2].length)?-1:(0==k[2].length)>(0==l[2].length)?1:0)||(k[2]<l[2]?-1:k[2]>l[2]?1:0)}while(0==c)}return c};var s,t,u,v;function w(){return m.navigator?m.navigator.userAgent:i}v=u=t=s=j;var x;if(x=w()){var ea=m.navigator;s=0==x.indexOf("Opera");t=!s&&-1!=x.indexOf("MSIE");u=!s&&-1!=x.indexOf("WebKit");v=!s&&!u&&"Gecko"==ea.product}var y=s,z=t,A=v,fa=u,ga=m.navigator,ha=-1!=(ga&&ga.platform||"").indexOf("Win"),B;
+a:{var C="",E;if(y&&m.opera)var F=m.opera.version,C="function"==typeof F?F():F;else if(A?E=/rv\:([^\);]+)(\)|;)/:z?E=/MSIE\s+([^\);]+)(\)|;)/:fa&&(E=/WebKit\/(\S+)/),E)var ia=E.exec(w()),C=ia?ia[1]:"";if(z){var G,ja=m.document;G=ja?ja.documentMode:g;if(G>parseFloat(C)){B=String(G);break a}}B=C}var ka={};function H(a){return ka[a]||(ka[a]=0<=r(B,a))}var la={};function ma(){return la[9]||(la[9]=z&&!!document.documentMode&&9<=document.documentMode)};var I,J,K,L,M,N,O;O=N=M=L=K=J=I=j;var P=w();P&&(-1!=P.indexOf("Firefox")?I=h:-1!=P.indexOf("Camino")?J=h:-1!=P.indexOf("iPhone")||-1!=P.indexOf("iPod")?K=h:-1!=P.indexOf("iPad")?L=h:-1!=P.indexOf("Android")?M=h:-1!=P.indexOf("Chrome")?N=h:-1!=P.indexOf("Safari")&&(O=h));var na=I,oa=J,pa=K,qa=L,Q=M,ra=N,R=O;function S(a){return(a=a.exec(w()))?a[1]:""}var sa=function(){if(na)return S(/Firefox\/([0-9.]+)/);if(z||y)return B;if(ra)return S(/Chrome\/([0-9.]+)/);if(R)return S(/Version\/([0-9.]+)/);if(pa||qa){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(w());if(a)return a[1]+"."+a[2]}else{if(Q)return(a=S(/Android\s+([0-9.]+)/))?a:S(/Version\/([0-9.]+)/);if(oa)return S(/Camino\/([0-9.]+)/)}return""}();var ta,ua;function T(a){return va?ta(a):z?0<=r(document.documentMode,a):H(a)}function U(a){return va?ua(a):Q?0<=r(wa,a):0<=r(sa,a)}
+var va=function(){if(!A)return j;var a=m.Components;if(!a)return j;try{if(!a.classes)return j}catch(b){return j}var c=a.classes,a=a.interfaces,d=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),c=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo),e=c.platformVersion,f=c.version;ta=function(a){return 0<=d.c(e,""+a)};ua=function(a){return 0<=d.c(f,""+a)};return h}(),V;if(Q){var xa=/Android\s+([0-9\.]+)/.exec(w());V=xa?xa[1]:"0"}else V="0";var wa=V;function ya(){this.a=g}
+function za(a,b,c){switch(typeof b){case "string":Aa(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==i){c.push("null");break}if("array"==n(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],za(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Aa(f,
+c),c.push(":"),za(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Ba={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ga=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
+function Aa(a,b){b.push('"',a.replace(Ga,function(a){if(a in Ba)return Ba[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Ba[a]=e+b.toString(16)}),'"')};fa||y||A&&T(3.5)||z&&T(8);function W(a){Error.captureStackTrace?Error.captureStackTrace(this,W):this.stack=Error().stack||"";a&&(this.message=String(a))}o(W,Error);W.prototype.name="CustomError";function Ha(a,b){b.unshift(a);W.call(this,da.apply(i,b));b.shift();this.e=a}o(Ha,W);Ha.prototype.name="AssertionError";function Ia(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d};!z||ma();!A&&!z||z&&ma()||A&&H("1.9.1");z&&H("9");function X(a){switch(n(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ia(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Ja(a);return b}if("document"in a)return b={},b.WINDOW=Ja(a),b;var c=n(a);if("array"==c||"object"==c&&"number"==typeof a.length)return Ia(a,X);var c=function(a,b){return"number"==typeof b||"string"==typeof b},d={};for(b in a)c.call(g,0,b)&&(d[b]=a[b]);return ba(d,X);default:return i}}
+function Ka(a,b){var c;"array"==n(a)?c=Ia(a,function(a){return Ka(a,b)}):(c=typeof a,c="object"==c&&a!=i||"function"==c?"function"==typeof a?a:"ELEMENT"in a?La(a.ELEMENT,b):"WINDOW"in a?La(a.WINDOW,b):ba(a,function(a){return Ka(a,b)}):a);return c}function Ma(a){var a=a||document,b=a.$wdc_;b||(b=a.$wdc_={},b.b=aa());b.b||(b.b=aa());return b}
+function Ja(a){var b=Ma(a.ownerDocument),c;a:{c=function(b){return b==a};for(var d in b)if(c.call(g,b[d])){c=d;break a}c=g}c||(c=":wdc:"+b.b++,b[c]=a);return c}
+function La(a,b){var a=decodeURIComponent(a),c=b||document,d=Ma(c);if(!(a in d))throw new q(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new q(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new q(10,"Element is no longer attached to the DOM");};var Na=z&&T(8)&&!T(9),Oa=R&&U(4)&&!U(5),Pa=Q&&U(2.2)&&!U(2.3),Qa=ha&&R&&U(4)&&!U(6);
+function Ra(){var a=p||p;switch("session_storage"){case "appcache":return Na?j:a.applicationCache!=i;case "browser_connection":return a.navigator!=i&&a.navigator.onLine!=i;case "database":return Oa||Pa?j:a.openDatabase!=i;case "location":return Qa?j:a.navigator!=i&&a.navigator.geolocation!=i;case "local_storage":return Na?j:a.localStorage!=i;case "session_storage":return Na?j:a.sessionStorage!=i&&a.sessionStorage.clear!=i;default:throw new q(13,"Unsupported API identifier provided as parameter");
+}};function Sa(a){this.d=a}Sa.prototype.clear=function(){this.d.clear()};function Ta(){var a;if(Ra())a=new Sa(p.sessionStorage);else throw new q(13,"Session storage undefined");a.clear()};function Ua(){var a=Ta,b=[],c;try{var a="string"==typeof a?new p.Function(a):p==window?a:new p.Function("return ("+a+").apply(null,arguments);"),d=Ka(b,p.document),e=a.apply(i,d);c={status:0,value:X(e)}}catch(f){c={status:"code"in f?f.code:13,value:{message:f.message}}}a=[];za(new ya,c,a);return a.join("")}var Y=["_"],Z=m;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());){var Va;if(Va=!Y.length)Va=Ua!==g;Va?Z[$]=Ua:Z=Z[$]?Z[$]:Z[$]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null}, arguments);}
View
264 src/third_party/webdriver-atoms/click.js
133 additions, 131 deletions not shown
View
62 src/third_party/webdriver-atoms/default_content.js
@@ -1,15 +1,47 @@
-function(){return function(){var g=void 0,h=!0,i=null,l=!1,m=this;
-function n(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 aa(a){var b=n(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){a=n(a);return"object"==a||"array"==a||"function"==a}var ca=Date.now||function(){return+new Date};function o(a,b){function c(){}c.prototype=b.prototype;a.h=b.prototype;a.prototype=new c};function da(a,b){for(var c=1;c<arguments.length;c++)var d=(""+arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a}
-function ea(a,b){for(var c=0,d=(""+a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=(""+b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),C=0;0==c&&C<f;C++){var ya=d[C]||"",za=e[C]||"",Aa=RegExp("(\\d*)(\\D*)","g"),Ba=RegExp("(\\d*)(\\D*)","g");do{var j=Aa.exec(ya)||["","",""],k=Ba.exec(za)||["","",""];if(0==j[0].length&&0==k[0].length)break;c=((0==j[1].length?0:parseInt(j[1],10))<(0==k[1].length?0:parseInt(k[1],10))?-1:(0==j[1].length?0:parseInt(j[1],10))>(0==k[1].length?
-0:parseInt(k[1],10))?1:0)||((0==j[2].length)<(0==k[2].length)?-1:(0==j[2].length)>(0==k[2].length)?1:0)||(j[2]<k[2]?-1:j[2]>k[2]?1:0)}while(0==c)}return c};var p,q,r,s;function t(){return m.navigator?m.navigator.userAgent:i}s=r=q=p=l;var u;if(u=t()){var fa=m.navigator;p=0==u.indexOf("Opera");q=!p&&-1!=u.indexOf("MSIE");r=!p&&-1!=u.indexOf("WebKit");s=!p&&!r&&"Gecko"==fa.product}var v=p,w=q,x=s,y=r,z;
-a:{var A="",B;if(v&&m.opera)var D=m.opera.version,A="function"==typeof D?D():D;else if(x?B=/rv\:([^\);]+)(\)|;)/:w?B=/MSIE\s+([^\);]+)(\)|;)/:y&&(B=/WebKit\/(\S+)/),B)var ga=B.exec(t()),A=ga?ga[1]:"";if(w){var E,ha=m.document;E=ha?ha.documentMode:g;if(E>parseFloat(A)){z=""+E;break a}}z=A}var ia={};function F(a){return ia[a]||(ia[a]=0<=ea(z,a))}var ja={};function ka(){return ja[9]||(ja[9]=w&&document.documentMode&&9<=document.documentMode)};var G=window;function H(a){this.stack=Error().stack||"";a&&(this.message=""+a)}o(H,Error);H.prototype.name="CustomError";function la(a,b){b.unshift(a);H.call(this,da.apply(i,b));b.shift()}o(la,H);la.prototype.name="AssertionError";function I(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d};!w||ka();!x&&!w||w&&ka()||x&&F("1.9.1");w&&F("9");function ma(a,b){var c={},d;for(d in a)b.call(g,a[d],d,a)&&(c[d]=a[d]);return c}function na(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c}function oa(a,b){for(var c in a)if(b.call(g,a[c],c,a))return c};var J,K,L,M,N,O,P;P=O=N=M=L=K=J=l;var Q=t();Q&&(-1!=Q.indexOf("Firefox")?J=h:-1!=Q.indexOf("Camino")?K=h:-1!=Q.indexOf("iPhone")||-1!=Q.indexOf("iPod")?L=h:-1!=Q.indexOf("iPad")?M=h:-1!=Q.indexOf("Android")?N=h:-1!=Q.indexOf("Chrome")?O=h:-1!=Q.indexOf("Safari")&&(P=h));var pa=K,qa=L,ra=M,sa=N,ta=O,ua=P;a:{var R;if(J)R=/Firefox\/([0-9.]+)/;else{if(w||v)break a;ta?R=/Chrome\/([0-9.]+)/:ua?R=/Version\/([0-9.]+)/:qa||ra?R=/Version\/(\S+).*Mobile\/(\S+)/:sa?R=/Android\s+([0-9.]+)(?:.*Version\/([0-9.]+))?/:pa&&(R=/Camino\/([0-9.]+)/)}R&&R.exec(t())};var va;function S(a){return wa?va(a):w?0<=ea(document.documentMode,a):F(a)}var wa=function(){if(!x)return l;var a=m.Components;if(!a)return l;try{if(!a.classes)return l}catch(b){return l}var c=a.classes,a=a.interfaces,d=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),e=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo).platformVersion;va=function(a){return 0<=d.i(e,""+a)};return h}();function T(a,b){this.code=a;this.message=b||"";this.name=xa[a]||xa[13];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}o(T,Error);
-var xa={7:"NoSuchElementError",8:"NoSuchFrameError",9:"UnknownCommandError",10:"StaleElementReferenceError",11:"ElementNotVisibleError",12:"InvalidElementStateError",13:"UnknownError",15:"ElementNotSelectableError",19:"XPathLookupError",23:"NoSuchWindowError",24:"InvalidCookieDomainError",25:"UnableToSetCookieError",26:"ModalDialogOpenedError",27:"NoModalDialogOpenError",28:"ScriptTimeoutError",32:"InvalidSelectorError",35:"SqlDatabaseError",34:"MoveTargetOutOfBoundsError"};
-T.prototype.toString=function(){return"["+this.name+"] "+this.message};!v&&(!y||S("533"));var U="StopIteration"in m?m.StopIteration:Error("StopIteration");function Ca(){}Ca.prototype.next=function(){throw U;};function V(a,b,c,d,e){this.a=!!b;a&&W(this,a,d);this.depth=e!=g?e:this.c||0;this.a&&(this.depth*=-1);this.g=!c}o(V,Ca);V.prototype.b=i;V.prototype.c=0;V.prototype.f=l;function W(a,b,c){if(a.b=b)a.c="number"==typeof c?c:1!=a.b.nodeType?0:a.a?-1:1}
-V.prototype.next=function(){var a;if(this.f){if(!this.b||this.g&&0==this.depth)throw U;a=this.b;var b=this.a?-1:1;if(this.c==b){var c=this.a?a.lastChild:a.firstChild;c?W(this,c):W(this,a,-1*b)}else(c=this.a?a.previousSibling:a.nextSibling)?W(this,c):W(this,a.parentNode,-1*b);this.depth+=this.c*(this.a?-1:1)}else this.f=h;a=this.b;if(!this.b)throw U;return a};
-V.prototype.splice=function(a){var b=this.b,c=this.a?1:-1;this.c==c&&(this.c=-1*c,this.depth+=this.c*(this.a?-1:1));this.a=!this.a;V.prototype.next.call(this);this.a=!this.a;for(var c=aa(arguments[0])?arguments[0]:arguments,d=c.length-1;0<=d;d--)b.parentNode&&b.parentNode.insertBefore(c[d],b.nextSibling);b&&b.parentNode&&b.parentNode.removeChild(b)};function Da(a,b,c,d){V.call(this,a,b,c,i,d)}o(Da,V);Da.prototype.next=function(){do Da.h.next.call(this);while(-1==this.c);return this.b};function Ea(){return G.top};function Fa(){this.d=g}
-function Ga(a,b,c){switch(typeof b){case "string":Ha(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==i){c.push("null");break}if("array"==n(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Ga(a,a.d?a.d.call(b,""+f,e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ha(f,c),
-c.push(":"),Ga(a,a.d?a.d.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Ia={'"':'\\"',"\\":"\\\\","/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ja=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
-function Ha(a,b){b.push('"',a.replace(Ja,function(a){if(a in Ia)return Ia[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Ia[a]=e+b.toString(16)}),'"')};y||v||x&&S(3.5)||w&&S(8);function X(a){switch(n(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return I(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Ka(a);return b}if("document"in a)return b={},b.WINDOW=Ka(a),b;if(aa(a))return I(a,X);a=ma(a,function(a,b){return"number"==typeof b||"string"==typeof b});return na(a,X);default:return i}}
-function La(a,b){return"array"==n(a)?I(a,function(a){return La(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Ma(a.ELEMENT,b):"WINDOW"in a?Ma(a.WINDOW,b):na(a,function(a){return La(a,b)}):a}function Na(a){var a=a||document,b=a.$wdc_;b||(b=a.$wdc_={},b.e=ca());b.e||(b.e=ca());return b}function Ka(a){var b=Na(a.ownerDocument),c=oa(b,function(b){return b==a});c||(c=":wdc:"+b.e++,b[c]=a);return c}
-function Ma(a,b){var a=decodeURIComponent(a),c=b||document,d=Na(c);if(!(a in d))throw new T(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new T(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new T(10,"Element is no longer attached to the DOM");};function Oa(){var a=Ea,b=[],c;try{var a="string"==typeof a?new G.Function(a):G==window?a:new G.Function("return ("+a+").apply(null,arguments);"),d=La(b,G.document),e=a.apply(i,d);c={status:0,value:X(e)}}catch(f){c={status:"code"in f?f.code:13,value:{message:f.message}}}a=[];Ga(new Fa,c,a);return a.join("")}var Y=["_"],Z=m;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)!Y.length&&Oa!==g?Z[$]=Oa:Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null}, arguments);}
+function(){return function(){function h(a){throw a;}var i=void 0,j=!0,k=null,l=!1;function m(a){return function(){return this[a]}}function aa(a){return function(){return a}}var n=this;
+function ba(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 p(a){return"string"==typeof a}Math.floor(2147483648*Math.random()).toString(36);var ca=Date.now||function(){return+new Date};function q(a,b){function c(){}c.prototype=b.prototype;a.da=b.prototype;a.prototype=new c};var r=window;function s(a){Error.captureStackTrace?Error.captureStackTrace(this,s):this.stack=Error().stack||"";a&&(this.message=String(a))}q(s,Error);s.prototype.name="CustomError";function da(a,b){for(var c=1;c<arguments.length;c++)var d=String(arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a}
+function ea(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var o=d[g]||"",z=e[g]||"",A=RegExp("(\\d*)(\\D*)","g"),na=RegExp("(\\d*)(\\D*)","g");do{var D=A.exec(o)||["","",""],E=na.exec(z)||["","",""];if(0==D[0].length&&0==E[0].length)break;c=((0==D[1].length?0:parseInt(D[1],10))<(0==E[1].length?0:parseInt(E[1],10))?-1:(0==D[1].length?0:parseInt(D[1],10))>(0==E[1].length?
+0:parseInt(E[1],10))?1:0)||((0==D[2].length)<(0==E[2].length)?-1:(0==D[2].length)>(0==E[2].length)?1:0)||(D[2]<E[2]?-1:D[2]>E[2]?1:0)}while(0==c)}return c};function fa(a,b){b.unshift(a);s.call(this,da.apply(k,b));b.shift();this.aa=a}q(fa,s);fa.prototype.name="AssertionError";function ga(a,b,c){if(!a){var d=Array.prototype.slice.call(arguments,2),e="Assertion failed";if(b)var e=e+(": "+b),f=d;h(new fa(""+e,f||[]))}};var ha=Array.prototype;function t(a,b){for(var c=a.length,d=p(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(i,d[e],e,a)}function ia(a,b){for(var c=a.length,d=[],e=0,f=p(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var o=f[g];b.call(i,o,g,a)&&(d[e++]=o)}return d}function ja(a,b){for(var c=a.length,d=Array(c),e=p(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(i,e[f],f,a));return d}function ka(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;t(a,function(c,f){d=b.call(i,d,c,f,a)});return d}
+function la(a,b){for(var c=a.length,d=p(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(i,d[e],e,a))return j;return l}function ma(a){return ha.concat.apply(ha,arguments)}function oa(a,b,c){ga(a.length!=k);return 2>=arguments.length?ha.slice.call(a,b):ha.slice.call(a,b,c)};var u,pa,qa,ra;function v(){return n.navigator?n.navigator.userAgent:k}ra=qa=pa=u=l;var sa;if(sa=v()){var ta=n.navigator;u=0==sa.indexOf("Opera");pa=!u&&-1!=sa.indexOf("MSIE");qa=!u&&-1!=sa.indexOf("WebKit");ra=!u&&!qa&&"Gecko"==ta.product}var ua=u,w=pa,x=ra,va=qa,wa;
+a:{var xa="",y;if(ua&&n.opera)var ya=n.opera.version,xa="function"==typeof ya?ya():ya;else if(x?y=/rv\:([^\);]+)(\)|;)/:w?y=/MSIE\s+([^\);]+)(\)|;)/:va&&(y=/WebKit\/(\S+)/),y)var za=y.exec(v()),xa=za?za[1]:"";if(w){var Aa,Ba=n.document;Aa=Ba?Ba.documentMode:i;if(Aa>parseFloat(xa)){wa=String(Aa);break a}}wa=xa}var Ca={};function Da(a){return Ca[a]||(Ca[a]=0<=ea(wa,a))}var Ea={};function Fa(a){return Ea[a]||(Ea[a]=w&&!!document.documentMode&&document.documentMode>=a)};!w||Fa(9);!x&&!w||w&&Fa(9)||x&&Da("1.9.1");w&&Da("9");function Ga(a,b){var c={},d;for(d in a)c[d]=b.call(i,a[d],d,a);return c};function Ha(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a}
+function Ia(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if((9==a.nodeType||9==b.nodeType)&&w&&!Da(9)){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?Ja(a,b):!c&&Ha(e,b)?-1*Ka(a,b):!d&&Ha(f,a)?Ka(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=
+9==a.nodeType?a:a.ownerDocument||a.document;c=d.createRange();c.selectNode(a);c.collapse(j);d=d.createRange();d.selectNode(b);d.collapse(j);return c.compareBoundaryPoints(n.Range.START_TO_END,d)}function Ka(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return Ja(d,a)}function Ja(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1};var La,Ma,Na,Oa,Pa,Qa,Ra;Ra=Qa=Pa=Oa=Na=Ma=La=l;var B=v();B&&(-1!=B.indexOf("Firefox")?La=j:-1!=B.indexOf("Camino")?Ma=j:-1!=B.indexOf("iPhone")||-1!=B.indexOf("iPod")?Na=j:-1!=B.indexOf("iPad")?Oa=j:-1!=B.indexOf("Android")?Pa=j:-1!=B.indexOf("Chrome")?Qa=j:-1!=B.indexOf("Safari")&&(Ra=j));var Sa=La,Ta=Ma,Ua=Na,Va=Oa,Wa=Pa,Xa=Qa,Ya=Ra;function C(a){return(a=a.exec(v()))?a[1]:""}(function(){if(Sa)return C(/Firefox\/([0-9.]+)/);if(w||ua)return wa;if(Xa)return C(/Chrome\/([0-9.]+)/);if(Ya)return C(/Version\/([0-9.]+)/);if(Ua||Va){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(v());if(a)return a[1]+"."+a[2]}else{if(Wa)return(a=C(/Android\s+([0-9.]+)/))?a:C(/Version\/([0-9.]+)/);if(Ta)return C(/Camino\/([0-9.]+)/)}return""})();var Za;function $a(a){return ab?Za(a):w?0<=ea(document.documentMode,a):Da(a)}var ab=function(){if(!x)return l;var a=n.Components;if(!a)return l;try{if(!a.classes)return l}catch(b){return l}var c=a.classes,a=a.interfaces,d=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),e=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo).platformVersion;Za=function(a){return 0<=d.$(e,""+a)};return j}();function F(a,b){this.code=a;this.message=b||"";this.name=bb[a]||bb[13];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}q(F,Error);
+var bb={7:"NoSuchElementError",8:"NoSuchFrameError",9:"UnknownCommandError",10:"StaleElementReferenceError",11:"ElementNotVisibleError",12:"InvalidElementStateError",13:"UnknownError",15:"ElementNotSelectableError",19:"XPathLookupError",23:"NoSuchWindowError",24:"InvalidCookieDomainError",25:"UnableToSetCookieError",26:"ModalDialogOpenedError",27:"NoModalDialogOpenError",28:"ScriptTimeoutError",32:"InvalidSelectorError",35:"SqlDatabaseError",34:"MoveTargetOutOfBoundsError"};
+F.prototype.toString=function(){return"["+this.name+"] "+this.message};function G(a,b,c){this.f=a;this.Y=b||1;this.h=c||1};var H=w&&!Fa(9),cb=w&&!Fa(8);function db(a,b,c,d,e){this.f=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.ba=e;this.parentNode=b}function eb(a,b,c){var d=cb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new db(b,a,b.nodeName,d,c)};function I(a){var b=k,c=a.nodeType;1==c&&(b=a.textContent,b=b==i||b==k?a.innerText:b,b=b==i||b==k?"":b);if("string"!=typeof b)if(H&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c)for(var a=9==c?a.documentElement:a.firstChild,c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),H&&"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 J(a,b,c){if(b===k)return j;try{if(!a.getAttribute)return l}catch(d){return l}cb&&"class"==b&&(b="className");return c==k?!!a.getAttribute(b):a.getAttribute(b,2)==c}function K(a,b,c,d,e){return(H?fb:gb).call(k,a,b,p(c)?c:k,p(d)?d:k,e||new L)}
+function fb(a,b,c,d,e){if(l||8==a.g||c&&a.g===k){var f=b.all;if(!f)return e;a=hb(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],o=0;b=f[o++];)J(b,c,d)&&g.push(b);f=g}for(o=0;b=f[o++];)("*"!=a||"!"!=b.tagName)&&e.add(b);return e}ib(a,b,c,d,e);return e}
+function gb(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!w?(b=b.getElementsByName(d),t(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),t(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof M?ib(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),t(b,function(a){J(a,c,d)&&e.add(a)}));return e}
+function jb(a,b,c,d,e){var f;if((l||8==a.g||c&&a.g===k)&&(f=b.childNodes)){var g=hb(a);if("*"!=g&&(f=ia(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=ia(f,function(a){return J(a,c,d)}));t(f,function(a){("*"!=g||"!"!=a.tagName&&!("*"==g&&1!=a.nodeType))&&e.add(a)});return e}return kb(a,b,c,d,e)}function kb(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)J(b,c,d)&&a.matches(b)&&e.add(b);return e}
+function ib(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)J(b,c,d)&&a.matches(b)&&e.add(b),ib(a,b,c,d,e)}function hb(a){if(a instanceof M){if(8==a.g)return"!";if(a.g===k)return"*"}return a.getName()};function L(){this.h=this.e=k;this.r=0}function lb(a){this.j=a;this.next=this.p=k}function mb(a,b){if(a.e){if(!b.e)return a}else return b;for(var c=a.e,d=b.e,e=k,f=k,g=0;c&&d;)c.j==d.j||c.j instanceof db&&d.j instanceof db&&c.j.f==d.j.f?(f=c,c=c.next,d=d.next):0<Ia(c.j,d.j)?(f=d,d=d.next):(f=c,c=c.next),(f.p=e)?e.next=f:a.e=f,e=f,g++;for(f=c||d;f;)f.p=e,e=e.next=f,g++,f=f.next;a.h=e;a.r=g;return a}
+L.prototype.unshift=function(a){a=new lb(a);a.next=this.e;this.h?this.e.p=a:this.e=this.h=a;this.e=a;this.r++};L.prototype.add=function(a){a=new lb(a);a.p=this.h;this.e?this.h.next=a:this.e=this.h=a;this.h=a;this.r++};function nb(a){return(a=a.e)?a.j:k}L.prototype.n=m("r");function ob(a){return(a=nb(a))?I(a):""}function N(a,b){return new pb(a,!!b)}function pb(a,b){this.V=a;this.I=(this.t=b)?a.h:a.e;this.D=k}
+pb.prototype.next=function(){var a=this.I;if(a==k)return k;var b=this.D=a;this.I=this.t?a.p:a.next;return b.j};pb.prototype.remove=function(){var a=this.V,b=this.D;b||h(Error("Next must be called at least once before remove."));var c=b.p,b=b.next;c?c.next=b:a.e=b;b?b.p=c:a.h=c;a.r--;this.D=k};function O(a){this.d=a;this.c=this.i=l;this.s=k}O.prototype.b=m("i");O.prototype.l=m("s");function P(a,b){var c=a.evaluate(b);return c instanceof L?+ob(c):+c}function Q(a,b){var c=a.evaluate(b);return c instanceof L?ob(c):""+c}function R(a,b){var c=a.evaluate(b);return c instanceof L?!!c.n():!!c};function qb(a,b,c){O.call(this,a.d);this.H=a;this.L=b;this.P=c;this.i=b.b()||c.b();this.c=b.c||c.c;this.H==rb&&(!c.c&&!c.b()&&4!=c.d&&0!=c.d&&b.l()?this.s={name:b.l().name,q:c}:!b.c&&(!b.b()&&4!=b.d&&0!=b.d&&c.l())&&(this.s={name:c.l().name,q:b}))}q(qb,O);
+function S(a,b,c,d,e){var b=b.evaluate(d),c=c.evaluate(d),f;if(b instanceof L&&c instanceof L){f=N(b);for(b=f.next();b;b=f.next()){e=N(c);for(d=e.next();d;d=e.next())if(a(I(b),I(d)))return j}return l}if(b instanceof L||c instanceof L){b instanceof L?e=b:(e=c,c=b);e=N(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":f=+I(d);break;case "boolean":f=!!I(d);break;case "string":f=I(d);break;default:h(Error("Illegal primitive type for comparison."))}if(a(f,c))return j}return l}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)}qb.prototype.evaluate=function(a){return this.H.m(this.L,this.P,a)};qb.prototype.toString=function(a){var a=a||"",b=a+"binary expression: "+this.H+"\n",a=a+" ",b=b+(this.L.toString(a)+"\n");return b+=this.P.toString(a)};function sb(a,b,c,d){this.X=a;this.ca=b;this.d=c;this.m=d}sb.prototype.toString=m("X");var tb={};
+function T(a,b,c,d){a in tb&&h(Error("Binary operator already created: "+a));a=new sb(a,b,c,d);return tb[a.toString()]=a}T("div",6,1,function(a,b,c){return P(a,c)/P(b,c)});T("mod",6,1,function(a,b,c){return P(a,c)%P(b,c)});T("*",6,1,function(a,b,c){return P(a,c)*P(b,c)});T("+",5,1,function(a,b,c){return P(a,c)+P(b,c)});T("-",5,1,function(a,b,c){return P(a,c)-P(b,c)});T("<",4,2,function(a,b,c){return S(function(a,b){return a<b},a,b,c)});
+T(">",4,2,function(a,b,c){return S(function(a,b){return a>b},a,b,c)});T("<=",4,2,function(a,b,c){return S(function(a,b){return a<=b},a,b,c)});T(">=",4,2,function(a,b,c){return S(function(a,b){return a>=b},a,b,c)});var rb=T("=",3,2,function(a,b,c){return S(function(a,b){return a==b},a,b,c,j)});T("!=",3,2,function(a,b,c){return S(function(a,b){return a!=b},a,b,c,j)});T("and",2,2,function(a,b,c){return R(a,c)&&R(b,c)});T("or",1,2,function(a,b,c){return R(a,c)||R(b,c)});function ub(a,b){b.n()&&4!=a.d&&h(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));O.call(this,a.d);this.O=a;this.a=b;this.i=a.b();this.c=a.c}q(ub,O);ub.prototype.evaluate=function(a){a=this.O.evaluate(a);return vb(this.a,a)};ub.prototype.toString=function(a){var a=a||"",b=a+"Filter: \n",a=a+" ",b=b+this.O.toString(a);return b+=this.a.toString(a)};function wb(a,b){b.length<a.N&&h(Error("Function "+a.o+" expects at least"+a.N+" arguments, "+b.length+" given"));a.F!==k&&b.length>a.F&&h(Error("Function "+a.o+" expects at most "+a.F+" arguments, "+b.length+" given"));a.W&&t(b,function(b,d){4!=b.d&&h(Error("Argument "+d+" to function "+a.o+" is not of type Nodeset: "+b))});O.call(this,a.d);this.v=a;this.B=b;this.i=a.i||la(b,function(a){return a.b()});this.c=a.U&&!b.length||a.T&&!!b.length||la(b,function(a){return a.c})}q(wb,O);
+wb.prototype.evaluate=function(a){return this.v.m.apply(k,ma(a,this.B))};wb.prototype.toString=function(a){var b=a||"",a=b+"Function: "+this.v+"\n",b=b+" ";this.B.length&&(a+=b+"Arguments:",b+=" ",a=ka(this.B,function(a,d){return a+"\n"+d.toString(b)},a));return a};function xb(a,b,c,d,e,f,g,o,z){this.o=a;this.d=b;this.i=c;this.U=d;this.T=e;this.m=f;this.N=g;this.F=o!==i?o:g;this.W=!!z}xb.prototype.toString=m("o");var yb={};
+function U(a,b,c,d,e,f,g,o){a in yb&&h(Error("Function already created: "+a+"."));yb[a]=new xb(a,b,c,d,l,e,f,g,o)}U("boolean",2,l,l,function(a,b){return R(b,a)},1);U("ceiling",1,l,l,function(a,b){return Math.ceil(P(b,a))},1);U("concat",3,l,l,function(a,b){var c=oa(arguments,1);return ka(c,function(b,c){return b+Q(c,a)},"")},2,k);U("contains",2,l,l,function(a,b,c){b=Q(b,a);a=Q(c,a);return-1!=b.indexOf(a)},2);U("count",1,l,l,function(a,b){return b.evaluate(a).n()},1,1,j);U("false",2,l,l,aa(l),0);
+U("floor",1,l,l,function(a,b){return Math.floor(P(b,a))},1);
+U("id",4,l,l,function(a,b){function c(a){if(H){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length){var c;a:{c=function(b){return a==b.id};for(var d=b.length,f=p(b)?b.split(""):b,g=0;g<d;g++)if(g in f&&c.call(i,f[g])){c=g;break a}c=-1}return 0>c?k:p(b)?b.charAt(c):b[c]}}return k}return e.getElementById(a)}var d=a.f,e=9==d.nodeType?d:d.ownerDocument,d=Q(b,a).split(/\s+/),f=[];t(d,function(a){var a=c(a),b;if(b=a){a:if(p(f))b=!p(a)||1!=a.length?-1:f.indexOf(a,0);else{for(b=0;b<f.length;b++)if(b in
+f&&f[b]===a)break a;b=-1}b=!(0<=b)}b&&f.push(a)});f.sort(Ia);var g=new L;t(f,function(a){g.add(a)});return g},1);U("lang",2,l,l,aa(l),1);U("last",1,j,l,function(a){1!=arguments.length&&h(Error("Function last expects ()"));return a.h},0);U("local-name",3,l,j,function(a,b){var c=b?nb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,j);U("name",3,l,j,function(a,b){var c=b?nb(b.evaluate(a)):a.f;return c?c.nodeName.toLowerCase():""},0,1,j);U("namespace-uri",3,j,l,aa(""),0,1,j);
+U("normalize-space",3,l,j,function(a,b){return(b?Q(b,a):I(a.f)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);U("not",2,l,l,function(a,b){return!R(b,a)},1);U("number",1,l,j,function(a,b){return b?P(b,a):+I(a.f)},0,1);U("position",1,j,l,function(a){return a.Y},0);U("round",1,l,l,function(a,b){return Math.round(P(b,a))},1);U("starts-with",2,l,l,function(a,b,c){b=Q(b,a);a=Q(c,a);return 0==b.lastIndexOf(a,0)},2);U("string",3,l,j,function(a,b){return b?Q(b,a):I(a.f)},0,1);
+U("string-length",1,l,j,function(a,b){return(b?Q(b,a):I(a.f)).length},0,1);U("substring",3,l,l,function(a,b,c,d){c=P(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?P(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";var c=Math.round(c)-1,e=Math.max(c,0),a=Q(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);U("substring-after",3,l,l,function(a,b,c){b=Q(b,a);a=Q(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2);
+U("substring-before",3,l,l,function(a,b,c){b=Q(b,a);a=Q(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);U("sum",1,l,l,function(a,b){for(var c=N(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+I(e);return d},1,1,j);U("translate",3,l,l,function(a,b,c,d){for(var b=Q(b,a),c=Q(c,a),e=Q(d,a),a=[],d=0;d<c.length;d++){var f=c.charAt(d);f in a||(a[f]=e.charAt(d))}c="";for(d=0;d<b.length;d++)f=b.charAt(d),c+=f in a?a[f]:f;return c},3);U("true",2,l,l,aa(j),0);function M(a,b){this.R=a;this.M=b!==i?b:k;this.g=k;switch(a){case "comment":this.g=8;break;case "text":this.g=3;break;case "processing-instruction":this.g=7;break;case "node":break;default:h(Error("Unexpected argument"))}}M.prototype.matches=function(a){return this.g===k||this.g==a.nodeType};M.prototype.getName=m("R");M.prototype.toString=function(a){var a=a||"",b=a+"kindtest: "+this.R;this.M===k||(b+="\n"+this.M.toString(a+" "));return b};function zb(a){O.call(this,3);this.Q=a.substring(1,a.length-1)}q(zb,O);zb.prototype.evaluate=m("Q");zb.prototype.toString=function(a){return(a||"")+"literal: "+this.Q};function Ab(a){O.call(this,1);this.S=a}q(Ab,O);Ab.prototype.evaluate=m("S");Ab.prototype.toString=function(a){return(a||"")+"number: "+this.S};function Bb(a,b){O.call(this,a.d);this.K=a;this.u=b;this.i=a.b();this.c=a.c;if(1==this.u.length){var c=this.u[0];!c.C&&c.k==Cb&&(c=c.A,"*"!=c.getName()&&(this.s={name:c.getName(),q:k}))}}q(Bb,O);function Db(){O.call(this,4)}q(Db,O);Db.prototype.evaluate=function(a){var b=new L,a=a.f;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Db.prototype.toString=function(a){return a+"RootHelperExpr"};function Eb(){O.call(this,4)}q(Eb,O);Eb.prototype.evaluate=function(a){var b=new L;b.add(a.f);return b};
+Eb.prototype.toString=function(a){return a+"ContextHelperExpr"};
+Bb.prototype.evaluate=function(a){var b=this.K.evaluate(a);b instanceof L||h(Error("FilterExpr must evaluate to nodeset."));for(var a=this.u,c=0,d=a.length;c<d&&b.n();c++){var e=a[c],f=N(b,e.k.t),g;if(!e.b()&&e.k==Fb){for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new G(g))}else if(!e.b()&&e.k==Gb)g=f.next(),b=e.evaluate(new G(g));else{g=f.next();for(b=e.evaluate(new G(g));(g=f.next())!=k;)g=e.evaluate(new G(g)),b=mb(b,g)}}return b};
+Bb.prototype.toString=function(a){var b=a||"",c=b+"PathExpr:\n",b=b+" ",c=c+this.K.toString(b);this.u.length&&(c+=b+"Steps:\n",b+=" ",t(this.u,function(a){c+=a.toString(b)}));return c};function V(a,b){this.a=a;this.t=!!b}function vb(a,b,c){for(c=c||0;c<a.a.length;c++)for(var d=a.a[c],e=N(b),f=b.n(),g,o=0;g=e.next();o++){var z=a.t?f-o:o+1;g=d.evaluate(new G(g,z,f));var A;"number"==typeof g?A=z==g:"string"==typeof g||"boolean"==typeof g?A=!!g:g instanceof L?A=0<g.n():h(Error("Predicate.evaluate returned an unexpected type."));A||e.remove()}return b}V.prototype.l=function(){return 0<this.a.length?this.a[0].l():k};
+V.prototype.b=function(){for(var a=0;a<this.a.length;a++){var b=this.a[a];if(b.b()||1==b.d||0==b.d)return j}return l};V.prototype.n=function(){return this.a.length};V.prototype.toString=function(a){var b=a||"",a=b+"Predicates:",b=b+" ";return ka(this.a,function(a,d){return a+"\n"+b+d.toString(b)},a)};function W(a,b,c,d){O.call(this,4);this.k=a;this.A=b;this.a=c||new V([]);this.C=!!d;b=this.a.l();a.Z&&b&&(a=b.name,a=H?a.toLowerCase():a,this.s={name:a,q:b.q});this.i=this.a.b()}q(W,O);
+W.prototype.evaluate=function(a){var b=a.f,c=k,c=this.l(),d=k,e=k,f=0;c&&(d=c.name,e=c.q?Q(c.q,a):k,f=1);if(this.C)if(!this.b()&&this.k==Hb)c=K(this.A,b,d,e),c=vb(this.a,c,f);else if(a=N((new W(Ib,new M("node"))).evaluate(a)),b=a.next())for(c=this.m(b,d,e,f);(b=a.next())!=k;)c=mb(c,this.m(b,d,e,f));else c=new L;else c=this.m(a.f,d,e,f);return c};W.prototype.m=function(a,b,c,d){a=this.k.v(this.A,a,b,c);return a=vb(this.a,a,d)};
+W.prototype.toString=function(a){var a=a||"",b=a+"Step: \n",a=a+" ",b=b+(a+"Operator: "+(this.C?"//":"/")+"\n");this.k.o&&(b+=a+"Axis: "+this.k+"\n");b+=this.A.toString(a);if(this.a.length)for(var b=b+(a+"Predicates: \n"),c=0;c<this.a.length;c++)var d=c<this.a.length-1?", ":"",b=b+(this.a[c].toString(a)+d);return b};function Jb(a,b,c,d){this.o=a;this.v=b;this.t=c;this.Z=d}Jb.prototype.toString=m("o");var Kb={};
+function X(a,b,c,d){a in Kb&&h(Error("Axis already created: "+a));b=new Jb(a,b,c,!!d);return Kb[a]=b}X("ancestor",function(a,b){for(var c=new L,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},j);X("ancestor-or-self",function(a,b){var c=new L,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},j);
+var Cb=X("attribute",function(a,b){var c=new L,d=a.getName();if("style"==d&&b.style&&H)return c.add(new db(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof M&&a.g===k||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)H?g.nodeValue&&c.add(eb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(H?g.nodeValue&&c.add(eb(b,g,b.sourceIndex)):c.add(g));return c},l),Hb=X("child",function(a,b,c,d,e){return(H?jb:kb).call(k,a,b,p(c)?c:k,p(d)?d:k,e||new L)},l,j);
+X("descendant",K,l,j);var Ib=X("descendant-or-self",function(a,b,c,d){var e=new L;J(b,c,d)&&a.matches(b)&&e.add(b);return K(a,b,c,d,e)},l,j),Fb=X("following",function(a,b,c,d){var e=new L;do for(var f=b;f=f.nextSibling;)J(f,c,d)&&a.matches(f)&&e.add(f),e=K(a,f,c,d,e);while(b=b.parentNode);return e},l,j);X("following-sibling",function(a,b){for(var c=new L,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},l);X("namespace",function(){return new L},l);
+X("parent",function(a,b){var c=new L;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},l);var Gb=X("preceding",function(a,b,c,d){var e=new L,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,o=f.length;g<o;g++){for(var z=[],b=f[g];b=b.previousSibling;)z.unshift(b);for(var A=0,na=z.length;A<na;A++)b=z[A],J(b,c,d)&&a.matches(b)&&e.add(b),e=K(a,b,c,d,e)}return e},j,j);
+X("preceding-sibling",function(a,b){for(var c=new L,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},j);X("self",function(a,b){var c=new L;a.matches(b)&&c.add(b);return c},l);function Lb(a){O.call(this,1);this.J=a;this.i=a.b();this.c=a.c}q(Lb,O);Lb.prototype.evaluate=function(a){return-P(this.J,a)};Lb.prototype.toString=function(a){var a=a||"",b=a+"UnaryExpr: -\n";return b+=this.J.toString(a+" ")};function Mb(a){O.call(this,4);this.w=a;this.i=la(this.w,function(a){return a.b()});this.c=la(this.w,function(a){return a.c})}q(Mb,O);Mb.prototype.evaluate=function(a){var b=new L;t(this.w,function(c){c=c.evaluate(a);c instanceof L||h(Error("PathExpr must evaluate to NodeSet."));b=mb(b,c)});return b};Mb.prototype.toString=function(a){var b=a||"",c=b+"UnionExpr:\n",b=b+" ";t(this.w,function(a){c+=a.toString(b)+"\n"});return c.substring(0,c.length)};!ua&&(!va||$a("533"));function Nb(){return r.top};function Ob(){this.z=i}
+function Pb(a,b,c){switch(typeof b){case "string":Qb(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==k){c.push("null");break}if("array"==ba(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Pb(a,a.z?a.z.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Qb(f,
+c),c.push(":"),Pb(a,a.z?a.z.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:h(Error("Unknown type: "+typeof b))}}var Rb={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Sb=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
+function Qb(a,b){b.push('"',a.replace(Sb,function(a){if(a in Rb)return Rb[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Rb[a]=e+b.toString(16)}),'"')};va||ua||x&&$a(3.5)||w&&$a(8);function Tb(a){switch(ba(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ja(a,Tb);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Ub(a);return b}if("document"in a)return b={},b.WINDOW=Ub(a),b;var c=ba(a);if("array"==c||"object"==c&&"number"==typeof a.length)return ja(a,Tb);var c=function(a,b){return"number"==typeof b||p(b)},d={};for(b in a)c.call(i,0,b)&&(d[b]=a[b]);return Ga(d,Tb);default:return k}}
+function Vb(a,b){var c;"array"==ba(a)?c=ja(a,function(a){return Vb(a,b)}):(c=typeof a,c="object"==c&&a!=k||"function"==c?"function"==typeof a?a:"ELEMENT"in a?Wb(a.ELEMENT,b):"WINDOW"in a?Wb(a.WINDOW,b):Ga(a,function(a){return Vb(a,b)}):a);return c}function Xb(a){var a=a||document,b=a.$wdc_;b||(b=a.$wdc_={},b.G=ca());b.G||(b.G=ca());return b}
+function Ub(a){var b=Xb(a.ownerDocument),c;a:{c=function(b){return b==a};for(var d in b)if(c.call(i,b[d])){c=d;break a}c=i}c||(c=":wdc:"+b.G++,b[c]=a);return c}
+function Wb(a,b){var a=decodeURIComponent(a),c=b||document,d=Xb(c);a in d||h(new F(10,"Element does not exist in cache"));var e=d[a];if("setInterval"in e)return e.closed&&(delete d[a],h(new F(23,"Window has been closed."))),e;for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];h(new F(10,"Element is no longer attached to the DOM"))};function Yb(){var a=Nb,b=[],c;try{var a=p(a)?new r.Function(a):r==window?a:new r.Function("return ("+a+").apply(null,arguments);"),d=Vb(b,r.document),e=a.apply(k,d);c={status:0,value:Tb(e)}}catch(f){c={status:"code"in f?f.code:13,value:{message:f.message}}}a=[];Pb(new Ob,c,a);return a.join("")}var Y=["_"],Z=n;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)!Y.length&&Yb!==i?Z[$]=Yb:Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null}, arguments);}
View
4,407 src/third_party/webdriver-atoms/deps.js
4,293 additions, 114 deletions not shown
View
224 src/third_party/webdriver-atoms/double_click.js
116 additions, 108 deletions not shown
View
222 src/third_party/webdriver-atoms/drag.js
115 additions, 107 deletions not shown
View
31 src/third_party/webdriver-atoms/execute_async_script.js
@@ -1,16 +1,15 @@
-function(){return function(){var i=void 0,k=!0,m=!1,n=this;
-function o(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 aa(a){var b=o(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){a=o(a);return"object"==a||"array"==a||"function"==a}function ca(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var p=Date.now||function(){return+new Date};
-function q(a,b){function c(){}c.prototype=b.prototype;a.d=b.prototype;a.prototype=new c};function da(a,b){for(var c=1;c<arguments.length;c++)var d=(""+arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a}
-function r(a,b){for(var c=0,d=(""+a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=(""+b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=Math.max(d.length,f.length),l=0;0==c&&l<e;l++){var t=d[l]||"",g=f[l]||"",C=RegExp("(\\d*)(\\D*)","g"),D=RegExp("(\\d*)(\\D*)","g");do{var j=C.exec(t)||["","",""],h=D.exec(g)||["","",""];if(0==j[0].length&&0==h[0].length)break;c=((0==j[1].length?0:parseInt(j[1],10))<(0==h[1].length?0:parseInt(h[1],10))?-1:(0==j[1].length?0:parseInt(j[1],10))>(0==h[1].length?
-0:parseInt(h[1],10))?1:0)||((0==j[2].length)<(0==h[2].length)?-1:(0==j[2].length)>(0==h[2].length)?1:0)||(j[2]<h[2]?-1:j[2]>h[2]?1:0)}while(0==c)}return c};var s,u,v,w;function x(){return n.navigator?n.navigator.userAgent:null}w=v=u=s=m;var y;if(y=x()){var ea=n.navigator;s=0==y.indexOf("Opera");u=!s&&-1!=y.indexOf("MSIE");v=!s&&-1!=y.indexOf("WebKit");w=!s&&!v&&"Gecko"==ea.product}var z=s,A=u,B=w,fa=v,E;
-a:{var F="",G;if(z&&n.opera)var H=n.opera.version,F="function"==typeof H?H():H;else if(B?G=/rv\:([^\);]+)(\)|;)/:A?G=/MSIE\s+([^\);]+)(\)|;)/:fa&&(G=/WebKit\/(\S+)/),G)var ga=G.exec(x()),F=ga?ga[1]:"";if(A){var I,ha=n.document;I=ha?ha.documentMode:i;if(I>parseFloat(F)){E=""+I;break a}}E=F}var ia={};function J(a){return ia[a]||(ia[a]=0<=r(E,a))}var ja={};function ka(){return ja[9]||(ja[9]=A&&document.documentMode&&9<=document.documentMode)};function la(a,b){var c={},d;for(d in a)b.call(i,a[d],d,a)&&(c[d]=a[d]);return c}function ma(a,b){var c={},d;for(d in a)c[d]=b.call(i,a[d],d,a);return c}function na(a,b){for(var c in a)if(b.call(i,a[c],c,a))return c}function oa(a){var b=arguments.length;if(1==b&&"array"==o(arguments[0]))return oa.apply(null,arguments[0]);if(b%2)throw Error("Uneven number of arguments");for(var c={},d=0;d<b;d+=2)c[arguments[d]]=arguments[d+1];return c};var K=0,L=13;function M(a,b){this.code=a;this.message=b||"";this.name=pa[a]||pa[L];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}q(M,Error);
-var pa=oa(7,"NoSuchElementError",8,"NoSuchFrameError",9,"UnknownCommandError",10,"StaleElementReferenceError",11,"ElementNotVisibleError",12,"InvalidElementStateError",L,"UnknownError",15,"ElementNotSelectableError",19,"XPathLookupError",23,"NoSuchWindowError",24,"InvalidCookieDomainError",25,"UnableToSetCookieError",26,"ModalDialogOpenedError",27,"NoModalDialogOpenError",28,"ScriptTimeoutError",32,"InvalidSelectorError",35,"SqlDatabaseError",34,"MoveTargetOutOfBoundsError");
-M.prototype.toString=function(){return"["+this.name+"] "+this.message};var N,O,P,Q,R,S,T;T=S=R=Q=P=O=N=m;var U=x();U&&(-1!=U.indexOf("Firefox")?N=k:-1!=U.indexOf("Camino")?O=k:-1!=U.indexOf("iPhone")||-1!=U.indexOf("iPod")?P=k:-1!=U.indexOf("iPad")?Q=k:-1!=U.indexOf("Android")?R=k:-1!=U.indexOf("Chrome")?S=k:-1!=U.indexOf("Safari")&&(T=k));var qa=O,ra=P,sa=Q,ta=R,ua=S,va=T;a:{var V;if(N)V=/Firefox\/([0-9.]+)/;else{if(A||z)break a;ua?V=/Chrome\/([0-9.]+)/:va?V=/Version\/([0-9.]+)/:ra||sa?V=/Version\/(\S+).*Mobile\/(\S+)/:ta?V=/Android\s+([0-9.]+)(?:.*Version\/([0-9.]+))?/:qa&&(V=/Camino\/([0-9.]+)/)}V&&V.exec(x())};var wa,xa=function(){if(!B)return m;var a=n.Components;if(!a)return m;try{if(!a.classes)return m}catch(b){return m}var c=a.classes,a=a.interfaces,d=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),f=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo).platformVersion;wa=function(a){return 0<=d.c(f,""+a)};return k}();function ya(){this.a=i}
-function za(a,b,c){switch(typeof b){case "string":Aa(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==o(b)){var d=b.length;c.push("[");for(var f="",e=0;e<d;e++)c.push(f),f=b[e],za(a,a.a?a.a.call(b,""+e,f):f,c),f=",";c.push("]");break}c.push("{");d="";for(e in b)Object.prototype.hasOwnProperty.call(b,e)&&(f=b[e],"function"!=typeof f&&(c.push(d),Aa(e,
-c),c.push(":"),za(a,a.a?a.a.call(b,e,f):f,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Ba={'"':'\\"',"\\":"\\\\","/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ca=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
-function Aa(a,b){b.push('"',a.replace(Ca,function(a){if(a in Ba)return Ba[a];var b=a.charCodeAt(0),f="\\u";16>b?f+="000":256>b?f+="00":4096>b&&(f+="0");return Ba[a]=f+b.toString(16)}),'"')};fa||z||B&&(xa?wa(3.5):A?0<=r(document.documentMode,3.5):J(3.5))||A&&(xa?wa(8):A?r(document.documentMode,8):J(8));function W(a){this.stack=Error().stack||"";a&&(this.message=""+a)}q(W,Error);W.prototype.name="CustomError";function Da(a,b){b.unshift(a);W.call(this,da.apply(null,b));b.shift()}q(Da,W);Da.prototype.name="AssertionError";function Ea(a,b){for(var c=a.length,d=Array(c),f="string"==typeof a?a.split(""):a,e=0;e<c;e++)e in f&&(d[e]=b.call(i,f[e],e,a));return d};!A||ka();!B&&!A||A&&ka()||B&&J("1.9.1");A&&J("9");function X(a){switch(o(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ea(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Fa(a);return b}if("document"in a)return b={},b.WINDOW=Fa(a),b;if(aa(a))return Ea(a,X);a=la(a,function(a,b){return"number"==typeof b||"string"==typeof b});return ma(a,X);default:return null}}
-function Ga(a,b){return"array"==o(a)?Ea(a,function(a){return Ga(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Ha(a.ELEMENT,b):"WINDOW"in a?Ha(a.WINDOW,b):ma(a,function(a){return Ga(a,b)}):a}function Ia(a){var a=a||document,b=a.$wdc_;b||(b=a.$wdc_={},b.b=p());b.b||(b.b=p());return b}function Fa(a){var b=Ia(a.ownerDocument),c=na(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c}
-function Ha(a,b){var a=decodeURIComponent(a),c=b||document,d=Ia(c);if(!(a in d))throw new M(10,"Element does not exist in cache");var f=d[a];if("setInterval"in f){if(f.closed)throw delete d[a],new M(23,"Window has been closed.");return f}for(var e=f;e;){if(e==c.documentElement)return f;e=e.parentNode}delete d[a];throw new M(10,"Element is no longer attached to the DOM");};function Ja(a,b,c,d,f,e){function l(a,b){if(!D){g.removeEventListener?g.removeEventListener("unload",t,k):g.detachEvent("onunload",t);g.clearTimeout(C);if(a!=K){var c=new M(a,b.message||b+"");c.stack=b.stack;b={status:"code"in c?c.code:L,value:{message:c.message}}}else b={status:K,value:X(b)};var c=d,e;f?(e=[],za(new ya,b,e),e=e.join("")):e=b;c(e);D=k}}function t(){l(L,Error("Detected a page unload event; asynchronous script execution does not work across page loads."))}var g=e||window,C,D=m,e=ca(l,
-L);if(g.closed)return e("Unable to execute script; the target window is closed.");a="string"==typeof a?new g.Function(a):g==window?a:new g.Function("return ("+a+").apply(null,arguments);");b=Ga(b,g.document);b.push(ca(l,K));g.addEventListener?g.addEventListener("unload",t,k):g.attachEvent("onunload",t);var j=p();try{a.apply(g,b),C=g.setTimeout(function(){l(28,Error("Timed out waiting for asyncrhonous script result after "+(p()-j)+" ms"))},Math.max(0,c))}catch(h){l(h.code||L,h)}}var Y=["_"],Z=n;
-!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)!Y.length&&Ja!==i?Z[$]=Ja:Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null}, arguments);}
+function(){return function(){var i=void 0,k=!0,m=null,n=!1,o=this;
+function p(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 aa(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var q=Date.now||function(){return+new Date};function r(a,b){function c(){}c.prototype=b.prototype;a.e=b.prototype;a.prototype=new c};function ba(a,b){var c={},d;for(d in a)c[d]=b.call(i,a[d],d,a);return c}function ca(a){var b=arguments.length;if(1==b&&"array"==p(arguments[0]))return ca.apply(m,arguments[0]);if(b%2)throw Error("Uneven number of arguments");for(var c={},d=0;d<b;d+=2)c[arguments[d]]=arguments[d+1];return c};var s=0,t=13;function v(a,b){this.code=a;this.message=b||"";this.name=da[a]||da[t];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}r(v,Error);
+var da=ca(7,"NoSuchElementError",8,"NoSuchFrameError",9,"UnknownCommandError",10,"StaleElementReferenceError",11,"ElementNotVisibleError",12,"InvalidElementStateError",t,"UnknownError",15,"ElementNotSelectableError",19,"XPathLookupError",23,"NoSuchWindowError",24,"InvalidCookieDomainError",25,"UnableToSetCookieError",26,"ModalDialogOpenedError",27,"NoModalDialogOpenError",28,"ScriptTimeoutError",32,"InvalidSelectorError",35,"SqlDatabaseError",34,"MoveTargetOutOfBoundsError");
+v.prototype.toString=function(){return"["+this.name+"] "+this.message};function ea(a,b){for(var c=1;c<arguments.length;c++)var d=String(arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a}
+function w(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=Math.max(d.length,f.length),l=0;0==c&&l<e;l++){var u=d[l]||"",g=f[l]||"",F=RegExp("(\\d*)(\\D*)","g"),G=RegExp("(\\d*)(\\D*)","g");do{var j=F.exec(u)||["","",""],h=G.exec(g)||["","",""];if(0==j[0].length&&0==h[0].length)break;c=((0==j[1].length?0:parseInt(j[1],10))<(0==h[1].length?0:parseInt(h[1],10))?-1:(0==j[1].length?0:parseInt(j[1],10))>(0==h[1].length?
+0:parseInt(h[1],10))?1:0)||((0==j[2].length)<(0==h[2].length)?-1:(0==j[2].length)>(0==h[2].length)?1:0)||(j[2]<h[2]?-1:j[2]>h[2]?1:0)}while(0==c)}return c};var x,y,z,A;function B(){return o.navigator?o.navigator.userAgent:m}A=z=y=x=n;var C;if(C=B()){var fa=o.navigator;x=0==C.indexOf("Opera");y=!x&&-1!=C.indexOf("MSIE");z=!x&&-1!=C.indexOf("WebKit");A=!x&&!z&&"Gecko"==fa.product}var D=x,E=y,H=A,ga=z,I;
+a:{var J="",K;if(D&&o.opera)var L=o.opera.version,J="function"==typeof L?L():L;else if(H?K=/rv\:([^\);]+)(\)|;)/:E?K=/MSIE\s+([^\);]+)(\)|;)/:ga&&(K=/WebKit\/(\S+)/),K)var ha=K.exec(B()),J=ha?ha[1]:"";if(E){var M,ia=o.document;M=ia?ia.documentMode:i;if(M>parseFloat(J)){I=String(M);break a}}I=J}var ja={};function N(a){return ja[a]||(ja[a]=0<=w(I,a))}var ka={};function la(){return ka[9]||(ka[9]=E&&!!document.documentMode&&9<=document.documentMode)};var O,P,Q,R,S,T,ma;ma=T=S=R=Q=P=O=n;var U=B();U&&(-1!=U.indexOf("Firefox")?O=k:-1!=U.indexOf("Camino")?P=k:-1!=U.indexOf("iPhone")||-1!=U.indexOf("iPod")?Q=k:-1!=U.indexOf("iPad")?R=k:-1!=U.indexOf("Android")?S=k:-1!=U.indexOf("Chrome")?T=k:-1!=U.indexOf("Safari")&&(ma=k));var na=O,oa=P,pa=Q,qa=R,ra=S,sa=T,ta=ma;function V(a){return(a=a.exec(B()))?a[1]:""}(function(){if(na)return V(/Firefox\/([0-9.]+)/);if(E||D)return I;if(sa)return V(/Chrome\/([0-9.]+)/);if(ta)return V(/Version\/([0-9.]+)/);if(pa||qa){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(B());if(a)return a[1]+"."+a[2]}else{if(ra)return(a=V(/Android\s+([0-9.]+)/))?a:V(/Version\/([0-9.]+)/);if(oa)return V(/Camino\/([0-9.]+)/)}return""})();var ua,va=function(){if(!H)return n;var a=o.Components;if(!a)return n;try{if(!a.classes)return n}catch(b){return n}var c=a.classes,a=a.interfaces,d=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),f=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo).platformVersion;ua=function(a){return 0<=d.c(f,""+a)};return k}();function wa(){this.a=i}
+function xa(a,b,c){switch(typeof b){case "string":ya(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==m){c.push("null");break}if("array"==p(b)){var d=b.length;c.push("[");for(var f="",e=0;e<d;e++)c.push(f),f=b[e],xa(a,a.a?a.a.call(b,String(e),f):f,c),f=",";c.push("]");break}c.push("{");d="";for(e in b)Object.prototype.hasOwnProperty.call(b,e)&&(f=b[e],"function"!=typeof f&&(c.push(d),ya(e,
+c),c.push(":"),xa(a,a.a?a.a.call(b,e,f):f,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var za={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Aa=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
+function ya(a,b){b.push('"',a.replace(Aa,function(a){if(a in za)return za[a];var b=a.charCodeAt(0),f="\\u";16>b?f+="000":256>b?f+="00":4096>b&&(f+="0");return za[a]=f+b.toString(16)}),'"')};ga||D||H&&(va?ua(3.5):E?0<=w(document.documentMode,3.5):N(3.5))||E&&(va?ua(8):E?w(document.documentMode,8):N(8));function W(a){Error.captureStackTrace?Error.captureStackTrace(this,W):this.stack=Error().stack||"";a&&(this.message=String(a))}r(W,Error);W.prototype.name="CustomError";function Ba(a,b){b.unshift(a);W.call(this,ea.apply(m,b));b.shift();this.d=a}r(Ba,W);Ba.prototype.name="AssertionError";function Ca(a,b){for(var c=a.length,d=Array(c),f="string"==typeof a?a.split(""):a,e=0;e<c;e++)e in f&&(d[e]=b.call(i,f[e],e,a));return d};!E||la();!H&&!E||E&&la()||H&&N("1.9.1");E&&N("9");function X(a){switch(p(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Ca(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Da(a);return b}if("document"in a)return b={},b.WINDOW=Da(a),b;var c=p(a);if("array"==c||"object"==c&&"number"==typeof a.length)return Ca(a,X);var c=function(a,b){return"number"==typeof b||"string"==typeof b},d={};for(b in a)c.call(i,0,b)&&(d[b]=a[b]);return ba(d,X);default:return m}}
+function Ea(a,b){var c;"array"==p(a)?c=Ca(a,function(a){return Ea(a,b)}):(c=typeof a,c="object"==c&&a!=m||"function"==c?"function"==typeof a?a:"ELEMENT"in a?Fa(a.ELEMENT,b):"WINDOW"in a?Fa(a.WINDOW,b):ba(a,function(a){return Ea(a,b)}):a);return c}function Ga(a){var a=a||document,b=a.$wdc_;b||(b=a.$wdc_={},b.b=q());b.b||(b.b=q());return b}function Da(a){var b=Ga(a.ownerDocument),c;a:{c=function(b){return b==a};for(var d in b)if(c.call(i,b[d])){c=d;break a}c=i}c||(c=":wdc:"+b.b++,b[c]=a);return c}
+function Fa(a,b){var a=decodeURIComponent(a),c=b||document,d=Ga(c);if(!(a in d))throw new v(10,"Element does not exist in cache");var f=d[a];if("setInterval"in f){if(f.closed)throw delete d[a],new v(23,"Window has been closed.");return f}for(var e=f;e;){if(e==c.documentElement)return f;e=e.parentNode}delete d[a];throw new v(10,"Element is no longer attached to the DOM");};function Ha(a,b,c,d,f,e){function l(a,b){if(!G){g.removeEventListener?g.removeEventListener("unload",u,k):g.detachEvent("onunload",u);g.clearTimeout(F);if(a!=s){var c=new v(a,b.message||b+"");c.stack=b.stack;b={status:"code"in c?c.code:t,value:{message:c.message}}}else b={status:s,value:X(b)};var c=d,e;f?(e=[],xa(new wa,b,e),e=e.join("")):e=b;c(e);G=k}}function u(){l(t,Error("Detected a page unload event; asynchronous script execution does not work across page loads."))}var g=e||window,F,G=n,e=aa(l,
+t);if(g.closed)e("Unable to execute script; the target window is closed.");else{a="string"==typeof a?new g.Function(a):g==window?a:new g.Function("return ("+a+").apply(null,arguments);");b=Ea(b,g.document);b.push(aa(l,s));g.addEventListener?g.addEventListener("unload",u,k):g.attachEvent("onunload",u);var j=q();try{a.apply(g,b),F=g.setTimeout(function(){l(28,Error("Timed out waiting for asyncrhonous script result after "+(q()-j)+" ms"))},Math.max(0,c))}catch(h){l(h.code||t,h)}}}var Y=["_"],Z=o;
+!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());){var Ia;if(Ia=!Y.length)Ia=Ha!==i;Ia?Z[$]=Ha:Z=Z[$]?Z[$]:Z[$]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null}, arguments);}
View
26 src/third_party/webdriver-atoms/execute_script.js
@@ -1,13 +1,13 @@
-function(){return function(){var g=void 0,j=!0,k=!1,l=this;
-function m(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 aa(a){var b=m(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){a=m(a);return"object"==a||"array"==a||"function"==a}var n=Date.now||function(){return+new Date};function o(a,b){function c(){}c.prototype=b.prototype;a.d=b.prototype;a.prototype=new c};function ca(a,b){for(var c=1;c<arguments.length;c++)var d=(""+arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a}
-function p(a,b){for(var c=0,d=(""+a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=(""+b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),q=0;0==c&&q<f;q++){var t=d[q]||"",sa=e[q]||"",ta=RegExp("(\\d*)(\\D*)","g"),ua=RegExp("(\\d*)(\\D*)","g");do{var h=ta.exec(t)||["","",""],i=ua.exec(sa)||["","",""];if(0==h[0].length&&0==i[0].length)break;c=((0==h[1].length?0:parseInt(h[1],10))<(0==i[1].length?0:parseInt(i[1],10))?-1:(0==h[1].length?0:parseInt(h[1],10))>(0==i[1].length?
-0:parseInt(i[1],10))?1:0)||((0==h[2].length)<(0==i[2].length)?-1:(0==h[2].length)>(0==i[2].length)?1:0)||(h[2]<i[2]?-1:h[2]>i[2]?1:0)}while(0==c)}return c};var r,s,u,v;function w(){return l.navigator?l.navigator.userAgent:null}v=u=s=r=k;var x;if(x=w()){var da=l.navigator;r=0==x.indexOf("Opera");s=!r&&-1!=x.indexOf("MSIE");u=!r&&-1!=x.indexOf("WebKit");v=!r&&!u&&"Gecko"==da.product}var y=r,z=s,A=v,ea=u,B;
-a:{var C="",D;if(y&&l.opera)var E=l.opera.version,C="function"==typeof E?E():E;else if(A?D=/rv\:([^\);]+)(\)|;)/:z?D=/MSIE\s+([^\);]+)(\)|;)/:ea&&(D=/WebKit\/(\S+)/),D)var fa=D.exec(w()),C=fa?fa[1]:"";if(z){var F,ga=l.document;F=ga?ga.documentMode:g;if(F>parseFloat(C)){B=""+F;break a}}B=C}var ha={};function G(a){return ha[a]||(ha[a]=0<=p(B,a))}var ia={};function ja(){return ia[9]||(ia[9]=z&&document.documentMode&&9<=document.documentMode)};var ka=window;function la(a,b){var c={},d;for(d in a)b.call(g,a[d],d,a)&&(c[d]=a[d]);return c}function ma(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c}function na(a,b){for(var c in a)if(b.call(g,a[c],c,a))return c};function H(a,b){this.code=a;this.message=b||"";this.name=oa[a]||oa[13];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}o(H,Error);
-var oa={7:"NoSuchElementError",8:"NoSuchFrameError",9:"UnknownCommandError",10:"StaleElementReferenceError",11:"ElementNotVisibleError",12:"InvalidElementStateError",13:"UnknownError",15:"ElementNotSelectableError",19:"XPathLookupError",23:"NoSuchWindowError",24:"InvalidCookieDomainError",25:"UnableToSetCookieError",26:"ModalDialogOpenedError",27:"NoModalDialogOpenError",28:"ScriptTimeoutError",32:"InvalidSelectorError",35:"SqlDatabaseError",34:"MoveTargetOutOfBoundsError"};
-H.prototype.toString=function(){return"["+this.name+"] "+this.message};var I,J,K,L,M,N,O;O=N=M=L=K=J=I=k;var P=w();P&&(-1!=P.indexOf("Firefox")?I=j:-1!=P.indexOf("Camino")?J=j:-1!=P.indexOf("iPhone")||-1!=P.indexOf("iPod")?K=j:-1!=P.indexOf("iPad")?L=j:-1!=P.indexOf("Android")?M=j:-1!=P.indexOf("Chrome")?N=j:-1!=P.indexOf("Safari")&&(O=j));var pa=J,qa=K,ra=L,va=M,wa=N,xa=O;a:{var Q;if(I)Q=/Firefox\/([0-9.]+)/;else{if(z||y)break a;wa?Q=/Chrome\/([0-9.]+)/:xa?Q=/Version\/([0-9.]+)/:qa||ra?Q=/Version\/(\S+).*Mobile\/(\S+)/:va?Q=/Android\s+([0-9.]+)(?:.*Version\/([0-9.]+))?/:pa&&(Q=/Camino\/([0-9.]+)/)}Q&&Q.exec(w())};var R,ya=function(){if(!A)return k;var a=l.Components;if(!a)return k;try{if(!a.classes)return k}catch(b){return k}var c=a.classes,a=a.interfaces,d=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),e=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo).platformVersion;R=function(a){return 0<=d.c(e,""+a)};return j}();function za(){this.a=g}
-function S(a,b,c){switch(typeof b){case "string":Aa(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==m(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],S(a,a.a?a.a.call(b,""+f,e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Aa(f,c),
-c.push(":"),S(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var T={'"':'\\"',"\\":"\\\\","/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ba=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
-function Aa(a,b){b.push('"',a.replace(Ba,function(a){if(a in T)return T[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return T[a]=e+b.toString(16)}),'"')};ea||y||A&&(ya?R(3.5):z?0<=p(document.documentMode,3.5):G(3.5))||z&&(ya?R(8):z?p(document.documentMode,8):G(8));function U(a){this.stack=Error().stack||"";a&&(this.message=""+a)}o(U,Error);U.prototype.name="CustomError";function Ca(a,b){b.unshift(a);U.call(this,ca.apply(null,b));b.shift()}o(Ca,U);Ca.prototype.name="AssertionError";function V(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d};!z||ja();!A&&!z||z&&ja()||A&&G("1.9.1");z&&G("9");function W(a){switch(m(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return V(a,W);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Da(a);return b}if("document"in a)return b={},b.WINDOW=Da(a),b;if(aa(a))return V(a,W);a=la(a,function(a,b){return"number"==typeof b||"string"==typeof b});return ma(a,W);default:return null}}
-function X(a,b){return"array"==m(a)?V(a,function(a){return X(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Ea(a.ELEMENT,b):"WINDOW"in a?Ea(a.WINDOW,b):ma(a,function(a){return X(a,b)}):a}function Fa(a){var a=a||document,b=a.$wdc_;b||(b=a.$wdc_={},b.b=n());b.b||(b.b=n());return b}function Da(a){var b=Fa(a.ownerDocument),c=na(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c}
-function Ea(a,b){var a=decodeURIComponent(a),c=b||document,d=Fa(c);if(!(a in d))throw new H(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new H(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new H(10,"Element is no longer attached to the DOM");};function Ga(a,b,c,d){var d=d||ka,e;try{var a="string"==typeof a?new d.Function(a):d==window?a:new d.Function("return ("+a+").apply(null,arguments);"),f=X(b,d.document),q=a.apply(null,f);e={status:0,value:W(q)}}catch(t){e={status:"code"in t?t.code:13,value:{message:t.message}}}c&&(a=[],S(new za,e,a),e=a.join(""));return e}var Y=["_"],Z=l;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)!Y.length&&Ga!==g?Z[$]=Ga:Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null}, arguments);}
+function(){return function(){var g=void 0,j=!0,k=null,l=!1,m=this;
+function n(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}var aa=Date.now||function(){return+new Date};function o(a,b){function c(){}c.prototype=b.prototype;a.e=b.prototype;a.prototype=new c};var ba=window;function ca(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c};function p(a,b){this.code=a;this.message=b||"";this.name=da[a]||da[13];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}o(p,Error);
+var da={7:"NoSuchElementError",8:"NoSuchFrameError",9:"UnknownCommandError",10:"StaleElementReferenceError",11:"ElementNotVisibleError",12:"InvalidElementStateError",13:"UnknownError",15:"ElementNotSelectableError",19:"XPathLookupError",23:"NoSuchWindowError",24:"InvalidCookieDomainError",25:"UnableToSetCookieError",26:"ModalDialogOpenedError",27:"NoModalDialogOpenError",28:"ScriptTimeoutError",32:"InvalidSelectorError",35:"SqlDatabaseError",34:"MoveTargetOutOfBoundsError"};
+p.prototype.toString=function(){return"["+this.name+"] "+this.message};function ea(a,b){for(var c=1;c<arguments.length;c++)var d=String(arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a}
+function r(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),q=0;0==c&&q<f;q++){var u=d[q]||"",ta=e[q]||"",ua=RegExp("(\\d*)(\\D*)","g"),va=RegExp("(\\d*)(\\D*)","g");do{var h=ua.exec(u)||["","",""],i=va.exec(ta)||["","",""];if(0==h[0].length&&0==i[0].length)break;c=((0==h[1].length?0:parseInt(h[1],10))<(0==i[1].length?0:parseInt(i[1],10))?-1:(0==h[1].length?0:parseInt(h[1],10))>(0==
+i[1].length?0:parseInt(i[1],10))?1:0)||((0==h[2].length)<(0==i[2].length)?-1:(0==h[2].length)>(0==i[2].length)?1:0)||(h[2]<i[2]?-1:h[2]>i[2]?1:0)}while(0==c)}return c};var s,t,v,w;function x(){return m.navigator?m.navigator.userAgent:k}w=v=t=s=l;var y;if(y=x()){var fa=m.navigator;s=0==y.indexOf("Opera");t=!s&&-1!=y.indexOf("MSIE");v=!s&&-1!=y.indexOf("WebKit");w=!s&&!v&&"Gecko"==fa.product}var z=s,A=t,B=w,ga=v,C;
+a:{var D="",E;if(z&&m.opera)var F=m.opera.version,D="function"==typeof F?F():F;else if(B?E=/rv\:([^\);]+)(\)|;)/:A?E=/MSIE\s+([^\);]+)(\)|;)/:ga&&(E=/WebKit\/(\S+)/),E)var ha=E.exec(x()),D=ha?ha[1]:"";if(A){var G,ia=m.document;G=ia?ia.documentMode:g;if(G>parseFloat(D)){C=String(G);break a}}C=D}var ja={};function H(a){return ja[a]||(ja[a]=0<=r(C,a))}var ka={};function la(){return ka[9]||(ka[9]=A&&!!document.documentMode&&9<=document.documentMode)};var I,J,K,L,M,N,O;O=N=M=L=K=J=I=l;var P=x();P&&(-1!=P.indexOf("Firefox")?I=j:-1!=P.indexOf("Camino")?J=j:-1!=P.indexOf("iPhone")||-1!=P.indexOf("iPod")?K=j:-1!=P.indexOf("iPad")?L=j:-1!=P.indexOf("Android")?M=j:-1!=P.indexOf("Chrome")?N=j:-1!=P.indexOf("Safari")&&(O=j));var ma=I,na=J,oa=K,pa=L,qa=M,ra=N,sa=O;function Q(a){return(a=a.exec(x()))?a[1]:""}(function(){if(ma)return Q(/Firefox\/([0-9.]+)/);if(A||z)return C;if(ra)return Q(/Chrome\/([0-9.]+)/);if(sa)return Q(/Version\/([0-9.]+)/);if(oa||pa){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(x());if(a)return a[1]+"."+a[2]}else{if(qa)return(a=Q(/Android\s+([0-9.]+)/))?a:Q(/Version\/([0-9.]+)/);if(na)return Q(/Camino\/([0-9.]+)/)}return""})();var R,wa=function(){if(!B)return l;var a=m.Components;if(!a)return l;try{if(!a.classes)return l}catch(b){return l}var c=a.classes,a=a.interfaces,d=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),e=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo).platformVersion;R=function(a){return 0<=d.c(e,""+a)};return j}();function xa(){this.a=g}
+function S(a,b,c){switch(typeof b){case "string":ya(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==k){c.push("null");break}if("array"==n(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],S(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),ya(f,
+c),c.push(":"),S(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var T={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},za=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
+function ya(a,b){b.push('"',a.replace(za,function(a){if(a in T)return T[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return T[a]=e+b.toString(16)}),'"')};ga||z||B&&(wa?R(3.5):A?0<=r(document.documentMode,3.5):H(3.5))||A&&(wa?R(8):A?r(document.documentMode,8):H(8));function U(a){Error.captureStackTrace?Error.captureStackTrace(this,U):this.stack=Error().stack||"";a&&(this.message=String(a))}o(U,Error);U.prototype.name="CustomError";function Aa(a,b){b.unshift(a);U.call(this,ea.apply(k,b));b.shift();this.d=a}o(Aa,U);Aa.prototype.name="AssertionError";function V(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d};!A||la();!B&&!A||A&&la()||B&&H("1.9.1");A&&H("9");function W(a){switch(n(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return V(a,W);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Ba(a);return b}if("document"in a)return b={},b.WINDOW=Ba(a),b;var c=n(a);if("array"==c||"object"==c&&"number"==typeof a.length)return V(a,W);var c=function(a,b){return"number"==typeof b||"string"==typeof b},d={};for(b in a)c.call(g,0,b)&&(d[b]=a[b]);return ca(d,W);default:return k}}
+function X(a,b){var c;"array"==n(a)?c=V(a,function(a){return X(a,b)}):(c=typeof a,c="object"==c&&a!=k||"function"==c?"function"==typeof a?a:"ELEMENT"in a?Ca(a.ELEMENT,b):"WINDOW"in a?Ca(a.WINDOW,b):ca(a,function(a){return X(a,b)}):a);return c}function Da(a){var a=a||document,b=a.$wdc_;b||(b=a.$wdc_={},b.b=aa());b.b||(b.b=aa());return b}function Ba(a){var b=Da(a.ownerDocument),c;a:{c=function(b){return b==a};for(var d in b)if(c.call(g,b[d])){c=d;break a}c=g}c||(c=":wdc:"+b.b++,b[c]=a);return c}
+function Ca(a,b){var a=decodeURIComponent(a),c=b||document,d=Da(c);if(!(a in d))throw new p(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new p(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new p(10,"Element is no longer attached to the DOM");};function Ea(a,b,c,d){var d=d||ba,e;try{var a="string"==typeof a?new d.Function(a):d==window?a:new d.Function("return ("+a+").apply(null,arguments);"),f=X(b,d.document),q=a.apply(k,f);e={status:0,value:W(q)}}catch(u){e={status:"code"in u?u.code:13,value:{message:u.message}}}c&&(a=[],S(new xa,e,a),e=a.join(""));return e}var Y=["_"],Z=m;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());){var Fa;if(Fa=!Y.length)Fa=Ea!==g;Fa?Z[$]=Ea:Z=Z[$]?Z[$]:Z[$]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null}, arguments);}
View
31 src/third_party/webdriver-atoms/execute_sql.js
@@ -1,15 +1,16 @@
-function(){return function(){var g=void 0,h=!0,i=!1,j=this;
-function m(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 aa(a){var b=m(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ba(a){a=m(a);return"object"==a||"array"==a||"function"==a}var ca=Date.now||function(){return+new Date};function n(a,b){function c(){}c.prototype=b.prototype;a.d=b.prototype;a.prototype=new c};function da(a,b){var c={},d;for(d in a)b.call(g,a[d],d,a)&&(c[d]=a[d]);return c}function ea(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c}function fa(a,b){for(var c in a)if(b.call(g,a[c],c,a))return c};function o(a,b){this.code=a;this.message=b||"";this.name=ga[a]||ga[13];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}n(o,Error);
-var ga={7:"NoSuchElementError",8:"NoSuchFrameError",9:"UnknownCommandError",10:"StaleElementReferenceError",11:"ElementNotVisibleError",12:"InvalidElementStateError",13:"UnknownError",15:"ElementNotSelectableError",19:"XPathLookupError",23:"NoSuchWindowError",24:"InvalidCookieDomainError",25:"UnableToSetCookieError",26:"ModalDialogOpenedError",27:"NoModalDialogOpenError",28:"ScriptTimeoutError",32:"InvalidSelectorError",35:"SqlDatabaseError",34:"MoveTargetOutOfBoundsError"};
-o.prototype.toString=function(){return"["+this.name+"] "+this.message};function ha(a,b){for(var c=1;c<arguments.length;c++)var d=(""+arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a}
-function p(a,b){for(var c=0,d=(""+a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=(""+b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),q=0;0==c&&q<f;q++){var M=d[q]||"",Ia=e[q]||"",Ja=RegExp("(\\d*)(\\D*)","g"),Ka=RegExp("(\\d*)(\\D*)","g");do{var k=Ja.exec(M)||["","",""],l=Ka.exec(Ia)||["","",""];if(0==k[0].length&&0==l[0].length)break;c=((0==k[1].length?0:parseInt(k[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==k[1].length?0:parseInt(k[1],10))>(0==l[1].length?
-0:parseInt(l[1],10))?1:0)||((0==k[2].length)<(0==l[2].length)?-1:(0==k[2].length)>(0==l[2].length)?1:0)||(k[2]<l[2]?-1:k[2]>l[2]?1:0)}while(0==c)}return c};var r,s,t,u;function v(){return j.navigator?j.navigator.userAgent:null}u=t=s=r=i;var w;if(w=v()){var ia=j.navigator;r=0==w.indexOf("Opera");s=!r&&-1!=w.indexOf("MSIE");t=!r&&-1!=w.indexOf("WebKit");u=!r&&!t&&"Gecko"==ia.product}var x=r,y=s,z=u,ja=t,ka=j.navigator,la=-1!=(ka&&ka.platform||"").indexOf("Win"),A;
-a:{var B="",C;if(x&&j.opera)var D=j.opera.version,B="function"==typeof D?D():D;else if(z?C=/rv\:([^\);]+)(\)|;)/:y?C=/MSIE\s+([^\);]+)(\)|;)/:ja&&(C=/WebKit\/(\S+)/),C)var ma=C.exec(v()),B=ma?ma[1]:"";if(y){var E,na=j.document;E=na?na.documentMode:g;if(E>parseFloat(B)){A=""+E;break a}}A=B}var oa={};function F(a){return oa[a]||(oa[a]=0<=p(A,a))}var pa={};function qa(){return pa[9]||(pa[9]=y&&document.documentMode&&9<=document.documentMode)};var G=window;var H,I,J,K,L,N,O;O=N=L=K=J=I=H=i;var P=v();P&&(-1!=P.indexOf("Firefox")?H=h:-1!=P.indexOf("Camino")?I=h:-1!=P.indexOf("iPhone")||-1!=P.indexOf("iPod")?J=h:-1!=P.indexOf("iPad")?K=h:-1!=P.indexOf("Android")?L=h:-1!=P.indexOf("Chrome")?N=h:-1!=P.indexOf("Safari")&&(O=h));var ra=I,sa=J,ta=K,Q=L,ua=N,R=O;var va;a:{var wa="",S,xa;if(H)S=/Firefox\/([0-9.]+)/;else{if(y||x){va=A;break a}ua?S=/Chrome\/([0-9.]+)/:R?S=/Version\/([0-9.]+)/:sa||ta?(S=/Version\/(\S+).*Mobile\/(\S+)/,xa=h):Q?S=/Android\s+([0-9.]+)(?:.*Version\/([0-9.]+))?/:ra&&(S=/Camino\/([0-9.]+)/)}if(S)var T=S.exec(v()),wa=T?xa?T[1]+"."+T[2]:T[2]||T[1]:"";va=wa};var ya,za;function U(a){return Aa?ya(a):y?0<=p(document.documentMode,a):F(a)}function V(a){return Aa?za(a):Q?0<=p(Ba,a):0<=p(va,a)}
-var Aa=function(){if(!z)return i;var a=j.Components;if(!a)return i;try{if(!a.classes)return i}catch(b){return i}var c=a.classes,a=a.interfaces,d=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),c=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo),e=c.platformVersion,f=c.version;ya=function(a){return 0<=d.c(e,""+a)};za=function(a){return 0<=d.c(f,""+a)};return h}(),Ca;if(Q){var Da=/Android\s+([0-9\.]+)/.exec(v());Ca=Da?Da[1]:"0"}else Ca="0";var Ba=Ca;function Ea(){this.a=g}
-function Fa(a,b,c){switch(typeof b){case "string":Ga(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==m(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Fa(a,a.a?a.a.call(b,""+f,e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Ga(f,
-c),c.push(":"),Fa(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var Ha={'"':'\\"',"\\":"\\\\","/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},La=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
-function Ga(a,b){b.push('"',a.replace(La,function(a){if(a in Ha)return Ha[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Ha[a]=e+b.toString(16)}),'"')};ja||x||z&&U(3.5)||y&&U(8);function W(a){this.stack=Error().stack||"";a&&(this.message=""+a)}n(W,Error);W.prototype.name="CustomError";function Ma(a,b){b.unshift(a);W.call(this,ha.apply(null,b));b.shift()}n(Ma,W);Ma.prototype.name="AssertionError";function Na(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d};!y||qa();!z&&!y||y&&qa()||z&&F("1.9.1");y&&F("9");function X(a){switch(m(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return Na(a,X);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Oa(a);return b}if("document"in a)return b={},b.WINDOW=Oa(a),b;if(aa(a))return Na(a,X);a=da(a,function(a,b){return"number"==typeof b||"string"==typeof b});return ea(a,X);default:return null}}
-function Pa(a,b){return"array"==m(a)?Na(a,function(a){return Pa(a,b)}):ba(a)?"function"==typeof a?a:"ELEMENT"in a?Qa(a.ELEMENT,b):"WINDOW"in a?Qa(a.WINDOW,b):ea(a,function(a){return Pa(a,b)}):a}function Ra(a,b){var c;try{var a="string"==typeof a?new G.Function(a):G==window?a:new G.Function("return ("+a+").apply(null,arguments);"),d=Pa(b,G.document),e=a.apply(null,d);c={status:0,value:X(e)}}catch(f){c={status:"code"in f?f.code:13,value:{message:f.message}}}d=[];Fa(new Ea,c,d);return d.join("")}
-function Sa(a){var a=a||document,b=a.$wdc_;b||(b=a.$wdc_={},b.b=ca());b.b||(b.b=ca());return b}function Oa(a){var b=Sa(a.ownerDocument),c=fa(b,function(b){return b==a});c||(c=":wdc:"+b.b++,b[c]=a);return c}
-function Qa(a,b){var a=decodeURIComponent(a),c=b||document,d=Sa(c);if(!(a in d))throw new o(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new o(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new o(10,"Element is no longer attached to the DOM");};y&&U(8)&&U(9);R&&V(4)&&V(5);Q&&V(2.2)&&V(2.3);la&&R&&V(4)&&V(6);function Ta(a,b,c,d,e){function f(a,b){var c=new Ua(b);d(a,c)}var q;try{q=G.openDatabase(a,"",a+"name",5242880)}catch(M){throw new o(13,M.message);}q.transaction(function(a){a.executeSql(b,c,f,g)},e,g)}function Ua(a){this.rows=[];for(var b=0;b<a.rows.length;b++)this.rows[b]=a.rows.item(b);this.rowsAffected=a.rowsAffected;this.insertId=-1;try{this.insertId=a.insertId}catch(c){}};function Va(a,b,c,d){Ta(a,b,c,function(a,b){d(Ra(function(){return b},[b]))},function(a){d(Ra(function(){throw new o(35,"SQL Error Code: "+a.code+". SQL Error Message: "+a.message);},[]))})}var Y=["_"],Z=j;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);for(var $;Y.length&&($=Y.shift());)!Y.length&&Va!==g?Z[$]=Va:Z=Z[$]?Z[$]:Z[$]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null}, arguments);}
+function(){return function(){var g=void 0,h=!0,k=null,l=!1,m=this;
+function n(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}var aa=Date.now||function(){return+new Date};function o(a,b){function c(){}c.prototype=b.prototype;a.e=b.prototype;a.prototype=new c};function ba(a,b){var c={},d;for(d in a)c[d]=b.call(g,a[d],d,a);return c};function p(a,b){this.code=a;this.message=b||"";this.name=ca[a]||ca[13];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}o(p,Error);
+var ca={7:"NoSuchElementError",8:"NoSuchFrameError",9:"UnknownCommandError",10:"StaleElementReferenceError",11:"ElementNotVisibleError",12:"InvalidElementStateError",13:"UnknownError",15:"ElementNotSelectableError",19:"XPathLookupError",23:"NoSuchWindowError",24:"InvalidCookieDomainError",25:"UnableToSetCookieError",26:"ModalDialogOpenedError",27:"NoModalDialogOpenError",28:"ScriptTimeoutError",32:"InvalidSelectorError",35:"SqlDatabaseError",34:"MoveTargetOutOfBoundsError"};
+p.prototype.toString=function(){return"["+this.name+"] "+this.message};var q=window;function da(a,b){for(var c=1;c<arguments.length;c++)var d=String(arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a}
+function s(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),r=0;0==c&&r<f;r++){var ta=d[r]||"",ua=e[r]||"",va=RegExp("(\\d*)(\\D*)","g"),wa=RegExp("(\\d*)(\\D*)","g");do{var i=va.exec(ta)||["","",""],j=wa.exec(ua)||["","",""];if(0==i[0].length&&0==j[0].length)break;c=((0==i[1].length?0:parseInt(i[1],10))<(0==j[1].length?0:parseInt(j[1],10))?-1:(0==i[1].length?0:parseInt(i[1],10))>
+(0==j[1].length?0:parseInt(j[1],10))?1:0)||((0==i[2].length)<(0==j[2].length)?-1:(0==i[2].length)>(0==j[2].length)?1:0)||(i[2]<j[2]?-1:i[2]>j[2]?1:0)}while(0==c)}return c};var t,u,v,w;function x(){return m.navigator?m.navigator.userAgent:k}w=v=u=t=l;var y;if(y=x()){var ea=m.navigator;t=0==y.indexOf("Opera");u=!t&&-1!=y.indexOf("MSIE");v=!t&&-1!=y.indexOf("WebKit");w=!t&&!v&&"Gecko"==ea.product}var z=t,A=u,B=w,fa=v,C;
+a:{var D="",E;if(z&&m.opera)var F=m.opera.version,D="function"==typeof F?F():F;else if(B?E=/rv\:([^\);]+)(\)|;)/:A?E=/MSIE\s+([^\);]+)(\)|;)/:fa&&(E=/WebKit\/(\S+)/),E)var ga=E.exec(x()),D=ga?ga[1]:"";if(A){var G,ha=m.document;G=ha?ha.documentMode:g;if(G>parseFloat(D)){C=String(G);break a}}C=D}var ia={};function H(a){return ia[a]||(ia[a]=0<=s(C,a))}var ja={};function ka(){return ja[9]||(ja[9]=A&&!!document.documentMode&&9<=document.documentMode)};var I,J,K,L,M,N,O;O=N=M=L=K=J=I=l;var P=x();P&&(-1!=P.indexOf("Firefox")?I=h:-1!=P.indexOf("Camino")?J=h:-1!=P.indexOf("iPhone")||-1!=P.indexOf("iPod")?K=h:-1!=P.indexOf("iPad")?L=h:-1!=P.indexOf("Android")?M=h:-1!=P.indexOf("Chrome")?N=h:-1!=P.indexOf("Safari")&&(O=h));var la=I,ma=J,na=K,oa=L,pa=M,qa=N,ra=O;function Q(a){return(a=a.exec(x()))?a[1]:""}(function(){if(la)return Q(/Firefox\/([0-9.]+)/);if(A||z)return C;if(qa)return Q(/Chrome\/([0-9.]+)/);if(ra)return Q(/Version\/([0-9.]+)/);if(na||oa){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(x());if(a)return a[1]+"."+a[2]}else{if(pa)return(a=Q(/Android\s+([0-9.]+)/))?a:Q(/Version\/([0-9.]+)/);if(ma)return Q(/Camino\/([0-9.]+)/)}return""})();var R,sa=function(){if(!B)return l;var a=m.Components;if(!a)return l;try{if(!a.classes)return l}catch(b){return l}var c=a.classes,a=a.interfaces,d=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),e=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo).platformVersion;R=function(a){return 0<=d.c(e,""+a)};return h}();function xa(){this.a=g}
+function S(a,b,c){switch(typeof b){case "string":ya(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==k){c.push("null");break}if("array"==n(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],S(a,a.a?a.a.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),ya(f,
+c),c.push(":"),S(a,a.a?a.a.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var T={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},za=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
+function ya(a,b){b.push('"',a.replace(za,function(a){if(a in T)return T[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return T[a]=e+b.toString(16)}),'"')};fa||z||B&&(sa?R(3.5):A?0<=s(document.documentMode,3.5):H(3.5))||A&&(sa?R(8):A?s(document.documentMode,8):H(8));function U(a){Error.captureStackTrace?Error.captureStackTrace(this,U):this.stack=Error().stack||"";a&&(this.message=String(a))}o(U,Error);U.prototype.name="CustomError";function Aa(a,b){b.unshift(a);U.call(this,da.apply(k,b));b.shift();this.d=a}o(Aa,U);Aa.prototype.name="AssertionError";function V(a,b){for(var c=a.length,d=Array(c),e="string"==typeof a?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(g,e[f],f,a));return d};!A||ka();!B&&!A||A&&ka()||B&&H("1.9.1");A&&H("9");function W(a){switch(n(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return V(a,W);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=Ba(a);return b}if("document"in a)return b={},b.WINDOW=Ba(a),b;var c=n(a);if("array"==c||"object"==c&&"number"==typeof a.length)return V(a,W);var c=function(a,b){return"number"==typeof b||"string"==typeof b},d={};for(b in a)c.call(g,0,b)&&(d[b]=a[b]);return ba(d,W);default:return k}}
+function X(a,b){var c;"array"==n(a)?c=V(a,function(a){return X(a,b)}):(c=typeof a,c="object"==c&&a!=k||"function"==c?"function"==typeof a?a:"ELEMENT"in a?Ca(a.ELEMENT,b):"WINDOW"in a?Ca(a.WINDOW,b):ba(a,function(a){return X(a,b)}):a);return c}
+function Da(a,b){var c;try{var a="string"==typeof a?new q.Function(a):q==window?a:new q.Function("return ("+a+").apply(null,arguments);"),d=X(b,q.document),e=a.apply(k,d);c={status:0,value:W(e)}}catch(f){c={status:"code"in f?f.code:13,value:{message:f.message}}}d=[];S(new xa,c,d);return d.join("")}function Ea(a){var a=a||document,b=a.$wdc_;b||(b=a.$wdc_={},b.b=aa());b.b||(b.b=aa());return b}
+function Ba(a){var b=Ea(a.ownerDocument),c;a:{c=function(b){return b==a};for(var d in b)if(c.call(g,b[d])){c=d;break a}c=g}c||(c=":wdc:"+b.b++,b[c]=a);return c}
+function Ca(a,b){var a=decodeURIComponent(a),c=b||document,d=Ea(c);if(!(a in d))throw new p(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new p(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new p(10,"Element is no longer attached to the DOM");};function Fa(a){this.rows=[];for(var b=0;b<a.rows.length;b++)this.rows[b]=a.rows.item(b);this.rowsAffected=a.rowsAffected;this.insertId=-1;try{this.insertId=a.insertId}catch(c){}};function Ga(a,b,c,d){function e(a,b){var c=new Fa(b);d(Da(function(){return c},[c]))}var f;try{f=q.openDatabase(a,"",a+"name",5242880)}catch(r){throw new p(13,r.message);}f.transaction(function(a){a.executeSql(b,c,e,g)},function(a){d(Da(function(){throw new p(35,"SQL Error Code: "+a.code+". SQL Error Message: "+a.message);},[]))},g)}var Y=["_"],Z=m;!(Y[0]in Z)&&Z.execScript&&Z.execScript("var "+Y[0]);
+for(var $;Y.length&&($=Y.shift());){var Ha;if(Ha=!Y.length)Ha=Ga!==g;Ha?Z[$]=Ga:Z=Z[$]?Z[$]:Z[$]={}};; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null}, arguments);}
View
129 src/third_party/webdriver-atoms/find_element.js
@@ -1,47 +1,90 @@
-function(){return function(){function h(a){throw a;}var j=void 0,k=!0,l=null,m=!1,n=this;
-function o(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 aa(a){var b=o(a);return"array"==b||"object"==b&&"number"==typeof a.length}function q(a){return"string"==typeof a}function r(a){return"function"==o(a)}function ba(a){a=o(a);return"object"==a||"array"==a||"function"==a}var ca=Date.now||function(){return+new Date};function s(a,b){function c(){}c.prototype=b.prototype;a.r=b.prototype;a.prototype=new c};function da(a){var b=a.length-1;return 0<=b&&a.indexOf(" ",b)==b}function ea(a,b){for(var c=1;c<arguments.length;c++)var d=(""+arguments[c]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,d);return a}function t(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")}
-function fa(a,b){for(var c=0,d=t(""+a).split("."),e=t(""+b).split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var i=d[g]||"",p=e[g]||"",$=RegExp("(\\d*)(\\D*)","g"),Cb=RegExp("(\\d*)(\\D*)","g");do{var y=$.exec(i)||["","",""],z=Cb.exec(p)||["","",""];if(0==y[0].length&&0==z[0].length)break;c=((0==y[1].length?0:parseInt(y[1],10))<(0==z[1].length?0:parseInt(z[1],10))?-1:(0==y[1].length?0:parseInt(y[1],10))>(0==z[1].length?0:parseInt(z[1],10))?1:0)||((0==y[2].length)<(0==z[2].length)?-1:(0==
-y[2].length)>(0==z[2].length)?1:0)||(y[2]<z[2]?-1:y[2]>z[2]?1:0)}while(0==c)}return c}var ga={};function ha(a){return ga[a]||(ga[a]=(""+a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()}))};var u,ia,ja,ka,la;function ma(){return n.navigator?n.navigator.userAgent:l}la=ka=ja=ia=u=m;var v;if(v=ma()){var na=n.navigator;u=0==v.indexOf("Opera");ia=!u&&-1!=v.indexOf("MSIE");ka=(ja=!u&&-1!=v.indexOf("WebKit"))&&-1!=v.indexOf("Mobile");la=!u&&!ja&&"Gecko"==na.product}var w=u,x=ia,A=la,B=ja,oa=ka,pa;
-a:{var qa="",C;if(w&&n.opera)var ra=n.opera.version,qa="function"==typeof ra?ra():ra;else if(A?C=/rv\:([^\);]+)(\)|;)/:x?C=/MSIE\s+([^\);]+)(\)|;)/:B&&(C=/WebKit\/(\S+)/),C)var sa=C.exec(ma()),qa=sa?sa[1]:"";if(x){var ta,ua=n.document;ta=ua?ua.documentMode:j;if(ta>parseFloat(qa)){pa=""+ta;break a}}pa=qa}var va={};function D(a){return va[a]||(va[a]=0<=fa(pa,a))}var wa={};function xa(a){return wa[a]||(wa[a]=x&&document.documentMode&&document.documentMode>=a)};var E=window;function ya(a,b){var c={},d;for(d in a)b.call(j,a[d],d,a)&&(c[d]=a[d]);return c}function za(a,b){var c={},d;for(d in a)c[d]=b.call(j,a[d],d,a);return c}function Aa(a,b){for(var c in a)if(b.call(j,a[c],c,a))return c};function F(a,b){this.code=a;this.message=b||"";this.name=Ba[a]||Ba[13];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}s(F,Error);
-var Ba={7:"NoSuchElementError",8:"NoSuchFrameError",9:"UnknownCommandError",10:"StaleElementReferenceError",11:"ElementNotVisibleError",12:"InvalidElementStateError",13:"UnknownError",15:"ElementNotSelectableError",19:"XPathLookupError",23:"NoSuchWindowError",24:"InvalidCookieDomainError",25:"UnableToSetCookieError",26:"ModalDialogOpenedError",27:"NoModalDialogOpenError",28:"ScriptTimeoutError",32:"InvalidSelectorError",35:"SqlDatabaseError",34:"MoveTargetOutOfBoundsError"};
-F.prototype.toString=function(){return"["+this.name+"] "+this.message};var Ca,Da,Ea,Fa,Ga,Ha,Ia;Ia=Ha=Ga=Fa=Ea=Da=Ca=m;var G=ma();G&&(-1!=G.indexOf("Firefox")?Ca=k:-1!=G.indexOf("Camino")?Da=k:-1!=G.indexOf("iPhone")||-1!=G.indexOf("iPod")?Ea=k:-1!=G.indexOf("iPad")?Fa=k:-1!=G.indexOf("Android")?Ga=k:-1!=G.indexOf("Chrome")?Ha=k:-1!=G.indexOf("Safari")&&(Ia=k));var Ja=w,Ka=x,La=Da,Ma=Ea,Na=Fa,Oa=Ga,Pa=Ha,Qa=Ia;a:{var H;if(Ca)H=/Firefox\/([0-9.]+)/;else{if(Ka||Ja)break a;Pa?H=/Chrome\/([0-9.]+)/:Qa?H=/Version\/([0-9.]+)/:Ma||Na?H=/Version\/(\S+).*Mobile\/(\S+)/:Oa?H=/Android\s+([0-9.]+)(?:.*Version\/([0-9.]+))?/:La&&(H=/Camino\/([0-9.]+)/)}H&&H.exec(ma())};var Ra;function I(a){return Sa?Ra(a):x?0<=fa(document.documentMode,a):D(a)}var Sa=function(){if(!A)return m;var a=n.Components;if(!a)return m;try{if(!a.classes)return m}catch(b){return m}var c=a.classes,a=a.interfaces,d=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),e=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo).platformVersion;Ra=function(a){return 0<=d.s(e,""+a)};return k}(),Ta=x&&9<=document.documentMode,Ua=x&&!Ta;function Va(){this.g=j}
-function Wa(a,b,c){switch(typeof b){case "string":Xa(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(b==l){c.push("null");break}if("array"==o(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],Wa(a,a.g?a.g.call(b,""+f,e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),Xa(f,c),
-c.push(":"),Wa(a,a.g?a.g.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:h(Error("Unknown type: "+typeof b))}}var Ya={'"':'\\"',"\\":"\\\\","/":"\\/","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":