atoms.getViewPortSize_ios.js Maven / Gradle / Ivy
The newest version!
function(){return function(){function g(a){throw a;}var k=void 0,l=!0,m=null,n=!1;function p(a){return function(){return this[a]}}function q(a){return function(){return a}}var r=this;function s(a){return"string"==typeof a}Math.floor(2147483648*Math.random()).toString(36);function t(a,b){function c(){}c.prototype=b.prototype;a.aa=b.prototype;a.prototype=new c};function u(a){Error.captureStackTrace?Error.captureStackTrace(this,u):this.stack=Error().stack||"";a&&(this.message=String(a))}t(u,Error);u.prototype.name="CustomError";function aa(a,b){for(var c=1;c(0==D[1].length?
0:parseInt(D[1],10))?1:0)||((0==C[2].length)<(0==D[2].length)?-1:(0==C[2].length)>(0==D[2].length)?1:0)||(C[2]D[2]?1:0)}while(0==c)}return c};function da(a,b){b.unshift(a);u.call(this,aa.apply(m,b));b.shift();this.Z=a}t(da,u);da.prototype.name="AssertionError";function ea(a,b,c){if(!a){var d=Array.prototype.slice.call(arguments,2),e="Assertion failed";if(b)var e=e+(": "+b),f=d;g(new da(""+e,f||[]))}};var v=Array.prototype;function x(a,b){for(var c=a.length,d=s(a)?a.split(""):a,e=0;e=arguments.length?v.slice.call(a,b):v.slice.call(a,b,c)};function ia(a,b){this.code=a;this.message=b||"";this.name=ja[a]||ja[13];var c=Error(this.message);c.name=this.name;this.stack=c.stack||""}t(ia,Error);
var ja={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"};
ia.prototype.toString=function(){return this.name+": "+this.message};function B(){return r.navigator?r.navigator.userAgent:m}var ka,la="",ma=/WebKit\/(\S+)/.exec(B());ka=la=ma?ma[1]:"";var na={};function oa(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 pa(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-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?qa(a,b):!c&&oa(e,b)?-1*ra(a,b):!d&&oa(f,a)?ra(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(l);
d=d.createRange();d.selectNode(b);d.collapse(l);return c.compareBoundaryPoints(r.Range.START_TO_END,d)}function ra(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return qa(d,a)}function qa(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1};var sa,ta,ua,va,wa,xa,ya;ya=xa=wa=va=ua=ta=sa=n;var E=B();E&&(-1!=E.indexOf("Firefox")?sa=l:-1!=E.indexOf("Camino")?ta=l:-1!=E.indexOf("iPhone")||-1!=E.indexOf("iPod")?ua=l:-1!=E.indexOf("iPad")?va=l:-1!=E.indexOf("Android")?wa=l:-1!=E.indexOf("Chrome")?xa=l:-1!=E.indexOf("Safari")&&(ya=l));var za=sa,Aa=ta,Ba=ua,Ca=va,F=wa,Da=xa,Ea=ya;function G(a,b,c){this.g=a;this.W=b||1;this.f=c||1};function H(a){var b=m,c=a.nodeType;1==c&&(b=a.textContent,b=b==k||b==m?a.innerText:b,b=b==k||b==m?"":b);if("string"!=typeof b)if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),d[c++]=a;while(a=a.firstChild);for(;c&&!(a=d[--c].nextSibling););}}else b=a.nodeValue;return""+b}function I(a,b,c){if(b===m)return l;try{if(!a.getAttribute)return n}catch(d){return n}return c==m?!!a.getAttribute(b):a.getAttribute(b,2)==c}
function J(a,b,c,d,e){return Fa.call(m,a,b,s(c)?c:m,s(d)?d:m,e||new K)}function Fa(a,b,c,d,e){b.getElementsByName&&d&&"name"==c?(b=b.getElementsByName(d),x(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),x(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof L?Ga(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),x(b,function(a){I(a,c,d)&&e.add(a)}));return e}
function Ha(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)I(b,c,d)&&a.matches(b)&&e.add(b);return e}function Ga(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)I(b,c,d)&&a.matches(b)&&e.add(b),Ga(a,b,c,d,e)};function K(){this.f=this.d=m;this.r=0}function Ia(a){this.o=a;this.next=this.n=m}function Ja(a,b){if(a.d){if(!b.d)return a}else return b;for(var c=a.d,d=b.d,e=m,f=m,h=0;c&&d;)c.o==d.o?(f=c,c=c.next,d=d.next):0",4,2,function(a,b,c){return R(function(a,b){return a>b},a,b,c)});S("<=",4,2,function(a,b,c){return R(function(a,b){return a<=b},a,b,c)});S(">=",4,2,function(a,b,c){return R(function(a,b){return a>=b},a,b,c)});var Qa=S("=",3,2,function(a,b,c){return R(function(a,b){return a==b},a,b,c,l)});S("!=",3,2,function(a,b,c){return R(function(a,b){return a!=b},a,b,c,l)});S("and",2,2,function(a,b,c){return Q(a,c)&&Q(b,c)});S("or",1,2,function(a,b,c){return Q(a,c)||Q(b,c)});function Ta(a,b){b.l()&&4!=a.c&&g(Error("Primary expression must evaluate to nodeset if filter has predicate(s)."));N.call(this,a.c);this.M=a;this.a=b;this.h=a.b();this.e=a.e}t(Ta,N);Ta.prototype.evaluate=function(a){a=this.M.evaluate(a);return Ua(this.a,a)};Ta.prototype.toString=function(a){a=a||"";var b=a+"Filter: \n";a+=" ";b+=this.M.toString(a);return b+=this.a.toString(a)};function Va(a,b){b.lengtha.D&&g(Error("Function "+a.m+" expects at most "+a.D+" arguments, "+b.length+" given"));a.U&&x(b,function(b,d){4!=b.c&&g(Error("Argument "+d+" to function "+a.m+" is not of type Nodeset: "+b))});N.call(this,a.c);this.v=a;this.A=b;Na(this,a.h||A(b,function(a){return a.b()}));Oa(this,a.S&&!b.length||a.R&&!!b.length||A(b,function(a){return a.e}))}t(Va,N);
Va.prototype.evaluate=function(a){return this.v.k.apply(m,ga(a,this.A))};Va.prototype.toString=function(a){var b=a||"";a=b+"Function: "+this.v+"\n";b+=" ";this.A.length&&(a+=b+"Arguments:",b+=" ",a=fa(this.A,function(a,d){return a+"\n"+d.toString(b)},a));return a};function Wa(a,b,c,d,e,f,h,w,y){this.m=a;this.c=b;this.h=c;this.S=d;this.R=e;this.k=f;this.L=h;this.D=w!==k?w:h;this.U=!!y}Wa.prototype.toString=p("m");var Xa={};
function T(a,b,c,d,e,f,h,w){a in Xa&&g(Error("Function already created: "+a+"."));Xa[a]=new Wa(a,b,c,d,n,e,f,h,w)}T("boolean",2,n,n,function(a,b){return Q(b,a)},1);T("ceiling",1,n,n,function(a,b){return Math.ceil(O(b,a))},1);T("concat",3,n,n,function(a,b){var c=ha(arguments,1);return fa(c,function(b,c){return b+P(c,a)},"")},2,m);T("contains",2,n,n,function(a,b,c){b=P(b,a);a=P(c,a);return-1!=b.indexOf(a)},2);T("count",1,n,n,function(a,b){return b.evaluate(a).l()},1,1,l);T("false",2,n,n,q(n),0);
T("floor",1,n,n,function(a,b){return Math.floor(O(b,a))},1);T("id",4,n,n,function(a,b){var c=a.g,d=9==c.nodeType?c:c.ownerDocument,c=P(b,a).split(/\s+/),e=[];x(c,function(a){a=d.getElementById(a);var b;if(b=a){a:if(s(e))b=!s(a)||1!=a.length?-1:e.indexOf(a,0);else{for(b=0;b