/
protobuf.min.js
9 lines (9 loc) · 52.8 KB
/
protobuf.min.js
1
2
3
4
5
6
7
8
9
/*!
* protobuf.js v6.0.2 (c) 2016 Daniel Wirtz
* Compiled Tue, 06 Dec 2016 14:03:27 UTC
* Licensed under the Apache License, Version 2.0
* see: https://github.com/dcodeIO/protobuf.js for details
*/
!function e(t,n,i){function r(o,u){if(!n[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 h=n[o]={exports:{}};t[o][0].call(h.exports,function(e){var n=t[o][1][e];return r(n?n:e)},h,h.exports,e,t,n,i)}return n[o].exports}for(var s="function"==typeof require&&require,o=0;o<i.length;o++)r(i[o]);return r}({1:[function(e,t,n){n.read=function(e,t,n,i,r){var s,o,u=8*r-i-1,a=(1<<u)-1,f=a>>1,h=-7,l=n?0:r-1,c=n?1:-1,d=e[t+l];for(l+=c,s=d&(1<<-h)-1,d>>=-h,h+=u;h>0;s=256*s+e[t+l],l+=c,h-=8);for(o=s&(1<<-h)-1,s>>=-h,h+=i;h>0;o=256*o+e[t+l],l+=c,h-=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)},n.write=function(e,t,n,i,r,s){var o,u,a,f=8*s-r-1,h=(1<<f)-1,l=h>>1,c=23===r?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=h):(o=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-o))<1&&(o--,a*=2),t+=o+l>=1?c/a:c*Math.pow(2,1-l),t*a>=2&&(o++,a/=2),o+l>=h?(u=0,o=h):o+l>=1?(u=(t*a-1)*Math.pow(2,r),o+=l):(u=t*Math.pow(2,l-1)*Math.pow(2,r),o=0));r>=8;e[n+d]=255&u,d+=p,u/=256,r-=8);for(o=o<<r|u,f+=r;f>0;e[n+d]=255&o,d+=p,o/=256,f-=8);e[n+d-p]|=128*v}},{}],2:[function(e,t,n){"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 r;i("duration",{Duration:r={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),i("timestamp",{Timestamp:r}),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}}}})},{}],3:[function(e,t,n){"use strict";var i=n,r=e(5),s=e(15),o=e(20),u=e(21);i.fallback=function(e,t){for(var n=this.getFieldsById(),e=e instanceof s?e:s.create(e),i=void 0===t?e.len:e.pos+t,a=new(this.getCtor());e.pos<i;){var f=e.tag(),h=n[f.id].resolve(),l=h.resolvedType instanceof r?"uint32":h.type;if(h)if(h.map){var c=h.resolvedKeyType?"uint32":h.keyType,t=e.uint32(),d=a[h.name]={};if(t){t+=e.pos;for(var p=[],v=[];e.pos<t;)1===e.tag().id?p[p.length]=e[c]():void 0!==o.basic[l]?v[v.length]=e[l]():v[v.length]=h.resolvedType.decode(e,e.uint32());for(var y=0;y<p.length;++y)d["object"==typeof p[y]?u.longToHash(p[y]):p[y]]=v[y]}}else if(h.repeated){var g=a[h.name]||(a[h.name]=[]);if(h.packed&&void 0!==o.packed[l]&&2===f.wireType)for(var m=e.uint32()+e.pos;e.pos<m;)g[g.length]=e[l]();else void 0!==o.basic[l]?g[g.length]=e[l]():g[g.length]=h.resolvedType.decode(e,e.uint32())}else void 0!==o.basic[l]?a[h.name]=e[l]():a[h.name]=h.resolvedType.decode(e,e.uint32());else e.skipType(f.wireType)}return a},i.generate=function(e){for(var t=e.getFieldsArray(),n=u.codegen("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(),a=s.resolvedType instanceof r?"uint32":s.type,f=u.safeProp(s.name);if(n("case %d:",s.id),s.map){var h=s.resolvedKeyType?"uint32":s.keyType;n("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[a]?n("else")("v[v.length]=r.%s()",a):n("else")("v[v.length]=types[%d].decode(r,r.uint32())",i,i),n("}")("for(var i=0;i<k.length;++i)")("o[typeof(k[i])==='object'?util.longToHash(k[i]):k[i]]=v[i]")("}")("m%s=o",f)}else s.repeated?(n("m%s||(m%s=[])",f,f),s.packed&&void 0!==o.packed[a]&&n("if(t.wireType===2){")("var e=r.uint32()+r.pos")("while(r.pos<e)")("m%s[m%s.length]=r.%s()",f,f,a)("}else"),void 0!==o.basic[a]?n("m%s[m%s.length]=r.%s()",f,f,a):n("m%s[m%s.length]=types[%d].decode(r,r.uint32())",f,f,i,i)):void 0!==o.basic[a]?n("m%s=r.%s()",f,a):n("m%s=types[%d].decode(r,r.uint32())",f,i,i);n("break")}return n("default:")("r.skipType(t.wireType)")("break")("}")("}")("return m")}},{15:15,20:20,21:21,5:5}],4:[function(e,t,n){"use strict";var i=n,r=e(5),s=e(26),o=e(20),u=e(21);i.fallback=function(e,t){t||(t=s.create());for(var n=this.getFieldsArray(),i=0;i<n.length;){var a=n[i++].resolve(),f=a.resolvedType instanceof r?"uint32":a.type,h=o.basic[f];if(a.map){var l,c,d=a.resolvedKeyType?"uint32":a.keyType;if((l=e[a.name])&&(c=Object.keys(l)).length){t.fork();for(var p=0;p<c.length;++p)t.tag(1,o.mapKey[d])[d](c[p]),void 0!==h?t.tag(2,h)[f](l[c[p]]):a.resolvedType.encode(l[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!==h)for(;p<v.length;)t.tag(a.id,h)[f](v[p++]);else for(;p<v.length;)a.resolvedType.encode(v[p++],t.tag(a.id,2).fork()).ldelim()}}else{var l=e[a.name];(a.required||void 0!==l&&a.long?u.longNeq(l,a.defaultValue):l!==a.defaultValue)&&(void 0!==h?t.tag(a.id,h)[f](l):(a.resolvedType.encode(l,t.fork()),t.len||a.required?t.ldelim(a.id):t.reset()))}}return t},i.generate=function(e){for(var t=e.getFieldsArray(),n=u.codegen("m","w")("w||(w=Writer.create())"),i=0;i<t.length;++i){var s=t[i].resolve(),a=s.resolvedType instanceof r?"uint32":s.type,f=o.basic[a],h=u.safeProp(s.name);if(s.map){var l=s.resolvedKeyType?"uint32":s.keyType,c=o.mapKey[l];n("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])",c,l),void 0!==f?n("w.tag(2,%d).%s(m%s[ks[i]])",f,a,h):n("types[%d].encode(m%s[ks[i]],w.tag(2,2).fork()).ldelim()",i,h),n("}")("w.len&&w.ldelim(%d)||w.reset()",s.id)("}")}else s.repeated?s.packed&&void 0!==o.packed[a]?n("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])",a,h)("w.ldelim(%d)",s.id)("}"):(n("if(m%s)",h)("for(var i=0;i<m%s.length;++i)",h),void 0!==f?n("w.tag(%d,%d).%s(m%s[i])",s.id,f,a,h):n("types[%d].encode(m%s[i],w.tag(%d,2).fork()).ldelim()",i,h,s.id)):(s.required||(s.long?n("if(m%s!==undefined&&util.longNeq(m%s,%j))",h,h,s.defaultValue):n("if(m%s!==undefined&&m%s!==%j)",h,h,s.defaultValue)),void 0!==f?n("w.tag(%d,%d).%s(m%s)",s.id,f,a,h):s.required?n("types[%d].encode(m%s,w.tag(%d,2).fork()).ldelim()",i,h,s.id):n("types[%d].encode(m%s,w.fork()).len&&w.ldelim(%d)||w.reset()",i,h,s.id))}return n("return w")}},{20:20,21:21,26:26,5:5}],5:[function(e,t,n){"use strict";function i(e,t,n){s.call(this,e,n),this.values=t||{},this.a=null}function r(e){return e.a=null,e}t.exports=i;var s=e(11),o=s.extend(i),u=e(21),a=u.b;u.props(o,{valuesById:{get:function(){return this.a||(this.a={},Object.keys(this.values).forEach(function(e){var t=this.values[e];if(this.a[t])throw Error("duplicate id "+t+" in "+this);this.a[t]=e},this)),this.a}}}),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,r(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],r(this)}},{11:11,21:21}],6:[function(e,t,n){"use strict";function i(e,t,n,i,s,o){if(h.isObject(i)?(o=i,i=s=void 0):h.isObject(s)&&(o=s,s=void 0),r.call(this,e,o),!h.isInteger(t)||t<0)throw l("id","a non-negative integer");if(!h.isString(n))throw l("type");if(void 0!==s&&!h.isString(s))throw l("extend");if(void 0!==i&&!/^required|optional|repeated$/.test(i=i.toString().toLowerCase()))throw l("rule","a valid rule string");this.rule=i&&"optional"!==i?i:void 0,this.type=n,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=!!h.Long&&void 0!==f.long[n],this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.c=null}t.exports=i;var r=e(11),s=r.extend(i),o=e(19),u=e(5),a=e(8),f=e(20),h=e(21),l=h.b;h.props(s,{packed:{get:s.isPacked=function(){return null===this.c&&(this.c=this.getOption("packed")!==!1),this.c}}}),s.setOption=function(e,t,n){return"packed"===e&&(this.c=null),r.prototype.setOption.call(this,e,t,n)},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.role,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 n;return this.map?this.defaultValue={}:this.repeated?this.defaultValue=[]:this.options&&void 0!==(n=this.options.default)?this.defaultValue=n:this.defaultValue=e,this.long&&(this.defaultValue=h.Long.fromValue(this.defaultValue)),r.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:h.Long.fromValue(e).toNumber():h.Long.fromValue(e,"u"===this.type.charAt(0)).toString()}return e}},{11:11,19:19,20:20,21:21,5:5,8:8}],7:[function(e,t,n){"use strict";function i(e,t,n){if("function"!=typeof e)throw u("clazz","a function");if(!(t instanceof s))throw u("type","a Type");n||(n={});var a={$type:{value:t}};n.noStatics||o.merge(a,{encode:{value:function(e,t){return this.$type.encode(e,t)}},encodeDelimited:{value:function(e,t){return this.$type.encodeDelimited(e,t)}},decode:{value:function(e){return this.$type.decode(e)}},decodeDelimited:{value:function(e){return this.$type.decodeDelimited(e)}},verify:{value:function(e){return this.$type.verify(e)}}},!0),o.props(e,a);var f=i.defineProperties(new r,t);return e.prototype=f,f.constructor=e,n.noRegister||t.setCtor(e),f}t.exports=i;var r=e(14),s=e(19),o=e(21),u=o.b;i.defineProperties=function(e,t){var n={$type:{value:t}};return t.getFieldsArray().forEach(function(t){t.resolve(),o.isObject(t.defaultValue)||(e[t.name]=t.defaultValue)}),t.getOneofsArray().forEach(function(t){o.prop(e,t.resolve().name,{get:function(){for(var e=t.oneof,n=0;n<e.length;++n){var i=t.parent.fields[e[n]];if(this[e[n]]!=i.defaultValue)return e[n]}},set:function(e){for(var n=t.oneof,i=0;i<n.length;++i)n[i]!==e&&delete this[n[i]]}})}),o.props(e,n),e}},{14:14,19:19,21:21}],8:[function(e,t,n){"use strict";function i(e,t,n,i,s){if(r.call(this,e,t,i,s),!f.isString(n))throw f.b("keyType");this.keyType=n,this.resolvedKeyType=null,this.map=!0}t.exports=i;var r=e(6),s=r.prototype,o=r.extend(i),u=e(5),a=e(20),f=e(21);i.testJSON=function(e){return r.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)}},{20:20,21:21,5:5,6:6}],9:[function(e,t,n){"use strict";function i(e,t,n,i,s,o,f){if(u.isObject(s)?(f=s,s=o=void 0):u.isObject(o)&&(f=o,o=void 0),!u.isString(t))throw a("type");if(!u.isString(n))throw a("requestType");if(!u.isString(i))throw a("responseType");r.call(this,e,f),this.type=t||"rpc",this.requestType=n,this.requestStream=!!s||void 0,this.responseType=i,this.responseStream=!!o||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null}t.exports=i;var r=e(11),s=r.extend(i),o=e(19),u=e(21),a=u.b;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,r.prototype.resolve.call(this)}},{11:11,19:19,21:21}],10:[function(e,t,n){"use strict";function i(e,t){o.call(this,e,t),this.nested=void 0,this.d=null}function r(e){return e.d=null,e}function s(e){if(e&&e.length){for(var t={},n=0;n<e.length;++n)t[e[n].name]=e[n].toJSON();return t}}t.exports=i;var o=e(11),u=o.extend(i),a=e(5),f=e(19),h=e(6),l=e(17),c=e(21),d=c.b,p=[a,f,l,h,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(n){for(var i=e[n],r=0;r<p.length;++r)if(p[r].testJSON(i))return t.add(p[r].fromJSON(n,i));throw d("nested."+n,"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 h&&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 l)throw Error("duplicate name '"+e.name+"' in "+this);for(var n=t.getNestedArray(),s=0;s<n.length;++s)e.add(n[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),r(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),r(this)},u.define=function(e,t){c.isString(e)?e=e.split("."):Array.isArray(e)||(t=e,e=void 0);var n=this;if(e)for(;e.length>0;){var r=e.shift();if(n.nested&&n.nested[r]){if(n=n.nested[r],!(n instanceof i))throw Error("path conflicts with non-namespace objects")}else n.add(n=new i(r))}return t&&n.addJSON(t),n},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 n=this.get(e[0]);return n&&(1===e.length||n instanceof i&&(n=n.lookup(e.slice(1),!0)))?n:null===this.parent||t?null:this.parent.lookup(e)}},{11:11,17:17,19:19,21:21,5:5,6:6}],11:[function(e,t,n){"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 r(e){var t=e.prototype=Object.create(this.prototype);return t.constructor=e,e.extend=r,t}t.exports=i,i.extend=r;var s=e(16),o=e(21),u=o.b,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,n){return n&&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(n){this.setOption(n,e[n],t)},this),this},a.toString=function(){return this.constructor.name+" "+this.getFullName()}},{16:16,21:21}],12:[function(e,t,n){"use strict";function i(e,t,n){if(Array.isArray(t)||(n=t,t=void 0),s.call(this,e,n),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 r(e){e.parent&&e.g.forEach(function(t){t.parent||e.parent.add(t)})}t.exports=i;var s=e(11),o=s.extend(i),u=e(6),a=e(21),f=a.b;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,r(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),r(this)},o.onRemove=function(e){this.g.forEach(function(e){e.parent&&e.parent.remove(e)}),s.prototype.onRemove.call(this,e)}},{11:11,21:21,6:6}],13:[function(e,t,n){"use strict";function i(e){return null===e?null:e.toLowerCase()}function r(e){return e.substring(0,1)+e.substring(1).replace(/_([a-z])(?=[a-z]|$)/g,function(e,t){return t.toUpperCase()})}function s(e,t){function n(e,t){return Error("illegal "+(t||"token")+" '"+e+"' (line "+ie.line()+j)}function s(){var e,t=[];do{if((e=re())!==E&&e!==B)throw n(e);t.push(re()),ue(e),e=oe()}while(e===E||e===B);return t.join("")}function J(e){var t=re();switch(i(t)){case B:case E:return se(t),s();case"true":return!0;case"false":return!1}try{return V(t)}catch(i){if(e&&g.test(t))return t;throw n(t,"value")}}function q(){var e=L(re()),t=e;return ue("to",!0)&&(t=L(re())),ue(F),[e,t]}function V(e){var t=1;"-"===e.charAt(0)&&(t=-1,e=e.substring(1));var r=i(e);switch(r){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(r))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(r))return t*parseFloat(e);throw n(e,"number")}function L(e,t){var r=i(e);switch(r){case"min":return 1;case"max":return 536870911;case"0":return 0}if("-"===e.charAt(0)&&!t)throw n(e,"id");if(/^-?[1-9][0-9]*$/.test(e))return parseInt(e,10);if(/^-?0[x][0-9a-f]+$/.test(r))return parseInt(e,16);if(/^-?0[0-7]+$/.test(e))return parseInt(e,8);throw n(e,"id")}function z(){if(void 0!==Y)throw n("package");if(Y=re(),!g.test(Y))throw n(Y,x);le=le.define(Y),ue(F)}function R(){var e,t=oe();switch(t){case"weak":e=te||(te=[]),re();break;case"public":re();default:e=ee||(ee=[])}t=s(),ue(F),e.push(t)}function $(){ue("="),ne=i(s());var e;if(["proto2",e="proto3"].indexOf(ne)<0)throw n(ne,"syntax");fe=ne===e,ue(F)}function I(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 r=re();if(!y.test(r))throw n(r,"type name");var s=new a(r);if(ue(A,!0)){for(;(t=re())!==T;){var o=i(t);if(!I(s,t))switch(o){case"map":M(s,o);break;case w:case k:case b:P(s,o);break;case"oneof":U(s,o);break;case"extensions":(s.extensions||(s.extensions=[])).push(q(s,o));break;case"reserved":(s.reserved||(s.reserved=[])).push(q(s,o));break;default:if(!fe||!g.test(t))throw n(t);se(t),P(s,k)}}ue(F,!0)}else ue(F);e.add(s)}function P(e,t,i){var s=re();if(!g.test(s))throw n(s,N);var o=re();if(!y.test(o))throw n(o,x);o=r(o),ue("=");var u=L(re()),a=Z(new f(o,u,s,t,i));a.repeated&&a.setOption("packed",fe,!0),e.add(a)}function M(e){ue("<");var t=re();if(void 0===v.mapKey[t])throw n(t,N);ue(",");var i=re();if(!g.test(i))throw n(i,N);ue(">");var s=re();if(!y.test(s))throw n(s,x);s=r(s),ue("=");var o=L(re()),u=Z(new h(s,o,t,i));e.add(u)}function U(e,t){var i=re();if(!y.test(i))throw n(i,x);i=r(i);var s=new l(i);if(ue(A,!0)){for(;(t=re())!==T;)t===O?(K(s,t),ue(F)):(se(t),P(s,k));ue(F,!0)}else ue(F);e.add(s)}function D(e,t){var r=re();if(!y.test(r))throw n(r,x);var s={},o=new c(r,s);if(ue(A,!0)){for(;(t=re())!==T;)i(t)===O?K(o):_(o,t);ue(F,!0)}else ue(F);e.add(o)}function _(e,t){if(!y.test(t))throw n(t,x);var i=t;ue("=");var r=L(re(),!0);e.values[i]=r,Z({})}function K(e,t){var i=ue(S,!0),r=re();if(!g.test(r))throw n(r,x);i&&(ue(j),r=S+r+j,t=oe(),m.test(t)&&(r+=t,re())),ue("="),H(e,r)}function H(e,t){if(ue(A,!0)){for(;(he=re())!==T;){if(!y.test(he))throw n(he,x);t=t+"."+he,ue(":",!0)?W(e,t,J(!0)):H(e,t)}ue(F,!0)}else W(e,t,J(!0))}function W(e,t,n){e.setOption?e.setOption(t,n):e[t]=n}function Z(e){if(ue("[",!0)){do K(e,O);while(ue(",",!0));ue("]")}return ue(F),e}function G(e,t){if(t=re(),!y.test(t))throw n(t,"service name");var r=t,s=new d(r);if(ue(A,!0)){for(;(t=re())!==T;){var o=i(t);switch(o){case O:K(s,o),ue(F);break;case"rpc":X(s,o);break;default:throw n(t)}}ue(F,!0)}else ue(F);e.add(s)}function X(e,t){var r=t,s=re();if(!y.test(s))throw n(s,x);var o,u,a,f;ue(S);var h;if(ue(h="stream",!0)&&(u=!0),!g.test(t=re()))throw n(t);if(o=t,ue(j),ue("returns"),ue(S),ue(h,!0)&&(f=!0),!g.test(t=re()))throw n(t);a=t,ue(j);var l=new p(s,r,o,a,u,f);if(ue(A,!0)){for(;(t=re())!==T;){var c=i(t);switch(c){case O:K(l,c),ue(F);break;default:throw n(t)}}ue(F,!0)}else ue(F);e.add(l)}function Q(e,t){var r=re();if(!g.test(r))throw n(r,"reference");if(ue(A,!0)){for(;(t=re())!==T;){var s=i(t);switch(s){case w:case b:case k:P(e,s,r);break;default:if(!fe||!g.test(t))throw n(t);se(t),P(e,k,r)}}ue(F,!0)}else ue(F)}t||(t=new u);var Y,ee,te,ne,ie=o(e),re=ie.next,se=ie.push,oe=ie.peek,ue=ie.skip,ae=!0,fe=!1;t||(t=new u);for(var he,le=t;null!==(he=re());){var ce=i(he);switch(ce){case"package":if(!ae)throw n(he);z();break;case"import":if(!ae)throw n(he);R();break;case"syntax":if(!ae)throw n(he);$();break;case O:if(!ae)throw n(he);K(le,he),ue(F);break;default:if(I(le,he)){ae=!1;continue}throw n(he)}}return{package:Y,imports:ee,weakImports:te,syntax:ne,root:t}}t.exports=s;var o=e(18),u=e(16),a=e(19),f=e(6),h=e(8),l=e(12),c=e(5),d=e(17),p=e(9),v=e(20),y=/^[a-zA-Z_][a-zA-Z_0-9]*$/,g=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,m=/^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/,w="required",b="repeated",k="optional",O="option",x="name",N="type",A="{",T="}",S="(",j=")",F=";",E='"',B="'"},{12:12,16:16,17:17,18:18,19:19,20:20,5:5,6:6,8:8,9:9}],14:[function(e,t,n){"use strict";function i(e,t){if(e)for(var n=!(t&&t.fieldsOnly),i=this.constructor.$type.fields,r=Object.keys(e),s=0;s<r.length;++s){var o=i[r[s]];o&&o.partOf&&this["set"+o.partOf.ucName](o.name),(o||n)&&(this[r[s]]=e[r[s]])}}t.exports=i,i.prototype.asJSON=function(e){for(var t,n=!(e&&e.fieldsOnly),i=this.constructor.$type.fields,r={},s=Object.keys(this),o=0;o<s.length;++o){var u=i[t=s[o]],a=this[t];if(u)if(u.repeated){if(a&&a.length){for(var f=new Array(a.length),h=0,l=a.length;h<l;++h)f[h]=u.jsonConvert(a[h],e);r[t]=f}}else r[t]=u.jsonConvert(a,e);else n&&(r[t]=a)}return r}},{}],15:[function(e,t,n){"use strict";function i(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function r(){O.Long?(T.int64=a,T.uint64=h,T.sint64=c,T.fixed64=v,T.sfixed64=g):(T.int64=f,T.uint64=l,T.sint64=d,T.fixed64=y,T.sfixed64=m)}function s(e){this.buf=e,this.pos=0,this.len=e.length}function o(e,t){this.id=e,this.wireType=t}function u(){var e=0,t=0,n=0,r=0;if(this.len-this.pos>9){for(n=0;n<4;++n)if(r=this.buf[this.pos++],e|=(127&r)<<7*n,r<128)return new N(e>>>0,t>>>0);if(r=this.buf[this.pos++],e|=(127&r)<<28,t|=(127&r)>>4,r<128)return new N(e>>>0,t>>>0);for(n=0;n<5;++n)if(r=this.buf[this.pos++],t|=(127&r)<<7*n+3,r<128)return new N(e>>>0,t>>>0)}else{for(n=0;n<4;++n){if(this.pos>=this.len)throw i(this);if(r=this.buf[this.pos++],e|=(127&r)<<7*n,r<128)return new N(e>>>0,t>>>0)}if(this.pos>=this.len)throw i(this);if(r=this.buf[this.pos++],e|=(127&r)<<28,t|=(127&r)>>4,r<128)return new N(e>>>0,t>>>0);for(n=0;n<5;++n){if(this.pos>=this.len)throw i(this);if(r=this.buf[this.pos++],t|=(127&r)<<7*n+3,r<128)return new N(e>>>0,t>>>0)}}throw Error("invalid varint encoding")}function a(){return u.call(this).toLong()}function f(){return u.call(this).toNumber()}function h(){return u.call(this).toLong(!0)}function l(){return u.call(this).toNumber(!0)}function c(){return u.call(this).zzDecode().toLong()}function d(){return u.call(this).zzDecode().toNumber()}function p(){if(this.pos+8>this.len)throw i(this,8);return new N((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 v(){return p.call(this).toLong(!0)}function y(){return p.call(this).toNumber(!0)}function g(){return p.call(this).zzDecode().toLong()}function m(){return p.call(this).zzDecode().toNumber()}function w(e){F&&F(),s.call(this,e)}function b(e,t,n){return e.utf8Slice(t,n)}function k(e,t,n){return e.toString("utf8",t,n)}t.exports=s,s.BufferReader=w;var O=e(24),x=e(1),N=O.LongBits,A="undefined"!=typeof Uint8Array?Uint8Array:Array;s.configure=r,s.create=function(e){return new(O.Buffer&&O.Buffer.isBuffer(e)&&w||s)(e)};var T=s.prototype;T.h=A.prototype.slice||A.prototype.subarray,T.tag=function(){if(this.pos>=this.len)throw i(this);return new o(this.buf[this.pos]>>>3,7&this.buf[this.pos++])},T.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},T.uint32=function(){return this.int32()>>>0},T.sint32=function(){var e=this.int32();return e>>>1^-(1&e)},T.bool=function(){return 0!==this.int32()},T.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},T.sfixed32=function(){var e=this.fixed32();return e>>>1^-(1&e)};var S="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(n,i){return t[0]=n[i++],t[1]=n[i++],t[2]=n[i++],t[3]=n[i],e[0]}:function(n,i){return t[3]=n[i++],t[2]=n[i++],t[1]=n[i++],t[0]=n[i],e[0]}}():function(e,t){return x.read(e,t,!1,23,4)};T.float=function(){if(this.pos+4>this.len)throw i(this,4);var e=S(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(n,i){return t[0]=n[i++],t[1]=n[i++],t[2]=n[i++],t[3]=n[i++],t[4]=n[i++],t[5]=n[i++],t[6]=n[i++],t[7]=n[i],e[0]}:function(n,i){return t[7]=n[i++],t[6]=n[i++],t[5]=n[i++],t[4]=n[i++],t[3]=n[i++],t[2]=n[i++],t[1]=n[i++],t[0]=n[i],e[0]}}():function(e,t){return x.read(e,t,!1,52,8)};T.double=function(){if(this.pos+8>this.len)throw i(this,4);var e=j(this.buf,this.pos);return this.pos+=8,e},T.bytes=function(){var e=this.int32()>>>0,t=this.pos,n=this.pos+e;if(n>this.len)throw i(this,e);return this.pos+=e,t===n?new this.buf.constructor(0):this.h.call(this.buf,t,n)},T.string=function(){var e=this.bytes(),t=e.length;if(t){for(var n=new Array(t),i=0,r=0;i<t;){var s=e[i++];if(s<128)n[r++]=s;else if(s>191&&s<224)n[r++]=(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;n[r++]=55296+(o>>10),n[r++]=56320+(1023&o)}else n[r++]=(15&s)<<12|(63&e[i++])<<6|63&e[i++]}return String.fromCharCode.apply(String,n.slice(0,r))}return""},T.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},T.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},T.reset=function(e){return e?(this.buf=e,this.len=e.length):(this.buf=null,this.len=0),this.pos=0,this},T.finish=function(e){var t=this.pos?this.h.call(this.buf,this.pos):this.buf;return this.reset(e),t};var F=function(){if(!O.Buffer)throw Error("Buffer is not supported");E.h=O.Buffer.prototype.slice,B=O.Buffer.prototype.utf8Slice?b:k,F=!1},E=w.prototype=Object.create(s.prototype);E.constructor=w,"undefined"==typeof Float32Array&&(E.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&&(E.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;E.string=function(){var e=this.int32()>>>0,t=this.pos,n=this.pos+e;if(n>this.len)throw i(this,e);return this.pos+=e,B(this.buf,t,n)},E.finish=function(e){var t=this.pos?this.buf.slice(this.pos):this.buf;return this.reset(e),t},r()},{1:1,24:24}],16:[function(e,t,n){"use strict";function i(e){s.call(this,"",e),this.deferred=[],this.files=[]}function r(e){var t=e.parent.lookup(e.extend);if(t){var n=new u(e.getFullName(),e.id,e.type,e.rule,(void 0),e.options);return n.declaringField=e,e.extensionField=n,t.add(n),!0}return!1}t.exports=i;var s=e(10),o=s.extend(i),u=e(6),a=e(21),f=e(2);i.fromJSON=function(e,t){return t||(t=new i),t.setOptions(e.options).addJSON(e.nested)},o.resolvePath=a.resolvePath,o.load=function t(n,i){function r(e,t){if(i){var n=i;i=null,n(e,t)}}function s(t,n){try{if(a.isString(n)&&"{"===n.charAt(0)&&(n=JSON.parse(n)),a.isString(n)){var i=e(13)(n,u);i.imports&&i.imports.forEach(function(e){o(u.resolvePath(t,e))}),i.weakImports&&i.weakImports.forEach(function(e){o(u.resolvePath(t,e),!0)})}else u.setOptions(n.options).addJSON(n.nested)}catch(e){return void r(e)}h||r(null,u)}function o(e,t){var n=e.indexOf("google/protobuf/");if(n>-1){var o=e.substring(n);o in f&&(e=o)}if(!(u.files.indexOf(e)>-1)){if(u.files.push(e),e in f)return++h,void setTimeout(function(){--h,s(e,f[e])});++h,a.fetch(e,function(n,o){if(--h,i)return n?void(t||r(n)):void s(e,o)})}}var u=this;if(!i)return a.asPromise(t,u,n);var h=0;a.isString(n)&&(n=[n]),n.forEach(function(e){o(u.resolvePath("",e))}),h||r(null)},o.e=function(e){var t=this.deferred.slice();this.deferred=[];for(var n=0;n<t.length;)r(t[n])?t.splice(n,1):++n;if(this.deferred=t,e instanceof u&&void 0!==e.extend&&!e.extensionField&&!r(e)&&this.deferred.indexOf(e)<0)this.deferred.push(e);else if(e instanceof s){
var i=e.getNestedArray();for(n=0;n<i.length;++n)this.e(i[n])}},o.f=function(e){if(e instanceof u){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 s)for(var n=e.getNestedArray(),i=0;i<n.length;++i)this.f(n[i])},o.toString=function(){return this.constructor.name}},{10:10,13:13,2:2,21:21,6:6}],17:[function(e,t,n){"use strict";function i(e,t){s.call(this,e,t),this.methods={},this.i=null}function r(e){return e.i=null,e}t.exports=i;var s=e(10),o=s.prototype,u=s.extend(i),a=e(9),f=e(21);f.props(u,{methodsArray:{get:function(){return this.i||(this.i=f.toArray(this.methods))}}}),i.testJSON=function(e){return Boolean(e&&e.methods)},i.fromJSON=function(e,t){var n=new i(e,t.options);return t.methods&&Object.keys(t.methods).forEach(function(e){n.add(a.fromJSON(e,t.methods[e]))}),n},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,r(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,r(this)}return o.remove.call(this,e)},u.create=function(e,t,n){var i={};return f.prop(i,"$rpc",{value:e}),this.getMethodsArray().forEach(function(r){var s=r.name.substring(0,1).toLowerCase()+r.name.substring(1);i[s]=function(i,s){r.resolve();var o;try{o=(t&&r.resolvedRequestType.encodeDelimited(i)||r.resolvedRequestType.encode(i)).finish()}catch(e){return void("function"==typeof setImmediate&&setImmediate||setTimeout)(function(){s(e)})}e(r,o,function(e,t){if(e)return void s(e);var i;try{i=n&&r.resolvedResponseType.decodeDelimited(t)||r.resolvedResponseType.decode(t)}catch(e){return void s(e)}s(null,i)})}}),i}},{10:10,21:21,9:9}],18:[function(e,t,n){"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 r(e){function t(e){return Error("illegal "+e+" (line "+g+")")}function n(){var n='"'===w?o:u;n.lastIndex=v-1;var r=n.exec(e);if(!r)throw t("string");return v=n.lastIndex,c(w),w=null,i(r[1])}function r(t){return e.charAt(t)}function l(){if(m.length>0)return m.shift();if(w)return n();var i,o,u;do{if(v===y)return null;for(i=!1;/\s/.test(u=r(v));)if(u===a&&++g,++v===y)return null;if(r(v)===f){if(++v===y)throw t("comment");if(r(v)===f){for(;r(++v)!==a;)if(v===y)return null;++v,++g,i=!0}else{if((u=r(v))!==h)return f;do{if(u===a&&++g,++v===y)return null;o=u,u=r(v)}while(o!==h||u!==f);++v,i=!0}}}while(i);if(v===y)return null;var l=v;s.lastIndex=0;var c=s.test(r(l++));if(!c)for(;l<y&&!s.test(r(l));)++l;var d=e.substring(v,v=l);return'"'!==d&&"'"!==d||(w=d),d}function c(e){m.push(e)}function d(){if(!m.length){var e=l();if(null===e)return null;c(e)}return m[0]}function p(e,n){var i=d(),r=i===e;if(r)return l(),!0;if(!n)throw t("token '"+i+"', '"+e+"' expected");return!1}e=e.toString();var v=0,y=e.length,g=1,m=[],w=null;return{line:function(){return g},next:l,peek:d,push:c,skip:p}}t.exports=r;var s=/[\s{}=;:[\],'"()<>]/g,o=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,u=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,a="\n",f="/",h="*"},{}],19:[function(e,t,n){"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.j=null,this.k=null,this.l=null,this.m=null}function r(e){return e.j=e.k=e.l=e.m=null,delete e.encode,delete e.decode,e}t.exports=i;var s=e(10),o=s.prototype,u=s.extend(i),a=e(5),f=e(12),h=e(6),l=e(17),c=e(14),d=e(15),p=e(26),v=e(4),y=e(3),g=e(25),m=e(7),w=e(21),b=w.codegen;w.props(u,{fieldsById:{get:function(){if(this.j)return this.j;this.j={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var n=this.fields[e[t]],i=n.id;if(this.j[i])throw Error("duplicate id "+i+" in "+this);this.j[i]=n}return this.j}},fieldsArray:{get:u.getFieldsArray=function(){return this.k||(this.k=w.toArray(this.fields))}},oneofsArray:{get:u.getOneofsArray=function(){return this.l||(this.l=w.toArray(this.oneofs))}},ctor:{get:u.getCtor=function(){if(this.m)return this.m;var e;return e=b.supported?b("p")("P.call(this,p)").eof(this.getFullName()+"$ctor",{P:c}):function(e){c.call(this,e)},e.prototype=m(e,this),this.m=e,e},set:u.setCtor=function(e){if(e&&!(e.prototype instanceof c))throw w.b("ctor","a constructor inheriting from Prototype");this.m=e}}}),i.testJSON=function(e){return Boolean(e&&e.fields)};var k=[a,i,h,l];i.fromJSON=function(e,t){var n=new i(e,t.options);return n.extensions=t.extensions,n.reserved=t.reserved,t.fields&&Object.keys(t.fields).forEach(function(e){n.add(h.fromJSON(e,t.fields[e]))}),t.oneofs&&Object.keys(t.oneofs).forEach(function(e){n.add(f.fromJSON(e,t.oneofs[e]))}),t.nested&&Object.keys(t.nested).forEach(function(e){for(var i=t.nested[e],r=0;r<k.length;++r)if(k[r].testJSON(i))return void n.add(k[r].fromJSON(e,i));throw Error("invalid nested object in "+n+": "+e)}),t.extensions&&t.extensions.length&&(n.extensions=t.extensions),t.reserved&&t.reserved.length&&(n.reserved=t.reserved),n},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 n=this.getOneofsArray();for(t=0;t<n.length;)n[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 h&&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),r(this)}return e instanceof f?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),r(this)):o.add.call(this,e)},u.remove=function(e){if(e instanceof h&&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,r(this)}return o.remove.call(this,e)},u.create=function(e,t){if(e&&"function"!=typeof e){if(e instanceof c)return e}else t=e,e=void 0;if(t){if(!(t.prototype instanceof c))throw w.b("ctor","a constructor inheriting from Prototype")}else t=this.getCtor();return new t(e)},u.encode=function(e,t){return(this.encode=b.supported?v.generate(this).eof(this.getFullName()+"$encode",{Writer:p,types:this.getFieldsArray().map(function(e){return e.resolvedType}),util:w}):v.fallback).call(this,e,t)},u.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},u.decode=function(e,t){return(this.decode=b.supported?y.generate(this).eof(this.getFullName()+"$decode",{Reader:d,types:this.getFieldsArray().map(function(e){return e.resolvedType}),util:w}):y.fallback).call(this,e,t)},u.decodeDelimited=function(e){return e=e instanceof d?e:d.create(e),this.decode(e,e.uint32())},u.verify=function(e){return(this.verify=b.supported?g.generate(this).eof(this.getFullName()+"$verify",{types:this.getFieldsArray().map(function(e){return e.resolvedType})}):g.fallback).call(this,e)}},{10:10,12:12,14:14,15:15,17:17,21:21,25:25,26:26,3:3,4:4,5:5,6:6,7:7}],20:[function(e,t,n){"use strict";function i(e,t){var n=0,i={};for(t|=0;n<e.length;)i[s[n+t]]=e[n++];return i}var r=n,s=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];r.basic=i([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]);var o=[];Object.freeze&&Object.freeze(o),r.defaults=i([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",o]),r.long=i([0,0,0,1,1],7),r.mapKey=i([0,0,0,5,5,0,0,0,1,1,0,2],2),r.packed=i([1,5,0,0,0,5,5,0,0,0,1,1,0])},{}],21:[function(e,t,n){"use strict";function i(e){return"string"==typeof e||e instanceof String}function r(e,t){for(var n=[],i=2;i<arguments.length;++i)n.push(arguments[i]);return new Promise(function(i,r){e.apply(t,n.concat(function(e){e?r(e):i.apply(null,Array.prototype.slice.call(arguments,1))}))})}function s(t,n){function o(){return 0!==f.status&&200!==f.status?n(Error("status "+f.status)):i(f.responseText)?n(null,f.responseText):n(Error("request failed"))}if(!n)return r(s,a,t);var u;try{u=e("fs")}catch(e){}if(u&&u.readFile)return u.readFile(t,"utf8",n);var f=new XMLHttpRequest;f.onreadystatechange=function(){4===f.readyState&&o()},f.open("GET",t,!0),f.send()}function o(e){return/^(?:\/|[a-zA-Z0-9]+:)/.test(e)}function u(e){e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var t=e.split("/"),n=o(e),i="";n&&(i=t.shift()+"/");for(var r=0;r<t.length;)".."===t[r]?r>0?t.splice(--r,2):n?t.splice(r,1):++r:"."===t[r]?t.splice(r,1):++r;return i+t.join("/")}var a=n;a.codegen=e(22),a.isString=i,a.isObject=function(e){return Boolean(e&&"object"==typeof e)},a.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},a.toArray=function(e){if(!e)return[];for(var t=Object.keys(e),n=t.length,i=new Array(n),r=0;r<n;++r)i[r]=e[t[r]];return i},a.b=function(e,t){return TypeError(e+" must be "+(t||"a string"))},a.asPromise=r,a.fetch=s,a.isAbsolutePath=o,a.normalizePath=u,a.resolvePath=function(e,t,n){return n||(t=u(t)),o(t)?t:(n||(e=u(e)),e=e.replace(/(?:\/|^)[^\/]+$/,""),e.length?u(e+"/"+t):t)},a.merge=function(e,t,n){if(t)for(var i=Object.keys(t),r=0;r<i.length;++r)void 0!==e[i[r]]&&n||(e[i[r]]=t[i[r]]);return e},a.safeProp=function(e){return"['"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+"']"},a.newBuffer=function(e){return e=e||0,a.Buffer?a.Buffer.allocUnsafe&&a.Buffer.allocUnsafe(e)||new a.Buffer(e):new("undefined"!=typeof Uint8Array&&Uint8Array||Array)(e)},a.merge(a,e(24))},{22:22,24:24,undefined:void 0}],22:[function(e,t,n){"use strict";function i(){function e(){for(var t=[],i=0;i<arguments.length;++i)t[i]=arguments[i];var l=e.fmt.apply(null,t),c=f;if(n.length){var d=n[n.length-1];r.test(d)?c=++f:u.test(d)&&++c,o.test(d)&&!o.test(l)?(c=++f,h=!0):h&&a.test(d)&&(c=--f,h=!1),s.test(l)&&(c=--f)}for(var p=0;p<c;++p)l="\t"+l;return n.push(l),e}var t=Array.prototype.slice.call(arguments),n=['\t"use strict"'],f=1,h=!1;return e.fmt=function(e){var t=Array.prototype.slice.call(arguments,1),n=0;return e.replace(/%([djs])/g,function(e,i){var r=t[n++];return"j"===i?JSON.stringify(r):String(r)})},e.str=function(e){return"function "+(e?e.replace(/[^\w_$]/g,"_"):"")+"("+t.join(",")+") {\n"+n.join("\n")+"\n}"},e.eof=function(t,n){t&&"object"==typeof t&&(n=t,t=void 0);var r=e.str(t);i.verbose&&console.log("--- codegen ---\n"+r.replace(/^/gm,"> ").replace(/\t/g," ")),r="return "+r;var s,o=[];Array.isArray(n)?s=n.slice():n?(s=Object.keys(n),o=s.map(function(e){return n[e]})):s=[];var u=Function.apply(null,s.concat(r));return o?u.apply(null,o):u()},e}t.exports=i;var r=/[{[]$/,s=/^[}\]]/,o=/:$/,u=/^\s*(?:if|else if|while|for)\b|\b(?:else)\s*$/,a=/\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},{}],23:[function(e,t,n){"use strict";function i(e,t){this.lo=e,this.hi=t}t.exports=i;var r=e(21),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 n=e>>>0,r=(e-n)/4294967296>>>0;return t&&(r=~r>>>0,n=~n>>>0,++n>4294967295&&(n=0,++r>4294967295&&(r=0))),new i(n,r)},i.from=function(e){switch(typeof e){case"number":return i.fromNumber(e);case"string":e=r.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 new r.Long(this.lo,this.hi,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,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<1<<21?3:4:t<16384?t<128?5:6:t<1<<21?7:8:n<128?9:10}},{21:21}],24:[function(e,t,n){(function(t){"use strict";var i=n,r=i.LongBits=e(23),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.longToHash=function(e){return e?r.from(e).toHash():"\0\0\0\0\0\0\0\0"},i.longFromHash=function(e,t){var n=r.fromHash(e);return i.Long?i.Long.fromBits(n.lo,n.hi,t):n.toNumber(Boolean(t))},i.longNeq=function(e,t){return"number"==typeof e?"number"==typeof t?e!==t:(e=r.fromNumber(e)).lo!==t.low||e.hi!==t.high:"number"==typeof t?(t=r.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(n){i.prop(e,n,t[n])})},i.prop=function(e,t,n){var i=!-[1],r=t.substring(0,1).toUpperCase()+t.substring(1);n.get&&(e["get"+r]=n.get),n.set&&(e["set"+r]=i?function(e){n.set.call(this,e),this[t]=e}:n.set),i?void 0!==n.value&&(e[t]=n.value):Object.defineProperty(e,t,n)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{23:23,buffer:"buffer",long:"long"}],25:[function(e,t,n){"use strict";var i=n,r=e(5),s=e(19),o=e(21);i.fallback=function(e){for(var t=this.getFieldsArray(),n=0;n<t.length;){var i=t[n++].resolve(),o=e[i.name];if(void 0===o){if(i.required)return"missing required field "+i.name+" in "+this.getFullName()}else{if(i.resolvedType instanceof r&&void 0===i.resolvedType.getValuesById()[o])return"invalid enum value "+i.name+" = "+o+" in "+this.getFullName();if(i.resolvedType instanceof s){if(!o&&i.required)return"missing required field "+i.name+" in "+this.getFullName();var u;if(null!==(u=i.resolvedType.verify(o)))return u}}}return null},i.generate=function(e){for(var t=e.getFieldsArray(),n=o.codegen("m"),i=!1,u=0;u<t.length;++u){var a=t[u].resolve(),f=o.safeProp(a.name);if(a.required)n("if(m%s===undefined)",f)("return 'missing required field %s in %s'",a.name,e.getFullName());else if(a.resolvedType instanceof r){var h=o.toArray(a.resolvedType.values);n("switch(m%s){",f)("default:")("return 'invalid enum value %s = '+m%s+' in %s'",a.name,f,e.getFullName());for(var l=0,c=h.length;l<c;++l)n("case %d:",h[l]);n("}")}else a.resolvedType instanceof s&&(a.required&&n("if(!m%s)",f)("return 'missing required field %s in %s'",a.name,e.getFullName()),i||(n("var r"),i=!0),n("if((r=types[%d].verify(m%s))!==null)",u,f)("return r"))}return n("return null")}},{19:19,21:21,5:5}],26:[function(e,t,n){"use strict";function i(e,t,n){this.fn=e,this.val=t,this.len=n,this.next=null}function r(){}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(r,0,0),this.tail=this.head,this.states=null}function u(e,t,n){e[t]=255&n}function a(e,t,n){for(;n>127;)e[t++]=127&n|128,n>>>=7;e[t]=n}function f(e,t,n){for(;n.hi;)e[t++]=127&n.lo|128,n.lo=(n.lo>>>7|n.hi<<25)>>>0,n.hi>>>=7;for(;n.lo>127;)e[t++]=127&n.lo|128,n.lo=(n.lo>>>7|n.hi<<25)>>>0;e[t++]=n.lo}function h(e,t,n){e[t++]=255&n,e[t++]=n>>>8&255,e[t++]=n>>>16&255,e[t]=n>>>24}function l(e,t,n){for(var i=0;i<n.length;++i){var r,s=n.charCodeAt(i);s<128?e[t++]=s:s<2048?(e[t++]=s>>6|192,e[t++]=63&s|128):55296===(64512&s)&&56320===(64512&(r=n.charCodeAt(i+1)))?(s=65536+((1023&s)<<10)+(1023&r),++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 c(e){for(var t=e.length>>>0,n=0,i=0;i<t;++i){var r=e.charCodeAt(i);r<128?n+=1:r<2048?n+=2:55296===(64512&r)&&56320===(64512&e.charCodeAt(i+1))?(++i,n+=4):n+=3}return n}function d(e,t){for(var n=0;e;)e.fn(t,n,e.val),n+=e.len,e=e.next;return t}function p(){o.call(this)}function v(e,t,n){e.writeFloatLE(n,t,!0)}function y(e,t,n){e.writeDoubleLE(n,t,!0)}function g(e,t,n){n.length&&n.copy(e,t,0,n.length)}t.exports=o,o.BufferWriter=p;var m=e(24),w=e(1),b=m.LongBits,k="undefined"!=typeof Uint8Array?Uint8Array:Array;o.Op=i,o.State=s,o.create=function(){return new(m.Buffer&&p||o)};var O=o.prototype;O.push=function(e,t,n){var r=new i(e,n,t);return this.tail.next=r,this.tail=r,this.len+=t,this},O.tag=function(e,t){return this.push(u,1,e<<3|7&t)},O.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)},O.int32=function(e){return e<0?this.push(f,10,b.fromNumber(e)):this.uint32(e)},O.sint32=function(e){return this.uint32(e<<1^e>>31)},O.uint64=function(e){var t=b.from(e);return this.push(f,t.length(),t)},O.int64=O.uint64,O.sint64=function(e){var t=b.from(e).zzEncode();return this.push(f,t.length(),t)},O.bool=function(e){return this.push(u,1,e?1:0)},O.fixed32=function(e){return this.push(h,4,e>>>0)},O.sfixed32=function(e){return this.push(h,4,e<<1^e>>31)},O.fixed64=function(e){var t=b.from(e);return this.push(h,4,t.hi).push(h,4,t.lo)},O.sfixed64=function(e){var t=b.from(e).zzEncode();return this.push(h,4,t.hi).push(h,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(n,i,r){e[0]=r,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i]=t[3]}:function(n,i,r){e[0]=r,n[i++]=t[3],n[i++]=t[2],n[i++]=t[1],n[i]=t[0]}}():function(e,t,n){w.write(e,n,t,!1,23,4)};O.float=function(e){return this.push(x,4,e)};var N="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(n,i,r){e[0]=r,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i++]=t[3],n[i++]=t[4],n[i++]=t[5],n[i++]=t[6],n[i]=t[7]}:function(n,i,r){e[0]=r,n[i++]=t[7],n[i++]=t[6],n[i++]=t[5],n[i++]=t[4],n[i++]=t[3],n[i++]=t[2],n[i++]=t[1],n[i]=t[0]}}():function(e,t,n){w.write(e,n,t,!1,52,8)};O.double=function(e){return this.push(N,8,e)};var A=k.prototype.set?function(e,t,n){e.set(n,t)}:function(e,t,n){for(var i=0;i<n.length;++i)e[t+i]=n[i]};O.bytes=function(e){var t=e.length>>>0;return t?this.uint32(t).push(A,t,e):this.push(u,1,0)},O.string=function(e){var t=c(e);return t?this.uint32(t).push(l,t,e):this.push(u,1,0)},O.fork=function(){return this.states=new s(this,this.states),this.head=this.tail=new i(r,0,0),this.len=0,this},O.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(r,0,0),this.len=0),this},O.ldelim=function(e){var t=this.head,n=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=n,this.len+=i,this},O.n=d,O.finish=function(){var e=this.head.next,t=new k(this.len);return this.reset(),d(e,t)};var T=p.prototype=Object.create(o.prototype);T.constructor=p,"undefined"==typeof Float32Array&&(T.float=function(e){return this.push(v,4,e)}),"undefined"==typeof Float64Array&&(T.double=function(e){return this.push(y,8,e)}),k.prototype.set&&m.Buffer&&m.Buffer.prototype.set||(T.bytes=function(e){var t=e.length>>>0;return t?this.uint32(t).push(g,t,e):this.push(u,1,0)});var S=function(){return m.Buffer&&m.Buffer.prototype.utf8Write?function(e,t,n){n.length<40?l(e,t,n):e.utf8Write(n,t)}:function(e,t,n){n.length<40?l(e,t,n):e.write(n,t)}}();T.string=function(e){var t=e.length<40?c(e):m.Buffer.byteLength(e);return t?this.uint32(t).push(S,t,e):this.push(u,1,0)},T.finish=function(){var e=this.head.next,t=m.Buffer.allocUnsafe&&m.Buffer.allocUnsafe(this.len)||new m.Buffer(this.len);return this.reset(),d(e,t)}},{1:1,24:24}],27:[function(e,t,n){(function(t){"use strict";function i(e,t,n){return"function"==typeof t?(n=t,t=new r.Root):t||(t=new r.Root),t.load(e,n)}var r=t.protobuf=n;r.load=i,r.tokenize=e(18),r.parse=e(13),r.Writer=e(26),r.BufferWriter=r.Writer.BufferWriter,r.Reader=e(15),r.BufferReader=r.Reader.BufferReader,r.encoder=e(4),r.decoder=e(3),r.verifier=e(25),r.ReflectionObject=e(11),r.Namespace=e(10),r.Root=e(16),r.Enum=e(5),r.Type=e(19),r.Field=e(6),r.OneOf=e(12),r.MapField=e(8),r.Service=e(17),r.Method=e(9),r.Prototype=e(14),r.inherits=e(7),r.types=e(20),r.common=e(2),r.util=e(21),"function"==typeof define&&define.amd&&define(["long"],function(e){return e&&(r.util.Long=e,r.Reader.configure()),r})}).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,20:20,21:21,25:25,26:26,3:3,4:4,5:5,6:6,7:7,8:8,9:9}]},{},[27]);
//# sourceMappingURL=protobuf.min.js.map