Skip to content

Instantly share code, notes, and snippets.

@vladox
Created July 13, 2016 10:40
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save vladox/e7ed9c6239b27890f62dc4026d6699b9 to your computer and use it in GitHub Desktop.
"Google Offline Mail Background Page" Pop-up
<!DOCTYPE html>
<html manifest="https://mail.google.com/mail/mu/background/manifest?mui=ca&amp;msui=sync">
<head>
<title>Google Offline Mail Background Page</title>
</head>
<body>
<script>
var h,aa=function(){},k=function(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},q=function(a){var b=k(a);return"array"==b||"object"==b&&"number"==typeof a.length},r=function(a){return"string"==typeof a},ba=function(a,b,c){return a.call.apply(a.bind,arguments)},ca=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,
arguments)}},t=function(a,b,c){t=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ba:ca;return t.apply(null,arguments)},u=function(a,b){function c(){}c.prototype=b.prototype;a.Da=b.prototype;a.prototype=new c;a.Ca=function(a,c,f){for(var g=Array(arguments.length-2),l=2;l<arguments.length;l++)g[l-2]=arguments[l];return b.prototype[c].apply(a,g)}},v=function(a){return function(){return a}},w=function(a,b){return a<b?-1:a>b?1:0},ea=function(a){var b;a:{b=da;for(var c=
a.length,d=r(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){b=e;break a}b=-1}return 0>b?null:r(a)?a.charAt(b):a[b]},fa=function(a){return Array.prototype.concat.apply(Array.prototype,arguments)},ga=function(a){var b=a.length;if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]},ha=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b},ia=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b},x=function(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];
for(c in d)a[c]=d[c];for(var f=0;f<ja.length;f++)c=ja[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}},y=function(){},z=function(a,b){this.b={};this.a=[];this.f=this.c=0;var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){a instanceof z?(c=a.m(),d=a.l()):(c=ia(a),d=ha(a));for(var e=0;e<c.length;e++)this.set(c[e],d[e])}},C=function(a){if(a.c!=a.a.length){for(var b=0,c=0;b<a.a.length;){var d=
a.a[b];A(a.b,d)&&(a.a[c++]=d);b++}a.a.length=c}if(a.c!=a.a.length){for(var e={},c=b=0;b<a.a.length;)d=a.a[b],A(e,d)||(a.a[c++]=d,e[d]=1),b++;a.a.length=c}},A=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},ka=function(a){if(a.l&&"function"==typeof a.l)return a.l();if(r(a))return a.split("");if(q(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return ha(a)},la=function(a){if(a.s&&"function"==typeof a.s)a=a.s();else if(q(a)||r(a))a=0==a.length;else a:{for(var b in a){a=
!1;break a}a=!0}return a},na=function(a,b){if("function"==typeof a.filter)return a.filter(b,void 0);if(q(a)||r(a))return ma(a,b,void 0);var c,d;if(a.m&&"function"==typeof a.m)d=a.m();else if(a.l&&"function"==typeof a.l)d=void 0;else if(q(a)||r(a)){c=[];d=a.length;for(var e=0;e<d;e++)c.push(e);d=c}else d=ia(a);var e=ka(a),f=e.length;if(d){c={};for(var g=0;g<f;g++)b.call(void 0,e[g],d[g],a)&&(c[d[g]]=e[g])}else for(c=[],g=0;g<f;g++)b.call(void 0,e[g],void 0,a)&&c.push(e[g]);return c},qa=function(){if(!oa["528"]){for(var a=
0,b=D(String(pa)).split("."),c=D("528").split("."),d=Math.max(b.length,c.length),e=0;0==a&&e<d;e++){var f=b[e]||"",g=c[e]||"",l=RegExp("(\\d*)(\\D*)","g"),m=RegExp("(\\d*)(\\D*)","g");do{var p=l.exec(f)||["","",""],n=m.exec(g)||["","",""];if(0==p[0].length&&0==n[0].length)break;a=w(0==p[1].length?0:parseInt(p[1],10),0==n[1].length?0:parseInt(n[1],10))||w(0==p[2].length,0==n[2].length)||w(p[2],n[2])}while(0==a)}oa["528"]=0<=a}},ra=function(){this.o=this.o;this.aa=this.aa},sa=function(a,b){this.type=
a;this.b=this.target=b;this.a=!1;this.va=!0},ua=function(a,b,c,d,e){this.listener=a;this.a=null;this.src=b;this.type=c;this.O=!!d;this.J=e;this.key=++ta;this.B=this.H=!1},va=function(a){a.B=!0;a.listener=null;a.a=null;a.src=null;a.J=null},wa=function(a){this.src=a;this.a={};this.b=0},ya=function(a,b,c,d,e){var f=b.toString();b=a.a[f];b||(b=a.a[f]=[],a.b++);var g=xa(b,c,d,e);-1<g?(a=b[g],a.H=!1):(a=new ua(c,a.src,f,!!d,e),a.H=!1,b.push(a));return a},Aa=function(a,b){var c=b.type;if(c in a.a){var d=
a.a[c],e=za(d,b),f;(f=0<=e)&&Array.prototype.splice.call(d,e,1);f&&(va(b),0==a.a[c].length&&(delete a.a[c],a.b--))}},xa=function(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.B&&f.listener==b&&f.O==!!c&&f.J==d)return e}return-1},E=function(a,b,c,d,e){if("array"==k(b))for(var f=0;f<b.length;f++)E(a,b[f],c,d,e);else if(c=Ba(c),a&&a[F])ya(a.c,String(b),c,d,e);else{if(!b)throw Error("Invalid event type");var f=!!d,g=Ca(a);g||(a[Da]=g=new wa(a));c=ya(g,b,c,d,e);if(!c.a){d=Ea();c.a=d;d.src=a;d.listener=
c;if(a.addEventListener)a.addEventListener(b.toString(),d,f);else if(a.attachEvent)a.attachEvent(Fa(b.toString()),d);else throw Error("addEventListener and attachEvent are unavailable.");Ga++}}},Ea=function(){function a(c){return b.call(a.src,a.listener,c)}var b=Ha;return a},Ia=function(a,b,c,d,e){if("array"==k(b))for(var f=0;f<b.length;f++)Ia(a,b[f],c,d,e);else(c=Ba(c),a&&a[F])?(a=a.c,b=String(b).toString(),b in a.a&&(f=a.a[b],c=xa(f,c,d,e),-1<c&&(va(f[c]),Array.prototype.splice.call(f,c,1),0==f.length&&
(delete a.a[b],a.b--)))):a&&(a=Ca(a))&&(b=a.a[b.toString()],a=-1,b&&(a=xa(b,c,!!d,e)),(c=-1<a?b[a]:null)&&Ja(c))},Ja=function(a){if("number"!=typeof a&&a&&!a.B){var b=a.src;if(b&&b[F])Aa(b.c,a);else{var c=a.type,d=a.a;b.removeEventListener?b.removeEventListener(c,d,a.O):b.detachEvent&&b.detachEvent(Fa(c),d);Ga--;(c=Ca(b))?(Aa(c,a),0==c.b&&(c.src=null,b[Da]=null)):va(a)}}},Fa=function(a){return a in Ka?Ka[a]:Ka[a]="on"+a},Ha=function(a){if(a.B)a=!0;else{var b=a.listener,c=a.J||a.src;a.H&&Ja(a);a=b.call(c,
null)}return a},Ca=function(a){a=a[Da];return a instanceof wa?a:null},Ba=function(a){if("function"==k(a))return a;a[La]||(a[La]=function(b){return a.handleEvent(b)});return a[La]},G=function(){ra.call(this);this.c=new wa(this);this.Z=this;this.P=null},I=function(a,b){var c,d=a.P;if(d)for(c=[];d;d=d.P)c.push(d);var d=a.Z,e=b,f=e.type||e;if(r(e))e=new sa(e,d);else if(e instanceof sa)e.target=e.target||d;else{var g=e,e=new sa(f,d);x(e,g)}var g=!0,l;if(c)for(var m=c.length-1;!e.a&&0<=m;m--)l=e.b=c[m],
g=H(l,f,!0,e)&&g;e.a||(l=e.b=d,g=H(l,f,!0,e)&&g,e.a||(g=H(l,f,!1,e)&&g));if(c)for(m=0;!e.a&&m<c.length;m++)l=e.b=c[m],g=H(l,f,!1,e)&&g},H=function(a,b,c,d){b=a.c.a[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,f=0;f<b.length;++f){var g=b[f];if(g&&!g.B&&g.O==c){var l=g.listener,m=g.J||g.src;g.H&&Aa(a.c,g);e=!1!==l.call(m,d)&&e}}return e&&0!=d.va},L=function(a,b){G.call(this);this.b=a||1;this.f=b||J;this.g=t(this.j,this);this.i=K()},M=function(a,b,c){if("function"==k(a))c&&(a=t(a,c));else if(a&&
"function"==typeof a.handleEvent)a=t(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<Number(b)?-1:J.setTimeout(a,b||0)},Ma=function(a,b){if(a)for(var c=a.split("\x26"),d=0;d<c.length;d++){var e=c[d].indexOf("\x3d"),f,g=null;0<=e?(f=c[d].substring(0,e),g=c[d].substring(e+1)):f=c[d];b(f,g?decodeURIComponent(g.replace(/\+/g," ")):"")}},N=function(a,b){this.g=this.j=this.c="";this.i=null;this.f=this.h="";this.a=this.o=!1;var c;if(a instanceof N){this.a=void 0!==b?b:a.a;
c=Na(this,a.c);var d=a.j;O(c);c.j=d;c=Oa(P(Pa(Qa(c,a.g),a.i),a.h),a.b.clone());d=a.f;O(c);c.f=d}else if(a&&(c=String(a).match(Ra))){this.a=!!b;var d=Na(this,c[1]||"",!0),e=c[2]||"";O(d);d.j=Q(e);d=Oa(P(Pa(Qa(d,c[3]||"",!0),c[4]),c[5]||"",!0),c[6]||"",!0);c=c[7]||"";O(d);d.f=Q(c)}else this.a=!!b,this.b=new R(null,0,this.a)},Na=function(a,b,c){O(a);a.c=c?Q(b,!0):b;a.c&&(a.c=a.c.replace(/:$/,""));return a},Qa=function(a,b,c){O(a);a.g=c?Q(b,!0):b;return a},Pa=function(a,b){O(a);if(b){b=Number(b);if(isNaN(b)||
0>b)throw Error("Bad port number "+b);a.i=b}else a.i=null;return a},P=function(a,b,c){O(a);a.h=c?Q(b,!0):b;return a},Oa=function(a,b,c){O(a);b instanceof R?(a.b=b,Sa(a.b,a.a)):(c||(b=S(b,Ta)),a.b=new R(b,0,a.a));return a},O=function(a){if(a.o)throw Error("Tried to modify a read-only Uri");},Q=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},S=function(a,b,c){return r(a)?(a=encodeURI(a).replace(b,Ua),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null},Ua=
function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},R=function(a,b,c){this.b=this.a=null;this.c=a||null;this.f=!!c},T=function(a){a.a||(a.a=new z,a.b=0,a.c&&Ma(a.c,function(b,c){var d=decodeURIComponent(b.replace(/\+/g," "));T(a);a.c=null;var d=U(a,d),e=a.a.get(d);e||a.a.set(d,e=[]);e.push(c);a.b+=1}))},Va=function(a,b){T(a);b=U(a,b);if(A(a.a.b,b)){a.c=null;a.b-=a.a.get(b).length;var c=a.a,d=b;A(c.b,d)&&(delete c.b[d],c.c--,c.f++,c.a.length>2*c.c&&C(c))}},Wa=function(a,
b){T(a);b=U(a,b);return A(a.a.b,b)},U=function(a,b){var c=String(b);a.f&&(c=c.toLowerCase());return c},Sa=function(a,b){b&&!a.f&&(T(a),a.c=null,a.a.forEach(function(a,b){var e=b.toLowerCase();b!=e&&(Va(this,b),Va(this,e),0<a.length&&(this.c=null,this.a.set(U(this,e),ga(a)),this.b+=a.length))},a));a.f=b},Xa=function(a,b,c){this.b=a;this.c=b;c||(a=c=new N("//www.google.com/images/cleardot.gif"),O(a),b=Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^K()).toString(36),
O(a),a.b.set("zx",b));this.f=c},Ya=function(a){a.N++;null!==navigator&&"onLine"in navigator&&!navigator.onLine?M(t(a.w,a,!1),0):(a.a=new Image,a.a.onload=t(a.oa,a),a.a.onerror=t(a.na,a),a.a.onabort=t(a.ma,a),a.L=M(a.pa,a.X,a),a.a.src=String(a.f))},Za=function(){},ab=function(a){var b;(b=a.a)||(b={},$a(a)&&(b[0]=!0,b[1]=!0),b=a.a=b);return b},bb=function(){},cb=function(a){return(a=$a(a))?new ActiveXObject(a):new XMLHttpRequest},$a=function(a){if(!a.b&&"undefined"==typeof XMLHttpRequest&&"undefined"!=
typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0;c<b.length;c++){var d=b[c];try{return new ActiveXObject(d),a.b=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.b},V=function(a){G.call(this);this.$=new z;this.j=a||null;this.b=!1;this.i=this.a=null;this.C="";this.f=this.v=this.g=this.u=!1;this.D=0;this.h=null;this.R="";this.F=this.ca=this.T=!1},hb=function(a,
b){if(a.a)throw Error("[goog.net.XhrIo] Object is active with another request\x3d"+a.C+"; newUri\x3d"+b);a.C=b;a.u=!1;a.b=!0;a.a=a.j?cb(a.j):cb(db);a.i=a.j?ab(a.j):ab(db);a.a.onreadystatechange=t(a.G,a);a.ca&&"onprogress"in a.a&&(a.a.onprogress=t(function(a){this.M(a,!0)},a),a.a.upload&&(a.a.upload.onprogress=t(a.M,a)));try{a.v=!0,a.a.open("GET",String(b),!0),a.v=!1}catch(f){eb(a);return}var c=a.$.clone(),d=ea(c.m()),e=J.FormData&&!1;!(0<=za(fb,"GET"))||d||e||c.set("Content-Type","application/x-www-form-urlencoded;charset\x3dutf-8");
c.forEach(function(a,b){this.a.setRequestHeader(b,a)},a);a.R&&(a.a.responseType=a.R);"withCredentials"in a.a&&a.a.withCredentials!==a.T&&(a.a.withCredentials=a.T);try{gb(a),0<a.D&&(a.F=!1,a.F?(a.a.timeout=a.D,a.a.ontimeout=t(a.S,a)):a.h=M(a.S,a.D,a)),a.g=!0,a.a.send(""),a.g=!1}catch(f){eb(a)}},da=function(a){return"content-type"==a.toLowerCase()},eb=function(a){a.b=!1;a.a&&(a.f=!0,a.a.abort(),a.f=!1);ib(a);jb(a)},ib=function(a){a.u||(a.u=!0,I(a,"complete"),I(a,"error"))},nb=function(a){if(a.b&&"undefined"!=
typeof kb&&(!a.i[1]||4!=(a.a?a.a.readyState:0)||2!=lb(a)))if(a.g&&4==(a.a?a.a.readyState:0))M(a.G,0,a);else if(I(a,"readystatechange"),4==(a.a?a.a.readyState:0)){a.b=!1;try{var b=lb(a),c;a:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:c=!0;break a;default:c=!1}var d;if(!(d=c)){var e;if(e=0===b){var f=String(a.C).match(Ra)[1]||null;if(!f&&J.self&&J.self.location)var g=J.self.location.protocol,f=g.substr(0,g.length-1);e=!mb.test(f?f.toLowerCase():"")}d=e}d?(I(a,"complete"),
I(a,"success")):ib(a)}finally{jb(a)}}},ob=function(a,b){return{type:b,lengthComputable:a.lengthComputable,loaded:a.loaded,total:a.total}},jb=function(a){if(a.a){gb(a);var b=a.a,c=a.i[0]?aa:null;a.a=null;a.i=null;I(a,"ready");try{b.onreadystatechange=c}catch(d){}}},gb=function(a){a.a&&a.F&&(a.a.ontimeout=null);"number"==typeof a.h&&(J.clearTimeout(a.h),a.h=null)},lb=function(a){try{return 2<(a.a?a.a.readyState:0)?a.a.status:-1}catch(b){return-1}},pb=function(a){if(/^[0-9]+$/.test(a))return parseInt(a,
10)},qb=function(a,b,c){this.Y=a;this.a=pb(b);this.index=pb(c)},rb=function(a){this.a=a||{cookie:""}},tb=function(a){a=(a.a.cookie||"").split(sb);for(var b=[],c=[],d,e,f=0;e=a[f];f++)d=e.indexOf("\x3d"),-1==d?(b.push(""),c.push(e)):(b.push(e.substring(0,d)),c.push(e.substring(d+1)));return{keys:b,values:c}},ub=function(){this.a=W()},vb=function(a){var b;if(b=!!W())(b=!X.get("WML"))||(b=W()!=a.a);return b},W=function(){return X.get(wb())},xb=function(a,b){this.b=a;this.a=b},yb=function(a,b){a.a.c(a.b,
function(a){a.incCounterImpression&&a.incCounterImpression(b)})},Y=function(a,b,c){a.a.c(a.b,function(a){a.setNumericImpression&&a.setNumericImpression(b,c)})},zb=function(){try{this.a=openDatabase("OfflineMailUsers","1.0","Google Mail Offline Users Database",4096)}catch(b){this.a=void 0;return}var a=this;this.a.transaction(function(a){a.executeSql("CREATE TABLE IF NOT EXISTS users (email TEXT PRIMARY KEY, partition TEXT)")},function(){a.a=void 0})},Ab=function(a,b){function c(a,b){for(var c=0;c<
b.rows.length;c++){var l=b.rows.item(c),m=D(l.email.toLowerCase());d[m]=new qb(m,l.partition,"")}}if(a.a){var d={};a.a.transaction(function(a){a.executeSql("SELECT * FROM users",[],c)},function(){b(void 0)},function(){b(d)})}else b(void 0)},Bb=function(a,b){la(b)||a.a.transaction(function(a){for(var d=0;d<b.length;d++){var e=b[d],f=e.a;a.executeSql("UPDATE users SET partition\x3d? WHERE email\x3d?",[void 0!=f?f.toString():"",e.Y])}})},Cb=function(a,b){return function(c,d){return b&&!!a[d]||!b&&!a[d]}},
Z=function(a,b,c,d,e,f){this.i=a;this.D=c;this.F=d;this.G=e;this.u=f;this.b={};this.h={};this.a={};this.f={};this.o=new V;E(this.o,"success",this.v,!1,this);this.j=new zb;this.g={};E(b,"tick",this.C,!1,this)},Db=function(a,b){Ab(a.j,t(a.M,a,b))},Eb=function(a,b){var c=a.b[b];c&&(a.F(c),delete a.b[b])},Gb=function(a,b){for(var c in b){var d=a.b[c];d||(d=a.D(Fb(a,c),b[c].a),a.b[c]=d)}},Ib=function(a,b){var c=Hb(a,b);if(!c.a){var d=K();c.a=window.setTimeout(function(){var d=a.a[b];if(d){yb(Fb(a,b),"sp-bg-sf-ru");
var f={};f[b]=d;Eb(a,b);Gb(a,f)}c.a=void 0;c.b=K()},Math.max(c.b+36E5-d,0))}},Fb=function(a,b){return a.h[b]?a.h[b]:a.h[b]=new xb(b,a)},Hb=function(a,b){var c=a.g[b];c||(c=new Jb,a.g[b]=c);return c},Kb=function(a,b){var c=a.b[b];if(c&&c.contentWindow)return c.contentWindow.syncManager},Jb=function(){this.a=void 0;this.b=0},Lb=function(a,b){Ab(a.j,t(function(a){for(var d in a)a=Fb(this,d),Y(a,"sp-ep-npl",b.notifications),0<b.notifications&&(Y(a,"sp-ep-lpn",Math.floor(100/b.notifications)),Y(a,"sp-ep-ap",
100-Math.floor(100/b.notifications))),Y(a,"sp-ep-lt",b.lifetime)},a))},Mb=function(a,b,c){this.f=b;this.b=c;this.a=K()+this.b;E(a,"tick",this.c,!1,this)},Qb=function(a,b,c){this.c=a;Nb||(Nb=new ub);this.a=new Z(Nb,this.c,t(this.wa,this),t(this.xa,this),t(this.Ba,this),"/mail/mu/"+Ob());new Mb(a,this.V,864E5);this.b={};E(a,"tick",this.la,!1,this);E(b,"updateready",this.V);Pb(this,c);window.localStorage.setItem("background/external/capabilitiesVersion","1")},Rb=function(a,b){var c=new N(b||window.location.href),
d="/mail/mu/";void 0!=a&&(d+="mp/"+a+"/");d=P(c,d);O(d);d.b.set("msui","sync");return c},Sb=function(a,b){a.a.c(b,function(a){a.forceSyncPurge&&a.forceSyncPurge()})},Pb=function(a,b){(b||window).addEventListener("storage",function(b){"background/external/sync"==b.key&&a.I(b.value)},!1)},kb=kb||{},J=this,K=Date.now||function(){return+new Date};var D=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};var za=Array.prototype.indexOf?function(a,b,c){return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(r(a))return r(b)&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},ma=Array.prototype.filter?function(a,b,c){return Array.prototype.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=[],f=0,g=r(a)?a.split(""):a,l=0;l<d;l++)if(l in g){var m=g[l];b.call(c,m,l,a)&&(e[f++]=m)}return e};var ja="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");var Tb;a:{var Ub=J.navigator;if(Ub){var Vb=Ub.userAgent;if(Vb){Tb=Vb;break a}}Tb=""};var Wb="StopIteration"in J?J.StopIteration:{message:"StopIteration",stack:""};y.prototype.next=function(){throw Wb;};y.prototype.da=function(){return this};h=z.prototype;h.l=function(){C(this);for(var a=[],b=0;b<this.a.length;b++)a.push(this.b[this.a[b]]);return a};h.m=function(){C(this);return this.a.concat()};h.s=function(){return 0==this.c};h.get=function(a,b){return A(this.b,a)?this.b[a]:b};h.set=function(a,b){A(this.b,a)||(this.c++,this.a.push(a),this.f++);this.b[a]=b};h.forEach=function(a,b){for(var c=this.m(),d=0;d<c.length;d++){var e=c[d],f=this.get(e);a.call(b,f,e,this)}};h.clone=function(){return new z(this)};
h.da=function(a){C(this);var b=0,c=this.f,d=this,e=new y;e.next=function(){if(c!=d.f)throw Error("The map has changed since the iterator was created");if(b>=d.a.length)throw Wb;var e=d.a[b++];return a?e:d.b[e]};return e};var Xb="",Yb=/WebKit\/(\S+)/.exec(Tb);Yb&&(Xb=Yb?Yb[1]:"");var pa=Xb,oa={};ra.prototype.o=!1;qa();qa();var F="closure_listenable_"+(1E6*Math.random()|0),ta=0;var Da="closure_lm_"+(1E6*Math.random()|0),Ka={},Ga=0,La="__closure_events_fn_"+(1E9*Math.random()>>>0);u(G,ra);G.prototype[F]=!0;G.prototype.removeEventListener=function(a,b,c,d){Ia(this,a,b,c,d)};u(L,G);L.prototype.h=!1;L.prototype.a=null;L.prototype.j=function(){if(this.h){var a=K()-this.i;0<a&&a<.8*this.b?this.a=this.f.setTimeout(this.g,this.b-a):(this.a&&(this.f.clearTimeout(this.a),this.a=null),I(this,"tick"),this.h&&(this.a=this.f.setTimeout(this.g,this.b),this.i=K()))}};var Ra=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;N.prototype.toString=function(){var a=[],b=this.c;b&&a.push(S(b,Zb,!0),":");var c=this.g;if(c||"file"==b)a.push("//"),(b=this.j)&&a.push(S(b,Zb,!0),"@"),a.push(encodeURIComponent(String(c)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),c=this.i,null!=c&&a.push(":",String(c));if(c=this.h)this.g&&"/"!=c.charAt(0)&&a.push("/"),a.push(S(c,"/"==c.charAt(0)?$b:ac,!0));(c=this.b.toString())&&a.push("?",c);(c=this.f)&&a.push("#",S(c,bc));return a.join("")};N.prototype.clone=function(){return new N(this)};
var Zb=/[#\/\?@]/g,ac=/[\#\?:]/g,$b=/[\#\?]/g,Ta=/[\#\?@]/g,bc=/#/g;h=R.prototype;h.s=function(){T(this);return 0==this.b};h.m=function(){T(this);for(var a=this.a.l(),b=this.a.m(),c=[],d=0;d<b.length;d++)for(var e=a[d],f=0;f<e.length;f++)c.push(b[d]);return c};h.l=function(a){T(this);var b=[];if(r(a))Wa(this,a)&&(b=fa(b,this.a.get(U(this,a))));else{a=this.a.l();for(var c=0;c<a.length;c++)b=fa(b,a[c])}return b};
h.set=function(a,b){T(this);this.c=null;a=U(this,a);Wa(this,a)&&(this.b-=this.a.get(a).length);this.a.set(a,[b]);this.b+=1;return this};h.get=function(a,b){var c=a?this.l(a):[];return 0<c.length?String(c[0]):b};h.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var a=[],b=this.a.m(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.l(d),f=0;f<d.length;f++){var g=e;""!==d[f]&&(g+="\x3d"+encodeURIComponent(String(d[f])));a.push(g)}return this.c=a.join("\x26")};
h.clone=function(){var a=new R;a.c=this.c;this.a&&(a.a=this.a.clone(),a.b=this.b);return a};h=Xa.prototype;h.X=1E4;h.K=!1;h.ua=0;h.N=0;h.U=0;h.L=null;h.A=null;h.setTimeout=function(a){this.X=a};h.oa=function(){this.w(!0)};h.na=function(){this.w(!1)};h.ma=function(){this.w(!1)};h.pa=function(){this.w(!1)};
h.w=function(a){this.a&&(this.a.onload=null,this.a.onerror=null,this.a=this.a.onabort=null);this.L&&(J.clearTimeout(this.L),this.L=null);this.A&&(J.clearTimeout(this.A),this.A=null);a?(this.K=!1,this.b.call(this.c,!0)):this.N<=this.ua?this.U?this.A=M(this.ra,this.U,this):Ya(this):(this.K=!1,this.b.call(this.c,!1))};h.ra=function(){this.A=null;Ya(this)};Za.prototype.a=null;var db;u(bb,Za);db=new bb;u(V,G);var mb=/^https?$/i,fb=["POST","PUT"];V.prototype.S=function(){"undefined"!=typeof kb&&this.a&&(I(this,"timeout"),this.a&&this.b&&(this.b=!1,this.f=!0,this.a.abort(),this.f=!1,I(this,"complete"),I(this,"abort"),jb(this)))};V.prototype.G=function(){this.o||(this.v||this.g||this.f?nb(this):this.ba())};V.prototype.ba=function(){nb(this)};V.prototype.M=function(a,b){I(this,ob(a,"progress"));I(this,ob(a,b?"downloadprogress":"uploadprogress"))};var sb=/\s*;\s*/;h=rb.prototype;h.set=function(a,b,c,d,e,f){if(/[;=\s]/.test(a))throw Error('Invalid cookie name "'+a+'"');if(/[;\r\n]/.test(b))throw Error('Invalid cookie value "'+b+'"');void 0!==c||(c=-1);e=e?";domain\x3d"+e:"";d=d?";path\x3d"+d:"";f=f?";secure":"";c=0>c?"":0==c?";expires\x3d"+(new Date(1970,1,1)).toUTCString():";expires\x3d"+(new Date(K()+1E3*c)).toUTCString();this.a.cookie=a+"\x3d"+b+e+d+c+f};
h.get=function(a,b){for(var c=a+"\x3d",d=(this.a.cookie||"").split(sb),e=0,f;f=d[e];e++){if(0==f.lastIndexOf(c,0))return f.substr(c.length);if(f==a)return""}return b};h.m=function(){return tb(this).keys};h.l=function(){return tb(this).values};h.s=function(){return!this.a.cookie};var X=new rb("undefined"==typeof document?null:document);X.b=3950;var Nb,wb=v("SID");Z.prototype.C=function(){Db(this,!0)};
Z.prototype.M=function(a,b){if(b)if(this.a=b,a&&vb(this.i))this.i.a=W(),hb(this.o,this.u);else{var c;if(W()){var d=X.get("WML"),e=/GAUSR.*?=([^;]+)/.exec(document.cookie);c=[];if(d){c={W:[],timestamp:null};if(d&&(d=d.split("#"))){c.timestamp=d[0];for(var e=1,f=d.length;e<f;++e){var g=d[e].split(":");if(!(3>g.length)){var l=D(g[0].toLowerCase()),m=D(g[1]),g=D(g[2]);c.W.push(new qb(l,m,g))}}}c=c.W}else e&&c.push(new qb(D(decodeURIComponent(e[1]).toLowerCase()),"",""));d={};for(e=0;e<c.length;e++)d[c[e].Y]=
c[e];c=d}else c={};var d=[],p;for(p in c)(e=this.a[p])&&e.a!=c[p].a&&(d.push(c[p]),e.a=c[p].a);la(d)||Bb(this.j,d);p=this.b;var d={},n;for(n in p)e=this.a[n],this.G(p[n],e.a)||(d[n]=e);x(this.f,d);n=na(b,Cb(c,!1));x(n,this.f);for(var B in n)if(Eb(this,B),n=this.g[B])window.clearTimeout(n.a),delete this.g[B];B=na(c,Cb(b,!0));B=na(B,Cb(this.f,!1));Gb(this,B)}};Z.prototype.c=function(a,b,c){var d=Kb(this,a);d?b(d):(c=c||1E3,6E5<c||(Ib(this,a),window.setTimeout(t(this.c,this,a,b,2*c),c)))};
Z.prototype.v=function(){this.f={};vb(this.i)||Db(this,!1)};Mb.prototype.c=function(){this.a<K()&&(this.a=K()+this.b,this.f())};var Ob=v("continue?mui\x3dca\x26msui\x3dbackground");h=Qb.prototype;h.wa=function(a,b,c){b=Rb(b,c);var d=document.createElement("iframe");document.body.appendChild(d);d.addEventListener("load",function(){try{if(d.contentWindow.USER_EMAIL){yb(a,"sp-bg-sf-ls");return}}catch(b){}yb(a,"sp-bg-sf-lf")},!1);d.src=b.toString();return d};
h.Ba=function(a,b,c){function d(a){var b=a.h;b.match(/\/$/)||P(a,b+"/");O(a);a.f=""}try{var e=a.contentWindow.location.href}catch(f){e=""}a=Rb(b,c);e=new N(e);d(e);d(a);return a.toString()==e.toString()};h.xa=function(a){a.src="about:blank";try{document.body.removeChild(a)}catch(b){}};h.V=function(){window.location.reload(!1)};h.ja=function(a,b){1==b&&Ib(this.a,a)};h.ga=function(a){a=(a=this.a.b[a])&&a.contentWindow&&a.contentWindow.getDebugLogBuffer?a.contentWindow.getDebugLogBuffer():null;return a};
h.ha=function(a){a=(a=this.a.b[a])&&a.contentWindow&&a.contentWindow.getDebugLogRoot?a.contentWindow.getDebugLogRoot():void 0;return a};h.I=function(a,b){this.a.c(a,function(a){a.forceSync(b)})};h.ea=function(){var a=this.a.a,b;for(b in a)Sb(this,b)};h.ya=function(a){var b=this.a.a,c;for(c in b)this.I(c,a)};h.ka=function(){var a=this.a,b=a.a,c;for(c in b)if((b=Kb(a,c))&&b.isCurrentlySyncing())return!0;return!1};h.Aa=function(a,b,c){this.a.c(a,function(a){a.updateSyncWindow(b)},c)};
h.ta=function(a){this.b[a]?this.b[a]++:this.b[a]=1;this.I(a)};h.za=function(a){this.b[a]&&this.b[a]--};h.ia=function(a){return this.b[a]||0};h.la=function(){var a=new Xa(this.qa,this);if(a.K)throw Error("NetworkTester.start called when already running");a.K=!0;a.N=0;Ya(a)};h.qa=function(a){if(a){a=this.a.a;for(var b in a)(a=Kb(this.a,b))&&a.isStuck&&a.isStuck()&&Ib(this.a,b)}};h.fa=function(){Db(this.a,!0)};h.sa=function(a){Lb(this.a,a)};
window._main=function(){window.isBackgroundPage=!0;var a=new L(3E5),b=new Qb(a,window.applicationCache);window.handleSyncError=t(b.ja,b);window.forceSync=t(b.I,b);window.forceSyncPurgeAll=t(b.ea,b);window.syncAll=t(b.ya,b);window.isSyncing=t(b.ka,b);window.updateSyncWindow=t(b.Aa,b);window.registerForegroundWindow=t(b.ta,b);window.unregisterForegroundWindow=t(b.za,b);window.getForegroundWindowCount=t(b.ia,b);window.getBackgroundDebugLogBuffer=t(b.ga,b);window.getBackgroundDebugLogRoot=t(b.ha,b);window.backgroundApplication=
b;window.forceUpdateUsers=t(b.fa,b);window.recordMetricsForFirstUser=t(b.sa,b);window.localStorage.setItem("background/laststarttime",String(K()));a.h=!0;a.a||(a.a=a.f.setTimeout(a.g,a.b),a.i=K());I(a,"tick")};Ob=v("continue?mui\x3dca\x26msui\x3dbackground\x26ic\x3d1");wb=v("SAPISID");
_main();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment