1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-12-24 11:13:18 +00:00
musix-oss/node_modules/@firebase/webchannel-wrapper/dist/index.js

89 lines
40 KiB
JavaScript
Raw Normal View History

2020-03-03 20:30:50 +00:00
(function() {'use strict';var h,goog=goog||{},l=this||self;function n(b){return"string"==typeof b}function aa(b){return"number"==typeof b}function p(b,c){b=b.split(".");c=c||l;for(var d=0;d<b.length;d++)if(c=c[b[d]],null==c)return null;return c}function ba(){}
function q(b){var c=typeof b;if("object"==c)if(b){if(b instanceof Array)return"array";if(b instanceof Object)return c;var d=Object.prototype.toString.call(b);if("[object Window]"==d)return"object";if("[object Array]"==d||"number"==typeof b.length&&"undefined"!=typeof b.splice&&"undefined"!=typeof b.propertyIsEnumerable&&!b.propertyIsEnumerable("splice"))return"array";if("[object Function]"==d||"undefined"!=typeof b.call&&"undefined"!=typeof b.propertyIsEnumerable&&!b.propertyIsEnumerable("call"))return"function"}else return"null";
else if("function"==c&&"undefined"==typeof b.call)return"object";return c}function r(b){return"array"==q(b)}function ca(b){var c=q(b);return"array"==c||"object"==c&&"number"==typeof b.length}function t(b){var c=typeof b;return"object"==c&&null!=b||"function"==c}var u="closure_uid_"+(1E9*Math.random()>>>0),da=0;function ea(b,c,d){return b.call.apply(b.bind,arguments)}
function fa(b,c,d){if(!b)throw Error();if(2<arguments.length){var e=Array.prototype.slice.call(arguments,2);return function(){var f=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(f,e);return b.apply(c,f)}}return function(){return b.apply(c,arguments)}}function v(b,c,d){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?v=ea:v=fa;return v.apply(null,arguments)}
function w(b,c){var d=Array.prototype.slice.call(arguments,1);return function(){var e=d.slice();e.push.apply(e,arguments);return b.apply(this,e)}}var x=Date.now||function(){return+new Date};function y(b,c){function d(){}d.prototype=c.prototype;b.N=c.prototype;b.prototype=new d;b.prototype.constructor=b;b.wb=function(e,f,g){for(var k=Array(arguments.length-2),m=2;m<arguments.length;m++)k[m-2]=arguments[m];return c.prototype[f].apply(e,k)}};function z(){0!=ha&&(ia[this[u]||(this[u]=++da)]=this);this.j=this.j;this.i=this.i}var ha=0,ia={};z.prototype.j=!1;z.prototype.ka=function(){if(!this.j&&(this.j=!0,this.G(),0!=ha)){var b=this[u]||(this[u]=++da);if(0!=ha&&this.i&&0<this.i.length)throw Error(this+" did not empty its onDisposeCallbacks queue. This probably means it overrode dispose() or disposeInternal() without calling the superclass' method.");delete ia[b]}};z.prototype.G=function(){if(this.i)for(;this.i.length;)this.i.shift()()};var ja=Array.prototype.indexOf?function(b,c){return Array.prototype.indexOf.call(b,c,void 0)}:function(b,c){if(n(b))return n(c)&&1==c.length?b.indexOf(c,0):-1;for(var d=0;d<b.length;d++)if(d in b&&b[d]===c)return d;return-1},ka=Array.prototype.forEach?function(b,c,d){Array.prototype.forEach.call(b,c,d)}:function(b,c,d){for(var e=b.length,f=n(b)?b.split(""):b,g=0;g<e;g++)g in f&&c.call(d,f[g],g,b)};
function la(b){a:{var c=ma;for(var d=b.length,e=n(b)?b.split(""):b,f=0;f<d;f++)if(f in e&&c.call(void 0,e[f],f,b)){c=f;break a}c=-1}return 0>c?null:n(b)?b.charAt(c):b[c]}function na(b){return Array.prototype.concat.apply([],arguments)}function oa(b){var c=b.length;if(0<c){for(var d=Array(c),e=0;e<c;e++)d[e]=b[e];return d}return[]};function pa(b){return/^[\s\xa0]*$/.test(b)}var qa=String.prototype.trim?function(b){return b.trim()}:function(b){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(b)[1]};function A(b,c){return-1!=b.indexOf(c)}function ra(b,c){return b<c?-1:b>c?1:0};var B;a:{var sa=l.navigator;if(sa){var ta=sa.userAgent;if(ta){B=ta;break a}}B=""};function ua(b,c,d){for(var e in b)c.call(d,b[e],e,b)}function va(b){var c={},d;for(d in b)c[d]=b[d];return c}var wa="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function xa(b,c){for(var d,e,f=1;f<arguments.length;f++){e=arguments[f];for(d in e)b[d]=e[d];for(var g=0;g<wa.length;g++)d=wa[g],Object.prototype.hasOwnProperty.call(e,d)&&(b[d]=e[d])}};function ya(b){ya[" "](b);return b}ya[" "]=ba;function za(b,c){var d=Aa;return Object.prototype.hasOwnProperty.call(d,b)?d[b]:d[b]=c(b)};var Ba=A(B,"Opera"),C=A(B,"Trident")||A(B,"MSIE"),Ca=A(B,"Edge"),Da=Ca||C,Ea=A(B,"Gecko")&&!(A(B.toLowerCase(),"webkit")&&!A(B,"Edge"))&&!(A(B,"Trident")||A(B,"MSIE"))&&!A(B,"Edge"),Fa=A(B.toLowerCase(),"webkit")&&!A(B,"Edge");function Ga(){var b=l.document;return b?b.documentMode:void 0}var Ha;
a:{var Ia="",Ja=function(){var b=B;if(Ea)return/rv:([^\);]+)(\)|;)/.exec(b);if(Ca)return/Edge\/([\d\.]+)/.exec(b);if(C)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(b);if(Fa)return/WebKit\/(\S+)/.exec(b);if(Ba)return/(?:Version)[ \/]?(\S+)/.exec(b)}();Ja&&(Ia=Ja?Ja[1]:"");if(C){var Ka=Ga();if(null!=Ka&&Ka>parseFloat(Ia)){Ha=String(Ka);break a}}Ha=Ia}var Aa={};
function La(b){return za(b,function(){for(var c=0,d=qa(String(Ha)).split("."),e=qa(String(b)).split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var k=d[g]||"",m=e[g]||"";do{k=/(\d*)(\D*)(.*)/.exec(k)||["","","",""];m=/(\d*)(\D*)(.*)/.exec(m)||["","","",""];if(0==k[0].length&&0==m[0].length)break;c=ra(0==k[1].length?0:parseInt(k[1],10),0==m[1].length?0:parseInt(m[1],10))||ra(0==k[2].length,0==m[2].length)||ra(k[2],m[2]);k=k[3];m=m[3]}while(0==c)}return 0<=c})}var Ma;
Ma=l.document&&C?Ga():void 0;var Na=!C||9<=Number(Ma),Oa=C&&!La("9"),Pa=function(){if(!l.addEventListener||!Object.defineProperty)return!1;var b=!1,c=Object.defineProperty({},"passive",{get:function(){b=!0}});try{l.addEventListener("test",ba,c),l.removeEventListener("test",ba,c)}catch(d){}return b}();function D(b,c){this.type=b;this.a=this.target=c;this.Ha=!0}D.prototype.b=function(){this.Ha=!1};function F(b,c){D.call(this,b?b.type:"");this.relatedTarget=this.a=this.target=null;this.button=this.screenY=this.screenX=this.clientY=this.clientX=0;this.key="";this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.pointerId=0;this.pointerType="";this.c=null;if(b){var d=this.type=b.type,e=b.changedTouches&&b.changedTouches.length?b.changedTouches[0]:null;this.target=b.target||b.srcElement;this.a=c;if(c=b.relatedTarget){if(Ea){a:{try{ya(c.nodeName);var f=!0;break a}catch(g){}f=!1}f||(c=null)}}else"mouseover"==
d?c=b.fromElement:"mouseout"==d&&(c=b.toElement);this.relatedTarget=c;e?(this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0):(this.clientX=void 0!==b.clientX?b.clientX:b.pageX,this.clientY=void 0!==b.clientY?b.clientY:b.pageY,this.screenX=b.screenX||0,this.screenY=b.screenY||0);this.button=b.button;this.key=b.key||"";this.ctrlKey=b.ctrlKey;this.altKey=b.altKey;this.shiftKey=b.shiftKey;this.metaKey=
b.metaKey;this.pointerId=b.pointerId||0;this.pointerType=n(b.pointerType)?b.pointerType:Qa[b.pointerType]||"";this.c=b;b.defaultPrevented&&this.b()}}y(F,D);var Qa={2:"touch",3:"pen",4:"mouse"};F.prototype.b=function(){F.N.b.call(this);var b=this.c;if(b.preventDefault)b.preventDefault();else if(b.returnValue=!1,Oa)try{if(b.ctrlKey||112<=b.keyCode&&123>=b.keyCode)b.keyCode=-1}catch(c){}};var G="closure_listenable_"+(1E6*Math.random()|0),Ra=0;function Sa(b,c,d,e,f){this.listener=b;this.proxy=null;this.src=c;this.type=d;this.capture=!!e;this.da=f;this.key=++Ra;this.X=this.Z=!1}function Ta(b){b.X=!0;b.listener=null;b.proxy=null;b.src=null;b.da=null};function Ua(b){this.src=b;this.a={};this.b=0}Ua.prototype.add=function(b,c,d,e,f){var g=b.toString();b=this.a[g];b||(b=this.a[g]=[],this.b++);var k=Va(b,c,e,f);-1<k?(c=b[k],d||(c.Z=!1)):(c=new Sa(c,this.src,g,!!e,f),c.Z=d,b.push(c));return c};function Wa(b,c){var d=c.type;if(d in b.a){var e=b.a[d],f=ja(e,c),g;(g=0<=f)&&Array.prototype.splice.call(e,f,1);g&&(Ta(c),0==b.a[d].length&&(delete b.a[d],b.b--))}}
function Va(b,c,d,e){for(var f=0;f<b.length;++f){var g=b[f];if(!g.X&&g.listener==c&&g.capture==!!d&&g.da==e)return f}return-1};var Xa="closure_lm_"+(1E6*Math.random()|0),Ya={},Za=0;function $a(b,c,d,e,f){if(e&&e.once)return ab(b,c,d,e,f);if(r(c)){for(var g=0;g<c.length;g++)$a(b,c[g],d,e,f);return null}d=bb(d);return b&&b[G]?b.ya(c,d,t(e)?!!e.capture:!!e,f):cb(b,c,d,!1,e,f)}
function cb(b,c,d,e,f,g){if(!c)throw Error("Invalid event type");var k=t(f)?!!f.capture:!!f;if(k&&!Na)return null;var m=db(b);m||(b[Xa]=m=new Ua(b));d=m.add(c,d,e,k,g);if(d.proxy)return d;e=eb();d.proxy=e;e.src=b;e.listener=d;if(b.addEventListener)Pa||(f=k),void 0===f&&(f=!1),b.addEventListener(c.toString(),e,f);else if(b.attachEvent)b.attachEvent(fb(c.toString()),e);else if(b.addListener&&b.removeListener)b.addListener(e);else throw Error("addEventListener and attachEvent are unavailable.");Za++;
return d}function eb(){var b=gb,c=Na?function(d){return b.call(c.src,c.listener,d)}:function(d){d=b.call(c.src,c.listener,d);if(!d)return d};return c}function ab(b,c,d,e,f){if(r(c)){for(var g=0;g<c.length;g++)ab(b,c[g],d,e,f);return null}d=bb(d);return b&&b[G]?b.za(c,d,t(e)?!!e.capture:!!e,f):cb(b,c,d,!0,e,f)}
function hb(b,c,d,e,f){if(r(c))for(var g=0;g<c.length;g++)hb(b,c[g],d,e,f);else(e=t(e)?!!e.capture:!!e,d=bb(d),b&&b[G])?(b=b.c,c=String(c).toString(),c in b.a&&(g=b.a[c],d=Va(g,d,e,f),-1<d&&(Ta(g[d]),Array.prototype.splice.call(g,d,1),0==g.length&&(delete b.a[c],b.b--)))):b&&(b=db(b))&&(c=b.a[c.toString()],b=-1,c&&(b=Va(c,d,e,f)),(d=-1<b?c[b]:null)&&ib(d))}
function ib(b){if(!aa(b)&&b&&!b.X){var c=b.src;if(c&&c[G])Wa(c.c,b);else{var d=b.type,e=b.proxy;c.removeEventListener?c.removeEventListener(d,e,b.capture):c.detachEvent?c.detachEvent(fb(d),e):c.addListener&&c.removeListener&&c.removeListener(e);Za--;(d=db(c))?(Wa(d,b),0==d.b&&(d.src=null,c[Xa]=null)):Ta(b)}}}function fb(b){return b in Ya?Ya[b]:Ya[b]="on"+b}function jb(b,c){var d=b.listener,e=b.da||b.src;b.Z&&ib(b);return d.call(e,c)}
function gb(b,c){return b.X?!0:Na?jb(b,new F(c,this)):(c=new F(c||p("window.event"),this),jb(b,c))}function db(b){b=b[Xa];return b instanceof Ua?b:null}var kb="__closure_events_fn_"+(1E9*Math.random()>>>0);function bb(b){if("function"==q(b))return b;b[kb]||(b[kb]=function(c){return b.handleEvent(c)});return b[kb]};function H(){z.call(this);this.c=new Ua(this);this.J=this;this.B=null}y(H,z);H.prototype[G]=!0;h=H.prototype;h.addEventListener=function(b,c,d,e){$a(this,b,c,d,e)};h.removeEventListener=function(b,c,d,e){hb(this,b,c,d,e)};
h.dispatchEvent=function(b){var c,d=this.B;if(d)for(c=[];d;d=d.B)c.push(d);d=this.J;var e=b.type||b;if(n(b))b=new D(b,d);else if(b instanceof D)b.target=b.target||d;else{var f=b;b=new D(e,d);xa(b,f)}f=!0;if(c)for(var g=c.length-1;0<=g;g--){var k=b.a=c[g];f=lb(k,e,!0,b)&&f}k=b.a=d;f=lb(k,e,!0,b)&&f;f=lb(k,e,!1,b)&&f;if(c)for(g=0;g<c.length;g++)k=b.a=c[g],f=lb(k,e,!1,b)&&f;return f};
h.G=function(){H.N.G.call(this);if(this.c){var b=this.c,c=0,d;for(d in b.a){for(var e=b.a[d],f=0;f<e.length;f++)++c,Ta(e[f]);delete b.a[d];b.b--}}this.B=null};h.ya=function(b,c,d,e){return this.c.add(String(b),c,!1,d,e)};h.za=function(b,c,d,e){return this.c.add(String(b),c,!0,d,e)};
function lb(b,c,d,e){c=b.c.a[String(c)];if(!c)return!0;c=c.concat();for(var f=!0,g=0;g<c.length;++g){var k=c[g];if(k&&!k.X&&k.capture==d){var m=k.listener,E=k.da||k.src;k.Z&&Wa(b.c,k);f=!1!==m.call(E,e)&&f}}return f&&0!=e.Ha};var mb=l.JSON.stringify;function nb(b,c){this.c=b;this.f=c;this.b=0;this.a=null}nb.prototype.get=function(){if(0<this.b){this.b--;var b=this.a;this.a=b.next;b.next=null}else b=this.c();return b};function ob(){this.b=this.a=null}var qb=new nb(function(){return new pb},function(b){b.reset()});ob.prototype.add=function(b,c){var d=qb.get();d.set(b,c);this.b?this.b.next=d:this.a=d;this.b=d};function rb(){var b=sb,c=null;b.a&&(c=b.a,b.a=b.a.next,b.a||(b.b=null),c.next=null);return c}function pb(){this.next=this.b=this.a=null}pb.prototype.set=function(b,c){this.a=b;this.b=c;this.next=null};pb.prototype.reset=function(){this.next=this.b=this.a=null};function tb(b){l.setTimeout(function(){throw b;},0)};function ub(b,c){vb||wb();xb||(vb(),xb=!0);sb.add(b,c)}var vb;function wb(){var b=l.Promise.resolve(void 0);vb=function(){b.then(zb)}}var xb=!1,sb=new ob;function zb(){for(var b;b=rb();){try{b.a.call(b.b)}catch(d){tb(d)}var c=qb;c.f(b);100>c.b&&(c.b++,b.next=c.a,c.a=b)}xb=!1};function Ab(b,c){H.call(this);this.b=b||1;this.a=c||l;this.f=v(this.eb,this);this.g=x()}y(Ab,H);h=Ab.prototype;h.ba=!1;h.L=null;h.eb=function(){if(this.ba){var b=x()-this.g;0<b&&b<.8*this.b?this.L=this.a.setTimeout(this.f,this.b-b):(this.L&&(this.a.clearTimeout(this.L),this.L=null),this.dispatchEvent("tick"),this.ba&&(Bb(this),this.start()))}};h.start=function(){this.ba=!0;this.L||(this.L=this.a.setTimeout(this.f,this.b),this.g=x())};function Bb(b){b.ba=!1;b.L&&(b.a.clearTimeout(b.L),b.L=null)}
h.G=function(){Ab.N.G.call(this);Bb(this);delete this.a};function Cb(b,c,d){if("function"==q(b))d&&(b=v(b,d));else if(b&&"function"==typeof b.handleEvent)b=v(b.handleEvent,b);else throw Error("Invalid listener argument");return 2147483647<Number(c)?-1:l.setTimeout(b,c||0)};function Db(b,c,d){z.call(this);this.f=null!=d?v(b,d):b;this.c=c;this.b=v(this.Za,this);this.a=[]}y(Db,z);h=Db.prototype;h.ea=!1;h.U=null;h.Sa=function(b){this.a=arguments;this.U?this.ea=!0:Eb(this)};h.G=function(){Db.N.G.call(this);this.U&&(l.clearTimeout(this.U),this.U=null,this.ea=!1,this.a=[])};h.Za=function(){this.U=null;this.ea&&(this.ea=!1,Eb(this))};function Eb(b){b.U=Cb(b.b,b.c);b.f.apply(null,b.a)};function I(b){z.call(this);this.b=b;this.a={}}y(I,z);var Fb=[];function Gb(b,c,d,e){r(d)||(d&&(Fb[0]=d.toString()),d=Fb);for(var f=0;f<d.length;f++){var g=$a(c,d[f],e||b.handleEvent,!1,b.b||b);if(!g)break;b.a[g.key]=g}}function Hb(b){ua(b.a,function(c,d){this.a.hasOwnProperty(d)&&ib(c)},b);b.a={}}I.prototype.G=function(){I.N.G.call(this);Hb(this)};I.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};function Ib(){};var Jb=null;function Kb(){return Jb=Jb||new H}function Lb(b){D.call(this,"serverreachability",b)}y(Lb,D);function J(b){var c=Kb();c.dispatchEvent(new Lb(c,b))}function Mb(b){D.call(this,"statevent",b)}y(Mb,D);function K(b){var c=Kb();c.dispatchEvent(new Mb(c,b))}function Nb(b){D.call(this,"timingevent",b)}y(Nb,D);function Ob(b,c){if("function"!=q(b))throw Error("Fn must not be null and must be a function");return l.setTimeout(function(){b()},c)};var Pb={NO_ERROR:0,fb:1,mb:2,lb:3,ib:4,kb:5,nb:6,Ka:7,TIMEOUT:8,qb:9};var Qb={hb:"complete",ub:"success",La:"error",Ka:"abort",sb:"ready",tb:"readystatechange",TIMEOUT:"timeout",ob:"incrementaldata",rb:"progress",jb:"downloadprogress",vb:"uploadprogress"};function Rb(){}Rb.prototype.a=null;function Sb(b){var c;(c=b.a)||(c=b.a={});return c};function Tb(){}var L={OPEN:"a",gb:"b",La:"c",pb:"d"};function Ub(){D.call(this,"d")}y(Ub,D);function Vb(){D.call(this,"c")}y(Vb,D);var Wb;function Xb(){}y(Xb,Rb);Wb=new Xb;function M(b,c,d){this.g=b;this.W=c;this.V=d||1;this.I=new I(this);this.O=Yb;b=Da?125:void 0;this.P=new Ab(b);this.h=null;this.b=!1;this.l=this.D=this.f=this.F=this.v=this.R=this.i=null;this.j=[];this.a=null;this.A=0;this.c=this.w=null;this.o=-1;this.m=!1;this.J=0;this.B=null;this.s=this.S=this.H=!1}var Yb=45E3,Zb={},$b={};h=M.prototype;h.setTimeout=function(b){this.O=b};function ac(b,c,d){b.F=1;b.f=bc(N(c));b.l=d;b.H=!0;cc(b,null)}function dc(b,c,d,e){b.F=1;b.f=bc(N(c));b.l=null;b.H=d;cc(b,e)}
function cc(b,c){b.v=x();ec(b);b.D=N(b.f);fc(b.D,"t",b.V);b.A=0;b.a=b.g.$(b.g.Y()?c:null);0<b.J&&(b.B=new Db(v(b.Ia,b,b.a),b.J));Gb(b.I,b.a,"readystatechange",b.bb);c=b.h?va(b.h):{};b.l?(b.w||(b.w="POST"),c["Content-Type"]="application/x-www-form-urlencoded",b.a.ca(b.D,b.w,b.l,c)):(b.w="GET",b.a.ca(b.D,b.w,null,c));J(1)}h.bb=function(b){b=b.target;var c=this.B;c&&3==O(b)?c.Sa():this.Ia(b)};
h.Ia=function(b){try{if(b==this.a)a:{var c=O(this.a),d=this.a.xa(),e=this.a.T();if(!(3>c||3==c&&!Da&&!this.a.aa())){this.m||4!=c||7==d||(8==d||0>=e?J(3):J(2));gc(this);var f=this.a.T();this.o=f;var g=this.a.aa();if(this.b=200==f){if(this.S&&!this.s){b:{if(this.a){var k=hc(this.a,"X-HTTP-Initial-Response");if(k&&!pa(k)){var m=k;break b}}m=null}if(m)this.s=!0,ic(this,m);else{this.b=!1;this.c=3;K(12);P(this);jc(this);break a}}this.H?(kc(this,c,g),Da&&this.b&&3==c&&(Gb(this.I,this.P,"tick",this.ab),this.P.start())):
ic(this,g);4==c&&P(this);this.b&&!this.m&&(4==c?this.g.ma(this):(this.b=!1,ec(this)))}else 400==f&&0<g.indexOf("Unknown SID")?(this.c=3,K(12)):(this.c=0,K(13)),P(this),jc(this)}}}catch(E){}finally{}};function kc(b,c,d){for(var e=!0;!b.m&&b.A<d.length;){var f=lc(b,d);if(f==$b){4==c&&(b.c=4,K(14),e=!1);break}else if(f==Zb){b.c=4;K(15);e=!1;break}else ic(b,f)}4==c&&0==d.length&&(b.c=1,K(16),e=!1);b.b=b.b&&e;e||(P(b),jc(b))}
h.ab=function(){if(this.a){var b=O(this.a),c=this.a.aa();this.A<c.length&&(gc(this),kc(this,b,c),this.b&&4!=b&&ec(this))}};function lc(b,c){var d=b.A,e=c.indexOf("\n",d);if(-1==e)return $b;d=Number(c.substring(d,e));if(isNaN(d))return Zb;e+=1;if(e+d>c.length)return $b;c=c.substr(e,d);b.A=e+d;return c}h.cancel=function(){this.m=!0;P(this)};function ec(b){b.R=x()+b.O;mc(b,b.O)}function mc(b,c){if(null!=b.i)throw Error("WatchDog timer not null");b.i=Ob(v(b.$a,b),c)}
function gc(b){b.i&&(l.clearTimeout(b.i),b.i=null)}h.$a=function(){this.i=null;var b=x();0<=b-this.R?(2!=this.F&&(J(3),K(17)),P(this),this.c=2,jc(this)):mc(this,this.R-b)};function jc(b){b.g.Ba()||b.m||b.g.ma(b)}function P(b){gc(b);var c=b.B;c&&"function"==typeof c.ka&&c.ka();b.B=null;Bb(b.P);Hb(b.I);b.a&&(c=b.a,b.a=null,c.abort(),c.ka())}function ic(b,c){try{b.g.Ea(b,c),J(4)}catch(d){}};function nc(b){if(b.C&&"function"==typeof b.C)return b.C();if(n(b))return b.split("");if(ca(b)){for(var c=[],d=b.length,e=0;e<d;e++)c.push(b[e]);return c}c=[];d=0;for(e in b)c[d++]=b[e];return c}
function oc(b,c){if(b.forEach&&"function"==typeof b.forEach)b.forEach(c,void 0);else if(ca(b)||n(b))ka(b,c,void 0);else{if(b.K&&"function"==typeof b.K)var d=b.K();else if(b.C&&"function"==typeof b.C)d=void 0;else if(ca(b)||n(b)){d=[];for(var e=b.length,f=0;f<e;f++)d.push(f)}else for(f in d=[],e=0,b)d[e++]=f;e=nc(b);f=e.length;for(var g=0;g<f;g++)c.call(void 0,e[g],d&&d[g],b)}};function Q(b,c){this.b={};this.a=[];this.c=0;var d=arguments.length;if(1<d){if(d%2)throw Error("Uneven number of arguments");for(var e=0;e<d;e+=2)this.set(arguments[e],arguments[e+1])}else if(b)if(b instanceof Q)for(d=b.K(),e=0;e<d.length;e++)this.set(d[e],b.get(d[e]));else for(e in b)this.set(e,b[e])}h=Q.prototype;h.C=function(){pc(this);for(var b=[],c=0;c<this.a.length;c++)b.push(this.b[this.a[c]]);return b};h.K=function(){pc(this);return this.a.concat()};
function qc(b){b.b={};b.a.length=0;b.c=0}function rc(b,c){R(b.b,c)&&(delete b.b[c],b.c--,b.a.length>2*b.c&&pc(b))}function pc(b){if(b.c!=b.a.length){for(var c=0,d=0;c<b.a.length;){var e=b.a[c];R(b.b,e)&&(b.a[d++]=e);c++}b.a.length=d}if(b.c!=b.a.length){var f={};for(d=c=0;c<b.a.length;)e=b.a[c],R(f,e)||(b.a[d++]=e,f[e]=1),c++;b.a.length=d}}h.get=function(b,c){return R(this.b,b)?this.b[b]:c};h.set=function(b,c){R(this.b,b)||(this.c++,this.a.push(b));this.b[b]=c};
h.forEach=function(b,c){for(var d=this.K(),e=0;e<d.length;e++){var f=d[e],g=this.get(f);b.call(c,g,f,this)}};function R(b,c){return Object.prototype.hasOwnProperty.call(b,c)};var sc=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function tc(b,c){if(b){b=b.split("&");for(var d=0;d<b.length;d++){var e=b[d].indexOf("="),f=null;if(0<=e){var g=b[d].substring(0,e);f=b[d].substring(e+1)}else g=b[d];c(g,f?decodeURIComponent(f.replace(/\+/g," ")):"")}}};function S(b,c){this.c=this.j=this.f="";this.h=null;this.i=this.g="";this.a=!1;if(b instanceof S){this.a=void 0!==c?c:b.a;uc(this,b.f);this.j=b.j;vc(this,b.c);wc(this,b.h);this.g=b.g;c=b.b;var d=new xc;d.c=c.c;c.a&&(d.a=new Q(c.a),d.b=c.b);yc(this,d);this.i=b.i}else b&&(d=String(b).match(sc))?(this.a=!!c,uc(this,d[1]||"",!0),this.j=zc(d[2]||""),vc(this,d[3]||"",!0),wc(this,d[4]),this.g=zc(d[5]||"",!0),yc(this,d[6]||"",!0),this.i=zc(d[7]||"")):(this.a=!!c,this.b=new xc(null,this.a))}
S.prototype.toString=function(){var b=[],c=this.f;c&&b.push(Ac(c,Bc,!0),":");var d=this.c;if(d||"file"==c)b.push("//"),(c=this.j)&&b.push(Ac(c,Bc,!0),"@"),b.push(encodeURIComponent(String(d)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),d=this.h,null!=d&&b.push(":",String(d));if(d=this.g)this.c&&"/"!=d.charAt(0)&&b.push("/"),b.push(Ac(d,"/"==d.charAt(0)?Cc:Dc,!0));(d=this.b.toString())&&b.push("?",d);(d=this.i)&&b.push("#",Ac(d,Ec));return b.join("")};function N(b){return new S(b)}
function uc(b,c,d){b.f=d?zc(c,!0):c;b.f&&(b.f=b.f.replace(/:$/,""))}function vc(b,c,d){b.c=d?zc(c,!0):c}function wc(b,c){if(c){c=Number(c);if(isNaN(c)||0>c)throw Error("Bad port number "+c);b.h=c}else b.h=null}function yc(b,c,d){c instanceof xc?(b.b=c,Fc(b.b,b.a)):(d||(c=Ac(c,Gc)),b.b=new xc(c,b.a))}function T(b,c,d){b.b.set(c,d)}function fc(b,c,d){r(d)||(d=[String(d)]);Hc(b.b,c,d)}
function bc(b){T(b,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^x()).toString(36));return b}function Ic(b){return b instanceof S?N(b):new S(b,void 0)}function Jc(b,c,d,e){var f=new S(null,void 0);b&&uc(f,b);c&&vc(f,c);d&&wc(f,d);e&&(f.g=e);return f}function zc(b,c){return b?c?decodeURI(b.replace(/%25/g,"%2525")):decodeURIComponent(b):""}
function Ac(b,c,d){return n(b)?(b=encodeURI(b).replace(c,Kc),d&&(b=b.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),b):null}function Kc(b){b=b.charCodeAt(0);return"%"+(b>>4&15).toString(16)+(b&15).toString(16)}var Bc=/[#\/\?@]/g,Dc=/[#\?:]/g,Cc=/[#\?]/g,Gc=/[#\?@]/g,Ec=/#/g;function xc(b,c){this.b=this.a=null;this.c=b||null;this.f=!!c}function U(b){b.a||(b.a=new Q,b.b=0,b.c&&tc(b.c,function(c,d){b.add(decodeURIComponent(c.replace(/\+/g," ")),d)}))}h=xc.prototype;
h.add=function(b,c){U(this);this.c=null;b=V(this,b);var d=this.a.get(b);d||this.a.set(b,d=[]);d.push(c);this.b+=1;return this};function Lc(b,c){U(b);c=V(b,c);R(b.a.b,c)&&(b.c=null,b.b-=b.a.get(c).length,rc(b.a,c))}function Mc(b,c){U(b);c=V(b,c);return R(b.a.b,c)}h.forEach=function(b,c){U(this);this.a.forEach(function(d,e){ka(d,function(f){b.call(c,f,e,this)},this)},this)};
h.K=function(){U(this);for(var b=this.a.C(),c=this.a.K(),d=[],e=0;e<c.length;e++)for(var f=b[e],g=0;g<f.length;g++)d.push(c[e]);return d};h.C=function(b){U(this);var c=[];if(n(b))Mc(this,b)&&(c=na(c,this.a.get(V(this,b))));else{b=this.a.C();for(var d=0;d<b.length;d++)c=na(c,b[d])}return c};h.set=function(b,c){U(this);this.c=null;b=V(this,b);Mc(this,b)&&(this.b-=this.a.get(b).length);this.a.set(b,[c]);this.b+=1;return this};
h.get=function(b,c){if(!b)return c;b=this.C(b);return 0<b.length?String(b[0]):c};function Hc(b,c,d){Lc(b,c);0<d.length&&(b.c=null,b.a.set(V(b,c),oa(d)),b.b+=d.length)}h.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var b=[],c=this.a.K(),d=0;d<c.length;d++){var e=c[d],f=encodeURIComponent(String(e));e=this.C(e);for(var g=0;g<e.length;g++){var k=f;""!==e[g]&&(k+="="+encodeURIComponent(String(e[g])));b.push(k)}}return this.c=b.join("&")};
function V(b,c){c=String(c);b.f&&(c=c.toLowerCase());return c}function Fc(b,c){c&&!b.f&&(U(b),b.c=null,b.a.forEach(function(d,e){var f=e.toLowerCase();e!=f&&(Lc(this,e),Hc(this,f,d))},b));b.f=c};function Nc(b){this.a=b;this.b=this.h=null;this.g=!1;this.i=null;this.c=-1;this.l=this.f=null}h=Nc.prototype;h.M=null;function Oc(b){var c=b.a.F.a;if(null!=c)K(4),c?(K(10),Qc(b.a,b,!1)):(K(11),Qc(b.a,b,!0));else{b.b=new M(b,void 0,void 0);b.b.h=b.h;c=b.a;c=Rc(c,c.Y()?b.f:null,b.i);K(4);fc(c,"TYPE","xmlhttp");var d=b.a.j,e=b.a.I;d&&e&&T(c,d,e);dc(b.b,c,!1,b.f)}}h.$=function(b){return this.a.$(b)};h.abort=function(){this.b&&(this.b.cancel(),this.b=null);this.c=-1};h.Ba=function(){return!1};
h.Ea=function(b,c){this.c=b.o;if(0==this.M){if(!this.a.o&&(b=b.a)){var d=hc(b,"X-Client-Wire-Protocol");this.l=d?d:null;this.a.j&&(b=hc(b,"X-HTTP-Session-Id"))&&(this.a.I=b)}if(c){try{var e=this.a.ja.a.parse(c)}catch(f){c=this.a;c.m=this.c;W(c,2);return}this.f=e[0]}else c=this.a,c.m=this.c,W(c,2)}else if(1==this.M)if(this.g)K(6);else if("11111"==c){if(K(5),this.g=!0,!C||10<=Number(Ma))this.c=200,this.b.cancel(),K(11),Qc(this.a,this,!0)}else K(7),this.g=!1};
h.ma=function(){this.c=this.b.o;if(this.b.b)0==this.M?(this.M=1,Oc(this)):1==this.M&&(this.g?(K(11),Qc(this.a,this,!0)):(K(10),Qc(this.a,this,!1)));else{0==this.M?K(8):1==this.M&&K(9);var b=this.a;b.m=this.c;W(b,2)}};h.Y=function(){return this.a.Y()};h.la=function(){return this.a.la()};function Sc(){this.a=this.b=null};function Tc(){this.a=new Q}function Uc(b){var c=typeof b;return"object"==c&&b||"function"==c?"o"+(b[u]||(b[u]=++da)):c.charAt(0)+b}Tc.prototype.add=function(b){this.a.set(Uc(b),b)};Tc.prototype.C=function(){return this.a.C()};function Vc(b,c){this.b=b;this.a=c};function Wc(b){this.g=b||Xc;l.PerformanceNavigationTiming?(b=l.performance.getEntriesByType("navigation"),b=0<b.length&&("hq"==b[0].nextHopProtocol||"h2"==b[0].nextHopProtocol)):b=!!(l.a&&l.a.Ca&&l.a.Ca()&&l.a.Ca().xb);this.f=b?this.g:1;this.a=null;1<this.f&&(this.a=new Tc);this.b=null;this.c=[]}var Xc=10;function Yc(b,c){!b.a&&(A(c,"spdy")||A(c,"quic")||A(c,"h2"))&&(b.f=b.g,b.a=new Tc,b.b&&(Zc(b,b.b),b.b=null))}function $c(b){return b.b?!0:b.a?b.a.a.c>=b.f:!1}
function ad(b){return b.b?1:b.a?b.a.a.c:0}function bd(b,c){b.b?b=b.b==c:b.a?(c=Uc(c),b=R(b.a.a.b,c)):b=!1;return b}function Zc(b,c){b.a?b.a.add(c):b.b=c}function cd(b,c){if(b.b&&b.b==c)b.b=null;else{var d;if(d=b.a)d=Uc(c),d=R(b.a.a.b,d);d&&rc(b.a.a,Uc(c))}}Wc.prototype.cancel=function(){this.c=dd(this);this.b?(this.b.cancel(),this.b=null):this.a&&0!=this.a.a.c&&(ka(this.a.C(),function(b){b.cancel()}),qc(this.a.a))};
function dd(b){if(null!=b.b)return b.c.concat(b.b.j);if(null!=b.a&&0!=b.a.a.c){var c=b.c;ka(b.a.C(),function(d){c=c.concat(d.j)});return c}return oa(b.c)};function ed(){}ed.prototype.stringify=function(b){return l.JSON.stringify(b,void 0)};ed.prototype.parse=function(b){return l.JSON.parse(b,void 0)};function fd(){this.a=new ed}function gd(b,c,d){var e=d||"";try{oc(b,function(f,g){var k=f;t(f)&&(k=mb(f));c.push(e+g+"="+encodeURIComponent(k))})}catch(f){throw c.push(e+"type="+encodeURIComponent("_badmap")),f;}};function hd(b,c){var d=new Ib;if(l.Image){var e=new Image;e.onload=w(id,d,e,"TestLoadImage: loaded",!0,c);e.onerror=w(id,d,e,"TestLoadImage: error",!1,c);e.onabort=w(id,d,e,"TestLoadImage: abort",!1,c);e.ontimeout=w(id,d,e,"TestLoadImage: timeout",!1,c);l.setTimeout(function(){if(e.ontimeout)e.ontimeout()},1E4);e.src=b}else c(!1)}function id(b,c,d,e,f){try{c.onload=null,c.onerror=null,c.onabort=null,c.ontimeout=null,f(e)}catch(g){}};var jd=l.JSON.parse;function X(b){H.call(this);this.headers=new Q;this.H=b||null;this.b=!1;this.s=this.a=null;this.A="";this.h=0;this.f="";this.g=this.w=this.l=this.v=!1;this.o=0;this.m=null;this.I=kd;this.D=this.F=!1}y(X,H);var kd="",ld=/^https?$/i,md=["POST","PUT"];h=X.prototype;
h.ca=function(b,c,d,e){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.A+"; newUri="+b);c=c?c.toUpperCase():"GET";this.A=b;this.f="";this.h=0;this.v=!1;this.b=!0;this.a=new XMLHttpRequest;this.s=this.H?Sb(this.H):Sb(Wb);this.a.onreadystatechange=v(this.Da,this);try{this.w=!0,this.a.open(c,String(b),!0),this.w=!1}catch(g){nd(this,g);return}b=d||"";var f=new Q(this.headers);e&&oc(e,function(g,k){f.set(k,g)});e=la(f.K());d=l.FormData&&b instanceof l.FormData;!(0<=
ja(md,c))||e||d||f.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");f.forEach(function(g,k){this.a.setRequestHeader(k,g)},this);this.I&&(this.a.responseType=this.I);"withCredentials"in this.a&&this.a.withCredentials!==this.F&&(this.a.withCredentials=this.F);try{od(this),0<this.o&&((this.D=pd(this.a))?(this.a.timeout=this.o,this.a.ontimeout=v(this.Aa,this)):this.m=Cb(this.Aa,this.o,this)),this.l=!0,this.a.send(b),this.l=!1}catch(g){nd(this,g)}};
function pd(b){return C&&La(9)&&aa(b.timeout)&&void 0!==b.ontimeout}function ma(b){return"content-type"==b.toLowerCase()}h.Aa=function(){"undefined"!=typeof goog&&this.a&&(this.f="Timed out after "+this.o+"ms, aborting",this.h=8,this.dispatchEvent("timeout"),this.abort(8))};function nd(b,c){b.b=!1;b.a&&(b.g=!0,b.a.abort(),b.g=!1);b.f=c;b.h=5;qd(b);rd(b)}function qd(b){b.v||(b.v=!0,b.dispatchEvent("complete"),b.dispatchEvent("error"))}
h.abort=function(b){this.a&&this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1,this.h=b||7,this.dispatchEvent("complete"),this.dispatchEvent("abort"),rd(this))};h.G=function(){this.a&&(this.b&&(this.b=!1,this.g=!0,this.a.abort(),this.g=!1),rd(this,!0));X.N.G.call(this)};h.Da=function(){this.j||(this.w||this.l||this.g?sd(this):this.Ya())};h.Ya=function(){sd(this)};
function sd(b){if(b.b&&"undefined"!=typeof goog&&(!b.s[1]||4!=O(b)||2!=b.T()))if(b.l&&4==O(b))Cb(b.Da,0,b);else if(b.dispatchEvent("readystatechange"),4==O(b)){b.b=!1;try{var c=b.T();a:switch(c){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var d=!0;break a;default:d=!1}var e;if(!(e=d)){var f;if(f=0===c){var g=String(b.A).match(sc)[1]||null;if(!g&&l.self&&l.self.location){var k=l.self.location.protocol;g=k.substr(0,k.length-1)}f=!ld.test(g?g.toLowerCase():"")}e=f}if(e)b.dispatchEvent("complete"),
b.dispatchEvent("success");else{b.h=6;try{var m=2<O(b)?b.a.statusText:""}catch(E){m=""}b.f=m+" ["+b.T()+"]";qd(b)}}finally{rd(b)}}}function rd(b,c){if(b.a){od(b);var d=b.a,e=b.s[0]?ba:null;b.a=null;b.s=null;c||b.dispatchEvent("ready");try{d.onreadystatechange=e}catch(f){}}}function od(b){b.a&&b.D&&(b.a.ontimeout=null);b.m&&(l.clearTimeout(b.m),b.m=null)}function O(b){return b.a?b.a.readyState:0}h.T=function(){try{return 2<O(this)?this.a.status:-1}catch(b){return-1}};
h.aa=function(){try{return this.a?this.a.responseText:""}catch(b){return""}};h.Ta=function(b){if(this.a){var c=this.a.responseText;b&&0==c.indexOf(b)&&(c=c.substring(b.length));return jd(c)}};function hc(b,c){return b.a?b.a.getResponseHeader(c):null}h.xa=function(){return this.h};h.Wa=function(){return n(this.f)?this.f:String(this.f)};function td(b){var c="";ua(b,function(d,e){c+=e;c+=":";c+=d;c+="\r\n"});return c}function ud(b,c,d){a:{for(e in d){var e=!1;break a}e=!0}if(e)return b;d=td(d);if(n(b)){c=encodeURIComponent(String(c));d=null!=d?"="+encodeURIComponent(String(d)):"";if(c+=d){d=b.indexOf("#");0>d&&(d=b.length);e=b.indexOf("?");if(0>e||e>d){e=d;var f=""}else f=b.substring(e+1,d);b=[b.substr(0,e),f,b.substr(d)];d=b[1];b[1]=c?d?d+"&"+c:c:d;b=b[0]+(b[1]?"?"+b[1]:"")+b[2]}return b}T(b,c,d);return b};function vd(b){this.f=[];this.F=new Sc;this.ga=this.oa=this.B=this.ha=this.a=this.I=this.j=this.V=this.g=this.J=this.i=null;this.Pa=this.P=0;this.Na=!!p("internalChannelParams.failFast",b);this.ia=this.w=this.s=this.l=this.h=this.c=null;this.na=!0;this.m=this.qa=this.O=-1;this.S=this.v=this.A=0;this.Ma=p("internalChannelParams.baseRetryDelayMs",b)||5E3;this.Qa=p("internalChannelParams.retryDelaySeedMs",b)||1E4;this.Oa=p("internalChannelParams.forwardChannelMaxRetries",b)||2;this.pa=p("internalChannelParams.forwardChannelRequestTimeoutMs",
b)||2E4;this.Ja=b&&b.yb||void 0;this.D=void 0;this.R=b&&b.supportsCrossDomainXhr||!1;this.H="";this.b=new Wc(b&&b.concurrentRequestLimit);this.ja=new fd;this.o=b&&void 0!==b.backgroundChannelTest?b.backgroundChannelTest:!0;(this.W=b&&b.fastHandshake||!1)&&!this.o&&(this.o=!0);b&&b.forceLongPolling&&(this.na=!1);this.fa=void 0}h=vd.prototype;h.va=8;h.u=1;
function wd(b){xd(b);if(3==b.u){var c=b.P++,d=N(b.B);T(d,"SID",b.H);T(d,"RID",c);T(d,"TYPE","terminate");yd(b,d);c=new M(b,c,void 0);c.F=2;c.f=bc(N(d));d=!1;l.navigator&&l.navigator.sendBeacon&&(d=l.navigator.sendBeacon(c.f.toString(),""));!d&&l.Image&&((new Image).src=c.f,d=!0);d||(c.a=c.g.$(null),c.a.ca(c.f));c.v=x();ec(c)}zd(b)}
function xd(b){b.w&&(b.w.abort(),b.w=null);b.a&&(b.a.cancel(),b.a=null);b.l&&(l.clearTimeout(b.l),b.l=null);Ad(b);b.b.cancel();b.h&&(aa(b.h)&&l.clearTimeout(b.h),b.h=null)}function Bd(b,c){b.f.push(new Vc(b.Pa++,c));3==b.u&&Cd(b)}h.Ba=function(){return 0==this.u};function Cd(b){$c(b.b)||b.h||(b.h=!0,ub(b.Ga,b),b.A=0)}
function Dd(b,c){if(ad(b.b)>=b.b.f-(b.h?1:0))return!1;if(b.h)return b.f=c.j.concat(b.f),!0;if(1==b.u||2==b.u||b.A>=(b.Na?0:b.Oa))return!1;b.h=Ob(v(b.Ga,b,c),Ed(b,b.A));b.A++;return!0}
h.Ga=function(b){if(this.h)if(this.h=null,1==this.u){if(!b){this.P=Math.floor(1E5*Math.random());b=this.P++;var c=new M(this,b,void 0),d=this.i;this.J&&(d?(d=va(d),xa(d,this.J)):d=this.J);null===this.g&&(c.h=d);var e;if(this.W)a:{for(var f=e=0;f<this.f.length;f++){b:{var g=this.f[f];if("__data__"in g.a&&(g=g.a.__data__,n(g))){g=g.length;break b}g=void 0}if(void 0===g)break;e+=g;if(4096<e){e=f;break a}if(4096===e||f===this.f.length-1){e=f+1;break a}}e=1E3}else e=1E3;e=Fd(this,c,e);f=N(this.B);T(f,
"RID",b);T(f,"CVER",22);this.o&&this.j&&T(f,"X-HTTP-Session-Id",this.j);yd(this,f);this.g&&d&&ud(f,this.g,d);Zc(this.b,c);this.W?(T(f,"$req",e),T(f,"SID","null"),c.S=!0,ac(c,f,null)):ac(c,f,e);this.u=2}}else 3==this.u&&(b?Gd(this,b):0==this.f.length||$c(this.b)||Gd(this))};
function Gd(b,c){var d;c?d=c.W:d=b.P++;var e=N(b.B);T(e,"SID",b.H);T(e,"RID",d);T(e,"AID",b.O);yd(b,e);b.g&&b.i&&ud(e,b.g,b.i);d=new M(b,d,b.A+1);null===b.g&&(d.h=b.i);c&&(b.f=c.j.concat(b.f));c=Fd(b,d,1E3);d.setTimeout(Math.round(.5*b.pa)+Math.round(.5*b.pa*Math.random()));Zc(b.b,d);ac(d,e,c)}function yd(b,c){b.c&&oc({},function(d,e){T(c,e,d)})}
function Fd(b,c,d){d=Math.min(b.f.length,d);var e=b.c?v(b.c.Ra,b.c,b):null;a:for(var f=b.f,g=-1;;){var k=["count="+d];-1==g?0<d?(g=f[0].b,k.push("ofs="+g)):g=0:k.push("ofs="+g);for(var m=!0,E=0;E<d;E++){var yb=f[E].b,Pc=f[E].a;yb-=g;if(0>yb)g=Math.max(0,f[E].b-100),m=!1;else try{gd(Pc,k,"req"+yb+"_")}catch(Pd){e&&e(Pc)}}if(m){e=k.join("&");break a}}b=b.f.splice(0,d);c.j=b;return e}function Hd(b){b.a||b.l||(b.S=1,ub(b.Fa,b),b.v=0)}
function Id(b){if(b.a||b.l||3<=b.v)return!1;b.S++;b.l=Ob(v(b.Fa,b),Ed(b,b.v));b.v++;return!0}h.Fa=function(){this.l=null;this.a=new M(this,"rpc",this.S);null===this.g&&(this.a.h=this.i);this.a.J=0;var b=N(this.oa);T(b,"RID","rpc");T(b,"SID",this.H);T(b,"CI",this.ia?"0":"1");T(b,"AID",this.O);yd(this,b);T(b,"TYPE","xmlhttp");this.g&&this.i&&ud(b,this.g,this.i);this.D&&this.a.setTimeout(this.D);dc(this.a,b,!0,this.ga)};
function Qc(b,c,d){var e=c.l;e&&Yc(b.b,e);b.ia=b.na&&d;b.m=c.c;b.B=Rc(b,null,b.ha);Cd(b)}
h.Ea=function(b,c){if(0!=this.u&&(this.a==b||bd(this.b,b)))if(this.m=b.o,!b.s&&bd(this.b,b)&&3==this.u){try{var d=this.ja.a.parse(c)}catch(g){d=null}if(r(d)&&3==d.length){c=d;if(0==c[0])a:{if(!this.l){if(this.a)if(this.a.v+3E3<b.v)Ad(this),this.a.cancel(),this.a=null;else break a;Id(this);K(18)}}else this.qa=c[1],0<this.qa-this.O&&37500>c[2]&&this.ia&&0==this.v&&!this.s&&(this.s=Ob(v(this.Xa,this),6E3));if(1>=ad(this.b)&&this.fa){try{this.fa()}catch(g){}this.fa=void 0}}else W(this,11)}else if((b.s||
this.a==b)&&Ad(this),!pa(c))for(c=d=this.ja.a.parse(c),d=0;d<c.length;d++){var e=c[d];this.O=e[0];e=e[1];if(2==this.u)if("c"==e[0]){this.H=e[1];this.ga=e[2];var f=e[3];null!=f&&(this.va=f);e=e[5];null!=e&&aa(e)&&0<e&&(this.D=1.5*e);this.o&&(e=b.a)&&((f=hc(e,"X-Client-Wire-Protocol"))&&Yc(this.b,f),this.j&&(e=hc(e,"X-HTTP-Session-Id")))&&(this.I=e,T(this.B,this.j,e));this.u=3;this.c&&this.c.ua();e=b;this.oa=Rc(this,this.Y()?this.ga:null,this.ha);e.s?(cd(this.b,e),(f=this.D)&&e.setTimeout(f),e.i&&(gc(e),
ec(e)),this.a=e):Hd(this);0<this.f.length&&Cd(this)}else"stop"!=e[0]&&"close"!=e[0]||W(this,7);else 3==this.u&&("stop"==e[0]||"close"==e[0]?"stop"==e[0]?W(this,7):wd(this):"noop"!=e[0]&&this.c&&this.c.ta(e),this.v=0)}};h.Xa=function(){null!=this.s&&(this.s=null,this.a.cancel(),this.a=null,Id(this),K(19))};function Ad(b){null!=b.s&&(l.clearTimeout(b.s),b.s=null)}
h.ma=function(b){var c=null;if(this.a==b){Ad(this);this.a=null;var d=2}else if(bd(this.b,b))c=b.j,cd(this.b,b),d=1;else return;this.m=b.o;if(0!=this.u)if(b.b)if(1==d){c=b.l?b.l.length:0;b=x()-b.v;var e=this.A;d=Kb();d.dispatchEvent(new Nb(d,c,b,e));Cd(this)}else Hd(this);else if(e=b.c,3==e||0==e&&0<this.m||!(1==d&&Dd(this,b)||2==d&&Id(this)))switch(c&&0<c.length&&(b=this.b,b.c=b.c.concat(c)),e){case 1:W(this,5);break;case 4:W(this,10);break;case 3:W(this,6);break;default:W(this,2)}};
function Ed(b,c){var d=b.Ma+Math.floor(Math.random()*b.Qa);b.la()||(d*=2);return d*c}function W(b,c){if(2==c){var d=null;b.c&&(d=null);var e=v(b.cb,b);d||(d=new S("//www.google.com/images/cleardot.gif"),l.location&&"http"==l.location.protocol||uc(d,"https"),bc(d));hd(d.toString(),e)}else K(2);b.u=0;b.c&&b.c.sa(c);zd(b);xd(b)}h.cb=function(b){b?K(2):K(1)};function zd(b){b.u=0;b.m=-1;if(b.c){if(0!=dd(b.b).length||0!=b.f.length)b.b.c.length=0,oa(b.f),b.f.length=0;b.c.ra()}}
function Rc(b,c,d){var e=Ic(d);if(""!=e.c)c&&vc(e,c+"."+e.c),wc(e,e.h);else{var f=l.location;e=Jc(f.protocol,c?c+"."+f.hostname:f.hostname,+f.port,d)}b.V&&ua(b.V,function(g,k){T(e,k,g)});c=b.j;d=b.I;c&&d&&T(e,c,d);T(e,"VER",b.va);yd(b,e);return e}h.$=function(b){if(b&&!this.R)throw Error("Can't create secondary domain capable XhrIo object.");b=new X(this.Ja);b.F=this.R;return b};h.la=function(){return!!this.c&&!0};h.Y=function(){return this.R};function Jd(){}h=Jd.prototype;h.ua=function(){};
h.ta=function(){};h.sa=function(){};h.ra=function(){};h.Ra=function(){};function Kd(b){for(var c=arguments[0],d=1;d<arguments.length;d++){var e=arguments[d];if(0==e.lastIndexOf("/",0))c=e;else{var f;(f=""==c)||(f=c.length-1,f=0<=f&&c.indexOf("/",f)==f);f?c+=e:c+="/"+e}}return c};function Ld(){if(C&&!(10<=Number(Ma)))throw Error("Environmental error: no available transport.");}Ld.prototype.a=function(b,c){return new Y(b,c)};
function Y(b,c){H.call(this);this.a=new vd(c);this.g=b;this.m=c&&c.testUrl?c.testUrl:Kd(this.g,"test");this.b=c&&c.messageUrlParams||null;b=c&&c.messageHeaders||null;c&&c.clientProtocolHeaderRequired&&(b?b["X-Client-Protocol"]="webchannel":b={"X-Client-Protocol":"webchannel"});this.a.i=b;b=c&&c.initMessageHeaders||null;c&&c.messageContentType&&(b?b["X-WebChannel-Content-Type"]=c.messageContentType:b={"X-WebChannel-Content-Type":c.messageContentType});c&&c.wa&&(b?b["X-WebChannel-Client-Profile"]=c.wa:
b={"X-WebChannel-Client-Profile":c.wa});this.a.J=b;(b=c&&c.httpHeadersOverwriteParam)&&!pa(b)&&(this.a.g=b);this.l=c&&c.supportsCrossDomainXhr||!1;this.h=c&&c.sendRawJson||!1;(c=c&&c.httpSessionIdParam)&&!pa(c)&&(this.a.j=c,b=this.b,null!==b&&c in b&&(b=this.b,c in b&&delete b[c]));this.f=new Z(this)}y(Y,H);h=Y.prototype;h.addEventListener=function(b,c,d,e){Y.N.addEventListener.call(this,b,c,d,e)};h.removeEventListener=function(b,c,d,e){Y.N.removeEventListener.call(this,b,c,d,e)};
h.Ua=function(){this.a.c=this.f;this.l&&(this.a.R=!0);var b=this.a,c=this.m,d=this.g,e=this.b||void 0;K(0);b.ha=d;b.V=e||{};b.o&&(b.F.b=[],b.F.a=!1);b.w=new Nc(b);null===b.g&&(b.w.h=b.i);d=c;b.g&&b.i&&(d=ud(c,b.g,b.i));b=b.w;b.i=d;c=Rc(b.a,null,b.i);K(3);d=b.a.F.b;null!=d?(b.f=d[0],b.M=1,Oc(b)):(fc(c,"MODE","init"),!b.a.o&&b.a.j&&fc(c,"X-HTTP-Session-Id",b.a.j),b.b=new M(b,void 0,void 0),b.b.h=b.h,dc(b.b,c,!1,null),b.M=0)};h.close=function(){wd(this.a)};
h.Va=function(b){if(n(b)){var c={};c.__data__=b;Bd(this.a,c)}else this.h?(c={},c.__data__=mb(b),Bd(this.a,c)):Bd(this.a,b)};h.G=function(){this.a.c=null;delete this.f;wd(this.a);delete this.a;Y.N.G.call(this)};function Md(b){Ub.call(this);var c=b.__sm__;if(c){a:{for(var d in c){b=d;break a}b=void 0}(this.c=b)?(b=this.c,this.data=null!==c&&b in c?c[b]:void 0):this.data=c}else this.data=b}y(Md,Ub);function Nd(){Vb.call(this);this.status=1}y(Nd,Vb);function Z(b){this.a=b}y(Z,Jd);Z.prototype.ua=function(){this.a.dispatchEvent("a")};
Z.prototype.ta=function(b){this.a.dispatchEvent(new Md(b))};Z.prototype.sa=function(b){this.a.dispatchEvent(new Nd(b))};Z.prototype.ra=function(){this.a.dispatchEvent("b")};var Od=w(function(b,c){function d(){}d.prototype=b.prototype;var e=new d;b.apply(e,Array.prototype.slice.call(arguments,1));return e},Ld);/*
Copyright 2017 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
Ld.prototype.createWebChannel=Ld.prototype.a;Y.prototype.send=Y.prototype.Va;Y.prototype.open=Y.prototype.Ua;Y.prototype.close=Y.prototype.close;Pb.NO_ERROR=0;Pb.TIMEOUT=8;Pb.HTTP_ERROR=6;Qb.COMPLETE="complete";Tb.EventType=L;L.OPEN="a";L.CLOSE="b";L.ERROR="c";L.MESSAGE="d";H.prototype.listen=H.prototype.ya;X.prototype.listenOnce=X.prototype.za;X.prototype.getLastError=X.prototype.Wa;X.prototype.getLastErrorCode=X.prototype.xa;X.prototype.getStatus=X.prototype.T;X.prototype.getResponseJson=X.prototype.Ta;
X.prototype.getResponseText=X.prototype.aa;X.prototype.send=X.prototype.ca;module.exports={createWebChannelTransport:Od,ErrorCode:Pb,EventType:Qb,WebChannel:Tb,XhrIo:X};}).call(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : {})
//# sourceMappingURL=index.js.map