/
protobuf.min.js
9 lines (9 loc) · 58.4 KB
/
protobuf.min.js
1
2
3
4
5
6
7
8
9
/*!
* protobuf.js v6.1.0 (c) 2016 Daniel Wirtz
* Compiled Sat, 10 Dec 2016 12:42:57 UTC
* Licensed under the Apache License, Version 2.0
* see: https://github.com/dcodeIO/protobuf.js for details
*/
!function e(t,r,i){function n(o,u){if(!r[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(s)return s(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=r[o]={exports:{}};t[o][0].call(l.exports,function(e){var r=t[o][1][e];return n(r?r:e)},l,l.exports,e,t,r,i)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o<i.length;o++)n(i[o]);return n}({1:[function(e,t,r){r.read=function(e,t,r,i,n){var s,o,u=8*n-i-1,a=(1<<u)-1,f=a>>1,l=-7,h=r?0:n-1,c=r?1:-1,d=e[t+h];for(h+=c,s=d&(1<<-l)-1,d>>=-l,l+=u;l>0;s=256*s+e[t+h],h+=c,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=i;l>0;o=256*o+e[t+h],h+=c,l-=8);if(0===s)s=1-f;else{if(s===a)return o?NaN:(d?-1:1)*(1/0);o+=Math.pow(2,i),s-=f}return(d?-1:1)*o*Math.pow(2,s-i)},r.write=function(e,t,r,i,n,s){var o,u,a,f=8*s-n-1,l=(1<<f)-1,h=l>>1,c=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?s-1:0,p=i?-1:1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-o))<1&&(o--,a*=2),t+=o+h>=1?c/a:c*Math.pow(2,1-h),t*a>=2&&(o++,a/=2),o+h>=l?(u=0,o=l):o+h>=1?(u=(t*a-1)*Math.pow(2,n),o+=h):(u=t*Math.pow(2,h-1)*Math.pow(2,n),o=0));n>=8;e[r+d]=255&u,d+=p,u/=256,n-=8);for(o=o<<n|u,f+=n;f>0;e[r+d]=255&o,d+=p,o/=256,f-=8);e[r+d-p]|=128*v}},{}],2:[function(e,t,r){"use strict";function i(e){return i.create(e)}t.exports=i;var n=e(11),s=e(23),o=e(25),u=o.a;i.create=function(e,t){if(!(e instanceof s))throw u("type","a Type");var r=t;if(r){if("function"!=typeof r)throw u("ctor","a function")}else r=function(e){return function(t){e.call(this,t)}}(n);r.constructor=i;var a=r.prototype=new n;return a.constructor=r,o.merge(r,n,!0),r.$type=e,a.$type=e,e.getFieldsArray().forEach(function(e){e.resolve(),a[e.name]=Array.isArray(e.defaultValue)?o.emptyArray:o.isObject(e.defaultValue)?o.emptyObject:e.defaultValue}),e.getOneofsArray().forEach(function(e){o.prop(a,e.resolve().name,{get:function(){for(var t=Object.keys(this),r=t.length-1;r>-1;--r)if(e.oneof.indexOf(t[r])>-1)return t[r]},set:function(t){for(var r=e.oneof,i=0;i<r.length;++i)r[i]!==t&&delete this[r[i]]}})}),e.setCtor(r),a},i.prototype=n},{11:11,23:23,25:25}],3:[function(e,t,r){"use strict";function i(){function e(){var t=n.sprintf.apply(null,arguments),r=c;if(h.length){var i=h[h.length-1];s.test(i)?r=++c:a.test(i)&&++r,u.test(i)&&!u.test(t)?(r=++c,d=!0):d&&f.test(i)&&(r=--c,d=!1),o.test(t)&&(r=--c)}for(var l=0;l<r;++l)t="\t"+t;return h.push(t),e}function t(e){return"function "+(e?e.replace(/[^\w_$]/g,"_"):"")+"("+l.join(", ")+") {\n"+h.join("\n")+"\n}"}function r(t,r){"object"==typeof t&&(r=t,t=void 0);var n=e.str(t);i.verbose&&console.log("--- codegen ---\n"+n.replace(/^/gm,"> ").replace(/\t/g," "));var s=Object.keys(r||(r={}));return Function.apply(null,s.concat("return "+n)).apply(null,s.map(function(e){return r[e]}))}var l=Array.prototype.slice.call(arguments),h=['\t"use strict"'],c=1,d=!1;return e.str=t,e.eof=r,e}t.exports=i;var n=e(25),s=/[{[]$/,o=/^[}\]]/,u=/:$/,a=/^\s*(?:if|else if|while|for)\b|\b(?:else)\s*$/,f=/\b(?:break|continue);?$|^\s*return\b/;i.supported=!1;try{i.supported=1===i("a","b")("return a-b").eof()(2,1)}catch(e){}i.verbose=!1,i.encode=e(5),i.decode=e(4),i.verify=e(6)},{25:25,4:4,5:5,6:6}],4:[function(e,t,r){"use strict";var i=r,n=e(8),s=e(17),o=e(24),u=e(25),a=e(3);i.fallback=function(e,t){for(var r=this.getFieldsById(),i=e instanceof s?e:s.create(e),a=void 0===t?i.len:i.pos+t,f=new(this.getCtor());i.pos<a;){var l=i.tag(),h=r[l.id].resolve(),c=h.resolvedType instanceof n?"uint32":h.type;if(h)if(h.map){var d=h.resolvedKeyType?"uint32":h.keyType,t=i.uint32(),p=f[h.name]={};if(t){t+=i.pos;for(var v=[],y=[];i.pos<t;)1===i.tag().id?v[v.length]=i[d]():void 0!==o.basic[c]?y[y.length]=i[c]():y[y.length]=h.resolvedType.decode(i,i.uint32());for(var g=0;g<v.length;++g)p["object"==typeof v[g]?u.longToHash(v[g]):v[g]]=y[g]}}else if(h.repeated){var m=f[h.name]&&f[h.name].length?f[h.name]:f[h.name]=[];if(h.packed&&void 0!==o.packed[c]&&2===l.wireType)for(var b=i.uint32()+i.pos;i.pos<b;)m[m.length]=i[c]();else void 0!==o.basic[c]?m[m.length]=i[c]():m[m.length]=h.resolvedType.decode(i,i.uint32())}else void 0!==o.basic[c]?f[h.name]=i[c]():f[h.name]=h.resolvedType.decode(i,i.uint32());else i.skipType(l.wireType)}return f},i.generate=function(e){for(var t=e.getFieldsArray(),r=a("r","l")("r instanceof Reader||(r=Reader.create(r))")("var c=l===undefined?r.len:r.pos+l,m=new(this.getCtor())")("while(r.pos<c){")("var t=r.tag()")("switch(t.id){"),i=0;i<t.length;++i){var s=t[i].resolve(),f=s.resolvedType instanceof n?"uint32":s.type,l=u.safeProp(s.name);if(r("case %d:",s.id),s.map){var h=s.resolvedKeyType?"uint32":s.keyType;r("var n=r.uint32(),o={}")("if(n){")("n+=r.pos")("var k=[],v=[]")("while(r.pos<n){")("if(r.tag().id===1)")("k[k.length]=r.%s()",h),void 0!==o.basic[f]?r("else")("v[v.length]=r.%s()",f):r("else")("v[v.length]=types[%d].decode(r,r.uint32())",i,i),r("}")("for(var i=0;i<k.length;++i)")("o[typeof(k[i])==='object'?util.longToHash(k[i]):k[i]]=v[i]")("}")("m%s=o",l)}else s.repeated?(r("m%s&&m%s.length?m%s:m%s=[]",l,l,l,l),s.packed&&void 0!==o.packed[f]&&r("if(t.wireType===2){")("var e=r.uint32()+r.pos")("while(r.pos<e)")("m%s[m%s.length]=r.%s()",l,l,f)("}else"),void 0!==o.basic[f]?r("m%s[m%s.length]=r.%s()",l,l,f):r("m%s[m%s.length]=types[%d].decode(r,r.uint32())",l,l,i,i)):void 0!==o.basic[f]?r("m%s=r.%s()",l,f):r("m%s=types[%d].decode(r,r.uint32())",l,i,i);r("break")}return r("default:")("r.skipType(t.wireType)")("break")("}")("}")("return m")}},{17:17,24:24,25:25,3:3,8:8}],5:[function(e,t,r){"use strict";var i=r,n=e(8),s=e(30),o=e(24),u=e(25),a=e(3);i.fallback=function(e,t){t||(t=s.create());for(var r=this.getFieldsArray(),i=0;i<r.length;){var a=r[i++].resolve(),f=a.resolvedType instanceof n?"uint32":a.type,l=o.basic[f];if(a.map){var h,c,d=a.resolvedKeyType?"uint32":a.keyType;if((h=e[a.name])&&(c=Object.keys(h)).length){t.fork();for(var p=0;p<c.length;++p)t.tag(1,o.mapKey[d])[d](c[p]),void 0!==l?t.tag(2,l)[f](h[c[p]]):a.resolvedType.encode(h[c[p]],t.tag(2,2).fork()).ldelim();t.ldelim(a.id)}}else if(a.repeated){var v=e[a.name];if(v&&v.length)if(a.packed&&void 0!==o.packed[f]){t.fork();for(var p=0;p<v.length;)t[f](v[p++]);t.ldelim(a.id)}else{var p=0;if(void 0!==l)for(;p<v.length;)t.tag(a.id,l)[f](v[p++]);else for(;p<v.length;)a.resolvedType.encode(v[p++],t.tag(a.id,2).fork()).ldelim()}}else{var h=e[a.name];(a.required||void 0!==h&&a.long?u.longNeq(h,a.defaultValue):h!==a.defaultValue)&&(void 0!==l?t.tag(a.id,l)[f](h):(a.resolvedType.encode(h,t.fork()),t.len||a.required?t.ldelim(a.id):t.reset()))}}return t},i.generate=function(e){for(var t=e.getFieldsArray(),r=a("m","w")("w||(w=Writer.create())"),i=0;i<t.length;++i){var s=t[i].resolve(),f=s.resolvedType instanceof n?"uint32":s.type,l=o.basic[f],h=u.safeProp(s.name);if(s.map){var c=s.resolvedKeyType?"uint32":s.keyType,d=o.mapKey[c];r("if(m%s){",h)("w.fork()")("for(var i=0,ks=Object.keys(m%s);i<ks.length;++i){",h)("w.tag(1,%d).%s(ks[i])",d,c),void 0!==l?r("w.tag(2,%d).%s(m%s[ks[i]])",l,f,h):r("types[%d].encode(m%s[ks[i]],w.tag(2,2).fork()).ldelim()",i,h),r("}")("w.len&&w.ldelim(%d)||w.reset()",s.id)("}")}else s.repeated?s.packed&&void 0!==o.packed[f]?r("if(m%s&&m%s.length){",h,h)("w.fork()")("for(var i=0;i<m%s.length;++i)",h)("w.%s(m%s[i])",f,h)("w.ldelim(%d)",s.id)("}"):(r("if(m%s)",h)("for(var i=0;i<m%s.length;++i)",h),void 0!==l?r("w.tag(%d,%d).%s(m%s[i])",s.id,l,f,h):r("types[%d].encode(m%s[i],w.tag(%d,2).fork()).ldelim()",i,h,s.id)):(s.required||(s.long?r("if(m%s!==undefined&&util.longNeq(m%s,%j))",h,h,s.defaultValue):r("if(m%s!==undefined&&m%s!==%j)",h,h,s.defaultValue)),void 0!==l?r("w.tag(%d,%d).%s(m%s)",s.id,l,f,h):s.required?r("types[%d].encode(m%s,w.tag(%d,2).fork()).ldelim()",i,h,s.id):r("types[%d].encode(m%s,w.fork()).len&&w.ldelim(%d)||w.reset()",i,h,s.id))}return r("return w")}},{24:24,25:25,3:3,30:30,8:8}],6:[function(e,t,r){"use strict";function i(e,t){return"invalid value for field "+e.getFullName()+" ("+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected)"}function n(e,t){switch(e.type){case"double":case"float":if("number"!=typeof t)return i(e,"number");break;case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":if(!d(t))return i(e,"integer");break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":if(!(d(t)||t&&d(t.low)&&d(t.high)))return i(e,"integer|Long");break;case"bool":if("boolean"!=typeof t)return i(e,"boolean");break;case"string":if(!h.isString(t))return i(e,"string");break;case"bytes":if(!(t&&"number"==typeof t.length||h.isString(t)))return i(e,"buffer");break;default:if(e.resolvedType instanceof f){if("number"!=typeof e.resolvedType.getValuesById()[t])return i(e,"enum value")}else if(e.resolvedType instanceof l){var r=e.resolvedType.verify(t);if(r)return r}}return null}function s(e,t){switch(e.keyType){case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":if(/^[\x00-\xff]{8}$/.test(t))return null;case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":if(/^-?(?:0|[1-9]\d*)$/.test(t))return i(e,"integer key");break;case"bool":if(/^true|false|0|1$/.test(t))return i(e,"boolean key")}return null}function o(e,t,r,n){switch(t.type){case"double":case"float":e("if(typeof %s!=='number')",n)("return%j",i(t,"number"));break;case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",n)("return%j",i(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!(util.isInteger(%s)||%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",n,n,n,n)("return%j",i(t,"integer|Long"));break;case"bool":e("if(typeof %s!=='boolean')",n)("return%j",i(t,"boolean"));break;case"string":e("if(!util.isString(%s))",n)("return%j",i(t,"string"));break;case"bytes":e("if(!(%s&&typeof %s.length==='number'||util.isString(%s))",n,n,n)("return%j",i(t,"buffer"));break;default:if(t.resolvedType instanceof f){e("switch(%s){",n)("default:")("return%j",i(t,"enum value"));for(var s=h.toArray(t.resolvedType.values),o=0;o<s.length;++o)e("case %d:",s[o]);e("break")("}")}else t.resolvedType instanceof l&&e("var r;")("if(r=types[%d].verify(%s))",r,n)("return r")}}function u(e,t,r){switch(t.keyType){case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9]\\d*))$/.test(%s))",r)("return%j",i(t,"integer|Long key"));break;case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":r("return%j",i(t,"integer key"));break;case"bool":r("return%j",i(t,"boolean key"))}}var a=r,f=e(8),l=e(23),h=e(25),c=e(3),d=h.isInteger;a.fallback=function(e){for(var t,r=this.getFieldsArray(),o=0;o<r.length;){var u=r[o++].resolve(),a=e[u.name];if(u.map){if(void 0!==a){if(!h.isObject(a))return i(u,"object");for(var f=Object.keys(a),l=0;l<f.length;++l){if(t=s(u,f[l]))return t;if(t=n(u,a[f[l]]))return t}}}else if(u.repeated){if(void 0!==a){if(!Array.isArray(a))return i(u,"array");for(var l=0;l<a.length;++l)if(t=n(u,a[l]))return t}}else if((u.required||void 0!==a)&&(t=n(u,a)))return t}return null},a.generate=function(e){for(var t=e.getFieldsArray(),r=c("m"),n=0;n<t.length;++n){var s=t[n].resolve(),a=h.safeProp(s.name);s.map?(r("if(m%s!==undefined){",a)("if(!util.isObject(m%s))",a)("return%j",i(s,"object"))("var k=Object.keys(m%s)",a)("for(var i=0;i<k.length;++i){"),u(r,s,"k[i]"),o(r,s,n,"m"+a+"[k[i]]"),r("}")("}")):s.repeated?(r("if(m%s!==undefined){",a)("if(!Array.isArray(m%s))",a)("return%j",i(s,"array"))("for(var i=0;i<m%s.length;++i){",a),o(r,s,n,"m"+a+"[i]"),r("}")("}")):(s.required||r("if(m%s!==undefined){",a),o(r,s,n,"m"+a),s.required||r("}"))}return r("return null")}},{23:23,25:25,3:3,8:8}],7:[function(e,t,r){"use strict";function i(e,t){/\/|\./.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),i[e]=t}t.exports=i,i("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var n;i("duration",{Duration:n={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),i("timestamp",{Timestamp:n}),i("empty",{Empty:{fields:{}}}),i("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}})},{}],8:[function(e,t,r){"use strict";function i(e,t,r){s.call(this,e,r),this.values=t||{},this.b=null}function n(e){return e.b=null,e}t.exports=i;var s=e(14),o=s.extend(i),u=e(25),a=u.a;u.props(o,{valuesById:{get:function(){return this.b||(this.b={},Object.keys(this.values).forEach(function(e){var t=this.values[e];if(this.b[t])throw Error("duplicate id "+t+" in "+this);this.b[t]=e},this)),this.b}}}),i.testJSON=function(e){return Boolean(e&&e.values)},i.fromJSON=function(e,t){return new i(e,t.values,t.options)},o.toJSON=function(){return{options:this.options,values:this.values}},o.add=function(e,t){if(!u.isString(e))throw a("name");if(!u.isInteger(t)||t<0)throw a("id","a non-negative integer");if(void 0!==this.values[e])throw Error('duplicate name "'+e+'" in '+this);if(void 0!==this.getValuesById()[t])throw Error("duplicate id "+t+" in "+this);return this.values[e]=t,n(this)},o.remove=function(e){if(!u.isString(e))throw a("name");if(void 0===this.values[e])throw Error('"'+e+'" is not a name of '+this);return delete this.values[e],n(this)}},{14:14,25:25}],9:[function(e,t,r){"use strict";function i(e,t,r,i,s,o){if(l.isObject(i)?(o=i,i=s=void 0):l.isObject(s)&&(o=s,s=void 0),n.call(this,e,o),!l.isInteger(t)||t<0)throw h("id","a non-negative integer");if(!l.isString(r))throw h("type");if(void 0!==s&&!l.isString(s))throw h("extend");if(void 0!==i&&!/^required|optional|repeated$/.test(i=i.toString().toLowerCase()))throw h("rule","a valid rule string");this.rule=i&&"optional"!==i?i:void 0,this.type=r,this.id=t,this.extend=s||void 0,this.required="required"===i,this.optional=!this.required,this.repeated="repeated"===i,this.map=!1,this.message=null,this.partOf=null,this.defaultValue=null,this.long=!!l.Long&&void 0!==f.long[r],this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.c=null}t.exports=i;var n=e(14),s=n.extend(i),o=e(23),u=e(8),a=e(10),f=e(24),l=e(25),h=l.a;l.props(s,{packed:{get:s.isPacked=function(){return null===this.c&&(this.c=this.getOption("packed")!==!1),this.c}}}),s.setOption=function(e,t,r){return"packed"===e&&(this.c=null),n.prototype.setOption.call(this,e,t,r)},i.testJSON=function(e){return Boolean(e&&void 0!==e.id)},i.fromJSON=function(e,t){return void 0!==t.keyType?a.fromJSON(e,t):new i(e,t.id,t.type,t.rule,t.extend,t.options)},s.toJSON=function(){return{rule:"optional"!==this.rule&&this.rule||void 0,type:this.type,id:this.id,extend:this.extend,options:this.options}},s.resolve=function(){if(this.resolved)return this;var e=f.defaults[this.type];if(void 0===e){var t=this.parent.lookup(this.type);if(t instanceof o)this.resolvedType=t,e=null;else{if(!(t instanceof u))throw Error("unresolvable field type: "+this.type);this.resolvedType=t,e=0}}var r;return this.map?this.defaultValue={}:this.repeated?this.defaultValue=[]:this.options&&void 0!==(r=this.options.default)?this.defaultValue=r:this.defaultValue=e,this.long&&(this.defaultValue=l.Long.fromValue(this.defaultValue)),n.prototype.resolve.call(this)},s.jsonConvert=function(e,t){if(t){if(this.resolvedType instanceof u&&t.enum===String)return this.resolvedType.getValuesById()[e];if(this.long&&t.long)return t.long===Number?"number"==typeof e?e:l.Long.fromValue(e).toNumber():l.Long.fromValue(e,"u"===this.type.charAt(0)).toString()}return e}},{10:10,14:14,23:23,24:24,25:25,8:8}],10:[function(e,t,r){"use strict";function i(e,t,r,i,s){if(n.call(this,e,t,i,s),!f.isString(r))throw f.a("keyType");this.keyType=r,this.resolvedKeyType=null,this.map=!0}t.exports=i;var n=e(9),s=n.prototype,o=n.extend(i),u=e(8),a=e(24),f=e(25);i.testJSON=function(e){return n.testJSON(e)&&void 0!==e.keyType},i.fromJSON=function(e,t){return new i(e,t.id,t.keyType,t.type,t.options)},o.toJSON=function(){return{keyType:this.keyType,type:this.type,id:this.id,extend:this.extend,options:this.options}},o.resolve=function(){if(this.resolved)return this;var e=a.mapKey[this.keyType];if(void 0===e){var t=this.parent.lookup(this.keyType);if(!(t instanceof u))throw Error("unresolvable map key type: "+this.keyType);this.resolvedKeyType=t}return s.resolve.call(this)}},{24:24,25:25,8:8,9:9}],11:[function(e,t,r){"use strict";function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}t.exports=i;var n=i.prototype;n.asJSON=function(e){e||(e={});var t,r=this.$type.fields,i={};if(e.defaults){t=[];for(var n in this)t.push(n)}else t=Object.keys(this);for(var s,o=0;o<t.length;++o){var u=r[s=t[o]],a=this[s];if(u)if(u.repeated){if(a&&a.length){for(var f=new Array(a.length),l=0,h=a.length;l<h;++l)f[l]=u.jsonConvert(a[l],e);i[s]=f}}else i[s]=u.jsonConvert(a,e);else e.fieldsOnly||(i[s]=a)}return i},i.encode=function(e,t){return this.$type.encode(e,t)},i.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},i.decode=function(e){return this.$type.decode(e)},i.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},i.verify=function(e){return this.$type.verify(e)}},{}],12:[function(e,t,r){"use strict";function i(e,t,r,i,s,o,f){if(u.isObject(s)?(f=s,s=o=void 0):u.isObject(o)&&(f=o,o=void 0),t&&!u.isString(t))throw a("type");if(!u.isString(r))throw a("requestType");if(!u.isString(i))throw a("responseType");n.call(this,e,f),this.type=t||"rpc",this.requestType=r,this.requestStream=!!s||void 0,this.responseType=i,this.responseStream=!!o||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null}t.exports=i;var n=e(14),s=n.extend(i),o=e(23),u=e(25),a=u.a;i.testJSON=function(e){return Boolean(e&&void 0!==e.requestType)},i.fromJSON=function(e,t){return new i(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options)},s.toJSON=function(){return{type:"rpc"!==this.type&&this.type||void 0,requestType:this.requestType,requestStream:this.requestStream,responseType:this.responseType,responseStream:this.responseStream,options:this.options}},s.resolve=function(){if(this.resolved)return this;var e=this.parent.lookup(this.requestType);if(!(e&&e instanceof o))throw Error("unresolvable request type: "+this.requestType);if(this.resolvedRequestType=e,e=this.parent.lookup(this.responseType),!(e&&e instanceof o))throw Error("unresolvable response type: "+this.requestType);return this.resolvedResponseType=e,n.prototype.resolve.call(this)}},{14:14,23:23,25:25}],13:[function(e,t,r){"use strict";function i(e,t){o.call(this,e,t),this.nested=void 0,this.d=null}function n(e){return e.d=null,e}function s(e){if(e&&e.length){for(var t={},r=0;r<e.length;++r)t[e[r].name]=e[r].toJSON();return t}}t.exports=i;var o=e(14),u=o.extend(i),a=e(8),f=e(23),l=e(9),h=e(21),c=e(25),d=c.a,p=[a,f,h,l,i],v="one of "+p.map(function(e){return e.name}).join(", ");c.props(u,{nestedArray:{get:function(){return this.d||(this.d=c.toArray(this.nested))}}}),i.testJSON=function(e){return Boolean(e&&!e.fields&&!e.values&&void 0===e.id&&!e.oneof&&!e.methods&&void 0===e.requestType)},i.fromJSON=function(e,t){return new i(e,t.options).addJSON(t.nested)},u.toJSON=function(){return{options:this.options,nested:s(this.getNestedArray())}},i.arrayToJSON=s,u.addJSON=function(e){var t=this;return e&&Object.keys(e).forEach(function(r){for(var i=e[r],n=0;n<p.length;++n)if(p[n].testJSON(i))return t.add(p[n].fromJSON(r,i));throw d("nested."+r,"JSON for "+v)}),this},u.get=function(e){return void 0===this.nested?null:this.nested[e]||null},u.add=function(e){if(!e||p.indexOf(e.constructor)<0)throw d("object",v);if(e instanceof l&&void 0===e.extend)throw d("object","an extension field when not part of a type");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof i&&e instanceof i)||t instanceof f||t instanceof h)throw Error("duplicate name '"+e.name+"' in "+this);for(var r=t.getNestedArray(),s=0;s<r.length;++s)e.add(r[s]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),n(this)},u.remove=function(e){if(!(e instanceof o))throw d("object","a ReflectionObject");if(e.parent!==this||!this.nested)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),n(this)},u.define=function(e,t){c.isString(e)?e=e.split("."):Array.isArray(e)||(t=e,e=void 0);var r=this;if(e)for(;e.length>0;){var n=e.shift();if(r.nested&&r.nested[n]){if(r=r.nested[n],!(r instanceof i))throw Error("path conflicts with non-namespace objects")}else r.add(r=new i(n))}return t&&r.addJSON(t),r},u.resolveAll=function(){for(var e=this.getNestedArray(),t=0;t<e.length;)e[t]instanceof i?e[t++].resolveAll():e[t++].resolve();return o.prototype.resolve.call(this)},u.lookup=function(e,t){if(c.isString(e)){if(!e.length)return null;e=e.split(".")}else if(!e.length)return null;if(""===e[0])return this.getRoot().lookup(e.slice(1));var r=this.get(e[0]);return r&&(1===e.length||r instanceof i&&(r=r.lookup(e.slice(1),!0)))?r:null===this.parent||t?null:this.parent.lookup(e)}},{14:14,21:21,23:23,25:25,8:8,9:9}],14:[function(e,t,r){"use strict";function i(e,t){if(!o.isString(e))throw u("name");if(t&&!o.isObject(t))throw u("options","an object");this.options=t,this.name=e,this.parent=null,this.resolved=!1}function n(e){var t=e.prototype=Object.create(this.prototype);return t.constructor=e,e.extend=n,t}t.exports=i,i.extend=n;var s=e(18),o=e(25),u=o.a,a=i.prototype;o.props(a,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:a.getFullName=function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),a.toJSON=function(){throw Error()},a.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.getRoot();t instanceof s&&t.e(this)},a.onRemove=function(e){var t=e.getRoot();t instanceof s&&t.f(this),this.parent=null,this.resolved=!1},a.resolve=function(){if(this.resolved)return this;var e=this.getRoot();return e instanceof s&&(this.resolved=!0),this},a.getOption=function(e){if(this.options)return this.options[e]},a.setOption=function(e,t,r){return r&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},a.setOptions=function(e,t){return e&&Object.keys(e).forEach(function(r){this.setOption(r,e[r],t)},this),this},a.toString=function(){return this.constructor.name+" "+this.getFullName()}},{18:18,25:25}],15:[function(e,t,r){"use strict";function i(e,t,r){if(Array.isArray(t)||(r=t,t=void 0),s.call(this,e,r),t&&!Array.isArray(t))throw f("fieldNames","an Array");this.ucName=this.name.substring(0,1).toUpperCase()+this.name.substring(1),this.oneof=t||[],this.g=[]}function n(e){e.parent&&e.g.forEach(function(t){t.parent||e.parent.add(t)})}t.exports=i;var s=e(14),o=s.extend(i),u=e(9),a=e(25),f=a.a;i.testJSON=function(e){return Boolean(e.oneof)},i.fromJSON=function(e,t){return new i(e,t.oneof,t.options)},o.toJSON=function(){return{oneof:this.oneof,options:this.options}},o.add=function(e){if(!(e instanceof u))throw f("field","a Field");return e.parent&&e.parent.remove(e),this.oneof.push(e.name),this.g.push(e),e.partOf=this,n(this),this},o.remove=function(e){if(!(e instanceof u))throw f("field","a Field");var t=this.g.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.g.splice(t,1),t=this.oneof.indexOf(e.name),t>-1&&this.oneof.splice(t,1),e.parent&&e.parent.remove(e),e.partOf=null,this},o.onAdd=function(e){s.prototype.onAdd.call(this,e),n(this)},o.onRemove=function(e){this.g.forEach(function(e){e.parent&&e.parent.remove(e)}),s.prototype.onRemove.call(this,e)}},{14:14,25:25,9:9}],16:[function(e,t,r){"use strict";function i(e){return null===e?null:e.toLowerCase()}function n(e,t){function r(e,t){return Error("illegal "+(t||"token")+" '"+e+"' (line "+ie.line()+E)}function n(){var e,t=[];do{if((e=ne())!==B&&e!==J)throw r(e);t.push(ne()),ue(e),e=oe()}while(e===B||e===J);return t.join("")}function v(e){var t=ne();switch(i(t)){case J:case B:return se(t),n();case"true":return!0;case"false":return!1}try{return q(t)}catch(i){if(e&&m.test(t))return t;throw r(t,"value")}}function L(){var e=z(ne()),t=e;return ue("to",!0)&&(t=z(ne())),ue(F),[e,t]}function q(e){var t=1;"-"===e.charAt(0)&&(t=-1,e=e.substring(1));var n=i(e);switch(n){case"inf":return t*(1/0);case"nan":return NaN;case"0":return 0}if(/^[1-9][0-9]*$/.test(e))return t*parseInt(e,10);if(/^0[x][0-9a-f]+$/.test(n))return t*parseInt(e,16);if(/^0[0-7]+$/.test(e))return t*parseInt(e,8);if(/^(?!e)[0-9]*(?:\.[0-9]*)?(?:[e][+-]?[0-9]+)?$/.test(n))return t*parseFloat(e);throw r(e,"number")}function z(e,t){var n=i(e);switch(n){case"min":return 1;case"max":return 536870911;case"0":return 0}if("-"===e.charAt(0)&&!t)throw r(e,"id");if(/^-?[1-9][0-9]*$/.test(e))return parseInt(e,10);if(/^-?0[x][0-9a-f]+$/.test(n))return parseInt(e,16);if(/^-?0[0-7]+$/.test(e))return parseInt(e,8);throw r(e,"id")}function V(){if(void 0!==Y)throw r("package");if(Y=ne(),!m.test(Y))throw r(Y,A);he=he.define(Y),ue(F)}function $(){var e,t=oe();switch(t){case"weak":e=te||(te=[]),ne();break;case"public":ne();default:e=ee||(ee=[])}t=n(),ue(F),e.push(t)}function I(){ue("="),re=i(n());var e;if(["proto2",e="proto3"].indexOf(re)<0)throw r(re,"syntax");fe=re===e,ue(F)}function R(e,t){switch(t){case O:return K(e,t),ue(F),!0;case"message":return C(e,t),!0;case"enum":return D(e,t),!0;case"service":return G(e,t),!0;case"extend":return Q(e,t),!0}return!1}function C(e,t){var n=ne();if(!g.test(n))throw r(n,"type name");var s=new u(n);if(ue(N,!0)){for(;(t=ne())!==T;){var o=i(t);if(!R(s,t))switch(o){case"map":M(s,o);break;case w:case x:case k:P(s,o);break;case"oneof":U(s,o);break;case"extensions":(s.extensions||(s.extensions=[])).push(L(s,o));break;case"reserved":(s.reserved||(s.reserved=[])).push(L(s,o));break;default:if(!fe||!m.test(t))throw r(t);se(t),P(s,x)}}ue(F,!0)}else ue(F);e.add(s)}function P(e,t,i){var n=ne();if(!m.test(n))throw r(n,S);var s=ne();if(!g.test(s))throw r(s,A);s=y(s),ue("=");var o=z(ne()),u=Z(new a(s,o,n,t,i));u.repeated&&u.setOption("packed",fe,!0),e.add(u)}function M(e){ue("<");var t=ne();if(void 0===p.mapKey[t])throw r(t,S);ue(",");var i=ne();if(!m.test(i))throw r(i,S);ue(">");var n=ne();if(!g.test(n))throw r(n,A);n=y(n),ue("=");var s=z(ne()),o=Z(new f(n,s,t,i));e.add(o)}function U(e,t){var i=ne();if(!g.test(i))throw r(i,A);i=y(i);var n=new l(i);if(ue(N,!0)){for(;(t=ne())!==T;)t===O?(K(n,t),ue(F)):(se(t),P(n,x));ue(F,!0)}else ue(F);e.add(n)}function D(e,t){var n=ne();if(!g.test(n))throw r(n,A);var s={},o=new h(n,s);if(ue(N,!0)){for(;(t=ne())!==T;)i(t)===O?K(o):_(o,t);ue(F,!0)}else ue(F);e.add(o)}function _(e,t){if(!g.test(t))throw r(t,A);var i=t;ue("=");var n=z(ne(),!0);e.values[i]=n,Z({})}function K(e,t){var i=ue(j,!0),n=ne();if(!m.test(n))throw r(n,A);i&&(ue(E),n=j+n+E,t=oe(),b.test(t)&&(n+=t,ne())),ue("="),H(e,n)}function H(e,t){if(ue(N,!0))for(;(le=ne())!==T;){if(!g.test(le))throw r(le,A);t=t+"."+le,ue(":",!0)?W(e,t,v(!0)):H(e,t)}else W(e,t,v(!0))}function W(e,t,r){e.setOption?e.setOption(t,r):e[t]=r}function Z(e){if(ue("[",!0)){do K(e,O);while(ue(",",!0));ue("]")}return ue(F),e}function G(e,t){if(t=ne(),!g.test(t))throw r(t,"service name");var n=t,s=new c(n);if(ue(N,!0)){for(;(t=ne())!==T;){var o=i(t);switch(o){case O:K(s,o),ue(F);break;case"rpc":X(s,o);break;default:throw r(t)}}ue(F,!0)}else ue(F);e.add(s)}function X(e,t){var n=t,s=ne();if(!g.test(s))throw r(s,A);var o,u,a,f;ue(j);var l;if(ue(l="stream",!0)&&(u=!0),!m.test(t=ne()))throw r(t);if(o=t,ue(E),ue("returns"),ue(j),ue(l,!0)&&(f=!0),!m.test(t=ne()))throw r(t);a=t,ue(E);var h=new d(s,n,o,a,u,f);if(ue(N,!0)){for(;(t=ne())!==T;){var c=i(t);switch(c){case O:K(h,c),ue(F);break;default:throw r(t)}}ue(F,!0)}else ue(F);e.add(h)}function Q(e,t){var n=ne();if(!m.test(n))throw r(n,"reference");if(ue(N,!0)){for(;(t=ne())!==T;){var s=i(t);switch(s){case w:case k:case x:P(e,s,n);break;default:if(!fe||!m.test(t))throw r(t);se(t),P(e,x,n)}}ue(F,!0)}else ue(F)}t||(t=new o);var Y,ee,te,re,ie=s(e),ne=ie.next,se=ie.push,oe=ie.peek,ue=ie.skip,ae=!0,fe=!1;t||(t=new o);for(var le,he=t;null!==(le=ne());){var ce=i(le);switch(ce){case"package":if(!ae)throw r(le);V();break;case"import":if(!ae)throw r(le);$();break;case"syntax":if(!ae)throw r(le);I();break;case O:if(!ae)throw r(le);K(he,le),ue(F);break;default:if(R(he,le)){ae=!1;continue}throw r(le)}}return{package:Y,imports:ee,weakImports:te,syntax:re,root:t}}t.exports=n;var s=e(22),o=e(18),u=e(23),a=e(9),f=e(10),l=e(15),h=e(8),c=e(21),d=e(12),p=e(24),v=e(25),y=v.camelCase,g=/^[a-zA-Z_][a-zA-Z_0-9]*$/,m=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,b=/^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/,w="required",k="repeated",x="optional",O="option",A="name",S="type",N="{",T="}",j="(",E=")",F=";",B='"',J="'"},{10:10,12:12,15:15,18:18,21:21,22:22,23:23,24:24,25:25,8:8,9:9}],17:[function(e,t,r){"use strict";function i(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function n(e){this.buf=e,this.pos=0,this.len=e.length}function s(e,t){this.id=e,this.wireType=t}function o(){var e=0,t=0,r=0,n=0;if(this.len-this.pos>9){for(r=0;r<4;++r)if(n=this.buf[this.pos++],e|=(127&n)<<7*r,n<128)return new A(e>>>0,t>>>0);if(n=this.buf[this.pos++],e|=(127&n)<<28,t|=(127&n)>>4,n<128)return new A(e>>>0,t>>>0);for(r=0;r<5;++r)if(n=this.buf[this.pos++],t|=(127&n)<<7*r+3,n<128)return new A(e>>>0,t>>>0)}else{for(r=0;r<4;++r){if(this.pos>=this.len)throw i(this);if(n=this.buf[this.pos++],e|=(127&n)<<7*r,n<128)return new A(e>>>0,t>>>0)}if(this.pos>=this.len)throw i(this);if(n=this.buf[this.pos++],e|=(127&n)<<28,t|=(127&n)>>4,n<128)return new A(e>>>0,t>>>0);for(r=0;r<5;++r){if(this.pos>=this.len)throw i(this);if(n=this.buf[this.pos++],t|=(127&n)<<7*r+3,n<128)return new A(e>>>0,t>>>0)}}throw Error("invalid varint encoding")}function u(){return o.call(this).toLong()}function a(){return o.call(this).toNumber()}function f(){return o.call(this).toLong(!0)}function l(){return o.call(this).toNumber(!0)}function h(){return o.call(this).zzDecode().toLong()}function c(){return o.call(this).zzDecode().toNumber()}function d(){if(this.pos+8>this.len)throw i(this,8);return new A((this.buf[this.pos++]|this.buf[this.pos++]<<8|this.buf[this.pos++]<<16|this.buf[this.pos++]<<24)>>>0,(this.buf[this.pos++]|this.buf[this.pos++]<<8|this.buf[this.pos++]<<16|this.buf[this.pos++]<<24)>>>0)}function p(){return d.call(this).toLong(!0)}function v(){return d.call(this).toNumber(!0)}function y(){return d.call(this).zzDecode().toLong()}function g(){return d.call(this).zzDecode().toNumber()}function m(e){E&&E(),n.call(this,e)}function b(e,t,r){return e.utf8Slice(t,r)}function w(e,t,r){return e.toString("utf8",t,r)}function k(){x.Long?(N.int64=u,N.uint64=f,N.sint64=h,N.fixed64=p,N.sfixed64=y):(N.int64=a,N.uint64=l,N.sint64=c,N.fixed64=v,N.sfixed64=g)}t.exports=n,n.BufferReader=m;var x=e(29),O=e(1),A=x.LongBits,S="undefined"!=typeof Uint8Array?Uint8Array:Array;n.create=function(e){return new(x.Buffer&&x.Buffer.isBuffer(e)&&m||n)(e)};var N=n.prototype;N.h=S.prototype.subarray||S.prototype.slice,N.tag=function(){if(this.pos>=this.len)throw i(this);return new s(this.buf[this.pos]>>>3,7&this.buf[this.pos++])},N.int32=function(){var e=this.buf[this.pos++],t=127&e;if(e>127&&(e=this.buf[this.pos++],t|=(127&e)<<7,e>127&&(e=this.buf[this.pos++],t|=(127&e)<<14,e>127&&(e=this.buf[this.pos++],t|=(127&e)<<21,e>127&&(e=this.buf[this.pos++],t|=e<<28,e>127&&(this.pos+=5))))),this.pos>this.len)throw this.pos=this.len,i(this);return t},N.uint32=function(){
return this.int32()>>>0},N.sint32=function(){var e=this.int32();return e>>>1^-(1&e)},N.bool=function(){return 0!==this.int32()},N.fixed32=function(){if(this.pos+4>this.len)throw i(this,4);return this.pos+=4,this.buf[this.pos-4]|this.buf[this.pos-3]<<8|this.buf[this.pos-2]<<16|this.buf[this.pos-1]<<24},N.sfixed32=function(){var e=this.fixed32();return e>>>1^-(1&e)};var T="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,i){return t[0]=r[i++],t[1]=r[i++],t[2]=r[i++],t[3]=r[i],e[0]}:function(r,i){return t[3]=r[i++],t[2]=r[i++],t[1]=r[i++],t[0]=r[i],e[0]}}():function(e,t){return O.read(e,t,!1,23,4)};N.float=function(){if(this.pos+4>this.len)throw i(this,4);var e=T(this.buf,this.pos);return this.pos+=4,e};var j="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,i){return t[0]=r[i++],t[1]=r[i++],t[2]=r[i++],t[3]=r[i++],t[4]=r[i++],t[5]=r[i++],t[6]=r[i++],t[7]=r[i],e[0]}:function(r,i){return t[7]=r[i++],t[6]=r[i++],t[5]=r[i++],t[4]=r[i++],t[3]=r[i++],t[2]=r[i++],t[1]=r[i++],t[0]=r[i],e[0]}}():function(e,t){return O.read(e,t,!1,52,8)};N.double=function(){if(this.pos+8>this.len)throw i(this,4);var e=j(this.buf,this.pos);return this.pos+=8,e},N.bytes=function(){var e=this.int32()>>>0,t=this.pos,r=this.pos+e;if(r>this.len)throw i(this,e);return this.pos+=e,t===r?new this.buf.constructor(0):this.h.call(this.buf,t,r)},N.string=function(){var e=this.bytes(),t=e.length;if(t){for(var r=new Array(t),i=0,n=0;i<t;){var s=e[i++];if(s<128)r[n++]=s;else if(s>191&&s<224)r[n++]=(31&s)<<6|63&e[i++];else if(s>239&&s<365){var o=((7&s)<<18|(63&e[i++])<<12|(63&e[i++])<<6|63&e[i++])-65536;r[n++]=55296+(o>>10),r[n++]=56320+(1023&o)}else r[n++]=(15&s)<<12|(63&e[i++])<<6|63&e[i++]}return String.fromCharCode.apply(String,r.slice(0,n))}return""},N.skip=function(e){if(void 0===e){do if(this.pos>=this.len)throw i(this);while(128&this.buf[this.pos++])}else{if(this.pos+e>this.len)throw i(this,e);this.pos+=e}return this},N.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){var t=this.tag();if(4===t.wireType)break;this.skipType(t.wireType)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type: "+e)}return this},N.reset=function(e){return e?(this.buf=e,this.len=e.length):(this.buf=null,this.len=0),this.pos=0,this},N.finish=function(e){var t=this.pos?this.h.call(this.buf,this.pos):this.buf;return this.reset(e),t};var E=function(){if(!x.Buffer)throw Error("Buffer is not supported");F.h=x.Buffer.prototype.slice,B=x.Buffer.prototype.utf8Slice?b:w,E=!1},F=m.prototype=Object.create(n.prototype);F.constructor=m,"undefined"==typeof Float32Array&&(F.float=function(){if(this.pos+4>this.len)throw i(this,4);var e=this.buf.readFloatLE(this.pos,!0);return this.pos+=4,e}),"undefined"==typeof Float64Array&&(F.double=function(){if(this.pos+8>this.len)throw i(this,8);var e=this.buf.readDoubleLE(this.pos,!0);return this.pos+=8,e});var B;F.string=function(){var e=this.int32()>>>0,t=this.pos,r=this.pos+e;if(r>this.len)throw i(this,e);return this.pos+=e,B(this.buf,t,r)},F.finish=function(e){var t=this.pos?this.buf.slice(this.pos):this.buf;return this.reset(e),t},n.i=k,k()},{1:1,29:29}],18:[function(e,t,r){"use strict";function i(e){o.call(this,"",e),this.deferred=[],this.files=[]}function n(){}function s(e){var t=e.parent.lookup(e.extend);if(t){var r=new a(e.getFullName(),e.id,e.type,e.rule,(void 0),e.options);return r.declaringField=e,e.extensionField=r,t.add(r),!0}return!1}t.exports=i;var o=e(13),u=o.extend(i),a=e(9),f=e(25),l=e(7);i.fromJSON=function(e,t){return t||(t=new i),t.setOptions(e.options).addJSON(e.nested)},u.resolvePath=f.resolvePath,u.load=function t(r,i){function s(e,t){if(i){var r=i;i=null,r(e,t)}}function o(t,r){try{if(f.isString(r)&&"{"===r.charAt(0)&&(r=JSON.parse(r)),f.isString(r)){var i=e(16)(r,a);i.imports&&i.imports.forEach(function(e){u(a.resolvePath(t,e))}),i.weakImports&&i.weakImports.forEach(function(e){u(a.resolvePath(t,e),!0)})}else a.setOptions(r.options).addJSON(r.nested)}catch(e){return void s(e)}h||c||s(null,a)}function u(e,t){var r=e.indexOf("google/protobuf/");if(r>-1){var n=e.substring(r);n in l&&(e=n)}if(!(a.files.indexOf(e)>-1)){if(a.files.push(e),e in l)return void(h?o(e,l[e]):(++c,setTimeout(function(){--c,o(e,l[e])})));if(h){var u;try{u=f.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||s(e))}o(e,u)}else++c,f.fetch(e,function(r,n){if(--c,i)return r?void(t||s(r)):void o(e,n)})}}var a=this;if(!i)return f.asPromise(t,a,r);var h=i===n,c=0;return f.isString(r)&&(r=[r]),r.forEach(function(e){u(a.resolvePath("",e))}),h?a:void(c||s(null,a))},u.loadSync=function(e){return this.load(e,n)},u.e=function(e){var t=this.deferred.slice();this.deferred=[];for(var r=0;r<t.length;)s(t[r])?t.splice(r,1):++r;if(this.deferred=t,e instanceof a&&void 0!==e.extend&&!e.extensionField&&!s(e)&&this.deferred.indexOf(e)<0)this.deferred.push(e);else if(e instanceof o){var i=e.getNestedArray();for(r=0;r<i.length;++r)this.e(i[r])}},u.f=function(e){if(e instanceof a){if(void 0!==e.extend&&!e.extensionField){var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}e.extensionField&&(e.extensionField.parent.remove(e.extensionField),e.extensionField=null)}else if(e instanceof o)for(var r=e.getNestedArray(),i=0;i<r.length;++i)this.f(r[i])},u.toString=function(){return this.constructor.name}},{13:13,16:16,25:25,7:7,9:9}],19:[function(e,t,r){"use strict";var i=r;i.Service=e(20)},{20:20}],20:[function(e,t,r){"use strict";function i(e){n.call(this),this.$rpc=e}t.exports=i;var n=e(26),s=i.prototype=Object.create(n.prototype);s.constructor=i,s.end=function(e){return this.$rpc&&(e||this.$rpc(null,null,null),this.$rpc=null,this.emit("end").off()),this}},{26:26}],21:[function(e,t,r){"use strict";function i(e,t){s.call(this,e,t),this.methods={},this.j=null}function n(e){return e.j=null,e}t.exports=i;var s=e(13),o=s.prototype,u=s.extend(i),a=e(12),f=e(25),l=e(19);f.props(u,{methodsArray:{get:function(){return this.j||(this.j=f.toArray(this.methods))}}}),i.testJSON=function(e){return Boolean(e&&e.methods)},i.fromJSON=function(e,t){var r=new i(e,t.options);return t.methods&&Object.keys(t.methods).forEach(function(e){r.add(a.fromJSON(e,t.methods[e]))}),r},u.toJSON=function(){var e=o.toJSON.call(this);return{options:e&&e.options||void 0,methods:s.arrayToJSON(this.getMethodsArray())||{},nested:e&&e.nested||void 0}},u.get=function(e){return o.get.call(this,e)||this.methods[e]||null},u.resolveAll=function(){for(var e=this.getMethodsArray(),t=0;t<e.length;++t)e[t].resolve();return o.resolve.call(this)},u.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+'" in '+this);return e instanceof a?(this.methods[e.name]=e,e.parent=this,n(this)):o.add.call(this,e)},u.remove=function(e){if(e instanceof a){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,n(this)}return o.remove.call(this,e)},u.create=function(e,t,r){var i=new l.Service(e);return this.getMethodsArray().forEach(function(n){i[n.name.substring(0,1).toLowerCase()+n.name.substring(1)]=function(s,o){if(i.$rpc){if(!s)throw f.a("request","not null");n.resolve();var u;try{u=(t&&n.resolvedRequestType.encodeDelimited(s)||n.resolvedRequestType.encode(s)).finish()}catch(e){return void("function"==typeof setImmediate&&setImmediate||setTimeout)(function(){o(e)})}e(n,u,function(e,t){if(e)return i.emit("error",e,n),o?o(e):void 0;if(null===t)return void i.end(!0);var s;try{s=r&&n.resolvedResponseType.decodeDelimited(t)||n.resolvedResponseType.decode(t)}catch(e){return i.emit("error",e,n),o?o("error",e):void 0}return i.emit("data",s,n),o?o(null,s):void 0})}}}),i}},{12:12,13:13,19:19,25:25}],22:[function(e,t,r){"use strict";function i(e){return e.replace(/\\(.?)/g,function(e,t){switch(t){case"\\":case"":return t;case"0":return"\0";default:return t}})}function n(e){function t(e){return Error("illegal "+e+" (line "+g+")")}function r(){var r='"'===b?o:u;r.lastIndex=v-1;var n=r.exec(e);if(!n)throw t("string");return v=r.lastIndex,c(b),b=null,i(n[1])}function n(t){return e.charAt(t)}function h(){if(m.length>0)return m.shift();if(b)return r();var i,o,u;do{if(v===y)return null;for(i=!1;/\s/.test(u=n(v));)if(u===a&&++g,++v===y)return null;if(n(v)===f){if(++v===y)throw t("comment");if(n(v)===f){for(;n(++v)!==a;)if(v===y)return null;++v,++g,i=!0}else{if((u=n(v))!==l)return f;do{if(u===a&&++g,++v===y)return null;o=u,u=n(v)}while(o!==l||u!==f);++v,i=!0}}}while(i);if(v===y)return null;var h=v;s.lastIndex=0;var c=s.test(n(h++));if(!c)for(;h<y&&!s.test(n(h));)++h;var d=e.substring(v,v=h);return'"'!==d&&"'"!==d||(b=d),d}function c(e){m.push(e)}function d(){if(!m.length){var e=h();if(null===e)return null;c(e)}return m[0]}function p(e,r){var i=d(),n=i===e;if(n)return h(),!0;if(!r)throw t("token '"+i+"', '"+e+"' expected");return!1}e=e.toString();var v=0,y=e.length,g=1,m=[],b=null;return{line:function(){return g},next:h,peek:d,push:c,skip:p}}t.exports=n;var s=/[\s{}=;:[\],'"()<>]/g,o=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,u=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,a="\n",f="/",l="*"},{}],23:[function(e,t,r){"use strict";function i(e,t){s.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.k=null,this.l=null,this.m=null,this.n=null,this.o=null}function n(e){return e.k=e.l=e.n=e.o=null,delete e.encode,delete e.decode,e}t.exports=i;var s=e(13),o=s.prototype,u=s.extend(i),a=e(8),f=e(15),l=e(9),h=e(21),c=e(2),d=e(11),p=e(17),v=e(30),y=e(25),g=e(3);y.props(u,{fieldsById:{get:function(){if(this.k)return this.k;this.k={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var r=this.fields[e[t]],i=r.id;if(this.k[i])throw Error("duplicate id "+i+" in "+this);this.k[i]=r}return this.k}},fieldsArray:{get:function(){return this.l||(this.l=y.toArray(this.fields))}},repeatedFieldsArray:{get:function(){return this.m||(this.m=this.getFieldsArray().filter(function(e){return e.repeated}))}},oneofsArray:{get:function(){return this.n||(this.n=y.toArray(this.oneofs))}},ctor:{get:function(){return this.o||(this.o=c.create(this).constructor)},set:function(e){if(e&&!(e.prototype instanceof d))throw y.a("ctor","a Message constructor");this.o=e}}}),i.testJSON=function(e){return Boolean(e&&e.fields)};var m=[a,i,l,h];i.fromJSON=function(e,t){var r=new i(e,t.options);return r.extensions=t.extensions,r.reserved=t.reserved,t.fields&&Object.keys(t.fields).forEach(function(e){r.add(l.fromJSON(e,t.fields[e]))}),t.oneofs&&Object.keys(t.oneofs).forEach(function(e){r.add(f.fromJSON(e,t.oneofs[e]))}),t.nested&&Object.keys(t.nested).forEach(function(e){for(var i=t.nested[e],n=0;n<m.length;++n)if(m[n].testJSON(i))return void r.add(m[n].fromJSON(e,i));throw Error("invalid nested object in "+r+": "+e)}),t.extensions&&t.extensions.length&&(r.extensions=t.extensions),t.reserved&&t.reserved.length&&(r.reserved=t.reserved),r},u.toJSON=function(){var e=o.toJSON.call(this);return{options:e&&e.options||void 0,oneofs:s.arrayToJSON(this.getOneofsArray()),fields:s.arrayToJSON(this.getFieldsArray().filter(function(e){return!e.declaringField}))||{},extensions:this.extensions&&this.extensions.length?this.extensions:void 0,reserved:this.reserved&&this.reserved.length?this.reserved:void 0,nested:e&&e.nested||void 0}},u.resolveAll=function(){for(var e=this.getFieldsArray(),t=0;t<e.length;)e[t++].resolve();var r=this.getOneofsArray();for(t=0;t<r.length;)r[t++].resolve();return o.resolve.call(this)},u.get=function(e){return o.get.call(this,e)||this.fields&&this.fields[e]||this.oneofs&&this.oneofs[e]||null},u.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+'" in '+this);if(e instanceof l&&void 0===e.extend){if(this.getFieldsById()[e.id])throw Error("duplicate id "+e.id+" in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),n(this)}return e instanceof f?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),n(this)):o.add.call(this,e)},u.remove=function(e){if(e instanceof l&&void 0===e.extend){if(this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.message=null,n(this)}return o.remove.call(this,e)},u.create=function(e){return new(this.getCtor())(e)},u.encode=function(e,t){return(this.encode=g.supported?g.encode.generate(this).eof(this.getFullName()+"$encode",{Writer:v,types:this.getFieldsArray().map(function(e){return e.resolvedType}),util:y}):g.encode.fallback).call(this,e,t)},u.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},u.decode=function(e,t){return(this.decode=g.supported?g.decode.generate(this).eof(this.getFullName()+"$decode",{Reader:p,types:this.getFieldsArray().map(function(e){return e.resolvedType}),util:y}):g.decode.fallback).call(this,e,t)},u.decodeDelimited=function(e){return e=e instanceof p?e:p.create(e),this.decode(e,e.uint32())},u.verify=function(e){return(this.verify=g.supported?g.verify.generate(this).eof(this.getFullName()+"$verify",{types:this.getFieldsArray().map(function(e){return e.resolvedType}),util:y}):g.verify.fallback).call(this,e)}},{11:11,13:13,15:15,17:17,2:2,21:21,25:25,3:3,30:30,8:8,9:9}],24:[function(e,t,r){"use strict";function i(e,t){var r=0,i={};for(t|=0;r<e.length;)i[o[r+t]]=e[r++];return i}var n=r,s=e(25),o=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];n.basic=i([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),n.defaults=i([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",s.emptyArray]),n.long=i([0,0,0,1,1],7),n.mapKey=i([0,0,0,5,5,0,0,0,1,1,0,2],2),n.packed=i([1,5,0,0,0,5,5,0,0,0,1,1,0])},{25:25}],25:[function(require,module,exports){"use strict";function asPromise(e,t){for(var r=[],i=2;i<arguments.length;++i)r.push(arguments[i]);return new Promise(function(i,n){e.apply(t,r.concat(function(e){e?n(e):i.apply(null,Array.prototype.slice.call(arguments,1))}))})}function fetch(e,t){function r(){return 0!==i.status&&200!==i.status?t(Error("status "+i.status)):util.isString(i.responseText)?t(null,i.responseText):t(Error("request failed"))}if(!t)return asPromise(fetch,util,e);if(fs&&fs.readFile)return fs.readFile(e,"utf8",t);var i=new XMLHttpRequest;i.onreadystatechange=function(){4===i.readyState&&r()},i.open("GET",e,!0),i.send()}function isAbsolutePath(e){return/^(?:\/|[a-zA-Z0-9]+:)/.test(e)}function normalizePath(e){e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var t=e.split("/"),r=isAbsolutePath(e),i="";r&&(i=t.shift()+"/");for(var n=0;n<t.length;)".."===t[n]?n>0?t.splice(--n,2):r?t.splice(n,1):++n:"."===t[n]?t.splice(n,1):++n;return i+t.join("/")}var util=exports;util.toArray=function(e){if(!e)return[];for(var t=Object.keys(e),r=t.length,i=new Array(r),n=0;n<r;++n)i[n]=e[t[n]];return i},util.a=function(e,t){return TypeError(e+" must be "+(t||"a string"))},util.asPromise=asPromise;var fs=null;try{fs=eval(["req","uire"].join(""))("fs")}catch(e){}util.fs=fs,util.fetch=fetch,util.isAbsolutePath=isAbsolutePath,util.normalizePath=normalizePath,util.resolvePath=function(e,t,r){return r||(t=normalizePath(t)),isAbsolutePath(t)?t:(r||(e=normalizePath(e)),e=e.replace(/(?:\/|^)[^\/]+$/,""),e.length?normalizePath(e+"/"+t):t)},util.merge=function(e,t,r){if(t)for(var i=Object.keys(t),n=0;n<i.length;++n)void 0!==e[i[n]]&&r||(e[i[n]]=t[i[n]]);return e},util.safeProp=function(e){return"['"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+"']"},util.sprintf=function(e){var t=Array.prototype.slice.call(arguments,1),r=0;return e.replace(/%([djs])/g,function(e,i){var n=t[r++];switch(i){case"j":return JSON.stringify(n);case"p":return util.safeProp(n);default:return String(n)}})},util.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(/_([a-z])(?=[a-z]|$)/g,function(e,t){return t.toUpperCase()})},util.underScore=function(e){return e.substring(0,1)+e.substring(1).replace(/([A-Z])(?=[a-z]|$)/g,function(e,t){return"_"+t.toLowerCase()})},util.newBuffer=function(e){return e=e||0,util.Buffer?util.Buffer.allocUnsafe&&util.Buffer.allocUnsafe(e)||new util.Buffer(e):new("undefined"!=typeof Uint8Array&&Uint8Array||Array)(e)};var runtime=require(29);util.EventEmitter=require(26),util.merge(util,runtime),util.i=function(){runtime.Long=util.Long}},{26:26,29:29}],26:[function(e,t,r){"use strict";function i(){this.p={}}t.exports=i;var n=i.prototype;n.on=function(e,t,r){return(this.p[e]||(this.p[e]=[])).push({fn:t,ctx:r||this}),this},n.off=function(e,t){if(void 0===e)this.p={};else if(void 0===t)this.p[e]=[];else for(var r=this.p[e],i=0;i<r.length;)r[i].fn===t?r.splice(i,1):++i;return this},n.emit=function(e){var t=this.p[e];if(t)for(var r=Array.prototype.slice.call(arguments,1),i=0;i<t.length;++i)t[i].fn.apply(t[i].ctx,r);return this}},{}],27:[function(e,t,r){"use strict";function i(e,t){this.lo=e,this.hi=t}t.exports=i;var n=e(25),s=i.prototype,o=i.zero=new i(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1},i.fromNumber=function(e){if(0===e)return o;var t=e<0;e=Math.abs(e);var r=e>>>0,n=(e-r)/4294967296>>>0;return t&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new i(r,n)},i.from=function(e){switch(typeof e){case"number":return i.fromNumber(e);case"string":if(!n.Long)return i.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return(e.low||e.high)&&new i(e.low>>>0,e.high>>>0)||o},s.toNumber=function(e){return!e&&this.hi>>>31?(this.lo=~this.lo+1>>>0,this.hi=~this.hi>>>0,this.lo||(this.hi=this.hi+1>>>0),-(this.lo+4294967296*this.hi)):this.lo+4294967296*this.hi},s.toLong=function(e){return n.Long?new n.Long(this.lo,this.hi,e):{low:this.lo,high:this.hi,unsigned:Boolean(e)}};var u=String.prototype.charCodeAt;i.fromHash=function(e){return new i((u.call(e,0)|u.call(e,1)<<8|u.call(e,2)<<16|u.call(e,3)<<24)>>>0,(u.call(e,4)|u.call(e,5)<<8|u.call(e,6)<<16|u.call(e,7)<<24)>>>0)},s.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24&255,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24&255)},s.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},s.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},s.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<1<<21?3:4:t<16384?t<128?5:6:t<1<<21?7:8:r<128?9:10}},{25:25}],28:[function(e,t,r){"use strict";function i(e,t,r){var i=r||8192,n=i>>>1,s=null,o=i;return function(r){if(r>n)return e(r);o+r>i&&(s=e(i),o=0);var u=t.call(s,o,o+=r);return 7&o&&(o=(7|o)+1),u}}t.exports=i},{}],29:[function(e,t,r){(function(t){"use strict";var i=r,n=i.LongBits=e(27);i.pool=e(28);var s=i.isNode=Boolean(t.process&&t.process.versions&&t.process.versions.node);if(i.Buffer=null,s)try{i.Buffer=e("buffer").Buffer}catch(e){}if(i.Long=t.dcodeIO&&t.dcodeIO.Long||null,!i.Long&&s)try{i.Long=e("long")}catch(e){}i.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},i.isString=function(e){return"string"==typeof e||e instanceof String},i.isObject=function(e){return Boolean(e&&"object"==typeof e)},i.longToHash=function(e){return e?n.from(e).toHash():"\0\0\0\0\0\0\0\0"},i.longFromHash=function(e,t){var r=n.fromHash(e);return i.Long?i.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},i.longNeq=function(e,t){return"number"==typeof e?"number"==typeof t?e!==t:(e=n.fromNumber(e)).lo!==t.low||e.hi!==t.high:"number"==typeof t?(t=n.fromNumber(t)).lo!==e.low||t.hi!==e.high:e.low!==t.low||e.high!==t.high},i.props=function(e,t){Object.keys(t).forEach(function(r){i.prop(e,r,t[r])})},i.prop=function(e,t,r){var i=!-[1],n=t.substring(0,1).toUpperCase()+t.substring(1);r.get&&(e["get"+n]=r.get),r.set&&(e["set"+n]=i?function(e){r.set.call(this,e),this[t]=e}:r.set),i?void 0!==r.value&&(e[t]=r.value):Object.defineProperty(e,t,r)},i.emptyArray=Object.freeze([]),i.emptyObject=Object.freeze({}),i.length64=function(e){var t=e.length,r=0;if(t)for(;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};var o=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47];i.encode64=function(e,t,r){for(var i,n=new Array(4*Math.ceil((r-t)/3)),s=0,u=0;t<r;){var a=e[t++];switch(u){case 0:n[s++]=o[a>>2],i=(3&a)<<4,u=1;break;case 1:n[s++]=o[i|a>>4],i=(15&a)<<2,u=2;break;case 2:n[s++]=o[i|a>>6],n[s++]=o[63&a],u=0}}switch(u){case 1:n[s++]=o[i],n[s++]=61,n[s]=61;break;case 2:n[s++]=o[i],n[s]=61}return String.fromCharCode.apply(String,n)};for(var u=[],a=0;a<o.length;++a)u[o[a]]=a;var f="invalid encoding";i.decode64=function(e,t,r){for(var i,n=r,s=0,o=0;o<e.length;){var a=e.charCodeAt(o++);if(61===a&&s>1)break;if(void 0===(a=u[a]))throw Error(f);switch(s){case 0:i=a,s=1;break;case 1:t[r++]=i<<2|(48&a)>>4,i=a,s=2;break;case 2:t[r++]=(15&i)<<4|(60&a)>>2,i=a,s=3;break;case 3:t[r++]=(3&i)<<6|a,s=0}}if(1===s)throw Error(f);return r-n}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{27:27,28:28,buffer:"buffer",long:"long"}],30:[function(e,t,r){"use strict";function i(e,t,r){this.fn=e,this.val=t,this.len=r,this.next=null}function n(){}function s(e,t){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=t}function o(){this.len=0,this.head=new i(n,0,0),this.tail=this.head,this.states=null}function u(e,t,r){e[t]=255&r}function a(e,t,r){for(;r>127;)e[t++]=127&r|128,r>>>=7;e[t]=r}function f(e,t,r){for(;r.hi;)e[t++]=127&r.lo|128,r.lo=(r.lo>>>7|r.hi<<25)>>>0,r.hi>>>=7;for(;r.lo>127;)e[t++]=127&r.lo|128,r.lo=r.lo>>>7;e[t++]=r.lo}function l(e,t,r){e[t++]=255&r,e[t++]=r>>>8&255,e[t++]=r>>>16&255,e[t]=r>>>24}function h(e,t,r){e.set(r,t)}function c(e,t,r){for(var i=0;i<r.length;++i){var n,s=r.charCodeAt(i);s<128?e[t++]=s:s<2048?(e[t++]=s>>6|192,e[t++]=63&s|128):55296===(64512&s)&&56320===(64512&(n=r.charCodeAt(i+1)))?(s=65536+((1023&s)<<10)+(1023&n),++i,e[t++]=s>>18|240,e[t++]=s>>12&63|128,e[t++]=s>>6&63|128,e[t++]=63&s|128):(e[t++]=s>>12|224,e[t++]=s>>6&63|128,e[t++]=63&s|128)}}function d(e){for(var t=e.length>>>0,r=0,i=0;i<t;++i){var n=e.charCodeAt(i);n<128?r+=1:n<2048?r+=2:55296===(64512&n)&&56320===(64512&e.charCodeAt(i+1))?(++i,r+=4):r+=3}return r}function p(){o.call(this)}function v(e,t,r){e.writeFloatLE(r,t,!0)}function y(e,t,r){e.writeDoubleLE(r,t,!0)}t.exports=o,o.BufferWriter=p;var g=e(29),m=e(1),b=g.LongBits,w="undefined"!=typeof Uint8Array?Uint8Array:Array;o.Op=i,o.State=s,o.create=function(){return new(g.Buffer&&p||o)},o.alloc=function(e){return new w(e)},w!==Array&&(o.alloc=g.pool(o.alloc,w.prototype.subarray||w.prototype.slice));var k=o.prototype;k.push=function(e,t,r){var n=new i(e,r,t);return this.tail.next=n,this.tail=n,this.len+=t,this},k.tag=function(e,t){return this.push(u,1,e<<3|7&t)},k.uint32=function(e){return e>>>=0,e<128?this.push(u,1,e):this.push(a,e<16384?2:e<2097152?3:e<268435456?4:5,e)},k.int32=function(e){return e<0?this.push(f,10,b.fromNumber(e)):this.uint32(e)},k.sint32=function(e){return this.uint32(e<<1^e>>31)},k.uint64=function(e){var t=b.from(e);return this.push(f,t.length(),t)},k.int64=k.uint64,k.sint64=function(e){var t=b.from(e).zzEncode();return this.push(f,t.length(),t)},k.bool=function(e){return this.push(u,1,e?1:0)},k.fixed32=function(e){return this.push(l,4,e>>>0)},k.sfixed32=function(e){return this.push(l,4,e<<1^e>>31)},k.fixed64=function(e){var t=b.from(e);return this.push(l,4,t.lo).push(l,4,t.hi)},k.sfixed64=function(e){var t=b.from(e).zzEncode();return this.push(l,4,t.hi).push(l,4,t.lo)};var x="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,i,n){e[0]=n,r[i++]=t[0],r[i++]=t[1],r[i++]=t[2],r[i]=t[3]}:function(r,i,n){e[0]=n,r[i++]=t[3],r[i++]=t[2],r[i++]=t[1],r[i]=t[0]}}():function(e,t,r){m.write(e,r,t,!1,23,4)};k.float=function(e){return this.push(x,4,e)};var O="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,i,n){e[0]=n,r[i++]=t[0],r[i++]=t[1],r[i++]=t[2],r[i++]=t[3],r[i++]=t[4],r[i++]=t[5],r[i++]=t[6],r[i]=t[7]}:function(r,i,n){e[0]=n,r[i++]=t[7],r[i++]=t[6],r[i++]=t[5],r[i++]=t[4],r[i++]=t[3],r[i++]=t[2],r[i++]=t[1],r[i]=t[0]}}():function(e,t,r){m.write(e,r,t,!1,52,8)};k.double=function(e){return this.push(O,8,e)};var A=w.prototype.set?h:function(e,t,r){for(var i=0;i<r.length;++i)e[t+i]=r[i]};k.bytes=function(e){var t=e.length>>>0;if("string"==typeof e&&t){var r=o.alloc(t=g.length64(e));g.decode64(e,r,0),e=r}return t?this.uint32(t).push(A,t,e):this.push(u,1,0)},k.string=function(e){var t=d(e);return t?this.uint32(t).push(c,t,e):this.push(u,1,0)},k.fork=function(){return this.states=new s(this,this.states),this.head=this.tail=new i(n,0,0),this.len=0,this},k.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 i(n,0,0),this.len=0),this},k.ldelim=function(e){var t=this.head,r=this.tail,i=this.len;return this.reset(),void 0!==e&&this.tag(e,2),this.uint32(i),this.tail.next=t.next,this.tail=r,this.len+=i,this},k.finish=function(){var e=this.head.next,t=this.constructor.alloc(this.len);this.reset();for(var r=0;e;)e.fn(t,r,e.val),r+=e.len,e=e.next;return t},p.alloc=function(e){return p.alloc=g.Buffer.allocUnsafe?g.Buffer.allocUnsafe:function(e){return new g.Buffer(e)},p.alloc(e)};var S=p.prototype=Object.create(o.prototype);S.constructor=p,"undefined"==typeof Float32Array&&(S.float=function(e){return this.push(v,4,e)}),"undefined"==typeof Float64Array&&(S.double=function(e){return this.push(y,8,e)});var N=g.Buffer&&g.Buffer.prototype.set?h:function(e,t,r){r.length&&r.copy(e,t,0,r.length)};S.bytes=function(e){"string"==typeof e&&(e=g.Buffer.from&&g.Buffer.from(e,"base64")||new g.Buffer(e,"base64"));var t=e.length>>>0;return t?this.uint32(t).push(N,t,e):this.push(u,1,0)};var T=function(){return g.Buffer&&g.Buffer.prototype.utf8Write?function(e,t,r){r.length<40?c(e,t,r):e.utf8Write(r,t)}:function(e,t,r){r.length<40?c(e,t,r):e.write(r,t)}}();S.string=function(e){var t=e.length<40?d(e):g.Buffer.byteLength(e);return t?this.uint32(t).push(T,t,e):this.push(u,1,0)}},{1:1,29:29}],31:[function(e,t,r){(function(t){"use strict";function i(e,t,r){return"function"==typeof t?(r=t,t=new o.Root):t||(t=new o.Root),t.load(e,r)}function n(e,t){return t||(t=new o.Root),t.loadSync(e)}function s(){a.i(),u.i()}var o=t.protobuf=r;o.load=i,o.loadSync=n,o.tokenize=e(22),o.parse=e(16),o.Writer=e(30),o.BufferWriter=o.Writer.BufferWriter;var u=o.Reader=e(17);o.BufferReader=o.Reader.BufferReader,o.codegen=e(3),o.ReflectionObject=e(14),o.Namespace=e(13),o.Root=e(18),o.Enum=e(8),o.Type=e(23),o.Field=e(9),o.OneOf=e(15),o.MapField=e(10),o.Service=e(21),o.Method=e(12),o.Class=e(2),o.Message=e(11),o.types=e(24),o.common=e(7),o.rpc=e(19);var a=o.util=e(25);o.configure=s,"function"==typeof define&&define.amd&&define(["long"],function(e){return e&&(o.util.Long=e,s()),o})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,2:2,21:21,22:22,23:23,24:24,25:25,3:3,30:30,7:7,8:8,9:9}]},{},[31]);
//# sourceMappingURL=protobuf.min.js.map