@firebase/webchannel-wrapper 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,7 @@ var esm = {};
10
10
 
11
11
  var k,goog=goog||{},l=commonjsGlobal||self;function aa(){}function ba(a){var b=typeof a;b="object"!=b?b:a?Array.isArray(a)?"array":b:"null";return "array"==b||"object"==b&&"number"==typeof a.length}function p(a){var b=typeof a;return "object"==b&&null!=a||"function"==b}function ca(a){return Object.prototype.hasOwnProperty.call(a,da)&&a[da]||(a[da]=++ea)}var da="closure_uid_"+(1E9*Math.random()>>>0),ea=0;function fa(a,b,c){return a.call.apply(a.bind,arguments)}
12
12
  function ha(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(e,d);return a.apply(b,e)}}return function(){return a.apply(b,arguments)}}function q(a,b,c){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?q=fa:q=ha;return q.apply(null,arguments)}
13
- function ia(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var d=c.slice();d.push.apply(d,arguments);return a.apply(this,d)}}function t(a,b){function c(){}c.prototype=b.prototype;a.X=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Wb=function(d,e,f){for(var h=Array(arguments.length-2),n=2;n<arguments.length;n++)h[n-2]=arguments[n];return b.prototype[e].apply(d,h)};}function v(){this.s=this.s;this.o=this.o;}var ja=0,ka={};v.prototype.s=!1;v.prototype.na=function(){if(!this.s&&(this.s=!0,this.M(),0!=ja)){var a=ca(this);delete ka[a];}};v.prototype.M=function(){if(this.o)for(;this.o.length;)this.o.shift()();};const la=Array.prototype.indexOf?function(a,b){return Array.prototype.indexOf.call(a,b,void 0)}:function(a,b){if("string"===typeof a)return "string"!==typeof b||1!=b.length?-1:a.indexOf(b,0);for(let c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return -1};function ma(a){const b=a.length;if(0<b){const c=Array(b);for(let d=0;d<b;d++)c[d]=a[d];return c}return []}
13
+ function ia(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var d=c.slice();d.push.apply(d,arguments);return a.apply(this,d)}}function t(a,b){function c(){}c.prototype=b.prototype;a.X=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Wb=function(d,e,f){for(var h=Array(arguments.length-2),n=2;n<arguments.length;n++)h[n-2]=arguments[n];return b.prototype[e].apply(d,h)};}function v(){this.s=this.s;this.o=this.o;}var ja=0;v.prototype.s=!1;v.prototype.na=function(){if(!this.s&&(this.s=!0,this.M(),0!=ja)){ca(this);}};v.prototype.M=function(){if(this.o)for(;this.o.length;)this.o.shift()();};const la=Array.prototype.indexOf?function(a,b){return Array.prototype.indexOf.call(a,b,void 0)}:function(a,b){if("string"===typeof a)return "string"!==typeof b||1!=b.length?-1:a.indexOf(b,0);for(let c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return -1};function ma(a){const b=a.length;if(0<b){const c=Array(b);for(let d=0;d<b;d++)c[d]=a[d];return c}return []}
14
14
  function na(a,b){for(let c=1;c<arguments.length;c++){const d=arguments[c];if(ba(d)){const e=a.length||0,f=d.length||0;a.length=e+f;for(let h=0;h<f;h++)a[e+h]=d[h];}else a.push(d);}}function w(a,b){this.type=a;this.g=this.target=b;this.defaultPrevented=!1;}w.prototype.h=function(){this.defaultPrevented=!0;};var oa=function(){if(!l.addEventListener||!Object.defineProperty)return !1;var a=!1,b=Object.defineProperty({},"passive",{get:function(){a=!0;}});try{l.addEventListener("test",aa,b),l.removeEventListener("test",aa,b);}catch(c){}return a}();function pa(a){return /^[\s\xa0]*$/.test(a)}var qa=String.prototype.trim?function(a){return a.trim()}:function(a){return /^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(a)[1]};function ra(a,b){return a<b?-1:a>b?1:0}function sa(){var a=l.navigator;return a&&(a=a.userAgent)?a:""}function x(a){return -1!=sa().indexOf(a)}function ta(a){ta[" "](a);return a}ta[" "]=aa;function ua(a){var b=va;return Object.prototype.hasOwnProperty.call(b,9)?b[9]:b[9]=a(9)}var wa=x("Opera"),y=x("Trident")||x("MSIE"),xa=x("Edge"),ya=xa||y,za=x("Gecko")&&!(-1!=sa().toLowerCase().indexOf("webkit")&&!x("Edge"))&&!(x("Trident")||x("MSIE"))&&!x("Edge"),Aa=-1!=sa().toLowerCase().indexOf("webkit")&&!x("Edge");function Ba(){var a=l.document;return a?a.documentMode:void 0}var Ea;
15
15
  a:{var Fa="",Ga=function(){var a=sa();if(za)return /rv:([^\);]+)(\)|;)/.exec(a);if(xa)return /Edge\/([\d\.]+)/.exec(a);if(y)return /\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(Aa)return /WebKit\/(\S+)/.exec(a);if(wa)return /(?:Version)[ \/]?(\S+)/.exec(a)}();Ga&&(Fa=Ga?Ga[1]:"");if(y){var Ha=Ba();if(null!=Ha&&Ha>parseFloat(Fa)){Ea=String(Ha);break a}}Ea=Fa;}var va={};
