Files
rustdesk-server/web_client/dist/bundle.js
T
mike 9d53999eea
build / build-linux-amd64 (push) Successful in 2m0s
Implement password handling for unattended access
2026-05-08 11:34:07 +02:00

31 lines
537 KiB
JavaScript

var Er=Object.create;var Hn=Object.defineProperty;var Tr=Object.getOwnPropertyDescriptor;var Dr=Object.getOwnPropertyNames;var Rr=Object.getPrototypeOf,Lr=Object.prototype.hasOwnProperty;var Pt=(p=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(p,{get:(i,o)=>(typeof require<"u"?require:i)[o]}):p)(function(p){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+p+'" is not supported')});var Te=(p,i)=>()=>(i||p((i={exports:{}}).exports,i),i.exports);var Fr=(p,i,o,e)=>{if(i&&typeof i=="object"||typeof i=="function")for(let t of Dr(i))!Lr.call(p,t)&&t!==o&&Hn(p,t,{get:()=>i[t],enumerable:!(e=Tr(i,t))||e.enumerable});return p};var $n=(p,i,o)=>(o=p!=null?Er(Rr(p)):{},Fr(i||!p||!p.__esModule?Hn(o,"default",{value:p,enumerable:!0}):o,p));var zn=Te(()=>{});var Kn=Te((wo,Mt)=>{(function(p){"use strict";var i=function(h){var y,b=new Float64Array(16);if(h)for(y=0;y<h.length;y++)b[y]=h[y];return b},o=function(){throw new Error("no PRNG")},e=new Uint8Array(16),t=new Uint8Array(32);t[0]=9;var n=i(),r=i([1]),l=i([56129,1]),d=i([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),c=i([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),w=i([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),j=i([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),C=i([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function K(h,y,b,a){h[y]=b>>24&255,h[y+1]=b>>16&255,h[y+2]=b>>8&255,h[y+3]=b&255,h[y+4]=a>>24&255,h[y+5]=a>>16&255,h[y+6]=a>>8&255,h[y+7]=a&255}function V(h,y,b,a,_){var k,v=0;for(k=0;k<_;k++)v|=h[y+k]^b[a+k];return(1&v-1>>>8)-1}function ce(h,y,b,a){return V(h,y,b,a,16)}function ke(h,y,b,a){return V(h,y,b,a,32)}function Qe(h,y,b,a){for(var _=a[0]&255|(a[1]&255)<<8|(a[2]&255)<<16|(a[3]&255)<<24,k=b[0]&255|(b[1]&255)<<8|(b[2]&255)<<16|(b[3]&255)<<24,v=b[4]&255|(b[5]&255)<<8|(b[6]&255)<<16|(b[7]&255)<<24,D=b[8]&255|(b[9]&255)<<8|(b[10]&255)<<16|(b[11]&255)<<24,q=b[12]&255|(b[13]&255)<<8|(b[14]&255)<<16|(b[15]&255)<<24,H=a[4]&255|(a[5]&255)<<8|(a[6]&255)<<16|(a[7]&255)<<24,A=y[0]&255|(y[1]&255)<<8|(y[2]&255)<<16|(y[3]&255)<<24,se=y[4]&255|(y[5]&255)<<8|(y[6]&255)<<16|(y[7]&255)<<24,M=y[8]&255|(y[9]&255)<<8|(y[10]&255)<<16|(y[11]&255)<<24,W=y[12]&255|(y[13]&255)<<8|(y[14]&255)<<16|(y[15]&255)<<24,G=a[8]&255|(a[9]&255)<<8|(a[10]&255)<<16|(a[11]&255)<<24,te=b[16]&255|(b[17]&255)<<8|(b[18]&255)<<16|(b[19]&255)<<24,ee=b[20]&255|(b[21]&255)<<8|(b[22]&255)<<16|(b[23]&255)<<24,X=b[24]&255|(b[25]&255)<<8|(b[26]&255)<<16|(b[27]&255)<<24,Z=b[28]&255|(b[29]&255)<<8|(b[30]&255)<<16|(b[31]&255)<<24,Q=a[12]&255|(a[13]&255)<<8|(a[14]&255)<<16|(a[15]&255)<<24,I=_,z=k,B=v,J=D,U=q,N=H,m=A,P=se,L=M,T=W,R=G,F=te,Y=ee,ne=X,oe=Z,ie=Q,O,le=0;le<20;le+=2)O=I+Y|0,U^=O<<7|O>>>25,O=U+I|0,L^=O<<9|O>>>23,O=L+U|0,Y^=O<<13|O>>>19,O=Y+L|0,I^=O<<18|O>>>14,O=N+z|0,T^=O<<7|O>>>25,O=T+N|0,ne^=O<<9|O>>>23,O=ne+T|0,z^=O<<13|O>>>19,O=z+ne|0,N^=O<<18|O>>>14,O=R+m|0,oe^=O<<7|O>>>25,O=oe+R|0,B^=O<<9|O>>>23,O=B+oe|0,m^=O<<13|O>>>19,O=m+B|0,R^=O<<18|O>>>14,O=ie+F|0,J^=O<<7|O>>>25,O=J+ie|0,P^=O<<9|O>>>23,O=P+J|0,F^=O<<13|O>>>19,O=F+P|0,ie^=O<<18|O>>>14,O=I+J|0,z^=O<<7|O>>>25,O=z+I|0,B^=O<<9|O>>>23,O=B+z|0,J^=O<<13|O>>>19,O=J+B|0,I^=O<<18|O>>>14,O=N+U|0,m^=O<<7|O>>>25,O=m+N|0,P^=O<<9|O>>>23,O=P+m|0,U^=O<<13|O>>>19,O=U+P|0,N^=O<<18|O>>>14,O=R+T|0,F^=O<<7|O>>>25,O=F+R|0,L^=O<<9|O>>>23,O=L+F|0,T^=O<<13|O>>>19,O=T+L|0,R^=O<<18|O>>>14,O=ie+oe|0,Y^=O<<7|O>>>25,O=Y+ie|0,ne^=O<<9|O>>>23,O=ne+Y|0,oe^=O<<13|O>>>19,O=oe+ne|0,ie^=O<<18|O>>>14;I=I+_|0,z=z+k|0,B=B+v|0,J=J+D|0,U=U+q|0,N=N+H|0,m=m+A|0,P=P+se|0,L=L+M|0,T=T+W|0,R=R+G|0,F=F+te|0,Y=Y+ee|0,ne=ne+X|0,oe=oe+Z|0,ie=ie+Q|0,h[0]=I>>>0&255,h[1]=I>>>8&255,h[2]=I>>>16&255,h[3]=I>>>24&255,h[4]=z>>>0&255,h[5]=z>>>8&255,h[6]=z>>>16&255,h[7]=z>>>24&255,h[8]=B>>>0&255,h[9]=B>>>8&255,h[10]=B>>>16&255,h[11]=B>>>24&255,h[12]=J>>>0&255,h[13]=J>>>8&255,h[14]=J>>>16&255,h[15]=J>>>24&255,h[16]=U>>>0&255,h[17]=U>>>8&255,h[18]=U>>>16&255,h[19]=U>>>24&255,h[20]=N>>>0&255,h[21]=N>>>8&255,h[22]=N>>>16&255,h[23]=N>>>24&255,h[24]=m>>>0&255,h[25]=m>>>8&255,h[26]=m>>>16&255,h[27]=m>>>24&255,h[28]=P>>>0&255,h[29]=P>>>8&255,h[30]=P>>>16&255,h[31]=P>>>24&255,h[32]=L>>>0&255,h[33]=L>>>8&255,h[34]=L>>>16&255,h[35]=L>>>24&255,h[36]=T>>>0&255,h[37]=T>>>8&255,h[38]=T>>>16&255,h[39]=T>>>24&255,h[40]=R>>>0&255,h[41]=R>>>8&255,h[42]=R>>>16&255,h[43]=R>>>24&255,h[44]=F>>>0&255,h[45]=F>>>8&255,h[46]=F>>>16&255,h[47]=F>>>24&255,h[48]=Y>>>0&255,h[49]=Y>>>8&255,h[50]=Y>>>16&255,h[51]=Y>>>24&255,h[52]=ne>>>0&255,h[53]=ne>>>8&255,h[54]=ne>>>16&255,h[55]=ne>>>24&255,h[56]=oe>>>0&255,h[57]=oe>>>8&255,h[58]=oe>>>16&255,h[59]=oe>>>24&255,h[60]=ie>>>0&255,h[61]=ie>>>8&255,h[62]=ie>>>16&255,h[63]=ie>>>24&255}function ze(h,y,b,a){for(var _=a[0]&255|(a[1]&255)<<8|(a[2]&255)<<16|(a[3]&255)<<24,k=b[0]&255|(b[1]&255)<<8|(b[2]&255)<<16|(b[3]&255)<<24,v=b[4]&255|(b[5]&255)<<8|(b[6]&255)<<16|(b[7]&255)<<24,D=b[8]&255|(b[9]&255)<<8|(b[10]&255)<<16|(b[11]&255)<<24,q=b[12]&255|(b[13]&255)<<8|(b[14]&255)<<16|(b[15]&255)<<24,H=a[4]&255|(a[5]&255)<<8|(a[6]&255)<<16|(a[7]&255)<<24,A=y[0]&255|(y[1]&255)<<8|(y[2]&255)<<16|(y[3]&255)<<24,se=y[4]&255|(y[5]&255)<<8|(y[6]&255)<<16|(y[7]&255)<<24,M=y[8]&255|(y[9]&255)<<8|(y[10]&255)<<16|(y[11]&255)<<24,W=y[12]&255|(y[13]&255)<<8|(y[14]&255)<<16|(y[15]&255)<<24,G=a[8]&255|(a[9]&255)<<8|(a[10]&255)<<16|(a[11]&255)<<24,te=b[16]&255|(b[17]&255)<<8|(b[18]&255)<<16|(b[19]&255)<<24,ee=b[20]&255|(b[21]&255)<<8|(b[22]&255)<<16|(b[23]&255)<<24,X=b[24]&255|(b[25]&255)<<8|(b[26]&255)<<16|(b[27]&255)<<24,Z=b[28]&255|(b[29]&255)<<8|(b[30]&255)<<16|(b[31]&255)<<24,Q=a[12]&255|(a[13]&255)<<8|(a[14]&255)<<16|(a[15]&255)<<24,I=_,z=k,B=v,J=D,U=q,N=H,m=A,P=se,L=M,T=W,R=G,F=te,Y=ee,ne=X,oe=Z,ie=Q,O,le=0;le<20;le+=2)O=I+Y|0,U^=O<<7|O>>>25,O=U+I|0,L^=O<<9|O>>>23,O=L+U|0,Y^=O<<13|O>>>19,O=Y+L|0,I^=O<<18|O>>>14,O=N+z|0,T^=O<<7|O>>>25,O=T+N|0,ne^=O<<9|O>>>23,O=ne+T|0,z^=O<<13|O>>>19,O=z+ne|0,N^=O<<18|O>>>14,O=R+m|0,oe^=O<<7|O>>>25,O=oe+R|0,B^=O<<9|O>>>23,O=B+oe|0,m^=O<<13|O>>>19,O=m+B|0,R^=O<<18|O>>>14,O=ie+F|0,J^=O<<7|O>>>25,O=J+ie|0,P^=O<<9|O>>>23,O=P+J|0,F^=O<<13|O>>>19,O=F+P|0,ie^=O<<18|O>>>14,O=I+J|0,z^=O<<7|O>>>25,O=z+I|0,B^=O<<9|O>>>23,O=B+z|0,J^=O<<13|O>>>19,O=J+B|0,I^=O<<18|O>>>14,O=N+U|0,m^=O<<7|O>>>25,O=m+N|0,P^=O<<9|O>>>23,O=P+m|0,U^=O<<13|O>>>19,O=U+P|0,N^=O<<18|O>>>14,O=R+T|0,F^=O<<7|O>>>25,O=F+R|0,L^=O<<9|O>>>23,O=L+F|0,T^=O<<13|O>>>19,O=T+L|0,R^=O<<18|O>>>14,O=ie+oe|0,Y^=O<<7|O>>>25,O=Y+ie|0,ne^=O<<9|O>>>23,O=ne+Y|0,oe^=O<<13|O>>>19,O=oe+ne|0,ie^=O<<18|O>>>14;h[0]=I>>>0&255,h[1]=I>>>8&255,h[2]=I>>>16&255,h[3]=I>>>24&255,h[4]=N>>>0&255,h[5]=N>>>8&255,h[6]=N>>>16&255,h[7]=N>>>24&255,h[8]=R>>>0&255,h[9]=R>>>8&255,h[10]=R>>>16&255,h[11]=R>>>24&255,h[12]=ie>>>0&255,h[13]=ie>>>8&255,h[14]=ie>>>16&255,h[15]=ie>>>24&255,h[16]=m>>>0&255,h[17]=m>>>8&255,h[18]=m>>>16&255,h[19]=m>>>24&255,h[20]=P>>>0&255,h[21]=P>>>8&255,h[22]=P>>>16&255,h[23]=P>>>24&255,h[24]=L>>>0&255,h[25]=L>>>8&255,h[26]=L>>>16&255,h[27]=L>>>24&255,h[28]=T>>>0&255,h[29]=T>>>8&255,h[30]=T>>>16&255,h[31]=T>>>24&255}function Me(h,y,b,a){Qe(h,y,b,a)}function Ke(h,y,b,a){ze(h,y,b,a)}var De=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function ve(h,y,b,a,_,k,v){var D=new Uint8Array(16),q=new Uint8Array(64),H,A;for(A=0;A<16;A++)D[A]=0;for(A=0;A<8;A++)D[A]=k[A];for(;_>=64;){for(Me(q,D,v,De),A=0;A<64;A++)h[y+A]=b[a+A]^q[A];for(H=1,A=8;A<16;A++)H=H+(D[A]&255)|0,D[A]=H&255,H>>>=8;_-=64,y+=64,a+=64}if(_>0)for(Me(q,D,v,De),A=0;A<_;A++)h[y+A]=b[a+A]^q[A];return 0}function Oe(h,y,b,a,_){var k=new Uint8Array(16),v=new Uint8Array(64),D,q;for(q=0;q<16;q++)k[q]=0;for(q=0;q<8;q++)k[q]=a[q];for(;b>=64;){for(Me(v,k,_,De),q=0;q<64;q++)h[y+q]=v[q];for(D=1,q=8;q<16;q++)D=D+(k[q]&255)|0,k[q]=D&255,D>>>=8;b-=64,y+=64}if(b>0)for(Me(v,k,_,De),q=0;q<b;q++)h[y+q]=v[q];return 0}function tt(h,y,b,a,_){var k=new Uint8Array(32);Ke(k,a,_,De);for(var v=new Uint8Array(8),D=0;D<8;D++)v[D]=a[D+16];return Oe(h,y,b,v,k)}function Ze(h,y,b,a,_,k,v){var D=new Uint8Array(32);Ke(D,k,v,De);for(var q=new Uint8Array(8),H=0;H<8;H++)q[H]=k[H+16];return ve(h,y,b,a,_,q,D)}var nt=function(h){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var y,b,a,_,k,v,D,q;y=h[0]&255|(h[1]&255)<<8,this.r[0]=y&8191,b=h[2]&255|(h[3]&255)<<8,this.r[1]=(y>>>13|b<<3)&8191,a=h[4]&255|(h[5]&255)<<8,this.r[2]=(b>>>10|a<<6)&7939,_=h[6]&255|(h[7]&255)<<8,this.r[3]=(a>>>7|_<<9)&8191,k=h[8]&255|(h[9]&255)<<8,this.r[4]=(_>>>4|k<<12)&255,this.r[5]=k>>>1&8190,v=h[10]&255|(h[11]&255)<<8,this.r[6]=(k>>>14|v<<2)&8191,D=h[12]&255|(h[13]&255)<<8,this.r[7]=(v>>>11|D<<5)&8065,q=h[14]&255|(h[15]&255)<<8,this.r[8]=(D>>>8|q<<8)&8191,this.r[9]=q>>>5&127,this.pad[0]=h[16]&255|(h[17]&255)<<8,this.pad[1]=h[18]&255|(h[19]&255)<<8,this.pad[2]=h[20]&255|(h[21]&255)<<8,this.pad[3]=h[22]&255|(h[23]&255)<<8,this.pad[4]=h[24]&255|(h[25]&255)<<8,this.pad[5]=h[26]&255|(h[27]&255)<<8,this.pad[6]=h[28]&255|(h[29]&255)<<8,this.pad[7]=h[30]&255|(h[31]&255)<<8};nt.prototype.blocks=function(h,y,b){for(var a=this.fin?0:2048,_,k,v,D,q,H,A,se,M,W,G,te,ee,X,Z,Q,I,z,B,J=this.h[0],U=this.h[1],N=this.h[2],m=this.h[3],P=this.h[4],L=this.h[5],T=this.h[6],R=this.h[7],F=this.h[8],Y=this.h[9],ne=this.r[0],oe=this.r[1],ie=this.r[2],O=this.r[3],le=this.r[4],pe=this.r[5],he=this.r[6],ue=this.r[7],de=this.r[8],ae=this.r[9];b>=16;)_=h[y+0]&255|(h[y+1]&255)<<8,J+=_&8191,k=h[y+2]&255|(h[y+3]&255)<<8,U+=(_>>>13|k<<3)&8191,v=h[y+4]&255|(h[y+5]&255)<<8,N+=(k>>>10|v<<6)&8191,D=h[y+6]&255|(h[y+7]&255)<<8,m+=(v>>>7|D<<9)&8191,q=h[y+8]&255|(h[y+9]&255)<<8,P+=(D>>>4|q<<12)&8191,L+=q>>>1&8191,H=h[y+10]&255|(h[y+11]&255)<<8,T+=(q>>>14|H<<2)&8191,A=h[y+12]&255|(h[y+13]&255)<<8,R+=(H>>>11|A<<5)&8191,se=h[y+14]&255|(h[y+15]&255)<<8,F+=(A>>>8|se<<8)&8191,Y+=se>>>5|a,M=0,W=M,W+=J*ne,W+=U*(5*ae),W+=N*(5*de),W+=m*(5*ue),W+=P*(5*he),M=W>>>13,W&=8191,W+=L*(5*pe),W+=T*(5*le),W+=R*(5*O),W+=F*(5*ie),W+=Y*(5*oe),M+=W>>>13,W&=8191,G=M,G+=J*oe,G+=U*ne,G+=N*(5*ae),G+=m*(5*de),G+=P*(5*ue),M=G>>>13,G&=8191,G+=L*(5*he),G+=T*(5*pe),G+=R*(5*le),G+=F*(5*O),G+=Y*(5*ie),M+=G>>>13,G&=8191,te=M,te+=J*ie,te+=U*oe,te+=N*ne,te+=m*(5*ae),te+=P*(5*de),M=te>>>13,te&=8191,te+=L*(5*ue),te+=T*(5*he),te+=R*(5*pe),te+=F*(5*le),te+=Y*(5*O),M+=te>>>13,te&=8191,ee=M,ee+=J*O,ee+=U*ie,ee+=N*oe,ee+=m*ne,ee+=P*(5*ae),M=ee>>>13,ee&=8191,ee+=L*(5*de),ee+=T*(5*ue),ee+=R*(5*he),ee+=F*(5*pe),ee+=Y*(5*le),M+=ee>>>13,ee&=8191,X=M,X+=J*le,X+=U*O,X+=N*ie,X+=m*oe,X+=P*ne,M=X>>>13,X&=8191,X+=L*(5*ae),X+=T*(5*de),X+=R*(5*ue),X+=F*(5*he),X+=Y*(5*pe),M+=X>>>13,X&=8191,Z=M,Z+=J*pe,Z+=U*le,Z+=N*O,Z+=m*ie,Z+=P*oe,M=Z>>>13,Z&=8191,Z+=L*ne,Z+=T*(5*ae),Z+=R*(5*de),Z+=F*(5*ue),Z+=Y*(5*he),M+=Z>>>13,Z&=8191,Q=M,Q+=J*he,Q+=U*pe,Q+=N*le,Q+=m*O,Q+=P*ie,M=Q>>>13,Q&=8191,Q+=L*oe,Q+=T*ne,Q+=R*(5*ae),Q+=F*(5*de),Q+=Y*(5*ue),M+=Q>>>13,Q&=8191,I=M,I+=J*ue,I+=U*he,I+=N*pe,I+=m*le,I+=P*O,M=I>>>13,I&=8191,I+=L*ie,I+=T*oe,I+=R*ne,I+=F*(5*ae),I+=Y*(5*de),M+=I>>>13,I&=8191,z=M,z+=J*de,z+=U*ue,z+=N*he,z+=m*pe,z+=P*le,M=z>>>13,z&=8191,z+=L*O,z+=T*ie,z+=R*oe,z+=F*ne,z+=Y*(5*ae),M+=z>>>13,z&=8191,B=M,B+=J*ae,B+=U*de,B+=N*ue,B+=m*he,B+=P*pe,M=B>>>13,B&=8191,B+=L*le,B+=T*O,B+=R*ie,B+=F*oe,B+=Y*ne,M+=B>>>13,B&=8191,M=(M<<2)+M|0,M=M+W|0,W=M&8191,M=M>>>13,G+=M,J=W,U=G,N=te,m=ee,P=X,L=Z,T=Q,R=I,F=z,Y=B,y+=16,b-=16;this.h[0]=J,this.h[1]=U,this.h[2]=N,this.h[3]=m,this.h[4]=P,this.h[5]=L,this.h[6]=T,this.h[7]=R,this.h[8]=F,this.h[9]=Y},nt.prototype.finish=function(h,y){var b=new Uint16Array(10),a,_,k,v;if(this.leftover){for(v=this.leftover,this.buffer[v++]=1;v<16;v++)this.buffer[v]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(a=this.h[1]>>>13,this.h[1]&=8191,v=2;v<10;v++)this.h[v]+=a,a=this.h[v]>>>13,this.h[v]&=8191;for(this.h[0]+=a*5,a=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=a,a=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=a,b[0]=this.h[0]+5,a=b[0]>>>13,b[0]&=8191,v=1;v<10;v++)b[v]=this.h[v]+a,a=b[v]>>>13,b[v]&=8191;for(b[9]-=8192,_=(a^1)-1,v=0;v<10;v++)b[v]&=_;for(_=~_,v=0;v<10;v++)this.h[v]=this.h[v]&_|b[v];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,k=this.h[0]+this.pad[0],this.h[0]=k&65535,v=1;v<8;v++)k=(this.h[v]+this.pad[v]|0)+(k>>>16)|0,this.h[v]=k&65535;h[y+0]=this.h[0]>>>0&255,h[y+1]=this.h[0]>>>8&255,h[y+2]=this.h[1]>>>0&255,h[y+3]=this.h[1]>>>8&255,h[y+4]=this.h[2]>>>0&255,h[y+5]=this.h[2]>>>8&255,h[y+6]=this.h[3]>>>0&255,h[y+7]=this.h[3]>>>8&255,h[y+8]=this.h[4]>>>0&255,h[y+9]=this.h[4]>>>8&255,h[y+10]=this.h[5]>>>0&255,h[y+11]=this.h[5]>>>8&255,h[y+12]=this.h[6]>>>0&255,h[y+13]=this.h[6]>>>8&255,h[y+14]=this.h[7]>>>0&255,h[y+15]=this.h[7]>>>8&255},nt.prototype.update=function(h,y,b){var a,_;if(this.leftover){for(_=16-this.leftover,_>b&&(_=b),a=0;a<_;a++)this.buffer[this.leftover+a]=h[y+a];if(b-=_,y+=_,this.leftover+=_,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(b>=16&&(_=b-b%16,this.blocks(h,y,_),y+=_,b-=_),b){for(a=0;a<b;a++)this.buffer[this.leftover+a]=h[y+a];this.leftover+=b}};function ge(h,y,b,a,_,k){var v=new nt(k);return v.update(b,a,_),v.finish(h,y),0}function it(h,y,b,a,_,k){var v=new Uint8Array(16);return ge(v,0,b,a,_,k),ce(h,y,v,0)}function Ot(h,y,b,a,_){var k;if(b<32)return-1;for(Ze(h,0,y,0,b,a,_),ge(h,16,h,32,b-32,h),k=0;k<16;k++)h[k]=0;return 0}function Ie(h,y,b,a,_){var k,v=new Uint8Array(32);if(b<32||(tt(v,0,32,a,_),it(y,16,y,32,b-32,v)!==0))return-1;for(Ze(h,0,y,0,b,a,_),k=0;k<32;k++)h[k]=0;return 0}function Ae(h,y){var b;for(b=0;b<16;b++)h[b]=y[b]|0}function re(h){var y,b,a=1;for(y=0;y<16;y++)b=h[y]+a+65535,a=Math.floor(b/65536),h[y]=b-a*65536;h[0]+=a-1+37*(a-1)}function ye(h,y,b){for(var a,_=~(b-1),k=0;k<16;k++)a=_&(h[k]^y[k]),h[k]^=a,y[k]^=a}function g(h,y){var b,a,_,k=i(),v=i();for(b=0;b<16;b++)v[b]=y[b];for(re(v),re(v),re(v),a=0;a<2;a++){for(k[0]=v[0]-65517,b=1;b<15;b++)k[b]=v[b]-65535-(k[b-1]>>16&1),k[b-1]&=65535;k[15]=v[15]-32767-(k[14]>>16&1),_=k[15]>>16&1,k[14]&=65535,ye(v,k,1-_)}for(b=0;b<16;b++)h[2*b]=v[b]&255,h[2*b+1]=v[b]>>8}function we(h,y){var b=new Uint8Array(32),a=new Uint8Array(32);return g(b,h),g(a,y),ke(b,0,a,0)}function wt(h){var y=new Uint8Array(32);return g(y,h),y[0]&1}function Qt(h,y){var b;for(b=0;b<16;b++)h[b]=y[2*b]+(y[2*b+1]<<8);h[15]&=32767}function Ve(h,y,b){for(var a=0;a<16;a++)h[a]=y[a]+b[a]}function Ye(h,y,b){for(var a=0;a<16;a++)h[a]=y[a]-b[a]}function fe(h,y,b){var a,_,k=0,v=0,D=0,q=0,H=0,A=0,se=0,M=0,W=0,G=0,te=0,ee=0,X=0,Z=0,Q=0,I=0,z=0,B=0,J=0,U=0,N=0,m=0,P=0,L=0,T=0,R=0,F=0,Y=0,ne=0,oe=0,ie=0,O=b[0],le=b[1],pe=b[2],he=b[3],ue=b[4],de=b[5],ae=b[6],Ee=b[7],_e=b[8],me=b[9],Pe=b[10],Se=b[11],Re=b[12],Fe=b[13],qe=b[14],Ne=b[15];a=y[0],k+=a*O,v+=a*le,D+=a*pe,q+=a*he,H+=a*ue,A+=a*de,se+=a*ae,M+=a*Ee,W+=a*_e,G+=a*me,te+=a*Pe,ee+=a*Se,X+=a*Re,Z+=a*Fe,Q+=a*qe,I+=a*Ne,a=y[1],v+=a*O,D+=a*le,q+=a*pe,H+=a*he,A+=a*ue,se+=a*de,M+=a*ae,W+=a*Ee,G+=a*_e,te+=a*me,ee+=a*Pe,X+=a*Se,Z+=a*Re,Q+=a*Fe,I+=a*qe,z+=a*Ne,a=y[2],D+=a*O,q+=a*le,H+=a*pe,A+=a*he,se+=a*ue,M+=a*de,W+=a*ae,G+=a*Ee,te+=a*_e,ee+=a*me,X+=a*Pe,Z+=a*Se,Q+=a*Re,I+=a*Fe,z+=a*qe,B+=a*Ne,a=y[3],q+=a*O,H+=a*le,A+=a*pe,se+=a*he,M+=a*ue,W+=a*de,G+=a*ae,te+=a*Ee,ee+=a*_e,X+=a*me,Z+=a*Pe,Q+=a*Se,I+=a*Re,z+=a*Fe,B+=a*qe,J+=a*Ne,a=y[4],H+=a*O,A+=a*le,se+=a*pe,M+=a*he,W+=a*ue,G+=a*de,te+=a*ae,ee+=a*Ee,X+=a*_e,Z+=a*me,Q+=a*Pe,I+=a*Se,z+=a*Re,B+=a*Fe,J+=a*qe,U+=a*Ne,a=y[5],A+=a*O,se+=a*le,M+=a*pe,W+=a*he,G+=a*ue,te+=a*de,ee+=a*ae,X+=a*Ee,Z+=a*_e,Q+=a*me,I+=a*Pe,z+=a*Se,B+=a*Re,J+=a*Fe,U+=a*qe,N+=a*Ne,a=y[6],se+=a*O,M+=a*le,W+=a*pe,G+=a*he,te+=a*ue,ee+=a*de,X+=a*ae,Z+=a*Ee,Q+=a*_e,I+=a*me,z+=a*Pe,B+=a*Se,J+=a*Re,U+=a*Fe,N+=a*qe,m+=a*Ne,a=y[7],M+=a*O,W+=a*le,G+=a*pe,te+=a*he,ee+=a*ue,X+=a*de,Z+=a*ae,Q+=a*Ee,I+=a*_e,z+=a*me,B+=a*Pe,J+=a*Se,U+=a*Re,N+=a*Fe,m+=a*qe,P+=a*Ne,a=y[8],W+=a*O,G+=a*le,te+=a*pe,ee+=a*he,X+=a*ue,Z+=a*de,Q+=a*ae,I+=a*Ee,z+=a*_e,B+=a*me,J+=a*Pe,U+=a*Se,N+=a*Re,m+=a*Fe,P+=a*qe,L+=a*Ne,a=y[9],G+=a*O,te+=a*le,ee+=a*pe,X+=a*he,Z+=a*ue,Q+=a*de,I+=a*ae,z+=a*Ee,B+=a*_e,J+=a*me,U+=a*Pe,N+=a*Se,m+=a*Re,P+=a*Fe,L+=a*qe,T+=a*Ne,a=y[10],te+=a*O,ee+=a*le,X+=a*pe,Z+=a*he,Q+=a*ue,I+=a*de,z+=a*ae,B+=a*Ee,J+=a*_e,U+=a*me,N+=a*Pe,m+=a*Se,P+=a*Re,L+=a*Fe,T+=a*qe,R+=a*Ne,a=y[11],ee+=a*O,X+=a*le,Z+=a*pe,Q+=a*he,I+=a*ue,z+=a*de,B+=a*ae,J+=a*Ee,U+=a*_e,N+=a*me,m+=a*Pe,P+=a*Se,L+=a*Re,T+=a*Fe,R+=a*qe,F+=a*Ne,a=y[12],X+=a*O,Z+=a*le,Q+=a*pe,I+=a*he,z+=a*ue,B+=a*de,J+=a*ae,U+=a*Ee,N+=a*_e,m+=a*me,P+=a*Pe,L+=a*Se,T+=a*Re,R+=a*Fe,F+=a*qe,Y+=a*Ne,a=y[13],Z+=a*O,Q+=a*le,I+=a*pe,z+=a*he,B+=a*ue,J+=a*de,U+=a*ae,N+=a*Ee,m+=a*_e,P+=a*me,L+=a*Pe,T+=a*Se,R+=a*Re,F+=a*Fe,Y+=a*qe,ne+=a*Ne,a=y[14],Q+=a*O,I+=a*le,z+=a*pe,B+=a*he,J+=a*ue,U+=a*de,N+=a*ae,m+=a*Ee,P+=a*_e,L+=a*me,T+=a*Pe,R+=a*Se,F+=a*Re,Y+=a*Fe,ne+=a*qe,oe+=a*Ne,a=y[15],I+=a*O,z+=a*le,B+=a*pe,J+=a*he,U+=a*ue,N+=a*de,m+=a*ae,P+=a*Ee,L+=a*_e,T+=a*me,R+=a*Pe,F+=a*Se,Y+=a*Re,ne+=a*Fe,oe+=a*qe,ie+=a*Ne,k+=38*z,v+=38*B,D+=38*J,q+=38*U,H+=38*N,A+=38*m,se+=38*P,M+=38*L,W+=38*T,G+=38*R,te+=38*F,ee+=38*Y,X+=38*ne,Z+=38*oe,Q+=38*ie,_=1,a=k+_+65535,_=Math.floor(a/65536),k=a-_*65536,a=v+_+65535,_=Math.floor(a/65536),v=a-_*65536,a=D+_+65535,_=Math.floor(a/65536),D=a-_*65536,a=q+_+65535,_=Math.floor(a/65536),q=a-_*65536,a=H+_+65535,_=Math.floor(a/65536),H=a-_*65536,a=A+_+65535,_=Math.floor(a/65536),A=a-_*65536,a=se+_+65535,_=Math.floor(a/65536),se=a-_*65536,a=M+_+65535,_=Math.floor(a/65536),M=a-_*65536,a=W+_+65535,_=Math.floor(a/65536),W=a-_*65536,a=G+_+65535,_=Math.floor(a/65536),G=a-_*65536,a=te+_+65535,_=Math.floor(a/65536),te=a-_*65536,a=ee+_+65535,_=Math.floor(a/65536),ee=a-_*65536,a=X+_+65535,_=Math.floor(a/65536),X=a-_*65536,a=Z+_+65535,_=Math.floor(a/65536),Z=a-_*65536,a=Q+_+65535,_=Math.floor(a/65536),Q=a-_*65536,a=I+_+65535,_=Math.floor(a/65536),I=a-_*65536,k+=_-1+37*(_-1),_=1,a=k+_+65535,_=Math.floor(a/65536),k=a-_*65536,a=v+_+65535,_=Math.floor(a/65536),v=a-_*65536,a=D+_+65535,_=Math.floor(a/65536),D=a-_*65536,a=q+_+65535,_=Math.floor(a/65536),q=a-_*65536,a=H+_+65535,_=Math.floor(a/65536),H=a-_*65536,a=A+_+65535,_=Math.floor(a/65536),A=a-_*65536,a=se+_+65535,_=Math.floor(a/65536),se=a-_*65536,a=M+_+65535,_=Math.floor(a/65536),M=a-_*65536,a=W+_+65535,_=Math.floor(a/65536),W=a-_*65536,a=G+_+65535,_=Math.floor(a/65536),G=a-_*65536,a=te+_+65535,_=Math.floor(a/65536),te=a-_*65536,a=ee+_+65535,_=Math.floor(a/65536),ee=a-_*65536,a=X+_+65535,_=Math.floor(a/65536),X=a-_*65536,a=Z+_+65535,_=Math.floor(a/65536),Z=a-_*65536,a=Q+_+65535,_=Math.floor(a/65536),Q=a-_*65536,a=I+_+65535,_=Math.floor(a/65536),I=a-_*65536,k+=_-1+37*(_-1),h[0]=k,h[1]=v,h[2]=D,h[3]=q,h[4]=H,h[5]=A,h[6]=se,h[7]=M,h[8]=W,h[9]=G,h[10]=te,h[11]=ee,h[12]=X,h[13]=Z,h[14]=Q,h[15]=I}function Je(h,y){fe(h,y,y)}function Fn(h,y){var b=i(),a;for(a=0;a<16;a++)b[a]=y[a];for(a=253;a>=0;a--)Je(b,b),a!==2&&a!==4&&fe(b,b,y);for(a=0;a<16;a++)h[a]=b[a]}function qn(h,y){var b=i(),a;for(a=0;a<16;a++)b[a]=y[a];for(a=250;a>=0;a--)Je(b,b),a!==1&&fe(b,b,y);for(a=0;a<16;a++)h[a]=b[a]}function Lt(h,y,b){var a=new Uint8Array(32),_=new Float64Array(80),k,v,D=i(),q=i(),H=i(),A=i(),se=i(),M=i();for(v=0;v<31;v++)a[v]=y[v];for(a[31]=y[31]&127|64,a[0]&=248,Qt(_,b),v=0;v<16;v++)q[v]=_[v],A[v]=D[v]=H[v]=0;for(D[0]=A[0]=1,v=254;v>=0;--v)k=a[v>>>3]>>>(v&7)&1,ye(D,q,k),ye(H,A,k),Ve(se,D,H),Ye(D,D,H),Ve(H,q,A),Ye(q,q,A),Je(A,se),Je(M,D),fe(D,H,D),fe(H,q,se),Ve(se,D,H),Ye(D,D,H),Je(q,D),Ye(H,A,M),fe(D,H,l),Ve(D,D,A),fe(H,H,D),fe(D,A,M),fe(A,q,_),Je(q,se),ye(D,q,k),ye(H,A,k);for(v=0;v<16;v++)_[v+16]=D[v],_[v+32]=H[v],_[v+48]=q[v],_[v+64]=A[v];var W=_.subarray(32),G=_.subarray(16);return Fn(W,W),fe(G,G,W),g(h,G),0}function Ft(h,y){return Lt(h,y,t)}function Nn(h,y){return o(y,32),Ft(h,y)}function qt(h,y,b){var a=new Uint8Array(32);return Lt(a,b,y),Ke(h,e,a,De)}var An=Ot,wr=Ie;function kr(h,y,b,a,_,k){var v=new Uint8Array(32);return qt(v,_,k),An(h,y,b,a,v)}function xr(h,y,b,a,_,k){var v=new Uint8Array(32);return qt(v,_,k),wr(h,y,b,a,v)}var jn=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Cn(h,y,b,a){for(var _=new Int32Array(16),k=new Int32Array(16),v,D,q,H,A,se,M,W,G,te,ee,X,Z,Q,I,z,B,J,U,N,m,P,L,T,R,F,Y=h[0],ne=h[1],oe=h[2],ie=h[3],O=h[4],le=h[5],pe=h[6],he=h[7],ue=y[0],de=y[1],ae=y[2],Ee=y[3],_e=y[4],me=y[5],Pe=y[6],Se=y[7],Re=0;a>=128;){for(U=0;U<16;U++)N=8*U+Re,_[U]=b[N+0]<<24|b[N+1]<<16|b[N+2]<<8|b[N+3],k[U]=b[N+4]<<24|b[N+5]<<16|b[N+6]<<8|b[N+7];for(U=0;U<80;U++)if(v=Y,D=ne,q=oe,H=ie,A=O,se=le,M=pe,W=he,G=ue,te=de,ee=ae,X=Ee,Z=_e,Q=me,I=Pe,z=Se,m=he,P=Se,L=P&65535,T=P>>>16,R=m&65535,F=m>>>16,m=(O>>>14|_e<<18)^(O>>>18|_e<<14)^(_e>>>9|O<<23),P=(_e>>>14|O<<18)^(_e>>>18|O<<14)^(O>>>9|_e<<23),L+=P&65535,T+=P>>>16,R+=m&65535,F+=m>>>16,m=O&le^~O&pe,P=_e&me^~_e&Pe,L+=P&65535,T+=P>>>16,R+=m&65535,F+=m>>>16,m=jn[U*2],P=jn[U*2+1],L+=P&65535,T+=P>>>16,R+=m&65535,F+=m>>>16,m=_[U%16],P=k[U%16],L+=P&65535,T+=P>>>16,R+=m&65535,F+=m>>>16,T+=L>>>16,R+=T>>>16,F+=R>>>16,B=R&65535|F<<16,J=L&65535|T<<16,m=B,P=J,L=P&65535,T=P>>>16,R=m&65535,F=m>>>16,m=(Y>>>28|ue<<4)^(ue>>>2|Y<<30)^(ue>>>7|Y<<25),P=(ue>>>28|Y<<4)^(Y>>>2|ue<<30)^(Y>>>7|ue<<25),L+=P&65535,T+=P>>>16,R+=m&65535,F+=m>>>16,m=Y&ne^Y&oe^ne&oe,P=ue&de^ue&ae^de&ae,L+=P&65535,T+=P>>>16,R+=m&65535,F+=m>>>16,T+=L>>>16,R+=T>>>16,F+=R>>>16,W=R&65535|F<<16,z=L&65535|T<<16,m=H,P=X,L=P&65535,T=P>>>16,R=m&65535,F=m>>>16,m=B,P=J,L+=P&65535,T+=P>>>16,R+=m&65535,F+=m>>>16,T+=L>>>16,R+=T>>>16,F+=R>>>16,H=R&65535|F<<16,X=L&65535|T<<16,ne=v,oe=D,ie=q,O=H,le=A,pe=se,he=M,Y=W,de=G,ae=te,Ee=ee,_e=X,me=Z,Pe=Q,Se=I,ue=z,U%16===15)for(N=0;N<16;N++)m=_[N],P=k[N],L=P&65535,T=P>>>16,R=m&65535,F=m>>>16,m=_[(N+9)%16],P=k[(N+9)%16],L+=P&65535,T+=P>>>16,R+=m&65535,F+=m>>>16,B=_[(N+1)%16],J=k[(N+1)%16],m=(B>>>1|J<<31)^(B>>>8|J<<24)^B>>>7,P=(J>>>1|B<<31)^(J>>>8|B<<24)^(J>>>7|B<<25),L+=P&65535,T+=P>>>16,R+=m&65535,F+=m>>>16,B=_[(N+14)%16],J=k[(N+14)%16],m=(B>>>19|J<<13)^(J>>>29|B<<3)^B>>>6,P=(J>>>19|B<<13)^(B>>>29|J<<3)^(J>>>6|B<<26),L+=P&65535,T+=P>>>16,R+=m&65535,F+=m>>>16,T+=L>>>16,R+=T>>>16,F+=R>>>16,_[N]=R&65535|F<<16,k[N]=L&65535|T<<16;m=Y,P=ue,L=P&65535,T=P>>>16,R=m&65535,F=m>>>16,m=h[0],P=y[0],L+=P&65535,T+=P>>>16,R+=m&65535,F+=m>>>16,T+=L>>>16,R+=T>>>16,F+=R>>>16,h[0]=Y=R&65535|F<<16,y[0]=ue=L&65535|T<<16,m=ne,P=de,L=P&65535,T=P>>>16,R=m&65535,F=m>>>16,m=h[1],P=y[1],L+=P&65535,T+=P>>>16,R+=m&65535,F+=m>>>16,T+=L>>>16,R+=T>>>16,F+=R>>>16,h[1]=ne=R&65535|F<<16,y[1]=de=L&65535|T<<16,m=oe,P=ae,L=P&65535,T=P>>>16,R=m&65535,F=m>>>16,m=h[2],P=y[2],L+=P&65535,T+=P>>>16,R+=m&65535,F+=m>>>16,T+=L>>>16,R+=T>>>16,F+=R>>>16,h[2]=oe=R&65535|F<<16,y[2]=ae=L&65535|T<<16,m=ie,P=Ee,L=P&65535,T=P>>>16,R=m&65535,F=m>>>16,m=h[3],P=y[3],L+=P&65535,T+=P>>>16,R+=m&65535,F+=m>>>16,T+=L>>>16,R+=T>>>16,F+=R>>>16,h[3]=ie=R&65535|F<<16,y[3]=Ee=L&65535|T<<16,m=O,P=_e,L=P&65535,T=P>>>16,R=m&65535,F=m>>>16,m=h[4],P=y[4],L+=P&65535,T+=P>>>16,R+=m&65535,F+=m>>>16,T+=L>>>16,R+=T>>>16,F+=R>>>16,h[4]=O=R&65535|F<<16,y[4]=_e=L&65535|T<<16,m=le,P=me,L=P&65535,T=P>>>16,R=m&65535,F=m>>>16,m=h[5],P=y[5],L+=P&65535,T+=P>>>16,R+=m&65535,F+=m>>>16,T+=L>>>16,R+=T>>>16,F+=R>>>16,h[5]=le=R&65535|F<<16,y[5]=me=L&65535|T<<16,m=pe,P=Pe,L=P&65535,T=P>>>16,R=m&65535,F=m>>>16,m=h[6],P=y[6],L+=P&65535,T+=P>>>16,R+=m&65535,F+=m>>>16,T+=L>>>16,R+=T>>>16,F+=R>>>16,h[6]=pe=R&65535|F<<16,y[6]=Pe=L&65535|T<<16,m=he,P=Se,L=P&65535,T=P>>>16,R=m&65535,F=m>>>16,m=h[7],P=y[7],L+=P&65535,T+=P>>>16,R+=m&65535,F+=m>>>16,T+=L>>>16,R+=T>>>16,F+=R>>>16,h[7]=he=R&65535|F<<16,y[7]=Se=L&65535|T<<16,Re+=128,a-=128}return a}function dt(h,y,b){var a=new Int32Array(8),_=new Int32Array(8),k=new Uint8Array(256),v,D=b;for(a[0]=1779033703,a[1]=3144134277,a[2]=1013904242,a[3]=2773480762,a[4]=1359893119,a[5]=2600822924,a[6]=528734635,a[7]=1541459225,_[0]=4089235720,_[1]=2227873595,_[2]=4271175723,_[3]=1595750129,_[4]=2917565137,_[5]=725511199,_[6]=4215389547,_[7]=327033209,Cn(a,_,y,b),b%=128,v=0;v<b;v++)k[v]=y[D-b+v];for(k[b]=128,b=256-128*(b<112?1:0),k[b-9]=0,K(k,b-8,D/536870912|0,D<<3),Cn(a,_,k,b),v=0;v<8;v++)K(h,8*v,a[v],_[v]);return 0}function Nt(h,y){var b=i(),a=i(),_=i(),k=i(),v=i(),D=i(),q=i(),H=i(),A=i();Ye(b,h[1],h[0]),Ye(A,y[1],y[0]),fe(b,b,A),Ve(a,h[0],h[1]),Ve(A,y[0],y[1]),fe(a,a,A),fe(_,h[3],y[3]),fe(_,_,c),fe(k,h[2],y[2]),Ve(k,k,k),Ye(v,a,b),Ye(D,k,_),Ve(q,k,_),Ve(H,a,b),fe(h[0],v,D),fe(h[1],H,q),fe(h[2],q,D),fe(h[3],v,H)}function Bn(h,y,b){var a;for(a=0;a<4;a++)ye(h[a],y[a],b)}function Zt(h,y){var b=i(),a=i(),_=i();Fn(_,y[2]),fe(b,y[0],_),fe(a,y[1],_),g(h,a),h[31]^=wt(b)<<7}function gt(h,y,b){var a,_;for(Ae(h[0],n),Ae(h[1],r),Ae(h[2],r),Ae(h[3],n),_=255;_>=0;--_)a=b[_/8|0]>>(_&7)&1,Bn(h,y,a),Nt(y,h),Nt(h,h),Bn(h,y,a)}function At(h,y){var b=[i(),i(),i(),i()];Ae(b[0],w),Ae(b[1],j),Ae(b[2],r),fe(b[3],w,j),gt(h,b,y)}function en(h,y,b){var a=new Uint8Array(64),_=[i(),i(),i(),i()],k;for(b||o(y,32),dt(a,y,32),a[0]&=248,a[31]&=127,a[31]|=64,At(_,a),Zt(h,_),k=0;k<32;k++)y[k+32]=h[k];return 0}var jt=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function tn(h,y){var b,a,_,k;for(a=63;a>=32;--a){for(b=0,_=a-32,k=a-12;_<k;++_)y[_]+=b-16*y[a]*jt[_-(a-32)],b=Math.floor((y[_]+128)/256),y[_]-=b*256;y[_]+=b,y[a]=0}for(b=0,_=0;_<32;_++)y[_]+=b-(y[31]>>4)*jt[_],b=y[_]>>8,y[_]&=255;for(_=0;_<32;_++)y[_]-=b*jt[_];for(a=0;a<32;a++)y[a+1]+=y[a]>>8,h[a]=y[a]&255}function nn(h){var y=new Float64Array(64),b;for(b=0;b<64;b++)y[b]=h[b];for(b=0;b<64;b++)h[b]=0;tn(h,y)}function Mn(h,y,b,a){var _=new Uint8Array(64),k=new Uint8Array(64),v=new Uint8Array(64),D,q,H=new Float64Array(64),A=[i(),i(),i(),i()];dt(_,a,32),_[0]&=248,_[31]&=127,_[31]|=64;var se=b+64;for(D=0;D<b;D++)h[64+D]=y[D];for(D=0;D<32;D++)h[32+D]=_[32+D];for(dt(v,h.subarray(32),b+32),nn(v),At(A,v),Zt(h,A),D=32;D<64;D++)h[D]=a[D];for(dt(k,h,b+64),nn(k),D=0;D<64;D++)H[D]=0;for(D=0;D<32;D++)H[D]=v[D];for(D=0;D<32;D++)for(q=0;q<32;q++)H[D+q]+=k[D]*_[q];return tn(h.subarray(32),H),se}function vr(h,y){var b=i(),a=i(),_=i(),k=i(),v=i(),D=i(),q=i();return Ae(h[2],r),Qt(h[1],y),Je(_,h[1]),fe(k,_,d),Ye(_,_,h[2]),Ve(k,h[2],k),Je(v,k),Je(D,v),fe(q,D,v),fe(b,q,_),fe(b,b,k),qn(b,b),fe(b,b,_),fe(b,b,k),fe(b,b,k),fe(h[0],b,k),Je(a,h[0]),fe(a,a,k),we(a,_)&&fe(h[0],h[0],C),Je(a,h[0]),fe(a,a,k),we(a,_)?-1:(wt(h[0])===y[31]>>7&&Ye(h[0],n,h[0]),fe(h[3],h[0],h[1]),0)}function rn(h,y,b,a){var _,k=new Uint8Array(32),v=new Uint8Array(64),D=[i(),i(),i(),i()],q=[i(),i(),i(),i()];if(b<64||vr(q,a))return-1;for(_=0;_<b;_++)h[_]=y[_];for(_=0;_<32;_++)h[_+32]=a[_];if(dt(v,h,b),nn(v),gt(D,q,v),At(q,y.subarray(32)),Nt(D,q),Zt(k,D),b-=64,ke(y,0,k,0)){for(_=0;_<b;_++)h[_]=0;return-1}for(_=0;_<b;_++)h[_]=y[_+64];return b}var on=32,Ct=24,kt=32,ht=16,xt=32,Bt=32,vt=32,mt=32,un=32,In=Ct,mr=kt,Pr=ht,rt=64,at=32,bt=64,ln=32,fn=64;p.lowlevel={crypto_core_hsalsa20:Ke,crypto_stream_xor:Ze,crypto_stream:tt,crypto_stream_salsa20_xor:ve,crypto_stream_salsa20:Oe,crypto_onetimeauth:ge,crypto_onetimeauth_verify:it,crypto_verify_16:ce,crypto_verify_32:ke,crypto_secretbox:Ot,crypto_secretbox_open:Ie,crypto_scalarmult:Lt,crypto_scalarmult_base:Ft,crypto_box_beforenm:qt,crypto_box_afternm:An,crypto_box:kr,crypto_box_open:xr,crypto_box_keypair:Nn,crypto_hash:dt,crypto_sign:Mn,crypto_sign_keypair:en,crypto_sign_open:rn,crypto_secretbox_KEYBYTES:on,crypto_secretbox_NONCEBYTES:Ct,crypto_secretbox_ZEROBYTES:kt,crypto_secretbox_BOXZEROBYTES:ht,crypto_scalarmult_BYTES:xt,crypto_scalarmult_SCALARBYTES:Bt,crypto_box_PUBLICKEYBYTES:vt,crypto_box_SECRETKEYBYTES:mt,crypto_box_BEFORENMBYTES:un,crypto_box_NONCEBYTES:In,crypto_box_ZEROBYTES:mr,crypto_box_BOXZEROBYTES:Pr,crypto_sign_BYTES:rt,crypto_sign_PUBLICKEYBYTES:at,crypto_sign_SECRETKEYBYTES:bt,crypto_sign_SEEDBYTES:ln,crypto_hash_BYTES:fn,gf:i,D:d,L:jt,pack25519:g,unpack25519:Qt,M:fe,A:Ve,S:Je,Z:Ye,pow2523:qn,add:Nt,set25519:Ae,modL:tn,scalarmult:gt,scalarbase:At};function Jn(h,y){if(h.length!==on)throw new Error("bad key size");if(y.length!==Ct)throw new Error("bad nonce size")}function Sr(h,y){if(h.length!==vt)throw new Error("bad public key size");if(y.length!==mt)throw new Error("bad secret key size")}function Ce(){for(var h=0;h<arguments.length;h++)if(!(arguments[h]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function Un(h){for(var y=0;y<h.length;y++)h[y]=0}p.randomBytes=function(h){var y=new Uint8Array(h);return o(y,h),y},p.secretbox=function(h,y,b){Ce(h,y,b),Jn(b,y);for(var a=new Uint8Array(kt+h.length),_=new Uint8Array(a.length),k=0;k<h.length;k++)a[k+kt]=h[k];return Ot(_,a,a.length,y,b),_.subarray(ht)},p.secretbox.open=function(h,y,b){Ce(h,y,b),Jn(b,y);for(var a=new Uint8Array(ht+h.length),_=new Uint8Array(a.length),k=0;k<h.length;k++)a[k+ht]=h[k];return a.length<32||Ie(_,a,a.length,y,b)!==0?null:_.subarray(kt)},p.secretbox.keyLength=on,p.secretbox.nonceLength=Ct,p.secretbox.overheadLength=ht,p.scalarMult=function(h,y){if(Ce(h,y),h.length!==Bt)throw new Error("bad n size");if(y.length!==xt)throw new Error("bad p size");var b=new Uint8Array(xt);return Lt(b,h,y),b},p.scalarMult.base=function(h){if(Ce(h),h.length!==Bt)throw new Error("bad n size");var y=new Uint8Array(xt);return Ft(y,h),y},p.scalarMult.scalarLength=Bt,p.scalarMult.groupElementLength=xt,p.box=function(h,y,b,a){var _=p.box.before(b,a);return p.secretbox(h,y,_)},p.box.before=function(h,y){Ce(h,y),Sr(h,y);var b=new Uint8Array(un);return qt(b,h,y),b},p.box.after=p.secretbox,p.box.open=function(h,y,b,a){var _=p.box.before(b,a);return p.secretbox.open(h,y,_)},p.box.open.after=p.secretbox.open,p.box.keyPair=function(){var h=new Uint8Array(vt),y=new Uint8Array(mt);return Nn(h,y),{publicKey:h,secretKey:y}},p.box.keyPair.fromSecretKey=function(h){if(Ce(h),h.length!==mt)throw new Error("bad secret key size");var y=new Uint8Array(vt);return Ft(y,h),{publicKey:y,secretKey:new Uint8Array(h)}},p.box.publicKeyLength=vt,p.box.secretKeyLength=mt,p.box.sharedKeyLength=un,p.box.nonceLength=In,p.box.overheadLength=p.secretbox.overheadLength,p.sign=function(h,y){if(Ce(h,y),y.length!==bt)throw new Error("bad secret key size");var b=new Uint8Array(rt+h.length);return Mn(b,h,h.length,y),b},p.sign.open=function(h,y){if(Ce(h,y),y.length!==at)throw new Error("bad public key size");var b=new Uint8Array(h.length),a=rn(b,h,h.length,y);if(a<0)return null;for(var _=new Uint8Array(a),k=0;k<_.length;k++)_[k]=b[k];return _},p.sign.detached=function(h,y){for(var b=p.sign(h,y),a=new Uint8Array(rt),_=0;_<a.length;_++)a[_]=b[_];return a},p.sign.detached.verify=function(h,y,b){if(Ce(h,y,b),y.length!==rt)throw new Error("bad signature size");if(b.length!==at)throw new Error("bad public key size");var a=new Uint8Array(rt+h.length),_=new Uint8Array(rt+h.length),k;for(k=0;k<rt;k++)a[k]=y[k];for(k=0;k<h.length;k++)a[k+rt]=h[k];return rn(_,a,a.length,b)>=0},p.sign.keyPair=function(){var h=new Uint8Array(at),y=new Uint8Array(bt);return en(h,y),{publicKey:h,secretKey:y}},p.sign.keyPair.fromSecretKey=function(h){if(Ce(h),h.length!==bt)throw new Error("bad secret key size");for(var y=new Uint8Array(at),b=0;b<y.length;b++)y[b]=h[32+b];return{publicKey:y,secretKey:new Uint8Array(h)}},p.sign.keyPair.fromSeed=function(h){if(Ce(h),h.length!==ln)throw new Error("bad seed size");for(var y=new Uint8Array(at),b=new Uint8Array(bt),a=0;a<32;a++)b[a]=h[a];return en(y,b,!0),{publicKey:y,secretKey:b}},p.sign.publicKeyLength=at,p.sign.secretKeyLength=bt,p.sign.seedLength=ln,p.sign.signatureLength=rt,p.hash=function(h){Ce(h);var y=new Uint8Array(fn);return dt(y,h,h.length),y},p.hash.hashLength=fn,p.verify=function(h,y){return Ce(h,y),h.length===0||y.length===0||h.length!==y.length?!1:V(h,0,y,0,h.length)===0},p.setPRNG=function(h){o=h},function(){var h=typeof self<"u"?self.crypto||self.msCrypto:null;if(h&&h.getRandomValues){var y=65536;p.setPRNG(function(b,a){var _,k=new Uint8Array(a);for(_=0;_<a;_+=y)h.getRandomValues(k.subarray(_,_+Math.min(a-_,y)));for(_=0;_<a;_++)b[_]=k[_];Un(k)})}else typeof Pt<"u"&&(h=zn(),h&&h.randomBytes&&p.setPRNG(function(b,a){var _,k=h.randomBytes(a);for(_=0;_<a;_++)b[_]=k[_];Un(k)}))}()})(typeof Mt<"u"&&Mt.exports?Mt.exports:self.nacl=self.nacl||{})});var li=Te((Ao,ui)=>{"use strict";ui.exports=Mr;function Mr(p,i){for(var o=new Array(arguments.length-1),e=0,t=2,n=!0;t<arguments.length;)o[e++]=arguments[t++];return new Promise(function(l,d){o[e]=function(w){if(n)if(n=!1,w)d(w);else{for(var j=new Array(arguments.length-1),C=0;C<j.length;)j[C++]=arguments[C];l.apply(null,j)}};try{p.apply(i||null,o)}catch(c){n&&(n=!1,d(c))}})}});var ai=Te(di=>{"use strict";var Ht=di;Ht.length=function(i){var o=i.length;if(!o)return 0;for(var e=0;--o%4>1&&i.charAt(o)==="=";)++e;return Math.ceil(i.length*3)/4-e};var yt=new Array(64),ci=new Array(123);for(Ge=0;Ge<64;)ci[yt[Ge]=Ge<26?Ge+65:Ge<52?Ge+71:Ge<62?Ge-4:Ge-59|43]=Ge++;var Ge;Ht.encode=function(i,o,e){for(var t=null,n=[],r=0,l=0,d;o<e;){var c=i[o++];switch(l){case 0:n[r++]=yt[c>>2],d=(c&3)<<4,l=1;break;case 1:n[r++]=yt[d|c>>4],d=(c&15)<<2,l=2;break;case 2:n[r++]=yt[d|c>>6],n[r++]=yt[c&63],l=0;break}r>8191&&((t||(t=[])).push(String.fromCharCode.apply(String,n)),r=0)}return l&&(n[r++]=yt[d],n[r++]=61,l===1&&(n[r++]=61)),t?(r&&t.push(String.fromCharCode.apply(String,n.slice(0,r))),t.join("")):String.fromCharCode.apply(String,n.slice(0,r))};var fi="invalid encoding";Ht.decode=function(i,o,e){for(var t=e,n=0,r,l=0;l<i.length;){var d=i.charCodeAt(l++);if(d===61&&n>1)break;if((d=ci[d])===void 0)throw Error(fi);switch(n){case 0:r=d,n=1;break;case 1:o[e++]=r<<2|(d&48)>>4,r=d,n=2;break;case 2:o[e++]=(r&15)<<4|(d&60)>>2,r=d,n=3;break;case 3:o[e++]=(r&3)<<6|d,n=0;break}}if(n===1)throw Error(fi);return e-t};Ht.test=function(i){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(i)}});var pi=Te((Co,si)=>{"use strict";si.exports=$t;function $t(){this._listeners={}}$t.prototype.on=function(i,o,e){return(this._listeners[i]||(this._listeners[i]=[])).push({fn:o,ctx:e||this}),this};$t.prototype.off=function(i,o){if(i===void 0)this._listeners={};else if(o===void 0)this._listeners[i]=[];else for(var e=this._listeners[i],t=0;t<e.length;)e[t].fn===o?e.splice(t,1):++t;return this};$t.prototype.emit=function(i){var o=this._listeners[i];if(o){for(var e=[],t=1;t<arguments.length;)e.push(arguments[t++]);for(t=0;t<o.length;)o[t].fn.apply(o[t++].ctx,e)}return this}});var ki=Te((Bo,wi)=>{"use strict";wi.exports=hi(hi);function hi(p){return typeof Float32Array<"u"?function(){var i=new Float32Array([-0]),o=new Uint8Array(i.buffer),e=o[3]===128;function t(d,c,w){i[0]=d,c[w]=o[0],c[w+1]=o[1],c[w+2]=o[2],c[w+3]=o[3]}function n(d,c,w){i[0]=d,c[w]=o[3],c[w+1]=o[2],c[w+2]=o[1],c[w+3]=o[0]}p.writeFloatLE=e?t:n,p.writeFloatBE=e?n:t;function r(d,c){return o[0]=d[c],o[1]=d[c+1],o[2]=d[c+2],o[3]=d[c+3],i[0]}function l(d,c){return o[3]=d[c],o[2]=d[c+1],o[1]=d[c+2],o[0]=d[c+3],i[0]}p.readFloatLE=e?r:l,p.readFloatBE=e?l:r}():function(){function i(e,t,n,r){var l=t<0?1:0;if(l&&(t=-t),t===0)e(1/t>0?0:2147483648,n,r);else if(isNaN(t))e(2143289344,n,r);else if(t>34028234663852886e22)e((l<<31|2139095040)>>>0,n,r);else if(t<11754943508222875e-54)e((l<<31|Math.round(t/1401298464324817e-60))>>>0,n,r);else{var d=Math.floor(Math.log(t)/Math.LN2),c=Math.round(t*Math.pow(2,-d)*8388608)&8388607;e((l<<31|d+127<<23|c)>>>0,n,r)}}p.writeFloatLE=i.bind(null,bi),p.writeFloatBE=i.bind(null,yi);function o(e,t,n){var r=e(t,n),l=(r>>31)*2+1,d=r>>>23&255,c=r&8388607;return d===255?c?NaN:l*(1/0):d===0?l*1401298464324817e-60*c:l*Math.pow(2,d-150)*(c+8388608)}p.readFloatLE=o.bind(null,_i),p.readFloatBE=o.bind(null,Oi)}(),typeof Float64Array<"u"?function(){var i=new Float64Array([-0]),o=new Uint8Array(i.buffer),e=o[7]===128;function t(d,c,w){i[0]=d,c[w]=o[0],c[w+1]=o[1],c[w+2]=o[2],c[w+3]=o[3],c[w+4]=o[4],c[w+5]=o[5],c[w+6]=o[6],c[w+7]=o[7]}function n(d,c,w){i[0]=d,c[w]=o[7],c[w+1]=o[6],c[w+2]=o[5],c[w+3]=o[4],c[w+4]=o[3],c[w+5]=o[2],c[w+6]=o[1],c[w+7]=o[0]}p.writeDoubleLE=e?t:n,p.writeDoubleBE=e?n:t;function r(d,c){return o[0]=d[c],o[1]=d[c+1],o[2]=d[c+2],o[3]=d[c+3],o[4]=d[c+4],o[5]=d[c+5],o[6]=d[c+6],o[7]=d[c+7],i[0]}function l(d,c){return o[7]=d[c],o[6]=d[c+1],o[5]=d[c+2],o[4]=d[c+3],o[3]=d[c+4],o[2]=d[c+5],o[1]=d[c+6],o[0]=d[c+7],i[0]}p.readDoubleLE=e?r:l,p.readDoubleBE=e?l:r}():function(){function i(e,t,n,r,l,d){var c=r<0?1:0;if(c&&(r=-r),r===0)e(0,l,d+t),e(1/r>0?0:2147483648,l,d+n);else if(isNaN(r))e(0,l,d+t),e(2146959360,l,d+n);else if(r>17976931348623157e292)e(0,l,d+t),e((c<<31|2146435072)>>>0,l,d+n);else{var w;if(r<22250738585072014e-324)w=r/5e-324,e(w>>>0,l,d+t),e((c<<31|w/4294967296)>>>0,l,d+n);else{var j=Math.floor(Math.log(r)/Math.LN2);j===1024&&(j=1023),w=r*Math.pow(2,-j),e(w*4503599627370496>>>0,l,d+t),e((c<<31|j+1023<<20|w*1048576&1048575)>>>0,l,d+n)}}}p.writeDoubleLE=i.bind(null,bi,0,4),p.writeDoubleBE=i.bind(null,yi,4,0);function o(e,t,n,r,l){var d=e(r,l+t),c=e(r,l+n),w=(c>>31)*2+1,j=c>>>20&2047,C=4294967296*(c&1048575)+d;return j===2047?C?NaN:w*(1/0):j===0?w*5e-324*C:w*Math.pow(2,j-1075)*(C+4503599627370496)}p.readDoubleLE=o.bind(null,_i,0,4),p.readDoubleBE=o.bind(null,Oi,4,0)}(),p}function bi(p,i,o){i[o]=p&255,i[o+1]=p>>>8&255,i[o+2]=p>>>16&255,i[o+3]=p>>>24}function yi(p,i,o){i[o]=p>>>24,i[o+1]=p>>>16&255,i[o+2]=p>>>8&255,i[o+3]=p&255}function _i(p,i){return(p[i]|p[i+1]<<8|p[i+2]<<16|p[i+3]<<24)>>>0}function Oi(p,i){return(p[i]<<24|p[i+1]<<16|p[i+2]<<8|p[i+3])>>>0}});var vi=Te((Mo,xi)=>{"use strict";xi.exports=Ir;function Ir(p){try{if(typeof Pt!="function")return null;var i=Pt(p);return i&&(i.length||Object.keys(i).length)?i:null}catch{return null}}});var Pi=Te(mi=>{"use strict";var yn=mi,bn="\uFFFD";yn.length=function(i){for(var o=0,e=0,t=0;t<i.length;++t)e=i.charCodeAt(t),e<128?o+=1:e<2048?o+=2:(e&64512)===55296&&(i.charCodeAt(t+1)&64512)===56320?(++t,o+=4):o+=3;return o};yn.read=function(i,o,e){if(e-o<1)return"";for(var t="",n=o;n<e;){var r=i[n++];if(r<=127)t+=String.fromCharCode(r);else if(r>=192&&r<224){var l=(r&31)<<6|i[n++]&63;t+=l>=128?String.fromCharCode(l):bn}else if(r>=224&&r<240){var d=(r&15)<<12|(i[n++]&63)<<6|i[n++]&63;t+=d>=2048?String.fromCharCode(d):bn}else if(r>=240){var c=(r&7)<<18|(i[n++]&63)<<12|(i[n++]&63)<<6|i[n++]&63;c<65536||c>1114111?t+=bn:(c-=65536,t+=String.fromCharCode(55296+(c>>10)),t+=String.fromCharCode(56320+(c&1023)))}}return t};yn.write=function(i,o,e){for(var t=e,n,r,l=0;l<i.length;++l)n=i.charCodeAt(l),n<128?o[e++]=n:n<2048?(o[e++]=n>>6|192,o[e++]=n&63|128):(n&64512)===55296&&((r=i.charCodeAt(l+1))&64512)===56320?(n=65536+((n&1023)<<10)+(r&1023),++l,o[e++]=n>>18|240,o[e++]=n>>12&63|128,o[e++]=n>>6&63|128,o[e++]=n&63|128):(o[e++]=n>>12|224,o[e++]=n>>6&63|128,o[e++]=n&63|128);return e-t}});var Ei=Te((Uo,Si)=>{"use strict";Si.exports=Jr;function Jr(p,i,o){var e=o||8192,t=e>>>1,n=null,r=e;return function(d){if(d<1||d>t)return p(d);r+d>e&&(n=p(e),r=0);var c=i.call(n,r,r+=d);return r&7&&(r=(r|7)+1),c}}});var Di=Te((Ho,Ti)=>{"use strict";Ti.exports=Le;var Et=ft();function Le(p,i){this.lo=p>>>0,this.hi=i>>>0}var st=Le.zero=new Le(0,0);st.toNumber=function(){return 0};st.zzEncode=st.zzDecode=function(){return this};st.length=function(){return 1};var Ur=Le.zeroHash="\0\0\0\0\0\0\0\0";Le.fromNumber=function(i){if(i===0)return st;var o=i<0;o&&(i=-i);var e=i>>>0,t=(i-e)/4294967296>>>0;return o&&(t=~t>>>0,e=~e>>>0,++e>4294967295&&(e=0,++t>4294967295&&(t=0))),new Le(e,t)};Le.from=function(i){if(typeof i=="number")return Le.fromNumber(i);if(Et.isString(i))if(Et.Long)i=Et.Long.fromString(i);else return Le.fromNumber(parseInt(i,10));return i.low||i.high?new Le(i.low>>>0,i.high>>>0):st};Le.prototype.toNumber=function(i){if(!i&&this.hi>>>31){var o=~this.lo+1>>>0,e=~this.hi>>>0;return o||(e=e+1>>>0),-(o+e*4294967296)}return this.lo+this.hi*4294967296};Le.prototype.toLong=function(i){return Et.Long?new Et.Long(this.lo|0,this.hi|0,!!i):{low:this.lo|0,high:this.hi|0,unsigned:!!i}};var lt=String.prototype.charCodeAt;Le.fromHash=function(i){return i===Ur?st:new Le((lt.call(i,0)|lt.call(i,1)<<8|lt.call(i,2)<<16|lt.call(i,3)<<24)>>>0,(lt.call(i,4)|lt.call(i,5)<<8|lt.call(i,6)<<16|lt.call(i,7)<<24)>>>0)};Le.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};Le.prototype.zzEncode=function(){var i=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^i)>>>0,this.lo=(this.lo<<1^i)>>>0,this};Le.prototype.zzDecode=function(){var i=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^i)>>>0,this.hi=(this.hi>>>1^i)>>>0,this};Le.prototype.length=function(){var i=this.lo,o=(this.lo>>>28|this.hi<<4)>>>0,e=this.hi>>>24;return e===0?o===0?i<16384?i<128?1:2:i<2097152?3:4:o<16384?o<128?5:6:o<2097152?7:8:e<128?9:10}});var ft=Te(_n=>{"use strict";var $=_n;$.asPromise=li();$.base64=ai();$.EventEmitter=pi();$.float=ki();$.inquire=vi();$.utf8=Pi();$.pool=Ei();$.LongBits=Di();$.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);$.global=$.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||_n;$.emptyArray=Object.freeze?Object.freeze([]):[];$.emptyObject=Object.freeze?Object.freeze({}):{};$.isInteger=Number.isInteger||function(i){return typeof i=="number"&&isFinite(i)&&Math.floor(i)===i};$.isString=function(i){return typeof i=="string"||i instanceof String};$.isObject=function(i){return i&&typeof i=="object"};$.isset=$.isSet=function(i,o){var e=i[o];return e!=null&&i.hasOwnProperty(o)?typeof e!="object"||(Array.isArray(e)?e.length:Object.keys(e).length)>0:!1};$.Buffer=function(){try{var p=$.inquire("buffer").Buffer;return p.prototype.utf8Write?p:null}catch{return null}}();$._Buffer_from=null;$._Buffer_allocUnsafe=null;$.newBuffer=function(i){return typeof i=="number"?$.Buffer?$._Buffer_allocUnsafe(i):new $.Array(i):$.Buffer?$._Buffer_from(i):typeof Uint8Array>"u"?i:new Uint8Array(i)};$.Array=typeof Uint8Array<"u"?Uint8Array:Array;$.Long=$.global.dcodeIO&&$.global.dcodeIO.Long||$.global.Long||$.inquire("long");$.key2Re=/^true|false|0|1$/;$.key32Re=/^-?(?:0|[1-9][0-9]*)$/;$.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;$.longToHash=function(i){return i?$.LongBits.from(i).toHash():$.LongBits.zeroHash};$.longFromHash=function(i,o){var e=$.LongBits.fromHash(i);return $.Long?$.Long.fromBits(e.lo,e.hi,o):e.toNumber(!!o)};function Ri(p,i,o){for(var e=Object.keys(i),t=0;t<e.length;++t)(p[e[t]]===void 0||!o)&&e[t]!=="__proto__"&&(p[e[t]]=i[e[t]]);return p}$.merge=Ri;$.recursionLimit=100;$.makeProp=function(i,o){Object.defineProperty(i,o,{enumerable:!0,configurable:!0,writable:!0})};$.lcFirst=function(i){return i.charAt(0).toLowerCase()+i.substring(1)};function Li(p){function i(o,e){if(!(this instanceof i))return new i(o,e);Object.defineProperty(this,"message",{get:function(){return o}}),Error.captureStackTrace?Error.captureStackTrace(this,i):Object.defineProperty(this,"stack",{value:new Error().stack||""}),e&&Ri(this,e)}return i.prototype=Object.create(Error.prototype,{constructor:{value:i,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return p},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),i}$.newError=Li;$.ProtocolError=Li("ProtocolError");$.oneOfGetter=function(i){for(var o={},e=0;e<i.length;++e)o[i[e]]=1;return function(){for(var t=Object.keys(this),n=t.length-1;n>-1;--n)if(o[t[n]]===1&&this[t[n]]!==void 0&&this[t[n]]!==null)return t[n]}};$.oneOfSetter=function(i){return function(o){for(var e=0;e<i.length;++e)i[e]!==o&&delete this[i[e]]}};$.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};$._configure=function(){var p=$.Buffer;if(!p){$._Buffer_from=$._Buffer_allocUnsafe=null;return}$._Buffer_from=p.from!==Uint8Array.from&&p.from||function(o,e){return new p(o,e)},$._Buffer_allocUnsafe=p.allocUnsafe||function(o){return new p(o)}}});var Pn=Te((zo,Ai)=>{"use strict";Ai.exports=be;var Ue=ft(),On,zt=Ue.LongBits,Fi=Ue.base64,qi=Ue.utf8;function Tt(p,i,o){this.fn=p,this.len=i,this.next=void 0,this.val=o}function kn(){}function Hr(p){this.head=p.head,this.tail=p.tail,this.len=p.len,this.next=p.states}function be(){this.len=0,this.head=new Tt(kn,0,0),this.tail=this.head,this.states=null}var Ni=function(){return Ue.Buffer?function(){return(be.create=function(){return new On})()}:function(){return new be}};be.create=Ni();be.alloc=function(i){return new Ue.Array(i)};Ue.Array!==Array&&(be.alloc=Ue.pool(be.alloc,Ue.Array.prototype.subarray));be.prototype._push=function(i,o,e){return this.tail=this.tail.next=new Tt(i,o,e),this.len+=o,this};function xn(p,i,o){i[o]=p&255}function $r(p,i,o){for(;p>127;)i[o++]=p&127|128,p>>>=7;i[o]=p}function vn(p,i){this.len=p,this.next=void 0,this.val=i}vn.prototype=Object.create(Tt.prototype);vn.prototype.fn=$r;be.prototype.uint32=function(i){return this.len+=(this.tail=this.tail.next=new vn((i=i>>>0)<128?1:i<16384?2:i<2097152?3:i<268435456?4:5,i)).len,this};be.prototype.int32=function(i){return i<0?this._push(mn,10,zt.fromNumber(i)):this.uint32(i)};be.prototype.sint32=function(i){return this.uint32((i<<1^i>>31)>>>0)};function mn(p,i,o){for(;p.hi;)i[o++]=p.lo&127|128,p.lo=(p.lo>>>7|p.hi<<25)>>>0,p.hi>>>=7;for(;p.lo>127;)i[o++]=p.lo&127|128,p.lo=p.lo>>>7;i[o++]=p.lo}be.prototype.uint64=function(i){var o=zt.from(i);return this._push(mn,o.length(),o)};be.prototype.int64=be.prototype.uint64;be.prototype.sint64=function(i){var o=zt.from(i).zzEncode();return this._push(mn,o.length(),o)};be.prototype.bool=function(i){return this._push(xn,1,i?1:0)};function wn(p,i,o){i[o]=p&255,i[o+1]=p>>>8&255,i[o+2]=p>>>16&255,i[o+3]=p>>>24}be.prototype.fixed32=function(i){return this._push(wn,4,i>>>0)};be.prototype.sfixed32=be.prototype.fixed32;be.prototype.fixed64=function(i){var o=zt.from(i);return this._push(wn,4,o.lo)._push(wn,4,o.hi)};be.prototype.sfixed64=be.prototype.fixed64;be.prototype.float=function(i){return this._push(Ue.float.writeFloatLE,4,i)};be.prototype.double=function(i){return this._push(Ue.float.writeDoubleLE,8,i)};var zr=Ue.Array.prototype.set?function(i,o,e){o.set(i,e)}:function(i,o,e){for(var t=0;t<i.length;++t)o[e+t]=i[t]};be.prototype.bytes=function(i){var o=i.length>>>0;if(!o)return this._push(xn,1,0);if(Ue.isString(i)){var e=be.alloc(o=Fi.length(i));Fi.decode(i,e,0),i=e}return this.uint32(o)._push(zr,o,i)};be.prototype.string=function(i){var o=qi.length(i);return o?this.uint32(o)._push(qi.write,o,i):this._push(xn,1,0)};be.prototype.fork=function(){return this.states=new Hr(this),this.head=this.tail=new Tt(kn,0,0),this.len=0,this};be.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Tt(kn,0,0),this.len=0),this};be.prototype.ldelim=function(){var i=this.head,o=this.tail,e=this.len;return this.reset().uint32(e),e&&(this.tail.next=i.next,this.tail=o,this.len+=e),this};be.prototype.finish=function(){for(var i=this.head.next,o=this.constructor.alloc(this.len),e=0;i;)i.fn(i.val,o,e),e+=i.len,i=i.next;return o};be._configure=function(p){On=p,be.create=Ni(),On._configure()}});var Bi=Te((Ko,Ci)=>{"use strict";Ci.exports=et;var ji=Pn();(et.prototype=Object.create(ji.prototype)).constructor=et;var ct=ft();function et(){ji.call(this)}et._configure=function(){et.alloc=ct._Buffer_allocUnsafe,et.writeBytesBuffer=ct.Buffer&&ct.Buffer.prototype instanceof Uint8Array&&ct.Buffer.prototype.set.name==="set"?function(i,o,e){o.set(i,e)}:function(i,o,e){if(i.copy)i.copy(o,e,0,i.length);else for(var t=0;t<i.length;)o[e++]=i[t++]}};et.prototype.bytes=function(i){ct.isString(i)&&(i=ct._Buffer_from(i,"base64"));var o=i.length>>>0;return this.uint32(o),o&&this._push(et.writeBytesBuffer,o,i),this};function Kr(p,i,o){p.length<40?ct.utf8.write(p,i,o):i.utf8Write?i.utf8Write(p,o):i.write(p,o)}et.prototype.string=function(i){var o=ct.Buffer.byteLength(i);return this.uint32(o),o&&this._push(Kr,o,i),this};et._configure()});var Tn=Te((Vo,Hi)=>{"use strict";Hi.exports=xe;var He=ft(),En,Ji=He.LongBits,Vr=He.utf8;function Xe(p,i){return RangeError("index out of range: "+p.pos+" + "+(i||1)+" > "+p.len)}function xe(p){this.buf=p,this.pos=0,this.len=p.length}var Mi=typeof Uint8Array<"u"?function(i){if(i instanceof Uint8Array||Array.isArray(i))return new xe(i);throw Error("illegal buffer")}:function(i){if(Array.isArray(i))return new xe(i);throw Error("illegal buffer")},Ui=function(){return He.Buffer?function(o){return(xe.create=function(t){return He.Buffer.isBuffer(t)?new En(t):Mi(t)})(o)}:Mi};xe.create=Ui();xe.prototype._slice=He.Array.prototype.subarray||He.Array.prototype.slice;xe.prototype.uint32=function(){var i=4294967295;return function(){if(i=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(i=(i|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(i=(i|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(i=(i|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(i=(i|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return i;if((this.pos+=5)>this.len)throw this.pos=this.len,Xe(this,10);return i}}();xe.prototype.int32=function(){return this.uint32()|0};xe.prototype.sint32=function(){var i=this.uint32();return i>>>1^-(i&1)|0};function Sn(){var p=new Ji(0,0),i=0;if(this.len-this.pos>4){for(;i<4;++i)if(p.lo=(p.lo|(this.buf[this.pos]&127)<<i*7)>>>0,this.buf[this.pos++]<128)return p;if(p.lo=(p.lo|(this.buf[this.pos]&127)<<28)>>>0,p.hi=(p.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return p;i=0}else{for(;i<3;++i){if(this.pos>=this.len)throw Xe(this);if(p.lo=(p.lo|(this.buf[this.pos]&127)<<i*7)>>>0,this.buf[this.pos++]<128)return p}return p.lo=(p.lo|(this.buf[this.pos++]&127)<<i*7)>>>0,p}if(this.len-this.pos>4){for(;i<5;++i)if(p.hi=(p.hi|(this.buf[this.pos]&127)<<i*7+3)>>>0,this.buf[this.pos++]<128)return p}else for(;i<5;++i){if(this.pos>=this.len)throw Xe(this);if(p.hi=(p.hi|(this.buf[this.pos]&127)<<i*7+3)>>>0,this.buf[this.pos++]<128)return p}throw Error("invalid varint encoding")}xe.prototype.bool=function(){return this.uint32()!==0};function Kt(p,i){return(p[i-4]|p[i-3]<<8|p[i-2]<<16|p[i-1]<<24)>>>0}xe.prototype.fixed32=function(){if(this.pos+4>this.len)throw Xe(this,4);return Kt(this.buf,this.pos+=4)};xe.prototype.sfixed32=function(){if(this.pos+4>this.len)throw Xe(this,4);return Kt(this.buf,this.pos+=4)|0};function Ii(){if(this.pos+8>this.len)throw Xe(this,8);return new Ji(Kt(this.buf,this.pos+=4),Kt(this.buf,this.pos+=4))}xe.prototype.float=function(){if(this.pos+4>this.len)throw Xe(this,4);var i=He.float.readFloatLE(this.buf,this.pos);return this.pos+=4,i};xe.prototype.double=function(){if(this.pos+8>this.len)throw Xe(this,4);var i=He.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,i};xe.prototype.bytes=function(){var i=this.uint32(),o=this.pos,e=this.pos+i;if(e>this.len)throw Xe(this,i);if(this.pos+=i,Array.isArray(this.buf))return this.buf.slice(o,e);if(o===e){var t=He.Buffer;return t?t.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,o,e)};xe.prototype.string=function(){var i=this.bytes();return Vr.read(i,0,i.length)};xe.prototype.skip=function(i){if(typeof i=="number"){if(this.pos+i>this.len)throw Xe(this,i);this.pos+=i}else do if(this.pos>=this.len)throw Xe(this);while(this.buf[this.pos++]&128);return this};xe.recursionLimit=He.recursionLimit;xe.prototype.skipType=function(p,i){if(i===void 0&&(i=0),i>xe.recursionLimit)throw Error("maximum nesting depth exceeded");switch(p){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(p=this.uint32()&7)!==4;)this.skipType(p,i+1);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+p+" at offset "+this.pos)}return this};xe._configure=function(p){En=p,xe.create=Ui(),En._configure();var i=He.Long?"toLong":"toNumber";He.merge(xe.prototype,{int64:function(){return Sn.call(this)[i](!1)},uint64:function(){return Sn.call(this)[i](!0)},sint64:function(){return Sn.call(this).zzDecode()[i](!1)},fixed64:function(){return Ii.call(this)[i](!0)},sfixed64:function(){return Ii.call(this)[i](!1)}})}});var Vi=Te((Yo,Ki)=>{"use strict";Ki.exports=pt;var zi=Tn();(pt.prototype=Object.create(zi.prototype)).constructor=pt;var $i=ft();function pt(p){zi.call(this,p)}pt._configure=function(){$i.Buffer&&(pt.prototype._slice=$i.Buffer.prototype.slice)};pt.prototype.string=function(){var i=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+i,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+i,this.len))};pt._configure()});var Wi=Te((Wo,Yi)=>{"use strict";Yi.exports=Dt;var Dn=ft();(Dt.prototype=Object.create(Dn.EventEmitter.prototype)).constructor=Dt;function Dt(p,i,o){if(typeof p!="function")throw TypeError("rpcImpl must be a function");Dn.EventEmitter.call(this),this.rpcImpl=p,this.requestDelimited=!!i,this.responseDelimited=!!o}Dt.prototype.rpcCall=function p(i,o,e,t,n){if(!t)throw TypeError("request must be specified");var r=this;if(!n)return Dn.asPromise(p,r,i,o,e,t);if(!r.rpcImpl){setTimeout(function(){n(Error("already ended"))},0);return}try{return r.rpcImpl(i,o[r.requestDelimited?"encodeDelimited":"encode"](t).finish(),function(d,c){if(d)return r.emit("error",d,i),n(d);if(c===null){r.end(!0);return}if(!(c instanceof e))try{c=e[r.responseDelimited?"decodeDelimited":"decode"](c)}catch(w){return r.emit("error",w,i),n(w)}return r.emit("data",c,i),n(null,c)})}catch(l){r.emit("error",l,i),setTimeout(function(){n(l)},0);return}};Dt.prototype.end=function(i){return this.rpcImpl&&(i||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var Xi=Te(Gi=>{"use strict";var Yr=Gi;Yr.Service=Wi()});var Zi=Te((Xo,Qi)=>{"use strict";Qi.exports={}});var tr=Te(er=>{"use strict";var je=er;je.build="minimal";je.Writer=Pn();je.BufferWriter=Bi();je.Reader=Tn();je.BufferReader=Vi();je.util=ft();je.rpc=Xi();je.roots=Zi();je.configure=gi;function gi(){je.util._configure(),je.Writer._configure(je.BufferWriter),je.Reader._configure(je.BufferReader)}gi()});var ir=Te((Zo,nr)=>{"use strict";nr.exports=tr()});var Be=$n(Kn(),1);function qr(p){return p instanceof Uint8Array||ArrayBuffer.isView(p)&&p.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in p&&p.BYTES_PER_ELEMENT===1}function cn(p,i,o=""){let e=qr(p),t=p?.length,n=i!==void 0;if(!e||n&&t!==i){let r=o&&`"${o}" `,l=n?` of length ${i}`:"",d=e?`length=${t}`:`type=${typeof p}`,c=r+"expected Uint8Array"+l+", got "+d;throw e?new RangeError(c):new TypeError(c)}return p}function dn(p,i=!0){if(p.destroyed)throw new Error("Hash instance has been destroyed");if(i&&p.finished)throw new Error("Hash#digest() has already been called")}function Vn(p,i){cn(p,void 0,"digestInto() output");let o=i.outputLen;if(p.length<o)throw new RangeError('"digestInto() output" expected to be of length >='+o)}function St(...p){for(let i=0;i<p.length;i++)p[i].fill(0)}function It(p){return new DataView(p.buffer,p.byteOffset,p.byteLength)}function We(p,i){return p<<32-i|p>>>i}function Yn(p,i={}){let o=(t,n)=>p(n).update(t).digest(),e=p(void 0);return o.outputLen=e.outputLen,o.blockLen=e.blockLen,o.canXOF=e.canXOF,o.create=t=>p(t),Object.assign(o,i),Object.freeze(o)}var Wn=p=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,p])});function Gn(p,i,o){return p&i^~p&o}function Xn(p,i,o){return p&i^p&o^i&o}var Jt=class{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(i,o,e,t){this.blockLen=i,this.outputLen=o,this.padOffset=e,this.isLE=t,this.buffer=new Uint8Array(i),this.view=It(this.buffer)}update(i){dn(this),cn(i);let{view:o,buffer:e,blockLen:t}=this,n=i.length;for(let r=0;r<n;){let l=Math.min(t-this.pos,n-r);if(l===t){let d=It(i);for(;t<=n-r;r+=t)this.process(d,r);continue}e.set(i.subarray(r,r+l),this.pos),this.pos+=l,r+=l,this.pos===t&&(this.process(o,0),this.pos=0)}return this.length+=i.length,this.roundClean(),this}digestInto(i){dn(this),Vn(i,this),this.finished=!0;let{buffer:o,view:e,blockLen:t,isLE:n}=this,{pos:r}=this;o[r++]=128,St(this.buffer.subarray(r)),this.padOffset>t-r&&(this.process(e,0),r=0);for(let j=r;j<t;j++)o[j]=0;e.setBigUint64(t-8,BigInt(this.length*8),n),this.process(e,0);let l=It(i),d=this.outputLen;if(d%4)throw new Error("_sha2: outputLen must be aligned to 32bit");let c=d/4,w=this.get();if(c>w.length)throw new Error("_sha2: outputLen bigger than state");for(let j=0;j<c;j++)l.setUint32(4*j,w[j],n)}digest(){let{buffer:i,outputLen:o}=this;this.digestInto(i);let e=i.slice(0,o);return this.destroy(),e}_cloneInto(i){i||=new this.constructor,i.set(...this.get());let{blockLen:o,buffer:e,length:t,finished:n,destroyed:r,pos:l}=this;return i.destroyed=r,i.finished=n,i.length=t,i.pos=l,t%o&&i.buffer.set(e),i}clone(){return this._cloneInto()}},ot=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);var Nr=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ut=new Uint32Array(64),an=class extends Jt{constructor(i){super(64,i,8,!1)}get(){let{A:i,B:o,C:e,D:t,E:n,F:r,G:l,H:d}=this;return[i,o,e,t,n,r,l,d]}set(i,o,e,t,n,r,l,d){this.A=i|0,this.B=o|0,this.C=e|0,this.D=t|0,this.E=n|0,this.F=r|0,this.G=l|0,this.H=d|0}process(i,o){for(let j=0;j<16;j++,o+=4)ut[j]=i.getUint32(o,!1);for(let j=16;j<64;j++){let C=ut[j-15],K=ut[j-2],V=We(C,7)^We(C,18)^C>>>3,ce=We(K,17)^We(K,19)^K>>>10;ut[j]=ce+ut[j-7]+V+ut[j-16]|0}let{A:e,B:t,C:n,D:r,E:l,F:d,G:c,H:w}=this;for(let j=0;j<64;j++){let C=We(l,6)^We(l,11)^We(l,25),K=w+C+Gn(l,d,c)+Nr[j]+ut[j]|0,ce=(We(e,2)^We(e,13)^We(e,22))+Xn(e,t,n)|0;w=c,c=d,d=l,l=r+K|0,r=n,n=t,t=e,e=K+ce|0}e=e+this.A|0,t=t+this.B|0,n=n+this.C|0,r=r+this.D|0,l=l+this.E|0,d=d+this.F|0,c=c+this.G|0,w=w+this.H|0,this.set(e,t,n,r,l,d,c,w)}roundClean(){St(ut)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),St(this.buffer)}},sn=class extends an{A=ot[0]|0;B=ot[1]|0;C=ot[2]|0;D=ot[3]|0;E=ot[4]|0;F=ot[5]|0;G=ot[6]|0;H=ot[7]|0;constructor(){super(32)}};var Qn=Yn(()=>new sn,Wn(1));var Zn=Promise.resolve(),Ar=Be.default.sign.publicKeyLength,Lo=Be.default.box.publicKeyLength,Fo=Be.default.box.secretKeyLength,jr=Be.default.box.nonceLength,Cr=Be.default.secretbox.keyLength,Br=Be.default.secretbox.nonceLength;function Ut(p,i){if(i.length!==Ar)throw new Error(`signOpen: bad pk length ${i.length}`);let o=Be.default.sign.open(p,i);if(!o)throw new Error("signOpen: signature verification failed");return o}function gn(){let p=Be.default.box.keyPair();return{publicKey:p.publicKey,secretKey:p.secretKey}}function ei(){return Be.default.randomBytes(Cr)}function ti(p,i,o){let e=new Uint8Array(jr);return Be.default.box(p,e,i,o)}function ni(p,i,o){return Be.default.secretbox(p,ri(i),o)}function ii(p,i,o){let e=Be.default.secretbox.open(p,ri(i),o);if(!e)throw new Error("secretboxOpen: authentication failed");return e}function ri(p){let i=new Uint8Array(Br);return new DataView(i.buffer).setBigUint64(0,p,!0),i}function pn(p){return Qn(p)}function hn(p,i){let o=new Uint8Array(p.length+i.length);return o.set(p,0),o.set(i,p.length),o}function oi(p){let i=atob(p),o=new Uint8Array(i.length);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);return o}var S=$n(ir(),1),s=S.Reader,E=S.Writer,f=S.util,u=S.roots.default||(S.roots.default={}),x=u.hbb=(()=>{let p={};return p.RegisterPeer=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.id="",i.prototype.serial=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),e.serial!=null&&Object.hasOwnProperty.call(e,"serial")&&t.uint32(16).int32(e.serial),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.RegisterPeer;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.id=e.string();break}case 2:{d.serial=e.int32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.id!=null&&e.hasOwnProperty("id")&&!f.isString(e.id)?"id: string expected":e.serial!=null&&e.hasOwnProperty("serial")&&!f.isInteger(e.serial)?"serial: integer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.RegisterPeer)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.RegisterPeer;return e.id!=null&&(n.id=String(e.id)),e.serial!=null&&(n.serial=e.serial|0),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.id="",n.serial=0),e.id!=null&&e.hasOwnProperty("id")&&(n.id=e.id),e.serial!=null&&e.hasOwnProperty("serial")&&(n.serial=e.serial),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.RegisterPeer"},i}(),p.ConnType=function(){let i={},o=Object.create(i);return o[i[0]="DEFAULT_CONN"]=0,o[i[1]="FILE_TRANSFER"]=1,o[i[2]="PORT_FORWARD"]=2,o[i[3]="RDP"]=3,o[i[4]="VIEW_CAMERA"]=4,o}(),p.RegisterPeerResponse=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.request_pk=!1,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.request_pk!=null&&Object.hasOwnProperty.call(e,"request_pk")&&t.uint32(16).bool(e.request_pk),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.RegisterPeerResponse;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 2:{d.request_pk=e.bool();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.request_pk!=null&&e.hasOwnProperty("request_pk")&&typeof e.request_pk!="boolean"?"request_pk: boolean expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.RegisterPeerResponse)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.RegisterPeerResponse;return e.request_pk!=null&&(n.request_pk=!!e.request_pk),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.request_pk=!1),e.request_pk!=null&&e.hasOwnProperty("request_pk")&&(n.request_pk=e.request_pk),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.RegisterPeerResponse"},i}(),p.PunchHoleRequest=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.id="",i.prototype.nat_type=0,i.prototype.licence_key="",i.prototype.conn_type=0,i.prototype.token="",i.prototype.version="",i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),e.nat_type!=null&&Object.hasOwnProperty.call(e,"nat_type")&&t.uint32(16).int32(e.nat_type),e.licence_key!=null&&Object.hasOwnProperty.call(e,"licence_key")&&t.uint32(26).string(e.licence_key),e.conn_type!=null&&Object.hasOwnProperty.call(e,"conn_type")&&t.uint32(32).int32(e.conn_type),e.token!=null&&Object.hasOwnProperty.call(e,"token")&&t.uint32(42).string(e.token),e.version!=null&&Object.hasOwnProperty.call(e,"version")&&t.uint32(50).string(e.version),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.PunchHoleRequest;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.id=e.string();break}case 2:{d.nat_type=e.int32();break}case 3:{d.licence_key=e.string();break}case 4:{d.conn_type=e.int32();break}case 5:{d.token=e.string();break}case 6:{d.version=e.string();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.id!=null&&e.hasOwnProperty("id")&&!f.isString(e.id))return"id: string expected";if(e.nat_type!=null&&e.hasOwnProperty("nat_type"))switch(e.nat_type){default:return"nat_type: enum value expected";case 0:case 1:case 2:break}if(e.licence_key!=null&&e.hasOwnProperty("licence_key")&&!f.isString(e.licence_key))return"licence_key: string expected";if(e.conn_type!=null&&e.hasOwnProperty("conn_type"))switch(e.conn_type){default:return"conn_type: enum value expected";case 0:case 1:case 2:case 3:case 4:break}return e.token!=null&&e.hasOwnProperty("token")&&!f.isString(e.token)?"token: string expected":e.version!=null&&e.hasOwnProperty("version")&&!f.isString(e.version)?"version: string expected":null},i.fromObject=function(e,t){if(e instanceof u.hbb.PunchHoleRequest)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.PunchHoleRequest;switch(e.id!=null&&(n.id=String(e.id)),e.nat_type){default:if(typeof e.nat_type=="number"){n.nat_type=e.nat_type;break}break;case"UNKNOWN_NAT":case 0:n.nat_type=0;break;case"ASYMMETRIC":case 1:n.nat_type=1;break;case"SYMMETRIC":case 2:n.nat_type=2;break}switch(e.licence_key!=null&&(n.licence_key=String(e.licence_key)),e.conn_type){default:if(typeof e.conn_type=="number"){n.conn_type=e.conn_type;break}break;case"DEFAULT_CONN":case 0:n.conn_type=0;break;case"FILE_TRANSFER":case 1:n.conn_type=1;break;case"PORT_FORWARD":case 2:n.conn_type=2;break;case"RDP":case 3:n.conn_type=3;break;case"VIEW_CAMERA":case 4:n.conn_type=4;break}return e.token!=null&&(n.token=String(e.token)),e.version!=null&&(n.version=String(e.version)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.id="",n.nat_type=t.enums===String?"UNKNOWN_NAT":0,n.licence_key="",n.conn_type=t.enums===String?"DEFAULT_CONN":0,n.token="",n.version=""),e.id!=null&&e.hasOwnProperty("id")&&(n.id=e.id),e.nat_type!=null&&e.hasOwnProperty("nat_type")&&(n.nat_type=t.enums===String?u.hbb.NatType[e.nat_type]===void 0?e.nat_type:u.hbb.NatType[e.nat_type]:e.nat_type),e.licence_key!=null&&e.hasOwnProperty("licence_key")&&(n.licence_key=e.licence_key),e.conn_type!=null&&e.hasOwnProperty("conn_type")&&(n.conn_type=t.enums===String?u.hbb.ConnType[e.conn_type]===void 0?e.conn_type:u.hbb.ConnType[e.conn_type]:e.conn_type),e.token!=null&&e.hasOwnProperty("token")&&(n.token=e.token),e.version!=null&&e.hasOwnProperty("version")&&(n.version=e.version),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.PunchHoleRequest"},i}(),p.PunchHole=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.socket_addr=f.newBuffer([]),i.prototype.relay_server="",i.prototype.nat_type=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.socket_addr!=null&&Object.hasOwnProperty.call(e,"socket_addr")&&t.uint32(10).bytes(e.socket_addr),e.relay_server!=null&&Object.hasOwnProperty.call(e,"relay_server")&&t.uint32(18).string(e.relay_server),e.nat_type!=null&&Object.hasOwnProperty.call(e,"nat_type")&&t.uint32(24).int32(e.nat_type),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.PunchHole;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.socket_addr=e.bytes();break}case 2:{d.relay_server=e.string();break}case 3:{d.nat_type=e.int32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.socket_addr!=null&&e.hasOwnProperty("socket_addr")&&!(e.socket_addr&&typeof e.socket_addr.length=="number"||f.isString(e.socket_addr)))return"socket_addr: buffer expected";if(e.relay_server!=null&&e.hasOwnProperty("relay_server")&&!f.isString(e.relay_server))return"relay_server: string expected";if(e.nat_type!=null&&e.hasOwnProperty("nat_type"))switch(e.nat_type){default:return"nat_type: enum value expected";case 0:case 1:case 2:break}return null},i.fromObject=function(e,t){if(e instanceof u.hbb.PunchHole)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.PunchHole;switch(e.socket_addr!=null&&(typeof e.socket_addr=="string"?f.base64.decode(e.socket_addr,n.socket_addr=f.newBuffer(f.base64.length(e.socket_addr)),0):e.socket_addr.length>=0&&(n.socket_addr=e.socket_addr)),e.relay_server!=null&&(n.relay_server=String(e.relay_server)),e.nat_type){default:if(typeof e.nat_type=="number"){n.nat_type=e.nat_type;break}break;case"UNKNOWN_NAT":case 0:n.nat_type=0;break;case"ASYMMETRIC":case 1:n.nat_type=1;break;case"SYMMETRIC":case 2:n.nat_type=2;break}return n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(t.bytes===String?n.socket_addr="":(n.socket_addr=[],t.bytes!==Array&&(n.socket_addr=f.newBuffer(n.socket_addr))),n.relay_server="",n.nat_type=t.enums===String?"UNKNOWN_NAT":0),e.socket_addr!=null&&e.hasOwnProperty("socket_addr")&&(n.socket_addr=t.bytes===String?f.base64.encode(e.socket_addr,0,e.socket_addr.length):t.bytes===Array?Array.prototype.slice.call(e.socket_addr):e.socket_addr),e.relay_server!=null&&e.hasOwnProperty("relay_server")&&(n.relay_server=e.relay_server),e.nat_type!=null&&e.hasOwnProperty("nat_type")&&(n.nat_type=t.enums===String?u.hbb.NatType[e.nat_type]===void 0?e.nat_type:u.hbb.NatType[e.nat_type]:e.nat_type),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.PunchHole"},i}(),p.TestNatRequest=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.serial=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.serial!=null&&Object.hasOwnProperty.call(e,"serial")&&t.uint32(8).int32(e.serial),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.TestNatRequest;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.serial=e.int32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.serial!=null&&e.hasOwnProperty("serial")&&!f.isInteger(e.serial)?"serial: integer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.TestNatRequest)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.TestNatRequest;return e.serial!=null&&(n.serial=e.serial|0),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.serial=0),e.serial!=null&&e.hasOwnProperty("serial")&&(n.serial=e.serial),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.TestNatRequest"},i}(),p.TestNatResponse=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.port=0,i.prototype.cu=null,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.port!=null&&Object.hasOwnProperty.call(e,"port")&&t.uint32(8).int32(e.port),e.cu!=null&&Object.hasOwnProperty.call(e,"cu")&&u.hbb.ConfigUpdate.encode(e.cu,t.uint32(18).fork()).ldelim(),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.TestNatResponse;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.port=e.int32();break}case 2:{d.cu=u.hbb.ConfigUpdate.decode(e,e.uint32(),void 0,r+1);break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.port!=null&&e.hasOwnProperty("port")&&!f.isInteger(e.port))return"port: integer expected";if(e.cu!=null&&e.hasOwnProperty("cu")){let n=u.hbb.ConfigUpdate.verify(e.cu,t+1);if(n)return"cu."+n}return null},i.fromObject=function(e,t){if(e instanceof u.hbb.TestNatResponse)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.TestNatResponse;if(e.port!=null&&(n.port=e.port|0),e.cu!=null){if(typeof e.cu!="object")throw TypeError(".hbb.TestNatResponse.cu: object expected");n.cu=u.hbb.ConfigUpdate.fromObject(e.cu,t+1)}return n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.port=0,n.cu=null),e.port!=null&&e.hasOwnProperty("port")&&(n.port=e.port),e.cu!=null&&e.hasOwnProperty("cu")&&(n.cu=u.hbb.ConfigUpdate.toObject(e.cu,t)),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.TestNatResponse"},i}(),p.NatType=function(){let i={},o=Object.create(i);return o[i[0]="UNKNOWN_NAT"]=0,o[i[1]="ASYMMETRIC"]=1,o[i[2]="SYMMETRIC"]=2,o}(),p.PunchHoleSent=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.socket_addr=f.newBuffer([]),i.prototype.id="",i.prototype.relay_server="",i.prototype.nat_type=0,i.prototype.version="",i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.socket_addr!=null&&Object.hasOwnProperty.call(e,"socket_addr")&&t.uint32(10).bytes(e.socket_addr),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(18).string(e.id),e.relay_server!=null&&Object.hasOwnProperty.call(e,"relay_server")&&t.uint32(26).string(e.relay_server),e.nat_type!=null&&Object.hasOwnProperty.call(e,"nat_type")&&t.uint32(32).int32(e.nat_type),e.version!=null&&Object.hasOwnProperty.call(e,"version")&&t.uint32(42).string(e.version),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.PunchHoleSent;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.socket_addr=e.bytes();break}case 2:{d.id=e.string();break}case 3:{d.relay_server=e.string();break}case 4:{d.nat_type=e.int32();break}case 5:{d.version=e.string();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.socket_addr!=null&&e.hasOwnProperty("socket_addr")&&!(e.socket_addr&&typeof e.socket_addr.length=="number"||f.isString(e.socket_addr)))return"socket_addr: buffer expected";if(e.id!=null&&e.hasOwnProperty("id")&&!f.isString(e.id))return"id: string expected";if(e.relay_server!=null&&e.hasOwnProperty("relay_server")&&!f.isString(e.relay_server))return"relay_server: string expected";if(e.nat_type!=null&&e.hasOwnProperty("nat_type"))switch(e.nat_type){default:return"nat_type: enum value expected";case 0:case 1:case 2:break}return e.version!=null&&e.hasOwnProperty("version")&&!f.isString(e.version)?"version: string expected":null},i.fromObject=function(e,t){if(e instanceof u.hbb.PunchHoleSent)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.PunchHoleSent;switch(e.socket_addr!=null&&(typeof e.socket_addr=="string"?f.base64.decode(e.socket_addr,n.socket_addr=f.newBuffer(f.base64.length(e.socket_addr)),0):e.socket_addr.length>=0&&(n.socket_addr=e.socket_addr)),e.id!=null&&(n.id=String(e.id)),e.relay_server!=null&&(n.relay_server=String(e.relay_server)),e.nat_type){default:if(typeof e.nat_type=="number"){n.nat_type=e.nat_type;break}break;case"UNKNOWN_NAT":case 0:n.nat_type=0;break;case"ASYMMETRIC":case 1:n.nat_type=1;break;case"SYMMETRIC":case 2:n.nat_type=2;break}return e.version!=null&&(n.version=String(e.version)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(t.bytes===String?n.socket_addr="":(n.socket_addr=[],t.bytes!==Array&&(n.socket_addr=f.newBuffer(n.socket_addr))),n.id="",n.relay_server="",n.nat_type=t.enums===String?"UNKNOWN_NAT":0,n.version=""),e.socket_addr!=null&&e.hasOwnProperty("socket_addr")&&(n.socket_addr=t.bytes===String?f.base64.encode(e.socket_addr,0,e.socket_addr.length):t.bytes===Array?Array.prototype.slice.call(e.socket_addr):e.socket_addr),e.id!=null&&e.hasOwnProperty("id")&&(n.id=e.id),e.relay_server!=null&&e.hasOwnProperty("relay_server")&&(n.relay_server=e.relay_server),e.nat_type!=null&&e.hasOwnProperty("nat_type")&&(n.nat_type=t.enums===String?u.hbb.NatType[e.nat_type]===void 0?e.nat_type:u.hbb.NatType[e.nat_type]:e.nat_type),e.version!=null&&e.hasOwnProperty("version")&&(n.version=e.version),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.PunchHoleSent"},i}(),p.RegisterPk=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.id="",i.prototype.uuid=f.newBuffer([]),i.prototype.pk=f.newBuffer([]),i.prototype.old_id="",i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),e.uuid!=null&&Object.hasOwnProperty.call(e,"uuid")&&t.uint32(18).bytes(e.uuid),e.pk!=null&&Object.hasOwnProperty.call(e,"pk")&&t.uint32(26).bytes(e.pk),e.old_id!=null&&Object.hasOwnProperty.call(e,"old_id")&&t.uint32(34).string(e.old_id),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.RegisterPk;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.id=e.string();break}case 2:{d.uuid=e.bytes();break}case 3:{d.pk=e.bytes();break}case 4:{d.old_id=e.string();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.id!=null&&e.hasOwnProperty("id")&&!f.isString(e.id)?"id: string expected":e.uuid!=null&&e.hasOwnProperty("uuid")&&!(e.uuid&&typeof e.uuid.length=="number"||f.isString(e.uuid))?"uuid: buffer expected":e.pk!=null&&e.hasOwnProperty("pk")&&!(e.pk&&typeof e.pk.length=="number"||f.isString(e.pk))?"pk: buffer expected":e.old_id!=null&&e.hasOwnProperty("old_id")&&!f.isString(e.old_id)?"old_id: string expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.RegisterPk)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.RegisterPk;return e.id!=null&&(n.id=String(e.id)),e.uuid!=null&&(typeof e.uuid=="string"?f.base64.decode(e.uuid,n.uuid=f.newBuffer(f.base64.length(e.uuid)),0):e.uuid.length>=0&&(n.uuid=e.uuid)),e.pk!=null&&(typeof e.pk=="string"?f.base64.decode(e.pk,n.pk=f.newBuffer(f.base64.length(e.pk)),0):e.pk.length>=0&&(n.pk=e.pk)),e.old_id!=null&&(n.old_id=String(e.old_id)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.id="",t.bytes===String?n.uuid="":(n.uuid=[],t.bytes!==Array&&(n.uuid=f.newBuffer(n.uuid))),t.bytes===String?n.pk="":(n.pk=[],t.bytes!==Array&&(n.pk=f.newBuffer(n.pk))),n.old_id=""),e.id!=null&&e.hasOwnProperty("id")&&(n.id=e.id),e.uuid!=null&&e.hasOwnProperty("uuid")&&(n.uuid=t.bytes===String?f.base64.encode(e.uuid,0,e.uuid.length):t.bytes===Array?Array.prototype.slice.call(e.uuid):e.uuid),e.pk!=null&&e.hasOwnProperty("pk")&&(n.pk=t.bytes===String?f.base64.encode(e.pk,0,e.pk.length):t.bytes===Array?Array.prototype.slice.call(e.pk):e.pk),e.old_id!=null&&e.hasOwnProperty("old_id")&&(n.old_id=e.old_id),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.RegisterPk"},i}(),p.RegisterPkResponse=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.result=0,i.prototype.keep_alive=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.result!=null&&Object.hasOwnProperty.call(e,"result")&&t.uint32(8).int32(e.result),e.keep_alive!=null&&Object.hasOwnProperty.call(e,"keep_alive")&&t.uint32(16).int32(e.keep_alive),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.RegisterPkResponse;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.result=e.int32();break}case 2:{d.keep_alive=e.int32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.result!=null&&e.hasOwnProperty("result"))switch(e.result){default:return"result: enum value expected";case 0:case 2:case 3:case 4:case 5:case 6:case 7:break}return e.keep_alive!=null&&e.hasOwnProperty("keep_alive")&&!f.isInteger(e.keep_alive)?"keep_alive: integer expected":null},i.fromObject=function(e,t){if(e instanceof u.hbb.RegisterPkResponse)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.RegisterPkResponse;switch(e.result){default:if(typeof e.result=="number"){n.result=e.result;break}break;case"OK":case 0:n.result=0;break;case"UUID_MISMATCH":case 2:n.result=2;break;case"ID_EXISTS":case 3:n.result=3;break;case"TOO_FREQUENT":case 4:n.result=4;break;case"INVALID_ID_FORMAT":case 5:n.result=5;break;case"NOT_SUPPORT":case 6:n.result=6;break;case"SERVER_ERROR":case 7:n.result=7;break}return e.keep_alive!=null&&(n.keep_alive=e.keep_alive|0),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.result=t.enums===String?"OK":0,n.keep_alive=0),e.result!=null&&e.hasOwnProperty("result")&&(n.result=t.enums===String?u.hbb.RegisterPkResponse.Result[e.result]===void 0?e.result:u.hbb.RegisterPkResponse.Result[e.result]:e.result),e.keep_alive!=null&&e.hasOwnProperty("keep_alive")&&(n.keep_alive=e.keep_alive),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.RegisterPkResponse"},i.Result=function(){let o={},e=Object.create(o);return e[o[0]="OK"]=0,e[o[2]="UUID_MISMATCH"]=2,e[o[3]="ID_EXISTS"]=3,e[o[4]="TOO_FREQUENT"]=4,e[o[5]="INVALID_ID_FORMAT"]=5,e[o[6]="NOT_SUPPORT"]=6,e[o[7]="SERVER_ERROR"]=7,e}(),i}(),p.PunchHoleResponse=function(){function i(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)e[t[n]]!=null&&t[n]!=="__proto__"&&(this[t[n]]=e[t[n]])}i.prototype.socket_addr=f.newBuffer([]),i.prototype.pk=f.newBuffer([]),i.prototype.failure=0,i.prototype.relay_server="",i.prototype.nat_type=null,i.prototype.is_local=null,i.prototype.other_failure="",i.prototype.feedback=0;let o;return Object.defineProperty(i.prototype,"union",{get:f.oneOfGetter(o=["nat_type","is_local"]),set:f.oneOfSetter(o)}),i.create=function(t){return new i(t)},i.encode=function(t,n){return n||(n=E.create()),t.socket_addr!=null&&Object.hasOwnProperty.call(t,"socket_addr")&&n.uint32(10).bytes(t.socket_addr),t.pk!=null&&Object.hasOwnProperty.call(t,"pk")&&n.uint32(18).bytes(t.pk),t.failure!=null&&Object.hasOwnProperty.call(t,"failure")&&n.uint32(24).int32(t.failure),t.relay_server!=null&&Object.hasOwnProperty.call(t,"relay_server")&&n.uint32(34).string(t.relay_server),t.nat_type!=null&&Object.hasOwnProperty.call(t,"nat_type")&&n.uint32(40).int32(t.nat_type),t.is_local!=null&&Object.hasOwnProperty.call(t,"is_local")&&n.uint32(48).bool(t.is_local),t.other_failure!=null&&Object.hasOwnProperty.call(t,"other_failure")&&n.uint32(58).string(t.other_failure),t.feedback!=null&&Object.hasOwnProperty.call(t,"feedback")&&n.uint32(64).int32(t.feedback),n},i.encodeDelimited=function(t,n){return this.encode(t,n).ldelim()},i.decode=function(t,n,r,l){if(t instanceof s||(t=s.create(t)),l===void 0&&(l=0),l>s.recursionLimit)throw Error("maximum nesting depth exceeded");let d=n===void 0?t.len:t.pos+n,c=new u.hbb.PunchHoleResponse;for(;t.pos<d;){let w=t.uint32();if(w===r)break;switch(w>>>3){case 1:{c.socket_addr=t.bytes();break}case 2:{c.pk=t.bytes();break}case 3:{c.failure=t.int32();break}case 4:{c.relay_server=t.string();break}case 5:{c.nat_type=t.int32();break}case 6:{c.is_local=t.bool();break}case 7:{c.other_failure=t.string();break}case 8:{c.feedback=t.int32();break}default:t.skipType(w&7,l);break}}return c},i.decodeDelimited=function(t){return t instanceof s||(t=new s(t)),this.decode(t,t.uint32())},i.verify=function(t,n){if(typeof t!="object"||t===null)return"object expected";if(n===void 0&&(n=0),n>f.recursionLimit)return"maximum nesting depth exceeded";let r={};if(t.socket_addr!=null&&t.hasOwnProperty("socket_addr")&&!(t.socket_addr&&typeof t.socket_addr.length=="number"||f.isString(t.socket_addr)))return"socket_addr: buffer expected";if(t.pk!=null&&t.hasOwnProperty("pk")&&!(t.pk&&typeof t.pk.length=="number"||f.isString(t.pk)))return"pk: buffer expected";if(t.failure!=null&&t.hasOwnProperty("failure"))switch(t.failure){default:return"failure: enum value expected";case 0:case 2:case 3:case 4:break}if(t.relay_server!=null&&t.hasOwnProperty("relay_server")&&!f.isString(t.relay_server))return"relay_server: string expected";if(t.nat_type!=null&&t.hasOwnProperty("nat_type"))switch(r.union=1,t.nat_type){default:return"nat_type: enum value expected";case 0:case 1:case 2:break}if(t.is_local!=null&&t.hasOwnProperty("is_local")){if(r.union===1)return"union: multiple values";if(r.union=1,typeof t.is_local!="boolean")return"is_local: boolean expected"}return t.other_failure!=null&&t.hasOwnProperty("other_failure")&&!f.isString(t.other_failure)?"other_failure: string expected":t.feedback!=null&&t.hasOwnProperty("feedback")&&!f.isInteger(t.feedback)?"feedback: integer expected":null},i.fromObject=function(t,n){if(t instanceof u.hbb.PunchHoleResponse)return t;if(n===void 0&&(n=0),n>f.recursionLimit)throw Error("maximum nesting depth exceeded");let r=new u.hbb.PunchHoleResponse;switch(t.socket_addr!=null&&(typeof t.socket_addr=="string"?f.base64.decode(t.socket_addr,r.socket_addr=f.newBuffer(f.base64.length(t.socket_addr)),0):t.socket_addr.length>=0&&(r.socket_addr=t.socket_addr)),t.pk!=null&&(typeof t.pk=="string"?f.base64.decode(t.pk,r.pk=f.newBuffer(f.base64.length(t.pk)),0):t.pk.length>=0&&(r.pk=t.pk)),t.failure){default:if(typeof t.failure=="number"){r.failure=t.failure;break}break;case"ID_NOT_EXIST":case 0:r.failure=0;break;case"OFFLINE":case 2:r.failure=2;break;case"LICENSE_MISMATCH":case 3:r.failure=3;break;case"LICENSE_OVERUSE":case 4:r.failure=4;break}switch(t.relay_server!=null&&(r.relay_server=String(t.relay_server)),t.nat_type){default:if(typeof t.nat_type=="number"){r.nat_type=t.nat_type;break}break;case"UNKNOWN_NAT":case 0:r.nat_type=0;break;case"ASYMMETRIC":case 1:r.nat_type=1;break;case"SYMMETRIC":case 2:r.nat_type=2;break}return t.is_local!=null&&(r.is_local=!!t.is_local),t.other_failure!=null&&(r.other_failure=String(t.other_failure)),t.feedback!=null&&(r.feedback=t.feedback|0),r},i.toObject=function(t,n){n||(n={});let r={};return n.defaults&&(n.bytes===String?r.socket_addr="":(r.socket_addr=[],n.bytes!==Array&&(r.socket_addr=f.newBuffer(r.socket_addr))),n.bytes===String?r.pk="":(r.pk=[],n.bytes!==Array&&(r.pk=f.newBuffer(r.pk))),r.failure=n.enums===String?"ID_NOT_EXIST":0,r.relay_server="",r.other_failure="",r.feedback=0),t.socket_addr!=null&&t.hasOwnProperty("socket_addr")&&(r.socket_addr=n.bytes===String?f.base64.encode(t.socket_addr,0,t.socket_addr.length):n.bytes===Array?Array.prototype.slice.call(t.socket_addr):t.socket_addr),t.pk!=null&&t.hasOwnProperty("pk")&&(r.pk=n.bytes===String?f.base64.encode(t.pk,0,t.pk.length):n.bytes===Array?Array.prototype.slice.call(t.pk):t.pk),t.failure!=null&&t.hasOwnProperty("failure")&&(r.failure=n.enums===String?u.hbb.PunchHoleResponse.Failure[t.failure]===void 0?t.failure:u.hbb.PunchHoleResponse.Failure[t.failure]:t.failure),t.relay_server!=null&&t.hasOwnProperty("relay_server")&&(r.relay_server=t.relay_server),t.nat_type!=null&&t.hasOwnProperty("nat_type")&&(r.nat_type=n.enums===String?u.hbb.NatType[t.nat_type]===void 0?t.nat_type:u.hbb.NatType[t.nat_type]:t.nat_type,n.oneofs&&(r.union="nat_type")),t.is_local!=null&&t.hasOwnProperty("is_local")&&(r.is_local=t.is_local,n.oneofs&&(r.union="is_local")),t.other_failure!=null&&t.hasOwnProperty("other_failure")&&(r.other_failure=t.other_failure),t.feedback!=null&&t.hasOwnProperty("feedback")&&(r.feedback=t.feedback),r},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/hbb.PunchHoleResponse"},i.Failure=function(){let e={},t=Object.create(e);return t[e[0]="ID_NOT_EXIST"]=0,t[e[2]="OFFLINE"]=2,t[e[3]="LICENSE_MISMATCH"]=3,t[e[4]="LICENSE_OVERUSE"]=4,t}(),i}(),p.ConfigUpdate=function(){function i(o){if(this.rendezvous_servers=[],o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.serial=0,i.prototype.rendezvous_servers=f.emptyArray,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=E.create()),e.serial!=null&&Object.hasOwnProperty.call(e,"serial")&&t.uint32(8).int32(e.serial),e.rendezvous_servers!=null&&e.rendezvous_servers.length)for(let n=0;n<e.rendezvous_servers.length;++n)t.uint32(18).string(e.rendezvous_servers[n]);return t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.ConfigUpdate;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.serial=e.int32();break}case 2:{d.rendezvous_servers&&d.rendezvous_servers.length||(d.rendezvous_servers=[]),d.rendezvous_servers.push(e.string());break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.serial!=null&&e.hasOwnProperty("serial")&&!f.isInteger(e.serial))return"serial: integer expected";if(e.rendezvous_servers!=null&&e.hasOwnProperty("rendezvous_servers")){if(!Array.isArray(e.rendezvous_servers))return"rendezvous_servers: array expected";for(let n=0;n<e.rendezvous_servers.length;++n)if(!f.isString(e.rendezvous_servers[n]))return"rendezvous_servers: string[] expected"}return null},i.fromObject=function(e,t){if(e instanceof u.hbb.ConfigUpdate)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.ConfigUpdate;if(e.serial!=null&&(n.serial=e.serial|0),e.rendezvous_servers){if(!Array.isArray(e.rendezvous_servers))throw TypeError(".hbb.ConfigUpdate.rendezvous_servers: array expected");n.rendezvous_servers=[];for(let r=0;r<e.rendezvous_servers.length;++r)n.rendezvous_servers[r]=String(e.rendezvous_servers[r])}return n},i.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.rendezvous_servers=[]),t.defaults&&(n.serial=0),e.serial!=null&&e.hasOwnProperty("serial")&&(n.serial=e.serial),e.rendezvous_servers&&e.rendezvous_servers.length){n.rendezvous_servers=[];for(let r=0;r<e.rendezvous_servers.length;++r)n.rendezvous_servers[r]=e.rendezvous_servers[r]}return n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.ConfigUpdate"},i}(),p.RequestRelay=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.id="",i.prototype.uuid="",i.prototype.socket_addr=f.newBuffer([]),i.prototype.relay_server="",i.prototype.secure=!1,i.prototype.licence_key="",i.prototype.conn_type=0,i.prototype.token="",i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),e.uuid!=null&&Object.hasOwnProperty.call(e,"uuid")&&t.uint32(18).string(e.uuid),e.socket_addr!=null&&Object.hasOwnProperty.call(e,"socket_addr")&&t.uint32(26).bytes(e.socket_addr),e.relay_server!=null&&Object.hasOwnProperty.call(e,"relay_server")&&t.uint32(34).string(e.relay_server),e.secure!=null&&Object.hasOwnProperty.call(e,"secure")&&t.uint32(40).bool(e.secure),e.licence_key!=null&&Object.hasOwnProperty.call(e,"licence_key")&&t.uint32(50).string(e.licence_key),e.conn_type!=null&&Object.hasOwnProperty.call(e,"conn_type")&&t.uint32(56).int32(e.conn_type),e.token!=null&&Object.hasOwnProperty.call(e,"token")&&t.uint32(66).string(e.token),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.RequestRelay;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.id=e.string();break}case 2:{d.uuid=e.string();break}case 3:{d.socket_addr=e.bytes();break}case 4:{d.relay_server=e.string();break}case 5:{d.secure=e.bool();break}case 6:{d.licence_key=e.string();break}case 7:{d.conn_type=e.int32();break}case 8:{d.token=e.string();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.id!=null&&e.hasOwnProperty("id")&&!f.isString(e.id))return"id: string expected";if(e.uuid!=null&&e.hasOwnProperty("uuid")&&!f.isString(e.uuid))return"uuid: string expected";if(e.socket_addr!=null&&e.hasOwnProperty("socket_addr")&&!(e.socket_addr&&typeof e.socket_addr.length=="number"||f.isString(e.socket_addr)))return"socket_addr: buffer expected";if(e.relay_server!=null&&e.hasOwnProperty("relay_server")&&!f.isString(e.relay_server))return"relay_server: string expected";if(e.secure!=null&&e.hasOwnProperty("secure")&&typeof e.secure!="boolean")return"secure: boolean expected";if(e.licence_key!=null&&e.hasOwnProperty("licence_key")&&!f.isString(e.licence_key))return"licence_key: string expected";if(e.conn_type!=null&&e.hasOwnProperty("conn_type"))switch(e.conn_type){default:return"conn_type: enum value expected";case 0:case 1:case 2:case 3:case 4:break}return e.token!=null&&e.hasOwnProperty("token")&&!f.isString(e.token)?"token: string expected":null},i.fromObject=function(e,t){if(e instanceof u.hbb.RequestRelay)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.RequestRelay;switch(e.id!=null&&(n.id=String(e.id)),e.uuid!=null&&(n.uuid=String(e.uuid)),e.socket_addr!=null&&(typeof e.socket_addr=="string"?f.base64.decode(e.socket_addr,n.socket_addr=f.newBuffer(f.base64.length(e.socket_addr)),0):e.socket_addr.length>=0&&(n.socket_addr=e.socket_addr)),e.relay_server!=null&&(n.relay_server=String(e.relay_server)),e.secure!=null&&(n.secure=!!e.secure),e.licence_key!=null&&(n.licence_key=String(e.licence_key)),e.conn_type){default:if(typeof e.conn_type=="number"){n.conn_type=e.conn_type;break}break;case"DEFAULT_CONN":case 0:n.conn_type=0;break;case"FILE_TRANSFER":case 1:n.conn_type=1;break;case"PORT_FORWARD":case 2:n.conn_type=2;break;case"RDP":case 3:n.conn_type=3;break;case"VIEW_CAMERA":case 4:n.conn_type=4;break}return e.token!=null&&(n.token=String(e.token)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.id="",n.uuid="",t.bytes===String?n.socket_addr="":(n.socket_addr=[],t.bytes!==Array&&(n.socket_addr=f.newBuffer(n.socket_addr))),n.relay_server="",n.secure=!1,n.licence_key="",n.conn_type=t.enums===String?"DEFAULT_CONN":0,n.token=""),e.id!=null&&e.hasOwnProperty("id")&&(n.id=e.id),e.uuid!=null&&e.hasOwnProperty("uuid")&&(n.uuid=e.uuid),e.socket_addr!=null&&e.hasOwnProperty("socket_addr")&&(n.socket_addr=t.bytes===String?f.base64.encode(e.socket_addr,0,e.socket_addr.length):t.bytes===Array?Array.prototype.slice.call(e.socket_addr):e.socket_addr),e.relay_server!=null&&e.hasOwnProperty("relay_server")&&(n.relay_server=e.relay_server),e.secure!=null&&e.hasOwnProperty("secure")&&(n.secure=e.secure),e.licence_key!=null&&e.hasOwnProperty("licence_key")&&(n.licence_key=e.licence_key),e.conn_type!=null&&e.hasOwnProperty("conn_type")&&(n.conn_type=t.enums===String?u.hbb.ConnType[e.conn_type]===void 0?e.conn_type:u.hbb.ConnType[e.conn_type]:e.conn_type),e.token!=null&&e.hasOwnProperty("token")&&(n.token=e.token),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.RequestRelay"},i}(),p.RelayResponse=function(){function i(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)e[t[n]]!=null&&t[n]!=="__proto__"&&(this[t[n]]=e[t[n]])}i.prototype.socket_addr=f.newBuffer([]),i.prototype.uuid="",i.prototype.relay_server="",i.prototype.id=null,i.prototype.pk=null,i.prototype.refuse_reason="",i.prototype.version="",i.prototype.feedback=0;let o;return Object.defineProperty(i.prototype,"union",{get:f.oneOfGetter(o=["id","pk"]),set:f.oneOfSetter(o)}),i.create=function(t){return new i(t)},i.encode=function(t,n){return n||(n=E.create()),t.socket_addr!=null&&Object.hasOwnProperty.call(t,"socket_addr")&&n.uint32(10).bytes(t.socket_addr),t.uuid!=null&&Object.hasOwnProperty.call(t,"uuid")&&n.uint32(18).string(t.uuid),t.relay_server!=null&&Object.hasOwnProperty.call(t,"relay_server")&&n.uint32(26).string(t.relay_server),t.id!=null&&Object.hasOwnProperty.call(t,"id")&&n.uint32(34).string(t.id),t.pk!=null&&Object.hasOwnProperty.call(t,"pk")&&n.uint32(42).bytes(t.pk),t.refuse_reason!=null&&Object.hasOwnProperty.call(t,"refuse_reason")&&n.uint32(50).string(t.refuse_reason),t.version!=null&&Object.hasOwnProperty.call(t,"version")&&n.uint32(58).string(t.version),t.feedback!=null&&Object.hasOwnProperty.call(t,"feedback")&&n.uint32(72).int32(t.feedback),n},i.encodeDelimited=function(t,n){return this.encode(t,n).ldelim()},i.decode=function(t,n,r,l){if(t instanceof s||(t=s.create(t)),l===void 0&&(l=0),l>s.recursionLimit)throw Error("maximum nesting depth exceeded");let d=n===void 0?t.len:t.pos+n,c=new u.hbb.RelayResponse;for(;t.pos<d;){let w=t.uint32();if(w===r)break;switch(w>>>3){case 1:{c.socket_addr=t.bytes();break}case 2:{c.uuid=t.string();break}case 3:{c.relay_server=t.string();break}case 4:{c.id=t.string();break}case 5:{c.pk=t.bytes();break}case 6:{c.refuse_reason=t.string();break}case 7:{c.version=t.string();break}case 9:{c.feedback=t.int32();break}default:t.skipType(w&7,l);break}}return c},i.decodeDelimited=function(t){return t instanceof s||(t=new s(t)),this.decode(t,t.uint32())},i.verify=function(t,n){if(typeof t!="object"||t===null)return"object expected";if(n===void 0&&(n=0),n>f.recursionLimit)return"maximum nesting depth exceeded";let r={};if(t.socket_addr!=null&&t.hasOwnProperty("socket_addr")&&!(t.socket_addr&&typeof t.socket_addr.length=="number"||f.isString(t.socket_addr)))return"socket_addr: buffer expected";if(t.uuid!=null&&t.hasOwnProperty("uuid")&&!f.isString(t.uuid))return"uuid: string expected";if(t.relay_server!=null&&t.hasOwnProperty("relay_server")&&!f.isString(t.relay_server))return"relay_server: string expected";if(t.id!=null&&t.hasOwnProperty("id")&&(r.union=1,!f.isString(t.id)))return"id: string expected";if(t.pk!=null&&t.hasOwnProperty("pk")){if(r.union===1)return"union: multiple values";if(r.union=1,!(t.pk&&typeof t.pk.length=="number"||f.isString(t.pk)))return"pk: buffer expected"}return t.refuse_reason!=null&&t.hasOwnProperty("refuse_reason")&&!f.isString(t.refuse_reason)?"refuse_reason: string expected":t.version!=null&&t.hasOwnProperty("version")&&!f.isString(t.version)?"version: string expected":t.feedback!=null&&t.hasOwnProperty("feedback")&&!f.isInteger(t.feedback)?"feedback: integer expected":null},i.fromObject=function(t,n){if(t instanceof u.hbb.RelayResponse)return t;if(n===void 0&&(n=0),n>f.recursionLimit)throw Error("maximum nesting depth exceeded");let r=new u.hbb.RelayResponse;return t.socket_addr!=null&&(typeof t.socket_addr=="string"?f.base64.decode(t.socket_addr,r.socket_addr=f.newBuffer(f.base64.length(t.socket_addr)),0):t.socket_addr.length>=0&&(r.socket_addr=t.socket_addr)),t.uuid!=null&&(r.uuid=String(t.uuid)),t.relay_server!=null&&(r.relay_server=String(t.relay_server)),t.id!=null&&(r.id=String(t.id)),t.pk!=null&&(typeof t.pk=="string"?f.base64.decode(t.pk,r.pk=f.newBuffer(f.base64.length(t.pk)),0):t.pk.length>=0&&(r.pk=t.pk)),t.refuse_reason!=null&&(r.refuse_reason=String(t.refuse_reason)),t.version!=null&&(r.version=String(t.version)),t.feedback!=null&&(r.feedback=t.feedback|0),r},i.toObject=function(t,n){n||(n={});let r={};return n.defaults&&(n.bytes===String?r.socket_addr="":(r.socket_addr=[],n.bytes!==Array&&(r.socket_addr=f.newBuffer(r.socket_addr))),r.uuid="",r.relay_server="",r.refuse_reason="",r.version="",r.feedback=0),t.socket_addr!=null&&t.hasOwnProperty("socket_addr")&&(r.socket_addr=n.bytes===String?f.base64.encode(t.socket_addr,0,t.socket_addr.length):n.bytes===Array?Array.prototype.slice.call(t.socket_addr):t.socket_addr),t.uuid!=null&&t.hasOwnProperty("uuid")&&(r.uuid=t.uuid),t.relay_server!=null&&t.hasOwnProperty("relay_server")&&(r.relay_server=t.relay_server),t.id!=null&&t.hasOwnProperty("id")&&(r.id=t.id,n.oneofs&&(r.union="id")),t.pk!=null&&t.hasOwnProperty("pk")&&(r.pk=n.bytes===String?f.base64.encode(t.pk,0,t.pk.length):n.bytes===Array?Array.prototype.slice.call(t.pk):t.pk,n.oneofs&&(r.union="pk")),t.refuse_reason!=null&&t.hasOwnProperty("refuse_reason")&&(r.refuse_reason=t.refuse_reason),t.version!=null&&t.hasOwnProperty("version")&&(r.version=t.version),t.feedback!=null&&t.hasOwnProperty("feedback")&&(r.feedback=t.feedback),r},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/hbb.RelayResponse"},i}(),p.SoftwareUpdate=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.url="",i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.url!=null&&Object.hasOwnProperty.call(e,"url")&&t.uint32(10).string(e.url),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.SoftwareUpdate;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.url=e.string();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.url!=null&&e.hasOwnProperty("url")&&!f.isString(e.url)?"url: string expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.SoftwareUpdate)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.SoftwareUpdate;return e.url!=null&&(n.url=String(e.url)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.url=""),e.url!=null&&e.hasOwnProperty("url")&&(n.url=e.url),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.SoftwareUpdate"},i}(),p.FetchLocalAddr=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.socket_addr=f.newBuffer([]),i.prototype.relay_server="",i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.socket_addr!=null&&Object.hasOwnProperty.call(e,"socket_addr")&&t.uint32(10).bytes(e.socket_addr),e.relay_server!=null&&Object.hasOwnProperty.call(e,"relay_server")&&t.uint32(18).string(e.relay_server),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.FetchLocalAddr;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.socket_addr=e.bytes();break}case 2:{d.relay_server=e.string();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.socket_addr!=null&&e.hasOwnProperty("socket_addr")&&!(e.socket_addr&&typeof e.socket_addr.length=="number"||f.isString(e.socket_addr))?"socket_addr: buffer expected":e.relay_server!=null&&e.hasOwnProperty("relay_server")&&!f.isString(e.relay_server)?"relay_server: string expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.FetchLocalAddr)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.FetchLocalAddr;return e.socket_addr!=null&&(typeof e.socket_addr=="string"?f.base64.decode(e.socket_addr,n.socket_addr=f.newBuffer(f.base64.length(e.socket_addr)),0):e.socket_addr.length>=0&&(n.socket_addr=e.socket_addr)),e.relay_server!=null&&(n.relay_server=String(e.relay_server)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(t.bytes===String?n.socket_addr="":(n.socket_addr=[],t.bytes!==Array&&(n.socket_addr=f.newBuffer(n.socket_addr))),n.relay_server=""),e.socket_addr!=null&&e.hasOwnProperty("socket_addr")&&(n.socket_addr=t.bytes===String?f.base64.encode(e.socket_addr,0,e.socket_addr.length):t.bytes===Array?Array.prototype.slice.call(e.socket_addr):e.socket_addr),e.relay_server!=null&&e.hasOwnProperty("relay_server")&&(n.relay_server=e.relay_server),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.FetchLocalAddr"},i}(),p.LocalAddr=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.socket_addr=f.newBuffer([]),i.prototype.local_addr=f.newBuffer([]),i.prototype.relay_server="",i.prototype.id="",i.prototype.version="",i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.socket_addr!=null&&Object.hasOwnProperty.call(e,"socket_addr")&&t.uint32(10).bytes(e.socket_addr),e.local_addr!=null&&Object.hasOwnProperty.call(e,"local_addr")&&t.uint32(18).bytes(e.local_addr),e.relay_server!=null&&Object.hasOwnProperty.call(e,"relay_server")&&t.uint32(26).string(e.relay_server),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(34).string(e.id),e.version!=null&&Object.hasOwnProperty.call(e,"version")&&t.uint32(42).string(e.version),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.LocalAddr;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.socket_addr=e.bytes();break}case 2:{d.local_addr=e.bytes();break}case 3:{d.relay_server=e.string();break}case 4:{d.id=e.string();break}case 5:{d.version=e.string();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.socket_addr!=null&&e.hasOwnProperty("socket_addr")&&!(e.socket_addr&&typeof e.socket_addr.length=="number"||f.isString(e.socket_addr))?"socket_addr: buffer expected":e.local_addr!=null&&e.hasOwnProperty("local_addr")&&!(e.local_addr&&typeof e.local_addr.length=="number"||f.isString(e.local_addr))?"local_addr: buffer expected":e.relay_server!=null&&e.hasOwnProperty("relay_server")&&!f.isString(e.relay_server)?"relay_server: string expected":e.id!=null&&e.hasOwnProperty("id")&&!f.isString(e.id)?"id: string expected":e.version!=null&&e.hasOwnProperty("version")&&!f.isString(e.version)?"version: string expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.LocalAddr)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.LocalAddr;return e.socket_addr!=null&&(typeof e.socket_addr=="string"?f.base64.decode(e.socket_addr,n.socket_addr=f.newBuffer(f.base64.length(e.socket_addr)),0):e.socket_addr.length>=0&&(n.socket_addr=e.socket_addr)),e.local_addr!=null&&(typeof e.local_addr=="string"?f.base64.decode(e.local_addr,n.local_addr=f.newBuffer(f.base64.length(e.local_addr)),0):e.local_addr.length>=0&&(n.local_addr=e.local_addr)),e.relay_server!=null&&(n.relay_server=String(e.relay_server)),e.id!=null&&(n.id=String(e.id)),e.version!=null&&(n.version=String(e.version)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(t.bytes===String?n.socket_addr="":(n.socket_addr=[],t.bytes!==Array&&(n.socket_addr=f.newBuffer(n.socket_addr))),t.bytes===String?n.local_addr="":(n.local_addr=[],t.bytes!==Array&&(n.local_addr=f.newBuffer(n.local_addr))),n.relay_server="",n.id="",n.version=""),e.socket_addr!=null&&e.hasOwnProperty("socket_addr")&&(n.socket_addr=t.bytes===String?f.base64.encode(e.socket_addr,0,e.socket_addr.length):t.bytes===Array?Array.prototype.slice.call(e.socket_addr):e.socket_addr),e.local_addr!=null&&e.hasOwnProperty("local_addr")&&(n.local_addr=t.bytes===String?f.base64.encode(e.local_addr,0,e.local_addr.length):t.bytes===Array?Array.prototype.slice.call(e.local_addr):e.local_addr),e.relay_server!=null&&e.hasOwnProperty("relay_server")&&(n.relay_server=e.relay_server),e.id!=null&&e.hasOwnProperty("id")&&(n.id=e.id),e.version!=null&&e.hasOwnProperty("version")&&(n.version=e.version),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.LocalAddr"},i}(),p.PeerDiscovery=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.cmd="",i.prototype.mac="",i.prototype.id="",i.prototype.username="",i.prototype.hostname="",i.prototype.platform="",i.prototype.misc="",i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.cmd!=null&&Object.hasOwnProperty.call(e,"cmd")&&t.uint32(10).string(e.cmd),e.mac!=null&&Object.hasOwnProperty.call(e,"mac")&&t.uint32(18).string(e.mac),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(26).string(e.id),e.username!=null&&Object.hasOwnProperty.call(e,"username")&&t.uint32(34).string(e.username),e.hostname!=null&&Object.hasOwnProperty.call(e,"hostname")&&t.uint32(42).string(e.hostname),e.platform!=null&&Object.hasOwnProperty.call(e,"platform")&&t.uint32(50).string(e.platform),e.misc!=null&&Object.hasOwnProperty.call(e,"misc")&&t.uint32(58).string(e.misc),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.PeerDiscovery;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.cmd=e.string();break}case 2:{d.mac=e.string();break}case 3:{d.id=e.string();break}case 4:{d.username=e.string();break}case 5:{d.hostname=e.string();break}case 6:{d.platform=e.string();break}case 7:{d.misc=e.string();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.cmd!=null&&e.hasOwnProperty("cmd")&&!f.isString(e.cmd)?"cmd: string expected":e.mac!=null&&e.hasOwnProperty("mac")&&!f.isString(e.mac)?"mac: string expected":e.id!=null&&e.hasOwnProperty("id")&&!f.isString(e.id)?"id: string expected":e.username!=null&&e.hasOwnProperty("username")&&!f.isString(e.username)?"username: string expected":e.hostname!=null&&e.hasOwnProperty("hostname")&&!f.isString(e.hostname)?"hostname: string expected":e.platform!=null&&e.hasOwnProperty("platform")&&!f.isString(e.platform)?"platform: string expected":e.misc!=null&&e.hasOwnProperty("misc")&&!f.isString(e.misc)?"misc: string expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.PeerDiscovery)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.PeerDiscovery;return e.cmd!=null&&(n.cmd=String(e.cmd)),e.mac!=null&&(n.mac=String(e.mac)),e.id!=null&&(n.id=String(e.id)),e.username!=null&&(n.username=String(e.username)),e.hostname!=null&&(n.hostname=String(e.hostname)),e.platform!=null&&(n.platform=String(e.platform)),e.misc!=null&&(n.misc=String(e.misc)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.cmd="",n.mac="",n.id="",n.username="",n.hostname="",n.platform="",n.misc=""),e.cmd!=null&&e.hasOwnProperty("cmd")&&(n.cmd=e.cmd),e.mac!=null&&e.hasOwnProperty("mac")&&(n.mac=e.mac),e.id!=null&&e.hasOwnProperty("id")&&(n.id=e.id),e.username!=null&&e.hasOwnProperty("username")&&(n.username=e.username),e.hostname!=null&&e.hasOwnProperty("hostname")&&(n.hostname=e.hostname),e.platform!=null&&e.hasOwnProperty("platform")&&(n.platform=e.platform),e.misc!=null&&e.hasOwnProperty("misc")&&(n.misc=e.misc),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.PeerDiscovery"},i}(),p.OnlineRequest=function(){function i(o){if(this.peers=[],o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.id="",i.prototype.peers=f.emptyArray,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=E.create()),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),e.peers!=null&&e.peers.length)for(let n=0;n<e.peers.length;++n)t.uint32(18).string(e.peers[n]);return t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.OnlineRequest;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.id=e.string();break}case 2:{d.peers&&d.peers.length||(d.peers=[]),d.peers.push(e.string());break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.id!=null&&e.hasOwnProperty("id")&&!f.isString(e.id))return"id: string expected";if(e.peers!=null&&e.hasOwnProperty("peers")){if(!Array.isArray(e.peers))return"peers: array expected";for(let n=0;n<e.peers.length;++n)if(!f.isString(e.peers[n]))return"peers: string[] expected"}return null},i.fromObject=function(e,t){if(e instanceof u.hbb.OnlineRequest)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.OnlineRequest;if(e.id!=null&&(n.id=String(e.id)),e.peers){if(!Array.isArray(e.peers))throw TypeError(".hbb.OnlineRequest.peers: array expected");n.peers=[];for(let r=0;r<e.peers.length;++r)n.peers[r]=String(e.peers[r])}return n},i.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.peers=[]),t.defaults&&(n.id=""),e.id!=null&&e.hasOwnProperty("id")&&(n.id=e.id),e.peers&&e.peers.length){n.peers=[];for(let r=0;r<e.peers.length;++r)n.peers[r]=e.peers[r]}return n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.OnlineRequest"},i}(),p.OnlineResponse=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.states=f.newBuffer([]),i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.states!=null&&Object.hasOwnProperty.call(e,"states")&&t.uint32(10).bytes(e.states),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.OnlineResponse;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.states=e.bytes();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.states!=null&&e.hasOwnProperty("states")&&!(e.states&&typeof e.states.length=="number"||f.isString(e.states))?"states: buffer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.OnlineResponse)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.OnlineResponse;return e.states!=null&&(typeof e.states=="string"?f.base64.decode(e.states,n.states=f.newBuffer(f.base64.length(e.states)),0):e.states.length>=0&&(n.states=e.states)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(t.bytes===String?n.states="":(n.states=[],t.bytes!==Array&&(n.states=f.newBuffer(n.states)))),e.states!=null&&e.hasOwnProperty("states")&&(n.states=t.bytes===String?f.base64.encode(e.states,0,e.states.length):t.bytes===Array?Array.prototype.slice.call(e.states):e.states),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.OnlineResponse"},i}(),p.KeyExchange=function(){function i(o){if(this.keys=[],o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.keys=f.emptyArray,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=E.create()),e.keys!=null&&e.keys.length)for(let n=0;n<e.keys.length;++n)t.uint32(10).bytes(e.keys[n]);return t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.KeyExchange;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.keys&&d.keys.length||(d.keys=[]),d.keys.push(e.bytes());break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.keys!=null&&e.hasOwnProperty("keys")){if(!Array.isArray(e.keys))return"keys: array expected";for(let n=0;n<e.keys.length;++n)if(!(e.keys[n]&&typeof e.keys[n].length=="number"||f.isString(e.keys[n])))return"keys: buffer[] expected"}return null},i.fromObject=function(e,t){if(e instanceof u.hbb.KeyExchange)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.KeyExchange;if(e.keys){if(!Array.isArray(e.keys))throw TypeError(".hbb.KeyExchange.keys: array expected");n.keys=[];for(let r=0;r<e.keys.length;++r)typeof e.keys[r]=="string"?f.base64.decode(e.keys[r],n.keys[r]=f.newBuffer(f.base64.length(e.keys[r])),0):e.keys[r].length>=0&&(n.keys[r]=e.keys[r])}return n},i.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.keys=[]),e.keys&&e.keys.length){n.keys=[];for(let r=0;r<e.keys.length;++r)n.keys[r]=t.bytes===String?f.base64.encode(e.keys[r],0,e.keys[r].length):t.bytes===Array?Array.prototype.slice.call(e.keys[r]):e.keys[r]}return n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.KeyExchange"},i}(),p.HealthCheck=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.token="",i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.token!=null&&Object.hasOwnProperty.call(e,"token")&&t.uint32(10).string(e.token),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.HealthCheck;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.token=e.string();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.token!=null&&e.hasOwnProperty("token")&&!f.isString(e.token)?"token: string expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.HealthCheck)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.HealthCheck;return e.token!=null&&(n.token=String(e.token)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.token=""),e.token!=null&&e.hasOwnProperty("token")&&(n.token=e.token),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.HealthCheck"},i}(),p.HeaderEntry=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.name="",i.prototype.value="",i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),e.value!=null&&Object.hasOwnProperty.call(e,"value")&&t.uint32(18).string(e.value),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.HeaderEntry;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.name=e.string();break}case 2:{d.value=e.string();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.name!=null&&e.hasOwnProperty("name")&&!f.isString(e.name)?"name: string expected":e.value!=null&&e.hasOwnProperty("value")&&!f.isString(e.value)?"value: string expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.HeaderEntry)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.HeaderEntry;return e.name!=null&&(n.name=String(e.name)),e.value!=null&&(n.value=String(e.value)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.name="",n.value=""),e.name!=null&&e.hasOwnProperty("name")&&(n.name=e.name),e.value!=null&&e.hasOwnProperty("value")&&(n.value=e.value),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.HeaderEntry"},i}(),p.HttpProxyRequest=function(){function i(o){if(this.headers=[],o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.method="",i.prototype.path="",i.prototype.headers=f.emptyArray,i.prototype.body=f.newBuffer([]),i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=E.create()),e.method!=null&&Object.hasOwnProperty.call(e,"method")&&t.uint32(10).string(e.method),e.path!=null&&Object.hasOwnProperty.call(e,"path")&&t.uint32(18).string(e.path),e.headers!=null&&e.headers.length)for(let n=0;n<e.headers.length;++n)u.hbb.HeaderEntry.encode(e.headers[n],t.uint32(26).fork()).ldelim();return e.body!=null&&Object.hasOwnProperty.call(e,"body")&&t.uint32(34).bytes(e.body),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.HttpProxyRequest;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.method=e.string();break}case 2:{d.path=e.string();break}case 3:{d.headers&&d.headers.length||(d.headers=[]),d.headers.push(u.hbb.HeaderEntry.decode(e,e.uint32(),void 0,r+1));break}case 4:{d.body=e.bytes();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.method!=null&&e.hasOwnProperty("method")&&!f.isString(e.method))return"method: string expected";if(e.path!=null&&e.hasOwnProperty("path")&&!f.isString(e.path))return"path: string expected";if(e.headers!=null&&e.hasOwnProperty("headers")){if(!Array.isArray(e.headers))return"headers: array expected";for(let n=0;n<e.headers.length;++n){let r=u.hbb.HeaderEntry.verify(e.headers[n],t+1);if(r)return"headers."+r}}return e.body!=null&&e.hasOwnProperty("body")&&!(e.body&&typeof e.body.length=="number"||f.isString(e.body))?"body: buffer expected":null},i.fromObject=function(e,t){if(e instanceof u.hbb.HttpProxyRequest)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.HttpProxyRequest;if(e.method!=null&&(n.method=String(e.method)),e.path!=null&&(n.path=String(e.path)),e.headers){if(!Array.isArray(e.headers))throw TypeError(".hbb.HttpProxyRequest.headers: array expected");n.headers=[];for(let r=0;r<e.headers.length;++r){if(typeof e.headers[r]!="object")throw TypeError(".hbb.HttpProxyRequest.headers: object expected");n.headers[r]=u.hbb.HeaderEntry.fromObject(e.headers[r],t+1)}}return e.body!=null&&(typeof e.body=="string"?f.base64.decode(e.body,n.body=f.newBuffer(f.base64.length(e.body)),0):e.body.length>=0&&(n.body=e.body)),n},i.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.headers=[]),t.defaults&&(n.method="",n.path="",t.bytes===String?n.body="":(n.body=[],t.bytes!==Array&&(n.body=f.newBuffer(n.body)))),e.method!=null&&e.hasOwnProperty("method")&&(n.method=e.method),e.path!=null&&e.hasOwnProperty("path")&&(n.path=e.path),e.headers&&e.headers.length){n.headers=[];for(let r=0;r<e.headers.length;++r)n.headers[r]=u.hbb.HeaderEntry.toObject(e.headers[r],t)}return e.body!=null&&e.hasOwnProperty("body")&&(n.body=t.bytes===String?f.base64.encode(e.body,0,e.body.length):t.bytes===Array?Array.prototype.slice.call(e.body):e.body),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.HttpProxyRequest"},i}(),p.HttpProxyResponse=function(){function i(o){if(this.headers=[],o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.status=0,i.prototype.headers=f.emptyArray,i.prototype.body=f.newBuffer([]),i.prototype.error="",i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=E.create()),e.status!=null&&Object.hasOwnProperty.call(e,"status")&&t.uint32(8).int32(e.status),e.headers!=null&&e.headers.length)for(let n=0;n<e.headers.length;++n)u.hbb.HeaderEntry.encode(e.headers[n],t.uint32(18).fork()).ldelim();return e.body!=null&&Object.hasOwnProperty.call(e,"body")&&t.uint32(26).bytes(e.body),e.error!=null&&Object.hasOwnProperty.call(e,"error")&&t.uint32(34).string(e.error),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.HttpProxyResponse;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.status=e.int32();break}case 2:{d.headers&&d.headers.length||(d.headers=[]),d.headers.push(u.hbb.HeaderEntry.decode(e,e.uint32(),void 0,r+1));break}case 3:{d.body=e.bytes();break}case 4:{d.error=e.string();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.status!=null&&e.hasOwnProperty("status")&&!f.isInteger(e.status))return"status: integer expected";if(e.headers!=null&&e.hasOwnProperty("headers")){if(!Array.isArray(e.headers))return"headers: array expected";for(let n=0;n<e.headers.length;++n){let r=u.hbb.HeaderEntry.verify(e.headers[n],t+1);if(r)return"headers."+r}}return e.body!=null&&e.hasOwnProperty("body")&&!(e.body&&typeof e.body.length=="number"||f.isString(e.body))?"body: buffer expected":e.error!=null&&e.hasOwnProperty("error")&&!f.isString(e.error)?"error: string expected":null},i.fromObject=function(e,t){if(e instanceof u.hbb.HttpProxyResponse)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.HttpProxyResponse;if(e.status!=null&&(n.status=e.status|0),e.headers){if(!Array.isArray(e.headers))throw TypeError(".hbb.HttpProxyResponse.headers: array expected");n.headers=[];for(let r=0;r<e.headers.length;++r){if(typeof e.headers[r]!="object")throw TypeError(".hbb.HttpProxyResponse.headers: object expected");n.headers[r]=u.hbb.HeaderEntry.fromObject(e.headers[r],t+1)}}return e.body!=null&&(typeof e.body=="string"?f.base64.decode(e.body,n.body=f.newBuffer(f.base64.length(e.body)),0):e.body.length>=0&&(n.body=e.body)),e.error!=null&&(n.error=String(e.error)),n},i.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.headers=[]),t.defaults&&(n.status=0,t.bytes===String?n.body="":(n.body=[],t.bytes!==Array&&(n.body=f.newBuffer(n.body))),n.error=""),e.status!=null&&e.hasOwnProperty("status")&&(n.status=e.status),e.headers&&e.headers.length){n.headers=[];for(let r=0;r<e.headers.length;++r)n.headers[r]=u.hbb.HeaderEntry.toObject(e.headers[r],t)}return e.body!=null&&e.hasOwnProperty("body")&&(n.body=t.bytes===String?f.base64.encode(e.body,0,e.body.length):t.bytes===Array?Array.prototype.slice.call(e.body):e.body),e.error!=null&&e.hasOwnProperty("error")&&(n.error=e.error),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.HttpProxyResponse"},i}(),p.RendezvousMessage=function(){function i(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)e[t[n]]!=null&&t[n]!=="__proto__"&&(this[t[n]]=e[t[n]])}i.prototype.register_peer=null,i.prototype.register_peer_response=null,i.prototype.punch_hole_request=null,i.prototype.punch_hole=null,i.prototype.punch_hole_sent=null,i.prototype.punch_hole_response=null,i.prototype.fetch_local_addr=null,i.prototype.local_addr=null,i.prototype.configure_update=null,i.prototype.register_pk=null,i.prototype.register_pk_response=null,i.prototype.software_update=null,i.prototype.request_relay=null,i.prototype.relay_response=null,i.prototype.test_nat_request=null,i.prototype.test_nat_response=null,i.prototype.peer_discovery=null,i.prototype.online_request=null,i.prototype.online_response=null,i.prototype.key_exchange=null,i.prototype.hc=null,i.prototype.http_proxy_request=null,i.prototype.http_proxy_response=null;let o;return Object.defineProperty(i.prototype,"union",{get:f.oneOfGetter(o=["register_peer","register_peer_response","punch_hole_request","punch_hole","punch_hole_sent","punch_hole_response","fetch_local_addr","local_addr","configure_update","register_pk","register_pk_response","software_update","request_relay","relay_response","test_nat_request","test_nat_response","peer_discovery","online_request","online_response","key_exchange","hc","http_proxy_request","http_proxy_response"]),set:f.oneOfSetter(o)}),i.create=function(t){return new i(t)},i.encode=function(t,n){return n||(n=E.create()),t.register_peer!=null&&Object.hasOwnProperty.call(t,"register_peer")&&u.hbb.RegisterPeer.encode(t.register_peer,n.uint32(50).fork()).ldelim(),t.register_peer_response!=null&&Object.hasOwnProperty.call(t,"register_peer_response")&&u.hbb.RegisterPeerResponse.encode(t.register_peer_response,n.uint32(58).fork()).ldelim(),t.punch_hole_request!=null&&Object.hasOwnProperty.call(t,"punch_hole_request")&&u.hbb.PunchHoleRequest.encode(t.punch_hole_request,n.uint32(66).fork()).ldelim(),t.punch_hole!=null&&Object.hasOwnProperty.call(t,"punch_hole")&&u.hbb.PunchHole.encode(t.punch_hole,n.uint32(74).fork()).ldelim(),t.punch_hole_sent!=null&&Object.hasOwnProperty.call(t,"punch_hole_sent")&&u.hbb.PunchHoleSent.encode(t.punch_hole_sent,n.uint32(82).fork()).ldelim(),t.punch_hole_response!=null&&Object.hasOwnProperty.call(t,"punch_hole_response")&&u.hbb.PunchHoleResponse.encode(t.punch_hole_response,n.uint32(90).fork()).ldelim(),t.fetch_local_addr!=null&&Object.hasOwnProperty.call(t,"fetch_local_addr")&&u.hbb.FetchLocalAddr.encode(t.fetch_local_addr,n.uint32(98).fork()).ldelim(),t.local_addr!=null&&Object.hasOwnProperty.call(t,"local_addr")&&u.hbb.LocalAddr.encode(t.local_addr,n.uint32(106).fork()).ldelim(),t.configure_update!=null&&Object.hasOwnProperty.call(t,"configure_update")&&u.hbb.ConfigUpdate.encode(t.configure_update,n.uint32(114).fork()).ldelim(),t.register_pk!=null&&Object.hasOwnProperty.call(t,"register_pk")&&u.hbb.RegisterPk.encode(t.register_pk,n.uint32(122).fork()).ldelim(),t.register_pk_response!=null&&Object.hasOwnProperty.call(t,"register_pk_response")&&u.hbb.RegisterPkResponse.encode(t.register_pk_response,n.uint32(130).fork()).ldelim(),t.software_update!=null&&Object.hasOwnProperty.call(t,"software_update")&&u.hbb.SoftwareUpdate.encode(t.software_update,n.uint32(138).fork()).ldelim(),t.request_relay!=null&&Object.hasOwnProperty.call(t,"request_relay")&&u.hbb.RequestRelay.encode(t.request_relay,n.uint32(146).fork()).ldelim(),t.relay_response!=null&&Object.hasOwnProperty.call(t,"relay_response")&&u.hbb.RelayResponse.encode(t.relay_response,n.uint32(154).fork()).ldelim(),t.test_nat_request!=null&&Object.hasOwnProperty.call(t,"test_nat_request")&&u.hbb.TestNatRequest.encode(t.test_nat_request,n.uint32(162).fork()).ldelim(),t.test_nat_response!=null&&Object.hasOwnProperty.call(t,"test_nat_response")&&u.hbb.TestNatResponse.encode(t.test_nat_response,n.uint32(170).fork()).ldelim(),t.peer_discovery!=null&&Object.hasOwnProperty.call(t,"peer_discovery")&&u.hbb.PeerDiscovery.encode(t.peer_discovery,n.uint32(178).fork()).ldelim(),t.online_request!=null&&Object.hasOwnProperty.call(t,"online_request")&&u.hbb.OnlineRequest.encode(t.online_request,n.uint32(186).fork()).ldelim(),t.online_response!=null&&Object.hasOwnProperty.call(t,"online_response")&&u.hbb.OnlineResponse.encode(t.online_response,n.uint32(194).fork()).ldelim(),t.key_exchange!=null&&Object.hasOwnProperty.call(t,"key_exchange")&&u.hbb.KeyExchange.encode(t.key_exchange,n.uint32(202).fork()).ldelim(),t.hc!=null&&Object.hasOwnProperty.call(t,"hc")&&u.hbb.HealthCheck.encode(t.hc,n.uint32(210).fork()).ldelim(),t.http_proxy_request!=null&&Object.hasOwnProperty.call(t,"http_proxy_request")&&u.hbb.HttpProxyRequest.encode(t.http_proxy_request,n.uint32(218).fork()).ldelim(),t.http_proxy_response!=null&&Object.hasOwnProperty.call(t,"http_proxy_response")&&u.hbb.HttpProxyResponse.encode(t.http_proxy_response,n.uint32(226).fork()).ldelim(),n},i.encodeDelimited=function(t,n){return this.encode(t,n).ldelim()},i.decode=function(t,n,r,l){if(t instanceof s||(t=s.create(t)),l===void 0&&(l=0),l>s.recursionLimit)throw Error("maximum nesting depth exceeded");let d=n===void 0?t.len:t.pos+n,c=new u.hbb.RendezvousMessage;for(;t.pos<d;){let w=t.uint32();if(w===r)break;switch(w>>>3){case 6:{c.register_peer=u.hbb.RegisterPeer.decode(t,t.uint32(),void 0,l+1);break}case 7:{c.register_peer_response=u.hbb.RegisterPeerResponse.decode(t,t.uint32(),void 0,l+1);break}case 8:{c.punch_hole_request=u.hbb.PunchHoleRequest.decode(t,t.uint32(),void 0,l+1);break}case 9:{c.punch_hole=u.hbb.PunchHole.decode(t,t.uint32(),void 0,l+1);break}case 10:{c.punch_hole_sent=u.hbb.PunchHoleSent.decode(t,t.uint32(),void 0,l+1);break}case 11:{c.punch_hole_response=u.hbb.PunchHoleResponse.decode(t,t.uint32(),void 0,l+1);break}case 12:{c.fetch_local_addr=u.hbb.FetchLocalAddr.decode(t,t.uint32(),void 0,l+1);break}case 13:{c.local_addr=u.hbb.LocalAddr.decode(t,t.uint32(),void 0,l+1);break}case 14:{c.configure_update=u.hbb.ConfigUpdate.decode(t,t.uint32(),void 0,l+1);break}case 15:{c.register_pk=u.hbb.RegisterPk.decode(t,t.uint32(),void 0,l+1);break}case 16:{c.register_pk_response=u.hbb.RegisterPkResponse.decode(t,t.uint32(),void 0,l+1);break}case 17:{c.software_update=u.hbb.SoftwareUpdate.decode(t,t.uint32(),void 0,l+1);break}case 18:{c.request_relay=u.hbb.RequestRelay.decode(t,t.uint32(),void 0,l+1);break}case 19:{c.relay_response=u.hbb.RelayResponse.decode(t,t.uint32(),void 0,l+1);break}case 20:{c.test_nat_request=u.hbb.TestNatRequest.decode(t,t.uint32(),void 0,l+1);break}case 21:{c.test_nat_response=u.hbb.TestNatResponse.decode(t,t.uint32(),void 0,l+1);break}case 22:{c.peer_discovery=u.hbb.PeerDiscovery.decode(t,t.uint32(),void 0,l+1);break}case 23:{c.online_request=u.hbb.OnlineRequest.decode(t,t.uint32(),void 0,l+1);break}case 24:{c.online_response=u.hbb.OnlineResponse.decode(t,t.uint32(),void 0,l+1);break}case 25:{c.key_exchange=u.hbb.KeyExchange.decode(t,t.uint32(),void 0,l+1);break}case 26:{c.hc=u.hbb.HealthCheck.decode(t,t.uint32(),void 0,l+1);break}case 27:{c.http_proxy_request=u.hbb.HttpProxyRequest.decode(t,t.uint32(),void 0,l+1);break}case 28:{c.http_proxy_response=u.hbb.HttpProxyResponse.decode(t,t.uint32(),void 0,l+1);break}default:t.skipType(w&7,l);break}}return c},i.decodeDelimited=function(t){return t instanceof s||(t=new s(t)),this.decode(t,t.uint32())},i.verify=function(t,n){if(typeof t!="object"||t===null)return"object expected";if(n===void 0&&(n=0),n>f.recursionLimit)return"maximum nesting depth exceeded";let r={};if(t.register_peer!=null&&t.hasOwnProperty("register_peer")){r.union=1;{let l=u.hbb.RegisterPeer.verify(t.register_peer,n+1);if(l)return"register_peer."+l}}if(t.register_peer_response!=null&&t.hasOwnProperty("register_peer_response")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.RegisterPeerResponse.verify(t.register_peer_response,n+1);if(l)return"register_peer_response."+l}}if(t.punch_hole_request!=null&&t.hasOwnProperty("punch_hole_request")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.PunchHoleRequest.verify(t.punch_hole_request,n+1);if(l)return"punch_hole_request."+l}}if(t.punch_hole!=null&&t.hasOwnProperty("punch_hole")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.PunchHole.verify(t.punch_hole,n+1);if(l)return"punch_hole."+l}}if(t.punch_hole_sent!=null&&t.hasOwnProperty("punch_hole_sent")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.PunchHoleSent.verify(t.punch_hole_sent,n+1);if(l)return"punch_hole_sent."+l}}if(t.punch_hole_response!=null&&t.hasOwnProperty("punch_hole_response")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.PunchHoleResponse.verify(t.punch_hole_response,n+1);if(l)return"punch_hole_response."+l}}if(t.fetch_local_addr!=null&&t.hasOwnProperty("fetch_local_addr")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.FetchLocalAddr.verify(t.fetch_local_addr,n+1);if(l)return"fetch_local_addr."+l}}if(t.local_addr!=null&&t.hasOwnProperty("local_addr")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.LocalAddr.verify(t.local_addr,n+1);if(l)return"local_addr."+l}}if(t.configure_update!=null&&t.hasOwnProperty("configure_update")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.ConfigUpdate.verify(t.configure_update,n+1);if(l)return"configure_update."+l}}if(t.register_pk!=null&&t.hasOwnProperty("register_pk")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.RegisterPk.verify(t.register_pk,n+1);if(l)return"register_pk."+l}}if(t.register_pk_response!=null&&t.hasOwnProperty("register_pk_response")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.RegisterPkResponse.verify(t.register_pk_response,n+1);if(l)return"register_pk_response."+l}}if(t.software_update!=null&&t.hasOwnProperty("software_update")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.SoftwareUpdate.verify(t.software_update,n+1);if(l)return"software_update."+l}}if(t.request_relay!=null&&t.hasOwnProperty("request_relay")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.RequestRelay.verify(t.request_relay,n+1);if(l)return"request_relay."+l}}if(t.relay_response!=null&&t.hasOwnProperty("relay_response")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.RelayResponse.verify(t.relay_response,n+1);if(l)return"relay_response."+l}}if(t.test_nat_request!=null&&t.hasOwnProperty("test_nat_request")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.TestNatRequest.verify(t.test_nat_request,n+1);if(l)return"test_nat_request."+l}}if(t.test_nat_response!=null&&t.hasOwnProperty("test_nat_response")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.TestNatResponse.verify(t.test_nat_response,n+1);if(l)return"test_nat_response."+l}}if(t.peer_discovery!=null&&t.hasOwnProperty("peer_discovery")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.PeerDiscovery.verify(t.peer_discovery,n+1);if(l)return"peer_discovery."+l}}if(t.online_request!=null&&t.hasOwnProperty("online_request")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.OnlineRequest.verify(t.online_request,n+1);if(l)return"online_request."+l}}if(t.online_response!=null&&t.hasOwnProperty("online_response")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.OnlineResponse.verify(t.online_response,n+1);if(l)return"online_response."+l}}if(t.key_exchange!=null&&t.hasOwnProperty("key_exchange")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.KeyExchange.verify(t.key_exchange,n+1);if(l)return"key_exchange."+l}}if(t.hc!=null&&t.hasOwnProperty("hc")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.HealthCheck.verify(t.hc,n+1);if(l)return"hc."+l}}if(t.http_proxy_request!=null&&t.hasOwnProperty("http_proxy_request")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.HttpProxyRequest.verify(t.http_proxy_request,n+1);if(l)return"http_proxy_request."+l}}if(t.http_proxy_response!=null&&t.hasOwnProperty("http_proxy_response")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.HttpProxyResponse.verify(t.http_proxy_response,n+1);if(l)return"http_proxy_response."+l}}return null},i.fromObject=function(t,n){if(t instanceof u.hbb.RendezvousMessage)return t;if(n===void 0&&(n=0),n>f.recursionLimit)throw Error("maximum nesting depth exceeded");let r=new u.hbb.RendezvousMessage;if(t.register_peer!=null){if(typeof t.register_peer!="object")throw TypeError(".hbb.RendezvousMessage.register_peer: object expected");r.register_peer=u.hbb.RegisterPeer.fromObject(t.register_peer,n+1)}if(t.register_peer_response!=null){if(typeof t.register_peer_response!="object")throw TypeError(".hbb.RendezvousMessage.register_peer_response: object expected");r.register_peer_response=u.hbb.RegisterPeerResponse.fromObject(t.register_peer_response,n+1)}if(t.punch_hole_request!=null){if(typeof t.punch_hole_request!="object")throw TypeError(".hbb.RendezvousMessage.punch_hole_request: object expected");r.punch_hole_request=u.hbb.PunchHoleRequest.fromObject(t.punch_hole_request,n+1)}if(t.punch_hole!=null){if(typeof t.punch_hole!="object")throw TypeError(".hbb.RendezvousMessage.punch_hole: object expected");r.punch_hole=u.hbb.PunchHole.fromObject(t.punch_hole,n+1)}if(t.punch_hole_sent!=null){if(typeof t.punch_hole_sent!="object")throw TypeError(".hbb.RendezvousMessage.punch_hole_sent: object expected");r.punch_hole_sent=u.hbb.PunchHoleSent.fromObject(t.punch_hole_sent,n+1)}if(t.punch_hole_response!=null){if(typeof t.punch_hole_response!="object")throw TypeError(".hbb.RendezvousMessage.punch_hole_response: object expected");r.punch_hole_response=u.hbb.PunchHoleResponse.fromObject(t.punch_hole_response,n+1)}if(t.fetch_local_addr!=null){if(typeof t.fetch_local_addr!="object")throw TypeError(".hbb.RendezvousMessage.fetch_local_addr: object expected");r.fetch_local_addr=u.hbb.FetchLocalAddr.fromObject(t.fetch_local_addr,n+1)}if(t.local_addr!=null){if(typeof t.local_addr!="object")throw TypeError(".hbb.RendezvousMessage.local_addr: object expected");r.local_addr=u.hbb.LocalAddr.fromObject(t.local_addr,n+1)}if(t.configure_update!=null){if(typeof t.configure_update!="object")throw TypeError(".hbb.RendezvousMessage.configure_update: object expected");r.configure_update=u.hbb.ConfigUpdate.fromObject(t.configure_update,n+1)}if(t.register_pk!=null){if(typeof t.register_pk!="object")throw TypeError(".hbb.RendezvousMessage.register_pk: object expected");r.register_pk=u.hbb.RegisterPk.fromObject(t.register_pk,n+1)}if(t.register_pk_response!=null){if(typeof t.register_pk_response!="object")throw TypeError(".hbb.RendezvousMessage.register_pk_response: object expected");r.register_pk_response=u.hbb.RegisterPkResponse.fromObject(t.register_pk_response,n+1)}if(t.software_update!=null){if(typeof t.software_update!="object")throw TypeError(".hbb.RendezvousMessage.software_update: object expected");r.software_update=u.hbb.SoftwareUpdate.fromObject(t.software_update,n+1)}if(t.request_relay!=null){if(typeof t.request_relay!="object")throw TypeError(".hbb.RendezvousMessage.request_relay: object expected");r.request_relay=u.hbb.RequestRelay.fromObject(t.request_relay,n+1)}if(t.relay_response!=null){if(typeof t.relay_response!="object")throw TypeError(".hbb.RendezvousMessage.relay_response: object expected");r.relay_response=u.hbb.RelayResponse.fromObject(t.relay_response,n+1)}if(t.test_nat_request!=null){if(typeof t.test_nat_request!="object")throw TypeError(".hbb.RendezvousMessage.test_nat_request: object expected");r.test_nat_request=u.hbb.TestNatRequest.fromObject(t.test_nat_request,n+1)}if(t.test_nat_response!=null){if(typeof t.test_nat_response!="object")throw TypeError(".hbb.RendezvousMessage.test_nat_response: object expected");r.test_nat_response=u.hbb.TestNatResponse.fromObject(t.test_nat_response,n+1)}if(t.peer_discovery!=null){if(typeof t.peer_discovery!="object")throw TypeError(".hbb.RendezvousMessage.peer_discovery: object expected");r.peer_discovery=u.hbb.PeerDiscovery.fromObject(t.peer_discovery,n+1)}if(t.online_request!=null){if(typeof t.online_request!="object")throw TypeError(".hbb.RendezvousMessage.online_request: object expected");r.online_request=u.hbb.OnlineRequest.fromObject(t.online_request,n+1)}if(t.online_response!=null){if(typeof t.online_response!="object")throw TypeError(".hbb.RendezvousMessage.online_response: object expected");r.online_response=u.hbb.OnlineResponse.fromObject(t.online_response,n+1)}if(t.key_exchange!=null){if(typeof t.key_exchange!="object")throw TypeError(".hbb.RendezvousMessage.key_exchange: object expected");r.key_exchange=u.hbb.KeyExchange.fromObject(t.key_exchange,n+1)}if(t.hc!=null){if(typeof t.hc!="object")throw TypeError(".hbb.RendezvousMessage.hc: object expected");r.hc=u.hbb.HealthCheck.fromObject(t.hc,n+1)}if(t.http_proxy_request!=null){if(typeof t.http_proxy_request!="object")throw TypeError(".hbb.RendezvousMessage.http_proxy_request: object expected");r.http_proxy_request=u.hbb.HttpProxyRequest.fromObject(t.http_proxy_request,n+1)}if(t.http_proxy_response!=null){if(typeof t.http_proxy_response!="object")throw TypeError(".hbb.RendezvousMessage.http_proxy_response: object expected");r.http_proxy_response=u.hbb.HttpProxyResponse.fromObject(t.http_proxy_response,n+1)}return r},i.toObject=function(t,n){n||(n={});let r={};return t.register_peer!=null&&t.hasOwnProperty("register_peer")&&(r.register_peer=u.hbb.RegisterPeer.toObject(t.register_peer,n),n.oneofs&&(r.union="register_peer")),t.register_peer_response!=null&&t.hasOwnProperty("register_peer_response")&&(r.register_peer_response=u.hbb.RegisterPeerResponse.toObject(t.register_peer_response,n),n.oneofs&&(r.union="register_peer_response")),t.punch_hole_request!=null&&t.hasOwnProperty("punch_hole_request")&&(r.punch_hole_request=u.hbb.PunchHoleRequest.toObject(t.punch_hole_request,n),n.oneofs&&(r.union="punch_hole_request")),t.punch_hole!=null&&t.hasOwnProperty("punch_hole")&&(r.punch_hole=u.hbb.PunchHole.toObject(t.punch_hole,n),n.oneofs&&(r.union="punch_hole")),t.punch_hole_sent!=null&&t.hasOwnProperty("punch_hole_sent")&&(r.punch_hole_sent=u.hbb.PunchHoleSent.toObject(t.punch_hole_sent,n),n.oneofs&&(r.union="punch_hole_sent")),t.punch_hole_response!=null&&t.hasOwnProperty("punch_hole_response")&&(r.punch_hole_response=u.hbb.PunchHoleResponse.toObject(t.punch_hole_response,n),n.oneofs&&(r.union="punch_hole_response")),t.fetch_local_addr!=null&&t.hasOwnProperty("fetch_local_addr")&&(r.fetch_local_addr=u.hbb.FetchLocalAddr.toObject(t.fetch_local_addr,n),n.oneofs&&(r.union="fetch_local_addr")),t.local_addr!=null&&t.hasOwnProperty("local_addr")&&(r.local_addr=u.hbb.LocalAddr.toObject(t.local_addr,n),n.oneofs&&(r.union="local_addr")),t.configure_update!=null&&t.hasOwnProperty("configure_update")&&(r.configure_update=u.hbb.ConfigUpdate.toObject(t.configure_update,n),n.oneofs&&(r.union="configure_update")),t.register_pk!=null&&t.hasOwnProperty("register_pk")&&(r.register_pk=u.hbb.RegisterPk.toObject(t.register_pk,n),n.oneofs&&(r.union="register_pk")),t.register_pk_response!=null&&t.hasOwnProperty("register_pk_response")&&(r.register_pk_response=u.hbb.RegisterPkResponse.toObject(t.register_pk_response,n),n.oneofs&&(r.union="register_pk_response")),t.software_update!=null&&t.hasOwnProperty("software_update")&&(r.software_update=u.hbb.SoftwareUpdate.toObject(t.software_update,n),n.oneofs&&(r.union="software_update")),t.request_relay!=null&&t.hasOwnProperty("request_relay")&&(r.request_relay=u.hbb.RequestRelay.toObject(t.request_relay,n),n.oneofs&&(r.union="request_relay")),t.relay_response!=null&&t.hasOwnProperty("relay_response")&&(r.relay_response=u.hbb.RelayResponse.toObject(t.relay_response,n),n.oneofs&&(r.union="relay_response")),t.test_nat_request!=null&&t.hasOwnProperty("test_nat_request")&&(r.test_nat_request=u.hbb.TestNatRequest.toObject(t.test_nat_request,n),n.oneofs&&(r.union="test_nat_request")),t.test_nat_response!=null&&t.hasOwnProperty("test_nat_response")&&(r.test_nat_response=u.hbb.TestNatResponse.toObject(t.test_nat_response,n),n.oneofs&&(r.union="test_nat_response")),t.peer_discovery!=null&&t.hasOwnProperty("peer_discovery")&&(r.peer_discovery=u.hbb.PeerDiscovery.toObject(t.peer_discovery,n),n.oneofs&&(r.union="peer_discovery")),t.online_request!=null&&t.hasOwnProperty("online_request")&&(r.online_request=u.hbb.OnlineRequest.toObject(t.online_request,n),n.oneofs&&(r.union="online_request")),t.online_response!=null&&t.hasOwnProperty("online_response")&&(r.online_response=u.hbb.OnlineResponse.toObject(t.online_response,n),n.oneofs&&(r.union="online_response")),t.key_exchange!=null&&t.hasOwnProperty("key_exchange")&&(r.key_exchange=u.hbb.KeyExchange.toObject(t.key_exchange,n),n.oneofs&&(r.union="key_exchange")),t.hc!=null&&t.hasOwnProperty("hc")&&(r.hc=u.hbb.HealthCheck.toObject(t.hc,n),n.oneofs&&(r.union="hc")),t.http_proxy_request!=null&&t.hasOwnProperty("http_proxy_request")&&(r.http_proxy_request=u.hbb.HttpProxyRequest.toObject(t.http_proxy_request,n),n.oneofs&&(r.union="http_proxy_request")),t.http_proxy_response!=null&&t.hasOwnProperty("http_proxy_response")&&(r.http_proxy_response=u.hbb.HttpProxyResponse.toObject(t.http_proxy_response,n),n.oneofs&&(r.union="http_proxy_response")),r},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/hbb.RendezvousMessage"},i}(),p.EncodedVideoFrame=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.data=f.newBuffer([]),i.prototype.key=!1,i.prototype.pts=f.Long?f.Long.fromBits(0,0,!1):0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.data!=null&&Object.hasOwnProperty.call(e,"data")&&t.uint32(10).bytes(e.data),e.key!=null&&Object.hasOwnProperty.call(e,"key")&&t.uint32(16).bool(e.key),e.pts!=null&&Object.hasOwnProperty.call(e,"pts")&&t.uint32(24).int64(e.pts),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.EncodedVideoFrame;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.data=e.bytes();break}case 2:{d.key=e.bool();break}case 3:{d.pts=e.int64();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.data!=null&&e.hasOwnProperty("data")&&!(e.data&&typeof e.data.length=="number"||f.isString(e.data))?"data: buffer expected":e.key!=null&&e.hasOwnProperty("key")&&typeof e.key!="boolean"?"key: boolean expected":e.pts!=null&&e.hasOwnProperty("pts")&&!f.isInteger(e.pts)&&!(e.pts&&f.isInteger(e.pts.low)&&f.isInteger(e.pts.high))?"pts: integer|Long expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.EncodedVideoFrame)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.EncodedVideoFrame;return e.data!=null&&(typeof e.data=="string"?f.base64.decode(e.data,n.data=f.newBuffer(f.base64.length(e.data)),0):e.data.length>=0&&(n.data=e.data)),e.key!=null&&(n.key=!!e.key),e.pts!=null&&(f.Long?(n.pts=f.Long.fromValue(e.pts)).unsigned=!1:typeof e.pts=="string"?n.pts=parseInt(e.pts,10):typeof e.pts=="number"?n.pts=e.pts:typeof e.pts=="object"&&(n.pts=new f.LongBits(e.pts.low>>>0,e.pts.high>>>0).toNumber())),n},i.toObject=function(e,t){t||(t={});let n={};if(t.defaults)if(t.bytes===String?n.data="":(n.data=[],t.bytes!==Array&&(n.data=f.newBuffer(n.data))),n.key=!1,f.Long){let r=new f.Long(0,0,!1);n.pts=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.pts=t.longs===String?"0":0;return e.data!=null&&e.hasOwnProperty("data")&&(n.data=t.bytes===String?f.base64.encode(e.data,0,e.data.length):t.bytes===Array?Array.prototype.slice.call(e.data):e.data),e.key!=null&&e.hasOwnProperty("key")&&(n.key=e.key),e.pts!=null&&e.hasOwnProperty("pts")&&(typeof e.pts=="number"?n.pts=t.longs===String?String(e.pts):e.pts:n.pts=t.longs===String?f.Long.prototype.toString.call(e.pts):t.longs===Number?new f.LongBits(e.pts.low>>>0,e.pts.high>>>0).toNumber():e.pts),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.EncodedVideoFrame"},i}(),p.EncodedVideoFrames=function(){function i(o){if(this.frames=[],o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.frames=f.emptyArray,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=E.create()),e.frames!=null&&e.frames.length)for(let n=0;n<e.frames.length;++n)u.hbb.EncodedVideoFrame.encode(e.frames[n],t.uint32(10).fork()).ldelim();return t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.EncodedVideoFrames;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.frames&&d.frames.length||(d.frames=[]),d.frames.push(u.hbb.EncodedVideoFrame.decode(e,e.uint32(),void 0,r+1));break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.frames!=null&&e.hasOwnProperty("frames")){if(!Array.isArray(e.frames))return"frames: array expected";for(let n=0;n<e.frames.length;++n){let r=u.hbb.EncodedVideoFrame.verify(e.frames[n],t+1);if(r)return"frames."+r}}return null},i.fromObject=function(e,t){if(e instanceof u.hbb.EncodedVideoFrames)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.EncodedVideoFrames;if(e.frames){if(!Array.isArray(e.frames))throw TypeError(".hbb.EncodedVideoFrames.frames: array expected");n.frames=[];for(let r=0;r<e.frames.length;++r){if(typeof e.frames[r]!="object")throw TypeError(".hbb.EncodedVideoFrames.frames: object expected");n.frames[r]=u.hbb.EncodedVideoFrame.fromObject(e.frames[r],t+1)}}return n},i.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.frames=[]),e.frames&&e.frames.length){n.frames=[];for(let r=0;r<e.frames.length;++r)n.frames[r]=u.hbb.EncodedVideoFrame.toObject(e.frames[r],t)}return n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.EncodedVideoFrames"},i}(),p.RGB=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.compress=!1,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.compress!=null&&Object.hasOwnProperty.call(e,"compress")&&t.uint32(8).bool(e.compress),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.RGB;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.compress=e.bool();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.compress!=null&&e.hasOwnProperty("compress")&&typeof e.compress!="boolean"?"compress: boolean expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.RGB)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.RGB;return e.compress!=null&&(n.compress=!!e.compress),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.compress=!1),e.compress!=null&&e.hasOwnProperty("compress")&&(n.compress=e.compress),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.RGB"},i}(),p.YUV=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.compress=!1,i.prototype.stride=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.compress!=null&&Object.hasOwnProperty.call(e,"compress")&&t.uint32(8).bool(e.compress),e.stride!=null&&Object.hasOwnProperty.call(e,"stride")&&t.uint32(16).int32(e.stride),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.YUV;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.compress=e.bool();break}case 2:{d.stride=e.int32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.compress!=null&&e.hasOwnProperty("compress")&&typeof e.compress!="boolean"?"compress: boolean expected":e.stride!=null&&e.hasOwnProperty("stride")&&!f.isInteger(e.stride)?"stride: integer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.YUV)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.YUV;return e.compress!=null&&(n.compress=!!e.compress),e.stride!=null&&(n.stride=e.stride|0),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.compress=!1,n.stride=0),e.compress!=null&&e.hasOwnProperty("compress")&&(n.compress=e.compress),e.stride!=null&&e.hasOwnProperty("stride")&&(n.stride=e.stride),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.YUV"},i}(),p.Chroma=function(){let i={},o=Object.create(i);return o[i[0]="I420"]=0,o[i[1]="I444"]=1,o}(),p.VideoFrame=function(){function i(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)e[t[n]]!=null&&t[n]!=="__proto__"&&(this[t[n]]=e[t[n]])}i.prototype.vp9s=null,i.prototype.rgb=null,i.prototype.yuv=null,i.prototype.h264s=null,i.prototype.h265s=null,i.prototype.vp8s=null,i.prototype.av1s=null,i.prototype.display=0;let o;return Object.defineProperty(i.prototype,"union",{get:f.oneOfGetter(o=["vp9s","rgb","yuv","h264s","h265s","vp8s","av1s"]),set:f.oneOfSetter(o)}),i.create=function(t){return new i(t)},i.encode=function(t,n){return n||(n=E.create()),t.vp9s!=null&&Object.hasOwnProperty.call(t,"vp9s")&&u.hbb.EncodedVideoFrames.encode(t.vp9s,n.uint32(50).fork()).ldelim(),t.rgb!=null&&Object.hasOwnProperty.call(t,"rgb")&&u.hbb.RGB.encode(t.rgb,n.uint32(58).fork()).ldelim(),t.yuv!=null&&Object.hasOwnProperty.call(t,"yuv")&&u.hbb.YUV.encode(t.yuv,n.uint32(66).fork()).ldelim(),t.h264s!=null&&Object.hasOwnProperty.call(t,"h264s")&&u.hbb.EncodedVideoFrames.encode(t.h264s,n.uint32(82).fork()).ldelim(),t.h265s!=null&&Object.hasOwnProperty.call(t,"h265s")&&u.hbb.EncodedVideoFrames.encode(t.h265s,n.uint32(90).fork()).ldelim(),t.vp8s!=null&&Object.hasOwnProperty.call(t,"vp8s")&&u.hbb.EncodedVideoFrames.encode(t.vp8s,n.uint32(98).fork()).ldelim(),t.av1s!=null&&Object.hasOwnProperty.call(t,"av1s")&&u.hbb.EncodedVideoFrames.encode(t.av1s,n.uint32(106).fork()).ldelim(),t.display!=null&&Object.hasOwnProperty.call(t,"display")&&n.uint32(112).int32(t.display),n},i.encodeDelimited=function(t,n){return this.encode(t,n).ldelim()},i.decode=function(t,n,r,l){if(t instanceof s||(t=s.create(t)),l===void 0&&(l=0),l>s.recursionLimit)throw Error("maximum nesting depth exceeded");let d=n===void 0?t.len:t.pos+n,c=new u.hbb.VideoFrame;for(;t.pos<d;){let w=t.uint32();if(w===r)break;switch(w>>>3){case 6:{c.vp9s=u.hbb.EncodedVideoFrames.decode(t,t.uint32(),void 0,l+1);break}case 7:{c.rgb=u.hbb.RGB.decode(t,t.uint32(),void 0,l+1);break}case 8:{c.yuv=u.hbb.YUV.decode(t,t.uint32(),void 0,l+1);break}case 10:{c.h264s=u.hbb.EncodedVideoFrames.decode(t,t.uint32(),void 0,l+1);break}case 11:{c.h265s=u.hbb.EncodedVideoFrames.decode(t,t.uint32(),void 0,l+1);break}case 12:{c.vp8s=u.hbb.EncodedVideoFrames.decode(t,t.uint32(),void 0,l+1);break}case 13:{c.av1s=u.hbb.EncodedVideoFrames.decode(t,t.uint32(),void 0,l+1);break}case 14:{c.display=t.int32();break}default:t.skipType(w&7,l);break}}return c},i.decodeDelimited=function(t){return t instanceof s||(t=new s(t)),this.decode(t,t.uint32())},i.verify=function(t,n){if(typeof t!="object"||t===null)return"object expected";if(n===void 0&&(n=0),n>f.recursionLimit)return"maximum nesting depth exceeded";let r={};if(t.vp9s!=null&&t.hasOwnProperty("vp9s")){r.union=1;{let l=u.hbb.EncodedVideoFrames.verify(t.vp9s,n+1);if(l)return"vp9s."+l}}if(t.rgb!=null&&t.hasOwnProperty("rgb")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.RGB.verify(t.rgb,n+1);if(l)return"rgb."+l}}if(t.yuv!=null&&t.hasOwnProperty("yuv")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.YUV.verify(t.yuv,n+1);if(l)return"yuv."+l}}if(t.h264s!=null&&t.hasOwnProperty("h264s")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.EncodedVideoFrames.verify(t.h264s,n+1);if(l)return"h264s."+l}}if(t.h265s!=null&&t.hasOwnProperty("h265s")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.EncodedVideoFrames.verify(t.h265s,n+1);if(l)return"h265s."+l}}if(t.vp8s!=null&&t.hasOwnProperty("vp8s")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.EncodedVideoFrames.verify(t.vp8s,n+1);if(l)return"vp8s."+l}}if(t.av1s!=null&&t.hasOwnProperty("av1s")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.EncodedVideoFrames.verify(t.av1s,n+1);if(l)return"av1s."+l}}return t.display!=null&&t.hasOwnProperty("display")&&!f.isInteger(t.display)?"display: integer expected":null},i.fromObject=function(t,n){if(t instanceof u.hbb.VideoFrame)return t;if(n===void 0&&(n=0),n>f.recursionLimit)throw Error("maximum nesting depth exceeded");let r=new u.hbb.VideoFrame;if(t.vp9s!=null){if(typeof t.vp9s!="object")throw TypeError(".hbb.VideoFrame.vp9s: object expected");r.vp9s=u.hbb.EncodedVideoFrames.fromObject(t.vp9s,n+1)}if(t.rgb!=null){if(typeof t.rgb!="object")throw TypeError(".hbb.VideoFrame.rgb: object expected");r.rgb=u.hbb.RGB.fromObject(t.rgb,n+1)}if(t.yuv!=null){if(typeof t.yuv!="object")throw TypeError(".hbb.VideoFrame.yuv: object expected");r.yuv=u.hbb.YUV.fromObject(t.yuv,n+1)}if(t.h264s!=null){if(typeof t.h264s!="object")throw TypeError(".hbb.VideoFrame.h264s: object expected");r.h264s=u.hbb.EncodedVideoFrames.fromObject(t.h264s,n+1)}if(t.h265s!=null){if(typeof t.h265s!="object")throw TypeError(".hbb.VideoFrame.h265s: object expected");r.h265s=u.hbb.EncodedVideoFrames.fromObject(t.h265s,n+1)}if(t.vp8s!=null){if(typeof t.vp8s!="object")throw TypeError(".hbb.VideoFrame.vp8s: object expected");r.vp8s=u.hbb.EncodedVideoFrames.fromObject(t.vp8s,n+1)}if(t.av1s!=null){if(typeof t.av1s!="object")throw TypeError(".hbb.VideoFrame.av1s: object expected");r.av1s=u.hbb.EncodedVideoFrames.fromObject(t.av1s,n+1)}return t.display!=null&&(r.display=t.display|0),r},i.toObject=function(t,n){n||(n={});let r={};return n.defaults&&(r.display=0),t.vp9s!=null&&t.hasOwnProperty("vp9s")&&(r.vp9s=u.hbb.EncodedVideoFrames.toObject(t.vp9s,n),n.oneofs&&(r.union="vp9s")),t.rgb!=null&&t.hasOwnProperty("rgb")&&(r.rgb=u.hbb.RGB.toObject(t.rgb,n),n.oneofs&&(r.union="rgb")),t.yuv!=null&&t.hasOwnProperty("yuv")&&(r.yuv=u.hbb.YUV.toObject(t.yuv,n),n.oneofs&&(r.union="yuv")),t.h264s!=null&&t.hasOwnProperty("h264s")&&(r.h264s=u.hbb.EncodedVideoFrames.toObject(t.h264s,n),n.oneofs&&(r.union="h264s")),t.h265s!=null&&t.hasOwnProperty("h265s")&&(r.h265s=u.hbb.EncodedVideoFrames.toObject(t.h265s,n),n.oneofs&&(r.union="h265s")),t.vp8s!=null&&t.hasOwnProperty("vp8s")&&(r.vp8s=u.hbb.EncodedVideoFrames.toObject(t.vp8s,n),n.oneofs&&(r.union="vp8s")),t.av1s!=null&&t.hasOwnProperty("av1s")&&(r.av1s=u.hbb.EncodedVideoFrames.toObject(t.av1s,n),n.oneofs&&(r.union="av1s")),t.display!=null&&t.hasOwnProperty("display")&&(r.display=t.display),r},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/hbb.VideoFrame"},i}(),p.IdPk=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.id="",i.prototype.pk=f.newBuffer([]),i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),e.pk!=null&&Object.hasOwnProperty.call(e,"pk")&&t.uint32(18).bytes(e.pk),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.IdPk;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.id=e.string();break}case 2:{d.pk=e.bytes();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.id!=null&&e.hasOwnProperty("id")&&!f.isString(e.id)?"id: string expected":e.pk!=null&&e.hasOwnProperty("pk")&&!(e.pk&&typeof e.pk.length=="number"||f.isString(e.pk))?"pk: buffer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.IdPk)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.IdPk;return e.id!=null&&(n.id=String(e.id)),e.pk!=null&&(typeof e.pk=="string"?f.base64.decode(e.pk,n.pk=f.newBuffer(f.base64.length(e.pk)),0):e.pk.length>=0&&(n.pk=e.pk)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.id="",t.bytes===String?n.pk="":(n.pk=[],t.bytes!==Array&&(n.pk=f.newBuffer(n.pk)))),e.id!=null&&e.hasOwnProperty("id")&&(n.id=e.id),e.pk!=null&&e.hasOwnProperty("pk")&&(n.pk=t.bytes===String?f.base64.encode(e.pk,0,e.pk.length):t.bytes===Array?Array.prototype.slice.call(e.pk):e.pk),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.IdPk"},i}(),p.DisplayInfo=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.x=0,i.prototype.y=0,i.prototype.width=0,i.prototype.height=0,i.prototype.name="",i.prototype.online=!1,i.prototype.cursor_embedded=!1,i.prototype.original_resolution=null,i.prototype.scale=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.x!=null&&Object.hasOwnProperty.call(e,"x")&&t.uint32(8).sint32(e.x),e.y!=null&&Object.hasOwnProperty.call(e,"y")&&t.uint32(16).sint32(e.y),e.width!=null&&Object.hasOwnProperty.call(e,"width")&&t.uint32(24).int32(e.width),e.height!=null&&Object.hasOwnProperty.call(e,"height")&&t.uint32(32).int32(e.height),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&t.uint32(42).string(e.name),e.online!=null&&Object.hasOwnProperty.call(e,"online")&&t.uint32(48).bool(e.online),e.cursor_embedded!=null&&Object.hasOwnProperty.call(e,"cursor_embedded")&&t.uint32(56).bool(e.cursor_embedded),e.original_resolution!=null&&Object.hasOwnProperty.call(e,"original_resolution")&&u.hbb.Resolution.encode(e.original_resolution,t.uint32(66).fork()).ldelim(),e.scale!=null&&Object.hasOwnProperty.call(e,"scale")&&t.uint32(73).double(e.scale),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.DisplayInfo;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.x=e.sint32();break}case 2:{d.y=e.sint32();break}case 3:{d.width=e.int32();break}case 4:{d.height=e.int32();break}case 5:{d.name=e.string();break}case 6:{d.online=e.bool();break}case 7:{d.cursor_embedded=e.bool();break}case 8:{d.original_resolution=u.hbb.Resolution.decode(e,e.uint32(),void 0,r+1);break}case 9:{d.scale=e.double();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.x!=null&&e.hasOwnProperty("x")&&!f.isInteger(e.x))return"x: integer expected";if(e.y!=null&&e.hasOwnProperty("y")&&!f.isInteger(e.y))return"y: integer expected";if(e.width!=null&&e.hasOwnProperty("width")&&!f.isInteger(e.width))return"width: integer expected";if(e.height!=null&&e.hasOwnProperty("height")&&!f.isInteger(e.height))return"height: integer expected";if(e.name!=null&&e.hasOwnProperty("name")&&!f.isString(e.name))return"name: string expected";if(e.online!=null&&e.hasOwnProperty("online")&&typeof e.online!="boolean")return"online: boolean expected";if(e.cursor_embedded!=null&&e.hasOwnProperty("cursor_embedded")&&typeof e.cursor_embedded!="boolean")return"cursor_embedded: boolean expected";if(e.original_resolution!=null&&e.hasOwnProperty("original_resolution")){let n=u.hbb.Resolution.verify(e.original_resolution,t+1);if(n)return"original_resolution."+n}return e.scale!=null&&e.hasOwnProperty("scale")&&typeof e.scale!="number"?"scale: number expected":null},i.fromObject=function(e,t){if(e instanceof u.hbb.DisplayInfo)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.DisplayInfo;if(e.x!=null&&(n.x=e.x|0),e.y!=null&&(n.y=e.y|0),e.width!=null&&(n.width=e.width|0),e.height!=null&&(n.height=e.height|0),e.name!=null&&(n.name=String(e.name)),e.online!=null&&(n.online=!!e.online),e.cursor_embedded!=null&&(n.cursor_embedded=!!e.cursor_embedded),e.original_resolution!=null){if(typeof e.original_resolution!="object")throw TypeError(".hbb.DisplayInfo.original_resolution: object expected");n.original_resolution=u.hbb.Resolution.fromObject(e.original_resolution,t+1)}return e.scale!=null&&(n.scale=Number(e.scale)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.x=0,n.y=0,n.width=0,n.height=0,n.name="",n.online=!1,n.cursor_embedded=!1,n.original_resolution=null,n.scale=0),e.x!=null&&e.hasOwnProperty("x")&&(n.x=e.x),e.y!=null&&e.hasOwnProperty("y")&&(n.y=e.y),e.width!=null&&e.hasOwnProperty("width")&&(n.width=e.width),e.height!=null&&e.hasOwnProperty("height")&&(n.height=e.height),e.name!=null&&e.hasOwnProperty("name")&&(n.name=e.name),e.online!=null&&e.hasOwnProperty("online")&&(n.online=e.online),e.cursor_embedded!=null&&e.hasOwnProperty("cursor_embedded")&&(n.cursor_embedded=e.cursor_embedded),e.original_resolution!=null&&e.hasOwnProperty("original_resolution")&&(n.original_resolution=u.hbb.Resolution.toObject(e.original_resolution,t)),e.scale!=null&&e.hasOwnProperty("scale")&&(n.scale=t.json&&!isFinite(e.scale)?String(e.scale):e.scale),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.DisplayInfo"},i}(),p.PortForward=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.host="",i.prototype.port=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.host!=null&&Object.hasOwnProperty.call(e,"host")&&t.uint32(10).string(e.host),e.port!=null&&Object.hasOwnProperty.call(e,"port")&&t.uint32(16).int32(e.port),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.PortForward;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.host=e.string();break}case 2:{d.port=e.int32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.host!=null&&e.hasOwnProperty("host")&&!f.isString(e.host)?"host: string expected":e.port!=null&&e.hasOwnProperty("port")&&!f.isInteger(e.port)?"port: integer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.PortForward)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.PortForward;return e.host!=null&&(n.host=String(e.host)),e.port!=null&&(n.port=e.port|0),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.host="",n.port=0),e.host!=null&&e.hasOwnProperty("host")&&(n.host=e.host),e.port!=null&&e.hasOwnProperty("port")&&(n.port=e.port),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.PortForward"},i}(),p.FileTransfer=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.dir="",i.prototype.show_hidden=!1,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.dir!=null&&Object.hasOwnProperty.call(e,"dir")&&t.uint32(10).string(e.dir),e.show_hidden!=null&&Object.hasOwnProperty.call(e,"show_hidden")&&t.uint32(16).bool(e.show_hidden),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.FileTransfer;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.dir=e.string();break}case 2:{d.show_hidden=e.bool();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.dir!=null&&e.hasOwnProperty("dir")&&!f.isString(e.dir)?"dir: string expected":e.show_hidden!=null&&e.hasOwnProperty("show_hidden")&&typeof e.show_hidden!="boolean"?"show_hidden: boolean expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.FileTransfer)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.FileTransfer;return e.dir!=null&&(n.dir=String(e.dir)),e.show_hidden!=null&&(n.show_hidden=!!e.show_hidden),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.dir="",n.show_hidden=!1),e.dir!=null&&e.hasOwnProperty("dir")&&(n.dir=e.dir),e.show_hidden!=null&&e.hasOwnProperty("show_hidden")&&(n.show_hidden=e.show_hidden),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.FileTransfer"},i}(),p.ViewCamera=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.ViewCamera;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.ViewCamera)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");return new u.hbb.ViewCamera},i.toObject=function(){return{}},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.ViewCamera"},i}(),p.OSLogin=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.username="",i.prototype.password="",i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.username!=null&&Object.hasOwnProperty.call(e,"username")&&t.uint32(10).string(e.username),e.password!=null&&Object.hasOwnProperty.call(e,"password")&&t.uint32(18).string(e.password),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.OSLogin;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.username=e.string();break}case 2:{d.password=e.string();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.username!=null&&e.hasOwnProperty("username")&&!f.isString(e.username)?"username: string expected":e.password!=null&&e.hasOwnProperty("password")&&!f.isString(e.password)?"password: string expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.OSLogin)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.OSLogin;return e.username!=null&&(n.username=String(e.username)),e.password!=null&&(n.password=String(e.password)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.username="",n.password=""),e.username!=null&&e.hasOwnProperty("username")&&(n.username=e.username),e.password!=null&&e.hasOwnProperty("password")&&(n.password=e.password),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.OSLogin"},i}(),p.LoginRequest=function(){function i(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)e[t[n]]!=null&&t[n]!=="__proto__"&&(this[t[n]]=e[t[n]])}i.prototype.username="",i.prototype.password=f.newBuffer([]),i.prototype.my_id="",i.prototype.my_name="",i.prototype.option=null,i.prototype.file_transfer=null,i.prototype.port_forward=null,i.prototype.view_camera=null,i.prototype.video_ack_required=!1,i.prototype.session_id=f.Long?f.Long.fromBits(0,0,!0):0,i.prototype.version="",i.prototype.os_login=null,i.prototype.my_platform="",i.prototype.hwid=f.newBuffer([]);let o;return Object.defineProperty(i.prototype,"union",{get:f.oneOfGetter(o=["file_transfer","port_forward","view_camera"]),set:f.oneOfSetter(o)}),i.create=function(t){return new i(t)},i.encode=function(t,n){return n||(n=E.create()),t.username!=null&&Object.hasOwnProperty.call(t,"username")&&n.uint32(10).string(t.username),t.password!=null&&Object.hasOwnProperty.call(t,"password")&&n.uint32(18).bytes(t.password),t.my_id!=null&&Object.hasOwnProperty.call(t,"my_id")&&n.uint32(34).string(t.my_id),t.my_name!=null&&Object.hasOwnProperty.call(t,"my_name")&&n.uint32(42).string(t.my_name),t.option!=null&&Object.hasOwnProperty.call(t,"option")&&u.hbb.OptionMessage.encode(t.option,n.uint32(50).fork()).ldelim(),t.file_transfer!=null&&Object.hasOwnProperty.call(t,"file_transfer")&&u.hbb.FileTransfer.encode(t.file_transfer,n.uint32(58).fork()).ldelim(),t.port_forward!=null&&Object.hasOwnProperty.call(t,"port_forward")&&u.hbb.PortForward.encode(t.port_forward,n.uint32(66).fork()).ldelim(),t.video_ack_required!=null&&Object.hasOwnProperty.call(t,"video_ack_required")&&n.uint32(72).bool(t.video_ack_required),t.session_id!=null&&Object.hasOwnProperty.call(t,"session_id")&&n.uint32(80).uint64(t.session_id),t.version!=null&&Object.hasOwnProperty.call(t,"version")&&n.uint32(90).string(t.version),t.os_login!=null&&Object.hasOwnProperty.call(t,"os_login")&&u.hbb.OSLogin.encode(t.os_login,n.uint32(98).fork()).ldelim(),t.my_platform!=null&&Object.hasOwnProperty.call(t,"my_platform")&&n.uint32(106).string(t.my_platform),t.hwid!=null&&Object.hasOwnProperty.call(t,"hwid")&&n.uint32(114).bytes(t.hwid),t.view_camera!=null&&Object.hasOwnProperty.call(t,"view_camera")&&u.hbb.ViewCamera.encode(t.view_camera,n.uint32(122).fork()).ldelim(),n},i.encodeDelimited=function(t,n){return this.encode(t,n).ldelim()},i.decode=function(t,n,r,l){if(t instanceof s||(t=s.create(t)),l===void 0&&(l=0),l>s.recursionLimit)throw Error("maximum nesting depth exceeded");let d=n===void 0?t.len:t.pos+n,c=new u.hbb.LoginRequest;for(;t.pos<d;){let w=t.uint32();if(w===r)break;switch(w>>>3){case 1:{c.username=t.string();break}case 2:{c.password=t.bytes();break}case 4:{c.my_id=t.string();break}case 5:{c.my_name=t.string();break}case 6:{c.option=u.hbb.OptionMessage.decode(t,t.uint32(),void 0,l+1);break}case 7:{c.file_transfer=u.hbb.FileTransfer.decode(t,t.uint32(),void 0,l+1);break}case 8:{c.port_forward=u.hbb.PortForward.decode(t,t.uint32(),void 0,l+1);break}case 15:{c.view_camera=u.hbb.ViewCamera.decode(t,t.uint32(),void 0,l+1);break}case 9:{c.video_ack_required=t.bool();break}case 10:{c.session_id=t.uint64();break}case 11:{c.version=t.string();break}case 12:{c.os_login=u.hbb.OSLogin.decode(t,t.uint32(),void 0,l+1);break}case 13:{c.my_platform=t.string();break}case 14:{c.hwid=t.bytes();break}default:t.skipType(w&7,l);break}}return c},i.decodeDelimited=function(t){return t instanceof s||(t=new s(t)),this.decode(t,t.uint32())},i.verify=function(t,n){if(typeof t!="object"||t===null)return"object expected";if(n===void 0&&(n=0),n>f.recursionLimit)return"maximum nesting depth exceeded";let r={};if(t.username!=null&&t.hasOwnProperty("username")&&!f.isString(t.username))return"username: string expected";if(t.password!=null&&t.hasOwnProperty("password")&&!(t.password&&typeof t.password.length=="number"||f.isString(t.password)))return"password: buffer expected";if(t.my_id!=null&&t.hasOwnProperty("my_id")&&!f.isString(t.my_id))return"my_id: string expected";if(t.my_name!=null&&t.hasOwnProperty("my_name")&&!f.isString(t.my_name))return"my_name: string expected";if(t.option!=null&&t.hasOwnProperty("option")){let l=u.hbb.OptionMessage.verify(t.option,n+1);if(l)return"option."+l}if(t.file_transfer!=null&&t.hasOwnProperty("file_transfer")){r.union=1;{let l=u.hbb.FileTransfer.verify(t.file_transfer,n+1);if(l)return"file_transfer."+l}}if(t.port_forward!=null&&t.hasOwnProperty("port_forward")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.PortForward.verify(t.port_forward,n+1);if(l)return"port_forward."+l}}if(t.view_camera!=null&&t.hasOwnProperty("view_camera")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.ViewCamera.verify(t.view_camera,n+1);if(l)return"view_camera."+l}}if(t.video_ack_required!=null&&t.hasOwnProperty("video_ack_required")&&typeof t.video_ack_required!="boolean")return"video_ack_required: boolean expected";if(t.session_id!=null&&t.hasOwnProperty("session_id")&&!f.isInteger(t.session_id)&&!(t.session_id&&f.isInteger(t.session_id.low)&&f.isInteger(t.session_id.high)))return"session_id: integer|Long expected";if(t.version!=null&&t.hasOwnProperty("version")&&!f.isString(t.version))return"version: string expected";if(t.os_login!=null&&t.hasOwnProperty("os_login")){let l=u.hbb.OSLogin.verify(t.os_login,n+1);if(l)return"os_login."+l}return t.my_platform!=null&&t.hasOwnProperty("my_platform")&&!f.isString(t.my_platform)?"my_platform: string expected":t.hwid!=null&&t.hasOwnProperty("hwid")&&!(t.hwid&&typeof t.hwid.length=="number"||f.isString(t.hwid))?"hwid: buffer expected":null},i.fromObject=function(t,n){if(t instanceof u.hbb.LoginRequest)return t;if(n===void 0&&(n=0),n>f.recursionLimit)throw Error("maximum nesting depth exceeded");let r=new u.hbb.LoginRequest;if(t.username!=null&&(r.username=String(t.username)),t.password!=null&&(typeof t.password=="string"?f.base64.decode(t.password,r.password=f.newBuffer(f.base64.length(t.password)),0):t.password.length>=0&&(r.password=t.password)),t.my_id!=null&&(r.my_id=String(t.my_id)),t.my_name!=null&&(r.my_name=String(t.my_name)),t.option!=null){if(typeof t.option!="object")throw TypeError(".hbb.LoginRequest.option: object expected");r.option=u.hbb.OptionMessage.fromObject(t.option,n+1)}if(t.file_transfer!=null){if(typeof t.file_transfer!="object")throw TypeError(".hbb.LoginRequest.file_transfer: object expected");r.file_transfer=u.hbb.FileTransfer.fromObject(t.file_transfer,n+1)}if(t.port_forward!=null){if(typeof t.port_forward!="object")throw TypeError(".hbb.LoginRequest.port_forward: object expected");r.port_forward=u.hbb.PortForward.fromObject(t.port_forward,n+1)}if(t.view_camera!=null){if(typeof t.view_camera!="object")throw TypeError(".hbb.LoginRequest.view_camera: object expected");r.view_camera=u.hbb.ViewCamera.fromObject(t.view_camera,n+1)}if(t.video_ack_required!=null&&(r.video_ack_required=!!t.video_ack_required),t.session_id!=null&&(f.Long?(r.session_id=f.Long.fromValue(t.session_id)).unsigned=!0:typeof t.session_id=="string"?r.session_id=parseInt(t.session_id,10):typeof t.session_id=="number"?r.session_id=t.session_id:typeof t.session_id=="object"&&(r.session_id=new f.LongBits(t.session_id.low>>>0,t.session_id.high>>>0).toNumber(!0))),t.version!=null&&(r.version=String(t.version)),t.os_login!=null){if(typeof t.os_login!="object")throw TypeError(".hbb.LoginRequest.os_login: object expected");r.os_login=u.hbb.OSLogin.fromObject(t.os_login,n+1)}return t.my_platform!=null&&(r.my_platform=String(t.my_platform)),t.hwid!=null&&(typeof t.hwid=="string"?f.base64.decode(t.hwid,r.hwid=f.newBuffer(f.base64.length(t.hwid)),0):t.hwid.length>=0&&(r.hwid=t.hwid)),r},i.toObject=function(t,n){n||(n={});let r={};if(n.defaults){if(r.username="",n.bytes===String?r.password="":(r.password=[],n.bytes!==Array&&(r.password=f.newBuffer(r.password))),r.my_id="",r.my_name="",r.option=null,r.video_ack_required=!1,f.Long){let l=new f.Long(0,0,!0);r.session_id=n.longs===String?l.toString():n.longs===Number?l.toNumber():l}else r.session_id=n.longs===String?"0":0;r.version="",r.os_login=null,r.my_platform="",n.bytes===String?r.hwid="":(r.hwid=[],n.bytes!==Array&&(r.hwid=f.newBuffer(r.hwid)))}return t.username!=null&&t.hasOwnProperty("username")&&(r.username=t.username),t.password!=null&&t.hasOwnProperty("password")&&(r.password=n.bytes===String?f.base64.encode(t.password,0,t.password.length):n.bytes===Array?Array.prototype.slice.call(t.password):t.password),t.my_id!=null&&t.hasOwnProperty("my_id")&&(r.my_id=t.my_id),t.my_name!=null&&t.hasOwnProperty("my_name")&&(r.my_name=t.my_name),t.option!=null&&t.hasOwnProperty("option")&&(r.option=u.hbb.OptionMessage.toObject(t.option,n)),t.file_transfer!=null&&t.hasOwnProperty("file_transfer")&&(r.file_transfer=u.hbb.FileTransfer.toObject(t.file_transfer,n),n.oneofs&&(r.union="file_transfer")),t.port_forward!=null&&t.hasOwnProperty("port_forward")&&(r.port_forward=u.hbb.PortForward.toObject(t.port_forward,n),n.oneofs&&(r.union="port_forward")),t.video_ack_required!=null&&t.hasOwnProperty("video_ack_required")&&(r.video_ack_required=t.video_ack_required),t.session_id!=null&&t.hasOwnProperty("session_id")&&(typeof t.session_id=="number"?r.session_id=n.longs===String?String(t.session_id):t.session_id:r.session_id=n.longs===String?f.Long.prototype.toString.call(t.session_id):n.longs===Number?new f.LongBits(t.session_id.low>>>0,t.session_id.high>>>0).toNumber(!0):t.session_id),t.version!=null&&t.hasOwnProperty("version")&&(r.version=t.version),t.os_login!=null&&t.hasOwnProperty("os_login")&&(r.os_login=u.hbb.OSLogin.toObject(t.os_login,n)),t.my_platform!=null&&t.hasOwnProperty("my_platform")&&(r.my_platform=t.my_platform),t.hwid!=null&&t.hasOwnProperty("hwid")&&(r.hwid=n.bytes===String?f.base64.encode(t.hwid,0,t.hwid.length):n.bytes===Array?Array.prototype.slice.call(t.hwid):t.hwid),t.view_camera!=null&&t.hasOwnProperty("view_camera")&&(r.view_camera=u.hbb.ViewCamera.toObject(t.view_camera,n),n.oneofs&&(r.union="view_camera")),r},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/hbb.LoginRequest"},i}(),p.Auth2FA=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.code="",i.prototype.hwid=f.newBuffer([]),i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.code!=null&&Object.hasOwnProperty.call(e,"code")&&t.uint32(10).string(e.code),e.hwid!=null&&Object.hasOwnProperty.call(e,"hwid")&&t.uint32(18).bytes(e.hwid),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.Auth2FA;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.code=e.string();break}case 2:{d.hwid=e.bytes();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.code!=null&&e.hasOwnProperty("code")&&!f.isString(e.code)?"code: string expected":e.hwid!=null&&e.hasOwnProperty("hwid")&&!(e.hwid&&typeof e.hwid.length=="number"||f.isString(e.hwid))?"hwid: buffer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.Auth2FA)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.Auth2FA;return e.code!=null&&(n.code=String(e.code)),e.hwid!=null&&(typeof e.hwid=="string"?f.base64.decode(e.hwid,n.hwid=f.newBuffer(f.base64.length(e.hwid)),0):e.hwid.length>=0&&(n.hwid=e.hwid)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.code="",t.bytes===String?n.hwid="":(n.hwid=[],t.bytes!==Array&&(n.hwid=f.newBuffer(n.hwid)))),e.code!=null&&e.hasOwnProperty("code")&&(n.code=e.code),e.hwid!=null&&e.hasOwnProperty("hwid")&&(n.hwid=t.bytes===String?f.base64.encode(e.hwid,0,e.hwid.length):t.bytes===Array?Array.prototype.slice.call(e.hwid):e.hwid),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.Auth2FA"},i}(),p.ChatMessage=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.text="",i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.text!=null&&Object.hasOwnProperty.call(e,"text")&&t.uint32(10).string(e.text),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.ChatMessage;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.text=e.string();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.text!=null&&e.hasOwnProperty("text")&&!f.isString(e.text)?"text: string expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.ChatMessage)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.ChatMessage;return e.text!=null&&(n.text=String(e.text)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.text=""),e.text!=null&&e.hasOwnProperty("text")&&(n.text=e.text),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.ChatMessage"},i}(),p.Features=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.privacy_mode=!1,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.privacy_mode!=null&&Object.hasOwnProperty.call(e,"privacy_mode")&&t.uint32(8).bool(e.privacy_mode),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.Features;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.privacy_mode=e.bool();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.privacy_mode!=null&&e.hasOwnProperty("privacy_mode")&&typeof e.privacy_mode!="boolean"?"privacy_mode: boolean expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.Features)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.Features;return e.privacy_mode!=null&&(n.privacy_mode=!!e.privacy_mode),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.privacy_mode=!1),e.privacy_mode!=null&&e.hasOwnProperty("privacy_mode")&&(n.privacy_mode=e.privacy_mode),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.Features"},i}(),p.CodecAbility=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.vp8=!1,i.prototype.vp9=!1,i.prototype.av1=!1,i.prototype.h264=!1,i.prototype.h265=!1,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.vp8!=null&&Object.hasOwnProperty.call(e,"vp8")&&t.uint32(8).bool(e.vp8),e.vp9!=null&&Object.hasOwnProperty.call(e,"vp9")&&t.uint32(16).bool(e.vp9),e.av1!=null&&Object.hasOwnProperty.call(e,"av1")&&t.uint32(24).bool(e.av1),e.h264!=null&&Object.hasOwnProperty.call(e,"h264")&&t.uint32(32).bool(e.h264),e.h265!=null&&Object.hasOwnProperty.call(e,"h265")&&t.uint32(40).bool(e.h265),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.CodecAbility;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.vp8=e.bool();break}case 2:{d.vp9=e.bool();break}case 3:{d.av1=e.bool();break}case 4:{d.h264=e.bool();break}case 5:{d.h265=e.bool();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.vp8!=null&&e.hasOwnProperty("vp8")&&typeof e.vp8!="boolean"?"vp8: boolean expected":e.vp9!=null&&e.hasOwnProperty("vp9")&&typeof e.vp9!="boolean"?"vp9: boolean expected":e.av1!=null&&e.hasOwnProperty("av1")&&typeof e.av1!="boolean"?"av1: boolean expected":e.h264!=null&&e.hasOwnProperty("h264")&&typeof e.h264!="boolean"?"h264: boolean expected":e.h265!=null&&e.hasOwnProperty("h265")&&typeof e.h265!="boolean"?"h265: boolean expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.CodecAbility)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.CodecAbility;return e.vp8!=null&&(n.vp8=!!e.vp8),e.vp9!=null&&(n.vp9=!!e.vp9),e.av1!=null&&(n.av1=!!e.av1),e.h264!=null&&(n.h264=!!e.h264),e.h265!=null&&(n.h265=!!e.h265),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.vp8=!1,n.vp9=!1,n.av1=!1,n.h264=!1,n.h265=!1),e.vp8!=null&&e.hasOwnProperty("vp8")&&(n.vp8=e.vp8),e.vp9!=null&&e.hasOwnProperty("vp9")&&(n.vp9=e.vp9),e.av1!=null&&e.hasOwnProperty("av1")&&(n.av1=e.av1),e.h264!=null&&e.hasOwnProperty("h264")&&(n.h264=e.h264),e.h265!=null&&e.hasOwnProperty("h265")&&(n.h265=e.h265),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.CodecAbility"},i}(),p.SupportedEncoding=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.h264=!1,i.prototype.h265=!1,i.prototype.vp8=!1,i.prototype.av1=!1,i.prototype.i444=null,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.h264!=null&&Object.hasOwnProperty.call(e,"h264")&&t.uint32(8).bool(e.h264),e.h265!=null&&Object.hasOwnProperty.call(e,"h265")&&t.uint32(16).bool(e.h265),e.vp8!=null&&Object.hasOwnProperty.call(e,"vp8")&&t.uint32(24).bool(e.vp8),e.av1!=null&&Object.hasOwnProperty.call(e,"av1")&&t.uint32(32).bool(e.av1),e.i444!=null&&Object.hasOwnProperty.call(e,"i444")&&u.hbb.CodecAbility.encode(e.i444,t.uint32(42).fork()).ldelim(),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.SupportedEncoding;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.h264=e.bool();break}case 2:{d.h265=e.bool();break}case 3:{d.vp8=e.bool();break}case 4:{d.av1=e.bool();break}case 5:{d.i444=u.hbb.CodecAbility.decode(e,e.uint32(),void 0,r+1);break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.h264!=null&&e.hasOwnProperty("h264")&&typeof e.h264!="boolean")return"h264: boolean expected";if(e.h265!=null&&e.hasOwnProperty("h265")&&typeof e.h265!="boolean")return"h265: boolean expected";if(e.vp8!=null&&e.hasOwnProperty("vp8")&&typeof e.vp8!="boolean")return"vp8: boolean expected";if(e.av1!=null&&e.hasOwnProperty("av1")&&typeof e.av1!="boolean")return"av1: boolean expected";if(e.i444!=null&&e.hasOwnProperty("i444")){let n=u.hbb.CodecAbility.verify(e.i444,t+1);if(n)return"i444."+n}return null},i.fromObject=function(e,t){if(e instanceof u.hbb.SupportedEncoding)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.SupportedEncoding;if(e.h264!=null&&(n.h264=!!e.h264),e.h265!=null&&(n.h265=!!e.h265),e.vp8!=null&&(n.vp8=!!e.vp8),e.av1!=null&&(n.av1=!!e.av1),e.i444!=null){if(typeof e.i444!="object")throw TypeError(".hbb.SupportedEncoding.i444: object expected");n.i444=u.hbb.CodecAbility.fromObject(e.i444,t+1)}return n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.h264=!1,n.h265=!1,n.vp8=!1,n.av1=!1,n.i444=null),e.h264!=null&&e.hasOwnProperty("h264")&&(n.h264=e.h264),e.h265!=null&&e.hasOwnProperty("h265")&&(n.h265=e.h265),e.vp8!=null&&e.hasOwnProperty("vp8")&&(n.vp8=e.vp8),e.av1!=null&&e.hasOwnProperty("av1")&&(n.av1=e.av1),e.i444!=null&&e.hasOwnProperty("i444")&&(n.i444=u.hbb.CodecAbility.toObject(e.i444,t)),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.SupportedEncoding"},i}(),p.PeerInfo=function(){function i(o){if(this.displays=[],o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.username="",i.prototype.hostname="",i.prototype.platform="",i.prototype.displays=f.emptyArray,i.prototype.current_display=0,i.prototype.sas_enabled=!1,i.prototype.version="",i.prototype.features=null,i.prototype.encoding=null,i.prototype.resolutions=null,i.prototype.platform_additions="",i.prototype.windows_sessions=null,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=E.create()),e.username!=null&&Object.hasOwnProperty.call(e,"username")&&t.uint32(10).string(e.username),e.hostname!=null&&Object.hasOwnProperty.call(e,"hostname")&&t.uint32(18).string(e.hostname),e.platform!=null&&Object.hasOwnProperty.call(e,"platform")&&t.uint32(26).string(e.platform),e.displays!=null&&e.displays.length)for(let n=0;n<e.displays.length;++n)u.hbb.DisplayInfo.encode(e.displays[n],t.uint32(34).fork()).ldelim();return e.current_display!=null&&Object.hasOwnProperty.call(e,"current_display")&&t.uint32(40).int32(e.current_display),e.sas_enabled!=null&&Object.hasOwnProperty.call(e,"sas_enabled")&&t.uint32(48).bool(e.sas_enabled),e.version!=null&&Object.hasOwnProperty.call(e,"version")&&t.uint32(58).string(e.version),e.features!=null&&Object.hasOwnProperty.call(e,"features")&&u.hbb.Features.encode(e.features,t.uint32(74).fork()).ldelim(),e.encoding!=null&&Object.hasOwnProperty.call(e,"encoding")&&u.hbb.SupportedEncoding.encode(e.encoding,t.uint32(82).fork()).ldelim(),e.resolutions!=null&&Object.hasOwnProperty.call(e,"resolutions")&&u.hbb.SupportedResolutions.encode(e.resolutions,t.uint32(90).fork()).ldelim(),e.platform_additions!=null&&Object.hasOwnProperty.call(e,"platform_additions")&&t.uint32(98).string(e.platform_additions),e.windows_sessions!=null&&Object.hasOwnProperty.call(e,"windows_sessions")&&u.hbb.WindowsSessions.encode(e.windows_sessions,t.uint32(106).fork()).ldelim(),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.PeerInfo;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.username=e.string();break}case 2:{d.hostname=e.string();break}case 3:{d.platform=e.string();break}case 4:{d.displays&&d.displays.length||(d.displays=[]),d.displays.push(u.hbb.DisplayInfo.decode(e,e.uint32(),void 0,r+1));break}case 5:{d.current_display=e.int32();break}case 6:{d.sas_enabled=e.bool();break}case 7:{d.version=e.string();break}case 9:{d.features=u.hbb.Features.decode(e,e.uint32(),void 0,r+1);break}case 10:{d.encoding=u.hbb.SupportedEncoding.decode(e,e.uint32(),void 0,r+1);break}case 11:{d.resolutions=u.hbb.SupportedResolutions.decode(e,e.uint32(),void 0,r+1);break}case 12:{d.platform_additions=e.string();break}case 13:{d.windows_sessions=u.hbb.WindowsSessions.decode(e,e.uint32(),void 0,r+1);break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.username!=null&&e.hasOwnProperty("username")&&!f.isString(e.username))return"username: string expected";if(e.hostname!=null&&e.hasOwnProperty("hostname")&&!f.isString(e.hostname))return"hostname: string expected";if(e.platform!=null&&e.hasOwnProperty("platform")&&!f.isString(e.platform))return"platform: string expected";if(e.displays!=null&&e.hasOwnProperty("displays")){if(!Array.isArray(e.displays))return"displays: array expected";for(let n=0;n<e.displays.length;++n){let r=u.hbb.DisplayInfo.verify(e.displays[n],t+1);if(r)return"displays."+r}}if(e.current_display!=null&&e.hasOwnProperty("current_display")&&!f.isInteger(e.current_display))return"current_display: integer expected";if(e.sas_enabled!=null&&e.hasOwnProperty("sas_enabled")&&typeof e.sas_enabled!="boolean")return"sas_enabled: boolean expected";if(e.version!=null&&e.hasOwnProperty("version")&&!f.isString(e.version))return"version: string expected";if(e.features!=null&&e.hasOwnProperty("features")){let n=u.hbb.Features.verify(e.features,t+1);if(n)return"features."+n}if(e.encoding!=null&&e.hasOwnProperty("encoding")){let n=u.hbb.SupportedEncoding.verify(e.encoding,t+1);if(n)return"encoding."+n}if(e.resolutions!=null&&e.hasOwnProperty("resolutions")){let n=u.hbb.SupportedResolutions.verify(e.resolutions,t+1);if(n)return"resolutions."+n}if(e.platform_additions!=null&&e.hasOwnProperty("platform_additions")&&!f.isString(e.platform_additions))return"platform_additions: string expected";if(e.windows_sessions!=null&&e.hasOwnProperty("windows_sessions")){let n=u.hbb.WindowsSessions.verify(e.windows_sessions,t+1);if(n)return"windows_sessions."+n}return null},i.fromObject=function(e,t){if(e instanceof u.hbb.PeerInfo)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.PeerInfo;if(e.username!=null&&(n.username=String(e.username)),e.hostname!=null&&(n.hostname=String(e.hostname)),e.platform!=null&&(n.platform=String(e.platform)),e.displays){if(!Array.isArray(e.displays))throw TypeError(".hbb.PeerInfo.displays: array expected");n.displays=[];for(let r=0;r<e.displays.length;++r){if(typeof e.displays[r]!="object")throw TypeError(".hbb.PeerInfo.displays: object expected");n.displays[r]=u.hbb.DisplayInfo.fromObject(e.displays[r],t+1)}}if(e.current_display!=null&&(n.current_display=e.current_display|0),e.sas_enabled!=null&&(n.sas_enabled=!!e.sas_enabled),e.version!=null&&(n.version=String(e.version)),e.features!=null){if(typeof e.features!="object")throw TypeError(".hbb.PeerInfo.features: object expected");n.features=u.hbb.Features.fromObject(e.features,t+1)}if(e.encoding!=null){if(typeof e.encoding!="object")throw TypeError(".hbb.PeerInfo.encoding: object expected");n.encoding=u.hbb.SupportedEncoding.fromObject(e.encoding,t+1)}if(e.resolutions!=null){if(typeof e.resolutions!="object")throw TypeError(".hbb.PeerInfo.resolutions: object expected");n.resolutions=u.hbb.SupportedResolutions.fromObject(e.resolutions,t+1)}if(e.platform_additions!=null&&(n.platform_additions=String(e.platform_additions)),e.windows_sessions!=null){if(typeof e.windows_sessions!="object")throw TypeError(".hbb.PeerInfo.windows_sessions: object expected");n.windows_sessions=u.hbb.WindowsSessions.fromObject(e.windows_sessions,t+1)}return n},i.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.displays=[]),t.defaults&&(n.username="",n.hostname="",n.platform="",n.current_display=0,n.sas_enabled=!1,n.version="",n.features=null,n.encoding=null,n.resolutions=null,n.platform_additions="",n.windows_sessions=null),e.username!=null&&e.hasOwnProperty("username")&&(n.username=e.username),e.hostname!=null&&e.hasOwnProperty("hostname")&&(n.hostname=e.hostname),e.platform!=null&&e.hasOwnProperty("platform")&&(n.platform=e.platform),e.displays&&e.displays.length){n.displays=[];for(let r=0;r<e.displays.length;++r)n.displays[r]=u.hbb.DisplayInfo.toObject(e.displays[r],t)}return e.current_display!=null&&e.hasOwnProperty("current_display")&&(n.current_display=e.current_display),e.sas_enabled!=null&&e.hasOwnProperty("sas_enabled")&&(n.sas_enabled=e.sas_enabled),e.version!=null&&e.hasOwnProperty("version")&&(n.version=e.version),e.features!=null&&e.hasOwnProperty("features")&&(n.features=u.hbb.Features.toObject(e.features,t)),e.encoding!=null&&e.hasOwnProperty("encoding")&&(n.encoding=u.hbb.SupportedEncoding.toObject(e.encoding,t)),e.resolutions!=null&&e.hasOwnProperty("resolutions")&&(n.resolutions=u.hbb.SupportedResolutions.toObject(e.resolutions,t)),e.platform_additions!=null&&e.hasOwnProperty("platform_additions")&&(n.platform_additions=e.platform_additions),e.windows_sessions!=null&&e.hasOwnProperty("windows_sessions")&&(n.windows_sessions=u.hbb.WindowsSessions.toObject(e.windows_sessions,t)),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.PeerInfo"},i}(),p.WindowsSession=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.sid=0,i.prototype.name="",i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.sid!=null&&Object.hasOwnProperty.call(e,"sid")&&t.uint32(8).uint32(e.sid),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&t.uint32(18).string(e.name),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.WindowsSession;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.sid=e.uint32();break}case 2:{d.name=e.string();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.sid!=null&&e.hasOwnProperty("sid")&&!f.isInteger(e.sid)?"sid: integer expected":e.name!=null&&e.hasOwnProperty("name")&&!f.isString(e.name)?"name: string expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.WindowsSession)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.WindowsSession;return e.sid!=null&&(n.sid=e.sid>>>0),e.name!=null&&(n.name=String(e.name)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.sid=0,n.name=""),e.sid!=null&&e.hasOwnProperty("sid")&&(n.sid=e.sid),e.name!=null&&e.hasOwnProperty("name")&&(n.name=e.name),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.WindowsSession"},i}(),p.LoginResponse=function(){function i(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)e[t[n]]!=null&&t[n]!=="__proto__"&&(this[t[n]]=e[t[n]])}i.prototype.error=null,i.prototype.peer_info=null,i.prototype.enable_trusted_devices=!1;let o;return Object.defineProperty(i.prototype,"union",{get:f.oneOfGetter(o=["error","peer_info"]),set:f.oneOfSetter(o)}),i.create=function(t){return new i(t)},i.encode=function(t,n){return n||(n=E.create()),t.error!=null&&Object.hasOwnProperty.call(t,"error")&&n.uint32(10).string(t.error),t.peer_info!=null&&Object.hasOwnProperty.call(t,"peer_info")&&u.hbb.PeerInfo.encode(t.peer_info,n.uint32(18).fork()).ldelim(),t.enable_trusted_devices!=null&&Object.hasOwnProperty.call(t,"enable_trusted_devices")&&n.uint32(24).bool(t.enable_trusted_devices),n},i.encodeDelimited=function(t,n){return this.encode(t,n).ldelim()},i.decode=function(t,n,r,l){if(t instanceof s||(t=s.create(t)),l===void 0&&(l=0),l>s.recursionLimit)throw Error("maximum nesting depth exceeded");let d=n===void 0?t.len:t.pos+n,c=new u.hbb.LoginResponse;for(;t.pos<d;){let w=t.uint32();if(w===r)break;switch(w>>>3){case 1:{c.error=t.string();break}case 2:{c.peer_info=u.hbb.PeerInfo.decode(t,t.uint32(),void 0,l+1);break}case 3:{c.enable_trusted_devices=t.bool();break}default:t.skipType(w&7,l);break}}return c},i.decodeDelimited=function(t){return t instanceof s||(t=new s(t)),this.decode(t,t.uint32())},i.verify=function(t,n){if(typeof t!="object"||t===null)return"object expected";if(n===void 0&&(n=0),n>f.recursionLimit)return"maximum nesting depth exceeded";let r={};if(t.error!=null&&t.hasOwnProperty("error")&&(r.union=1,!f.isString(t.error)))return"error: string expected";if(t.peer_info!=null&&t.hasOwnProperty("peer_info")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.PeerInfo.verify(t.peer_info,n+1);if(l)return"peer_info."+l}}return t.enable_trusted_devices!=null&&t.hasOwnProperty("enable_trusted_devices")&&typeof t.enable_trusted_devices!="boolean"?"enable_trusted_devices: boolean expected":null},i.fromObject=function(t,n){if(t instanceof u.hbb.LoginResponse)return t;if(n===void 0&&(n=0),n>f.recursionLimit)throw Error("maximum nesting depth exceeded");let r=new u.hbb.LoginResponse;if(t.error!=null&&(r.error=String(t.error)),t.peer_info!=null){if(typeof t.peer_info!="object")throw TypeError(".hbb.LoginResponse.peer_info: object expected");r.peer_info=u.hbb.PeerInfo.fromObject(t.peer_info,n+1)}return t.enable_trusted_devices!=null&&(r.enable_trusted_devices=!!t.enable_trusted_devices),r},i.toObject=function(t,n){n||(n={});let r={};return n.defaults&&(r.enable_trusted_devices=!1),t.error!=null&&t.hasOwnProperty("error")&&(r.error=t.error,n.oneofs&&(r.union="error")),t.peer_info!=null&&t.hasOwnProperty("peer_info")&&(r.peer_info=u.hbb.PeerInfo.toObject(t.peer_info,n),n.oneofs&&(r.union="peer_info")),t.enable_trusted_devices!=null&&t.hasOwnProperty("enable_trusted_devices")&&(r.enable_trusted_devices=t.enable_trusted_devices),r},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/hbb.LoginResponse"},i}(),p.TouchScaleUpdate=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.scale=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.scale!=null&&Object.hasOwnProperty.call(e,"scale")&&t.uint32(8).int32(e.scale),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.TouchScaleUpdate;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.scale=e.int32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.scale!=null&&e.hasOwnProperty("scale")&&!f.isInteger(e.scale)?"scale: integer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.TouchScaleUpdate)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.TouchScaleUpdate;return e.scale!=null&&(n.scale=e.scale|0),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.scale=0),e.scale!=null&&e.hasOwnProperty("scale")&&(n.scale=e.scale),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.TouchScaleUpdate"},i}(),p.TouchPanStart=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.x=0,i.prototype.y=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.x!=null&&Object.hasOwnProperty.call(e,"x")&&t.uint32(8).int32(e.x),e.y!=null&&Object.hasOwnProperty.call(e,"y")&&t.uint32(16).int32(e.y),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.TouchPanStart;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.x=e.int32();break}case 2:{d.y=e.int32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.x!=null&&e.hasOwnProperty("x")&&!f.isInteger(e.x)?"x: integer expected":e.y!=null&&e.hasOwnProperty("y")&&!f.isInteger(e.y)?"y: integer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.TouchPanStart)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.TouchPanStart;return e.x!=null&&(n.x=e.x|0),e.y!=null&&(n.y=e.y|0),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.x=0,n.y=0),e.x!=null&&e.hasOwnProperty("x")&&(n.x=e.x),e.y!=null&&e.hasOwnProperty("y")&&(n.y=e.y),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.TouchPanStart"},i}(),p.TouchPanUpdate=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.x=0,i.prototype.y=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.x!=null&&Object.hasOwnProperty.call(e,"x")&&t.uint32(8).int32(e.x),e.y!=null&&Object.hasOwnProperty.call(e,"y")&&t.uint32(16).int32(e.y),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.TouchPanUpdate;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.x=e.int32();break}case 2:{d.y=e.int32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.x!=null&&e.hasOwnProperty("x")&&!f.isInteger(e.x)?"x: integer expected":e.y!=null&&e.hasOwnProperty("y")&&!f.isInteger(e.y)?"y: integer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.TouchPanUpdate)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.TouchPanUpdate;return e.x!=null&&(n.x=e.x|0),e.y!=null&&(n.y=e.y|0),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.x=0,n.y=0),e.x!=null&&e.hasOwnProperty("x")&&(n.x=e.x),e.y!=null&&e.hasOwnProperty("y")&&(n.y=e.y),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.TouchPanUpdate"},i}(),p.TouchPanEnd=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.x=0,i.prototype.y=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.x!=null&&Object.hasOwnProperty.call(e,"x")&&t.uint32(8).int32(e.x),e.y!=null&&Object.hasOwnProperty.call(e,"y")&&t.uint32(16).int32(e.y),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.TouchPanEnd;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.x=e.int32();break}case 2:{d.y=e.int32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.x!=null&&e.hasOwnProperty("x")&&!f.isInteger(e.x)?"x: integer expected":e.y!=null&&e.hasOwnProperty("y")&&!f.isInteger(e.y)?"y: integer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.TouchPanEnd)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.TouchPanEnd;return e.x!=null&&(n.x=e.x|0),e.y!=null&&(n.y=e.y|0),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.x=0,n.y=0),e.x!=null&&e.hasOwnProperty("x")&&(n.x=e.x),e.y!=null&&e.hasOwnProperty("y")&&(n.y=e.y),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.TouchPanEnd"},i}(),p.TouchEvent=function(){function i(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)e[t[n]]!=null&&t[n]!=="__proto__"&&(this[t[n]]=e[t[n]])}i.prototype.scale_update=null,i.prototype.pan_start=null,i.prototype.pan_update=null,i.prototype.pan_end=null;let o;return Object.defineProperty(i.prototype,"union",{get:f.oneOfGetter(o=["scale_update","pan_start","pan_update","pan_end"]),set:f.oneOfSetter(o)}),i.create=function(t){return new i(t)},i.encode=function(t,n){return n||(n=E.create()),t.scale_update!=null&&Object.hasOwnProperty.call(t,"scale_update")&&u.hbb.TouchScaleUpdate.encode(t.scale_update,n.uint32(10).fork()).ldelim(),t.pan_start!=null&&Object.hasOwnProperty.call(t,"pan_start")&&u.hbb.TouchPanStart.encode(t.pan_start,n.uint32(18).fork()).ldelim(),t.pan_update!=null&&Object.hasOwnProperty.call(t,"pan_update")&&u.hbb.TouchPanUpdate.encode(t.pan_update,n.uint32(26).fork()).ldelim(),t.pan_end!=null&&Object.hasOwnProperty.call(t,"pan_end")&&u.hbb.TouchPanEnd.encode(t.pan_end,n.uint32(34).fork()).ldelim(),n},i.encodeDelimited=function(t,n){return this.encode(t,n).ldelim()},i.decode=function(t,n,r,l){if(t instanceof s||(t=s.create(t)),l===void 0&&(l=0),l>s.recursionLimit)throw Error("maximum nesting depth exceeded");let d=n===void 0?t.len:t.pos+n,c=new u.hbb.TouchEvent;for(;t.pos<d;){let w=t.uint32();if(w===r)break;switch(w>>>3){case 1:{c.scale_update=u.hbb.TouchScaleUpdate.decode(t,t.uint32(),void 0,l+1);break}case 2:{c.pan_start=u.hbb.TouchPanStart.decode(t,t.uint32(),void 0,l+1);break}case 3:{c.pan_update=u.hbb.TouchPanUpdate.decode(t,t.uint32(),void 0,l+1);break}case 4:{c.pan_end=u.hbb.TouchPanEnd.decode(t,t.uint32(),void 0,l+1);break}default:t.skipType(w&7,l);break}}return c},i.decodeDelimited=function(t){return t instanceof s||(t=new s(t)),this.decode(t,t.uint32())},i.verify=function(t,n){if(typeof t!="object"||t===null)return"object expected";if(n===void 0&&(n=0),n>f.recursionLimit)return"maximum nesting depth exceeded";let r={};if(t.scale_update!=null&&t.hasOwnProperty("scale_update")){r.union=1;{let l=u.hbb.TouchScaleUpdate.verify(t.scale_update,n+1);if(l)return"scale_update."+l}}if(t.pan_start!=null&&t.hasOwnProperty("pan_start")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.TouchPanStart.verify(t.pan_start,n+1);if(l)return"pan_start."+l}}if(t.pan_update!=null&&t.hasOwnProperty("pan_update")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.TouchPanUpdate.verify(t.pan_update,n+1);if(l)return"pan_update."+l}}if(t.pan_end!=null&&t.hasOwnProperty("pan_end")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.TouchPanEnd.verify(t.pan_end,n+1);if(l)return"pan_end."+l}}return null},i.fromObject=function(t,n){if(t instanceof u.hbb.TouchEvent)return t;if(n===void 0&&(n=0),n>f.recursionLimit)throw Error("maximum nesting depth exceeded");let r=new u.hbb.TouchEvent;if(t.scale_update!=null){if(typeof t.scale_update!="object")throw TypeError(".hbb.TouchEvent.scale_update: object expected");r.scale_update=u.hbb.TouchScaleUpdate.fromObject(t.scale_update,n+1)}if(t.pan_start!=null){if(typeof t.pan_start!="object")throw TypeError(".hbb.TouchEvent.pan_start: object expected");r.pan_start=u.hbb.TouchPanStart.fromObject(t.pan_start,n+1)}if(t.pan_update!=null){if(typeof t.pan_update!="object")throw TypeError(".hbb.TouchEvent.pan_update: object expected");r.pan_update=u.hbb.TouchPanUpdate.fromObject(t.pan_update,n+1)}if(t.pan_end!=null){if(typeof t.pan_end!="object")throw TypeError(".hbb.TouchEvent.pan_end: object expected");r.pan_end=u.hbb.TouchPanEnd.fromObject(t.pan_end,n+1)}return r},i.toObject=function(t,n){n||(n={});let r={};return t.scale_update!=null&&t.hasOwnProperty("scale_update")&&(r.scale_update=u.hbb.TouchScaleUpdate.toObject(t.scale_update,n),n.oneofs&&(r.union="scale_update")),t.pan_start!=null&&t.hasOwnProperty("pan_start")&&(r.pan_start=u.hbb.TouchPanStart.toObject(t.pan_start,n),n.oneofs&&(r.union="pan_start")),t.pan_update!=null&&t.hasOwnProperty("pan_update")&&(r.pan_update=u.hbb.TouchPanUpdate.toObject(t.pan_update,n),n.oneofs&&(r.union="pan_update")),t.pan_end!=null&&t.hasOwnProperty("pan_end")&&(r.pan_end=u.hbb.TouchPanEnd.toObject(t.pan_end,n),n.oneofs&&(r.union="pan_end")),r},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/hbb.TouchEvent"},i}(),p.PointerDeviceEvent=function(){function i(e){if(this.modifiers=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)e[t[n]]!=null&&t[n]!=="__proto__"&&(this[t[n]]=e[t[n]])}i.prototype.touch_event=null,i.prototype.modifiers=f.emptyArray;let o;return Object.defineProperty(i.prototype,"union",{get:f.oneOfGetter(o=["touch_event"]),set:f.oneOfSetter(o)}),i.create=function(t){return new i(t)},i.encode=function(t,n){if(n||(n=E.create()),t.touch_event!=null&&Object.hasOwnProperty.call(t,"touch_event")&&u.hbb.TouchEvent.encode(t.touch_event,n.uint32(10).fork()).ldelim(),t.modifiers!=null&&t.modifiers.length){n.uint32(18).fork();for(let r=0;r<t.modifiers.length;++r)n.int32(t.modifiers[r]);n.ldelim()}return n},i.encodeDelimited=function(t,n){return this.encode(t,n).ldelim()},i.decode=function(t,n,r,l){if(t instanceof s||(t=s.create(t)),l===void 0&&(l=0),l>s.recursionLimit)throw Error("maximum nesting depth exceeded");let d=n===void 0?t.len:t.pos+n,c=new u.hbb.PointerDeviceEvent;for(;t.pos<d;){let w=t.uint32();if(w===r)break;switch(w>>>3){case 1:{c.touch_event=u.hbb.TouchEvent.decode(t,t.uint32(),void 0,l+1);break}case 2:{if(c.modifiers&&c.modifiers.length||(c.modifiers=[]),(w&7)===2){let j=t.uint32()+t.pos;for(;t.pos<j;)c.modifiers.push(t.int32())}else c.modifiers.push(t.int32());break}default:t.skipType(w&7,l);break}}return c},i.decodeDelimited=function(t){return t instanceof s||(t=new s(t)),this.decode(t,t.uint32())},i.verify=function(t,n){if(typeof t!="object"||t===null)return"object expected";if(n===void 0&&(n=0),n>f.recursionLimit)return"maximum nesting depth exceeded";let r={};if(t.touch_event!=null&&t.hasOwnProperty("touch_event")){r.union=1;{let l=u.hbb.TouchEvent.verify(t.touch_event,n+1);if(l)return"touch_event."+l}}if(t.modifiers!=null&&t.hasOwnProperty("modifiers")){if(!Array.isArray(t.modifiers))return"modifiers: array expected";for(let l=0;l<t.modifiers.length;++l)switch(t.modifiers[l]){default:return"modifiers: enum value[] expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 100:case 101:break}}return null},i.fromObject=function(t,n){if(t instanceof u.hbb.PointerDeviceEvent)return t;if(n===void 0&&(n=0),n>f.recursionLimit)throw Error("maximum nesting depth exceeded");let r=new u.hbb.PointerDeviceEvent;if(t.touch_event!=null){if(typeof t.touch_event!="object")throw TypeError(".hbb.PointerDeviceEvent.touch_event: object expected");r.touch_event=u.hbb.TouchEvent.fromObject(t.touch_event,n+1)}if(t.modifiers){if(!Array.isArray(t.modifiers))throw TypeError(".hbb.PointerDeviceEvent.modifiers: array expected");r.modifiers=[];for(let l=0;l<t.modifiers.length;++l)switch(t.modifiers[l]){default:if(typeof t.modifiers[l]=="number"){r.modifiers[l]=t.modifiers[l];break}case"Unknown":case 0:r.modifiers[l]=0;break;case"Alt":case 1:r.modifiers[l]=1;break;case"Backspace":case 2:r.modifiers[l]=2;break;case"CapsLock":case 3:r.modifiers[l]=3;break;case"Control":case 4:r.modifiers[l]=4;break;case"Delete":case 5:r.modifiers[l]=5;break;case"DownArrow":case 6:r.modifiers[l]=6;break;case"End":case 7:r.modifiers[l]=7;break;case"Escape":case 8:r.modifiers[l]=8;break;case"F1":case 9:r.modifiers[l]=9;break;case"F10":case 10:r.modifiers[l]=10;break;case"F11":case 11:r.modifiers[l]=11;break;case"F12":case 12:r.modifiers[l]=12;break;case"F2":case 13:r.modifiers[l]=13;break;case"F3":case 14:r.modifiers[l]=14;break;case"F4":case 15:r.modifiers[l]=15;break;case"F5":case 16:r.modifiers[l]=16;break;case"F6":case 17:r.modifiers[l]=17;break;case"F7":case 18:r.modifiers[l]=18;break;case"F8":case 19:r.modifiers[l]=19;break;case"F9":case 20:r.modifiers[l]=20;break;case"Home":case 21:r.modifiers[l]=21;break;case"LeftArrow":case 22:r.modifiers[l]=22;break;case"Meta":case 23:r.modifiers[l]=23;break;case"Option":case 24:r.modifiers[l]=24;break;case"PageDown":case 25:r.modifiers[l]=25;break;case"PageUp":case 26:r.modifiers[l]=26;break;case"Return":case 27:r.modifiers[l]=27;break;case"RightArrow":case 28:r.modifiers[l]=28;break;case"Shift":case 29:r.modifiers[l]=29;break;case"Space":case 30:r.modifiers[l]=30;break;case"Tab":case 31:r.modifiers[l]=31;break;case"UpArrow":case 32:r.modifiers[l]=32;break;case"Numpad0":case 33:r.modifiers[l]=33;break;case"Numpad1":case 34:r.modifiers[l]=34;break;case"Numpad2":case 35:r.modifiers[l]=35;break;case"Numpad3":case 36:r.modifiers[l]=36;break;case"Numpad4":case 37:r.modifiers[l]=37;break;case"Numpad5":case 38:r.modifiers[l]=38;break;case"Numpad6":case 39:r.modifiers[l]=39;break;case"Numpad7":case 40:r.modifiers[l]=40;break;case"Numpad8":case 41:r.modifiers[l]=41;break;case"Numpad9":case 42:r.modifiers[l]=42;break;case"Cancel":case 43:r.modifiers[l]=43;break;case"Clear":case 44:r.modifiers[l]=44;break;case"Menu":case 45:r.modifiers[l]=45;break;case"Pause":case 46:r.modifiers[l]=46;break;case"Kana":case 47:r.modifiers[l]=47;break;case"Hangul":case 48:r.modifiers[l]=48;break;case"Junja":case 49:r.modifiers[l]=49;break;case"Final":case 50:r.modifiers[l]=50;break;case"Hanja":case 51:r.modifiers[l]=51;break;case"Kanji":case 52:r.modifiers[l]=52;break;case"Convert":case 53:r.modifiers[l]=53;break;case"Select":case 54:r.modifiers[l]=54;break;case"Print":case 55:r.modifiers[l]=55;break;case"Execute":case 56:r.modifiers[l]=56;break;case"Snapshot":case 57:r.modifiers[l]=57;break;case"Insert":case 58:r.modifiers[l]=58;break;case"Help":case 59:r.modifiers[l]=59;break;case"Sleep":case 60:r.modifiers[l]=60;break;case"Separator":case 61:r.modifiers[l]=61;break;case"Scroll":case 62:r.modifiers[l]=62;break;case"NumLock":case 63:r.modifiers[l]=63;break;case"RWin":case 64:r.modifiers[l]=64;break;case"Apps":case 65:r.modifiers[l]=65;break;case"Multiply":case 66:r.modifiers[l]=66;break;case"Add":case 67:r.modifiers[l]=67;break;case"Subtract":case 68:r.modifiers[l]=68;break;case"Decimal":case 69:r.modifiers[l]=69;break;case"Divide":case 70:r.modifiers[l]=70;break;case"Equals":case 71:r.modifiers[l]=71;break;case"NumpadEnter":case 72:r.modifiers[l]=72;break;case"RShift":case 73:r.modifiers[l]=73;break;case"RControl":case 74:r.modifiers[l]=74;break;case"RAlt":case 75:r.modifiers[l]=75;break;case"VolumeMute":case 76:r.modifiers[l]=76;break;case"VolumeUp":case 77:r.modifiers[l]=77;break;case"VolumeDown":case 78:r.modifiers[l]=78;break;case"Power":case 79:r.modifiers[l]=79;break;case"CtrlAltDel":case 100:r.modifiers[l]=100;break;case"LockScreen":case 101:r.modifiers[l]=101;break}}return r},i.toObject=function(t,n){n||(n={});let r={};if((n.arrays||n.defaults)&&(r.modifiers=[]),t.touch_event!=null&&t.hasOwnProperty("touch_event")&&(r.touch_event=u.hbb.TouchEvent.toObject(t.touch_event,n),n.oneofs&&(r.union="touch_event")),t.modifiers&&t.modifiers.length){r.modifiers=[];for(let l=0;l<t.modifiers.length;++l)r.modifiers[l]=n.enums===String?u.hbb.ControlKey[t.modifiers[l]]===void 0?t.modifiers[l]:u.hbb.ControlKey[t.modifiers[l]]:t.modifiers[l]}return r},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/hbb.PointerDeviceEvent"},i}(),p.MouseEvent=function(){function i(o){if(this.modifiers=[],o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.mask=0,i.prototype.x=0,i.prototype.y=0,i.prototype.modifiers=f.emptyArray,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=E.create()),e.mask!=null&&Object.hasOwnProperty.call(e,"mask")&&t.uint32(8).int32(e.mask),e.x!=null&&Object.hasOwnProperty.call(e,"x")&&t.uint32(16).sint32(e.x),e.y!=null&&Object.hasOwnProperty.call(e,"y")&&t.uint32(24).sint32(e.y),e.modifiers!=null&&e.modifiers.length){t.uint32(34).fork();for(let n=0;n<e.modifiers.length;++n)t.int32(e.modifiers[n]);t.ldelim()}return t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.MouseEvent;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.mask=e.int32();break}case 2:{d.x=e.sint32();break}case 3:{d.y=e.sint32();break}case 4:{if(d.modifiers&&d.modifiers.length||(d.modifiers=[]),(c&7)===2){let w=e.uint32()+e.pos;for(;e.pos<w;)d.modifiers.push(e.int32())}else d.modifiers.push(e.int32());break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.mask!=null&&e.hasOwnProperty("mask")&&!f.isInteger(e.mask))return"mask: integer expected";if(e.x!=null&&e.hasOwnProperty("x")&&!f.isInteger(e.x))return"x: integer expected";if(e.y!=null&&e.hasOwnProperty("y")&&!f.isInteger(e.y))return"y: integer expected";if(e.modifiers!=null&&e.hasOwnProperty("modifiers")){if(!Array.isArray(e.modifiers))return"modifiers: array expected";for(let n=0;n<e.modifiers.length;++n)switch(e.modifiers[n]){default:return"modifiers: enum value[] expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 100:case 101:break}}return null},i.fromObject=function(e,t){if(e instanceof u.hbb.MouseEvent)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.MouseEvent;if(e.mask!=null&&(n.mask=e.mask|0),e.x!=null&&(n.x=e.x|0),e.y!=null&&(n.y=e.y|0),e.modifiers){if(!Array.isArray(e.modifiers))throw TypeError(".hbb.MouseEvent.modifiers: array expected");n.modifiers=[];for(let r=0;r<e.modifiers.length;++r)switch(e.modifiers[r]){default:if(typeof e.modifiers[r]=="number"){n.modifiers[r]=e.modifiers[r];break}case"Unknown":case 0:n.modifiers[r]=0;break;case"Alt":case 1:n.modifiers[r]=1;break;case"Backspace":case 2:n.modifiers[r]=2;break;case"CapsLock":case 3:n.modifiers[r]=3;break;case"Control":case 4:n.modifiers[r]=4;break;case"Delete":case 5:n.modifiers[r]=5;break;case"DownArrow":case 6:n.modifiers[r]=6;break;case"End":case 7:n.modifiers[r]=7;break;case"Escape":case 8:n.modifiers[r]=8;break;case"F1":case 9:n.modifiers[r]=9;break;case"F10":case 10:n.modifiers[r]=10;break;case"F11":case 11:n.modifiers[r]=11;break;case"F12":case 12:n.modifiers[r]=12;break;case"F2":case 13:n.modifiers[r]=13;break;case"F3":case 14:n.modifiers[r]=14;break;case"F4":case 15:n.modifiers[r]=15;break;case"F5":case 16:n.modifiers[r]=16;break;case"F6":case 17:n.modifiers[r]=17;break;case"F7":case 18:n.modifiers[r]=18;break;case"F8":case 19:n.modifiers[r]=19;break;case"F9":case 20:n.modifiers[r]=20;break;case"Home":case 21:n.modifiers[r]=21;break;case"LeftArrow":case 22:n.modifiers[r]=22;break;case"Meta":case 23:n.modifiers[r]=23;break;case"Option":case 24:n.modifiers[r]=24;break;case"PageDown":case 25:n.modifiers[r]=25;break;case"PageUp":case 26:n.modifiers[r]=26;break;case"Return":case 27:n.modifiers[r]=27;break;case"RightArrow":case 28:n.modifiers[r]=28;break;case"Shift":case 29:n.modifiers[r]=29;break;case"Space":case 30:n.modifiers[r]=30;break;case"Tab":case 31:n.modifiers[r]=31;break;case"UpArrow":case 32:n.modifiers[r]=32;break;case"Numpad0":case 33:n.modifiers[r]=33;break;case"Numpad1":case 34:n.modifiers[r]=34;break;case"Numpad2":case 35:n.modifiers[r]=35;break;case"Numpad3":case 36:n.modifiers[r]=36;break;case"Numpad4":case 37:n.modifiers[r]=37;break;case"Numpad5":case 38:n.modifiers[r]=38;break;case"Numpad6":case 39:n.modifiers[r]=39;break;case"Numpad7":case 40:n.modifiers[r]=40;break;case"Numpad8":case 41:n.modifiers[r]=41;break;case"Numpad9":case 42:n.modifiers[r]=42;break;case"Cancel":case 43:n.modifiers[r]=43;break;case"Clear":case 44:n.modifiers[r]=44;break;case"Menu":case 45:n.modifiers[r]=45;break;case"Pause":case 46:n.modifiers[r]=46;break;case"Kana":case 47:n.modifiers[r]=47;break;case"Hangul":case 48:n.modifiers[r]=48;break;case"Junja":case 49:n.modifiers[r]=49;break;case"Final":case 50:n.modifiers[r]=50;break;case"Hanja":case 51:n.modifiers[r]=51;break;case"Kanji":case 52:n.modifiers[r]=52;break;case"Convert":case 53:n.modifiers[r]=53;break;case"Select":case 54:n.modifiers[r]=54;break;case"Print":case 55:n.modifiers[r]=55;break;case"Execute":case 56:n.modifiers[r]=56;break;case"Snapshot":case 57:n.modifiers[r]=57;break;case"Insert":case 58:n.modifiers[r]=58;break;case"Help":case 59:n.modifiers[r]=59;break;case"Sleep":case 60:n.modifiers[r]=60;break;case"Separator":case 61:n.modifiers[r]=61;break;case"Scroll":case 62:n.modifiers[r]=62;break;case"NumLock":case 63:n.modifiers[r]=63;break;case"RWin":case 64:n.modifiers[r]=64;break;case"Apps":case 65:n.modifiers[r]=65;break;case"Multiply":case 66:n.modifiers[r]=66;break;case"Add":case 67:n.modifiers[r]=67;break;case"Subtract":case 68:n.modifiers[r]=68;break;case"Decimal":case 69:n.modifiers[r]=69;break;case"Divide":case 70:n.modifiers[r]=70;break;case"Equals":case 71:n.modifiers[r]=71;break;case"NumpadEnter":case 72:n.modifiers[r]=72;break;case"RShift":case 73:n.modifiers[r]=73;break;case"RControl":case 74:n.modifiers[r]=74;break;case"RAlt":case 75:n.modifiers[r]=75;break;case"VolumeMute":case 76:n.modifiers[r]=76;break;case"VolumeUp":case 77:n.modifiers[r]=77;break;case"VolumeDown":case 78:n.modifiers[r]=78;break;case"Power":case 79:n.modifiers[r]=79;break;case"CtrlAltDel":case 100:n.modifiers[r]=100;break;case"LockScreen":case 101:n.modifiers[r]=101;break}}return n},i.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.modifiers=[]),t.defaults&&(n.mask=0,n.x=0,n.y=0),e.mask!=null&&e.hasOwnProperty("mask")&&(n.mask=e.mask),e.x!=null&&e.hasOwnProperty("x")&&(n.x=e.x),e.y!=null&&e.hasOwnProperty("y")&&(n.y=e.y),e.modifiers&&e.modifiers.length){n.modifiers=[];for(let r=0;r<e.modifiers.length;++r)n.modifiers[r]=t.enums===String?u.hbb.ControlKey[e.modifiers[r]]===void 0?e.modifiers[r]:u.hbb.ControlKey[e.modifiers[r]]:e.modifiers[r]}return n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.MouseEvent"},i}(),p.KeyboardMode=function(){let i={},o=Object.create(i);return o[i[0]="Legacy"]=0,o[i[1]="Map"]=1,o[i[2]="Translate"]=2,o[i[3]="Auto"]=3,o}(),p.ControlKey=function(){let i={},o=Object.create(i);return o[i[0]="Unknown"]=0,o[i[1]="Alt"]=1,o[i[2]="Backspace"]=2,o[i[3]="CapsLock"]=3,o[i[4]="Control"]=4,o[i[5]="Delete"]=5,o[i[6]="DownArrow"]=6,o[i[7]="End"]=7,o[i[8]="Escape"]=8,o[i[9]="F1"]=9,o[i[10]="F10"]=10,o[i[11]="F11"]=11,o[i[12]="F12"]=12,o[i[13]="F2"]=13,o[i[14]="F3"]=14,o[i[15]="F4"]=15,o[i[16]="F5"]=16,o[i[17]="F6"]=17,o[i[18]="F7"]=18,o[i[19]="F8"]=19,o[i[20]="F9"]=20,o[i[21]="Home"]=21,o[i[22]="LeftArrow"]=22,o[i[23]="Meta"]=23,o[i[24]="Option"]=24,o[i[25]="PageDown"]=25,o[i[26]="PageUp"]=26,o[i[27]="Return"]=27,o[i[28]="RightArrow"]=28,o[i[29]="Shift"]=29,o[i[30]="Space"]=30,o[i[31]="Tab"]=31,o[i[32]="UpArrow"]=32,o[i[33]="Numpad0"]=33,o[i[34]="Numpad1"]=34,o[i[35]="Numpad2"]=35,o[i[36]="Numpad3"]=36,o[i[37]="Numpad4"]=37,o[i[38]="Numpad5"]=38,o[i[39]="Numpad6"]=39,o[i[40]="Numpad7"]=40,o[i[41]="Numpad8"]=41,o[i[42]="Numpad9"]=42,o[i[43]="Cancel"]=43,o[i[44]="Clear"]=44,o[i[45]="Menu"]=45,o[i[46]="Pause"]=46,o[i[47]="Kana"]=47,o[i[48]="Hangul"]=48,o[i[49]="Junja"]=49,o[i[50]="Final"]=50,o[i[51]="Hanja"]=51,o[i[52]="Kanji"]=52,o[i[53]="Convert"]=53,o[i[54]="Select"]=54,o[i[55]="Print"]=55,o[i[56]="Execute"]=56,o[i[57]="Snapshot"]=57,o[i[58]="Insert"]=58,o[i[59]="Help"]=59,o[i[60]="Sleep"]=60,o[i[61]="Separator"]=61,o[i[62]="Scroll"]=62,o[i[63]="NumLock"]=63,o[i[64]="RWin"]=64,o[i[65]="Apps"]=65,o[i[66]="Multiply"]=66,o[i[67]="Add"]=67,o[i[68]="Subtract"]=68,o[i[69]="Decimal"]=69,o[i[70]="Divide"]=70,o[i[71]="Equals"]=71,o[i[72]="NumpadEnter"]=72,o[i[73]="RShift"]=73,o[i[74]="RControl"]=74,o[i[75]="RAlt"]=75,o[i[76]="VolumeMute"]=76,o[i[77]="VolumeUp"]=77,o[i[78]="VolumeDown"]=78,o[i[79]="Power"]=79,o[i[100]="CtrlAltDel"]=100,o[i[101]="LockScreen"]=101,o}(),p.KeyEvent=function(){function i(e){if(this.modifiers=[],e)for(let t=Object.keys(e),n=0;n<t.length;++n)e[t[n]]!=null&&t[n]!=="__proto__"&&(this[t[n]]=e[t[n]])}i.prototype.down=!1,i.prototype.press=!1,i.prototype.control_key=null,i.prototype.chr=null,i.prototype.unicode=null,i.prototype.seq=null,i.prototype.win2win_hotkey=null,i.prototype.modifiers=f.emptyArray,i.prototype.mode=0;let o;return Object.defineProperty(i.prototype,"union",{get:f.oneOfGetter(o=["control_key","chr","unicode","seq","win2win_hotkey"]),set:f.oneOfSetter(o)}),i.create=function(t){return new i(t)},i.encode=function(t,n){if(n||(n=E.create()),t.down!=null&&Object.hasOwnProperty.call(t,"down")&&n.uint32(8).bool(t.down),t.press!=null&&Object.hasOwnProperty.call(t,"press")&&n.uint32(16).bool(t.press),t.control_key!=null&&Object.hasOwnProperty.call(t,"control_key")&&n.uint32(24).int32(t.control_key),t.chr!=null&&Object.hasOwnProperty.call(t,"chr")&&n.uint32(32).uint32(t.chr),t.unicode!=null&&Object.hasOwnProperty.call(t,"unicode")&&n.uint32(40).uint32(t.unicode),t.seq!=null&&Object.hasOwnProperty.call(t,"seq")&&n.uint32(50).string(t.seq),t.win2win_hotkey!=null&&Object.hasOwnProperty.call(t,"win2win_hotkey")&&n.uint32(56).uint32(t.win2win_hotkey),t.modifiers!=null&&t.modifiers.length){n.uint32(66).fork();for(let r=0;r<t.modifiers.length;++r)n.int32(t.modifiers[r]);n.ldelim()}return t.mode!=null&&Object.hasOwnProperty.call(t,"mode")&&n.uint32(72).int32(t.mode),n},i.encodeDelimited=function(t,n){return this.encode(t,n).ldelim()},i.decode=function(t,n,r,l){if(t instanceof s||(t=s.create(t)),l===void 0&&(l=0),l>s.recursionLimit)throw Error("maximum nesting depth exceeded");let d=n===void 0?t.len:t.pos+n,c=new u.hbb.KeyEvent;for(;t.pos<d;){let w=t.uint32();if(w===r)break;switch(w>>>3){case 1:{c.down=t.bool();break}case 2:{c.press=t.bool();break}case 3:{c.control_key=t.int32();break}case 4:{c.chr=t.uint32();break}case 5:{c.unicode=t.uint32();break}case 6:{c.seq=t.string();break}case 7:{c.win2win_hotkey=t.uint32();break}case 8:{if(c.modifiers&&c.modifiers.length||(c.modifiers=[]),(w&7)===2){let j=t.uint32()+t.pos;for(;t.pos<j;)c.modifiers.push(t.int32())}else c.modifiers.push(t.int32());break}case 9:{c.mode=t.int32();break}default:t.skipType(w&7,l);break}}return c},i.decodeDelimited=function(t){return t instanceof s||(t=new s(t)),this.decode(t,t.uint32())},i.verify=function(t,n){if(typeof t!="object"||t===null)return"object expected";if(n===void 0&&(n=0),n>f.recursionLimit)return"maximum nesting depth exceeded";let r={};if(t.down!=null&&t.hasOwnProperty("down")&&typeof t.down!="boolean")return"down: boolean expected";if(t.press!=null&&t.hasOwnProperty("press")&&typeof t.press!="boolean")return"press: boolean expected";if(t.control_key!=null&&t.hasOwnProperty("control_key"))switch(r.union=1,t.control_key){default:return"control_key: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 100:case 101:break}if(t.chr!=null&&t.hasOwnProperty("chr")){if(r.union===1)return"union: multiple values";if(r.union=1,!f.isInteger(t.chr))return"chr: integer expected"}if(t.unicode!=null&&t.hasOwnProperty("unicode")){if(r.union===1)return"union: multiple values";if(r.union=1,!f.isInteger(t.unicode))return"unicode: integer expected"}if(t.seq!=null&&t.hasOwnProperty("seq")){if(r.union===1)return"union: multiple values";if(r.union=1,!f.isString(t.seq))return"seq: string expected"}if(t.win2win_hotkey!=null&&t.hasOwnProperty("win2win_hotkey")){if(r.union===1)return"union: multiple values";if(r.union=1,!f.isInteger(t.win2win_hotkey))return"win2win_hotkey: integer expected"}if(t.modifiers!=null&&t.hasOwnProperty("modifiers")){if(!Array.isArray(t.modifiers))return"modifiers: array expected";for(let l=0;l<t.modifiers.length;++l)switch(t.modifiers[l]){default:return"modifiers: enum value[] expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 100:case 101:break}}if(t.mode!=null&&t.hasOwnProperty("mode"))switch(t.mode){default:return"mode: enum value expected";case 0:case 1:case 2:case 3:break}return null},i.fromObject=function(t,n){if(t instanceof u.hbb.KeyEvent)return t;if(n===void 0&&(n=0),n>f.recursionLimit)throw Error("maximum nesting depth exceeded");let r=new u.hbb.KeyEvent;switch(t.down!=null&&(r.down=!!t.down),t.press!=null&&(r.press=!!t.press),t.control_key){default:if(typeof t.control_key=="number"){r.control_key=t.control_key;break}break;case"Unknown":case 0:r.control_key=0;break;case"Alt":case 1:r.control_key=1;break;case"Backspace":case 2:r.control_key=2;break;case"CapsLock":case 3:r.control_key=3;break;case"Control":case 4:r.control_key=4;break;case"Delete":case 5:r.control_key=5;break;case"DownArrow":case 6:r.control_key=6;break;case"End":case 7:r.control_key=7;break;case"Escape":case 8:r.control_key=8;break;case"F1":case 9:r.control_key=9;break;case"F10":case 10:r.control_key=10;break;case"F11":case 11:r.control_key=11;break;case"F12":case 12:r.control_key=12;break;case"F2":case 13:r.control_key=13;break;case"F3":case 14:r.control_key=14;break;case"F4":case 15:r.control_key=15;break;case"F5":case 16:r.control_key=16;break;case"F6":case 17:r.control_key=17;break;case"F7":case 18:r.control_key=18;break;case"F8":case 19:r.control_key=19;break;case"F9":case 20:r.control_key=20;break;case"Home":case 21:r.control_key=21;break;case"LeftArrow":case 22:r.control_key=22;break;case"Meta":case 23:r.control_key=23;break;case"Option":case 24:r.control_key=24;break;case"PageDown":case 25:r.control_key=25;break;case"PageUp":case 26:r.control_key=26;break;case"Return":case 27:r.control_key=27;break;case"RightArrow":case 28:r.control_key=28;break;case"Shift":case 29:r.control_key=29;break;case"Space":case 30:r.control_key=30;break;case"Tab":case 31:r.control_key=31;break;case"UpArrow":case 32:r.control_key=32;break;case"Numpad0":case 33:r.control_key=33;break;case"Numpad1":case 34:r.control_key=34;break;case"Numpad2":case 35:r.control_key=35;break;case"Numpad3":case 36:r.control_key=36;break;case"Numpad4":case 37:r.control_key=37;break;case"Numpad5":case 38:r.control_key=38;break;case"Numpad6":case 39:r.control_key=39;break;case"Numpad7":case 40:r.control_key=40;break;case"Numpad8":case 41:r.control_key=41;break;case"Numpad9":case 42:r.control_key=42;break;case"Cancel":case 43:r.control_key=43;break;case"Clear":case 44:r.control_key=44;break;case"Menu":case 45:r.control_key=45;break;case"Pause":case 46:r.control_key=46;break;case"Kana":case 47:r.control_key=47;break;case"Hangul":case 48:r.control_key=48;break;case"Junja":case 49:r.control_key=49;break;case"Final":case 50:r.control_key=50;break;case"Hanja":case 51:r.control_key=51;break;case"Kanji":case 52:r.control_key=52;break;case"Convert":case 53:r.control_key=53;break;case"Select":case 54:r.control_key=54;break;case"Print":case 55:r.control_key=55;break;case"Execute":case 56:r.control_key=56;break;case"Snapshot":case 57:r.control_key=57;break;case"Insert":case 58:r.control_key=58;break;case"Help":case 59:r.control_key=59;break;case"Sleep":case 60:r.control_key=60;break;case"Separator":case 61:r.control_key=61;break;case"Scroll":case 62:r.control_key=62;break;case"NumLock":case 63:r.control_key=63;break;case"RWin":case 64:r.control_key=64;break;case"Apps":case 65:r.control_key=65;break;case"Multiply":case 66:r.control_key=66;break;case"Add":case 67:r.control_key=67;break;case"Subtract":case 68:r.control_key=68;break;case"Decimal":case 69:r.control_key=69;break;case"Divide":case 70:r.control_key=70;break;case"Equals":case 71:r.control_key=71;break;case"NumpadEnter":case 72:r.control_key=72;break;case"RShift":case 73:r.control_key=73;break;case"RControl":case 74:r.control_key=74;break;case"RAlt":case 75:r.control_key=75;break;case"VolumeMute":case 76:r.control_key=76;break;case"VolumeUp":case 77:r.control_key=77;break;case"VolumeDown":case 78:r.control_key=78;break;case"Power":case 79:r.control_key=79;break;case"CtrlAltDel":case 100:r.control_key=100;break;case"LockScreen":case 101:r.control_key=101;break}if(t.chr!=null&&(r.chr=t.chr>>>0),t.unicode!=null&&(r.unicode=t.unicode>>>0),t.seq!=null&&(r.seq=String(t.seq)),t.win2win_hotkey!=null&&(r.win2win_hotkey=t.win2win_hotkey>>>0),t.modifiers){if(!Array.isArray(t.modifiers))throw TypeError(".hbb.KeyEvent.modifiers: array expected");r.modifiers=[];for(let l=0;l<t.modifiers.length;++l)switch(t.modifiers[l]){default:if(typeof t.modifiers[l]=="number"){r.modifiers[l]=t.modifiers[l];break}case"Unknown":case 0:r.modifiers[l]=0;break;case"Alt":case 1:r.modifiers[l]=1;break;case"Backspace":case 2:r.modifiers[l]=2;break;case"CapsLock":case 3:r.modifiers[l]=3;break;case"Control":case 4:r.modifiers[l]=4;break;case"Delete":case 5:r.modifiers[l]=5;break;case"DownArrow":case 6:r.modifiers[l]=6;break;case"End":case 7:r.modifiers[l]=7;break;case"Escape":case 8:r.modifiers[l]=8;break;case"F1":case 9:r.modifiers[l]=9;break;case"F10":case 10:r.modifiers[l]=10;break;case"F11":case 11:r.modifiers[l]=11;break;case"F12":case 12:r.modifiers[l]=12;break;case"F2":case 13:r.modifiers[l]=13;break;case"F3":case 14:r.modifiers[l]=14;break;case"F4":case 15:r.modifiers[l]=15;break;case"F5":case 16:r.modifiers[l]=16;break;case"F6":case 17:r.modifiers[l]=17;break;case"F7":case 18:r.modifiers[l]=18;break;case"F8":case 19:r.modifiers[l]=19;break;case"F9":case 20:r.modifiers[l]=20;break;case"Home":case 21:r.modifiers[l]=21;break;case"LeftArrow":case 22:r.modifiers[l]=22;break;case"Meta":case 23:r.modifiers[l]=23;break;case"Option":case 24:r.modifiers[l]=24;break;case"PageDown":case 25:r.modifiers[l]=25;break;case"PageUp":case 26:r.modifiers[l]=26;break;case"Return":case 27:r.modifiers[l]=27;break;case"RightArrow":case 28:r.modifiers[l]=28;break;case"Shift":case 29:r.modifiers[l]=29;break;case"Space":case 30:r.modifiers[l]=30;break;case"Tab":case 31:r.modifiers[l]=31;break;case"UpArrow":case 32:r.modifiers[l]=32;break;case"Numpad0":case 33:r.modifiers[l]=33;break;case"Numpad1":case 34:r.modifiers[l]=34;break;case"Numpad2":case 35:r.modifiers[l]=35;break;case"Numpad3":case 36:r.modifiers[l]=36;break;case"Numpad4":case 37:r.modifiers[l]=37;break;case"Numpad5":case 38:r.modifiers[l]=38;break;case"Numpad6":case 39:r.modifiers[l]=39;break;case"Numpad7":case 40:r.modifiers[l]=40;break;case"Numpad8":case 41:r.modifiers[l]=41;break;case"Numpad9":case 42:r.modifiers[l]=42;break;case"Cancel":case 43:r.modifiers[l]=43;break;case"Clear":case 44:r.modifiers[l]=44;break;case"Menu":case 45:r.modifiers[l]=45;break;case"Pause":case 46:r.modifiers[l]=46;break;case"Kana":case 47:r.modifiers[l]=47;break;case"Hangul":case 48:r.modifiers[l]=48;break;case"Junja":case 49:r.modifiers[l]=49;break;case"Final":case 50:r.modifiers[l]=50;break;case"Hanja":case 51:r.modifiers[l]=51;break;case"Kanji":case 52:r.modifiers[l]=52;break;case"Convert":case 53:r.modifiers[l]=53;break;case"Select":case 54:r.modifiers[l]=54;break;case"Print":case 55:r.modifiers[l]=55;break;case"Execute":case 56:r.modifiers[l]=56;break;case"Snapshot":case 57:r.modifiers[l]=57;break;case"Insert":case 58:r.modifiers[l]=58;break;case"Help":case 59:r.modifiers[l]=59;break;case"Sleep":case 60:r.modifiers[l]=60;break;case"Separator":case 61:r.modifiers[l]=61;break;case"Scroll":case 62:r.modifiers[l]=62;break;case"NumLock":case 63:r.modifiers[l]=63;break;case"RWin":case 64:r.modifiers[l]=64;break;case"Apps":case 65:r.modifiers[l]=65;break;case"Multiply":case 66:r.modifiers[l]=66;break;case"Add":case 67:r.modifiers[l]=67;break;case"Subtract":case 68:r.modifiers[l]=68;break;case"Decimal":case 69:r.modifiers[l]=69;break;case"Divide":case 70:r.modifiers[l]=70;break;case"Equals":case 71:r.modifiers[l]=71;break;case"NumpadEnter":case 72:r.modifiers[l]=72;break;case"RShift":case 73:r.modifiers[l]=73;break;case"RControl":case 74:r.modifiers[l]=74;break;case"RAlt":case 75:r.modifiers[l]=75;break;case"VolumeMute":case 76:r.modifiers[l]=76;break;case"VolumeUp":case 77:r.modifiers[l]=77;break;case"VolumeDown":case 78:r.modifiers[l]=78;break;case"Power":case 79:r.modifiers[l]=79;break;case"CtrlAltDel":case 100:r.modifiers[l]=100;break;case"LockScreen":case 101:r.modifiers[l]=101;break}}switch(t.mode){default:if(typeof t.mode=="number"){r.mode=t.mode;break}break;case"Legacy":case 0:r.mode=0;break;case"Map":case 1:r.mode=1;break;case"Translate":case 2:r.mode=2;break;case"Auto":case 3:r.mode=3;break}return r},i.toObject=function(t,n){n||(n={});let r={};if((n.arrays||n.defaults)&&(r.modifiers=[]),n.defaults&&(r.down=!1,r.press=!1,r.mode=n.enums===String?"Legacy":0),t.down!=null&&t.hasOwnProperty("down")&&(r.down=t.down),t.press!=null&&t.hasOwnProperty("press")&&(r.press=t.press),t.control_key!=null&&t.hasOwnProperty("control_key")&&(r.control_key=n.enums===String?u.hbb.ControlKey[t.control_key]===void 0?t.control_key:u.hbb.ControlKey[t.control_key]:t.control_key,n.oneofs&&(r.union="control_key")),t.chr!=null&&t.hasOwnProperty("chr")&&(r.chr=t.chr,n.oneofs&&(r.union="chr")),t.unicode!=null&&t.hasOwnProperty("unicode")&&(r.unicode=t.unicode,n.oneofs&&(r.union="unicode")),t.seq!=null&&t.hasOwnProperty("seq")&&(r.seq=t.seq,n.oneofs&&(r.union="seq")),t.win2win_hotkey!=null&&t.hasOwnProperty("win2win_hotkey")&&(r.win2win_hotkey=t.win2win_hotkey,n.oneofs&&(r.union="win2win_hotkey")),t.modifiers&&t.modifiers.length){r.modifiers=[];for(let l=0;l<t.modifiers.length;++l)r.modifiers[l]=n.enums===String?u.hbb.ControlKey[t.modifiers[l]]===void 0?t.modifiers[l]:u.hbb.ControlKey[t.modifiers[l]]:t.modifiers[l]}return t.mode!=null&&t.hasOwnProperty("mode")&&(r.mode=n.enums===String?u.hbb.KeyboardMode[t.mode]===void 0?t.mode:u.hbb.KeyboardMode[t.mode]:t.mode),r},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/hbb.KeyEvent"},i}(),p.CursorData=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.id=f.Long?f.Long.fromBits(0,0,!0):0,i.prototype.hotx=0,i.prototype.hoty=0,i.prototype.width=0,i.prototype.height=0,i.prototype.colors=f.newBuffer([]),i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(8).uint64(e.id),e.hotx!=null&&Object.hasOwnProperty.call(e,"hotx")&&t.uint32(16).sint32(e.hotx),e.hoty!=null&&Object.hasOwnProperty.call(e,"hoty")&&t.uint32(24).sint32(e.hoty),e.width!=null&&Object.hasOwnProperty.call(e,"width")&&t.uint32(32).int32(e.width),e.height!=null&&Object.hasOwnProperty.call(e,"height")&&t.uint32(40).int32(e.height),e.colors!=null&&Object.hasOwnProperty.call(e,"colors")&&t.uint32(50).bytes(e.colors),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.CursorData;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.id=e.uint64();break}case 2:{d.hotx=e.sint32();break}case 3:{d.hoty=e.sint32();break}case 4:{d.width=e.int32();break}case 5:{d.height=e.int32();break}case 6:{d.colors=e.bytes();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.id!=null&&e.hasOwnProperty("id")&&!f.isInteger(e.id)&&!(e.id&&f.isInteger(e.id.low)&&f.isInteger(e.id.high))?"id: integer|Long expected":e.hotx!=null&&e.hasOwnProperty("hotx")&&!f.isInteger(e.hotx)?"hotx: integer expected":e.hoty!=null&&e.hasOwnProperty("hoty")&&!f.isInteger(e.hoty)?"hoty: integer expected":e.width!=null&&e.hasOwnProperty("width")&&!f.isInteger(e.width)?"width: integer expected":e.height!=null&&e.hasOwnProperty("height")&&!f.isInteger(e.height)?"height: integer expected":e.colors!=null&&e.hasOwnProperty("colors")&&!(e.colors&&typeof e.colors.length=="number"||f.isString(e.colors))?"colors: buffer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.CursorData)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.CursorData;return e.id!=null&&(f.Long?(n.id=f.Long.fromValue(e.id)).unsigned=!0:typeof e.id=="string"?n.id=parseInt(e.id,10):typeof e.id=="number"?n.id=e.id:typeof e.id=="object"&&(n.id=new f.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber(!0))),e.hotx!=null&&(n.hotx=e.hotx|0),e.hoty!=null&&(n.hoty=e.hoty|0),e.width!=null&&(n.width=e.width|0),e.height!=null&&(n.height=e.height|0),e.colors!=null&&(typeof e.colors=="string"?f.base64.decode(e.colors,n.colors=f.newBuffer(f.base64.length(e.colors)),0):e.colors.length>=0&&(n.colors=e.colors)),n},i.toObject=function(e,t){t||(t={});let n={};if(t.defaults){if(f.Long){let r=new f.Long(0,0,!0);n.id=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.id=t.longs===String?"0":0;n.hotx=0,n.hoty=0,n.width=0,n.height=0,t.bytes===String?n.colors="":(n.colors=[],t.bytes!==Array&&(n.colors=f.newBuffer(n.colors)))}return e.id!=null&&e.hasOwnProperty("id")&&(typeof e.id=="number"?n.id=t.longs===String?String(e.id):e.id:n.id=t.longs===String?f.Long.prototype.toString.call(e.id):t.longs===Number?new f.LongBits(e.id.low>>>0,e.id.high>>>0).toNumber(!0):e.id),e.hotx!=null&&e.hasOwnProperty("hotx")&&(n.hotx=e.hotx),e.hoty!=null&&e.hasOwnProperty("hoty")&&(n.hoty=e.hoty),e.width!=null&&e.hasOwnProperty("width")&&(n.width=e.width),e.height!=null&&e.hasOwnProperty("height")&&(n.height=e.height),e.colors!=null&&e.hasOwnProperty("colors")&&(n.colors=t.bytes===String?f.base64.encode(e.colors,0,e.colors.length):t.bytes===Array?Array.prototype.slice.call(e.colors):e.colors),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.CursorData"},i}(),p.CursorPosition=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.x=0,i.prototype.y=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.x!=null&&Object.hasOwnProperty.call(e,"x")&&t.uint32(8).sint32(e.x),e.y!=null&&Object.hasOwnProperty.call(e,"y")&&t.uint32(16).sint32(e.y),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.CursorPosition;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.x=e.sint32();break}case 2:{d.y=e.sint32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.x!=null&&e.hasOwnProperty("x")&&!f.isInteger(e.x)?"x: integer expected":e.y!=null&&e.hasOwnProperty("y")&&!f.isInteger(e.y)?"y: integer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.CursorPosition)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.CursorPosition;return e.x!=null&&(n.x=e.x|0),e.y!=null&&(n.y=e.y|0),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.x=0,n.y=0),e.x!=null&&e.hasOwnProperty("x")&&(n.x=e.x),e.y!=null&&e.hasOwnProperty("y")&&(n.y=e.y),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.CursorPosition"},i}(),p.Hash=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.salt="",i.prototype.challenge="",i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.salt!=null&&Object.hasOwnProperty.call(e,"salt")&&t.uint32(10).string(e.salt),e.challenge!=null&&Object.hasOwnProperty.call(e,"challenge")&&t.uint32(18).string(e.challenge),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.Hash;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.salt=e.string();break}case 2:{d.challenge=e.string();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.salt!=null&&e.hasOwnProperty("salt")&&!f.isString(e.salt)?"salt: string expected":e.challenge!=null&&e.hasOwnProperty("challenge")&&!f.isString(e.challenge)?"challenge: string expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.Hash)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.Hash;return e.salt!=null&&(n.salt=String(e.salt)),e.challenge!=null&&(n.challenge=String(e.challenge)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.salt="",n.challenge=""),e.salt!=null&&e.hasOwnProperty("salt")&&(n.salt=e.salt),e.challenge!=null&&e.hasOwnProperty("challenge")&&(n.challenge=e.challenge),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.Hash"},i}(),p.ClipboardFormat=function(){let i={},o=Object.create(i);return o[i[0]="Text"]=0,o[i[1]="Rtf"]=1,o[i[2]="Html"]=2,o[i[21]="ImageRgba"]=21,o[i[22]="ImagePng"]=22,o[i[23]="ImageSvg"]=23,o[i[31]="Special"]=31,o}(),p.Clipboard=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.compress=!1,i.prototype.content=f.newBuffer([]),i.prototype.width=0,i.prototype.height=0,i.prototype.format=0,i.prototype.special_name="",i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.compress!=null&&Object.hasOwnProperty.call(e,"compress")&&t.uint32(8).bool(e.compress),e.content!=null&&Object.hasOwnProperty.call(e,"content")&&t.uint32(18).bytes(e.content),e.width!=null&&Object.hasOwnProperty.call(e,"width")&&t.uint32(24).int32(e.width),e.height!=null&&Object.hasOwnProperty.call(e,"height")&&t.uint32(32).int32(e.height),e.format!=null&&Object.hasOwnProperty.call(e,"format")&&t.uint32(40).int32(e.format),e.special_name!=null&&Object.hasOwnProperty.call(e,"special_name")&&t.uint32(50).string(e.special_name),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.Clipboard;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.compress=e.bool();break}case 2:{d.content=e.bytes();break}case 3:{d.width=e.int32();break}case 4:{d.height=e.int32();break}case 5:{d.format=e.int32();break}case 6:{d.special_name=e.string();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.compress!=null&&e.hasOwnProperty("compress")&&typeof e.compress!="boolean")return"compress: boolean expected";if(e.content!=null&&e.hasOwnProperty("content")&&!(e.content&&typeof e.content.length=="number"||f.isString(e.content)))return"content: buffer expected";if(e.width!=null&&e.hasOwnProperty("width")&&!f.isInteger(e.width))return"width: integer expected";if(e.height!=null&&e.hasOwnProperty("height")&&!f.isInteger(e.height))return"height: integer expected";if(e.format!=null&&e.hasOwnProperty("format"))switch(e.format){default:return"format: enum value expected";case 0:case 1:case 2:case 21:case 22:case 23:case 31:break}return e.special_name!=null&&e.hasOwnProperty("special_name")&&!f.isString(e.special_name)?"special_name: string expected":null},i.fromObject=function(e,t){if(e instanceof u.hbb.Clipboard)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.Clipboard;switch(e.compress!=null&&(n.compress=!!e.compress),e.content!=null&&(typeof e.content=="string"?f.base64.decode(e.content,n.content=f.newBuffer(f.base64.length(e.content)),0):e.content.length>=0&&(n.content=e.content)),e.width!=null&&(n.width=e.width|0),e.height!=null&&(n.height=e.height|0),e.format){default:if(typeof e.format=="number"){n.format=e.format;break}break;case"Text":case 0:n.format=0;break;case"Rtf":case 1:n.format=1;break;case"Html":case 2:n.format=2;break;case"ImageRgba":case 21:n.format=21;break;case"ImagePng":case 22:n.format=22;break;case"ImageSvg":case 23:n.format=23;break;case"Special":case 31:n.format=31;break}return e.special_name!=null&&(n.special_name=String(e.special_name)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.compress=!1,t.bytes===String?n.content="":(n.content=[],t.bytes!==Array&&(n.content=f.newBuffer(n.content))),n.width=0,n.height=0,n.format=t.enums===String?"Text":0,n.special_name=""),e.compress!=null&&e.hasOwnProperty("compress")&&(n.compress=e.compress),e.content!=null&&e.hasOwnProperty("content")&&(n.content=t.bytes===String?f.base64.encode(e.content,0,e.content.length):t.bytes===Array?Array.prototype.slice.call(e.content):e.content),e.width!=null&&e.hasOwnProperty("width")&&(n.width=e.width),e.height!=null&&e.hasOwnProperty("height")&&(n.height=e.height),e.format!=null&&e.hasOwnProperty("format")&&(n.format=t.enums===String?u.hbb.ClipboardFormat[e.format]===void 0?e.format:u.hbb.ClipboardFormat[e.format]:e.format),e.special_name!=null&&e.hasOwnProperty("special_name")&&(n.special_name=e.special_name),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.Clipboard"},i}(),p.MultiClipboards=function(){function i(o){if(this.clipboards=[],o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.clipboards=f.emptyArray,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=E.create()),e.clipboards!=null&&e.clipboards.length)for(let n=0;n<e.clipboards.length;++n)u.hbb.Clipboard.encode(e.clipboards[n],t.uint32(10).fork()).ldelim();return t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.MultiClipboards;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.clipboards&&d.clipboards.length||(d.clipboards=[]),d.clipboards.push(u.hbb.Clipboard.decode(e,e.uint32(),void 0,r+1));break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.clipboards!=null&&e.hasOwnProperty("clipboards")){if(!Array.isArray(e.clipboards))return"clipboards: array expected";for(let n=0;n<e.clipboards.length;++n){let r=u.hbb.Clipboard.verify(e.clipboards[n],t+1);if(r)return"clipboards."+r}}return null},i.fromObject=function(e,t){if(e instanceof u.hbb.MultiClipboards)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.MultiClipboards;if(e.clipboards){if(!Array.isArray(e.clipboards))throw TypeError(".hbb.MultiClipboards.clipboards: array expected");n.clipboards=[];for(let r=0;r<e.clipboards.length;++r){if(typeof e.clipboards[r]!="object")throw TypeError(".hbb.MultiClipboards.clipboards: object expected");n.clipboards[r]=u.hbb.Clipboard.fromObject(e.clipboards[r],t+1)}}return n},i.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.clipboards=[]),e.clipboards&&e.clipboards.length){n.clipboards=[];for(let r=0;r<e.clipboards.length;++r)n.clipboards[r]=u.hbb.Clipboard.toObject(e.clipboards[r],t)}return n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.MultiClipboards"},i}(),p.FileType=function(){let i={},o=Object.create(i);return o[i[0]="Dir"]=0,o[i[2]="DirLink"]=2,o[i[3]="DirDrive"]=3,o[i[4]="File"]=4,o[i[5]="FileLink"]=5,o}(),p.FileEntry=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.entry_type=0,i.prototype.name="",i.prototype.is_hidden=!1,i.prototype.size=f.Long?f.Long.fromBits(0,0,!0):0,i.prototype.modified_time=f.Long?f.Long.fromBits(0,0,!0):0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.entry_type!=null&&Object.hasOwnProperty.call(e,"entry_type")&&t.uint32(8).int32(e.entry_type),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&t.uint32(18).string(e.name),e.is_hidden!=null&&Object.hasOwnProperty.call(e,"is_hidden")&&t.uint32(24).bool(e.is_hidden),e.size!=null&&Object.hasOwnProperty.call(e,"size")&&t.uint32(32).uint64(e.size),e.modified_time!=null&&Object.hasOwnProperty.call(e,"modified_time")&&t.uint32(40).uint64(e.modified_time),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.FileEntry;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.entry_type=e.int32();break}case 2:{d.name=e.string();break}case 3:{d.is_hidden=e.bool();break}case 4:{d.size=e.uint64();break}case 5:{d.modified_time=e.uint64();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.entry_type!=null&&e.hasOwnProperty("entry_type"))switch(e.entry_type){default:return"entry_type: enum value expected";case 0:case 2:case 3:case 4:case 5:break}return e.name!=null&&e.hasOwnProperty("name")&&!f.isString(e.name)?"name: string expected":e.is_hidden!=null&&e.hasOwnProperty("is_hidden")&&typeof e.is_hidden!="boolean"?"is_hidden: boolean expected":e.size!=null&&e.hasOwnProperty("size")&&!f.isInteger(e.size)&&!(e.size&&f.isInteger(e.size.low)&&f.isInteger(e.size.high))?"size: integer|Long expected":e.modified_time!=null&&e.hasOwnProperty("modified_time")&&!f.isInteger(e.modified_time)&&!(e.modified_time&&f.isInteger(e.modified_time.low)&&f.isInteger(e.modified_time.high))?"modified_time: integer|Long expected":null},i.fromObject=function(e,t){if(e instanceof u.hbb.FileEntry)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.FileEntry;switch(e.entry_type){default:if(typeof e.entry_type=="number"){n.entry_type=e.entry_type;break}break;case"Dir":case 0:n.entry_type=0;break;case"DirLink":case 2:n.entry_type=2;break;case"DirDrive":case 3:n.entry_type=3;break;case"File":case 4:n.entry_type=4;break;case"FileLink":case 5:n.entry_type=5;break}return e.name!=null&&(n.name=String(e.name)),e.is_hidden!=null&&(n.is_hidden=!!e.is_hidden),e.size!=null&&(f.Long?(n.size=f.Long.fromValue(e.size)).unsigned=!0:typeof e.size=="string"?n.size=parseInt(e.size,10):typeof e.size=="number"?n.size=e.size:typeof e.size=="object"&&(n.size=new f.LongBits(e.size.low>>>0,e.size.high>>>0).toNumber(!0))),e.modified_time!=null&&(f.Long?(n.modified_time=f.Long.fromValue(e.modified_time)).unsigned=!0:typeof e.modified_time=="string"?n.modified_time=parseInt(e.modified_time,10):typeof e.modified_time=="number"?n.modified_time=e.modified_time:typeof e.modified_time=="object"&&(n.modified_time=new f.LongBits(e.modified_time.low>>>0,e.modified_time.high>>>0).toNumber(!0))),n},i.toObject=function(e,t){t||(t={});let n={};if(t.defaults){if(n.entry_type=t.enums===String?"Dir":0,n.name="",n.is_hidden=!1,f.Long){let r=new f.Long(0,0,!0);n.size=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.size=t.longs===String?"0":0;if(f.Long){let r=new f.Long(0,0,!0);n.modified_time=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.modified_time=t.longs===String?"0":0}return e.entry_type!=null&&e.hasOwnProperty("entry_type")&&(n.entry_type=t.enums===String?u.hbb.FileType[e.entry_type]===void 0?e.entry_type:u.hbb.FileType[e.entry_type]:e.entry_type),e.name!=null&&e.hasOwnProperty("name")&&(n.name=e.name),e.is_hidden!=null&&e.hasOwnProperty("is_hidden")&&(n.is_hidden=e.is_hidden),e.size!=null&&e.hasOwnProperty("size")&&(typeof e.size=="number"?n.size=t.longs===String?String(e.size):e.size:n.size=t.longs===String?f.Long.prototype.toString.call(e.size):t.longs===Number?new f.LongBits(e.size.low>>>0,e.size.high>>>0).toNumber(!0):e.size),e.modified_time!=null&&e.hasOwnProperty("modified_time")&&(typeof e.modified_time=="number"?n.modified_time=t.longs===String?String(e.modified_time):e.modified_time:n.modified_time=t.longs===String?f.Long.prototype.toString.call(e.modified_time):t.longs===Number?new f.LongBits(e.modified_time.low>>>0,e.modified_time.high>>>0).toNumber(!0):e.modified_time),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.FileEntry"},i}(),p.FileDirectory=function(){function i(o){if(this.entries=[],o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.id=0,i.prototype.path="",i.prototype.entries=f.emptyArray,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=E.create()),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(8).int32(e.id),e.path!=null&&Object.hasOwnProperty.call(e,"path")&&t.uint32(18).string(e.path),e.entries!=null&&e.entries.length)for(let n=0;n<e.entries.length;++n)u.hbb.FileEntry.encode(e.entries[n],t.uint32(26).fork()).ldelim();return t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.FileDirectory;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.id=e.int32();break}case 2:{d.path=e.string();break}case 3:{d.entries&&d.entries.length||(d.entries=[]),d.entries.push(u.hbb.FileEntry.decode(e,e.uint32(),void 0,r+1));break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.id!=null&&e.hasOwnProperty("id")&&!f.isInteger(e.id))return"id: integer expected";if(e.path!=null&&e.hasOwnProperty("path")&&!f.isString(e.path))return"path: string expected";if(e.entries!=null&&e.hasOwnProperty("entries")){if(!Array.isArray(e.entries))return"entries: array expected";for(let n=0;n<e.entries.length;++n){let r=u.hbb.FileEntry.verify(e.entries[n],t+1);if(r)return"entries."+r}}return null},i.fromObject=function(e,t){if(e instanceof u.hbb.FileDirectory)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.FileDirectory;if(e.id!=null&&(n.id=e.id|0),e.path!=null&&(n.path=String(e.path)),e.entries){if(!Array.isArray(e.entries))throw TypeError(".hbb.FileDirectory.entries: array expected");n.entries=[];for(let r=0;r<e.entries.length;++r){if(typeof e.entries[r]!="object")throw TypeError(".hbb.FileDirectory.entries: object expected");n.entries[r]=u.hbb.FileEntry.fromObject(e.entries[r],t+1)}}return n},i.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.entries=[]),t.defaults&&(n.id=0,n.path=""),e.id!=null&&e.hasOwnProperty("id")&&(n.id=e.id),e.path!=null&&e.hasOwnProperty("path")&&(n.path=e.path),e.entries&&e.entries.length){n.entries=[];for(let r=0;r<e.entries.length;++r)n.entries[r]=u.hbb.FileEntry.toObject(e.entries[r],t)}return n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.FileDirectory"},i}(),p.ReadDir=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.path="",i.prototype.include_hidden=!1,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.path!=null&&Object.hasOwnProperty.call(e,"path")&&t.uint32(10).string(e.path),e.include_hidden!=null&&Object.hasOwnProperty.call(e,"include_hidden")&&t.uint32(16).bool(e.include_hidden),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.ReadDir;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.path=e.string();break}case 2:{d.include_hidden=e.bool();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.path!=null&&e.hasOwnProperty("path")&&!f.isString(e.path)?"path: string expected":e.include_hidden!=null&&e.hasOwnProperty("include_hidden")&&typeof e.include_hidden!="boolean"?"include_hidden: boolean expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.ReadDir)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.ReadDir;return e.path!=null&&(n.path=String(e.path)),e.include_hidden!=null&&(n.include_hidden=!!e.include_hidden),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.path="",n.include_hidden=!1),e.path!=null&&e.hasOwnProperty("path")&&(n.path=e.path),e.include_hidden!=null&&e.hasOwnProperty("include_hidden")&&(n.include_hidden=e.include_hidden),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.ReadDir"},i}(),p.ReadEmptyDirs=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.path="",i.prototype.include_hidden=!1,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.path!=null&&Object.hasOwnProperty.call(e,"path")&&t.uint32(10).string(e.path),e.include_hidden!=null&&Object.hasOwnProperty.call(e,"include_hidden")&&t.uint32(16).bool(e.include_hidden),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.ReadEmptyDirs;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.path=e.string();break}case 2:{d.include_hidden=e.bool();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.path!=null&&e.hasOwnProperty("path")&&!f.isString(e.path)?"path: string expected":e.include_hidden!=null&&e.hasOwnProperty("include_hidden")&&typeof e.include_hidden!="boolean"?"include_hidden: boolean expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.ReadEmptyDirs)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.ReadEmptyDirs;return e.path!=null&&(n.path=String(e.path)),e.include_hidden!=null&&(n.include_hidden=!!e.include_hidden),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.path="",n.include_hidden=!1),e.path!=null&&e.hasOwnProperty("path")&&(n.path=e.path),e.include_hidden!=null&&e.hasOwnProperty("include_hidden")&&(n.include_hidden=e.include_hidden),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.ReadEmptyDirs"},i}(),p.ReadEmptyDirsResponse=function(){function i(o){if(this.empty_dirs=[],o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.path="",i.prototype.empty_dirs=f.emptyArray,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=E.create()),e.path!=null&&Object.hasOwnProperty.call(e,"path")&&t.uint32(10).string(e.path),e.empty_dirs!=null&&e.empty_dirs.length)for(let n=0;n<e.empty_dirs.length;++n)u.hbb.FileDirectory.encode(e.empty_dirs[n],t.uint32(18).fork()).ldelim();return t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.ReadEmptyDirsResponse;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.path=e.string();break}case 2:{d.empty_dirs&&d.empty_dirs.length||(d.empty_dirs=[]),d.empty_dirs.push(u.hbb.FileDirectory.decode(e,e.uint32(),void 0,r+1));break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.path!=null&&e.hasOwnProperty("path")&&!f.isString(e.path))return"path: string expected";if(e.empty_dirs!=null&&e.hasOwnProperty("empty_dirs")){if(!Array.isArray(e.empty_dirs))return"empty_dirs: array expected";for(let n=0;n<e.empty_dirs.length;++n){let r=u.hbb.FileDirectory.verify(e.empty_dirs[n],t+1);if(r)return"empty_dirs."+r}}return null},i.fromObject=function(e,t){if(e instanceof u.hbb.ReadEmptyDirsResponse)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.ReadEmptyDirsResponse;if(e.path!=null&&(n.path=String(e.path)),e.empty_dirs){if(!Array.isArray(e.empty_dirs))throw TypeError(".hbb.ReadEmptyDirsResponse.empty_dirs: array expected");n.empty_dirs=[];for(let r=0;r<e.empty_dirs.length;++r){if(typeof e.empty_dirs[r]!="object")throw TypeError(".hbb.ReadEmptyDirsResponse.empty_dirs: object expected");n.empty_dirs[r]=u.hbb.FileDirectory.fromObject(e.empty_dirs[r],t+1)}}return n},i.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.empty_dirs=[]),t.defaults&&(n.path=""),e.path!=null&&e.hasOwnProperty("path")&&(n.path=e.path),e.empty_dirs&&e.empty_dirs.length){n.empty_dirs=[];for(let r=0;r<e.empty_dirs.length;++r)n.empty_dirs[r]=u.hbb.FileDirectory.toObject(e.empty_dirs[r],t)}return n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.ReadEmptyDirsResponse"},i}(),p.ReadAllFiles=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.id=0,i.prototype.path="",i.prototype.include_hidden=!1,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(8).int32(e.id),e.path!=null&&Object.hasOwnProperty.call(e,"path")&&t.uint32(18).string(e.path),e.include_hidden!=null&&Object.hasOwnProperty.call(e,"include_hidden")&&t.uint32(24).bool(e.include_hidden),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.ReadAllFiles;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.id=e.int32();break}case 2:{d.path=e.string();break}case 3:{d.include_hidden=e.bool();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.id!=null&&e.hasOwnProperty("id")&&!f.isInteger(e.id)?"id: integer expected":e.path!=null&&e.hasOwnProperty("path")&&!f.isString(e.path)?"path: string expected":e.include_hidden!=null&&e.hasOwnProperty("include_hidden")&&typeof e.include_hidden!="boolean"?"include_hidden: boolean expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.ReadAllFiles)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.ReadAllFiles;return e.id!=null&&(n.id=e.id|0),e.path!=null&&(n.path=String(e.path)),e.include_hidden!=null&&(n.include_hidden=!!e.include_hidden),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.id=0,n.path="",n.include_hidden=!1),e.id!=null&&e.hasOwnProperty("id")&&(n.id=e.id),e.path!=null&&e.hasOwnProperty("path")&&(n.path=e.path),e.include_hidden!=null&&e.hasOwnProperty("include_hidden")&&(n.include_hidden=e.include_hidden),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.ReadAllFiles"},i}(),p.FileRename=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.id=0,i.prototype.path="",i.prototype.new_name="",i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(8).int32(e.id),e.path!=null&&Object.hasOwnProperty.call(e,"path")&&t.uint32(18).string(e.path),e.new_name!=null&&Object.hasOwnProperty.call(e,"new_name")&&t.uint32(26).string(e.new_name),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.FileRename;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.id=e.int32();break}case 2:{d.path=e.string();break}case 3:{d.new_name=e.string();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.id!=null&&e.hasOwnProperty("id")&&!f.isInteger(e.id)?"id: integer expected":e.path!=null&&e.hasOwnProperty("path")&&!f.isString(e.path)?"path: string expected":e.new_name!=null&&e.hasOwnProperty("new_name")&&!f.isString(e.new_name)?"new_name: string expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.FileRename)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.FileRename;return e.id!=null&&(n.id=e.id|0),e.path!=null&&(n.path=String(e.path)),e.new_name!=null&&(n.new_name=String(e.new_name)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.id=0,n.path="",n.new_name=""),e.id!=null&&e.hasOwnProperty("id")&&(n.id=e.id),e.path!=null&&e.hasOwnProperty("path")&&(n.path=e.path),e.new_name!=null&&e.hasOwnProperty("new_name")&&(n.new_name=e.new_name),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.FileRename"},i}(),p.FileAction=function(){function i(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)e[t[n]]!=null&&t[n]!=="__proto__"&&(this[t[n]]=e[t[n]])}i.prototype.read_dir=null,i.prototype.send=null,i.prototype.receive=null,i.prototype.create=null,i.prototype.remove_dir=null,i.prototype.remove_file=null,i.prototype.all_files=null,i.prototype.cancel=null,i.prototype.send_confirm=null,i.prototype.rename=null,i.prototype.read_empty_dirs=null;let o;return Object.defineProperty(i.prototype,"union",{get:f.oneOfGetter(o=["read_dir","send","receive","create","remove_dir","remove_file","all_files","cancel","send_confirm","rename","read_empty_dirs"]),set:f.oneOfSetter(o)}),i.create=function(t){return new i(t)},i.encode=function(t,n){return n||(n=E.create()),t.read_dir!=null&&Object.hasOwnProperty.call(t,"read_dir")&&u.hbb.ReadDir.encode(t.read_dir,n.uint32(10).fork()).ldelim(),t.send!=null&&Object.hasOwnProperty.call(t,"send")&&u.hbb.FileTransferSendRequest.encode(t.send,n.uint32(18).fork()).ldelim(),t.receive!=null&&Object.hasOwnProperty.call(t,"receive")&&u.hbb.FileTransferReceiveRequest.encode(t.receive,n.uint32(26).fork()).ldelim(),t.create!=null&&Object.hasOwnProperty.call(t,"create")&&u.hbb.FileDirCreate.encode(t.create,n.uint32(34).fork()).ldelim(),t.remove_dir!=null&&Object.hasOwnProperty.call(t,"remove_dir")&&u.hbb.FileRemoveDir.encode(t.remove_dir,n.uint32(42).fork()).ldelim(),t.remove_file!=null&&Object.hasOwnProperty.call(t,"remove_file")&&u.hbb.FileRemoveFile.encode(t.remove_file,n.uint32(50).fork()).ldelim(),t.all_files!=null&&Object.hasOwnProperty.call(t,"all_files")&&u.hbb.ReadAllFiles.encode(t.all_files,n.uint32(58).fork()).ldelim(),t.cancel!=null&&Object.hasOwnProperty.call(t,"cancel")&&u.hbb.FileTransferCancel.encode(t.cancel,n.uint32(66).fork()).ldelim(),t.send_confirm!=null&&Object.hasOwnProperty.call(t,"send_confirm")&&u.hbb.FileTransferSendConfirmRequest.encode(t.send_confirm,n.uint32(74).fork()).ldelim(),t.rename!=null&&Object.hasOwnProperty.call(t,"rename")&&u.hbb.FileRename.encode(t.rename,n.uint32(82).fork()).ldelim(),t.read_empty_dirs!=null&&Object.hasOwnProperty.call(t,"read_empty_dirs")&&u.hbb.ReadEmptyDirs.encode(t.read_empty_dirs,n.uint32(90).fork()).ldelim(),n},i.encodeDelimited=function(t,n){return this.encode(t,n).ldelim()},i.decode=function(t,n,r,l){if(t instanceof s||(t=s.create(t)),l===void 0&&(l=0),l>s.recursionLimit)throw Error("maximum nesting depth exceeded");let d=n===void 0?t.len:t.pos+n,c=new u.hbb.FileAction;for(;t.pos<d;){let w=t.uint32();if(w===r)break;switch(w>>>3){case 1:{c.read_dir=u.hbb.ReadDir.decode(t,t.uint32(),void 0,l+1);break}case 2:{c.send=u.hbb.FileTransferSendRequest.decode(t,t.uint32(),void 0,l+1);break}case 3:{c.receive=u.hbb.FileTransferReceiveRequest.decode(t,t.uint32(),void 0,l+1);break}case 4:{c.create=u.hbb.FileDirCreate.decode(t,t.uint32(),void 0,l+1);break}case 5:{c.remove_dir=u.hbb.FileRemoveDir.decode(t,t.uint32(),void 0,l+1);break}case 6:{c.remove_file=u.hbb.FileRemoveFile.decode(t,t.uint32(),void 0,l+1);break}case 7:{c.all_files=u.hbb.ReadAllFiles.decode(t,t.uint32(),void 0,l+1);break}case 8:{c.cancel=u.hbb.FileTransferCancel.decode(t,t.uint32(),void 0,l+1);break}case 9:{c.send_confirm=u.hbb.FileTransferSendConfirmRequest.decode(t,t.uint32(),void 0,l+1);break}case 10:{c.rename=u.hbb.FileRename.decode(t,t.uint32(),void 0,l+1);break}case 11:{c.read_empty_dirs=u.hbb.ReadEmptyDirs.decode(t,t.uint32(),void 0,l+1);break}default:t.skipType(w&7,l);break}}return c},i.decodeDelimited=function(t){return t instanceof s||(t=new s(t)),this.decode(t,t.uint32())},i.verify=function(t,n){if(typeof t!="object"||t===null)return"object expected";if(n===void 0&&(n=0),n>f.recursionLimit)return"maximum nesting depth exceeded";let r={};if(t.read_dir!=null&&t.hasOwnProperty("read_dir")){r.union=1;{let l=u.hbb.ReadDir.verify(t.read_dir,n+1);if(l)return"read_dir."+l}}if(t.send!=null&&t.hasOwnProperty("send")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.FileTransferSendRequest.verify(t.send,n+1);if(l)return"send."+l}}if(t.receive!=null&&t.hasOwnProperty("receive")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.FileTransferReceiveRequest.verify(t.receive,n+1);if(l)return"receive."+l}}if(t.create!=null&&t.hasOwnProperty("create")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.FileDirCreate.verify(t.create,n+1);if(l)return"create."+l}}if(t.remove_dir!=null&&t.hasOwnProperty("remove_dir")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.FileRemoveDir.verify(t.remove_dir,n+1);if(l)return"remove_dir."+l}}if(t.remove_file!=null&&t.hasOwnProperty("remove_file")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.FileRemoveFile.verify(t.remove_file,n+1);if(l)return"remove_file."+l}}if(t.all_files!=null&&t.hasOwnProperty("all_files")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.ReadAllFiles.verify(t.all_files,n+1);if(l)return"all_files."+l}}if(t.cancel!=null&&t.hasOwnProperty("cancel")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.FileTransferCancel.verify(t.cancel,n+1);if(l)return"cancel."+l}}if(t.send_confirm!=null&&t.hasOwnProperty("send_confirm")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.FileTransferSendConfirmRequest.verify(t.send_confirm,n+1);if(l)return"send_confirm."+l}}if(t.rename!=null&&t.hasOwnProperty("rename")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.FileRename.verify(t.rename,n+1);if(l)return"rename."+l}}if(t.read_empty_dirs!=null&&t.hasOwnProperty("read_empty_dirs")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.ReadEmptyDirs.verify(t.read_empty_dirs,n+1);if(l)return"read_empty_dirs."+l}}return null},i.fromObject=function(t,n){if(t instanceof u.hbb.FileAction)return t;if(n===void 0&&(n=0),n>f.recursionLimit)throw Error("maximum nesting depth exceeded");let r=new u.hbb.FileAction;if(t.read_dir!=null){if(typeof t.read_dir!="object")throw TypeError(".hbb.FileAction.read_dir: object expected");r.read_dir=u.hbb.ReadDir.fromObject(t.read_dir,n+1)}if(t.send!=null){if(typeof t.send!="object")throw TypeError(".hbb.FileAction.send: object expected");r.send=u.hbb.FileTransferSendRequest.fromObject(t.send,n+1)}if(t.receive!=null){if(typeof t.receive!="object")throw TypeError(".hbb.FileAction.receive: object expected");r.receive=u.hbb.FileTransferReceiveRequest.fromObject(t.receive,n+1)}if(t.create!=null){if(typeof t.create!="object")throw TypeError(".hbb.FileAction.create: object expected");r.create=u.hbb.FileDirCreate.fromObject(t.create,n+1)}if(t.remove_dir!=null){if(typeof t.remove_dir!="object")throw TypeError(".hbb.FileAction.remove_dir: object expected");r.remove_dir=u.hbb.FileRemoveDir.fromObject(t.remove_dir,n+1)}if(t.remove_file!=null){if(typeof t.remove_file!="object")throw TypeError(".hbb.FileAction.remove_file: object expected");r.remove_file=u.hbb.FileRemoveFile.fromObject(t.remove_file,n+1)}if(t.all_files!=null){if(typeof t.all_files!="object")throw TypeError(".hbb.FileAction.all_files: object expected");r.all_files=u.hbb.ReadAllFiles.fromObject(t.all_files,n+1)}if(t.cancel!=null){if(typeof t.cancel!="object")throw TypeError(".hbb.FileAction.cancel: object expected");r.cancel=u.hbb.FileTransferCancel.fromObject(t.cancel,n+1)}if(t.send_confirm!=null){if(typeof t.send_confirm!="object")throw TypeError(".hbb.FileAction.send_confirm: object expected");r.send_confirm=u.hbb.FileTransferSendConfirmRequest.fromObject(t.send_confirm,n+1)}if(t.rename!=null){if(typeof t.rename!="object")throw TypeError(".hbb.FileAction.rename: object expected");r.rename=u.hbb.FileRename.fromObject(t.rename,n+1)}if(t.read_empty_dirs!=null){if(typeof t.read_empty_dirs!="object")throw TypeError(".hbb.FileAction.read_empty_dirs: object expected");r.read_empty_dirs=u.hbb.ReadEmptyDirs.fromObject(t.read_empty_dirs,n+1)}return r},i.toObject=function(t,n){n||(n={});let r={};return t.read_dir!=null&&t.hasOwnProperty("read_dir")&&(r.read_dir=u.hbb.ReadDir.toObject(t.read_dir,n),n.oneofs&&(r.union="read_dir")),t.send!=null&&t.hasOwnProperty("send")&&(r.send=u.hbb.FileTransferSendRequest.toObject(t.send,n),n.oneofs&&(r.union="send")),t.receive!=null&&t.hasOwnProperty("receive")&&(r.receive=u.hbb.FileTransferReceiveRequest.toObject(t.receive,n),n.oneofs&&(r.union="receive")),t.create!=null&&t.hasOwnProperty("create")&&(r.create=u.hbb.FileDirCreate.toObject(t.create,n),n.oneofs&&(r.union="create")),t.remove_dir!=null&&t.hasOwnProperty("remove_dir")&&(r.remove_dir=u.hbb.FileRemoveDir.toObject(t.remove_dir,n),n.oneofs&&(r.union="remove_dir")),t.remove_file!=null&&t.hasOwnProperty("remove_file")&&(r.remove_file=u.hbb.FileRemoveFile.toObject(t.remove_file,n),n.oneofs&&(r.union="remove_file")),t.all_files!=null&&t.hasOwnProperty("all_files")&&(r.all_files=u.hbb.ReadAllFiles.toObject(t.all_files,n),n.oneofs&&(r.union="all_files")),t.cancel!=null&&t.hasOwnProperty("cancel")&&(r.cancel=u.hbb.FileTransferCancel.toObject(t.cancel,n),n.oneofs&&(r.union="cancel")),t.send_confirm!=null&&t.hasOwnProperty("send_confirm")&&(r.send_confirm=u.hbb.FileTransferSendConfirmRequest.toObject(t.send_confirm,n),n.oneofs&&(r.union="send_confirm")),t.rename!=null&&t.hasOwnProperty("rename")&&(r.rename=u.hbb.FileRename.toObject(t.rename,n),n.oneofs&&(r.union="rename")),t.read_empty_dirs!=null&&t.hasOwnProperty("read_empty_dirs")&&(r.read_empty_dirs=u.hbb.ReadEmptyDirs.toObject(t.read_empty_dirs,n),n.oneofs&&(r.union="read_empty_dirs")),r},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/hbb.FileAction"},i}(),p.FileTransferCancel=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.id=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(8).int32(e.id),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.FileTransferCancel;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.id=e.int32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.id!=null&&e.hasOwnProperty("id")&&!f.isInteger(e.id)?"id: integer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.FileTransferCancel)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.FileTransferCancel;return e.id!=null&&(n.id=e.id|0),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.id=0),e.id!=null&&e.hasOwnProperty("id")&&(n.id=e.id),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.FileTransferCancel"},i}(),p.FileResponse=function(){function i(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)e[t[n]]!=null&&t[n]!=="__proto__"&&(this[t[n]]=e[t[n]])}i.prototype.dir=null,i.prototype.block=null,i.prototype.error=null,i.prototype.done=null,i.prototype.digest=null,i.prototype.empty_dirs=null;let o;return Object.defineProperty(i.prototype,"union",{get:f.oneOfGetter(o=["dir","block","error","done","digest","empty_dirs"]),set:f.oneOfSetter(o)}),i.create=function(t){return new i(t)},i.encode=function(t,n){return n||(n=E.create()),t.dir!=null&&Object.hasOwnProperty.call(t,"dir")&&u.hbb.FileDirectory.encode(t.dir,n.uint32(10).fork()).ldelim(),t.block!=null&&Object.hasOwnProperty.call(t,"block")&&u.hbb.FileTransferBlock.encode(t.block,n.uint32(18).fork()).ldelim(),t.error!=null&&Object.hasOwnProperty.call(t,"error")&&u.hbb.FileTransferError.encode(t.error,n.uint32(26).fork()).ldelim(),t.done!=null&&Object.hasOwnProperty.call(t,"done")&&u.hbb.FileTransferDone.encode(t.done,n.uint32(34).fork()).ldelim(),t.digest!=null&&Object.hasOwnProperty.call(t,"digest")&&u.hbb.FileTransferDigest.encode(t.digest,n.uint32(42).fork()).ldelim(),t.empty_dirs!=null&&Object.hasOwnProperty.call(t,"empty_dirs")&&u.hbb.ReadEmptyDirsResponse.encode(t.empty_dirs,n.uint32(50).fork()).ldelim(),n},i.encodeDelimited=function(t,n){return this.encode(t,n).ldelim()},i.decode=function(t,n,r,l){if(t instanceof s||(t=s.create(t)),l===void 0&&(l=0),l>s.recursionLimit)throw Error("maximum nesting depth exceeded");let d=n===void 0?t.len:t.pos+n,c=new u.hbb.FileResponse;for(;t.pos<d;){let w=t.uint32();if(w===r)break;switch(w>>>3){case 1:{c.dir=u.hbb.FileDirectory.decode(t,t.uint32(),void 0,l+1);break}case 2:{c.block=u.hbb.FileTransferBlock.decode(t,t.uint32(),void 0,l+1);break}case 3:{c.error=u.hbb.FileTransferError.decode(t,t.uint32(),void 0,l+1);break}case 4:{c.done=u.hbb.FileTransferDone.decode(t,t.uint32(),void 0,l+1);break}case 5:{c.digest=u.hbb.FileTransferDigest.decode(t,t.uint32(),void 0,l+1);break}case 6:{c.empty_dirs=u.hbb.ReadEmptyDirsResponse.decode(t,t.uint32(),void 0,l+1);break}default:t.skipType(w&7,l);break}}return c},i.decodeDelimited=function(t){return t instanceof s||(t=new s(t)),this.decode(t,t.uint32())},i.verify=function(t,n){if(typeof t!="object"||t===null)return"object expected";if(n===void 0&&(n=0),n>f.recursionLimit)return"maximum nesting depth exceeded";let r={};if(t.dir!=null&&t.hasOwnProperty("dir")){r.union=1;{let l=u.hbb.FileDirectory.verify(t.dir,n+1);if(l)return"dir."+l}}if(t.block!=null&&t.hasOwnProperty("block")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.FileTransferBlock.verify(t.block,n+1);if(l)return"block."+l}}if(t.error!=null&&t.hasOwnProperty("error")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.FileTransferError.verify(t.error,n+1);if(l)return"error."+l}}if(t.done!=null&&t.hasOwnProperty("done")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.FileTransferDone.verify(t.done,n+1);if(l)return"done."+l}}if(t.digest!=null&&t.hasOwnProperty("digest")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.FileTransferDigest.verify(t.digest,n+1);if(l)return"digest."+l}}if(t.empty_dirs!=null&&t.hasOwnProperty("empty_dirs")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.ReadEmptyDirsResponse.verify(t.empty_dirs,n+1);if(l)return"empty_dirs."+l}}return null},i.fromObject=function(t,n){if(t instanceof u.hbb.FileResponse)return t;if(n===void 0&&(n=0),n>f.recursionLimit)throw Error("maximum nesting depth exceeded");let r=new u.hbb.FileResponse;if(t.dir!=null){if(typeof t.dir!="object")throw TypeError(".hbb.FileResponse.dir: object expected");r.dir=u.hbb.FileDirectory.fromObject(t.dir,n+1)}if(t.block!=null){if(typeof t.block!="object")throw TypeError(".hbb.FileResponse.block: object expected");r.block=u.hbb.FileTransferBlock.fromObject(t.block,n+1)}if(t.error!=null){if(typeof t.error!="object")throw TypeError(".hbb.FileResponse.error: object expected");r.error=u.hbb.FileTransferError.fromObject(t.error,n+1)}if(t.done!=null){if(typeof t.done!="object")throw TypeError(".hbb.FileResponse.done: object expected");r.done=u.hbb.FileTransferDone.fromObject(t.done,n+1)}if(t.digest!=null){if(typeof t.digest!="object")throw TypeError(".hbb.FileResponse.digest: object expected");r.digest=u.hbb.FileTransferDigest.fromObject(t.digest,n+1)}if(t.empty_dirs!=null){if(typeof t.empty_dirs!="object")throw TypeError(".hbb.FileResponse.empty_dirs: object expected");r.empty_dirs=u.hbb.ReadEmptyDirsResponse.fromObject(t.empty_dirs,n+1)}return r},i.toObject=function(t,n){n||(n={});let r={};return t.dir!=null&&t.hasOwnProperty("dir")&&(r.dir=u.hbb.FileDirectory.toObject(t.dir,n),n.oneofs&&(r.union="dir")),t.block!=null&&t.hasOwnProperty("block")&&(r.block=u.hbb.FileTransferBlock.toObject(t.block,n),n.oneofs&&(r.union="block")),t.error!=null&&t.hasOwnProperty("error")&&(r.error=u.hbb.FileTransferError.toObject(t.error,n),n.oneofs&&(r.union="error")),t.done!=null&&t.hasOwnProperty("done")&&(r.done=u.hbb.FileTransferDone.toObject(t.done,n),n.oneofs&&(r.union="done")),t.digest!=null&&t.hasOwnProperty("digest")&&(r.digest=u.hbb.FileTransferDigest.toObject(t.digest,n),n.oneofs&&(r.union="digest")),t.empty_dirs!=null&&t.hasOwnProperty("empty_dirs")&&(r.empty_dirs=u.hbb.ReadEmptyDirsResponse.toObject(t.empty_dirs,n),n.oneofs&&(r.union="empty_dirs")),r},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/hbb.FileResponse"},i}(),p.FileTransferDigest=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.id=0,i.prototype.file_num=0,i.prototype.last_modified=f.Long?f.Long.fromBits(0,0,!0):0,i.prototype.file_size=f.Long?f.Long.fromBits(0,0,!0):0,i.prototype.is_upload=!1,i.prototype.is_identical=!1,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(8).int32(e.id),e.file_num!=null&&Object.hasOwnProperty.call(e,"file_num")&&t.uint32(16).sint32(e.file_num),e.last_modified!=null&&Object.hasOwnProperty.call(e,"last_modified")&&t.uint32(24).uint64(e.last_modified),e.file_size!=null&&Object.hasOwnProperty.call(e,"file_size")&&t.uint32(32).uint64(e.file_size),e.is_upload!=null&&Object.hasOwnProperty.call(e,"is_upload")&&t.uint32(40).bool(e.is_upload),e.is_identical!=null&&Object.hasOwnProperty.call(e,"is_identical")&&t.uint32(48).bool(e.is_identical),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.FileTransferDigest;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.id=e.int32();break}case 2:{d.file_num=e.sint32();break}case 3:{d.last_modified=e.uint64();break}case 4:{d.file_size=e.uint64();break}case 5:{d.is_upload=e.bool();break}case 6:{d.is_identical=e.bool();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.id!=null&&e.hasOwnProperty("id")&&!f.isInteger(e.id)?"id: integer expected":e.file_num!=null&&e.hasOwnProperty("file_num")&&!f.isInteger(e.file_num)?"file_num: integer expected":e.last_modified!=null&&e.hasOwnProperty("last_modified")&&!f.isInteger(e.last_modified)&&!(e.last_modified&&f.isInteger(e.last_modified.low)&&f.isInteger(e.last_modified.high))?"last_modified: integer|Long expected":e.file_size!=null&&e.hasOwnProperty("file_size")&&!f.isInteger(e.file_size)&&!(e.file_size&&f.isInteger(e.file_size.low)&&f.isInteger(e.file_size.high))?"file_size: integer|Long expected":e.is_upload!=null&&e.hasOwnProperty("is_upload")&&typeof e.is_upload!="boolean"?"is_upload: boolean expected":e.is_identical!=null&&e.hasOwnProperty("is_identical")&&typeof e.is_identical!="boolean"?"is_identical: boolean expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.FileTransferDigest)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.FileTransferDigest;return e.id!=null&&(n.id=e.id|0),e.file_num!=null&&(n.file_num=e.file_num|0),e.last_modified!=null&&(f.Long?(n.last_modified=f.Long.fromValue(e.last_modified)).unsigned=!0:typeof e.last_modified=="string"?n.last_modified=parseInt(e.last_modified,10):typeof e.last_modified=="number"?n.last_modified=e.last_modified:typeof e.last_modified=="object"&&(n.last_modified=new f.LongBits(e.last_modified.low>>>0,e.last_modified.high>>>0).toNumber(!0))),e.file_size!=null&&(f.Long?(n.file_size=f.Long.fromValue(e.file_size)).unsigned=!0:typeof e.file_size=="string"?n.file_size=parseInt(e.file_size,10):typeof e.file_size=="number"?n.file_size=e.file_size:typeof e.file_size=="object"&&(n.file_size=new f.LongBits(e.file_size.low>>>0,e.file_size.high>>>0).toNumber(!0))),e.is_upload!=null&&(n.is_upload=!!e.is_upload),e.is_identical!=null&&(n.is_identical=!!e.is_identical),n},i.toObject=function(e,t){t||(t={});let n={};if(t.defaults){if(n.id=0,n.file_num=0,f.Long){let r=new f.Long(0,0,!0);n.last_modified=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.last_modified=t.longs===String?"0":0;if(f.Long){let r=new f.Long(0,0,!0);n.file_size=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.file_size=t.longs===String?"0":0;n.is_upload=!1,n.is_identical=!1}return e.id!=null&&e.hasOwnProperty("id")&&(n.id=e.id),e.file_num!=null&&e.hasOwnProperty("file_num")&&(n.file_num=e.file_num),e.last_modified!=null&&e.hasOwnProperty("last_modified")&&(typeof e.last_modified=="number"?n.last_modified=t.longs===String?String(e.last_modified):e.last_modified:n.last_modified=t.longs===String?f.Long.prototype.toString.call(e.last_modified):t.longs===Number?new f.LongBits(e.last_modified.low>>>0,e.last_modified.high>>>0).toNumber(!0):e.last_modified),e.file_size!=null&&e.hasOwnProperty("file_size")&&(typeof e.file_size=="number"?n.file_size=t.longs===String?String(e.file_size):e.file_size:n.file_size=t.longs===String?f.Long.prototype.toString.call(e.file_size):t.longs===Number?new f.LongBits(e.file_size.low>>>0,e.file_size.high>>>0).toNumber(!0):e.file_size),e.is_upload!=null&&e.hasOwnProperty("is_upload")&&(n.is_upload=e.is_upload),e.is_identical!=null&&e.hasOwnProperty("is_identical")&&(n.is_identical=e.is_identical),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.FileTransferDigest"},i}(),p.FileTransferBlock=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.id=0,i.prototype.file_num=0,i.prototype.data=f.newBuffer([]),i.prototype.compressed=!1,i.prototype.blk_id=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(8).int32(e.id),e.file_num!=null&&Object.hasOwnProperty.call(e,"file_num")&&t.uint32(16).sint32(e.file_num),e.data!=null&&Object.hasOwnProperty.call(e,"data")&&t.uint32(26).bytes(e.data),e.compressed!=null&&Object.hasOwnProperty.call(e,"compressed")&&t.uint32(32).bool(e.compressed),e.blk_id!=null&&Object.hasOwnProperty.call(e,"blk_id")&&t.uint32(40).uint32(e.blk_id),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.FileTransferBlock;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.id=e.int32();break}case 2:{d.file_num=e.sint32();break}case 3:{d.data=e.bytes();break}case 4:{d.compressed=e.bool();break}case 5:{d.blk_id=e.uint32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.id!=null&&e.hasOwnProperty("id")&&!f.isInteger(e.id)?"id: integer expected":e.file_num!=null&&e.hasOwnProperty("file_num")&&!f.isInteger(e.file_num)?"file_num: integer expected":e.data!=null&&e.hasOwnProperty("data")&&!(e.data&&typeof e.data.length=="number"||f.isString(e.data))?"data: buffer expected":e.compressed!=null&&e.hasOwnProperty("compressed")&&typeof e.compressed!="boolean"?"compressed: boolean expected":e.blk_id!=null&&e.hasOwnProperty("blk_id")&&!f.isInteger(e.blk_id)?"blk_id: integer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.FileTransferBlock)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.FileTransferBlock;return e.id!=null&&(n.id=e.id|0),e.file_num!=null&&(n.file_num=e.file_num|0),e.data!=null&&(typeof e.data=="string"?f.base64.decode(e.data,n.data=f.newBuffer(f.base64.length(e.data)),0):e.data.length>=0&&(n.data=e.data)),e.compressed!=null&&(n.compressed=!!e.compressed),e.blk_id!=null&&(n.blk_id=e.blk_id>>>0),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.id=0,n.file_num=0,t.bytes===String?n.data="":(n.data=[],t.bytes!==Array&&(n.data=f.newBuffer(n.data))),n.compressed=!1,n.blk_id=0),e.id!=null&&e.hasOwnProperty("id")&&(n.id=e.id),e.file_num!=null&&e.hasOwnProperty("file_num")&&(n.file_num=e.file_num),e.data!=null&&e.hasOwnProperty("data")&&(n.data=t.bytes===String?f.base64.encode(e.data,0,e.data.length):t.bytes===Array?Array.prototype.slice.call(e.data):e.data),e.compressed!=null&&e.hasOwnProperty("compressed")&&(n.compressed=e.compressed),e.blk_id!=null&&e.hasOwnProperty("blk_id")&&(n.blk_id=e.blk_id),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.FileTransferBlock"},i}(),p.FileTransferError=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.id=0,i.prototype.error="",i.prototype.file_num=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(8).int32(e.id),e.error!=null&&Object.hasOwnProperty.call(e,"error")&&t.uint32(18).string(e.error),e.file_num!=null&&Object.hasOwnProperty.call(e,"file_num")&&t.uint32(24).sint32(e.file_num),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.FileTransferError;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.id=e.int32();break}case 2:{d.error=e.string();break}case 3:{d.file_num=e.sint32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.id!=null&&e.hasOwnProperty("id")&&!f.isInteger(e.id)?"id: integer expected":e.error!=null&&e.hasOwnProperty("error")&&!f.isString(e.error)?"error: string expected":e.file_num!=null&&e.hasOwnProperty("file_num")&&!f.isInteger(e.file_num)?"file_num: integer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.FileTransferError)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.FileTransferError;return e.id!=null&&(n.id=e.id|0),e.error!=null&&(n.error=String(e.error)),e.file_num!=null&&(n.file_num=e.file_num|0),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.id=0,n.error="",n.file_num=0),e.id!=null&&e.hasOwnProperty("id")&&(n.id=e.id),e.error!=null&&e.hasOwnProperty("error")&&(n.error=e.error),e.file_num!=null&&e.hasOwnProperty("file_num")&&(n.file_num=e.file_num),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.FileTransferError"},i}(),p.FileTransferSendRequest=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.id=0,i.prototype.path="",i.prototype.include_hidden=!1,i.prototype.file_num=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(8).int32(e.id),e.path!=null&&Object.hasOwnProperty.call(e,"path")&&t.uint32(18).string(e.path),e.include_hidden!=null&&Object.hasOwnProperty.call(e,"include_hidden")&&t.uint32(24).bool(e.include_hidden),e.file_num!=null&&Object.hasOwnProperty.call(e,"file_num")&&t.uint32(32).int32(e.file_num),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.FileTransferSendRequest;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.id=e.int32();break}case 2:{d.path=e.string();break}case 3:{d.include_hidden=e.bool();break}case 4:{d.file_num=e.int32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.id!=null&&e.hasOwnProperty("id")&&!f.isInteger(e.id)?"id: integer expected":e.path!=null&&e.hasOwnProperty("path")&&!f.isString(e.path)?"path: string expected":e.include_hidden!=null&&e.hasOwnProperty("include_hidden")&&typeof e.include_hidden!="boolean"?"include_hidden: boolean expected":e.file_num!=null&&e.hasOwnProperty("file_num")&&!f.isInteger(e.file_num)?"file_num: integer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.FileTransferSendRequest)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.FileTransferSendRequest;return e.id!=null&&(n.id=e.id|0),e.path!=null&&(n.path=String(e.path)),e.include_hidden!=null&&(n.include_hidden=!!e.include_hidden),e.file_num!=null&&(n.file_num=e.file_num|0),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.id=0,n.path="",n.include_hidden=!1,n.file_num=0),e.id!=null&&e.hasOwnProperty("id")&&(n.id=e.id),e.path!=null&&e.hasOwnProperty("path")&&(n.path=e.path),e.include_hidden!=null&&e.hasOwnProperty("include_hidden")&&(n.include_hidden=e.include_hidden),e.file_num!=null&&e.hasOwnProperty("file_num")&&(n.file_num=e.file_num),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.FileTransferSendRequest"},i}(),p.FileTransferSendConfirmRequest=function(){function i(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)e[t[n]]!=null&&t[n]!=="__proto__"&&(this[t[n]]=e[t[n]])}i.prototype.id=0,i.prototype.file_num=0,i.prototype.skip=null,i.prototype.offset_blk=null;let o;return Object.defineProperty(i.prototype,"union",{get:f.oneOfGetter(o=["skip","offset_blk"]),set:f.oneOfSetter(o)}),i.create=function(t){return new i(t)},i.encode=function(t,n){return n||(n=E.create()),t.id!=null&&Object.hasOwnProperty.call(t,"id")&&n.uint32(8).int32(t.id),t.file_num!=null&&Object.hasOwnProperty.call(t,"file_num")&&n.uint32(16).sint32(t.file_num),t.skip!=null&&Object.hasOwnProperty.call(t,"skip")&&n.uint32(24).bool(t.skip),t.offset_blk!=null&&Object.hasOwnProperty.call(t,"offset_blk")&&n.uint32(32).uint32(t.offset_blk),n},i.encodeDelimited=function(t,n){return this.encode(t,n).ldelim()},i.decode=function(t,n,r,l){if(t instanceof s||(t=s.create(t)),l===void 0&&(l=0),l>s.recursionLimit)throw Error("maximum nesting depth exceeded");let d=n===void 0?t.len:t.pos+n,c=new u.hbb.FileTransferSendConfirmRequest;for(;t.pos<d;){let w=t.uint32();if(w===r)break;switch(w>>>3){case 1:{c.id=t.int32();break}case 2:{c.file_num=t.sint32();break}case 3:{c.skip=t.bool();break}case 4:{c.offset_blk=t.uint32();break}default:t.skipType(w&7,l);break}}return c},i.decodeDelimited=function(t){return t instanceof s||(t=new s(t)),this.decode(t,t.uint32())},i.verify=function(t,n){if(typeof t!="object"||t===null)return"object expected";if(n===void 0&&(n=0),n>f.recursionLimit)return"maximum nesting depth exceeded";let r={};if(t.id!=null&&t.hasOwnProperty("id")&&!f.isInteger(t.id))return"id: integer expected";if(t.file_num!=null&&t.hasOwnProperty("file_num")&&!f.isInteger(t.file_num))return"file_num: integer expected";if(t.skip!=null&&t.hasOwnProperty("skip")&&(r.union=1,typeof t.skip!="boolean"))return"skip: boolean expected";if(t.offset_blk!=null&&t.hasOwnProperty("offset_blk")){if(r.union===1)return"union: multiple values";if(r.union=1,!f.isInteger(t.offset_blk))return"offset_blk: integer expected"}return null},i.fromObject=function(t,n){if(t instanceof u.hbb.FileTransferSendConfirmRequest)return t;if(n===void 0&&(n=0),n>f.recursionLimit)throw Error("maximum nesting depth exceeded");let r=new u.hbb.FileTransferSendConfirmRequest;return t.id!=null&&(r.id=t.id|0),t.file_num!=null&&(r.file_num=t.file_num|0),t.skip!=null&&(r.skip=!!t.skip),t.offset_blk!=null&&(r.offset_blk=t.offset_blk>>>0),r},i.toObject=function(t,n){n||(n={});let r={};return n.defaults&&(r.id=0,r.file_num=0),t.id!=null&&t.hasOwnProperty("id")&&(r.id=t.id),t.file_num!=null&&t.hasOwnProperty("file_num")&&(r.file_num=t.file_num),t.skip!=null&&t.hasOwnProperty("skip")&&(r.skip=t.skip,n.oneofs&&(r.union="skip")),t.offset_blk!=null&&t.hasOwnProperty("offset_blk")&&(r.offset_blk=t.offset_blk,n.oneofs&&(r.union="offset_blk")),r},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/hbb.FileTransferSendConfirmRequest"},i}(),p.FileTransferDone=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.id=0,i.prototype.file_num=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(8).int32(e.id),e.file_num!=null&&Object.hasOwnProperty.call(e,"file_num")&&t.uint32(16).sint32(e.file_num),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.FileTransferDone;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.id=e.int32();break}case 2:{d.file_num=e.sint32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.id!=null&&e.hasOwnProperty("id")&&!f.isInteger(e.id)?"id: integer expected":e.file_num!=null&&e.hasOwnProperty("file_num")&&!f.isInteger(e.file_num)?"file_num: integer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.FileTransferDone)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.FileTransferDone;return e.id!=null&&(n.id=e.id|0),e.file_num!=null&&(n.file_num=e.file_num|0),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.id=0,n.file_num=0),e.id!=null&&e.hasOwnProperty("id")&&(n.id=e.id),e.file_num!=null&&e.hasOwnProperty("file_num")&&(n.file_num=e.file_num),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.FileTransferDone"},i}(),p.FileTransferReceiveRequest=function(){function i(o){if(this.files=[],o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.id=0,i.prototype.path="",i.prototype.files=f.emptyArray,i.prototype.file_num=0,i.prototype.total_size=f.Long?f.Long.fromBits(0,0,!0):0,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=E.create()),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(8).int32(e.id),e.path!=null&&Object.hasOwnProperty.call(e,"path")&&t.uint32(18).string(e.path),e.files!=null&&e.files.length)for(let n=0;n<e.files.length;++n)u.hbb.FileEntry.encode(e.files[n],t.uint32(26).fork()).ldelim();return e.file_num!=null&&Object.hasOwnProperty.call(e,"file_num")&&t.uint32(32).int32(e.file_num),e.total_size!=null&&Object.hasOwnProperty.call(e,"total_size")&&t.uint32(40).uint64(e.total_size),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.FileTransferReceiveRequest;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.id=e.int32();break}case 2:{d.path=e.string();break}case 3:{d.files&&d.files.length||(d.files=[]),d.files.push(u.hbb.FileEntry.decode(e,e.uint32(),void 0,r+1));break}case 4:{d.file_num=e.int32();break}case 5:{d.total_size=e.uint64();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.id!=null&&e.hasOwnProperty("id")&&!f.isInteger(e.id))return"id: integer expected";if(e.path!=null&&e.hasOwnProperty("path")&&!f.isString(e.path))return"path: string expected";if(e.files!=null&&e.hasOwnProperty("files")){if(!Array.isArray(e.files))return"files: array expected";for(let n=0;n<e.files.length;++n){let r=u.hbb.FileEntry.verify(e.files[n],t+1);if(r)return"files."+r}}return e.file_num!=null&&e.hasOwnProperty("file_num")&&!f.isInteger(e.file_num)?"file_num: integer expected":e.total_size!=null&&e.hasOwnProperty("total_size")&&!f.isInteger(e.total_size)&&!(e.total_size&&f.isInteger(e.total_size.low)&&f.isInteger(e.total_size.high))?"total_size: integer|Long expected":null},i.fromObject=function(e,t){if(e instanceof u.hbb.FileTransferReceiveRequest)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.FileTransferReceiveRequest;if(e.id!=null&&(n.id=e.id|0),e.path!=null&&(n.path=String(e.path)),e.files){if(!Array.isArray(e.files))throw TypeError(".hbb.FileTransferReceiveRequest.files: array expected");n.files=[];for(let r=0;r<e.files.length;++r){if(typeof e.files[r]!="object")throw TypeError(".hbb.FileTransferReceiveRequest.files: object expected");n.files[r]=u.hbb.FileEntry.fromObject(e.files[r],t+1)}}return e.file_num!=null&&(n.file_num=e.file_num|0),e.total_size!=null&&(f.Long?(n.total_size=f.Long.fromValue(e.total_size)).unsigned=!0:typeof e.total_size=="string"?n.total_size=parseInt(e.total_size,10):typeof e.total_size=="number"?n.total_size=e.total_size:typeof e.total_size=="object"&&(n.total_size=new f.LongBits(e.total_size.low>>>0,e.total_size.high>>>0).toNumber(!0))),n},i.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.files=[]),t.defaults)if(n.id=0,n.path="",n.file_num=0,f.Long){let r=new f.Long(0,0,!0);n.total_size=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.total_size=t.longs===String?"0":0;if(e.id!=null&&e.hasOwnProperty("id")&&(n.id=e.id),e.path!=null&&e.hasOwnProperty("path")&&(n.path=e.path),e.files&&e.files.length){n.files=[];for(let r=0;r<e.files.length;++r)n.files[r]=u.hbb.FileEntry.toObject(e.files[r],t)}return e.file_num!=null&&e.hasOwnProperty("file_num")&&(n.file_num=e.file_num),e.total_size!=null&&e.hasOwnProperty("total_size")&&(typeof e.total_size=="number"?n.total_size=t.longs===String?String(e.total_size):e.total_size:n.total_size=t.longs===String?f.Long.prototype.toString.call(e.total_size):t.longs===Number?new f.LongBits(e.total_size.low>>>0,e.total_size.high>>>0).toNumber(!0):e.total_size),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.FileTransferReceiveRequest"},i}(),p.FileRemoveDir=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.id=0,i.prototype.path="",i.prototype.recursive=!1,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(8).int32(e.id),e.path!=null&&Object.hasOwnProperty.call(e,"path")&&t.uint32(18).string(e.path),e.recursive!=null&&Object.hasOwnProperty.call(e,"recursive")&&t.uint32(24).bool(e.recursive),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.FileRemoveDir;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.id=e.int32();break}case 2:{d.path=e.string();break}case 3:{d.recursive=e.bool();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.id!=null&&e.hasOwnProperty("id")&&!f.isInteger(e.id)?"id: integer expected":e.path!=null&&e.hasOwnProperty("path")&&!f.isString(e.path)?"path: string expected":e.recursive!=null&&e.hasOwnProperty("recursive")&&typeof e.recursive!="boolean"?"recursive: boolean expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.FileRemoveDir)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.FileRemoveDir;return e.id!=null&&(n.id=e.id|0),e.path!=null&&(n.path=String(e.path)),e.recursive!=null&&(n.recursive=!!e.recursive),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.id=0,n.path="",n.recursive=!1),e.id!=null&&e.hasOwnProperty("id")&&(n.id=e.id),e.path!=null&&e.hasOwnProperty("path")&&(n.path=e.path),e.recursive!=null&&e.hasOwnProperty("recursive")&&(n.recursive=e.recursive),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.FileRemoveDir"},i}(),p.FileRemoveFile=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.id=0,i.prototype.path="",i.prototype.file_num=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(8).int32(e.id),e.path!=null&&Object.hasOwnProperty.call(e,"path")&&t.uint32(18).string(e.path),e.file_num!=null&&Object.hasOwnProperty.call(e,"file_num")&&t.uint32(24).sint32(e.file_num),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.FileRemoveFile;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.id=e.int32();break}case 2:{d.path=e.string();break}case 3:{d.file_num=e.sint32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.id!=null&&e.hasOwnProperty("id")&&!f.isInteger(e.id)?"id: integer expected":e.path!=null&&e.hasOwnProperty("path")&&!f.isString(e.path)?"path: string expected":e.file_num!=null&&e.hasOwnProperty("file_num")&&!f.isInteger(e.file_num)?"file_num: integer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.FileRemoveFile)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.FileRemoveFile;return e.id!=null&&(n.id=e.id|0),e.path!=null&&(n.path=String(e.path)),e.file_num!=null&&(n.file_num=e.file_num|0),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.id=0,n.path="",n.file_num=0),e.id!=null&&e.hasOwnProperty("id")&&(n.id=e.id),e.path!=null&&e.hasOwnProperty("path")&&(n.path=e.path),e.file_num!=null&&e.hasOwnProperty("file_num")&&(n.file_num=e.file_num),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.FileRemoveFile"},i}(),p.FileDirCreate=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.id=0,i.prototype.path="",i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(8).int32(e.id),e.path!=null&&Object.hasOwnProperty.call(e,"path")&&t.uint32(18).string(e.path),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.FileDirCreate;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.id=e.int32();break}case 2:{d.path=e.string();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.id!=null&&e.hasOwnProperty("id")&&!f.isInteger(e.id)?"id: integer expected":e.path!=null&&e.hasOwnProperty("path")&&!f.isString(e.path)?"path: string expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.FileDirCreate)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.FileDirCreate;return e.id!=null&&(n.id=e.id|0),e.path!=null&&(n.path=String(e.path)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.id=0,n.path=""),e.id!=null&&e.hasOwnProperty("id")&&(n.id=e.id),e.path!=null&&e.hasOwnProperty("path")&&(n.path=e.path),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.FileDirCreate"},i}(),p.CliprdrMonitorReady=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.CliprdrMonitorReady;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.CliprdrMonitorReady)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");return new u.hbb.CliprdrMonitorReady},i.toObject=function(){return{}},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.CliprdrMonitorReady"},i}(),p.CliprdrFormat=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.id=0,i.prototype.format="",i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(16).int32(e.id),e.format!=null&&Object.hasOwnProperty.call(e,"format")&&t.uint32(26).string(e.format),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.CliprdrFormat;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 2:{d.id=e.int32();break}case 3:{d.format=e.string();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.id!=null&&e.hasOwnProperty("id")&&!f.isInteger(e.id)?"id: integer expected":e.format!=null&&e.hasOwnProperty("format")&&!f.isString(e.format)?"format: string expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.CliprdrFormat)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.CliprdrFormat;return e.id!=null&&(n.id=e.id|0),e.format!=null&&(n.format=String(e.format)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.id=0,n.format=""),e.id!=null&&e.hasOwnProperty("id")&&(n.id=e.id),e.format!=null&&e.hasOwnProperty("format")&&(n.format=e.format),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.CliprdrFormat"},i}(),p.CliprdrServerFormatList=function(){function i(o){if(this.formats=[],o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.formats=f.emptyArray,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=E.create()),e.formats!=null&&e.formats.length)for(let n=0;n<e.formats.length;++n)u.hbb.CliprdrFormat.encode(e.formats[n],t.uint32(18).fork()).ldelim();return t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.CliprdrServerFormatList;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 2:{d.formats&&d.formats.length||(d.formats=[]),d.formats.push(u.hbb.CliprdrFormat.decode(e,e.uint32(),void 0,r+1));break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.formats!=null&&e.hasOwnProperty("formats")){if(!Array.isArray(e.formats))return"formats: array expected";for(let n=0;n<e.formats.length;++n){let r=u.hbb.CliprdrFormat.verify(e.formats[n],t+1);if(r)return"formats."+r}}return null},i.fromObject=function(e,t){if(e instanceof u.hbb.CliprdrServerFormatList)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.CliprdrServerFormatList;if(e.formats){if(!Array.isArray(e.formats))throw TypeError(".hbb.CliprdrServerFormatList.formats: array expected");n.formats=[];for(let r=0;r<e.formats.length;++r){if(typeof e.formats[r]!="object")throw TypeError(".hbb.CliprdrServerFormatList.formats: object expected");n.formats[r]=u.hbb.CliprdrFormat.fromObject(e.formats[r],t+1)}}return n},i.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.formats=[]),e.formats&&e.formats.length){n.formats=[];for(let r=0;r<e.formats.length;++r)n.formats[r]=u.hbb.CliprdrFormat.toObject(e.formats[r],t)}return n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.CliprdrServerFormatList"},i}(),p.CliprdrServerFormatListResponse=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.msg_flags=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.msg_flags!=null&&Object.hasOwnProperty.call(e,"msg_flags")&&t.uint32(16).int32(e.msg_flags),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.CliprdrServerFormatListResponse;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 2:{d.msg_flags=e.int32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.msg_flags!=null&&e.hasOwnProperty("msg_flags")&&!f.isInteger(e.msg_flags)?"msg_flags: integer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.CliprdrServerFormatListResponse)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.CliprdrServerFormatListResponse;return e.msg_flags!=null&&(n.msg_flags=e.msg_flags|0),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.msg_flags=0),e.msg_flags!=null&&e.hasOwnProperty("msg_flags")&&(n.msg_flags=e.msg_flags),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.CliprdrServerFormatListResponse"},i}(),p.CliprdrServerFormatDataRequest=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.requested_format_id=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.requested_format_id!=null&&Object.hasOwnProperty.call(e,"requested_format_id")&&t.uint32(16).int32(e.requested_format_id),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.CliprdrServerFormatDataRequest;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 2:{d.requested_format_id=e.int32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.requested_format_id!=null&&e.hasOwnProperty("requested_format_id")&&!f.isInteger(e.requested_format_id)?"requested_format_id: integer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.CliprdrServerFormatDataRequest)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.CliprdrServerFormatDataRequest;return e.requested_format_id!=null&&(n.requested_format_id=e.requested_format_id|0),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.requested_format_id=0),e.requested_format_id!=null&&e.hasOwnProperty("requested_format_id")&&(n.requested_format_id=e.requested_format_id),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.CliprdrServerFormatDataRequest"},i}(),p.CliprdrServerFormatDataResponse=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.msg_flags=0,i.prototype.format_data=f.newBuffer([]),i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.msg_flags!=null&&Object.hasOwnProperty.call(e,"msg_flags")&&t.uint32(16).int32(e.msg_flags),e.format_data!=null&&Object.hasOwnProperty.call(e,"format_data")&&t.uint32(26).bytes(e.format_data),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.CliprdrServerFormatDataResponse;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 2:{d.msg_flags=e.int32();break}case 3:{d.format_data=e.bytes();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.msg_flags!=null&&e.hasOwnProperty("msg_flags")&&!f.isInteger(e.msg_flags)?"msg_flags: integer expected":e.format_data!=null&&e.hasOwnProperty("format_data")&&!(e.format_data&&typeof e.format_data.length=="number"||f.isString(e.format_data))?"format_data: buffer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.CliprdrServerFormatDataResponse)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.CliprdrServerFormatDataResponse;return e.msg_flags!=null&&(n.msg_flags=e.msg_flags|0),e.format_data!=null&&(typeof e.format_data=="string"?f.base64.decode(e.format_data,n.format_data=f.newBuffer(f.base64.length(e.format_data)),0):e.format_data.length>=0&&(n.format_data=e.format_data)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.msg_flags=0,t.bytes===String?n.format_data="":(n.format_data=[],t.bytes!==Array&&(n.format_data=f.newBuffer(n.format_data)))),e.msg_flags!=null&&e.hasOwnProperty("msg_flags")&&(n.msg_flags=e.msg_flags),e.format_data!=null&&e.hasOwnProperty("format_data")&&(n.format_data=t.bytes===String?f.base64.encode(e.format_data,0,e.format_data.length):t.bytes===Array?Array.prototype.slice.call(e.format_data):e.format_data),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.CliprdrServerFormatDataResponse"},i}(),p.CliprdrFileContentsRequest=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.stream_id=0,i.prototype.list_index=0,i.prototype.dw_flags=0,i.prototype.n_position_low=0,i.prototype.n_position_high=0,i.prototype.cb_requested=0,i.prototype.have_clip_data_id=!1,i.prototype.clip_data_id=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.stream_id!=null&&Object.hasOwnProperty.call(e,"stream_id")&&t.uint32(16).int32(e.stream_id),e.list_index!=null&&Object.hasOwnProperty.call(e,"list_index")&&t.uint32(24).int32(e.list_index),e.dw_flags!=null&&Object.hasOwnProperty.call(e,"dw_flags")&&t.uint32(32).int32(e.dw_flags),e.n_position_low!=null&&Object.hasOwnProperty.call(e,"n_position_low")&&t.uint32(40).int32(e.n_position_low),e.n_position_high!=null&&Object.hasOwnProperty.call(e,"n_position_high")&&t.uint32(48).int32(e.n_position_high),e.cb_requested!=null&&Object.hasOwnProperty.call(e,"cb_requested")&&t.uint32(56).int32(e.cb_requested),e.have_clip_data_id!=null&&Object.hasOwnProperty.call(e,"have_clip_data_id")&&t.uint32(64).bool(e.have_clip_data_id),e.clip_data_id!=null&&Object.hasOwnProperty.call(e,"clip_data_id")&&t.uint32(72).int32(e.clip_data_id),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.CliprdrFileContentsRequest;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 2:{d.stream_id=e.int32();break}case 3:{d.list_index=e.int32();break}case 4:{d.dw_flags=e.int32();break}case 5:{d.n_position_low=e.int32();break}case 6:{d.n_position_high=e.int32();break}case 7:{d.cb_requested=e.int32();break}case 8:{d.have_clip_data_id=e.bool();break}case 9:{d.clip_data_id=e.int32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.stream_id!=null&&e.hasOwnProperty("stream_id")&&!f.isInteger(e.stream_id)?"stream_id: integer expected":e.list_index!=null&&e.hasOwnProperty("list_index")&&!f.isInteger(e.list_index)?"list_index: integer expected":e.dw_flags!=null&&e.hasOwnProperty("dw_flags")&&!f.isInteger(e.dw_flags)?"dw_flags: integer expected":e.n_position_low!=null&&e.hasOwnProperty("n_position_low")&&!f.isInteger(e.n_position_low)?"n_position_low: integer expected":e.n_position_high!=null&&e.hasOwnProperty("n_position_high")&&!f.isInteger(e.n_position_high)?"n_position_high: integer expected":e.cb_requested!=null&&e.hasOwnProperty("cb_requested")&&!f.isInteger(e.cb_requested)?"cb_requested: integer expected":e.have_clip_data_id!=null&&e.hasOwnProperty("have_clip_data_id")&&typeof e.have_clip_data_id!="boolean"?"have_clip_data_id: boolean expected":e.clip_data_id!=null&&e.hasOwnProperty("clip_data_id")&&!f.isInteger(e.clip_data_id)?"clip_data_id: integer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.CliprdrFileContentsRequest)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.CliprdrFileContentsRequest;return e.stream_id!=null&&(n.stream_id=e.stream_id|0),e.list_index!=null&&(n.list_index=e.list_index|0),e.dw_flags!=null&&(n.dw_flags=e.dw_flags|0),e.n_position_low!=null&&(n.n_position_low=e.n_position_low|0),e.n_position_high!=null&&(n.n_position_high=e.n_position_high|0),e.cb_requested!=null&&(n.cb_requested=e.cb_requested|0),e.have_clip_data_id!=null&&(n.have_clip_data_id=!!e.have_clip_data_id),e.clip_data_id!=null&&(n.clip_data_id=e.clip_data_id|0),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.stream_id=0,n.list_index=0,n.dw_flags=0,n.n_position_low=0,n.n_position_high=0,n.cb_requested=0,n.have_clip_data_id=!1,n.clip_data_id=0),e.stream_id!=null&&e.hasOwnProperty("stream_id")&&(n.stream_id=e.stream_id),e.list_index!=null&&e.hasOwnProperty("list_index")&&(n.list_index=e.list_index),e.dw_flags!=null&&e.hasOwnProperty("dw_flags")&&(n.dw_flags=e.dw_flags),e.n_position_low!=null&&e.hasOwnProperty("n_position_low")&&(n.n_position_low=e.n_position_low),e.n_position_high!=null&&e.hasOwnProperty("n_position_high")&&(n.n_position_high=e.n_position_high),e.cb_requested!=null&&e.hasOwnProperty("cb_requested")&&(n.cb_requested=e.cb_requested),e.have_clip_data_id!=null&&e.hasOwnProperty("have_clip_data_id")&&(n.have_clip_data_id=e.have_clip_data_id),e.clip_data_id!=null&&e.hasOwnProperty("clip_data_id")&&(n.clip_data_id=e.clip_data_id),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.CliprdrFileContentsRequest"},i}(),p.CliprdrFileContentsResponse=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.msg_flags=0,i.prototype.stream_id=0,i.prototype.requested_data=f.newBuffer([]),i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.msg_flags!=null&&Object.hasOwnProperty.call(e,"msg_flags")&&t.uint32(24).int32(e.msg_flags),e.stream_id!=null&&Object.hasOwnProperty.call(e,"stream_id")&&t.uint32(32).int32(e.stream_id),e.requested_data!=null&&Object.hasOwnProperty.call(e,"requested_data")&&t.uint32(42).bytes(e.requested_data),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.CliprdrFileContentsResponse;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 3:{d.msg_flags=e.int32();break}case 4:{d.stream_id=e.int32();break}case 5:{d.requested_data=e.bytes();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.msg_flags!=null&&e.hasOwnProperty("msg_flags")&&!f.isInteger(e.msg_flags)?"msg_flags: integer expected":e.stream_id!=null&&e.hasOwnProperty("stream_id")&&!f.isInteger(e.stream_id)?"stream_id: integer expected":e.requested_data!=null&&e.hasOwnProperty("requested_data")&&!(e.requested_data&&typeof e.requested_data.length=="number"||f.isString(e.requested_data))?"requested_data: buffer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.CliprdrFileContentsResponse)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.CliprdrFileContentsResponse;return e.msg_flags!=null&&(n.msg_flags=e.msg_flags|0),e.stream_id!=null&&(n.stream_id=e.stream_id|0),e.requested_data!=null&&(typeof e.requested_data=="string"?f.base64.decode(e.requested_data,n.requested_data=f.newBuffer(f.base64.length(e.requested_data)),0):e.requested_data.length>=0&&(n.requested_data=e.requested_data)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.msg_flags=0,n.stream_id=0,t.bytes===String?n.requested_data="":(n.requested_data=[],t.bytes!==Array&&(n.requested_data=f.newBuffer(n.requested_data)))),e.msg_flags!=null&&e.hasOwnProperty("msg_flags")&&(n.msg_flags=e.msg_flags),e.stream_id!=null&&e.hasOwnProperty("stream_id")&&(n.stream_id=e.stream_id),e.requested_data!=null&&e.hasOwnProperty("requested_data")&&(n.requested_data=t.bytes===String?f.base64.encode(e.requested_data,0,e.requested_data.length):t.bytes===Array?Array.prototype.slice.call(e.requested_data):e.requested_data),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.CliprdrFileContentsResponse"},i}(),p.CliprdrTryEmpty=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.CliprdrTryEmpty;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.CliprdrTryEmpty)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");return new u.hbb.CliprdrTryEmpty},i.toObject=function(){return{}},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.CliprdrTryEmpty"},i}(),p.Cliprdr=function(){function i(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)e[t[n]]!=null&&t[n]!=="__proto__"&&(this[t[n]]=e[t[n]])}i.prototype.ready=null,i.prototype.format_list=null,i.prototype.format_list_response=null,i.prototype.format_data_request=null,i.prototype.format_data_response=null,i.prototype.file_contents_request=null,i.prototype.file_contents_response=null,i.prototype.try_empty=null;let o;return Object.defineProperty(i.prototype,"union",{get:f.oneOfGetter(o=["ready","format_list","format_list_response","format_data_request","format_data_response","file_contents_request","file_contents_response","try_empty"]),set:f.oneOfSetter(o)}),i.create=function(t){return new i(t)},i.encode=function(t,n){return n||(n=E.create()),t.ready!=null&&Object.hasOwnProperty.call(t,"ready")&&u.hbb.CliprdrMonitorReady.encode(t.ready,n.uint32(10).fork()).ldelim(),t.format_list!=null&&Object.hasOwnProperty.call(t,"format_list")&&u.hbb.CliprdrServerFormatList.encode(t.format_list,n.uint32(18).fork()).ldelim(),t.format_list_response!=null&&Object.hasOwnProperty.call(t,"format_list_response")&&u.hbb.CliprdrServerFormatListResponse.encode(t.format_list_response,n.uint32(26).fork()).ldelim(),t.format_data_request!=null&&Object.hasOwnProperty.call(t,"format_data_request")&&u.hbb.CliprdrServerFormatDataRequest.encode(t.format_data_request,n.uint32(34).fork()).ldelim(),t.format_data_response!=null&&Object.hasOwnProperty.call(t,"format_data_response")&&u.hbb.CliprdrServerFormatDataResponse.encode(t.format_data_response,n.uint32(42).fork()).ldelim(),t.file_contents_request!=null&&Object.hasOwnProperty.call(t,"file_contents_request")&&u.hbb.CliprdrFileContentsRequest.encode(t.file_contents_request,n.uint32(50).fork()).ldelim(),t.file_contents_response!=null&&Object.hasOwnProperty.call(t,"file_contents_response")&&u.hbb.CliprdrFileContentsResponse.encode(t.file_contents_response,n.uint32(58).fork()).ldelim(),t.try_empty!=null&&Object.hasOwnProperty.call(t,"try_empty")&&u.hbb.CliprdrTryEmpty.encode(t.try_empty,n.uint32(66).fork()).ldelim(),n},i.encodeDelimited=function(t,n){return this.encode(t,n).ldelim()},i.decode=function(t,n,r,l){if(t instanceof s||(t=s.create(t)),l===void 0&&(l=0),l>s.recursionLimit)throw Error("maximum nesting depth exceeded");let d=n===void 0?t.len:t.pos+n,c=new u.hbb.Cliprdr;for(;t.pos<d;){let w=t.uint32();if(w===r)break;switch(w>>>3){case 1:{c.ready=u.hbb.CliprdrMonitorReady.decode(t,t.uint32(),void 0,l+1);break}case 2:{c.format_list=u.hbb.CliprdrServerFormatList.decode(t,t.uint32(),void 0,l+1);break}case 3:{c.format_list_response=u.hbb.CliprdrServerFormatListResponse.decode(t,t.uint32(),void 0,l+1);break}case 4:{c.format_data_request=u.hbb.CliprdrServerFormatDataRequest.decode(t,t.uint32(),void 0,l+1);break}case 5:{c.format_data_response=u.hbb.CliprdrServerFormatDataResponse.decode(t,t.uint32(),void 0,l+1);break}case 6:{c.file_contents_request=u.hbb.CliprdrFileContentsRequest.decode(t,t.uint32(),void 0,l+1);break}case 7:{c.file_contents_response=u.hbb.CliprdrFileContentsResponse.decode(t,t.uint32(),void 0,l+1);break}case 8:{c.try_empty=u.hbb.CliprdrTryEmpty.decode(t,t.uint32(),void 0,l+1);break}default:t.skipType(w&7,l);break}}return c},i.decodeDelimited=function(t){return t instanceof s||(t=new s(t)),this.decode(t,t.uint32())},i.verify=function(t,n){if(typeof t!="object"||t===null)return"object expected";if(n===void 0&&(n=0),n>f.recursionLimit)return"maximum nesting depth exceeded";let r={};if(t.ready!=null&&t.hasOwnProperty("ready")){r.union=1;{let l=u.hbb.CliprdrMonitorReady.verify(t.ready,n+1);if(l)return"ready."+l}}if(t.format_list!=null&&t.hasOwnProperty("format_list")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.CliprdrServerFormatList.verify(t.format_list,n+1);if(l)return"format_list."+l}}if(t.format_list_response!=null&&t.hasOwnProperty("format_list_response")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.CliprdrServerFormatListResponse.verify(t.format_list_response,n+1);if(l)return"format_list_response."+l}}if(t.format_data_request!=null&&t.hasOwnProperty("format_data_request")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.CliprdrServerFormatDataRequest.verify(t.format_data_request,n+1);if(l)return"format_data_request."+l}}if(t.format_data_response!=null&&t.hasOwnProperty("format_data_response")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.CliprdrServerFormatDataResponse.verify(t.format_data_response,n+1);if(l)return"format_data_response."+l}}if(t.file_contents_request!=null&&t.hasOwnProperty("file_contents_request")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.CliprdrFileContentsRequest.verify(t.file_contents_request,n+1);if(l)return"file_contents_request."+l}}if(t.file_contents_response!=null&&t.hasOwnProperty("file_contents_response")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.CliprdrFileContentsResponse.verify(t.file_contents_response,n+1);if(l)return"file_contents_response."+l}}if(t.try_empty!=null&&t.hasOwnProperty("try_empty")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.CliprdrTryEmpty.verify(t.try_empty,n+1);if(l)return"try_empty."+l}}return null},i.fromObject=function(t,n){if(t instanceof u.hbb.Cliprdr)return t;if(n===void 0&&(n=0),n>f.recursionLimit)throw Error("maximum nesting depth exceeded");let r=new u.hbb.Cliprdr;if(t.ready!=null){if(typeof t.ready!="object")throw TypeError(".hbb.Cliprdr.ready: object expected");r.ready=u.hbb.CliprdrMonitorReady.fromObject(t.ready,n+1)}if(t.format_list!=null){if(typeof t.format_list!="object")throw TypeError(".hbb.Cliprdr.format_list: object expected");r.format_list=u.hbb.CliprdrServerFormatList.fromObject(t.format_list,n+1)}if(t.format_list_response!=null){if(typeof t.format_list_response!="object")throw TypeError(".hbb.Cliprdr.format_list_response: object expected");r.format_list_response=u.hbb.CliprdrServerFormatListResponse.fromObject(t.format_list_response,n+1)}if(t.format_data_request!=null){if(typeof t.format_data_request!="object")throw TypeError(".hbb.Cliprdr.format_data_request: object expected");r.format_data_request=u.hbb.CliprdrServerFormatDataRequest.fromObject(t.format_data_request,n+1)}if(t.format_data_response!=null){if(typeof t.format_data_response!="object")throw TypeError(".hbb.Cliprdr.format_data_response: object expected");r.format_data_response=u.hbb.CliprdrServerFormatDataResponse.fromObject(t.format_data_response,n+1)}if(t.file_contents_request!=null){if(typeof t.file_contents_request!="object")throw TypeError(".hbb.Cliprdr.file_contents_request: object expected");r.file_contents_request=u.hbb.CliprdrFileContentsRequest.fromObject(t.file_contents_request,n+1)}if(t.file_contents_response!=null){if(typeof t.file_contents_response!="object")throw TypeError(".hbb.Cliprdr.file_contents_response: object expected");r.file_contents_response=u.hbb.CliprdrFileContentsResponse.fromObject(t.file_contents_response,n+1)}if(t.try_empty!=null){if(typeof t.try_empty!="object")throw TypeError(".hbb.Cliprdr.try_empty: object expected");r.try_empty=u.hbb.CliprdrTryEmpty.fromObject(t.try_empty,n+1)}return r},i.toObject=function(t,n){n||(n={});let r={};return t.ready!=null&&t.hasOwnProperty("ready")&&(r.ready=u.hbb.CliprdrMonitorReady.toObject(t.ready,n),n.oneofs&&(r.union="ready")),t.format_list!=null&&t.hasOwnProperty("format_list")&&(r.format_list=u.hbb.CliprdrServerFormatList.toObject(t.format_list,n),n.oneofs&&(r.union="format_list")),t.format_list_response!=null&&t.hasOwnProperty("format_list_response")&&(r.format_list_response=u.hbb.CliprdrServerFormatListResponse.toObject(t.format_list_response,n),n.oneofs&&(r.union="format_list_response")),t.format_data_request!=null&&t.hasOwnProperty("format_data_request")&&(r.format_data_request=u.hbb.CliprdrServerFormatDataRequest.toObject(t.format_data_request,n),n.oneofs&&(r.union="format_data_request")),t.format_data_response!=null&&t.hasOwnProperty("format_data_response")&&(r.format_data_response=u.hbb.CliprdrServerFormatDataResponse.toObject(t.format_data_response,n),n.oneofs&&(r.union="format_data_response")),t.file_contents_request!=null&&t.hasOwnProperty("file_contents_request")&&(r.file_contents_request=u.hbb.CliprdrFileContentsRequest.toObject(t.file_contents_request,n),n.oneofs&&(r.union="file_contents_request")),t.file_contents_response!=null&&t.hasOwnProperty("file_contents_response")&&(r.file_contents_response=u.hbb.CliprdrFileContentsResponse.toObject(t.file_contents_response,n),n.oneofs&&(r.union="file_contents_response")),t.try_empty!=null&&t.hasOwnProperty("try_empty")&&(r.try_empty=u.hbb.CliprdrTryEmpty.toObject(t.try_empty,n),n.oneofs&&(r.union="try_empty")),r},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/hbb.Cliprdr"},i}(),p.Resolution=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.width=0,i.prototype.height=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.width!=null&&Object.hasOwnProperty.call(e,"width")&&t.uint32(8).int32(e.width),e.height!=null&&Object.hasOwnProperty.call(e,"height")&&t.uint32(16).int32(e.height),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.Resolution;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.width=e.int32();break}case 2:{d.height=e.int32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.width!=null&&e.hasOwnProperty("width")&&!f.isInteger(e.width)?"width: integer expected":e.height!=null&&e.hasOwnProperty("height")&&!f.isInteger(e.height)?"height: integer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.Resolution)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.Resolution;return e.width!=null&&(n.width=e.width|0),e.height!=null&&(n.height=e.height|0),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.width=0,n.height=0),e.width!=null&&e.hasOwnProperty("width")&&(n.width=e.width),e.height!=null&&e.hasOwnProperty("height")&&(n.height=e.height),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.Resolution"},i}(),p.DisplayResolution=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.display=0,i.prototype.resolution=null,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.display!=null&&Object.hasOwnProperty.call(e,"display")&&t.uint32(8).int32(e.display),e.resolution!=null&&Object.hasOwnProperty.call(e,"resolution")&&u.hbb.Resolution.encode(e.resolution,t.uint32(18).fork()).ldelim(),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.DisplayResolution;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.display=e.int32();break}case 2:{d.resolution=u.hbb.Resolution.decode(e,e.uint32(),void 0,r+1);break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.display!=null&&e.hasOwnProperty("display")&&!f.isInteger(e.display))return"display: integer expected";if(e.resolution!=null&&e.hasOwnProperty("resolution")){let n=u.hbb.Resolution.verify(e.resolution,t+1);if(n)return"resolution."+n}return null},i.fromObject=function(e,t){if(e instanceof u.hbb.DisplayResolution)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.DisplayResolution;if(e.display!=null&&(n.display=e.display|0),e.resolution!=null){if(typeof e.resolution!="object")throw TypeError(".hbb.DisplayResolution.resolution: object expected");n.resolution=u.hbb.Resolution.fromObject(e.resolution,t+1)}return n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.display=0,n.resolution=null),e.display!=null&&e.hasOwnProperty("display")&&(n.display=e.display),e.resolution!=null&&e.hasOwnProperty("resolution")&&(n.resolution=u.hbb.Resolution.toObject(e.resolution,t)),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.DisplayResolution"},i}(),p.SupportedResolutions=function(){function i(o){if(this.resolutions=[],o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.resolutions=f.emptyArray,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=E.create()),e.resolutions!=null&&e.resolutions.length)for(let n=0;n<e.resolutions.length;++n)u.hbb.Resolution.encode(e.resolutions[n],t.uint32(10).fork()).ldelim();return t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.SupportedResolutions;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.resolutions&&d.resolutions.length||(d.resolutions=[]),d.resolutions.push(u.hbb.Resolution.decode(e,e.uint32(),void 0,r+1));break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.resolutions!=null&&e.hasOwnProperty("resolutions")){if(!Array.isArray(e.resolutions))return"resolutions: array expected";for(let n=0;n<e.resolutions.length;++n){let r=u.hbb.Resolution.verify(e.resolutions[n],t+1);if(r)return"resolutions."+r}}return null},i.fromObject=function(e,t){if(e instanceof u.hbb.SupportedResolutions)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.SupportedResolutions;if(e.resolutions){if(!Array.isArray(e.resolutions))throw TypeError(".hbb.SupportedResolutions.resolutions: array expected");n.resolutions=[];for(let r=0;r<e.resolutions.length;++r){if(typeof e.resolutions[r]!="object")throw TypeError(".hbb.SupportedResolutions.resolutions: object expected");n.resolutions[r]=u.hbb.Resolution.fromObject(e.resolutions[r],t+1)}}return n},i.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.resolutions=[]),e.resolutions&&e.resolutions.length){n.resolutions=[];for(let r=0;r<e.resolutions.length;++r)n.resolutions[r]=u.hbb.Resolution.toObject(e.resolutions[r],t)}return n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.SupportedResolutions"},i}(),p.SwitchDisplay=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.display=0,i.prototype.x=0,i.prototype.y=0,i.prototype.width=0,i.prototype.height=0,i.prototype.cursor_embedded=!1,i.prototype.resolutions=null,i.prototype.original_resolution=null,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.display!=null&&Object.hasOwnProperty.call(e,"display")&&t.uint32(8).int32(e.display),e.x!=null&&Object.hasOwnProperty.call(e,"x")&&t.uint32(16).sint32(e.x),e.y!=null&&Object.hasOwnProperty.call(e,"y")&&t.uint32(24).sint32(e.y),e.width!=null&&Object.hasOwnProperty.call(e,"width")&&t.uint32(32).int32(e.width),e.height!=null&&Object.hasOwnProperty.call(e,"height")&&t.uint32(40).int32(e.height),e.cursor_embedded!=null&&Object.hasOwnProperty.call(e,"cursor_embedded")&&t.uint32(48).bool(e.cursor_embedded),e.resolutions!=null&&Object.hasOwnProperty.call(e,"resolutions")&&u.hbb.SupportedResolutions.encode(e.resolutions,t.uint32(58).fork()).ldelim(),e.original_resolution!=null&&Object.hasOwnProperty.call(e,"original_resolution")&&u.hbb.Resolution.encode(e.original_resolution,t.uint32(66).fork()).ldelim(),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.SwitchDisplay;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.display=e.int32();break}case 2:{d.x=e.sint32();break}case 3:{d.y=e.sint32();break}case 4:{d.width=e.int32();break}case 5:{d.height=e.int32();break}case 6:{d.cursor_embedded=e.bool();break}case 7:{d.resolutions=u.hbb.SupportedResolutions.decode(e,e.uint32(),void 0,r+1);break}case 8:{d.original_resolution=u.hbb.Resolution.decode(e,e.uint32(),void 0,r+1);break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.display!=null&&e.hasOwnProperty("display")&&!f.isInteger(e.display))return"display: integer expected";if(e.x!=null&&e.hasOwnProperty("x")&&!f.isInteger(e.x))return"x: integer expected";if(e.y!=null&&e.hasOwnProperty("y")&&!f.isInteger(e.y))return"y: integer expected";if(e.width!=null&&e.hasOwnProperty("width")&&!f.isInteger(e.width))return"width: integer expected";if(e.height!=null&&e.hasOwnProperty("height")&&!f.isInteger(e.height))return"height: integer expected";if(e.cursor_embedded!=null&&e.hasOwnProperty("cursor_embedded")&&typeof e.cursor_embedded!="boolean")return"cursor_embedded: boolean expected";if(e.resolutions!=null&&e.hasOwnProperty("resolutions")){let n=u.hbb.SupportedResolutions.verify(e.resolutions,t+1);if(n)return"resolutions."+n}if(e.original_resolution!=null&&e.hasOwnProperty("original_resolution")){let n=u.hbb.Resolution.verify(e.original_resolution,t+1);if(n)return"original_resolution."+n}return null},i.fromObject=function(e,t){if(e instanceof u.hbb.SwitchDisplay)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.SwitchDisplay;if(e.display!=null&&(n.display=e.display|0),e.x!=null&&(n.x=e.x|0),e.y!=null&&(n.y=e.y|0),e.width!=null&&(n.width=e.width|0),e.height!=null&&(n.height=e.height|0),e.cursor_embedded!=null&&(n.cursor_embedded=!!e.cursor_embedded),e.resolutions!=null){if(typeof e.resolutions!="object")throw TypeError(".hbb.SwitchDisplay.resolutions: object expected");n.resolutions=u.hbb.SupportedResolutions.fromObject(e.resolutions,t+1)}if(e.original_resolution!=null){if(typeof e.original_resolution!="object")throw TypeError(".hbb.SwitchDisplay.original_resolution: object expected");n.original_resolution=u.hbb.Resolution.fromObject(e.original_resolution,t+1)}return n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.display=0,n.x=0,n.y=0,n.width=0,n.height=0,n.cursor_embedded=!1,n.resolutions=null,n.original_resolution=null),e.display!=null&&e.hasOwnProperty("display")&&(n.display=e.display),e.x!=null&&e.hasOwnProperty("x")&&(n.x=e.x),e.y!=null&&e.hasOwnProperty("y")&&(n.y=e.y),e.width!=null&&e.hasOwnProperty("width")&&(n.width=e.width),e.height!=null&&e.hasOwnProperty("height")&&(n.height=e.height),e.cursor_embedded!=null&&e.hasOwnProperty("cursor_embedded")&&(n.cursor_embedded=e.cursor_embedded),e.resolutions!=null&&e.hasOwnProperty("resolutions")&&(n.resolutions=u.hbb.SupportedResolutions.toObject(e.resolutions,t)),e.original_resolution!=null&&e.hasOwnProperty("original_resolution")&&(n.original_resolution=u.hbb.Resolution.toObject(e.original_resolution,t)),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.SwitchDisplay"},i}(),p.CaptureDisplays=function(){function i(o){if(this.add=[],this.sub=[],this.set=[],o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.add=f.emptyArray,i.prototype.sub=f.emptyArray,i.prototype.set=f.emptyArray,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=E.create()),e.add!=null&&e.add.length){t.uint32(10).fork();for(let n=0;n<e.add.length;++n)t.int32(e.add[n]);t.ldelim()}if(e.sub!=null&&e.sub.length){t.uint32(18).fork();for(let n=0;n<e.sub.length;++n)t.int32(e.sub[n]);t.ldelim()}if(e.set!=null&&e.set.length){t.uint32(26).fork();for(let n=0;n<e.set.length;++n)t.int32(e.set[n]);t.ldelim()}return t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.CaptureDisplays;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{if(d.add&&d.add.length||(d.add=[]),(c&7)===2){let w=e.uint32()+e.pos;for(;e.pos<w;)d.add.push(e.int32())}else d.add.push(e.int32());break}case 2:{if(d.sub&&d.sub.length||(d.sub=[]),(c&7)===2){let w=e.uint32()+e.pos;for(;e.pos<w;)d.sub.push(e.int32())}else d.sub.push(e.int32());break}case 3:{if(d.set&&d.set.length||(d.set=[]),(c&7)===2){let w=e.uint32()+e.pos;for(;e.pos<w;)d.set.push(e.int32())}else d.set.push(e.int32());break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.add!=null&&e.hasOwnProperty("add")){if(!Array.isArray(e.add))return"add: array expected";for(let n=0;n<e.add.length;++n)if(!f.isInteger(e.add[n]))return"add: integer[] expected"}if(e.sub!=null&&e.hasOwnProperty("sub")){if(!Array.isArray(e.sub))return"sub: array expected";for(let n=0;n<e.sub.length;++n)if(!f.isInteger(e.sub[n]))return"sub: integer[] expected"}if(e.set!=null&&e.hasOwnProperty("set")){if(!Array.isArray(e.set))return"set: array expected";for(let n=0;n<e.set.length;++n)if(!f.isInteger(e.set[n]))return"set: integer[] expected"}return null},i.fromObject=function(e,t){if(e instanceof u.hbb.CaptureDisplays)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.CaptureDisplays;if(e.add){if(!Array.isArray(e.add))throw TypeError(".hbb.CaptureDisplays.add: array expected");n.add=[];for(let r=0;r<e.add.length;++r)n.add[r]=e.add[r]|0}if(e.sub){if(!Array.isArray(e.sub))throw TypeError(".hbb.CaptureDisplays.sub: array expected");n.sub=[];for(let r=0;r<e.sub.length;++r)n.sub[r]=e.sub[r]|0}if(e.set){if(!Array.isArray(e.set))throw TypeError(".hbb.CaptureDisplays.set: array expected");n.set=[];for(let r=0;r<e.set.length;++r)n.set[r]=e.set[r]|0}return n},i.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.add=[],n.sub=[],n.set=[]),e.add&&e.add.length){n.add=[];for(let r=0;r<e.add.length;++r)n.add[r]=e.add[r]}if(e.sub&&e.sub.length){n.sub=[];for(let r=0;r<e.sub.length;++r)n.sub[r]=e.sub[r]}if(e.set&&e.set.length){n.set=[];for(let r=0;r<e.set.length;++r)n.set[r]=e.set[r]}return n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.CaptureDisplays"},i}(),p.ToggleVirtualDisplay=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.display=0,i.prototype.on=!1,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.display!=null&&Object.hasOwnProperty.call(e,"display")&&t.uint32(8).int32(e.display),e.on!=null&&Object.hasOwnProperty.call(e,"on")&&t.uint32(16).bool(e.on),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.ToggleVirtualDisplay;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.display=e.int32();break}case 2:{d.on=e.bool();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.display!=null&&e.hasOwnProperty("display")&&!f.isInteger(e.display)?"display: integer expected":e.on!=null&&e.hasOwnProperty("on")&&typeof e.on!="boolean"?"on: boolean expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.ToggleVirtualDisplay)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.ToggleVirtualDisplay;return e.display!=null&&(n.display=e.display|0),e.on!=null&&(n.on=!!e.on),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.display=0,n.on=!1),e.display!=null&&e.hasOwnProperty("display")&&(n.display=e.display),e.on!=null&&e.hasOwnProperty("on")&&(n.on=e.on),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.ToggleVirtualDisplay"},i}(),p.TogglePrivacyMode=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.impl_key="",i.prototype.on=!1,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.impl_key!=null&&Object.hasOwnProperty.call(e,"impl_key")&&t.uint32(10).string(e.impl_key),e.on!=null&&Object.hasOwnProperty.call(e,"on")&&t.uint32(16).bool(e.on),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.TogglePrivacyMode;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.impl_key=e.string();break}case 2:{d.on=e.bool();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.impl_key!=null&&e.hasOwnProperty("impl_key")&&!f.isString(e.impl_key)?"impl_key: string expected":e.on!=null&&e.hasOwnProperty("on")&&typeof e.on!="boolean"?"on: boolean expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.TogglePrivacyMode)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.TogglePrivacyMode;return e.impl_key!=null&&(n.impl_key=String(e.impl_key)),e.on!=null&&(n.on=!!e.on),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.impl_key="",n.on=!1),e.impl_key!=null&&e.hasOwnProperty("impl_key")&&(n.impl_key=e.impl_key),e.on!=null&&e.hasOwnProperty("on")&&(n.on=e.on),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.TogglePrivacyMode"},i}(),p.PermissionInfo=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.permission=0,i.prototype.enabled=!1,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.permission!=null&&Object.hasOwnProperty.call(e,"permission")&&t.uint32(8).int32(e.permission),e.enabled!=null&&Object.hasOwnProperty.call(e,"enabled")&&t.uint32(16).bool(e.enabled),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.PermissionInfo;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.permission=e.int32();break}case 2:{d.enabled=e.bool();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.permission!=null&&e.hasOwnProperty("permission"))switch(e.permission){default:return"permission: enum value expected";case 0:case 2:case 3:case 4:case 5:case 6:case 7:case 8:break}return e.enabled!=null&&e.hasOwnProperty("enabled")&&typeof e.enabled!="boolean"?"enabled: boolean expected":null},i.fromObject=function(e,t){if(e instanceof u.hbb.PermissionInfo)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.PermissionInfo;switch(e.permission){default:if(typeof e.permission=="number"){n.permission=e.permission;break}break;case"Keyboard":case 0:n.permission=0;break;case"Clipboard":case 2:n.permission=2;break;case"Audio":case 3:n.permission=3;break;case"File":case 4:n.permission=4;break;case"Restart":case 5:n.permission=5;break;case"Recording":case 6:n.permission=6;break;case"BlockInput":case 7:n.permission=7;break;case"Camera":case 8:n.permission=8;break}return e.enabled!=null&&(n.enabled=!!e.enabled),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.permission=t.enums===String?"Keyboard":0,n.enabled=!1),e.permission!=null&&e.hasOwnProperty("permission")&&(n.permission=t.enums===String?u.hbb.PermissionInfo.Permission[e.permission]===void 0?e.permission:u.hbb.PermissionInfo.Permission[e.permission]:e.permission),e.enabled!=null&&e.hasOwnProperty("enabled")&&(n.enabled=e.enabled),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.PermissionInfo"},i.Permission=function(){let o={},e=Object.create(o);return e[o[0]="Keyboard"]=0,e[o[2]="Clipboard"]=2,e[o[3]="Audio"]=3,e[o[4]="File"]=4,e[o[5]="Restart"]=5,e[o[6]="Recording"]=6,e[o[7]="BlockInput"]=7,e[o[8]="Camera"]=8,e}(),i}(),p.ImageQuality=function(){let i={},o=Object.create(i);return o[i[0]="NotSet"]=0,o[i[2]="Low"]=2,o[i[3]="Balanced"]=3,o[i[4]="Best"]=4,o}(),p.SupportedDecoding=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.ability_vp9=0,i.prototype.ability_h264=0,i.prototype.ability_h265=0,i.prototype.prefer=0,i.prototype.ability_vp8=0,i.prototype.ability_av1=0,i.prototype.i444=null,i.prototype.prefer_chroma=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.ability_vp9!=null&&Object.hasOwnProperty.call(e,"ability_vp9")&&t.uint32(8).int32(e.ability_vp9),e.ability_h264!=null&&Object.hasOwnProperty.call(e,"ability_h264")&&t.uint32(16).int32(e.ability_h264),e.ability_h265!=null&&Object.hasOwnProperty.call(e,"ability_h265")&&t.uint32(24).int32(e.ability_h265),e.prefer!=null&&Object.hasOwnProperty.call(e,"prefer")&&t.uint32(32).int32(e.prefer),e.ability_vp8!=null&&Object.hasOwnProperty.call(e,"ability_vp8")&&t.uint32(40).int32(e.ability_vp8),e.ability_av1!=null&&Object.hasOwnProperty.call(e,"ability_av1")&&t.uint32(48).int32(e.ability_av1),e.i444!=null&&Object.hasOwnProperty.call(e,"i444")&&u.hbb.CodecAbility.encode(e.i444,t.uint32(58).fork()).ldelim(),e.prefer_chroma!=null&&Object.hasOwnProperty.call(e,"prefer_chroma")&&t.uint32(64).int32(e.prefer_chroma),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.SupportedDecoding;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.ability_vp9=e.int32();break}case 2:{d.ability_h264=e.int32();break}case 3:{d.ability_h265=e.int32();break}case 4:{d.prefer=e.int32();break}case 5:{d.ability_vp8=e.int32();break}case 6:{d.ability_av1=e.int32();break}case 7:{d.i444=u.hbb.CodecAbility.decode(e,e.uint32(),void 0,r+1);break}case 8:{d.prefer_chroma=e.int32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.ability_vp9!=null&&e.hasOwnProperty("ability_vp9")&&!f.isInteger(e.ability_vp9))return"ability_vp9: integer expected";if(e.ability_h264!=null&&e.hasOwnProperty("ability_h264")&&!f.isInteger(e.ability_h264))return"ability_h264: integer expected";if(e.ability_h265!=null&&e.hasOwnProperty("ability_h265")&&!f.isInteger(e.ability_h265))return"ability_h265: integer expected";if(e.prefer!=null&&e.hasOwnProperty("prefer"))switch(e.prefer){default:return"prefer: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(e.ability_vp8!=null&&e.hasOwnProperty("ability_vp8")&&!f.isInteger(e.ability_vp8))return"ability_vp8: integer expected";if(e.ability_av1!=null&&e.hasOwnProperty("ability_av1")&&!f.isInteger(e.ability_av1))return"ability_av1: integer expected";if(e.i444!=null&&e.hasOwnProperty("i444")){let n=u.hbb.CodecAbility.verify(e.i444,t+1);if(n)return"i444."+n}if(e.prefer_chroma!=null&&e.hasOwnProperty("prefer_chroma"))switch(e.prefer_chroma){default:return"prefer_chroma: enum value expected";case 0:case 1:break}return null},i.fromObject=function(e,t){if(e instanceof u.hbb.SupportedDecoding)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.SupportedDecoding;switch(e.ability_vp9!=null&&(n.ability_vp9=e.ability_vp9|0),e.ability_h264!=null&&(n.ability_h264=e.ability_h264|0),e.ability_h265!=null&&(n.ability_h265=e.ability_h265|0),e.prefer){default:if(typeof e.prefer=="number"){n.prefer=e.prefer;break}break;case"Auto":case 0:n.prefer=0;break;case"VP9":case 1:n.prefer=1;break;case"H264":case 2:n.prefer=2;break;case"H265":case 3:n.prefer=3;break;case"VP8":case 4:n.prefer=4;break;case"AV1":case 5:n.prefer=5;break}if(e.ability_vp8!=null&&(n.ability_vp8=e.ability_vp8|0),e.ability_av1!=null&&(n.ability_av1=e.ability_av1|0),e.i444!=null){if(typeof e.i444!="object")throw TypeError(".hbb.SupportedDecoding.i444: object expected");n.i444=u.hbb.CodecAbility.fromObject(e.i444,t+1)}switch(e.prefer_chroma){default:if(typeof e.prefer_chroma=="number"){n.prefer_chroma=e.prefer_chroma;break}break;case"I420":case 0:n.prefer_chroma=0;break;case"I444":case 1:n.prefer_chroma=1;break}return n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.ability_vp9=0,n.ability_h264=0,n.ability_h265=0,n.prefer=t.enums===String?"Auto":0,n.ability_vp8=0,n.ability_av1=0,n.i444=null,n.prefer_chroma=t.enums===String?"I420":0),e.ability_vp9!=null&&e.hasOwnProperty("ability_vp9")&&(n.ability_vp9=e.ability_vp9),e.ability_h264!=null&&e.hasOwnProperty("ability_h264")&&(n.ability_h264=e.ability_h264),e.ability_h265!=null&&e.hasOwnProperty("ability_h265")&&(n.ability_h265=e.ability_h265),e.prefer!=null&&e.hasOwnProperty("prefer")&&(n.prefer=t.enums===String?u.hbb.SupportedDecoding.PreferCodec[e.prefer]===void 0?e.prefer:u.hbb.SupportedDecoding.PreferCodec[e.prefer]:e.prefer),e.ability_vp8!=null&&e.hasOwnProperty("ability_vp8")&&(n.ability_vp8=e.ability_vp8),e.ability_av1!=null&&e.hasOwnProperty("ability_av1")&&(n.ability_av1=e.ability_av1),e.i444!=null&&e.hasOwnProperty("i444")&&(n.i444=u.hbb.CodecAbility.toObject(e.i444,t)),e.prefer_chroma!=null&&e.hasOwnProperty("prefer_chroma")&&(n.prefer_chroma=t.enums===String?u.hbb.Chroma[e.prefer_chroma]===void 0?e.prefer_chroma:u.hbb.Chroma[e.prefer_chroma]:e.prefer_chroma),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.SupportedDecoding"},i.PreferCodec=function(){let o={},e=Object.create(o);return e[o[0]="Auto"]=0,e[o[1]="VP9"]=1,e[o[2]="H264"]=2,e[o[3]="H265"]=3,e[o[4]="VP8"]=4,e[o[5]="AV1"]=5,e}(),i}(),p.OptionMessage=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.image_quality=0,i.prototype.lock_after_session_end=0,i.prototype.show_remote_cursor=0,i.prototype.privacy_mode=0,i.prototype.block_input=0,i.prototype.custom_image_quality=0,i.prototype.disable_audio=0,i.prototype.disable_clipboard=0,i.prototype.enable_file_transfer=0,i.prototype.supported_decoding=null,i.prototype.custom_fps=0,i.prototype.disable_keyboard=0,i.prototype.follow_remote_cursor=0,i.prototype.follow_remote_window=0,i.prototype.disable_camera=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.image_quality!=null&&Object.hasOwnProperty.call(e,"image_quality")&&t.uint32(8).int32(e.image_quality),e.lock_after_session_end!=null&&Object.hasOwnProperty.call(e,"lock_after_session_end")&&t.uint32(16).int32(e.lock_after_session_end),e.show_remote_cursor!=null&&Object.hasOwnProperty.call(e,"show_remote_cursor")&&t.uint32(24).int32(e.show_remote_cursor),e.privacy_mode!=null&&Object.hasOwnProperty.call(e,"privacy_mode")&&t.uint32(32).int32(e.privacy_mode),e.block_input!=null&&Object.hasOwnProperty.call(e,"block_input")&&t.uint32(40).int32(e.block_input),e.custom_image_quality!=null&&Object.hasOwnProperty.call(e,"custom_image_quality")&&t.uint32(48).int32(e.custom_image_quality),e.disable_audio!=null&&Object.hasOwnProperty.call(e,"disable_audio")&&t.uint32(56).int32(e.disable_audio),e.disable_clipboard!=null&&Object.hasOwnProperty.call(e,"disable_clipboard")&&t.uint32(64).int32(e.disable_clipboard),e.enable_file_transfer!=null&&Object.hasOwnProperty.call(e,"enable_file_transfer")&&t.uint32(72).int32(e.enable_file_transfer),e.supported_decoding!=null&&Object.hasOwnProperty.call(e,"supported_decoding")&&u.hbb.SupportedDecoding.encode(e.supported_decoding,t.uint32(82).fork()).ldelim(),e.custom_fps!=null&&Object.hasOwnProperty.call(e,"custom_fps")&&t.uint32(88).int32(e.custom_fps),e.disable_keyboard!=null&&Object.hasOwnProperty.call(e,"disable_keyboard")&&t.uint32(96).int32(e.disable_keyboard),e.follow_remote_cursor!=null&&Object.hasOwnProperty.call(e,"follow_remote_cursor")&&t.uint32(120).int32(e.follow_remote_cursor),e.follow_remote_window!=null&&Object.hasOwnProperty.call(e,"follow_remote_window")&&t.uint32(128).int32(e.follow_remote_window),e.disable_camera!=null&&Object.hasOwnProperty.call(e,"disable_camera")&&t.uint32(136).int32(e.disable_camera),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.OptionMessage;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.image_quality=e.int32();break}case 2:{d.lock_after_session_end=e.int32();break}case 3:{d.show_remote_cursor=e.int32();break}case 4:{d.privacy_mode=e.int32();break}case 5:{d.block_input=e.int32();break}case 6:{d.custom_image_quality=e.int32();break}case 7:{d.disable_audio=e.int32();break}case 8:{d.disable_clipboard=e.int32();break}case 9:{d.enable_file_transfer=e.int32();break}case 10:{d.supported_decoding=u.hbb.SupportedDecoding.decode(e,e.uint32(),void 0,r+1);break}case 11:{d.custom_fps=e.int32();break}case 12:{d.disable_keyboard=e.int32();break}case 15:{d.follow_remote_cursor=e.int32();break}case 16:{d.follow_remote_window=e.int32();break}case 17:{d.disable_camera=e.int32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.image_quality!=null&&e.hasOwnProperty("image_quality"))switch(e.image_quality){default:return"image_quality: enum value expected";case 0:case 2:case 3:case 4:break}if(e.lock_after_session_end!=null&&e.hasOwnProperty("lock_after_session_end"))switch(e.lock_after_session_end){default:return"lock_after_session_end: enum value expected";case 0:case 1:case 2:break}if(e.show_remote_cursor!=null&&e.hasOwnProperty("show_remote_cursor"))switch(e.show_remote_cursor){default:return"show_remote_cursor: enum value expected";case 0:case 1:case 2:break}if(e.privacy_mode!=null&&e.hasOwnProperty("privacy_mode"))switch(e.privacy_mode){default:return"privacy_mode: enum value expected";case 0:case 1:case 2:break}if(e.block_input!=null&&e.hasOwnProperty("block_input"))switch(e.block_input){default:return"block_input: enum value expected";case 0:case 1:case 2:break}if(e.custom_image_quality!=null&&e.hasOwnProperty("custom_image_quality")&&!f.isInteger(e.custom_image_quality))return"custom_image_quality: integer expected";if(e.disable_audio!=null&&e.hasOwnProperty("disable_audio"))switch(e.disable_audio){default:return"disable_audio: enum value expected";case 0:case 1:case 2:break}if(e.disable_clipboard!=null&&e.hasOwnProperty("disable_clipboard"))switch(e.disable_clipboard){default:return"disable_clipboard: enum value expected";case 0:case 1:case 2:break}if(e.enable_file_transfer!=null&&e.hasOwnProperty("enable_file_transfer"))switch(e.enable_file_transfer){default:return"enable_file_transfer: enum value expected";case 0:case 1:case 2:break}if(e.supported_decoding!=null&&e.hasOwnProperty("supported_decoding")){let n=u.hbb.SupportedDecoding.verify(e.supported_decoding,t+1);if(n)return"supported_decoding."+n}if(e.custom_fps!=null&&e.hasOwnProperty("custom_fps")&&!f.isInteger(e.custom_fps))return"custom_fps: integer expected";if(e.disable_keyboard!=null&&e.hasOwnProperty("disable_keyboard"))switch(e.disable_keyboard){default:return"disable_keyboard: enum value expected";case 0:case 1:case 2:break}if(e.follow_remote_cursor!=null&&e.hasOwnProperty("follow_remote_cursor"))switch(e.follow_remote_cursor){default:return"follow_remote_cursor: enum value expected";case 0:case 1:case 2:break}if(e.follow_remote_window!=null&&e.hasOwnProperty("follow_remote_window"))switch(e.follow_remote_window){default:return"follow_remote_window: enum value expected";case 0:case 1:case 2:break}if(e.disable_camera!=null&&e.hasOwnProperty("disable_camera"))switch(e.disable_camera){default:return"disable_camera: enum value expected";case 0:case 1:case 2:break}return null},i.fromObject=function(e,t){if(e instanceof u.hbb.OptionMessage)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.OptionMessage;switch(e.image_quality){default:if(typeof e.image_quality=="number"){n.image_quality=e.image_quality;break}break;case"NotSet":case 0:n.image_quality=0;break;case"Low":case 2:n.image_quality=2;break;case"Balanced":case 3:n.image_quality=3;break;case"Best":case 4:n.image_quality=4;break}switch(e.lock_after_session_end){default:if(typeof e.lock_after_session_end=="number"){n.lock_after_session_end=e.lock_after_session_end;break}break;case"NotSet":case 0:n.lock_after_session_end=0;break;case"No":case 1:n.lock_after_session_end=1;break;case"Yes":case 2:n.lock_after_session_end=2;break}switch(e.show_remote_cursor){default:if(typeof e.show_remote_cursor=="number"){n.show_remote_cursor=e.show_remote_cursor;break}break;case"NotSet":case 0:n.show_remote_cursor=0;break;case"No":case 1:n.show_remote_cursor=1;break;case"Yes":case 2:n.show_remote_cursor=2;break}switch(e.privacy_mode){default:if(typeof e.privacy_mode=="number"){n.privacy_mode=e.privacy_mode;break}break;case"NotSet":case 0:n.privacy_mode=0;break;case"No":case 1:n.privacy_mode=1;break;case"Yes":case 2:n.privacy_mode=2;break}switch(e.block_input){default:if(typeof e.block_input=="number"){n.block_input=e.block_input;break}break;case"NotSet":case 0:n.block_input=0;break;case"No":case 1:n.block_input=1;break;case"Yes":case 2:n.block_input=2;break}switch(e.custom_image_quality!=null&&(n.custom_image_quality=e.custom_image_quality|0),e.disable_audio){default:if(typeof e.disable_audio=="number"){n.disable_audio=e.disable_audio;break}break;case"NotSet":case 0:n.disable_audio=0;break;case"No":case 1:n.disable_audio=1;break;case"Yes":case 2:n.disable_audio=2;break}switch(e.disable_clipboard){default:if(typeof e.disable_clipboard=="number"){n.disable_clipboard=e.disable_clipboard;break}break;case"NotSet":case 0:n.disable_clipboard=0;break;case"No":case 1:n.disable_clipboard=1;break;case"Yes":case 2:n.disable_clipboard=2;break}switch(e.enable_file_transfer){default:if(typeof e.enable_file_transfer=="number"){n.enable_file_transfer=e.enable_file_transfer;break}break;case"NotSet":case 0:n.enable_file_transfer=0;break;case"No":case 1:n.enable_file_transfer=1;break;case"Yes":case 2:n.enable_file_transfer=2;break}if(e.supported_decoding!=null){if(typeof e.supported_decoding!="object")throw TypeError(".hbb.OptionMessage.supported_decoding: object expected");n.supported_decoding=u.hbb.SupportedDecoding.fromObject(e.supported_decoding,t+1)}switch(e.custom_fps!=null&&(n.custom_fps=e.custom_fps|0),e.disable_keyboard){default:if(typeof e.disable_keyboard=="number"){n.disable_keyboard=e.disable_keyboard;break}break;case"NotSet":case 0:n.disable_keyboard=0;break;case"No":case 1:n.disable_keyboard=1;break;case"Yes":case 2:n.disable_keyboard=2;break}switch(e.follow_remote_cursor){default:if(typeof e.follow_remote_cursor=="number"){n.follow_remote_cursor=e.follow_remote_cursor;break}break;case"NotSet":case 0:n.follow_remote_cursor=0;break;case"No":case 1:n.follow_remote_cursor=1;break;case"Yes":case 2:n.follow_remote_cursor=2;break}switch(e.follow_remote_window){default:if(typeof e.follow_remote_window=="number"){n.follow_remote_window=e.follow_remote_window;break}break;case"NotSet":case 0:n.follow_remote_window=0;break;case"No":case 1:n.follow_remote_window=1;break;case"Yes":case 2:n.follow_remote_window=2;break}switch(e.disable_camera){default:if(typeof e.disable_camera=="number"){n.disable_camera=e.disable_camera;break}break;case"NotSet":case 0:n.disable_camera=0;break;case"No":case 1:n.disable_camera=1;break;case"Yes":case 2:n.disable_camera=2;break}return n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.image_quality=t.enums===String?"NotSet":0,n.lock_after_session_end=t.enums===String?"NotSet":0,n.show_remote_cursor=t.enums===String?"NotSet":0,n.privacy_mode=t.enums===String?"NotSet":0,n.block_input=t.enums===String?"NotSet":0,n.custom_image_quality=0,n.disable_audio=t.enums===String?"NotSet":0,n.disable_clipboard=t.enums===String?"NotSet":0,n.enable_file_transfer=t.enums===String?"NotSet":0,n.supported_decoding=null,n.custom_fps=0,n.disable_keyboard=t.enums===String?"NotSet":0,n.follow_remote_cursor=t.enums===String?"NotSet":0,n.follow_remote_window=t.enums===String?"NotSet":0,n.disable_camera=t.enums===String?"NotSet":0),e.image_quality!=null&&e.hasOwnProperty("image_quality")&&(n.image_quality=t.enums===String?u.hbb.ImageQuality[e.image_quality]===void 0?e.image_quality:u.hbb.ImageQuality[e.image_quality]:e.image_quality),e.lock_after_session_end!=null&&e.hasOwnProperty("lock_after_session_end")&&(n.lock_after_session_end=t.enums===String?u.hbb.OptionMessage.BoolOption[e.lock_after_session_end]===void 0?e.lock_after_session_end:u.hbb.OptionMessage.BoolOption[e.lock_after_session_end]:e.lock_after_session_end),e.show_remote_cursor!=null&&e.hasOwnProperty("show_remote_cursor")&&(n.show_remote_cursor=t.enums===String?u.hbb.OptionMessage.BoolOption[e.show_remote_cursor]===void 0?e.show_remote_cursor:u.hbb.OptionMessage.BoolOption[e.show_remote_cursor]:e.show_remote_cursor),e.privacy_mode!=null&&e.hasOwnProperty("privacy_mode")&&(n.privacy_mode=t.enums===String?u.hbb.OptionMessage.BoolOption[e.privacy_mode]===void 0?e.privacy_mode:u.hbb.OptionMessage.BoolOption[e.privacy_mode]:e.privacy_mode),e.block_input!=null&&e.hasOwnProperty("block_input")&&(n.block_input=t.enums===String?u.hbb.OptionMessage.BoolOption[e.block_input]===void 0?e.block_input:u.hbb.OptionMessage.BoolOption[e.block_input]:e.block_input),e.custom_image_quality!=null&&e.hasOwnProperty("custom_image_quality")&&(n.custom_image_quality=e.custom_image_quality),e.disable_audio!=null&&e.hasOwnProperty("disable_audio")&&(n.disable_audio=t.enums===String?u.hbb.OptionMessage.BoolOption[e.disable_audio]===void 0?e.disable_audio:u.hbb.OptionMessage.BoolOption[e.disable_audio]:e.disable_audio),e.disable_clipboard!=null&&e.hasOwnProperty("disable_clipboard")&&(n.disable_clipboard=t.enums===String?u.hbb.OptionMessage.BoolOption[e.disable_clipboard]===void 0?e.disable_clipboard:u.hbb.OptionMessage.BoolOption[e.disable_clipboard]:e.disable_clipboard),e.enable_file_transfer!=null&&e.hasOwnProperty("enable_file_transfer")&&(n.enable_file_transfer=t.enums===String?u.hbb.OptionMessage.BoolOption[e.enable_file_transfer]===void 0?e.enable_file_transfer:u.hbb.OptionMessage.BoolOption[e.enable_file_transfer]:e.enable_file_transfer),e.supported_decoding!=null&&e.hasOwnProperty("supported_decoding")&&(n.supported_decoding=u.hbb.SupportedDecoding.toObject(e.supported_decoding,t)),e.custom_fps!=null&&e.hasOwnProperty("custom_fps")&&(n.custom_fps=e.custom_fps),e.disable_keyboard!=null&&e.hasOwnProperty("disable_keyboard")&&(n.disable_keyboard=t.enums===String?u.hbb.OptionMessage.BoolOption[e.disable_keyboard]===void 0?e.disable_keyboard:u.hbb.OptionMessage.BoolOption[e.disable_keyboard]:e.disable_keyboard),e.follow_remote_cursor!=null&&e.hasOwnProperty("follow_remote_cursor")&&(n.follow_remote_cursor=t.enums===String?u.hbb.OptionMessage.BoolOption[e.follow_remote_cursor]===void 0?e.follow_remote_cursor:u.hbb.OptionMessage.BoolOption[e.follow_remote_cursor]:e.follow_remote_cursor),e.follow_remote_window!=null&&e.hasOwnProperty("follow_remote_window")&&(n.follow_remote_window=t.enums===String?u.hbb.OptionMessage.BoolOption[e.follow_remote_window]===void 0?e.follow_remote_window:u.hbb.OptionMessage.BoolOption[e.follow_remote_window]:e.follow_remote_window),e.disable_camera!=null&&e.hasOwnProperty("disable_camera")&&(n.disable_camera=t.enums===String?u.hbb.OptionMessage.BoolOption[e.disable_camera]===void 0?e.disable_camera:u.hbb.OptionMessage.BoolOption[e.disable_camera]:e.disable_camera),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.OptionMessage"},i.BoolOption=function(){let o={},e=Object.create(o);return e[o[0]="NotSet"]=0,e[o[1]="No"]=1,e[o[2]="Yes"]=2,e}(),i}(),p.TestDelay=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.time=f.Long?f.Long.fromBits(0,0,!1):0,i.prototype.from_client=!1,i.prototype.last_delay=0,i.prototype.target_bitrate=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.time!=null&&Object.hasOwnProperty.call(e,"time")&&t.uint32(8).int64(e.time),e.from_client!=null&&Object.hasOwnProperty.call(e,"from_client")&&t.uint32(16).bool(e.from_client),e.last_delay!=null&&Object.hasOwnProperty.call(e,"last_delay")&&t.uint32(24).uint32(e.last_delay),e.target_bitrate!=null&&Object.hasOwnProperty.call(e,"target_bitrate")&&t.uint32(32).uint32(e.target_bitrate),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.TestDelay;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.time=e.int64();break}case 2:{d.from_client=e.bool();break}case 3:{d.last_delay=e.uint32();break}case 4:{d.target_bitrate=e.uint32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.time!=null&&e.hasOwnProperty("time")&&!f.isInteger(e.time)&&!(e.time&&f.isInteger(e.time.low)&&f.isInteger(e.time.high))?"time: integer|Long expected":e.from_client!=null&&e.hasOwnProperty("from_client")&&typeof e.from_client!="boolean"?"from_client: boolean expected":e.last_delay!=null&&e.hasOwnProperty("last_delay")&&!f.isInteger(e.last_delay)?"last_delay: integer expected":e.target_bitrate!=null&&e.hasOwnProperty("target_bitrate")&&!f.isInteger(e.target_bitrate)?"target_bitrate: integer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.TestDelay)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.TestDelay;return e.time!=null&&(f.Long?(n.time=f.Long.fromValue(e.time)).unsigned=!1:typeof e.time=="string"?n.time=parseInt(e.time,10):typeof e.time=="number"?n.time=e.time:typeof e.time=="object"&&(n.time=new f.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber())),e.from_client!=null&&(n.from_client=!!e.from_client),e.last_delay!=null&&(n.last_delay=e.last_delay>>>0),e.target_bitrate!=null&&(n.target_bitrate=e.target_bitrate>>>0),n},i.toObject=function(e,t){t||(t={});let n={};if(t.defaults){if(f.Long){let r=new f.Long(0,0,!1);n.time=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.time=t.longs===String?"0":0;n.from_client=!1,n.last_delay=0,n.target_bitrate=0}return e.time!=null&&e.hasOwnProperty("time")&&(typeof e.time=="number"?n.time=t.longs===String?String(e.time):e.time:n.time=t.longs===String?f.Long.prototype.toString.call(e.time):t.longs===Number?new f.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber():e.time),e.from_client!=null&&e.hasOwnProperty("from_client")&&(n.from_client=e.from_client),e.last_delay!=null&&e.hasOwnProperty("last_delay")&&(n.last_delay=e.last_delay),e.target_bitrate!=null&&e.hasOwnProperty("target_bitrate")&&(n.target_bitrate=e.target_bitrate),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.TestDelay"},i}(),p.PublicKey=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.asymmetric_value=f.newBuffer([]),i.prototype.symmetric_value=f.newBuffer([]),i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.asymmetric_value!=null&&Object.hasOwnProperty.call(e,"asymmetric_value")&&t.uint32(10).bytes(e.asymmetric_value),e.symmetric_value!=null&&Object.hasOwnProperty.call(e,"symmetric_value")&&t.uint32(18).bytes(e.symmetric_value),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.PublicKey;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.asymmetric_value=e.bytes();break}case 2:{d.symmetric_value=e.bytes();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.asymmetric_value!=null&&e.hasOwnProperty("asymmetric_value")&&!(e.asymmetric_value&&typeof e.asymmetric_value.length=="number"||f.isString(e.asymmetric_value))?"asymmetric_value: buffer expected":e.symmetric_value!=null&&e.hasOwnProperty("symmetric_value")&&!(e.symmetric_value&&typeof e.symmetric_value.length=="number"||f.isString(e.symmetric_value))?"symmetric_value: buffer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.PublicKey)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.PublicKey;return e.asymmetric_value!=null&&(typeof e.asymmetric_value=="string"?f.base64.decode(e.asymmetric_value,n.asymmetric_value=f.newBuffer(f.base64.length(e.asymmetric_value)),0):e.asymmetric_value.length>=0&&(n.asymmetric_value=e.asymmetric_value)),e.symmetric_value!=null&&(typeof e.symmetric_value=="string"?f.base64.decode(e.symmetric_value,n.symmetric_value=f.newBuffer(f.base64.length(e.symmetric_value)),0):e.symmetric_value.length>=0&&(n.symmetric_value=e.symmetric_value)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(t.bytes===String?n.asymmetric_value="":(n.asymmetric_value=[],t.bytes!==Array&&(n.asymmetric_value=f.newBuffer(n.asymmetric_value))),t.bytes===String?n.symmetric_value="":(n.symmetric_value=[],t.bytes!==Array&&(n.symmetric_value=f.newBuffer(n.symmetric_value)))),e.asymmetric_value!=null&&e.hasOwnProperty("asymmetric_value")&&(n.asymmetric_value=t.bytes===String?f.base64.encode(e.asymmetric_value,0,e.asymmetric_value.length):t.bytes===Array?Array.prototype.slice.call(e.asymmetric_value):e.asymmetric_value),e.symmetric_value!=null&&e.hasOwnProperty("symmetric_value")&&(n.symmetric_value=t.bytes===String?f.base64.encode(e.symmetric_value,0,e.symmetric_value.length):t.bytes===Array?Array.prototype.slice.call(e.symmetric_value):e.symmetric_value),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.PublicKey"},i}(),p.SignedId=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.id=f.newBuffer([]),i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).bytes(e.id),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.SignedId;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.id=e.bytes();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.id!=null&&e.hasOwnProperty("id")&&!(e.id&&typeof e.id.length=="number"||f.isString(e.id))?"id: buffer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.SignedId)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.SignedId;return e.id!=null&&(typeof e.id=="string"?f.base64.decode(e.id,n.id=f.newBuffer(f.base64.length(e.id)),0):e.id.length>=0&&(n.id=e.id)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(t.bytes===String?n.id="":(n.id=[],t.bytes!==Array&&(n.id=f.newBuffer(n.id)))),e.id!=null&&e.hasOwnProperty("id")&&(n.id=t.bytes===String?f.base64.encode(e.id,0,e.id.length):t.bytes===Array?Array.prototype.slice.call(e.id):e.id),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.SignedId"},i}(),p.AudioFormat=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.sample_rate=0,i.prototype.channels=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.sample_rate!=null&&Object.hasOwnProperty.call(e,"sample_rate")&&t.uint32(8).uint32(e.sample_rate),e.channels!=null&&Object.hasOwnProperty.call(e,"channels")&&t.uint32(16).uint32(e.channels),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.AudioFormat;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.sample_rate=e.uint32();break}case 2:{d.channels=e.uint32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.sample_rate!=null&&e.hasOwnProperty("sample_rate")&&!f.isInteger(e.sample_rate)?"sample_rate: integer expected":e.channels!=null&&e.hasOwnProperty("channels")&&!f.isInteger(e.channels)?"channels: integer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.AudioFormat)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.AudioFormat;return e.sample_rate!=null&&(n.sample_rate=e.sample_rate>>>0),e.channels!=null&&(n.channels=e.channels>>>0),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.sample_rate=0,n.channels=0),e.sample_rate!=null&&e.hasOwnProperty("sample_rate")&&(n.sample_rate=e.sample_rate),e.channels!=null&&e.hasOwnProperty("channels")&&(n.channels=e.channels),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.AudioFormat"},i}(),p.AudioFrame=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.data=f.newBuffer([]),i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.data!=null&&Object.hasOwnProperty.call(e,"data")&&t.uint32(10).bytes(e.data),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.AudioFrame;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.data=e.bytes();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.data!=null&&e.hasOwnProperty("data")&&!(e.data&&typeof e.data.length=="number"||f.isString(e.data))?"data: buffer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.AudioFrame)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.AudioFrame;return e.data!=null&&(typeof e.data=="string"?f.base64.decode(e.data,n.data=f.newBuffer(f.base64.length(e.data)),0):e.data.length>=0&&(n.data=e.data)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(t.bytes===String?n.data="":(n.data=[],t.bytes!==Array&&(n.data=f.newBuffer(n.data)))),e.data!=null&&e.hasOwnProperty("data")&&(n.data=t.bytes===String?f.base64.encode(e.data,0,e.data.length):t.bytes===Array?Array.prototype.slice.call(e.data):e.data),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.AudioFrame"},i}(),p.MessageBox=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.msgtype="",i.prototype.title="",i.prototype.text="",i.prototype.link="",i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.msgtype!=null&&Object.hasOwnProperty.call(e,"msgtype")&&t.uint32(10).string(e.msgtype),e.title!=null&&Object.hasOwnProperty.call(e,"title")&&t.uint32(18).string(e.title),e.text!=null&&Object.hasOwnProperty.call(e,"text")&&t.uint32(26).string(e.text),e.link!=null&&Object.hasOwnProperty.call(e,"link")&&t.uint32(34).string(e.link),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.MessageBox;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.msgtype=e.string();break}case 2:{d.title=e.string();break}case 3:{d.text=e.string();break}case 4:{d.link=e.string();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.msgtype!=null&&e.hasOwnProperty("msgtype")&&!f.isString(e.msgtype)?"msgtype: string expected":e.title!=null&&e.hasOwnProperty("title")&&!f.isString(e.title)?"title: string expected":e.text!=null&&e.hasOwnProperty("text")&&!f.isString(e.text)?"text: string expected":e.link!=null&&e.hasOwnProperty("link")&&!f.isString(e.link)?"link: string expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.MessageBox)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.MessageBox;return e.msgtype!=null&&(n.msgtype=String(e.msgtype)),e.title!=null&&(n.title=String(e.title)),e.text!=null&&(n.text=String(e.text)),e.link!=null&&(n.link=String(e.link)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.msgtype="",n.title="",n.text="",n.link=""),e.msgtype!=null&&e.hasOwnProperty("msgtype")&&(n.msgtype=e.msgtype),e.title!=null&&e.hasOwnProperty("title")&&(n.title=e.title),e.text!=null&&e.hasOwnProperty("text")&&(n.text=e.text),e.link!=null&&e.hasOwnProperty("link")&&(n.link=e.link),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.MessageBox"},i}(),p.BackNotification=function(){function i(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)e[t[n]]!=null&&t[n]!=="__proto__"&&(this[t[n]]=e[t[n]])}i.prototype.privacy_mode_state=null,i.prototype.block_input_state=null,i.prototype.details="",i.prototype.impl_key="";let o;return Object.defineProperty(i.prototype,"union",{get:f.oneOfGetter(o=["privacy_mode_state","block_input_state"]),set:f.oneOfSetter(o)}),i.create=function(t){return new i(t)},i.encode=function(t,n){return n||(n=E.create()),t.privacy_mode_state!=null&&Object.hasOwnProperty.call(t,"privacy_mode_state")&&n.uint32(8).int32(t.privacy_mode_state),t.block_input_state!=null&&Object.hasOwnProperty.call(t,"block_input_state")&&n.uint32(16).int32(t.block_input_state),t.details!=null&&Object.hasOwnProperty.call(t,"details")&&n.uint32(26).string(t.details),t.impl_key!=null&&Object.hasOwnProperty.call(t,"impl_key")&&n.uint32(34).string(t.impl_key),n},i.encodeDelimited=function(t,n){return this.encode(t,n).ldelim()},i.decode=function(t,n,r,l){if(t instanceof s||(t=s.create(t)),l===void 0&&(l=0),l>s.recursionLimit)throw Error("maximum nesting depth exceeded");let d=n===void 0?t.len:t.pos+n,c=new u.hbb.BackNotification;for(;t.pos<d;){let w=t.uint32();if(w===r)break;switch(w>>>3){case 1:{c.privacy_mode_state=t.int32();break}case 2:{c.block_input_state=t.int32();break}case 3:{c.details=t.string();break}case 4:{c.impl_key=t.string();break}default:t.skipType(w&7,l);break}}return c},i.decodeDelimited=function(t){return t instanceof s||(t=new s(t)),this.decode(t,t.uint32())},i.verify=function(t,n){if(typeof t!="object"||t===null)return"object expected";if(n===void 0&&(n=0),n>f.recursionLimit)return"maximum nesting depth exceeded";let r={};if(t.privacy_mode_state!=null&&t.hasOwnProperty("privacy_mode_state"))switch(r.union=1,t.privacy_mode_state){default:return"privacy_mode_state: enum value expected";case 0:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:break}if(t.block_input_state!=null&&t.hasOwnProperty("block_input_state")){if(r.union===1)return"union: multiple values";switch(r.union=1,t.block_input_state){default:return"block_input_state: enum value expected";case 0:case 2:case 3:case 4:case 5:break}}return t.details!=null&&t.hasOwnProperty("details")&&!f.isString(t.details)?"details: string expected":t.impl_key!=null&&t.hasOwnProperty("impl_key")&&!f.isString(t.impl_key)?"impl_key: string expected":null},i.fromObject=function(t,n){if(t instanceof u.hbb.BackNotification)return t;if(n===void 0&&(n=0),n>f.recursionLimit)throw Error("maximum nesting depth exceeded");let r=new u.hbb.BackNotification;switch(t.privacy_mode_state){default:if(typeof t.privacy_mode_state=="number"){r.privacy_mode_state=t.privacy_mode_state;break}break;case"PrvStateUnknown":case 0:r.privacy_mode_state=0;break;case"PrvOnByOther":case 2:r.privacy_mode_state=2;break;case"PrvNotSupported":case 3:r.privacy_mode_state=3;break;case"PrvOnSucceeded":case 4:r.privacy_mode_state=4;break;case"PrvOnFailedDenied":case 5:r.privacy_mode_state=5;break;case"PrvOnFailedPlugin":case 6:r.privacy_mode_state=6;break;case"PrvOnFailed":case 7:r.privacy_mode_state=7;break;case"PrvOffSucceeded":case 8:r.privacy_mode_state=8;break;case"PrvOffByPeer":case 9:r.privacy_mode_state=9;break;case"PrvOffFailed":case 10:r.privacy_mode_state=10;break;case"PrvOffUnknown":case 11:r.privacy_mode_state=11;break}switch(t.block_input_state){default:if(typeof t.block_input_state=="number"){r.block_input_state=t.block_input_state;break}break;case"BlkStateUnknown":case 0:r.block_input_state=0;break;case"BlkOnSucceeded":case 2:r.block_input_state=2;break;case"BlkOnFailed":case 3:r.block_input_state=3;break;case"BlkOffSucceeded":case 4:r.block_input_state=4;break;case"BlkOffFailed":case 5:r.block_input_state=5;break}return t.details!=null&&(r.details=String(t.details)),t.impl_key!=null&&(r.impl_key=String(t.impl_key)),r},i.toObject=function(t,n){n||(n={});let r={};return n.defaults&&(r.details="",r.impl_key=""),t.privacy_mode_state!=null&&t.hasOwnProperty("privacy_mode_state")&&(r.privacy_mode_state=n.enums===String?u.hbb.BackNotification.PrivacyModeState[t.privacy_mode_state]===void 0?t.privacy_mode_state:u.hbb.BackNotification.PrivacyModeState[t.privacy_mode_state]:t.privacy_mode_state,n.oneofs&&(r.union="privacy_mode_state")),t.block_input_state!=null&&t.hasOwnProperty("block_input_state")&&(r.block_input_state=n.enums===String?u.hbb.BackNotification.BlockInputState[t.block_input_state]===void 0?t.block_input_state:u.hbb.BackNotification.BlockInputState[t.block_input_state]:t.block_input_state,n.oneofs&&(r.union="block_input_state")),t.details!=null&&t.hasOwnProperty("details")&&(r.details=t.details),t.impl_key!=null&&t.hasOwnProperty("impl_key")&&(r.impl_key=t.impl_key),r},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/hbb.BackNotification"},i.BlockInputState=function(){let e={},t=Object.create(e);return t[e[0]="BlkStateUnknown"]=0,t[e[2]="BlkOnSucceeded"]=2,t[e[3]="BlkOnFailed"]=3,t[e[4]="BlkOffSucceeded"]=4,t[e[5]="BlkOffFailed"]=5,t}(),i.PrivacyModeState=function(){let e={},t=Object.create(e);return t[e[0]="PrvStateUnknown"]=0,t[e[2]="PrvOnByOther"]=2,t[e[3]="PrvNotSupported"]=3,t[e[4]="PrvOnSucceeded"]=4,t[e[5]="PrvOnFailedDenied"]=5,t[e[6]="PrvOnFailedPlugin"]=6,t[e[7]="PrvOnFailed"]=7,t[e[8]="PrvOffSucceeded"]=8,t[e[9]="PrvOffByPeer"]=9,t[e[10]="PrvOffFailed"]=10,t[e[11]="PrvOffUnknown"]=11,t}(),i}(),p.ElevationRequestWithLogon=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.username="",i.prototype.password="",i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.username!=null&&Object.hasOwnProperty.call(e,"username")&&t.uint32(10).string(e.username),e.password!=null&&Object.hasOwnProperty.call(e,"password")&&t.uint32(18).string(e.password),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.ElevationRequestWithLogon;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.username=e.string();break}case 2:{d.password=e.string();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.username!=null&&e.hasOwnProperty("username")&&!f.isString(e.username)?"username: string expected":e.password!=null&&e.hasOwnProperty("password")&&!f.isString(e.password)?"password: string expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.ElevationRequestWithLogon)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.ElevationRequestWithLogon;return e.username!=null&&(n.username=String(e.username)),e.password!=null&&(n.password=String(e.password)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.username="",n.password=""),e.username!=null&&e.hasOwnProperty("username")&&(n.username=e.username),e.password!=null&&e.hasOwnProperty("password")&&(n.password=e.password),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.ElevationRequestWithLogon"},i}(),p.ElevationRequest=function(){function i(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)e[t[n]]!=null&&t[n]!=="__proto__"&&(this[t[n]]=e[t[n]])}i.prototype.direct=null,i.prototype.logon=null;let o;return Object.defineProperty(i.prototype,"union",{get:f.oneOfGetter(o=["direct","logon"]),set:f.oneOfSetter(o)}),i.create=function(t){return new i(t)},i.encode=function(t,n){return n||(n=E.create()),t.direct!=null&&Object.hasOwnProperty.call(t,"direct")&&n.uint32(8).bool(t.direct),t.logon!=null&&Object.hasOwnProperty.call(t,"logon")&&u.hbb.ElevationRequestWithLogon.encode(t.logon,n.uint32(18).fork()).ldelim(),n},i.encodeDelimited=function(t,n){return this.encode(t,n).ldelim()},i.decode=function(t,n,r,l){if(t instanceof s||(t=s.create(t)),l===void 0&&(l=0),l>s.recursionLimit)throw Error("maximum nesting depth exceeded");let d=n===void 0?t.len:t.pos+n,c=new u.hbb.ElevationRequest;for(;t.pos<d;){let w=t.uint32();if(w===r)break;switch(w>>>3){case 1:{c.direct=t.bool();break}case 2:{c.logon=u.hbb.ElevationRequestWithLogon.decode(t,t.uint32(),void 0,l+1);break}default:t.skipType(w&7,l);break}}return c},i.decodeDelimited=function(t){return t instanceof s||(t=new s(t)),this.decode(t,t.uint32())},i.verify=function(t,n){if(typeof t!="object"||t===null)return"object expected";if(n===void 0&&(n=0),n>f.recursionLimit)return"maximum nesting depth exceeded";let r={};if(t.direct!=null&&t.hasOwnProperty("direct")&&(r.union=1,typeof t.direct!="boolean"))return"direct: boolean expected";if(t.logon!=null&&t.hasOwnProperty("logon")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.ElevationRequestWithLogon.verify(t.logon,n+1);if(l)return"logon."+l}}return null},i.fromObject=function(t,n){if(t instanceof u.hbb.ElevationRequest)return t;if(n===void 0&&(n=0),n>f.recursionLimit)throw Error("maximum nesting depth exceeded");let r=new u.hbb.ElevationRequest;if(t.direct!=null&&(r.direct=!!t.direct),t.logon!=null){if(typeof t.logon!="object")throw TypeError(".hbb.ElevationRequest.logon: object expected");r.logon=u.hbb.ElevationRequestWithLogon.fromObject(t.logon,n+1)}return r},i.toObject=function(t,n){n||(n={});let r={};return t.direct!=null&&t.hasOwnProperty("direct")&&(r.direct=t.direct,n.oneofs&&(r.union="direct")),t.logon!=null&&t.hasOwnProperty("logon")&&(r.logon=u.hbb.ElevationRequestWithLogon.toObject(t.logon,n),n.oneofs&&(r.union="logon")),r},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/hbb.ElevationRequest"},i}(),p.SwitchSidesRequest=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.uuid=f.newBuffer([]),i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.uuid!=null&&Object.hasOwnProperty.call(e,"uuid")&&t.uint32(10).bytes(e.uuid),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.SwitchSidesRequest;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.uuid=e.bytes();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.uuid!=null&&e.hasOwnProperty("uuid")&&!(e.uuid&&typeof e.uuid.length=="number"||f.isString(e.uuid))?"uuid: buffer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.SwitchSidesRequest)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.SwitchSidesRequest;return e.uuid!=null&&(typeof e.uuid=="string"?f.base64.decode(e.uuid,n.uuid=f.newBuffer(f.base64.length(e.uuid)),0):e.uuid.length>=0&&(n.uuid=e.uuid)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(t.bytes===String?n.uuid="":(n.uuid=[],t.bytes!==Array&&(n.uuid=f.newBuffer(n.uuid)))),e.uuid!=null&&e.hasOwnProperty("uuid")&&(n.uuid=t.bytes===String?f.base64.encode(e.uuid,0,e.uuid.length):t.bytes===Array?Array.prototype.slice.call(e.uuid):e.uuid),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.SwitchSidesRequest"},i}(),p.SwitchSidesResponse=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.uuid=f.newBuffer([]),i.prototype.lr=null,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.uuid!=null&&Object.hasOwnProperty.call(e,"uuid")&&t.uint32(10).bytes(e.uuid),e.lr!=null&&Object.hasOwnProperty.call(e,"lr")&&u.hbb.LoginRequest.encode(e.lr,t.uint32(18).fork()).ldelim(),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.SwitchSidesResponse;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.uuid=e.bytes();break}case 2:{d.lr=u.hbb.LoginRequest.decode(e,e.uint32(),void 0,r+1);break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.uuid!=null&&e.hasOwnProperty("uuid")&&!(e.uuid&&typeof e.uuid.length=="number"||f.isString(e.uuid)))return"uuid: buffer expected";if(e.lr!=null&&e.hasOwnProperty("lr")){let n=u.hbb.LoginRequest.verify(e.lr,t+1);if(n)return"lr."+n}return null},i.fromObject=function(e,t){if(e instanceof u.hbb.SwitchSidesResponse)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.SwitchSidesResponse;if(e.uuid!=null&&(typeof e.uuid=="string"?f.base64.decode(e.uuid,n.uuid=f.newBuffer(f.base64.length(e.uuid)),0):e.uuid.length>=0&&(n.uuid=e.uuid)),e.lr!=null){if(typeof e.lr!="object")throw TypeError(".hbb.SwitchSidesResponse.lr: object expected");n.lr=u.hbb.LoginRequest.fromObject(e.lr,t+1)}return n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(t.bytes===String?n.uuid="":(n.uuid=[],t.bytes!==Array&&(n.uuid=f.newBuffer(n.uuid))),n.lr=null),e.uuid!=null&&e.hasOwnProperty("uuid")&&(n.uuid=t.bytes===String?f.base64.encode(e.uuid,0,e.uuid.length):t.bytes===Array?Array.prototype.slice.call(e.uuid):e.uuid),e.lr!=null&&e.hasOwnProperty("lr")&&(n.lr=u.hbb.LoginRequest.toObject(e.lr,t)),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.SwitchSidesResponse"},i}(),p.SwitchBack=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.SwitchBack;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.SwitchBack)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");return new u.hbb.SwitchBack},i.toObject=function(){return{}},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.SwitchBack"},i}(),p.PluginRequest=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.id="",i.prototype.content=f.newBuffer([]),i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),e.content!=null&&Object.hasOwnProperty.call(e,"content")&&t.uint32(18).bytes(e.content),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.PluginRequest;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.id=e.string();break}case 2:{d.content=e.bytes();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.id!=null&&e.hasOwnProperty("id")&&!f.isString(e.id)?"id: string expected":e.content!=null&&e.hasOwnProperty("content")&&!(e.content&&typeof e.content.length=="number"||f.isString(e.content))?"content: buffer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.PluginRequest)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.PluginRequest;return e.id!=null&&(n.id=String(e.id)),e.content!=null&&(typeof e.content=="string"?f.base64.decode(e.content,n.content=f.newBuffer(f.base64.length(e.content)),0):e.content.length>=0&&(n.content=e.content)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.id="",t.bytes===String?n.content="":(n.content=[],t.bytes!==Array&&(n.content=f.newBuffer(n.content)))),e.id!=null&&e.hasOwnProperty("id")&&(n.id=e.id),e.content!=null&&e.hasOwnProperty("content")&&(n.content=t.bytes===String?f.base64.encode(e.content,0,e.content.length):t.bytes===Array?Array.prototype.slice.call(e.content):e.content),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.PluginRequest"},i}(),p.PluginFailure=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.id="",i.prototype.name="",i.prototype.msg="",i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),e.name!=null&&Object.hasOwnProperty.call(e,"name")&&t.uint32(18).string(e.name),e.msg!=null&&Object.hasOwnProperty.call(e,"msg")&&t.uint32(26).string(e.msg),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.PluginFailure;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.id=e.string();break}case 2:{d.name=e.string();break}case 3:{d.msg=e.string();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.id!=null&&e.hasOwnProperty("id")&&!f.isString(e.id)?"id: string expected":e.name!=null&&e.hasOwnProperty("name")&&!f.isString(e.name)?"name: string expected":e.msg!=null&&e.hasOwnProperty("msg")&&!f.isString(e.msg)?"msg: string expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.PluginFailure)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.PluginFailure;return e.id!=null&&(n.id=String(e.id)),e.name!=null&&(n.name=String(e.name)),e.msg!=null&&(n.msg=String(e.msg)),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.id="",n.name="",n.msg=""),e.id!=null&&e.hasOwnProperty("id")&&(n.id=e.id),e.name!=null&&e.hasOwnProperty("name")&&(n.name=e.name),e.msg!=null&&e.hasOwnProperty("msg")&&(n.msg=e.msg),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.PluginFailure"},i}(),p.WindowsSessions=function(){function i(o){if(this.sessions=[],o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.sessions=f.emptyArray,i.prototype.current_sid=0,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=E.create()),e.sessions!=null&&e.sessions.length)for(let n=0;n<e.sessions.length;++n)u.hbb.WindowsSession.encode(e.sessions[n],t.uint32(10).fork()).ldelim();return e.current_sid!=null&&Object.hasOwnProperty.call(e,"current_sid")&&t.uint32(16).uint32(e.current_sid),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.WindowsSessions;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.sessions&&d.sessions.length||(d.sessions=[]),d.sessions.push(u.hbb.WindowsSession.decode(e,e.uint32(),void 0,r+1));break}case 2:{d.current_sid=e.uint32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){if(typeof e!="object"||e===null)return"object expected";if(t===void 0&&(t=0),t>f.recursionLimit)return"maximum nesting depth exceeded";if(e.sessions!=null&&e.hasOwnProperty("sessions")){if(!Array.isArray(e.sessions))return"sessions: array expected";for(let n=0;n<e.sessions.length;++n){let r=u.hbb.WindowsSession.verify(e.sessions[n],t+1);if(r)return"sessions."+r}}return e.current_sid!=null&&e.hasOwnProperty("current_sid")&&!f.isInteger(e.current_sid)?"current_sid: integer expected":null},i.fromObject=function(e,t){if(e instanceof u.hbb.WindowsSessions)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.WindowsSessions;if(e.sessions){if(!Array.isArray(e.sessions))throw TypeError(".hbb.WindowsSessions.sessions: array expected");n.sessions=[];for(let r=0;r<e.sessions.length;++r){if(typeof e.sessions[r]!="object")throw TypeError(".hbb.WindowsSessions.sessions: object expected");n.sessions[r]=u.hbb.WindowsSession.fromObject(e.sessions[r],t+1)}}return e.current_sid!=null&&(n.current_sid=e.current_sid>>>0),n},i.toObject=function(e,t){t||(t={});let n={};if((t.arrays||t.defaults)&&(n.sessions=[]),t.defaults&&(n.current_sid=0),e.sessions&&e.sessions.length){n.sessions=[];for(let r=0;r<e.sessions.length;++r)n.sessions[r]=u.hbb.WindowsSession.toObject(e.sessions[r],t)}return e.current_sid!=null&&e.hasOwnProperty("current_sid")&&(n.current_sid=e.current_sid),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.WindowsSessions"},i}(),p.MessageQuery=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.switch_display=0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.switch_display!=null&&Object.hasOwnProperty.call(e,"switch_display")&&t.uint32(8).int32(e.switch_display),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.MessageQuery;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.switch_display=e.int32();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.switch_display!=null&&e.hasOwnProperty("switch_display")&&!f.isInteger(e.switch_display)?"switch_display: integer expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.MessageQuery)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.MessageQuery;return e.switch_display!=null&&(n.switch_display=e.switch_display|0),n},i.toObject=function(e,t){t||(t={});let n={};return t.defaults&&(n.switch_display=0),e.switch_display!=null&&e.hasOwnProperty("switch_display")&&(n.switch_display=e.switch_display),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.MessageQuery"},i}(),p.Misc=function(){function i(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)e[t[n]]!=null&&t[n]!=="__proto__"&&(this[t[n]]=e[t[n]])}i.prototype.chat_message=null,i.prototype.switch_display=null,i.prototype.permission_info=null,i.prototype.option=null,i.prototype.audio_format=null,i.prototype.close_reason=null,i.prototype.refresh_video=null,i.prototype.video_received=null,i.prototype.back_notification=null,i.prototype.restart_remote_device=null,i.prototype.uac=null,i.prototype.foreground_window_elevated=null,i.prototype.stop_service=null,i.prototype.elevation_request=null,i.prototype.elevation_response=null,i.prototype.portable_service_running=null,i.prototype.switch_sides_request=null,i.prototype.switch_back=null,i.prototype.change_resolution=null,i.prototype.plugin_request=null,i.prototype.plugin_failure=null,i.prototype.full_speed_fps=null,i.prototype.auto_adjust_fps=null,i.prototype.client_record_status=null,i.prototype.capture_displays=null,i.prototype.refresh_video_display=null,i.prototype.toggle_virtual_display=null,i.prototype.toggle_privacy_mode=null,i.prototype.supported_encoding=null,i.prototype.selected_sid=null,i.prototype.change_display_resolution=null,i.prototype.message_query=null,i.prototype.follow_current_display=null;let o;return Object.defineProperty(i.prototype,"union",{get:f.oneOfGetter(o=["chat_message","switch_display","permission_info","option","audio_format","close_reason","refresh_video","video_received","back_notification","restart_remote_device","uac","foreground_window_elevated","stop_service","elevation_request","elevation_response","portable_service_running","switch_sides_request","switch_back","change_resolution","plugin_request","plugin_failure","full_speed_fps","auto_adjust_fps","client_record_status","capture_displays","refresh_video_display","toggle_virtual_display","toggle_privacy_mode","supported_encoding","selected_sid","change_display_resolution","message_query","follow_current_display"]),set:f.oneOfSetter(o)}),i.create=function(t){return new i(t)},i.encode=function(t,n){return n||(n=E.create()),t.chat_message!=null&&Object.hasOwnProperty.call(t,"chat_message")&&u.hbb.ChatMessage.encode(t.chat_message,n.uint32(34).fork()).ldelim(),t.switch_display!=null&&Object.hasOwnProperty.call(t,"switch_display")&&u.hbb.SwitchDisplay.encode(t.switch_display,n.uint32(42).fork()).ldelim(),t.permission_info!=null&&Object.hasOwnProperty.call(t,"permission_info")&&u.hbb.PermissionInfo.encode(t.permission_info,n.uint32(50).fork()).ldelim(),t.option!=null&&Object.hasOwnProperty.call(t,"option")&&u.hbb.OptionMessage.encode(t.option,n.uint32(58).fork()).ldelim(),t.audio_format!=null&&Object.hasOwnProperty.call(t,"audio_format")&&u.hbb.AudioFormat.encode(t.audio_format,n.uint32(66).fork()).ldelim(),t.close_reason!=null&&Object.hasOwnProperty.call(t,"close_reason")&&n.uint32(74).string(t.close_reason),t.refresh_video!=null&&Object.hasOwnProperty.call(t,"refresh_video")&&n.uint32(80).bool(t.refresh_video),t.video_received!=null&&Object.hasOwnProperty.call(t,"video_received")&&n.uint32(96).bool(t.video_received),t.back_notification!=null&&Object.hasOwnProperty.call(t,"back_notification")&&u.hbb.BackNotification.encode(t.back_notification,n.uint32(106).fork()).ldelim(),t.restart_remote_device!=null&&Object.hasOwnProperty.call(t,"restart_remote_device")&&n.uint32(112).bool(t.restart_remote_device),t.uac!=null&&Object.hasOwnProperty.call(t,"uac")&&n.uint32(120).bool(t.uac),t.foreground_window_elevated!=null&&Object.hasOwnProperty.call(t,"foreground_window_elevated")&&n.uint32(128).bool(t.foreground_window_elevated),t.stop_service!=null&&Object.hasOwnProperty.call(t,"stop_service")&&n.uint32(136).bool(t.stop_service),t.elevation_request!=null&&Object.hasOwnProperty.call(t,"elevation_request")&&u.hbb.ElevationRequest.encode(t.elevation_request,n.uint32(146).fork()).ldelim(),t.elevation_response!=null&&Object.hasOwnProperty.call(t,"elevation_response")&&n.uint32(154).string(t.elevation_response),t.portable_service_running!=null&&Object.hasOwnProperty.call(t,"portable_service_running")&&n.uint32(160).bool(t.portable_service_running),t.switch_sides_request!=null&&Object.hasOwnProperty.call(t,"switch_sides_request")&&u.hbb.SwitchSidesRequest.encode(t.switch_sides_request,n.uint32(170).fork()).ldelim(),t.switch_back!=null&&Object.hasOwnProperty.call(t,"switch_back")&&u.hbb.SwitchBack.encode(t.switch_back,n.uint32(178).fork()).ldelim(),t.change_resolution!=null&&Object.hasOwnProperty.call(t,"change_resolution")&&u.hbb.Resolution.encode(t.change_resolution,n.uint32(194).fork()).ldelim(),t.plugin_request!=null&&Object.hasOwnProperty.call(t,"plugin_request")&&u.hbb.PluginRequest.encode(t.plugin_request,n.uint32(202).fork()).ldelim(),t.plugin_failure!=null&&Object.hasOwnProperty.call(t,"plugin_failure")&&u.hbb.PluginFailure.encode(t.plugin_failure,n.uint32(210).fork()).ldelim(),t.full_speed_fps!=null&&Object.hasOwnProperty.call(t,"full_speed_fps")&&n.uint32(216).uint32(t.full_speed_fps),t.auto_adjust_fps!=null&&Object.hasOwnProperty.call(t,"auto_adjust_fps")&&n.uint32(224).uint32(t.auto_adjust_fps),t.client_record_status!=null&&Object.hasOwnProperty.call(t,"client_record_status")&&n.uint32(232).bool(t.client_record_status),t.capture_displays!=null&&Object.hasOwnProperty.call(t,"capture_displays")&&u.hbb.CaptureDisplays.encode(t.capture_displays,n.uint32(242).fork()).ldelim(),t.refresh_video_display!=null&&Object.hasOwnProperty.call(t,"refresh_video_display")&&n.uint32(248).int32(t.refresh_video_display),t.toggle_virtual_display!=null&&Object.hasOwnProperty.call(t,"toggle_virtual_display")&&u.hbb.ToggleVirtualDisplay.encode(t.toggle_virtual_display,n.uint32(258).fork()).ldelim(),t.toggle_privacy_mode!=null&&Object.hasOwnProperty.call(t,"toggle_privacy_mode")&&u.hbb.TogglePrivacyMode.encode(t.toggle_privacy_mode,n.uint32(266).fork()).ldelim(),t.supported_encoding!=null&&Object.hasOwnProperty.call(t,"supported_encoding")&&u.hbb.SupportedEncoding.encode(t.supported_encoding,n.uint32(274).fork()).ldelim(),t.selected_sid!=null&&Object.hasOwnProperty.call(t,"selected_sid")&&n.uint32(280).uint32(t.selected_sid),t.change_display_resolution!=null&&Object.hasOwnProperty.call(t,"change_display_resolution")&&u.hbb.DisplayResolution.encode(t.change_display_resolution,n.uint32(290).fork()).ldelim(),t.message_query!=null&&Object.hasOwnProperty.call(t,"message_query")&&u.hbb.MessageQuery.encode(t.message_query,n.uint32(298).fork()).ldelim(),t.follow_current_display!=null&&Object.hasOwnProperty.call(t,"follow_current_display")&&n.uint32(304).int32(t.follow_current_display),n},i.encodeDelimited=function(t,n){return this.encode(t,n).ldelim()},i.decode=function(t,n,r,l){if(t instanceof s||(t=s.create(t)),l===void 0&&(l=0),l>s.recursionLimit)throw Error("maximum nesting depth exceeded");let d=n===void 0?t.len:t.pos+n,c=new u.hbb.Misc;for(;t.pos<d;){let w=t.uint32();if(w===r)break;switch(w>>>3){case 4:{c.chat_message=u.hbb.ChatMessage.decode(t,t.uint32(),void 0,l+1);break}case 5:{c.switch_display=u.hbb.SwitchDisplay.decode(t,t.uint32(),void 0,l+1);break}case 6:{c.permission_info=u.hbb.PermissionInfo.decode(t,t.uint32(),void 0,l+1);break}case 7:{c.option=u.hbb.OptionMessage.decode(t,t.uint32(),void 0,l+1);break}case 8:{c.audio_format=u.hbb.AudioFormat.decode(t,t.uint32(),void 0,l+1);break}case 9:{c.close_reason=t.string();break}case 10:{c.refresh_video=t.bool();break}case 12:{c.video_received=t.bool();break}case 13:{c.back_notification=u.hbb.BackNotification.decode(t,t.uint32(),void 0,l+1);break}case 14:{c.restart_remote_device=t.bool();break}case 15:{c.uac=t.bool();break}case 16:{c.foreground_window_elevated=t.bool();break}case 17:{c.stop_service=t.bool();break}case 18:{c.elevation_request=u.hbb.ElevationRequest.decode(t,t.uint32(),void 0,l+1);break}case 19:{c.elevation_response=t.string();break}case 20:{c.portable_service_running=t.bool();break}case 21:{c.switch_sides_request=u.hbb.SwitchSidesRequest.decode(t,t.uint32(),void 0,l+1);break}case 22:{c.switch_back=u.hbb.SwitchBack.decode(t,t.uint32(),void 0,l+1);break}case 24:{c.change_resolution=u.hbb.Resolution.decode(t,t.uint32(),void 0,l+1);break}case 25:{c.plugin_request=u.hbb.PluginRequest.decode(t,t.uint32(),void 0,l+1);break}case 26:{c.plugin_failure=u.hbb.PluginFailure.decode(t,t.uint32(),void 0,l+1);break}case 27:{c.full_speed_fps=t.uint32();break}case 28:{c.auto_adjust_fps=t.uint32();break}case 29:{c.client_record_status=t.bool();break}case 30:{c.capture_displays=u.hbb.CaptureDisplays.decode(t,t.uint32(),void 0,l+1);break}case 31:{c.refresh_video_display=t.int32();break}case 32:{c.toggle_virtual_display=u.hbb.ToggleVirtualDisplay.decode(t,t.uint32(),void 0,l+1);break}case 33:{c.toggle_privacy_mode=u.hbb.TogglePrivacyMode.decode(t,t.uint32(),void 0,l+1);break}case 34:{c.supported_encoding=u.hbb.SupportedEncoding.decode(t,t.uint32(),void 0,l+1);break}case 35:{c.selected_sid=t.uint32();break}case 36:{c.change_display_resolution=u.hbb.DisplayResolution.decode(t,t.uint32(),void 0,l+1);break}case 37:{c.message_query=u.hbb.MessageQuery.decode(t,t.uint32(),void 0,l+1);break}case 38:{c.follow_current_display=t.int32();break}default:t.skipType(w&7,l);break}}return c},i.decodeDelimited=function(t){return t instanceof s||(t=new s(t)),this.decode(t,t.uint32())},i.verify=function(t,n){if(typeof t!="object"||t===null)return"object expected";if(n===void 0&&(n=0),n>f.recursionLimit)return"maximum nesting depth exceeded";let r={};if(t.chat_message!=null&&t.hasOwnProperty("chat_message")){r.union=1;{let l=u.hbb.ChatMessage.verify(t.chat_message,n+1);if(l)return"chat_message."+l}}if(t.switch_display!=null&&t.hasOwnProperty("switch_display")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.SwitchDisplay.verify(t.switch_display,n+1);if(l)return"switch_display."+l}}if(t.permission_info!=null&&t.hasOwnProperty("permission_info")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.PermissionInfo.verify(t.permission_info,n+1);if(l)return"permission_info."+l}}if(t.option!=null&&t.hasOwnProperty("option")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.OptionMessage.verify(t.option,n+1);if(l)return"option."+l}}if(t.audio_format!=null&&t.hasOwnProperty("audio_format")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.AudioFormat.verify(t.audio_format,n+1);if(l)return"audio_format."+l}}if(t.close_reason!=null&&t.hasOwnProperty("close_reason")){if(r.union===1)return"union: multiple values";if(r.union=1,!f.isString(t.close_reason))return"close_reason: string expected"}if(t.refresh_video!=null&&t.hasOwnProperty("refresh_video")){if(r.union===1)return"union: multiple values";if(r.union=1,typeof t.refresh_video!="boolean")return"refresh_video: boolean expected"}if(t.video_received!=null&&t.hasOwnProperty("video_received")){if(r.union===1)return"union: multiple values";if(r.union=1,typeof t.video_received!="boolean")return"video_received: boolean expected"}if(t.back_notification!=null&&t.hasOwnProperty("back_notification")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.BackNotification.verify(t.back_notification,n+1);if(l)return"back_notification."+l}}if(t.restart_remote_device!=null&&t.hasOwnProperty("restart_remote_device")){if(r.union===1)return"union: multiple values";if(r.union=1,typeof t.restart_remote_device!="boolean")return"restart_remote_device: boolean expected"}if(t.uac!=null&&t.hasOwnProperty("uac")){if(r.union===1)return"union: multiple values";if(r.union=1,typeof t.uac!="boolean")return"uac: boolean expected"}if(t.foreground_window_elevated!=null&&t.hasOwnProperty("foreground_window_elevated")){if(r.union===1)return"union: multiple values";if(r.union=1,typeof t.foreground_window_elevated!="boolean")return"foreground_window_elevated: boolean expected"}if(t.stop_service!=null&&t.hasOwnProperty("stop_service")){if(r.union===1)return"union: multiple values";if(r.union=1,typeof t.stop_service!="boolean")return"stop_service: boolean expected"}if(t.elevation_request!=null&&t.hasOwnProperty("elevation_request")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.ElevationRequest.verify(t.elevation_request,n+1);if(l)return"elevation_request."+l}}if(t.elevation_response!=null&&t.hasOwnProperty("elevation_response")){if(r.union===1)return"union: multiple values";if(r.union=1,!f.isString(t.elevation_response))return"elevation_response: string expected"}if(t.portable_service_running!=null&&t.hasOwnProperty("portable_service_running")){if(r.union===1)return"union: multiple values";if(r.union=1,typeof t.portable_service_running!="boolean")return"portable_service_running: boolean expected"}if(t.switch_sides_request!=null&&t.hasOwnProperty("switch_sides_request")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.SwitchSidesRequest.verify(t.switch_sides_request,n+1);if(l)return"switch_sides_request."+l}}if(t.switch_back!=null&&t.hasOwnProperty("switch_back")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.SwitchBack.verify(t.switch_back,n+1);if(l)return"switch_back."+l}}if(t.change_resolution!=null&&t.hasOwnProperty("change_resolution")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.Resolution.verify(t.change_resolution,n+1);if(l)return"change_resolution."+l}}if(t.plugin_request!=null&&t.hasOwnProperty("plugin_request")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.PluginRequest.verify(t.plugin_request,n+1);if(l)return"plugin_request."+l}}if(t.plugin_failure!=null&&t.hasOwnProperty("plugin_failure")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.PluginFailure.verify(t.plugin_failure,n+1);if(l)return"plugin_failure."+l}}if(t.full_speed_fps!=null&&t.hasOwnProperty("full_speed_fps")){if(r.union===1)return"union: multiple values";if(r.union=1,!f.isInteger(t.full_speed_fps))return"full_speed_fps: integer expected"}if(t.auto_adjust_fps!=null&&t.hasOwnProperty("auto_adjust_fps")){if(r.union===1)return"union: multiple values";if(r.union=1,!f.isInteger(t.auto_adjust_fps))return"auto_adjust_fps: integer expected"}if(t.client_record_status!=null&&t.hasOwnProperty("client_record_status")){if(r.union===1)return"union: multiple values";if(r.union=1,typeof t.client_record_status!="boolean")return"client_record_status: boolean expected"}if(t.capture_displays!=null&&t.hasOwnProperty("capture_displays")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.CaptureDisplays.verify(t.capture_displays,n+1);if(l)return"capture_displays."+l}}if(t.refresh_video_display!=null&&t.hasOwnProperty("refresh_video_display")){if(r.union===1)return"union: multiple values";if(r.union=1,!f.isInteger(t.refresh_video_display))return"refresh_video_display: integer expected"}if(t.toggle_virtual_display!=null&&t.hasOwnProperty("toggle_virtual_display")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.ToggleVirtualDisplay.verify(t.toggle_virtual_display,n+1);if(l)return"toggle_virtual_display."+l}}if(t.toggle_privacy_mode!=null&&t.hasOwnProperty("toggle_privacy_mode")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.TogglePrivacyMode.verify(t.toggle_privacy_mode,n+1);if(l)return"toggle_privacy_mode."+l}}if(t.supported_encoding!=null&&t.hasOwnProperty("supported_encoding")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.SupportedEncoding.verify(t.supported_encoding,n+1);if(l)return"supported_encoding."+l}}if(t.selected_sid!=null&&t.hasOwnProperty("selected_sid")){if(r.union===1)return"union: multiple values";if(r.union=1,!f.isInteger(t.selected_sid))return"selected_sid: integer expected"}if(t.change_display_resolution!=null&&t.hasOwnProperty("change_display_resolution")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.DisplayResolution.verify(t.change_display_resolution,n+1);if(l)return"change_display_resolution."+l}}if(t.message_query!=null&&t.hasOwnProperty("message_query")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.MessageQuery.verify(t.message_query,n+1);if(l)return"message_query."+l}}if(t.follow_current_display!=null&&t.hasOwnProperty("follow_current_display")){if(r.union===1)return"union: multiple values";if(r.union=1,!f.isInteger(t.follow_current_display))return"follow_current_display: integer expected"}return null},i.fromObject=function(t,n){if(t instanceof u.hbb.Misc)return t;if(n===void 0&&(n=0),n>f.recursionLimit)throw Error("maximum nesting depth exceeded");let r=new u.hbb.Misc;if(t.chat_message!=null){if(typeof t.chat_message!="object")throw TypeError(".hbb.Misc.chat_message: object expected");r.chat_message=u.hbb.ChatMessage.fromObject(t.chat_message,n+1)}if(t.switch_display!=null){if(typeof t.switch_display!="object")throw TypeError(".hbb.Misc.switch_display: object expected");r.switch_display=u.hbb.SwitchDisplay.fromObject(t.switch_display,n+1)}if(t.permission_info!=null){if(typeof t.permission_info!="object")throw TypeError(".hbb.Misc.permission_info: object expected");r.permission_info=u.hbb.PermissionInfo.fromObject(t.permission_info,n+1)}if(t.option!=null){if(typeof t.option!="object")throw TypeError(".hbb.Misc.option: object expected");r.option=u.hbb.OptionMessage.fromObject(t.option,n+1)}if(t.audio_format!=null){if(typeof t.audio_format!="object")throw TypeError(".hbb.Misc.audio_format: object expected");r.audio_format=u.hbb.AudioFormat.fromObject(t.audio_format,n+1)}if(t.close_reason!=null&&(r.close_reason=String(t.close_reason)),t.refresh_video!=null&&(r.refresh_video=!!t.refresh_video),t.video_received!=null&&(r.video_received=!!t.video_received),t.back_notification!=null){if(typeof t.back_notification!="object")throw TypeError(".hbb.Misc.back_notification: object expected");r.back_notification=u.hbb.BackNotification.fromObject(t.back_notification,n+1)}if(t.restart_remote_device!=null&&(r.restart_remote_device=!!t.restart_remote_device),t.uac!=null&&(r.uac=!!t.uac),t.foreground_window_elevated!=null&&(r.foreground_window_elevated=!!t.foreground_window_elevated),t.stop_service!=null&&(r.stop_service=!!t.stop_service),t.elevation_request!=null){if(typeof t.elevation_request!="object")throw TypeError(".hbb.Misc.elevation_request: object expected");r.elevation_request=u.hbb.ElevationRequest.fromObject(t.elevation_request,n+1)}if(t.elevation_response!=null&&(r.elevation_response=String(t.elevation_response)),t.portable_service_running!=null&&(r.portable_service_running=!!t.portable_service_running),t.switch_sides_request!=null){if(typeof t.switch_sides_request!="object")throw TypeError(".hbb.Misc.switch_sides_request: object expected");r.switch_sides_request=u.hbb.SwitchSidesRequest.fromObject(t.switch_sides_request,n+1)}if(t.switch_back!=null){if(typeof t.switch_back!="object")throw TypeError(".hbb.Misc.switch_back: object expected");r.switch_back=u.hbb.SwitchBack.fromObject(t.switch_back,n+1)}if(t.change_resolution!=null){if(typeof t.change_resolution!="object")throw TypeError(".hbb.Misc.change_resolution: object expected");r.change_resolution=u.hbb.Resolution.fromObject(t.change_resolution,n+1)}if(t.plugin_request!=null){if(typeof t.plugin_request!="object")throw TypeError(".hbb.Misc.plugin_request: object expected");r.plugin_request=u.hbb.PluginRequest.fromObject(t.plugin_request,n+1)}if(t.plugin_failure!=null){if(typeof t.plugin_failure!="object")throw TypeError(".hbb.Misc.plugin_failure: object expected");r.plugin_failure=u.hbb.PluginFailure.fromObject(t.plugin_failure,n+1)}if(t.full_speed_fps!=null&&(r.full_speed_fps=t.full_speed_fps>>>0),t.auto_adjust_fps!=null&&(r.auto_adjust_fps=t.auto_adjust_fps>>>0),t.client_record_status!=null&&(r.client_record_status=!!t.client_record_status),t.capture_displays!=null){if(typeof t.capture_displays!="object")throw TypeError(".hbb.Misc.capture_displays: object expected");r.capture_displays=u.hbb.CaptureDisplays.fromObject(t.capture_displays,n+1)}if(t.refresh_video_display!=null&&(r.refresh_video_display=t.refresh_video_display|0),t.toggle_virtual_display!=null){if(typeof t.toggle_virtual_display!="object")throw TypeError(".hbb.Misc.toggle_virtual_display: object expected");r.toggle_virtual_display=u.hbb.ToggleVirtualDisplay.fromObject(t.toggle_virtual_display,n+1)}if(t.toggle_privacy_mode!=null){if(typeof t.toggle_privacy_mode!="object")throw TypeError(".hbb.Misc.toggle_privacy_mode: object expected");r.toggle_privacy_mode=u.hbb.TogglePrivacyMode.fromObject(t.toggle_privacy_mode,n+1)}if(t.supported_encoding!=null){if(typeof t.supported_encoding!="object")throw TypeError(".hbb.Misc.supported_encoding: object expected");r.supported_encoding=u.hbb.SupportedEncoding.fromObject(t.supported_encoding,n+1)}if(t.selected_sid!=null&&(r.selected_sid=t.selected_sid>>>0),t.change_display_resolution!=null){if(typeof t.change_display_resolution!="object")throw TypeError(".hbb.Misc.change_display_resolution: object expected");r.change_display_resolution=u.hbb.DisplayResolution.fromObject(t.change_display_resolution,n+1)}if(t.message_query!=null){if(typeof t.message_query!="object")throw TypeError(".hbb.Misc.message_query: object expected");r.message_query=u.hbb.MessageQuery.fromObject(t.message_query,n+1)}return t.follow_current_display!=null&&(r.follow_current_display=t.follow_current_display|0),r},i.toObject=function(t,n){n||(n={});let r={};return t.chat_message!=null&&t.hasOwnProperty("chat_message")&&(r.chat_message=u.hbb.ChatMessage.toObject(t.chat_message,n),n.oneofs&&(r.union="chat_message")),t.switch_display!=null&&t.hasOwnProperty("switch_display")&&(r.switch_display=u.hbb.SwitchDisplay.toObject(t.switch_display,n),n.oneofs&&(r.union="switch_display")),t.permission_info!=null&&t.hasOwnProperty("permission_info")&&(r.permission_info=u.hbb.PermissionInfo.toObject(t.permission_info,n),n.oneofs&&(r.union="permission_info")),t.option!=null&&t.hasOwnProperty("option")&&(r.option=u.hbb.OptionMessage.toObject(t.option,n),n.oneofs&&(r.union="option")),t.audio_format!=null&&t.hasOwnProperty("audio_format")&&(r.audio_format=u.hbb.AudioFormat.toObject(t.audio_format,n),n.oneofs&&(r.union="audio_format")),t.close_reason!=null&&t.hasOwnProperty("close_reason")&&(r.close_reason=t.close_reason,n.oneofs&&(r.union="close_reason")),t.refresh_video!=null&&t.hasOwnProperty("refresh_video")&&(r.refresh_video=t.refresh_video,n.oneofs&&(r.union="refresh_video")),t.video_received!=null&&t.hasOwnProperty("video_received")&&(r.video_received=t.video_received,n.oneofs&&(r.union="video_received")),t.back_notification!=null&&t.hasOwnProperty("back_notification")&&(r.back_notification=u.hbb.BackNotification.toObject(t.back_notification,n),n.oneofs&&(r.union="back_notification")),t.restart_remote_device!=null&&t.hasOwnProperty("restart_remote_device")&&(r.restart_remote_device=t.restart_remote_device,n.oneofs&&(r.union="restart_remote_device")),t.uac!=null&&t.hasOwnProperty("uac")&&(r.uac=t.uac,n.oneofs&&(r.union="uac")),t.foreground_window_elevated!=null&&t.hasOwnProperty("foreground_window_elevated")&&(r.foreground_window_elevated=t.foreground_window_elevated,n.oneofs&&(r.union="foreground_window_elevated")),t.stop_service!=null&&t.hasOwnProperty("stop_service")&&(r.stop_service=t.stop_service,n.oneofs&&(r.union="stop_service")),t.elevation_request!=null&&t.hasOwnProperty("elevation_request")&&(r.elevation_request=u.hbb.ElevationRequest.toObject(t.elevation_request,n),n.oneofs&&(r.union="elevation_request")),t.elevation_response!=null&&t.hasOwnProperty("elevation_response")&&(r.elevation_response=t.elevation_response,n.oneofs&&(r.union="elevation_response")),t.portable_service_running!=null&&t.hasOwnProperty("portable_service_running")&&(r.portable_service_running=t.portable_service_running,n.oneofs&&(r.union="portable_service_running")),t.switch_sides_request!=null&&t.hasOwnProperty("switch_sides_request")&&(r.switch_sides_request=u.hbb.SwitchSidesRequest.toObject(t.switch_sides_request,n),n.oneofs&&(r.union="switch_sides_request")),t.switch_back!=null&&t.hasOwnProperty("switch_back")&&(r.switch_back=u.hbb.SwitchBack.toObject(t.switch_back,n),n.oneofs&&(r.union="switch_back")),t.change_resolution!=null&&t.hasOwnProperty("change_resolution")&&(r.change_resolution=u.hbb.Resolution.toObject(t.change_resolution,n),n.oneofs&&(r.union="change_resolution")),t.plugin_request!=null&&t.hasOwnProperty("plugin_request")&&(r.plugin_request=u.hbb.PluginRequest.toObject(t.plugin_request,n),n.oneofs&&(r.union="plugin_request")),t.plugin_failure!=null&&t.hasOwnProperty("plugin_failure")&&(r.plugin_failure=u.hbb.PluginFailure.toObject(t.plugin_failure,n),n.oneofs&&(r.union="plugin_failure")),t.full_speed_fps!=null&&t.hasOwnProperty("full_speed_fps")&&(r.full_speed_fps=t.full_speed_fps,n.oneofs&&(r.union="full_speed_fps")),t.auto_adjust_fps!=null&&t.hasOwnProperty("auto_adjust_fps")&&(r.auto_adjust_fps=t.auto_adjust_fps,n.oneofs&&(r.union="auto_adjust_fps")),t.client_record_status!=null&&t.hasOwnProperty("client_record_status")&&(r.client_record_status=t.client_record_status,n.oneofs&&(r.union="client_record_status")),t.capture_displays!=null&&t.hasOwnProperty("capture_displays")&&(r.capture_displays=u.hbb.CaptureDisplays.toObject(t.capture_displays,n),n.oneofs&&(r.union="capture_displays")),t.refresh_video_display!=null&&t.hasOwnProperty("refresh_video_display")&&(r.refresh_video_display=t.refresh_video_display,n.oneofs&&(r.union="refresh_video_display")),t.toggle_virtual_display!=null&&t.hasOwnProperty("toggle_virtual_display")&&(r.toggle_virtual_display=u.hbb.ToggleVirtualDisplay.toObject(t.toggle_virtual_display,n),n.oneofs&&(r.union="toggle_virtual_display")),t.toggle_privacy_mode!=null&&t.hasOwnProperty("toggle_privacy_mode")&&(r.toggle_privacy_mode=u.hbb.TogglePrivacyMode.toObject(t.toggle_privacy_mode,n),n.oneofs&&(r.union="toggle_privacy_mode")),t.supported_encoding!=null&&t.hasOwnProperty("supported_encoding")&&(r.supported_encoding=u.hbb.SupportedEncoding.toObject(t.supported_encoding,n),n.oneofs&&(r.union="supported_encoding")),t.selected_sid!=null&&t.hasOwnProperty("selected_sid")&&(r.selected_sid=t.selected_sid,n.oneofs&&(r.union="selected_sid")),t.change_display_resolution!=null&&t.hasOwnProperty("change_display_resolution")&&(r.change_display_resolution=u.hbb.DisplayResolution.toObject(t.change_display_resolution,n),n.oneofs&&(r.union="change_display_resolution")),t.message_query!=null&&t.hasOwnProperty("message_query")&&(r.message_query=u.hbb.MessageQuery.toObject(t.message_query,n),n.oneofs&&(r.union="message_query")),t.follow_current_display!=null&&t.hasOwnProperty("follow_current_display")&&(r.follow_current_display=t.follow_current_display,n.oneofs&&(r.union="follow_current_display")),r},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/hbb.Misc"},i}(),p.VoiceCallRequest=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.req_timestamp=f.Long?f.Long.fromBits(0,0,!1):0,i.prototype.is_connect=!1,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.req_timestamp!=null&&Object.hasOwnProperty.call(e,"req_timestamp")&&t.uint32(8).int64(e.req_timestamp),e.is_connect!=null&&Object.hasOwnProperty.call(e,"is_connect")&&t.uint32(16).bool(e.is_connect),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.VoiceCallRequest;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.req_timestamp=e.int64();break}case 2:{d.is_connect=e.bool();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.req_timestamp!=null&&e.hasOwnProperty("req_timestamp")&&!f.isInteger(e.req_timestamp)&&!(e.req_timestamp&&f.isInteger(e.req_timestamp.low)&&f.isInteger(e.req_timestamp.high))?"req_timestamp: integer|Long expected":e.is_connect!=null&&e.hasOwnProperty("is_connect")&&typeof e.is_connect!="boolean"?"is_connect: boolean expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.VoiceCallRequest)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.VoiceCallRequest;return e.req_timestamp!=null&&(f.Long?(n.req_timestamp=f.Long.fromValue(e.req_timestamp)).unsigned=!1:typeof e.req_timestamp=="string"?n.req_timestamp=parseInt(e.req_timestamp,10):typeof e.req_timestamp=="number"?n.req_timestamp=e.req_timestamp:typeof e.req_timestamp=="object"&&(n.req_timestamp=new f.LongBits(e.req_timestamp.low>>>0,e.req_timestamp.high>>>0).toNumber())),e.is_connect!=null&&(n.is_connect=!!e.is_connect),n},i.toObject=function(e,t){t||(t={});let n={};if(t.defaults){if(f.Long){let r=new f.Long(0,0,!1);n.req_timestamp=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.req_timestamp=t.longs===String?"0":0;n.is_connect=!1}return e.req_timestamp!=null&&e.hasOwnProperty("req_timestamp")&&(typeof e.req_timestamp=="number"?n.req_timestamp=t.longs===String?String(e.req_timestamp):e.req_timestamp:n.req_timestamp=t.longs===String?f.Long.prototype.toString.call(e.req_timestamp):t.longs===Number?new f.LongBits(e.req_timestamp.low>>>0,e.req_timestamp.high>>>0).toNumber():e.req_timestamp),e.is_connect!=null&&e.hasOwnProperty("is_connect")&&(n.is_connect=e.is_connect),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.VoiceCallRequest"},i}(),p.VoiceCallResponse=function(){function i(o){if(o)for(let e=Object.keys(o),t=0;t<e.length;++t)o[e[t]]!=null&&e[t]!=="__proto__"&&(this[e[t]]=o[e[t]])}return i.prototype.accepted=!1,i.prototype.req_timestamp=f.Long?f.Long.fromBits(0,0,!1):0,i.prototype.ack_timestamp=f.Long?f.Long.fromBits(0,0,!1):0,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=E.create()),e.accepted!=null&&Object.hasOwnProperty.call(e,"accepted")&&t.uint32(8).bool(e.accepted),e.req_timestamp!=null&&Object.hasOwnProperty.call(e,"req_timestamp")&&t.uint32(16).int64(e.req_timestamp),e.ack_timestamp!=null&&Object.hasOwnProperty.call(e,"ack_timestamp")&&t.uint32(24).int64(e.ack_timestamp),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,t,n,r){if(e instanceof s||(e=s.create(e)),r===void 0&&(r=0),r>s.recursionLimit)throw Error("maximum nesting depth exceeded");let l=t===void 0?e.len:e.pos+t,d=new u.hbb.VoiceCallResponse;for(;e.pos<l;){let c=e.uint32();if(c===n)break;switch(c>>>3){case 1:{d.accepted=e.bool();break}case 2:{d.req_timestamp=e.int64();break}case 3:{d.ack_timestamp=e.int64();break}default:e.skipType(c&7,r);break}}return d},i.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},i.verify=function(e,t){return typeof e!="object"||e===null?"object expected":(t===void 0&&(t=0),t>f.recursionLimit?"maximum nesting depth exceeded":e.accepted!=null&&e.hasOwnProperty("accepted")&&typeof e.accepted!="boolean"?"accepted: boolean expected":e.req_timestamp!=null&&e.hasOwnProperty("req_timestamp")&&!f.isInteger(e.req_timestamp)&&!(e.req_timestamp&&f.isInteger(e.req_timestamp.low)&&f.isInteger(e.req_timestamp.high))?"req_timestamp: integer|Long expected":e.ack_timestamp!=null&&e.hasOwnProperty("ack_timestamp")&&!f.isInteger(e.ack_timestamp)&&!(e.ack_timestamp&&f.isInteger(e.ack_timestamp.low)&&f.isInteger(e.ack_timestamp.high))?"ack_timestamp: integer|Long expected":null)},i.fromObject=function(e,t){if(e instanceof u.hbb.VoiceCallResponse)return e;if(t===void 0&&(t=0),t>f.recursionLimit)throw Error("maximum nesting depth exceeded");let n=new u.hbb.VoiceCallResponse;return e.accepted!=null&&(n.accepted=!!e.accepted),e.req_timestamp!=null&&(f.Long?(n.req_timestamp=f.Long.fromValue(e.req_timestamp)).unsigned=!1:typeof e.req_timestamp=="string"?n.req_timestamp=parseInt(e.req_timestamp,10):typeof e.req_timestamp=="number"?n.req_timestamp=e.req_timestamp:typeof e.req_timestamp=="object"&&(n.req_timestamp=new f.LongBits(e.req_timestamp.low>>>0,e.req_timestamp.high>>>0).toNumber())),e.ack_timestamp!=null&&(f.Long?(n.ack_timestamp=f.Long.fromValue(e.ack_timestamp)).unsigned=!1:typeof e.ack_timestamp=="string"?n.ack_timestamp=parseInt(e.ack_timestamp,10):typeof e.ack_timestamp=="number"?n.ack_timestamp=e.ack_timestamp:typeof e.ack_timestamp=="object"&&(n.ack_timestamp=new f.LongBits(e.ack_timestamp.low>>>0,e.ack_timestamp.high>>>0).toNumber())),n},i.toObject=function(e,t){t||(t={});let n={};if(t.defaults){if(n.accepted=!1,f.Long){let r=new f.Long(0,0,!1);n.req_timestamp=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.req_timestamp=t.longs===String?"0":0;if(f.Long){let r=new f.Long(0,0,!1);n.ack_timestamp=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.ack_timestamp=t.longs===String?"0":0}return e.accepted!=null&&e.hasOwnProperty("accepted")&&(n.accepted=e.accepted),e.req_timestamp!=null&&e.hasOwnProperty("req_timestamp")&&(typeof e.req_timestamp=="number"?n.req_timestamp=t.longs===String?String(e.req_timestamp):e.req_timestamp:n.req_timestamp=t.longs===String?f.Long.prototype.toString.call(e.req_timestamp):t.longs===Number?new f.LongBits(e.req_timestamp.low>>>0,e.req_timestamp.high>>>0).toNumber():e.req_timestamp),e.ack_timestamp!=null&&e.hasOwnProperty("ack_timestamp")&&(typeof e.ack_timestamp=="number"?n.ack_timestamp=t.longs===String?String(e.ack_timestamp):e.ack_timestamp:n.ack_timestamp=t.longs===String?f.Long.prototype.toString.call(e.ack_timestamp):t.longs===Number?new f.LongBits(e.ack_timestamp.low>>>0,e.ack_timestamp.high>>>0).toNumber():e.ack_timestamp),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/hbb.VoiceCallResponse"},i}(),p.Message=function(){function i(e){if(e)for(let t=Object.keys(e),n=0;n<t.length;++n)e[t[n]]!=null&&t[n]!=="__proto__"&&(this[t[n]]=e[t[n]])}i.prototype.signed_id=null,i.prototype.public_key=null,i.prototype.test_delay=null,i.prototype.video_frame=null,i.prototype.login_request=null,i.prototype.login_response=null,i.prototype.hash=null,i.prototype.mouse_event=null,i.prototype.audio_frame=null,i.prototype.cursor_data=null,i.prototype.cursor_position=null,i.prototype.cursor_id=null,i.prototype.key_event=null,i.prototype.clipboard=null,i.prototype.file_action=null,i.prototype.file_response=null,i.prototype.misc=null,i.prototype.cliprdr=null,i.prototype.message_box=null,i.prototype.switch_sides_response=null,i.prototype.voice_call_request=null,i.prototype.voice_call_response=null,i.prototype.peer_info=null,i.prototype.pointer_device_event=null,i.prototype.auth_2fa=null,i.prototype.multi_clipboards=null;let o;return Object.defineProperty(i.prototype,"union",{get:f.oneOfGetter(o=["signed_id","public_key","test_delay","video_frame","login_request","login_response","hash","mouse_event","audio_frame","cursor_data","cursor_position","cursor_id","key_event","clipboard","file_action","file_response","misc","cliprdr","message_box","switch_sides_response","voice_call_request","voice_call_response","peer_info","pointer_device_event","auth_2fa","multi_clipboards"]),set:f.oneOfSetter(o)}),i.create=function(t){return new i(t)},i.encode=function(t,n){return n||(n=E.create()),t.signed_id!=null&&Object.hasOwnProperty.call(t,"signed_id")&&u.hbb.SignedId.encode(t.signed_id,n.uint32(26).fork()).ldelim(),t.public_key!=null&&Object.hasOwnProperty.call(t,"public_key")&&u.hbb.PublicKey.encode(t.public_key,n.uint32(34).fork()).ldelim(),t.test_delay!=null&&Object.hasOwnProperty.call(t,"test_delay")&&u.hbb.TestDelay.encode(t.test_delay,n.uint32(42).fork()).ldelim(),t.video_frame!=null&&Object.hasOwnProperty.call(t,"video_frame")&&u.hbb.VideoFrame.encode(t.video_frame,n.uint32(50).fork()).ldelim(),t.login_request!=null&&Object.hasOwnProperty.call(t,"login_request")&&u.hbb.LoginRequest.encode(t.login_request,n.uint32(58).fork()).ldelim(),t.login_response!=null&&Object.hasOwnProperty.call(t,"login_response")&&u.hbb.LoginResponse.encode(t.login_response,n.uint32(66).fork()).ldelim(),t.hash!=null&&Object.hasOwnProperty.call(t,"hash")&&u.hbb.Hash.encode(t.hash,n.uint32(74).fork()).ldelim(),t.mouse_event!=null&&Object.hasOwnProperty.call(t,"mouse_event")&&u.hbb.MouseEvent.encode(t.mouse_event,n.uint32(82).fork()).ldelim(),t.audio_frame!=null&&Object.hasOwnProperty.call(t,"audio_frame")&&u.hbb.AudioFrame.encode(t.audio_frame,n.uint32(90).fork()).ldelim(),t.cursor_data!=null&&Object.hasOwnProperty.call(t,"cursor_data")&&u.hbb.CursorData.encode(t.cursor_data,n.uint32(98).fork()).ldelim(),t.cursor_position!=null&&Object.hasOwnProperty.call(t,"cursor_position")&&u.hbb.CursorPosition.encode(t.cursor_position,n.uint32(106).fork()).ldelim(),t.cursor_id!=null&&Object.hasOwnProperty.call(t,"cursor_id")&&n.uint32(112).uint64(t.cursor_id),t.key_event!=null&&Object.hasOwnProperty.call(t,"key_event")&&u.hbb.KeyEvent.encode(t.key_event,n.uint32(122).fork()).ldelim(),t.clipboard!=null&&Object.hasOwnProperty.call(t,"clipboard")&&u.hbb.Clipboard.encode(t.clipboard,n.uint32(130).fork()).ldelim(),t.file_action!=null&&Object.hasOwnProperty.call(t,"file_action")&&u.hbb.FileAction.encode(t.file_action,n.uint32(138).fork()).ldelim(),t.file_response!=null&&Object.hasOwnProperty.call(t,"file_response")&&u.hbb.FileResponse.encode(t.file_response,n.uint32(146).fork()).ldelim(),t.misc!=null&&Object.hasOwnProperty.call(t,"misc")&&u.hbb.Misc.encode(t.misc,n.uint32(154).fork()).ldelim(),t.cliprdr!=null&&Object.hasOwnProperty.call(t,"cliprdr")&&u.hbb.Cliprdr.encode(t.cliprdr,n.uint32(162).fork()).ldelim(),t.message_box!=null&&Object.hasOwnProperty.call(t,"message_box")&&u.hbb.MessageBox.encode(t.message_box,n.uint32(170).fork()).ldelim(),t.switch_sides_response!=null&&Object.hasOwnProperty.call(t,"switch_sides_response")&&u.hbb.SwitchSidesResponse.encode(t.switch_sides_response,n.uint32(178).fork()).ldelim(),t.voice_call_request!=null&&Object.hasOwnProperty.call(t,"voice_call_request")&&u.hbb.VoiceCallRequest.encode(t.voice_call_request,n.uint32(186).fork()).ldelim(),t.voice_call_response!=null&&Object.hasOwnProperty.call(t,"voice_call_response")&&u.hbb.VoiceCallResponse.encode(t.voice_call_response,n.uint32(194).fork()).ldelim(),t.peer_info!=null&&Object.hasOwnProperty.call(t,"peer_info")&&u.hbb.PeerInfo.encode(t.peer_info,n.uint32(202).fork()).ldelim(),t.pointer_device_event!=null&&Object.hasOwnProperty.call(t,"pointer_device_event")&&u.hbb.PointerDeviceEvent.encode(t.pointer_device_event,n.uint32(210).fork()).ldelim(),t.auth_2fa!=null&&Object.hasOwnProperty.call(t,"auth_2fa")&&u.hbb.Auth2FA.encode(t.auth_2fa,n.uint32(218).fork()).ldelim(),t.multi_clipboards!=null&&Object.hasOwnProperty.call(t,"multi_clipboards")&&u.hbb.MultiClipboards.encode(t.multi_clipboards,n.uint32(226).fork()).ldelim(),n},i.encodeDelimited=function(t,n){return this.encode(t,n).ldelim()},i.decode=function(t,n,r,l){if(t instanceof s||(t=s.create(t)),l===void 0&&(l=0),l>s.recursionLimit)throw Error("maximum nesting depth exceeded");let d=n===void 0?t.len:t.pos+n,c=new u.hbb.Message;for(;t.pos<d;){let w=t.uint32();if(w===r)break;switch(w>>>3){case 3:{c.signed_id=u.hbb.SignedId.decode(t,t.uint32(),void 0,l+1);break}case 4:{c.public_key=u.hbb.PublicKey.decode(t,t.uint32(),void 0,l+1);break}case 5:{c.test_delay=u.hbb.TestDelay.decode(t,t.uint32(),void 0,l+1);break}case 6:{c.video_frame=u.hbb.VideoFrame.decode(t,t.uint32(),void 0,l+1);break}case 7:{c.login_request=u.hbb.LoginRequest.decode(t,t.uint32(),void 0,l+1);break}case 8:{c.login_response=u.hbb.LoginResponse.decode(t,t.uint32(),void 0,l+1);break}case 9:{c.hash=u.hbb.Hash.decode(t,t.uint32(),void 0,l+1);break}case 10:{c.mouse_event=u.hbb.MouseEvent.decode(t,t.uint32(),void 0,l+1);break}case 11:{c.audio_frame=u.hbb.AudioFrame.decode(t,t.uint32(),void 0,l+1);break}case 12:{c.cursor_data=u.hbb.CursorData.decode(t,t.uint32(),void 0,l+1);break}case 13:{c.cursor_position=u.hbb.CursorPosition.decode(t,t.uint32(),void 0,l+1);break}case 14:{c.cursor_id=t.uint64();break}case 15:{c.key_event=u.hbb.KeyEvent.decode(t,t.uint32(),void 0,l+1);break}case 16:{c.clipboard=u.hbb.Clipboard.decode(t,t.uint32(),void 0,l+1);break}case 17:{c.file_action=u.hbb.FileAction.decode(t,t.uint32(),void 0,l+1);break}case 18:{c.file_response=u.hbb.FileResponse.decode(t,t.uint32(),void 0,l+1);break}case 19:{c.misc=u.hbb.Misc.decode(t,t.uint32(),void 0,l+1);break}case 20:{c.cliprdr=u.hbb.Cliprdr.decode(t,t.uint32(),void 0,l+1);break}case 21:{c.message_box=u.hbb.MessageBox.decode(t,t.uint32(),void 0,l+1);break}case 22:{c.switch_sides_response=u.hbb.SwitchSidesResponse.decode(t,t.uint32(),void 0,l+1);break}case 23:{c.voice_call_request=u.hbb.VoiceCallRequest.decode(t,t.uint32(),void 0,l+1);break}case 24:{c.voice_call_response=u.hbb.VoiceCallResponse.decode(t,t.uint32(),void 0,l+1);break}case 25:{c.peer_info=u.hbb.PeerInfo.decode(t,t.uint32(),void 0,l+1);break}case 26:{c.pointer_device_event=u.hbb.PointerDeviceEvent.decode(t,t.uint32(),void 0,l+1);break}case 27:{c.auth_2fa=u.hbb.Auth2FA.decode(t,t.uint32(),void 0,l+1);break}case 28:{c.multi_clipboards=u.hbb.MultiClipboards.decode(t,t.uint32(),void 0,l+1);break}default:t.skipType(w&7,l);break}}return c},i.decodeDelimited=function(t){return t instanceof s||(t=new s(t)),this.decode(t,t.uint32())},i.verify=function(t,n){if(typeof t!="object"||t===null)return"object expected";if(n===void 0&&(n=0),n>f.recursionLimit)return"maximum nesting depth exceeded";let r={};if(t.signed_id!=null&&t.hasOwnProperty("signed_id")){r.union=1;{let l=u.hbb.SignedId.verify(t.signed_id,n+1);if(l)return"signed_id."+l}}if(t.public_key!=null&&t.hasOwnProperty("public_key")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.PublicKey.verify(t.public_key,n+1);if(l)return"public_key."+l}}if(t.test_delay!=null&&t.hasOwnProperty("test_delay")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.TestDelay.verify(t.test_delay,n+1);if(l)return"test_delay."+l}}if(t.video_frame!=null&&t.hasOwnProperty("video_frame")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.VideoFrame.verify(t.video_frame,n+1);if(l)return"video_frame."+l}}if(t.login_request!=null&&t.hasOwnProperty("login_request")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.LoginRequest.verify(t.login_request,n+1);if(l)return"login_request."+l}}if(t.login_response!=null&&t.hasOwnProperty("login_response")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.LoginResponse.verify(t.login_response,n+1);if(l)return"login_response."+l}}if(t.hash!=null&&t.hasOwnProperty("hash")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.Hash.verify(t.hash,n+1);if(l)return"hash."+l}}if(t.mouse_event!=null&&t.hasOwnProperty("mouse_event")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.MouseEvent.verify(t.mouse_event,n+1);if(l)return"mouse_event."+l}}if(t.audio_frame!=null&&t.hasOwnProperty("audio_frame")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.AudioFrame.verify(t.audio_frame,n+1);if(l)return"audio_frame."+l}}if(t.cursor_data!=null&&t.hasOwnProperty("cursor_data")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.CursorData.verify(t.cursor_data,n+1);if(l)return"cursor_data."+l}}if(t.cursor_position!=null&&t.hasOwnProperty("cursor_position")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.CursorPosition.verify(t.cursor_position,n+1);if(l)return"cursor_position."+l}}if(t.cursor_id!=null&&t.hasOwnProperty("cursor_id")){if(r.union===1)return"union: multiple values";if(r.union=1,!f.isInteger(t.cursor_id)&&!(t.cursor_id&&f.isInteger(t.cursor_id.low)&&f.isInteger(t.cursor_id.high)))return"cursor_id: integer|Long expected"}if(t.key_event!=null&&t.hasOwnProperty("key_event")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.KeyEvent.verify(t.key_event,n+1);if(l)return"key_event."+l}}if(t.clipboard!=null&&t.hasOwnProperty("clipboard")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.Clipboard.verify(t.clipboard,n+1);if(l)return"clipboard."+l}}if(t.file_action!=null&&t.hasOwnProperty("file_action")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.FileAction.verify(t.file_action,n+1);if(l)return"file_action."+l}}if(t.file_response!=null&&t.hasOwnProperty("file_response")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.FileResponse.verify(t.file_response,n+1);if(l)return"file_response."+l}}if(t.misc!=null&&t.hasOwnProperty("misc")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.Misc.verify(t.misc,n+1);if(l)return"misc."+l}}if(t.cliprdr!=null&&t.hasOwnProperty("cliprdr")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.Cliprdr.verify(t.cliprdr,n+1);if(l)return"cliprdr."+l}}if(t.message_box!=null&&t.hasOwnProperty("message_box")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.MessageBox.verify(t.message_box,n+1);if(l)return"message_box."+l}}if(t.switch_sides_response!=null&&t.hasOwnProperty("switch_sides_response")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.SwitchSidesResponse.verify(t.switch_sides_response,n+1);if(l)return"switch_sides_response."+l}}if(t.voice_call_request!=null&&t.hasOwnProperty("voice_call_request")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.VoiceCallRequest.verify(t.voice_call_request,n+1);if(l)return"voice_call_request."+l}}if(t.voice_call_response!=null&&t.hasOwnProperty("voice_call_response")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.VoiceCallResponse.verify(t.voice_call_response,n+1);if(l)return"voice_call_response."+l}}if(t.peer_info!=null&&t.hasOwnProperty("peer_info")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.PeerInfo.verify(t.peer_info,n+1);if(l)return"peer_info."+l}}if(t.pointer_device_event!=null&&t.hasOwnProperty("pointer_device_event")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.PointerDeviceEvent.verify(t.pointer_device_event,n+1);if(l)return"pointer_device_event."+l}}if(t.auth_2fa!=null&&t.hasOwnProperty("auth_2fa")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.Auth2FA.verify(t.auth_2fa,n+1);if(l)return"auth_2fa."+l}}if(t.multi_clipboards!=null&&t.hasOwnProperty("multi_clipboards")){if(r.union===1)return"union: multiple values";r.union=1;{let l=u.hbb.MultiClipboards.verify(t.multi_clipboards,n+1);if(l)return"multi_clipboards."+l}}return null},i.fromObject=function(t,n){if(t instanceof u.hbb.Message)return t;if(n===void 0&&(n=0),n>f.recursionLimit)throw Error("maximum nesting depth exceeded");let r=new u.hbb.Message;if(t.signed_id!=null){if(typeof t.signed_id!="object")throw TypeError(".hbb.Message.signed_id: object expected");r.signed_id=u.hbb.SignedId.fromObject(t.signed_id,n+1)}if(t.public_key!=null){if(typeof t.public_key!="object")throw TypeError(".hbb.Message.public_key: object expected");r.public_key=u.hbb.PublicKey.fromObject(t.public_key,n+1)}if(t.test_delay!=null){if(typeof t.test_delay!="object")throw TypeError(".hbb.Message.test_delay: object expected");r.test_delay=u.hbb.TestDelay.fromObject(t.test_delay,n+1)}if(t.video_frame!=null){if(typeof t.video_frame!="object")throw TypeError(".hbb.Message.video_frame: object expected");r.video_frame=u.hbb.VideoFrame.fromObject(t.video_frame,n+1)}if(t.login_request!=null){if(typeof t.login_request!="object")throw TypeError(".hbb.Message.login_request: object expected");r.login_request=u.hbb.LoginRequest.fromObject(t.login_request,n+1)}if(t.login_response!=null){if(typeof t.login_response!="object")throw TypeError(".hbb.Message.login_response: object expected");r.login_response=u.hbb.LoginResponse.fromObject(t.login_response,n+1)}if(t.hash!=null){if(typeof t.hash!="object")throw TypeError(".hbb.Message.hash: object expected");r.hash=u.hbb.Hash.fromObject(t.hash,n+1)}if(t.mouse_event!=null){if(typeof t.mouse_event!="object")throw TypeError(".hbb.Message.mouse_event: object expected");r.mouse_event=u.hbb.MouseEvent.fromObject(t.mouse_event,n+1)}if(t.audio_frame!=null){if(typeof t.audio_frame!="object")throw TypeError(".hbb.Message.audio_frame: object expected");r.audio_frame=u.hbb.AudioFrame.fromObject(t.audio_frame,n+1)}if(t.cursor_data!=null){if(typeof t.cursor_data!="object")throw TypeError(".hbb.Message.cursor_data: object expected");r.cursor_data=u.hbb.CursorData.fromObject(t.cursor_data,n+1)}if(t.cursor_position!=null){if(typeof t.cursor_position!="object")throw TypeError(".hbb.Message.cursor_position: object expected");r.cursor_position=u.hbb.CursorPosition.fromObject(t.cursor_position,n+1)}if(t.cursor_id!=null&&(f.Long?(r.cursor_id=f.Long.fromValue(t.cursor_id)).unsigned=!0:typeof t.cursor_id=="string"?r.cursor_id=parseInt(t.cursor_id,10):typeof t.cursor_id=="number"?r.cursor_id=t.cursor_id:typeof t.cursor_id=="object"&&(r.cursor_id=new f.LongBits(t.cursor_id.low>>>0,t.cursor_id.high>>>0).toNumber(!0))),t.key_event!=null){if(typeof t.key_event!="object")throw TypeError(".hbb.Message.key_event: object expected");r.key_event=u.hbb.KeyEvent.fromObject(t.key_event,n+1)}if(t.clipboard!=null){if(typeof t.clipboard!="object")throw TypeError(".hbb.Message.clipboard: object expected");r.clipboard=u.hbb.Clipboard.fromObject(t.clipboard,n+1)}if(t.file_action!=null){if(typeof t.file_action!="object")throw TypeError(".hbb.Message.file_action: object expected");r.file_action=u.hbb.FileAction.fromObject(t.file_action,n+1)}if(t.file_response!=null){if(typeof t.file_response!="object")throw TypeError(".hbb.Message.file_response: object expected");r.file_response=u.hbb.FileResponse.fromObject(t.file_response,n+1)}if(t.misc!=null){if(typeof t.misc!="object")throw TypeError(".hbb.Message.misc: object expected");r.misc=u.hbb.Misc.fromObject(t.misc,n+1)}if(t.cliprdr!=null){if(typeof t.cliprdr!="object")throw TypeError(".hbb.Message.cliprdr: object expected");r.cliprdr=u.hbb.Cliprdr.fromObject(t.cliprdr,n+1)}if(t.message_box!=null){if(typeof t.message_box!="object")throw TypeError(".hbb.Message.message_box: object expected");r.message_box=u.hbb.MessageBox.fromObject(t.message_box,n+1)}if(t.switch_sides_response!=null){if(typeof t.switch_sides_response!="object")throw TypeError(".hbb.Message.switch_sides_response: object expected");r.switch_sides_response=u.hbb.SwitchSidesResponse.fromObject(t.switch_sides_response,n+1)}if(t.voice_call_request!=null){if(typeof t.voice_call_request!="object")throw TypeError(".hbb.Message.voice_call_request: object expected");r.voice_call_request=u.hbb.VoiceCallRequest.fromObject(t.voice_call_request,n+1)}if(t.voice_call_response!=null){if(typeof t.voice_call_response!="object")throw TypeError(".hbb.Message.voice_call_response: object expected");r.voice_call_response=u.hbb.VoiceCallResponse.fromObject(t.voice_call_response,n+1)}if(t.peer_info!=null){if(typeof t.peer_info!="object")throw TypeError(".hbb.Message.peer_info: object expected");r.peer_info=u.hbb.PeerInfo.fromObject(t.peer_info,n+1)}if(t.pointer_device_event!=null){if(typeof t.pointer_device_event!="object")throw TypeError(".hbb.Message.pointer_device_event: object expected");r.pointer_device_event=u.hbb.PointerDeviceEvent.fromObject(t.pointer_device_event,n+1)}if(t.auth_2fa!=null){if(typeof t.auth_2fa!="object")throw TypeError(".hbb.Message.auth_2fa: object expected");r.auth_2fa=u.hbb.Auth2FA.fromObject(t.auth_2fa,n+1)}if(t.multi_clipboards!=null){if(typeof t.multi_clipboards!="object")throw TypeError(".hbb.Message.multi_clipboards: object expected");r.multi_clipboards=u.hbb.MultiClipboards.fromObject(t.multi_clipboards,n+1)}return r},i.toObject=function(t,n){n||(n={});let r={};return t.signed_id!=null&&t.hasOwnProperty("signed_id")&&(r.signed_id=u.hbb.SignedId.toObject(t.signed_id,n),n.oneofs&&(r.union="signed_id")),t.public_key!=null&&t.hasOwnProperty("public_key")&&(r.public_key=u.hbb.PublicKey.toObject(t.public_key,n),n.oneofs&&(r.union="public_key")),t.test_delay!=null&&t.hasOwnProperty("test_delay")&&(r.test_delay=u.hbb.TestDelay.toObject(t.test_delay,n),n.oneofs&&(r.union="test_delay")),t.video_frame!=null&&t.hasOwnProperty("video_frame")&&(r.video_frame=u.hbb.VideoFrame.toObject(t.video_frame,n),n.oneofs&&(r.union="video_frame")),t.login_request!=null&&t.hasOwnProperty("login_request")&&(r.login_request=u.hbb.LoginRequest.toObject(t.login_request,n),n.oneofs&&(r.union="login_request")),t.login_response!=null&&t.hasOwnProperty("login_response")&&(r.login_response=u.hbb.LoginResponse.toObject(t.login_response,n),n.oneofs&&(r.union="login_response")),t.hash!=null&&t.hasOwnProperty("hash")&&(r.hash=u.hbb.Hash.toObject(t.hash,n),n.oneofs&&(r.union="hash")),t.mouse_event!=null&&t.hasOwnProperty("mouse_event")&&(r.mouse_event=u.hbb.MouseEvent.toObject(t.mouse_event,n),n.oneofs&&(r.union="mouse_event")),t.audio_frame!=null&&t.hasOwnProperty("audio_frame")&&(r.audio_frame=u.hbb.AudioFrame.toObject(t.audio_frame,n),n.oneofs&&(r.union="audio_frame")),t.cursor_data!=null&&t.hasOwnProperty("cursor_data")&&(r.cursor_data=u.hbb.CursorData.toObject(t.cursor_data,n),n.oneofs&&(r.union="cursor_data")),t.cursor_position!=null&&t.hasOwnProperty("cursor_position")&&(r.cursor_position=u.hbb.CursorPosition.toObject(t.cursor_position,n),n.oneofs&&(r.union="cursor_position")),t.cursor_id!=null&&t.hasOwnProperty("cursor_id")&&(typeof t.cursor_id=="number"?r.cursor_id=n.longs===String?String(t.cursor_id):t.cursor_id:r.cursor_id=n.longs===String?f.Long.prototype.toString.call(t.cursor_id):n.longs===Number?new f.LongBits(t.cursor_id.low>>>0,t.cursor_id.high>>>0).toNumber(!0):t.cursor_id,n.oneofs&&(r.union="cursor_id")),t.key_event!=null&&t.hasOwnProperty("key_event")&&(r.key_event=u.hbb.KeyEvent.toObject(t.key_event,n),n.oneofs&&(r.union="key_event")),t.clipboard!=null&&t.hasOwnProperty("clipboard")&&(r.clipboard=u.hbb.Clipboard.toObject(t.clipboard,n),n.oneofs&&(r.union="clipboard")),t.file_action!=null&&t.hasOwnProperty("file_action")&&(r.file_action=u.hbb.FileAction.toObject(t.file_action,n),n.oneofs&&(r.union="file_action")),t.file_response!=null&&t.hasOwnProperty("file_response")&&(r.file_response=u.hbb.FileResponse.toObject(t.file_response,n),n.oneofs&&(r.union="file_response")),t.misc!=null&&t.hasOwnProperty("misc")&&(r.misc=u.hbb.Misc.toObject(t.misc,n),n.oneofs&&(r.union="misc")),t.cliprdr!=null&&t.hasOwnProperty("cliprdr")&&(r.cliprdr=u.hbb.Cliprdr.toObject(t.cliprdr,n),n.oneofs&&(r.union="cliprdr")),t.message_box!=null&&t.hasOwnProperty("message_box")&&(r.message_box=u.hbb.MessageBox.toObject(t.message_box,n),n.oneofs&&(r.union="message_box")),t.switch_sides_response!=null&&t.hasOwnProperty("switch_sides_response")&&(r.switch_sides_response=u.hbb.SwitchSidesResponse.toObject(t.switch_sides_response,n),n.oneofs&&(r.union="switch_sides_response")),t.voice_call_request!=null&&t.hasOwnProperty("voice_call_request")&&(r.voice_call_request=u.hbb.VoiceCallRequest.toObject(t.voice_call_request,n),n.oneofs&&(r.union="voice_call_request")),t.voice_call_response!=null&&t.hasOwnProperty("voice_call_response")&&(r.voice_call_response=u.hbb.VoiceCallResponse.toObject(t.voice_call_response,n),n.oneofs&&(r.union="voice_call_response")),t.peer_info!=null&&t.hasOwnProperty("peer_info")&&(r.peer_info=u.hbb.PeerInfo.toObject(t.peer_info,n),n.oneofs&&(r.union="peer_info")),t.pointer_device_event!=null&&t.hasOwnProperty("pointer_device_event")&&(r.pointer_device_event=u.hbb.PointerDeviceEvent.toObject(t.pointer_device_event,n),n.oneofs&&(r.union="pointer_device_event")),t.auth_2fa!=null&&t.hasOwnProperty("auth_2fa")&&(r.auth_2fa=u.hbb.Auth2FA.toObject(t.auth_2fa,n),n.oneofs&&(r.union="auth_2fa")),t.multi_clipboards!=null&&t.hasOwnProperty("multi_clipboards")&&(r.multi_clipboards=u.hbb.MultiClipboards.toObject(t.multi_clipboards,n),n.oneofs&&(r.union="multi_clipboards")),r},i.prototype.toJSON=function(){return this.constructor.toObject(this,S.util.toJSONOptions)},i.getTypeUrl=function(t){return t===void 0&&(t="type.googleapis.com"),t+"/hbb.Message"},i}(),p})();function rr(p,i,o,e,t=1e4){return new Promise((n,r)=>{let l=new WebSocket(p);l.binaryType="arraybuffer";let d=setTimeout(()=>{c(),r(new Error(`punchHole: timeout after ${t}ms`))},t);function c(){clearTimeout(d);try{l.close()}catch{}}l.onopen=()=>{let w=x.RendezvousMessage.create({punch_hole_request:x.PunchHoleRequest.create({id:i,nat_type:x.NatType.SYMMETRIC,licence_key:o,conn_type:x.ConnType.DEFAULT_CONN,version:e})}),j=x.RendezvousMessage.encode(w).finish();l.send(j)},l.onmessage=w=>{let j=new Uint8Array(w.data),C;try{C=x.RendezvousMessage.decode(j)}catch(ce){c(),r(new Error(`punchHole: decode failure: ${ce}`));return}let K=C.punch_hole_response;if(K){if(!K.socket_addr||K.socket_addr.length===0){c(),r(new Error(Wr(K)));return}c(),n({signedIdPk:K.pk||new Uint8Array(0),relayServer:K.relay_server||"",peerUuid:"",peerSocketAddr:K.socket_addr||new Uint8Array(0)});return}let V=C.relay_response;if(V){c(),n({signedIdPk:V.pk||new Uint8Array(0),relayServer:V.relay_server||"",peerUuid:V.uuid||"",peerSocketAddr:V.socket_addr||new Uint8Array(0)});return}},l.onerror=()=>{c(),r(new Error(`punchHole: WebSocket error connecting to ${p}`))},l.onclose=w=>{clearTimeout(d),r(new Error(`punchHole: socket closed (code=${w.code} reason=${w.reason||"n/a"})`))}})}function Wr(p){if(p.other_failure)return p.other_failure;switch(p.failure){case x.PunchHoleResponse.Failure.ID_NOT_EXIST:return"Peer ID not registered with this server";case x.PunchHoleResponse.Failure.OFFLINE:return"Peer is offline";case x.PunchHoleResponse.Failure.LICENSE_MISMATCH:return"License key mismatch";case x.PunchHoleResponse.Failure.LICENSE_OVERUSE:return"License overuse";default:return"Rendezvous failed (peer offline or unknown reason)"}}function or(){let p=globalThis.crypto;if(typeof p.randomUUID=="function")return p.randomUUID();let i=new Uint8Array(16);p.getRandomValues(i),i[6]=i[6]&15|64,i[8]=i[8]&63|128;let o=Array.from(i,e=>e.toString(16).padStart(2,"0"));return`${o.slice(0,4).join("")}-${o.slice(4,6).join("")}-${o.slice(6,8).join("")}-${o.slice(8,10).join("")}-${o.slice(10,16).join("")}`}function ur(p,i=21118){return`${location.protocol==="https:"?"wss":"ws"}://${p}:${i}/`}function lr(p,i=21119){return`${location.protocol==="https:"?"wss":"ws"}://${p}:${i}/`}var Vt=class p{ws;readBuf=[];waiters=[];closed=!1;closeError=null;static async connect(i){let o=new p;return await o._open(i),o}async _open(i){let o=i.connectTimeoutMs??1e4;return new Promise((e,t)=>{this.ws=new WebSocket(i.wsUrl),this.ws.binaryType="arraybuffer";let n=setTimeout(()=>{this._fail(new Error(`relay: connect timeout after ${o}ms`)),t(new Error(`relay: connect timeout after ${o}ms`))},o);this.ws.onopen=()=>{clearTimeout(n);let r=x.RendezvousMessage.create({request_relay:x.RequestRelay.create({id:i.peerId,uuid:i.uuid,licence_key:i.licenceKey,conn_type:x.ConnType.DEFAULT_CONN})}),l=x.RendezvousMessage.encode(r).finish();this.ws.send(l),e()},this.ws.onmessage=r=>{let l=new Uint8Array(r.data),d=this.waiters.shift();d?d(l):this.readBuf.push(l)},this.ws.onerror=()=>{clearTimeout(n),this._fail(new Error(`relay: WebSocket error on ${i.wsUrl}`)),t(new Error(`relay: WebSocket error on ${i.wsUrl}`))},this.ws.onclose=r=>{clearTimeout(n),this._fail(new Error(`relay: socket closed (code=${r.code} reason=${r.reason||"n/a"})`))}})}next(){return this.readBuf.length>0?Promise.resolve(this.readBuf.shift()):this.closed?Promise.resolve(null):new Promise((i,o)=>{this.waiters.push(e=>{this.closeError&&e===null?o(this.closeError):i(e)})})}send(i){if(this.closed)throw new Error("relay: send on closed connection");this.ws.send(i)}close(){this._fail(new Error("relay: closed by client"))}_fail(i){if(!this.closed){this.closed=!0,this.closeError=i;try{this.ws.close()}catch{}for(;this.waiters.length>0;)this.waiters.shift()(null)}}};var _t=class extends Error{constructor(i){super(i||"The remote user declined the connection."),this.name="ConnectionDeclinedError"}},Yt=class p{constructor(i,o,e,t){this.relay=i;this.secretboxKey=o;this.sendSeq=e;this.recvSeq=t}static async open(i){let o=await i.relay.next();if(!o)throw new Error("session: relay closed before SignedId");let e=x.Message.decode(o);if(!e.signed_id)throw new Error(`session: expected signed_id, got ${fr(e)}`);let t=e.signed_id.id;if(!t||t.length===0)throw new Error("session: SignedId.id is empty");let n,r;try{let ve=Ut(t,i.peerSignPk),Oe=x.IdPk.decode(ve);r=Oe.id||"",n=Oe.pk||new Uint8Array(0)}catch(ve){throw new Error(`session: SignedId verify failed (peer's Ed25519 sign pk does not match the rendezvous-signed pk): ${ve}`)}if(r!==i.peerId)throw new Error(`session: SignedId.id mismatch (expected ${i.peerId}, got ${r})`);if(n.length!==32)throw new Error(`session: peer Curve25519 box pk has wrong length ${n.length}`);let l=gn(),d=ei(),c=ti(d,n,l.secretKey),w=x.Message.create({public_key:x.PublicKey.create({asymmetric_value:l.publicKey,symmetric_value:c})});i.relay.send(x.Message.encode(w).finish());let j=new p(i.relay,d,0n,0n),C=await j.recv();if(!C.hash)throw new Error(`session: expected hash, got ${fr(C)}`);let K=C.hash.salt||"",V=C.hash.challenge||"",ce=new TextEncoder,ke=ce.encode(K),Qe=ce.encode(V),ze=i.password.length===0?new Uint8Array(0):pn(hn(pn(hn(i.password,ke)),Qe)),Me=x.Message.create({login_request:x.LoginRequest.create({username:i.peerId,password:ze,my_id:"web-client",my_name:i.myName,version:i.clientVersion,my_platform:"Web",session_id:i.sessionId,video_ack_required:!1,option:x.OptionMessage.create({supported_decoding:x.SupportedDecoding.create({ability_vp9:1,ability_h264:1,ability_vp8:1,prefer:x.SupportedDecoding.PreferCodec.VP8}),disable_audio:x.OptionMessage.BoolOption.No,disable_clipboard:x.OptionMessage.BoolOption.No})})});await j.send(Me);let Ke=[],De=!1;if(ze.length===0){De=!0;try{i.onAwaitingApproval?.(()=>j.close())}catch{}}for(;;){let ve=await j.recv();if(ve.test_delay){let Oe=ve.test_delay;await j.send(x.Message.create({test_delay:x.TestDelay.create({time:Oe.time,from_client:!0,last_delay:Oe.last_delay,target_bitrate:Oe.target_bitrate})}));continue}if(ve.login_response){let Oe=ve.login_response;if(Oe.error){if(Oe.error==="No Password Access"){if(!De){De=!0;try{i.onAwaitingApproval?.(()=>j.close())}catch{}}continue}throw new Error(`session: login refused: ${Oe.error}`)}if(!Oe.peer_info)throw new Error("session: login_response missing peer_info");return console.log(`[rustdesk-web] session: login OK, peer=${Oe.peer_info.hostname}/${Oe.peer_info.platform} v${Oe.peer_info.version}`),{session:j,peerInfo:Oe.peer_info,preloginExtras:Ke}}if(ve.misc?.close_reason!=null)throw new _t(ve.misc.close_reason);Ke.push(ve)}}async send(i){let o=x.Message.encode(i).finish();this.sendSeq+=1n;let e=ni(o,this.sendSeq,this.secretboxKey);this.relay.send(e)}async recv(){let i=await this.relay.next();if(!i)throw new Error("session: relay closed");this.recvSeq+=1n;let o=ii(i,this.recvSeq,this.secretboxKey);return x.Message.decode(o)}close(){this.relay.close()}};function fr(p){for(let i of["signed_id","public_key","test_delay","video_frame","login_request","login_response","hash","mouse_event","audio_frame","key_event","clipboard","misc","peer_info"])if(p[i])return i;return"unknown"}function*Gr(p){let i=[];for(let o=0;o+2<p.length;o++)p[o]===0&&p[o+1]===0&&(p[o+2]===1?(i.push(o+3),o+=2):o+3<p.length&&p[o+2]===0&&p[o+3]===1&&(i.push(o+4),o+=3));for(let o=0;o<i.length;o++){let e=i[o],t=o+1<i.length?i[o+1]-(p[i[o+1]-4]===0?4:3):p.length;t>e&&(yield p.subarray(e,t))}}function cr(p){for(let i of Gr(p)){if(i.length<4||(i[0]&31)!==7)continue;let e=i[1],t=i[2],n=i[3],r=l=>l.toString(16).padStart(2,"0").toUpperCase();return`avc1.${r(e)}${r(t)}${r(n)}`}return null}var Wt=class{decoder=null;currentCodec="";onFrame;framesIn=0;framesOut=0;lastDiagAt=performance.now();constructor(i){if(this.onFrame=i,typeof VideoDecoder>"u"){let e=!window.isSecureContext?"Open this page via http://localhost or https:// \u2014 WebCodecs is gated to secure contexts and the LAN IP doesn't qualify.":"Update to Chrome 94+, Firefox 130+, or Safari 16.4+.";throw new Error(`WebCodecs VideoDecoder unavailable. ${e}`)}}diagStats(){let i=performance.now(),o=(i-this.lastDiagAt)/1e3||1,e=Math.round(this.framesIn/o),t=Math.round(this.framesOut/o);return this.framesIn=0,this.framesOut=0,this.lastDiagAt=i,{recvFps:e,decodeFps:t,codec:this.currentCodec}}pushVideoFrame(i){let o=this.detectFamily(i);if(!o)return;let e=i.vp9s?.frames||i.vp8s?.frames||i.av1s?.frames||i.h264s?.frames||i.h265s?.frames;if(!(!e||e.length===0))for(let t of e)this.handleFrame(o,t)}detectFamily(i){return i.vp9s?"vp9":i.vp8s?"vp8":i.av1s?"av1":i.h264s?"h264":i.h265s?"h265":""}codecStringFor(i,o){switch(i){case"vp9":return"vp09.00.50.08";case"vp8":return"vp8";case"av1":return"av01.0.04M.08";case"h264":return o?cr(o):null;case"h265":return"hvc1.1.6.L93.B0";default:return null}}handleFrame(i,o){if(!o.data||o.data.length===0)return;let e=o.data,t=!!o.key;if(this.framesIn++,i==="h264"&&!this.decoder){if(!t)return;let n=this.codecStringFor("h264",e);if(!n){console.warn("[rustdesk-web] H.264 keyframe missing SPS \u2014 dropping");return}this.configureDecoder(n)}else if(i!=="h264"&&(!this.decoder||this.currentCodec!==this.codecStringFor(i))){let n=this.codecStringFor(i);if(!n)return;this.configureDecoder(n)}this.decode(e,t,o.pts)}configureDecoder(i){if(this.decoder)try{this.decoder.close()}catch{}this.currentCodec=i,this.decoder=new VideoDecoder({output:o=>{this.framesOut++,this.onFrame(o)},error:o=>{console.error("[rustdesk-web] VideoDecoder error:",o)}}),this.decoder.configure({codec:i,optimizeForLatency:!0})}decode(i,o,e){if(!this.decoder)return;let t=typeof e=="number"?e:Number(e||0);try{let n=new EncodedVideoChunk({type:o?"key":"delta",timestamp:t*1e3,data:i});this.decoder.decode(n)}catch(n){console.error("[rustdesk-web] decode chunk failed:",n)}}close(){if(this.decoder){try{this.decoder.close()}catch{}this.decoder=null}}};var Gt=class{decoder=null;ctx=null;playhead=0;timestamp=0;muted=!1;gain=null;configure(i){if(typeof AudioDecoder>"u")throw new Error("WebCodecs AudioDecoder unavailable. Open via http://localhost or https:// \u2014 secure-context only.");let o=i.sample_rate||48e3,e=i.channels||2;this.decoder&&this.decoder.close(),this.ctx=new AudioContext({sampleRate:o,latencyHint:"interactive"}),this.gain=this.ctx.createGain(),this.gain.connect(this.ctx.destination),this.playhead=this.ctx.currentTime+.05,this.timestamp=0,this.decoder=new AudioDecoder({output:t=>this.onAudioData(t),error:t=>console.error("[rustdesk-web] AudioDecoder error:",t)}),this.decoder.configure({codec:"opus",sampleRate:o,numberOfChannels:e})}pushFrame(i){if(!(!this.decoder||i.length===0||this.muted))try{let o=new EncodedAudioChunk({type:"key",timestamp:this.timestamp,data:i});this.timestamp+=2e4,this.decoder.decode(o)}catch(o){console.error("[rustdesk-web] audio decode failed:",o)}}async resume(){this.ctx&&this.ctx.state==="suspended"&&await this.ctx.resume()}setMuted(i){this.muted=i,this.gain&&this.ctx&&this.gain.gain.setValueAtTime(i?0:1,this.ctx.currentTime)}isMuted(){return this.muted}close(){if(this.decoder){try{this.decoder.close()}catch{}this.decoder=null}if(this.ctx){try{this.ctx.close()}catch{}this.ctx=null}}onAudioData(i){if(!this.ctx||!this.gain){i.close();return}try{let o=i.numberOfChannels,e=i.numberOfFrames,t=i.sampleRate,n=this.ctx.createBuffer(o,e,t);if((i.format||"f32").endsWith("-planar"))for(let c=0;c<o;c++)i.copyTo(n.getChannelData(c),{planeIndex:c});else{let c=new Float32Array(o*e);i.copyTo(c,{planeIndex:0});for(let w=0;w<o;w++){let j=n.getChannelData(w);for(let C=0;C<e;C++)j[C]=c[C*o+w]}}let l=this.ctx.createBufferSource();l.buffer=n,l.connect(this.gain);let d=this.ctx.currentTime;this.playhead<d&&(this.playhead=d+.05),l.start(this.playhead),this.playhead+=e/t}catch(o){console.error("[rustdesk-web] audio render failed:",o)}finally{i.close()}}};var Xt=class{canvas;ctx;width=0;height=0;frameTimes=[];constructor(i){this.canvas=document.createElement("canvas"),this.canvas.className="rd-canvas",i.appendChild(this.canvas);let o=this.canvas.getContext("2d",{alpha:!1});if(!o)throw new Error("canvas: 2d context not available");this.ctx=o}draw(i){try{(i.codedWidth!==this.width||i.codedHeight!==this.height)&&(this.width=i.codedWidth,this.height=i.codedHeight,this.canvas.width=this.width,this.canvas.height=this.height),this.ctx.drawImage(i,0,0),this.tickFps()}catch(o){console.error("[rustdesk-web] canvas draw failed:",o)}finally{i.close()}}tickFps(){let i=performance.now();for(this.frameTimes.push(i);this.frameTimes.length>0&&i-this.frameTimes[0]>1e3;)this.frameTimes.shift()}fps(){return this.frameTimes.length}size(){return{width:this.width,height:this.height}}rect(){return this.canvas.getBoundingClientRect()}el(){return this.canvas}};var Xr=0,Qr=1,Zr=2,gr=3,eo=1,to=2,no=4,io=8,ro=16;function dr(p){switch(p){case 0:return eo;case 1:return no;case 2:return to;case 3:return io;case 4:return ro;default:return 0}}function ar(p,i,o){let e=p.el(),t=(C,K,V,ce)=>{let ke=[];ce.altKey&&ke.push(x.ControlKey.Alt),ce.ctrlKey&&ke.push(x.ControlKey.Control),ce.shiftKey&&ke.push(x.ControlKey.Shift),ce.metaKey&&ke.push(x.ControlKey.Meta),i.send(x.Message.create({mouse_event:x.MouseEvent.create({mask:C,x:Math.round(K),y:Math.round(V),modifiers:ke})})).catch(()=>{})},n=(C,K)=>{let V=p.size();if(!V.width||!V.height)return null;let ce=p.rect();if(ce.width<=0||ce.height<=0)return null;let ke=Math.min(ce.width/V.width,ce.height/V.height),Qe=V.width*ke,ze=V.height*ke,Me=ce.left+(ce.width-Qe)/2,Ke=ce.top+(ce.height-ze)/2,De=(C-Me)/ke,ve=(K-Ke)/ke;if(De<0||ve<0||De>V.width||ve>V.height)return null;let Oe=o();return{x:De+Oe.x,y:ve+Oe.y}},r=0,l=C=>{let K=n(C.clientX,C.clientY);if(!K)return;let V=r<<3|Xr;t(V,K.x,K.y,C)},d=C=>{let K=n(C.clientX,C.clientY);if(!K)return;let V=dr(C.button);if(!V)return;r|=V;let ce=V<<3|Qr;t(ce,K.x,K.y,C),e.focus({preventScroll:!0}),C.button===2&&C.preventDefault()},c=C=>{let K=n(C.clientX,C.clientY);if(!K)return;let V=dr(C.button);if(!V)return;r&=~V;let ce=V<<3|Zr;t(ce,K.x,K.y,C)},w=C=>{if(!n(C.clientX,C.clientY))return;let V=(ze,Me)=>Me===WheelEvent.DOM_DELTA_PIXEL?Math.max(-5,Math.min(5,Math.round(ze/16))):Math.max(-5,Math.min(5,Math.round(ze))),ce=V(C.deltaX,C.deltaMode),ke=V(-C.deltaY,C.deltaMode);if(ce===0&&ke===0)return;t(gr,ce,ke,C),C.preventDefault()},j=C=>{C.preventDefault()};return e.addEventListener("mousemove",l),e.addEventListener("mousedown",d),e.addEventListener("mouseup",c),e.addEventListener("wheel",w,{passive:!1}),e.addEventListener("contextmenu",j),()=>{e.removeEventListener("mousemove",l),e.removeEventListener("mousedown",d),e.removeEventListener("mouseup",c),e.removeEventListener("wheel",w),e.removeEventListener("contextmenu",j)}}var Rn="";async function Ln(p){if(p.format!==x.ClipboardFormat.Text||!p.content)return;let i=new TextDecoder().decode(p.content);if(i)try{await navigator.clipboard.writeText(i),Rn=i}catch{}}async function sr(p){let i=p.clipboards||[];for(let o of i)if(o.format===x.ClipboardFormat.Text){await Ln(o);return}}async function pr(p){let i="";try{i=await navigator.clipboard.readText()}catch{return}if(!i||i===Rn)return;let o=new TextEncoder().encode(i);await p.send(x.Message.create({clipboard:x.Clipboard.create({compress:!1,format:x.ClipboardFormat.Text,content:o})})).catch(()=>{})}function hr(p){let i=o=>{let e=o.clipboardData?.getData("text/plain");if(!e||e===Rn)return;let t=new TextEncoder().encode(e);p.send(x.Message.create({clipboard:x.Clipboard.create({compress:!1,format:x.ClipboardFormat.Text,content:t})})).catch(()=>{})};return window.addEventListener("paste",i),()=>window.removeEventListener("paste",i)}var oo={AltLeft:x.ControlKey.Alt,AltRight:x.ControlKey.RAlt,ControlLeft:x.ControlKey.Control,ControlRight:x.ControlKey.RControl,ShiftLeft:x.ControlKey.Shift,ShiftRight:x.ControlKey.RShift,MetaLeft:x.ControlKey.Meta,MetaRight:x.ControlKey.RWin,OSLeft:x.ControlKey.Meta,OSRight:x.ControlKey.RWin,CapsLock:x.ControlKey.CapsLock,Backspace:x.ControlKey.Backspace,Delete:x.ControlKey.Delete,Tab:x.ControlKey.Tab,Enter:x.ControlKey.Return,NumpadEnter:x.ControlKey.NumpadEnter,Escape:x.ControlKey.Escape,Space:x.ControlKey.Space,Insert:x.ControlKey.Insert,Home:x.ControlKey.Home,End:x.ControlKey.End,PageUp:x.ControlKey.PageUp,PageDown:x.ControlKey.PageDown,ArrowUp:x.ControlKey.UpArrow,ArrowDown:x.ControlKey.DownArrow,ArrowLeft:x.ControlKey.LeftArrow,ArrowRight:x.ControlKey.RightArrow,F1:x.ControlKey.F1,F2:x.ControlKey.F2,F3:x.ControlKey.F3,F4:x.ControlKey.F4,F5:x.ControlKey.F5,F6:x.ControlKey.F6,F7:x.ControlKey.F7,F8:x.ControlKey.F8,F9:x.ControlKey.F9,F10:x.ControlKey.F10,F11:x.ControlKey.F11,F12:x.ControlKey.F12,PrintScreen:x.ControlKey.Snapshot,ScrollLock:x.ControlKey.Scroll,Pause:x.ControlKey.Pause,NumLock:x.ControlKey.NumLock,ContextMenu:x.ControlKey.Apps,Numpad0:x.ControlKey.Numpad0,Numpad1:x.ControlKey.Numpad1,Numpad2:x.ControlKey.Numpad2,Numpad3:x.ControlKey.Numpad3,Numpad4:x.ControlKey.Numpad4,Numpad5:x.ControlKey.Numpad5,Numpad6:x.ControlKey.Numpad6,Numpad7:x.ControlKey.Numpad7,Numpad8:x.ControlKey.Numpad8,Numpad9:x.ControlKey.Numpad9,NumpadAdd:x.ControlKey.Add,NumpadSubtract:x.ControlKey.Subtract,NumpadMultiply:x.ControlKey.Multiply,NumpadDivide:x.ControlKey.Divide,NumpadDecimal:x.ControlKey.Decimal,NumpadEqual:x.ControlKey.Equals};function uo(p){let i=[];return p.altKey&&i.push(x.ControlKey.Alt),p.ctrlKey&&i.push(x.ControlKey.Control),p.shiftKey&&i.push(x.ControlKey.Shift),p.metaKey&&i.push(x.ControlKey.Meta),i}function br(p,i){let o=(n,r)=>{let l=n.target;if(l&&(l.tagName==="INPUT"||l.tagName==="TEXTAREA"||l.isContentEditable))return;let d=oo[n.code],c=n.ctrlKey||n.altKey||n.metaKey,w;if(d!==void 0)w={control_key:d,down:r};else if(n.key.length===1){let C=n.key.codePointAt(0);if(c)w={chr:C,down:r};else{if(!r)return;w={unicode:C,down:!0}}}else return;w.modifiers=uo(n),w.mode=x.KeyboardMode.Legacy,r&&c&&n.code==="KeyV"&&pr(i).catch(()=>{}),i.send(x.Message.create({key_event:x.KeyEvent.create(w)})).catch(()=>{}),(n.metaKey||n.ctrlKey)&&["KeyT","KeyN","KeyW","KeyR","Tab"].includes(n.code)||n.preventDefault()},e=n=>o(n,!0),t=n=>o(n,!1);return window.addEventListener("keydown",e),window.addEventListener("keyup",t),()=>{window.removeEventListener("keydown",e),window.removeEventListener("keyup",t)}}function yr(p){p.send(x.Message.create({key_event:x.KeyEvent.create({control_key:x.ControlKey.CtrlAltDel,down:!0,mode:x.KeyboardMode.Legacy})})).catch(()=>{})}var _r="1.4.0";function lo(){let p=document.getElementById("custom-config");if(!p)throw new Error("missing <script id='custom-config'> tag");let i=(p.textContent||"").trim();if(!i)throw new Error("empty custom-config payload");return JSON.parse(i)}function Rt(p){let i=document.getElementById("root");i&&(i.innerHTML=`<div class="placeholder">${p}</div>`)}function $e(p){return p.replace(/[&<>"']/g,i=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[i])}function fo(p){return new TextEncoder().encode(p)}function co(p,i){return new Promise(o=>{let e=document.getElementById("root");if(!e){o("");return}let t=i?`<p class="error-inline">${$e(i)}</p>`:"";e.innerHTML=`
<div class="placeholder">
<h1>Connect to <code>${$e(p.peer_id)}</code></h1>
<p class="muted">The host requires a password to connect.</p>
${t}
<form id="pw-form" class="pw-form">
<input id="pw-input" type="password" autocomplete="current-password" placeholder="Password" />
<button type="submit">Connect</button>
</form>
</div>`;let n=document.getElementById("pw-form"),r=document.getElementById("pw-input");r?.focus(),n?.addEventListener("submit",l=>{l.preventDefault(),o(r?.value||"")})})}function ao(p,i){Rt(`
<h1>Waiting for approval</h1>
<p>The user on <code>${$e(p.peer_id)}</code> is being asked to allow this connection.</p>
<p class="muted">This window will continue automatically once they accept.</p>
<form class="pw-form" id="cancel-form">
<button type="submit">Cancel</button>
</form>
<hr class="pw-divider" />
<p class="muted">Or connect with the unattended password:</p>
<form class="pw-form" id="override-form">
<input id="override-input" type="password" autocomplete="current-password" placeholder="Password" />
<button type="submit">Connect</button>
</form>
`),document.getElementById("cancel-form")?.addEventListener("submit",n=>{n.preventDefault(),window.location.reload()});let e=document.getElementById("override-form"),t=document.getElementById("override-input");e?.addEventListener("submit",n=>{n.preventDefault();let r=t?.value||"";r&&i.onUsePassword(r)})}function so(p,i){return new Promise(o=>{let e=i&&i!=="Closed manually by the peer"?`<p class="error-inline">${$e(i)}</p>`:"";Rt(`
<h1>Connection declined</h1>
<p>The user on <code>${$e(p.peer_id)}</code> did not accept the connection request.</p>
${e}
<form class="pw-form" id="retry-form">
<button type="submit">Try again</button>
</form>
`),document.getElementById("retry-form")?.addEventListener("submit",n=>{n.preventDefault(),o()})})}async function po(){let p=lo();if(await Zn,!p.key)throw new Error("custom-config.key empty (id_ed25519.pub missing)");let i=oi(p.key);if(i.length!==32)throw new Error(`server pk wrong length ${i.length}`);let o="",e,t=null;for(;;){e!==void 0&&(o=await co(p,e));try{let n=await Or(p,i,o,!0,r=>ao(p,{onUsePassword:l=>{t=l,r()}}));await bo(p,i,o,n);return}catch(n){if(t!==null){o=t,t=null,e=void 0;continue}if(n instanceof _t){await so(p,n.message),o="",e=void 0;continue}let r=String(n);if(r.includes("Wrong Password")){e="Wrong password \u2014 try again.";continue}if(r.includes("Empty Password")){e="This host requires a password.";continue}console.error("[rustdesk-web] fatal:",n),Rt(`<div class="error"><h1>Connection failed</h1><pre>${$e(r)}</pre></div>`);return}}}async function Or(p,i,o,e,t){let n=K=>{e&&Rt(K)};n(`<h1>Connecting to ${$e(p.peer_id)}\u2026</h1><p class="muted">1/3: rendezvous</p>`);let r=ur(p.rendezvous_server),l=await rr(r,p.peer_id,p.key,_r);if(l.signedIdPk.length===0)throw new Error("Server didn't sign the peer key \u2014 update the host's RustDesk to 1.4+.");let d,c;try{let K=Ut(l.signedIdPk,i),V=x.IdPk.decode(K);c=V.id||"",d=V.pk||new Uint8Array(0)}catch(K){throw new Error(`Signature verify failed \u2014 server pk on file (${p.key}) does not match what hbbs signed with. (${K})`)}if(c!==p.peer_id)throw new Error(`Peer ID mismatch (signed=${c}, requested=${p.peer_id})`);if(!l.relayServer)throw new Error("No relay server. Browser cannot do direct connect; set --relay-servers <host> on hbbs.");let w=l.peerUuid||or();l.peerUuid||console.warn("[rustdesk-web] no peer uuid in RelayResponse \u2014 fallback (relay pairing will likely fail)"),n(`<h1>Connecting to ${$e(p.peer_id)}\u2026</h1><p class="muted">2/3: relay handshake</p>`);let j=lr(l.relayServer),C=await Vt.connect({wsUrl:j,peerId:p.peer_id,uuid:w,licenceKey:p.key});n(`<h1>Connecting to ${$e(p.peer_id)}\u2026</h1><p class="muted">3/3: secure handshake + login</p>`);try{let K=await Yt.open({relay:C,peerId:p.peer_id,peerSignPk:d,myName:p.admin_name||"web-admin",password:fo(o),clientVersion:_r,sessionId:Math.floor(Math.random()*Number.MAX_SAFE_INTEGER),onAwaitingApproval:t});return window.__rdw={relay:C,session:K.session,peerInfo:K.peerInfo,cfg:p},K}catch(K){throw C.close(),K}}var ho=p=>new Promise(i=>setTimeout(i,p));async function bo(p,i,o,e){let t=document.getElementById("root");if(!t)return;t.innerHTML='<div class="session" id="session"></div><div class="hud" id="hud">connecting\u2026</div>';let n=document.getElementById("session"),r=document.getElementById("hud"),l=new Xt(n),d=new Wt(re=>l.draw(re)),c=new Gt,w=e.session,j=e.peerInfo,C=e.preloginExtras,K=j.displays||[],V=j.current_display||0;(V<0||V>=K.length)&&(V=0);let ce=()=>{let re=K[V];return{x:re?.x||0,y:re?.y||0}},ke=null,Qe=null,ze=ar(l,De(),ce),Me=br(l,De()),Ke=hr(De());function De(){return new Proxy({},{get(re,ye){let we=w[ye];return typeof we=="function"?we.bind(w):we}})}l.el().focus(),r.textContent="";let ve=document.createElement("span");ve.className="hud-fps",r.appendChild(ve);let Oe=document.createElement("button");Oe.className="hud-btn",Oe.textContent="\u{1F507} Mute",Oe.addEventListener("click",()=>{let re=!c.isMuted();c.setMuted(re),Oe.textContent=re?"\u{1F508} Unmute":"\u{1F507} Mute",w.send(x.Message.create({misc:x.Misc.create({option:x.OptionMessage.create({disable_audio:re?x.OptionMessage.BoolOption.Yes:x.OptionMessage.BoolOption.No})})})).catch(()=>{}),c.resume().catch(()=>{})}),r.appendChild(Oe);let tt=document.createElement("select");tt.className="hud-select",tt.title="Image quality";for(let[re,ye]of[["Balanced",x.ImageQuality.Balanced],["Best",x.ImageQuality.Best],["Low",x.ImageQuality.Low]]){let g=document.createElement("option");g.value=String(ye),g.textContent=re,tt.appendChild(g)}tt.addEventListener("change",()=>{let re=parseInt(tt.value,10);ke=re,w.send(x.Message.create({misc:x.Misc.create({option:x.OptionMessage.create({image_quality:re})})})).catch(()=>{}),l.el().focus()}),r.appendChild(tt);let Ze=document.createElement("select");Ze.className="hud-select",Ze.title="Target FPS";for(let re of[15,30,60]){let ye=document.createElement("option");ye.value=String(re),ye.textContent=`${re} fps`,re===30&&(ye.selected=!0),Ze.appendChild(ye)}if(Ze.addEventListener("change",()=>{let re=parseInt(Ze.value,10);Qe=re,w.send(x.Message.create({misc:x.Misc.create({option:x.OptionMessage.create({custom_fps:re})})})).catch(()=>{}),l.el().focus()}),r.appendChild(Ze),K.length>1){let re=document.createElement("select");re.className="hud-select",K.forEach((ye,g)=>{let we=document.createElement("option");we.value=String(g),we.textContent=`Display ${g+1} \xB7 ${ye.width}\xD7${ye.height}`,g===V&&(we.selected=!0),re.appendChild(we)}),re.addEventListener("change",()=>{let ye=parseInt(re.value,10);w.send(x.Message.create({misc:x.Misc.create({switch_display:x.SwitchDisplay.create({display:ye})})})).catch(()=>{}),w.send(x.Message.create({misc:x.Misc.create({capture_displays:x.CaptureDisplays.create({set:[ye]})})})).catch(()=>{}),V=ye,l.el().focus()}),r.appendChild(re)}let nt=document.createElement("button");nt.textContent="Ctrl+Alt+Del",nt.className="hud-btn",nt.addEventListener("click",()=>{yr(w),l.el().focus()}),r.appendChild(nt),setInterval(()=>{let re=l.size(),ye=re.width?`${re.width}\xD7${re.height}`:"\u2014",g=d.diagStats();ve.textContent=` ${$e(j.hostname||p.peer_id)} \xB7 ${ye} \xB7 recv ${g.recvFps} / dec ${g.decodeFps} / draw ${l.fps()} fps \xB7 ${g.codec||"\u2014"} `},1e3);let ge=document.createElement("div");ge.className="reconnect-overlay",ge.style.display="none",n.appendChild(ge);let it=re=>{ge.textContent=re,ge.style.display="flex"},Ot=()=>{ge.style.display="none"},Ie=0,Ae=10;for(;;){for(let g of C)if(g.misc?.audio_format)try{c.configure(g.misc.audio_format),c.isMuted()&&c.setMuted(!0)}catch(we){console.warn("[rustdesk-web] audio init failed:",we)}C=[],Ie>0&&(c.isMuted()&&w.send(x.Message.create({misc:x.Misc.create({option:x.OptionMessage.create({disable_audio:x.OptionMessage.BoolOption.Yes})})})).catch(()=>{}),ke!=null&&w.send(x.Message.create({misc:x.Misc.create({option:x.OptionMessage.create({image_quality:ke})})})).catch(()=>{}),Qe!=null&&w.send(x.Message.create({misc:x.Misc.create({option:x.OptionMessage.create({custom_fps:Qe})})})).catch(()=>{}),V>0&&(w.send(x.Message.create({misc:x.Misc.create({switch_display:x.SwitchDisplay.create({display:V})})})).catch(()=>{}),w.send(x.Message.create({misc:x.Misc.create({capture_displays:x.CaptureDisplays.create({set:[V]})})})).catch(()=>{})));let re="";try{for(;;){let g=await w.recv();if(g.video_frame){d.pushVideoFrame(g.video_frame);continue}if(g.test_delay){let we=g.test_delay;w.send(x.Message.create({test_delay:x.TestDelay.create({time:we.time,from_client:!0,last_delay:we.last_delay,target_bitrate:we.target_bitrate})})).catch(()=>{});continue}if(g.audio_frame){let we=g.audio_frame.data||new Uint8Array(0);c.pushFrame(we);continue}if(!(g.cursor_data||g.cursor_position||g.cursor_id!=null)){if(g.clipboard){Ln(g.clipboard).catch(()=>{});continue}if(g.multi_clipboards){sr(g.multi_clipboards).catch(()=>{});continue}if(g.misc){if(g.misc.audio_format)try{c.configure(g.misc.audio_format),c.isMuted()&&c.setMuted(!0)}catch(we){console.warn("[rustdesk-web] audio init failed:",we)}continue}}}}catch(g){re=String(g),console.warn("[rustdesk-web] session disconnected:",re)}d.close();let ye=null;for(Ie=1;Ie<=Ae;Ie++){it(`Reconnecting (${Ie}/${Ae})\u2026`);try{ye=await Or(p,i,o,!1,()=>it(`Reconnecting \u2014 waiting for the user on ${p.peer_id} to accept\u2026`));break}catch(g){if(g instanceof _t){it("Disconnected. The host declined the reconnect request."),c.close();return}let we=String(g);if(we.includes("Wrong Password")||we.includes("Empty Password")||we.toLowerCase().includes("signature verify")){it(`Cannot reconnect: ${we.slice(0,100)}`),c.close();return}if(Ie===Ae)break;let wt=Math.min(1e3*2**(Ie-1),3e4);it(`Reconnecting (${Ie}/${Ae})\u2026 retry in ${Math.round(wt/1e3)}s`),await ho(wt)}}if(!ye){it(`Disconnected. ${$e(re).slice(0,120)}`),c.close();return}w=ye.session,j=ye.peerInfo,C=ye.preloginExtras,K=j.displays||[],V>=K.length&&(V=0),Ot(),l.el().focus()}}po().catch(p=>{console.error("[rustdesk-web] boot failed:",p),Rt(`<div class="error"><h1>Failed to start</h1><pre>${$e(String(p))}</pre></div>`)});