/* Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ var n;function aa(a){var b=0;return function(){return bc&&(c=Math.max(c+f,0));c>>0),ua=0;function va(a,b,c){return a.call.apply(a.bind,arguments)} function wa(a,b,c){if(!a)throw Error();if(2b?1:0};var I;a:{var Qa=x.navigator;if(Qa){var Ra=Qa.userAgent;if(Ra){I=Ra;break a}}I=""};function Sa(a,b){for(var c in a)b.call(void 0,a[c],c,a)}function Ta(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}var Ua="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Va(a,b){for(var c,d,f=1;fparseFloat(fb)){eb=String(hb);break a}}eb=fb}var Za={}; function jb(){return Ya(function(){for(var a=0,b=Oa(String(eb)).split("."),c=Oa("9").split("."),d=Math.max(b.length,c.length),f=0;0==a&&f>>0);function Ab(a){if("function"===typeof a)return a;a[Ib]||(a[Ib]=function(b){return a.handleEvent(b)});return a[Ib]};function N(){kb.call(this);this.f=new sb(this);this.U=this}B(N,kb);N.prototype[L]=!0;N.prototype.addEventListener=function(a,b,c,d){yb(this,a,b,c,d)};N.prototype.removeEventListener=function(a,b,c,d){Gb(this,a,b,c,d)};function O(a,b){a=a.U;var c=b.type||b;if("string"===typeof b)b=new J(b,a);else if(b instanceof J)b.target=b.target||a;else{var d=b;b=new J(c,a);Va(b,d)}a=b.a=a;Jb(a,c,!0,b);Jb(a,c,!1,b)} function Jb(a,b,c,d){if(b=a.f.a[String(b)]){b=b.concat();for(var f=!0,g=0;g=f.value}d&&(b=b||Nb,d=$b(ac(),a.getName()),"function"===typeof c&&(c=c()),Sb||(Sb=new Rb),a=a.getName(),a=new Ub(b,c,a),Xb(d,a))}function P(a,b){a&&bc(a,Qb,b)};function cc(){}cc.prototype.a=null;function dc(a){var b;(b=a.a)||(b={},ec(a)&&(b[0]=!0,b[1]=!0),b=a.a=b);return b};var fc;function gc(){}B(gc,cc);function hc(a){return(a=ec(a))?new ActiveXObject(a):new XMLHttpRequest}function ec(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;c2*this.size&&oc(this),!0):!1};function oc(a){if(a.size!=a.j.length){for(var b=0,c=0;b=d.j.length)throw kc;var g=d.j[b++];return a?g:d.o[g]};f.next=f.a.bind(f);return f};function U(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var pc=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function qc(a){N.call(this);this.headers=new nc;this.C=a||null;this.c=!1;this.J=this.a=null;this.P=this.v="";this.g=0;this.l="";this.i=this.N=this.s=this.L=!1;this.h=0;this.w=null;this.m=rc;this.I=this.M=!1}B(qc,N);var rc="";qc.prototype.b=$b(ac(),"goog.net.XhrIo",void 0).g;var sc=/^https?$/i,tc=["POST","PUT"]; function uc(a,b,c){if(a.a)throw Error("[goog.net.XhrIo] Object is active with another request="+a.v+"; newUri="+b);a.v=b;a.l="";a.g=0;a.P="POST";a.L=!1;a.c=!0;a.a=a.C?hc(a.C):hc(fc);a.J=a.C?dc(a.C):dc(fc);a.a.onreadystatechange=A(a.R,a);try{P(a.b,V(a,"Opening Xhr")),a.N=!0,a.a.open("POST",String(b),!0),a.N=!1}catch(g){P(a.b,V(a,"Error opening Xhr: "+g.message));vc(a,g);return}b=c||"";c=a.headers.clone();var d=c.G().find(function(g){return"content-type"==g.toLowerCase()}),f=x.FormData&&b instanceof x.FormData;!(0<=Na(tc,"POST"))||d||f||c.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");c.forEach(function(g,e){this.a.setRequestHeader(e,g)},a);a.m&&(a.a.responseType=a.m);"withCredentials"in a.a&&a.a.withCredentials!==a.M&&(a.a.withCredentials=a.M);try{wc(a),0>4);64!=e&&(b(g<<4&240|e>>2),64!=h&&b(e<<6&192|h))}} function Ic(){if(!Fc){Fc={};for(var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),b=["+/=","+/","-_=","-_.","-_"],c=0;5>c;c++){var d=a.concat(b[c].split(""));Ec[c]=d;for(var f=0;fh&&(h=f.length),e=f.indexOf("?"), 0>e||e>h?(e=h,k=""):k=f.substring(e+1,h),f=[f.substr(0,e),k,f.substr(h)],h=f[1],f[1]=m?h?h+"&"+m:m:h,f=f[0]+(f[1]?"?"+f[1]:"")+f[2]}else f.a("$httpHeaders",h)}b=(0,d.a)(b.getRequestMessage());d=b.length;m=[0,0,0,0];h=new Uint8Array(5+d);for(e=3;0<=e;e--)m[e]=d%256,d>>>=8;h.set(new Uint8Array(m),1);h.set(b,5);b=h;if("text"==a.a){a=b;var p;void 0===p&&(p=0);Ic();p=Ec[p];b=Array(Math.floor(a.length/3));d=p[64]||"";for(m=h=0;h>2];l=p[(l&3)<<4|q>>4]; q=p[(q&15)<<2|k>>6];k=p[k&63];b[m++]=e+l+q+k}e=0;k=d;switch(a.length-h){case 2:e=a[h+1],k=p[(e&15)<<2]||d;case 1:a=a[h],b[m]=p[a>>2]+p[(a&3)<<4|e>>4]+k+d}b=b.join("")}else"binary"==a.a&&(c.m="arraybuffer");uc(c,f,b);return g} function Qc(a,b,c){var d=!1,f=null,g=!1;a.on("data",function(e){d=!0;f=e});a.on("error",function(e){0==e.code||g||(g=!0,b(e,null))});a.on("status",function(e){0==e.code||g?c&&b(null,null,e):(g=!0,b({code:e.code,message:e.details,metadata:e.metadata},null))});if(c)a.on("metadata",function(e){b(null,null,null,e)});a.on("end",function(){g||(d?c?b(null,f,null,null,!0):b(null,f):b({code:2,message:"Incomplete response"}));c&&b(null,null)})} function Oc(a,b){var c=a;b.forEach(function(d){var f=c;c=function(g){return d.intercept(g,f)}});return c}Z.prototype.serverStreaming=Z.prototype.Y;Z.prototype.unaryCall=Z.prototype.unaryCall;Z.prototype.thenableCall=Z.prototype.S;Z.prototype.rpcCall=Z.prototype.X;module.exports.CallOptions=xa;module.exports.MethodDescriptor=ya;module.exports.GrpcWebClientBase=Z;module.exports.RpcError=E;module.exports.StatusCode={OK:0,CANCELLED:1,UNKNOWN:2,INVALID_ARGUMENT:3,DEADLINE_EXCEEDED:4,NOT_FOUND:5,ALREADY_EXISTS:6,PERMISSION_DENIED:7,UNAUTHENTICATED:16,RESOURCE_EXHAUSTED:8,FAILED_PRECONDITION:9,ABORTED:10,OUT_OF_RANGE:11,UNIMPLEMENTED:12,INTERNAL:13,UNAVAILABLE:14,DATA_LOSS:15};module.exports.MethodType={UNARY:"unary",SERVER_STREAMING:"server_streaming",BIDI_STREAMING:"bidi_streaming"}; Kb="undefined"!==typeof globalThis&&globalThis||self;