16
16
  function Ia(){return ua(function(){let a=0;const b=qa(String(Ea)).split("."),c=qa("9").split("."),d=Math.max(b.length,c.length);for(let h=0;0==a&&h<d;h++){var e=b[h]||"",f=c[h]||"";do{e=/(\d*)(\D*)(.*)/.exec(e)||["","","",""];f=/(\d*)(\D*)(.*)/.exec(f)||["","","",""];if(0==e[0].length&&0==f[0].length)break;a=ra(0==e[1].length?0:parseInt(e[1],10),0==f[1].length?0:parseInt(f[1],10))||ra(0==e[2].length,0==f[2].length)||ra(e[2],f[2]);e=e[3];f=f[3];}while(0==a)}return 0<=a})}var Ja;
@@ -29,16 +29,16 @@ function kb(a,b,c,d){b=a.i.g[String(b)];if(!b)return !0;b=b.concat();for(var e=!
29
29
  class qb{constructor(){this.next=this.g=this.h=null;}set(a,b){this.h=a;this.g=b;this.next=null;}reset(){this.next=this.g=this.h=null;}}function rb(a){l.setTimeout(()=>{throw a;},0);}function sb(a,b){ub||vb();wb||(ub(),wb=!0);nb.add(a,b);}var ub;function vb(){var a=l.Promise.resolve(void 0);ub=function(){a.then(xb);};}var wb=!1,nb=new ob;function xb(){for(var a;a=mb();){try{a.h.call(a.g);}catch(c){rb(c);}var b=pb;b.j(a);100>b.h&&(b.h++,a.next=b.g,b.g=a);}wb=!1;}function yb(a,b){B.call(this);this.h=a||1;this.g=b||l;this.j=q(this.lb,this);this.l=Date.now();}t(yb,B);k=yb.prototype;k.ca=!1;k.R=null;k.lb=function(){if(this.ca){var a=Date.now()-this.l;0<a&&a<.8*this.h?this.R=this.g.setTimeout(this.j,this.h-a):(this.R&&(this.g.clearTimeout(this.R),this.R=null),C(this,"tick"),this.ca&&(zb(this),this.start()));}};k.start=function(){this.ca=!0;this.R||(this.R=this.g.setTimeout(this.j,this.h),this.l=Date.now());};
30
30
  function zb(a){a.ca=!1;a.R&&(a.g.clearTimeout(a.R),a.R=null);}k.M=function(){yb.X.M.call(this);zb(this);delete this.g;};function Ab(a,b,c){if("function"===typeof a)c&&(a=q(a,c));else if(a&&"function"==typeof a.handleEvent)a=q(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<Number(b)?-1:l.setTimeout(a,b||0)}function Bb(a){a.g=Ab(()=>{a.g=null;a.i&&(a.i=!1,Bb(a));},a.j);const b=a.h;a.h=null;a.m.apply(null,b);}class Cb extends v{constructor(a,b){super();this.m=a;this.j=b;this.h=null;this.i=!1;this.g=null;}l(a){this.h=arguments;this.g?this.i=!0:Bb(this);}M(){super.M();this.g&&(l.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null);}}function D(a){v.call(this);this.h=a;this.g={};}t(D,v);var Db=[];function Eb(a,b,c,d){Array.isArray(c)||(c&&(Db[0]=c.toString()),c=Db);for(var e=0;e<c.length;e++){var f=$a(b,c[e],d||a.handleEvent,!1,a.h||a);if(!f)break;a.g[f.key]=f;}}function Fb(a){Qa(a.g,function(b,c){this.g.hasOwnProperty(c)&&ib(b);},a);a.g={};}D.prototype.M=function(){D.X.M.call(this);Fb(this);};D.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};function Gb(){this.g=!0;}Gb.prototype.Aa=function(){this.g=!1;};function Hb(a,b,c,d,e,f){a.info(function(){if(a.g)if(f){var h="";for(var n=f.split("&"),u=0;u<n.length;u++){var m=n[u].split("=");if(1<m.length){var r=m[0];m=m[1];var F=r.split("_");h=2<=F.length&&"type"==F[1]?h+(r+"="+m+"&"):h+(r+"=redacted&");}}}else h=null;else h=f;return "XMLHTTP REQ ("+d+") [attempt "+e+"]: "+b+"\n"+c+"\n"+h});}
31
31
  function Ib(a,b,c,d,e,f,h){a.info(function(){return "XMLHTTP RESP ("+d+") [ attempt "+e+"]: "+b+"\n"+c+"\n"+f+" "+h});}function E(a,b,c,d){a.info(function(){return "XMLHTTP TEXT ("+b+"): "+Jb(a,c)+(d?" "+d:"")});}function Kb(a,b){a.info(function(){return "TIMEOUT: "+b});}Gb.prototype.info=function(){};
32
- function Jb(a,b){if(!a.g)return b;if(!b)return null;try{var c=JSON.parse(b);if(c)for(a=0;a<c.length;a++)if(Array.isArray(c[a])){var d=c[a];if(!(2>d.length)){var e=d[1];if(Array.isArray(e)&&!(1>e.length)){var f=e[0];if("noop"!=f&&"stop"!=f&&"close"!=f)for(var h=1;h<e.length;h++)e[h]="";}}}return lb(c)}catch(n){return b}}var G={},Lb=null;function Mb(){return Lb=Lb||new B}G.Pa="serverreachability";function Nb(a){w.call(this,G.Pa,a);}t(Nb,w);function H(a){const b=Mb();C(b,new Nb(b,a));}G.STAT_EVENT="statevent";function Ob(a,b){w.call(this,G.STAT_EVENT,a);this.stat=b;}t(Ob,w);function I(a){const b=Mb();C(b,new Ob(b,a));}G.Qa="timingevent";function Pb(a,b){w.call(this,G.Qa,a);this.size=b;}t(Pb,w);
32
+ function Jb(a,b){if(!a.g)return b;if(!b)return null;try{var c=JSON.parse(b);if(c)for(a=0;a<c.length;a++)if(Array.isArray(c[a])){var d=c[a];if(!(2>d.length)){var e=d[1];if(Array.isArray(e)&&!(1>e.length)){var f=e[0];if("noop"!=f&&"stop"!=f&&"close"!=f)for(var h=1;h<e.length;h++)e[h]="";}}}return lb(c)}catch(n){return b}}var G={},Lb=null;function Mb(){return Lb=Lb||new B}G.Pa="serverreachability";function Nb(a){w.call(this,G.Pa,a);}t(Nb,w);function H(a){const b=Mb();C(b,new Nb(b));}G.STAT_EVENT="statevent";function Ob(a,b){w.call(this,G.STAT_EVENT,a);this.stat=b;}t(Ob,w);function I(a){const b=Mb();C(b,new Ob(b,a));}G.Qa="timingevent";function Pb(a,b){w.call(this,G.Qa,a);this.size=b;}t(Pb,w);
33
33
  function J(a,b){if("function"!==typeof a)throw Error("Fn must not be null and must be a function");return l.setTimeout(function(){a();},b)}var Qb={NO_ERROR:0,mb:1,zb:2,yb:3,tb:4,xb:5,Ab:6,Ma:7,TIMEOUT:8,Db:9};var Rb={rb:"complete",Nb:"success",Na:"error",Ma:"abort",Fb:"ready",Gb:"readystatechange",TIMEOUT:"timeout",Bb:"incrementaldata",Eb:"progress",ub:"downloadprogress",Vb:"uploadprogress"};function Sb(){}Sb.prototype.h=null;function Tb(a){return a.h||(a.h=a.i())}function Ub(){}var K={OPEN:"a",qb:"b",Na:"c",Cb:"d"};function Vb(){w.call(this,"d");}t(Vb,w);function Wb(){w.call(this,"c");}t(Wb,w);var Xb;function Yb(){}t(Yb,Sb);Yb.prototype.g=function(){return new XMLHttpRequest};Yb.prototype.i=function(){return {}};Xb=new Yb;function L(a,b,c,d){this.l=a;this.j=b;this.m=c;this.U=d||1;this.S=new D(this);this.O=Zb;a=ya?125:void 0;this.T=new yb(a);this.H=null;this.i=!1;this.s=this.A=this.v=this.K=this.F=this.V=this.B=null;this.D=[];this.g=null;this.C=0;this.o=this.u=null;this.Y=-1;this.I=!1;this.N=0;this.L=null;this.$=this.J=this.Z=this.P=!1;this.h=new $b;}function $b(){this.i=null;this.g="";this.h=!1;}var Zb=45E3,ac={},bc={};k=L.prototype;k.setTimeout=function(a){this.O=a;};
34
- function cc(a,b,c){a.K=1;a.v=dc(M(b));a.s=c;a.P=!0;ec(a,null);}function ec(a,b){a.F=Date.now();N(a);a.A=M(a.v);var c=a.A,d=a.U;Array.isArray(d)||(d=[String(d)]);fc(c.i,"t",d);a.C=0;c=a.l.H;a.h=new $b;a.g=gc(a.l,c?b:null,!a.s);0<a.N&&(a.L=new Cb(q(a.La,a,a.g),a.N));Eb(a.S,a.g,"readystatechange",a.ib);b=a.H?Ra(a.H):{};a.s?(a.u||(a.u="POST"),b["Content-Type"]="application/x-www-form-urlencoded",a.g.da(a.A,a.u,a.s,b)):(a.u="GET",a.g.da(a.A,a.u,null,b));H(1);Hb(a.j,a.u,a.A,a.m,a.U,a.s);}
34
+ function cc(a,b,c){a.K=1;a.v=dc(M(b));a.s=c;a.P=!0;ec(a,null);}function ec(a,b){a.F=Date.now();N(a);a.A=M(a.v);var c=a.A,d=a.U;Array.isArray(d)||(d=[String(d)]);fc(c.i,"t",d);a.C=0;c=a.l.H;a.h=new $b;a.g=gc(a.l,c?b:null,!a.s);0<a.N&&(a.L=new Cb(q(a.La,a,a.g),a.N));Eb(a.S,a.g,"readystatechange",a.ib);b=a.H?Ra(a.H):{};a.s?(a.u||(a.u="POST"),b["Content-Type"]="application/x-www-form-urlencoded",a.g.da(a.A,a.u,a.s,b)):(a.u="GET",a.g.da(a.A,a.u,null,b));H();Hb(a.j,a.u,a.A,a.m,a.U,a.s);}
35
35
  k.ib=function(a){a=a.target;const b=this.L;b&&3==O(a)?b.l():this.La(a);};
36
36
  k.La=function(a){try{if(a==this.g)a:{const r=O(this.g);var b=this.g.Ea();const F=this.g.aa();if(!(3>r)&&(3!=r||ya||this.g&&(this.h.h||this.g.fa()||hc(this.g)))){this.I||4!=r||7==b||(8==b||0>=F?H(3):H(2));ic(this);var c=this.g.aa();this.Y=c;b:if(jc(this)){var d=hc(this.g);a="";var e=d.length,f=4==O(this.g);if(!this.h.i){if("undefined"===typeof TextDecoder){P(this);Q(this);var h="";break b}this.h.i=new l.TextDecoder;}for(b=0;b<e;b++)this.h.h=!0,a+=this.h.i.decode(d[b],{stream:f&&b==e-1});d.splice(0,
37
37
  e);this.h.g+=a;this.C=0;h=this.h.g;}else h=this.g.fa();this.i=200==c;Ib(this.j,this.u,this.A,this.m,this.U,r,c);if(this.i){if(this.Z&&!this.J){b:{if(this.g){var n,u=this.g;if((n=u.g?u.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!pa(n)){var m=n;break b}}m=null;}if(c=m)E(this.j,this.m,c,"Initial handshake response via X-HTTP-Initial-Response"),this.J=!0,kc(this,c);else {this.i=!1;this.o=3;I(12);P(this);Q(this);break a}}this.P?(lc(this,r,h),ya&&this.i&&3==r&&(Eb(this.S,this.T,"tick",this.hb),
38
38
  this.T.start())):(E(this.j,this.m,h,null),kc(this,h));4==r&&P(this);this.i&&!this.I&&(4==r?mc(this.l,this):(this.i=!1,N(this)));}else 400==c&&0<h.indexOf("Unknown SID")?(this.o=3,I(12)):(this.o=0,I(13)),P(this),Q(this);}}}catch(r){}finally{}};function jc(a){return a.g?"GET"==a.u&&2!=a.K&&a.l.Da:!1}
39
39
  function lc(a,b,c){let d=!0,e;for(;!a.I&&a.C<c.length;)if(e=nc(a,c),e==bc){4==b&&(a.o=4,I(14),d=!1);E(a.j,a.m,null,"[Incomplete Response]");break}else if(e==ac){a.o=4;I(15);E(a.j,a.m,c,"[Invalid Chunk]");d=!1;break}else E(a.j,a.m,e,null),kc(a,e);jc(a)&&e!=bc&&e!=ac&&(a.h.g="",a.C=0);4!=b||0!=c.length||a.h.h||(a.o=1,I(16),d=!1);a.i=a.i&&d;d?0<c.length&&!a.$&&(a.$=!0,b=a.l,b.g==a&&b.$&&!b.K&&(b.j.info("Great, no buffering proxy detected. Bytes received: "+c.length),oc(b),b.K=!0,I(11))):(E(a.j,a.m,c,
40
40
  "[Invalid Chunked Response]"),P(a),Q(a));}k.hb=function(){if(this.g){var a=O(this.g),b=this.g.fa();this.C<b.length&&(ic(this),lc(this,a,b),this.i&&4!=a&&N(this));}};function nc(a,b){var c=a.C,d=b.indexOf("\n",c);if(-1==d)return bc;c=Number(b.substring(c,d));if(isNaN(c))return ac;d+=1;if(d+c>b.length)return bc;b=b.substr(d,c);a.C=d+c;return b}k.cancel=function(){this.I=!0;P(this);};function N(a){a.V=Date.now()+a.O;pc(a,a.O);}
41
- function pc(a,b){if(null!=a.B)throw Error("WatchDog timer not null");a.B=J(q(a.gb,a),b);}function ic(a){a.B&&(l.clearTimeout(a.B),a.B=null);}k.gb=function(){this.B=null;const a=Date.now();0<=a-this.V?(Kb(this.j,this.A),2!=this.K&&(H(3),I(17)),P(this),this.o=2,Q(this)):pc(this,this.V-a);};function Q(a){0==a.l.G||a.I||mc(a.l,a);}function P(a){ic(a);var b=a.L;b&&"function"==typeof b.na&&b.na();a.L=null;zb(a.T);Fb(a.S);a.g&&(b=a.g,a.g=null,b.abort(),b.na());}
41
+ function pc(a,b){if(null!=a.B)throw Error("WatchDog timer not null");a.B=J(q(a.gb,a),b);}function ic(a){a.B&&(l.clearTimeout(a.B),a.B=null);}k.gb=function(){this.B=null;const a=Date.now();0<=a-this.V?(Kb(this.j,this.A),2!=this.K&&(H(),I(17)),P(this),this.o=2,Q(this)):pc(this,this.V-a);};function Q(a){0==a.l.G||a.I||mc(a.l,a);}function P(a){ic(a);var b=a.L;b&&"function"==typeof b.na&&b.na();a.L=null;zb(a.T);Fb(a.S);a.g&&(b=a.g,a.g=null,b.abort(),b.na());}
42
42
  function kc(a,b){try{var c=a.l;if(0!=c.G&&(c.g==a||qc(c.h,a)))if(!a.J&&qc(c.h,a)&&3==c.G){try{var d=c.Fa.g.parse(b);}catch(m){d=null;}if(Array.isArray(d)&&3==d.length){var e=d;if(0==e[0])a:{if(!c.u){if(c.g)if(c.g.F+3E3<a.F)rc(c),sc(c);else break a;tc(c);I(18);}}else c.Ba=e[1],0<c.Ba-c.T&&37500>e[2]&&c.L&&0==c.A&&!c.v&&(c.v=J(q(c.cb,c),6E3));if(1>=uc(c.h)&&c.ja){try{c.ja();}catch(m){}c.ja=void 0;}}else R(c,11);}else if((a.J||c.g==a)&&rc(c),!pa(b))for(e=c.Fa.g.parse(b),b=0;b<e.length;b++){let m=e[b];c.T=
43
43
  m[0];m=m[1];if(2==c.G)if("c"==m[0]){c.I=m[1];c.ka=m[2];const r=m[3];null!=r&&(c.ma=r,c.j.info("VER="+c.ma));const F=m[4];null!=F&&(c.Ca=F,c.j.info("SVER="+c.Ca));const Ca=m[5];null!=Ca&&"number"===typeof Ca&&0<Ca&&(d=1.5*Ca,c.J=d,c.j.info("backChannelRequestTimeoutMs_="+d));d=c;const Z=a.g;if(Z){const Da=Z.g?Z.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(Da){var f=d.h;f.g||-1==Da.indexOf("spdy")&&-1==Da.indexOf("quic")&&-1==Da.indexOf("h2")||(f.j=f.l,f.g=new Set,f.h&&(vc(f,f.h),f.h=null));}if(d.D){const tb=
44
44
  Z.g?Z.g.getResponseHeader("X-HTTP-Session-Id"):null;tb&&(d.za=tb,S(d.F,d.D,tb));}}c.G=3;c.l&&c.l.xa();c.$&&(c.P=Date.now()-a.F,c.j.info("Handshake RTT: "+c.P+"ms"));d=c;var h=a;d.sa=wc(d,d.H?d.ka:null,d.V);if(h.J){xc(d.h,h);var n=h,u=d.J;u&&n.setTimeout(u);n.B&&(ic(n),N(n));d.g=h;}else yc(d);0<c.i.length&&zc(c);}else "stop"!=m[0]&&"close"!=m[0]||R(c,7);else 3==c.G&&("stop"==m[0]||"close"==m[0]?"stop"==m[0]?R(c,7):Ac(c):"noop"!=m[0]&&c.l&&c.l.wa(m),c.A=0);}H(4);}catch(m){}}function Bc(a){if(a.W&&"function"==typeof a.W)return a.W();if("undefined"!==typeof Map&&a instanceof Map||"undefined"!==typeof Set&&a instanceof Set)return Array.from(a.values());if("string"===typeof a)return a.split("");if(ba(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}b=[];c=0;for(d in a)b[c++]=a[d];return b}
@@ -77,14 +77,14 @@ function Ed(a,b){var c;b?c=b.m:c=a.U++;const d=M(a.F);S(d,"SID",a.I);S(d,"RID",c
77
77
  function Dd(a,b,c){c=Math.min(a.i.length,c);var d=a.l?q(a.l.Ra,a.l,a):null;a:{var e=a.i;let f=-1;for(;;){const h=["count="+c];-1==f?0<c?(f=e[0].h,h.push("ofs="+f)):f=0:h.push("ofs="+f);let n=!0;for(let u=0;u<c;u++){let m=e[u].h;const r=e[u].g;m-=f;if(0>m)f=Math.max(0,e[u].h-100),n=!1;else try{bd(r,h,"req"+m+"_");}catch(F){d&&d(r);}}if(n){d=h.join("&");break a}}}a=a.i.splice(0,c);b.D=a;return d}function yc(a){a.g||a.u||(a.Z=1,sb(a.Ia,a),a.A=0);}
78
78
  function tc(a){if(a.g||a.u||3<=a.A)return !1;a.Z++;a.u=J(q(a.Ia,a),Cd(a,a.A));a.A++;return !0}k.Ia=function(){this.u=null;Fd(this);if(this.$&&!(this.K||null==this.g||0>=this.P)){var a=2*this.P;this.j.info("BP detection timer enabled: "+a);this.B=J(q(this.eb,this),a);}};k.eb=function(){this.B&&(this.B=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.L=!1,this.K=!0,I(10),sc(this),Fd(this));};
79
79
  function oc(a){null!=a.B&&(l.clearTimeout(a.B),a.B=null);}function Fd(a){a.g=new L(a,a.j,"rpc",a.Z);null===a.o&&(a.g.H=a.s);a.g.N=0;var b=M(a.sa);S(b,"RID","rpc");S(b,"SID",a.I);S(b,"CI",a.L?"0":"1");S(b,"AID",a.T);S(b,"TYPE","xmlhttp");zd(a,b);a.o&&a.s&&vd(b,a.o,a.s);a.J&&a.g.setTimeout(a.J);var c=a.g;a=a.ka;c.K=1;c.v=dc(M(b));c.s=null;c.P=!0;ec(c,a);}k.cb=function(){null!=this.v&&(this.v=null,sc(this),tc(this),I(19));};function rc(a){null!=a.v&&(l.clearTimeout(a.v),a.v=null);}
80
- function mc(a,b){var c=null;if(a.g==b){rc(a);oc(a);a.g=null;var d=2;}else if(qc(a.h,b))c=b.D,xc(a.h,b),d=1;else return;if(0!=a.G)if(a.pa=b.Y,b.i)if(1==d){c=b.s?b.s.length:0;b=Date.now()-b.F;var e=a.C;d=Mb();C(d,new Pb(d,c,b,e));zc(a);}else yc(a);else if(e=b.o,3==e||0==e&&0<a.pa||!(1==d&&Bd(a,b)||2==d&&tc(a)))switch(c&&0<c.length&&(b=a.h,b.i=b.i.concat(c)),e){case 1:R(a,5);break;case 4:R(a,10);break;case 3:R(a,6);break;default:R(a,2);}}
80
+ function mc(a,b){var c=null;if(a.g==b){rc(a);oc(a);a.g=null;var d=2;}else if(qc(a.h,b))c=b.D,xc(a.h,b),d=1;else return;if(0!=a.G)if(a.pa=b.Y,b.i)if(1==d){c=b.s?b.s.length:0;b=Date.now()-b.F;var e=a.C;d=Mb();C(d,new Pb(d,c));zc(a);}else yc(a);else if(e=b.o,3==e||0==e&&0<a.pa||!(1==d&&Bd(a,b)||2==d&&tc(a)))switch(c&&0<c.length&&(b=a.h,b.i=b.i.concat(c)),e){case 1:R(a,5);break;case 4:R(a,10);break;case 3:R(a,6);break;default:R(a,2);}}
81
81
  function Cd(a,b){let c=a.Xa+Math.floor(Math.random()*a.bb);a.l||(c*=2);return c*b}function R(a,b){a.j.info("Error code "+b);if(2==b){var c=null;a.l&&(c=null);var d=q(a.kb,a);c||(c=new T("//www.google.com/images/cleardot.gif"),l.location&&"http"==l.location.protocol||Gc(c,"https"),dc(c));cd(c.toString(),d);}else I(2);a.G=0;a.l&&a.l.va(b);Ad(a);yd(a);}k.kb=function(a){a?(this.j.info("Successfully pinged google.com"),I(2)):(this.j.info("Failed to ping google.com"),I(1));};
82
82
  function Ad(a){a.G=0;a.la=[];if(a.l){const b=Zc(a.h);if(0!=b.length||0!=a.i.length)na(a.la,b),na(a.la,a.i),a.h.i.length=0,ma(a.i),a.i.length=0;a.l.ua();}}function wc(a,b,c){var d=c instanceof T?M(c):new T(c,void 0);if(""!=d.g)b&&(d.g=b+"."+d.g),Hc(d,d.m);else {var e=l.location;d=e.protocol;b=b?b+"."+e.hostname:e.hostname;e=+e.port;var f=new T(null,void 0);d&&Gc(f,d);b&&(f.g=b);e&&Hc(f,e);c&&(f.l=c);d=f;}c=a.D;b=a.za;c&&b&&S(d,c,b);S(d,"VER",a.ma);zd(a,d);return d}
83
83
  function gc(a,b,c){if(b&&!a.H)throw Error("Can't create secondary domain capable XhrIo object.");b=c&&a.Da&&!a.ra?new W(new ed({jb:!0})):new W(a.ra);b.Ka(a.H);return b}function Gd(){}k=Gd.prototype;k.xa=function(){};k.wa=function(){};k.va=function(){};k.ua=function(){};k.Ra=function(){};function Hd(){if(y&&!(10<=Number(La)))throw Error("Environmental error: no available transport.");}Hd.prototype.g=function(a,b){return new X(a,b)};
84
84
  function X(a,b){B.call(this);this.g=new xd(b);this.l=a;this.h=b&&b.messageUrlParams||null;a=b&&b.messageHeaders||null;b&&b.clientProtocolHeaderRequired&&(a?a["X-Client-Protocol"]="webchannel":a={"X-Client-Protocol":"webchannel"});this.g.s=a;a=b&&b.initMessageHeaders||null;b&&b.messageContentType&&(a?a["X-WebChannel-Content-Type"]=b.messageContentType:a={"X-WebChannel-Content-Type":b.messageContentType});b&&b.ya&&(a?a["X-WebChannel-Client-Profile"]=b.ya:a={"X-WebChannel-Client-Profile":b.ya});this.g.S=
85
85
  a;(a=b&&b.Yb)&&!pa(a)&&(this.g.o=a);this.A=b&&b.supportsCrossDomainXhr||!1;this.v=b&&b.sendRawJson||!1;(b=b&&b.httpSessionIdParam)&&!pa(b)&&(this.g.D=b,a=this.h,null!==a&&b in a&&(a=this.h,b in a&&delete a[b]));this.j=new Y(this);}t(X,B);X.prototype.m=function(){this.g.l=this.j;this.A&&(this.g.H=!0);var a=this.g,b=this.l,c=this.h||void 0;I(0);a.V=b;a.ia=c||{};a.L=a.Y;a.F=wc(a,null,a.V);zc(a);};X.prototype.close=function(){Ac(this.g);};
86
86
  X.prototype.u=function(a){var b=this.g;if("string"===typeof a){var c={};c.__data__=a;a=c;}else this.v&&(c={},c.__data__=lb(a),a=c);b.i.push(new Vc(b.ab++,a));3==b.G&&zc(b);};X.prototype.M=function(){this.g.l=null;delete this.j;Ac(this.g);delete this.g;X.X.M.call(this);};function Id(a){Vb.call(this);var b=a.__sm__;if(b){a:{for(const c in b){a=c;break a}a=void 0;}if(this.i=a)a=this.i,b=null!==b&&a in b?b[a]:void 0;this.data=b;}else this.data=a;}t(Id,Vb);function Jd(){Wb.call(this);this.status=1;}t(Jd,Wb);
87
- function Y(a){this.g=a;}t(Y,Gd);Y.prototype.xa=function(){C(this.g,"a");};Y.prototype.wa=function(a){C(this.g,new Id(a));};Y.prototype.va=function(a){C(this.g,new Jd(a));};Y.prototype.ua=function(){C(this.g,"b");};/*
87
+ function Y(a){this.g=a;}t(Y,Gd);Y.prototype.xa=function(){C(this.g,"a");};Y.prototype.wa=function(a){C(this.g,new Id(a));};Y.prototype.va=function(a){C(this.g,new Jd());};Y.prototype.ua=function(){C(this.g,"b");};/*
88
88
 
89
89
  Copyright 2017 Google LLC
90
90