New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

protobufjs

Package Overview
Dependencies
Maintainers
1
Versions
168
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

protobufjs - npm Package Compare versions

Comparing version 6.5.1 to 6.5.2

scripts/postinstall.js

14

CHANGELOG.md

@@ -0,1 +1,15 @@

# [6.5.2](https://github.com/dcodeIO/protobuf.js/releases/tag/6.5.2)
## Docs
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/8cff92fe3b7ddb1930371edb4937cd0db9216e52) Added coverage reporting<br />
## CLI
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/cbaaae99b4e39a859664df0e6d20f0491169f489) Added version scheme warning to everything CLI so that we don't need this overly explicit in README<br />
## Other
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6877b3399f1a4c33568221bffb4e298b01b14439) Coverage progress, 100%<br />
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/711a9eb55cb796ec1e51af7d56ef2ebbd5903063) Coverage progress<br />
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/e7526283ee4dd82231235afefbfad6af54ba8970) Attempted to fix badges once and for all<br />
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/5aa296c901c2b460ee3be4530ede394e2a45e0ea) Coverage progress<br />
# [6.5.1](https://github.com/dcodeIO/protobuf.js/releases/tag/6.5.1)

@@ -2,0 +16,0 @@

1

cli/util.js

@@ -111,2 +111,3 @@ "use strict";

});
require("../scripts/postinstall"); // emit postinstall warning, if any
if (!install.length)

@@ -113,0 +114,0 @@ return;

8

dist/noparse/protobuf.min.js
/*!
* protobuf.js v6.5.1 (c) 2016, Daniel Wirtz
* Compiled Wed, 18 Jan 2017 02:28:43 UTC
* protobuf.js v6.5.2 (c) 2016, Daniel Wirtz
* Compiled Thu, 19 Jan 2017 16:30:55 UTC
* Licensed under the BSD-3-Clause License
* see: https://github.com/dcodeIO/protobuf.js for details
*/
!function(e,t){"use strict";!function e(t,r,n){function i(o,u){if(!r[o]){if(!t[o]){var f="function"==typeof require&&require;if(!u&&f)return f(o,!0);if(s)return s(o,!0);var a=Error("Cannot find module '"+o+"'");throw a.code="MODULE_NOT_FOUND",a}var h=r[o]={exports:{}};t[o][0].call(h.exports,function(e){var r=t[o][1][e];return i(r?r:e)},h,h.exports,e,t,r,n)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(e,t){function r(e,t){for(var r=[],n=2;n<arguments.length;)r.push(arguments[n++]);var i=!0;return new Promise(function(n,s){r.push(function(e){if(i)if(i=!1,e)s(e);else{for(var t=[],r=1;r<arguments.length;)t.push(arguments[r++]);n.apply(null,t)}});try{e.apply(t||this,r)}catch(e){i&&(i=!1,s(e))}})}t.exports=r},{}],2:[function(e,r,n){var i=n;i.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var s=Array(64),o=Array(123),u=0;u<64;)o[s[u]=u<26?u+65:u<52?u+71:u<62?u-4:u-59|43]=u++;i.encode=function(e,t,r){for(var n,i=[],o=0,u=0;t<r;){var f=e[t++];switch(u){case 0:i[o++]=s[f>>2],n=(3&f)<<4,u=1;break;case 1:i[o++]=s[n|f>>4],n=(15&f)<<2,u=2;break;case 2:i[o++]=s[n|f>>6],i[o++]=s[63&f],u=0}}return u&&(i[o++]=s[n],i[o]=61,1===u&&(i[o+1]=61)),String.fromCharCode.apply(String,i)};var f="invalid encoding";i.decode=function(e,r,n){for(var i,s=n,u=0,a=0;a<e.length;){var h=e.charCodeAt(a++);if(61===h&&u>1)break;if((h=o[h])===t)throw Error(f);switch(u){case 0:i=h,u=1;break;case 1:r[n++]=i<<2|(48&h)>>4,i=h,u=2;break;case 2:r[n++]=(15&i)<<4|(60&h)>>2,i=h,u=3;break;case 3:r[n++]=(3&i)<<6|h,u=0}}if(1===u)throw Error(f);return n-s},i.test=function(e){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e)}},{}],3:[function(e,r){function n(){function e(){for(var t=[],r=0;r<arguments.length;)t.push(arguments[r++]);var n=i.apply(null,t),h=p;if(c.length){var l=c[c.length-1];s.test(l)?h=++p:f.test(l)&&++h,u.test(l)&&!u.test(n)?(h=++p,d=!0):d&&a.test(l)&&(h=--p,d=!1),o.test(n)&&(h=--p)}for(r=0;r<h;++r)n="\t"+n;return c.push(n),e}function r(e){return"function"+(e?" "+e.replace(/[^\w_$]/g,"_"):"")+"("+l.join(",")+") {\n"+c.join("\n")+"\n}"}function h(r,i){"object"==typeof r&&(i=r,r=t);var s=e.str(r);n.verbose&&console.log("--- codegen ---\n"+s.replace(/^/gm,"> ").replace(/\t/g," "));var o=Object.keys(i||(i={}));return Function.apply(null,o.concat("return "+s)).apply(null,o.map(function(e){return i[e]}))}for(var l=[],c=[],p=1,d=!1,y=0;y<arguments.length;)l.push(arguments[y++]);return e.str=r,e.eof=h,e}function i(e){for(var t=[],r=1;r<arguments.length;)t.push(arguments[r++]);if(r=0,e=e.replace(/%([dfjs])/g,function(e,n){switch(n){case"d":return Math.floor(t[r++]);case"f":return+t[r++];case"j":return JSON.stringify(t[r++]);default:return t[r++]}}),r!==t.length)throw Error("argument count mismatch");return e}r.exports=n;var s=/[{[]$/,o=/^[}\]]/,u=/:$/,f=/^\s*(?:if|}?else if|while|for)\b|\b(?:else)\s*$/,a=/\b(?:break|continue)(?: \w+)?;?$|^\s*return\b/;n.sprintf=i,n.supported=!1;try{n.supported=1===n("a","b")("return a-b").eof()(2,1)}catch(e){}n.verbose=!1},{}],4:[function(e,r){function n(){this.a={}}r.exports=n;var i=n.prototype;i.on=function(e,t,r){return(this.a[e]||(this.a[e]=[])).push({fn:t,ctx:r||this}),this},i.off=function(e,r){if(e===t)this.a={};else if(r===t)this.a[e]=[];else for(var n=this.a[e],i=0;i<n.length;)n[i].fn===r?n.splice(i,1):++i;return this},i.emit=function(e){var t=this.a[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},{}],5:[function(e,t){function r(e){for(var t=Object.keys(this),r=0;r<t.length;++r)e[t[r]]=this[t[r]];var n=e.prototype=Object.create(this.prototype);return n.constructor=e,n}t.exports=r},{}],6:[function(e,r){function n(e,t){return t?u&&u.readFile?u.readFile(e,"utf8",function(r,n){return r&&"undefined"!=typeof XMLHttpRequest?i(e,t):t(r,n)}):i(e,t):s(n,this,e)}function i(e,r){var n=new XMLHttpRequest;n.onreadystatechange=function(){return 4===n.readyState?0===n.status||200===n.status?r(null,n.responseText):r(Error("status "+n.status)):t},n.open("GET",e),n.send()}r.exports=n;var s=e(1),o=e(7),u=o("fs")},{1:1,7:7}],7:[function(e,t,r){function n(e){try{var t=eval("quire".replace(/^/,"re"))(e);if(t&&(t.length||Object.keys(t).length))return t}catch(e){}return null}t.exports=n},{}],8:[function(e,t,r){var n=r,i=n.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},s=n.normalize=function(e){e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var t=e.split("/"),r=i(e),n="";r&&(n=t.shift()+"/");for(var s=0;s<t.length;)".."===t[s]?s>0?t.splice(--s,2):r?t.splice(s,1):++s:"."===t[s]?t.splice(s,1):++s;return n+t.join("/")};n.resolve=function(e,t,r){return r||(t=s(t)),i(t)?t:(r||(e=s(e)),(e=e.replace(/(?:\/|^)[^\/]+$/,"")).length?s(e+"/"+t):t)}},{}],9:[function(e,t){function r(e,t,r){var n=r||8192,i=n>>>1,s=null,o=n;return function(r){if(r<1||r>i)return e(r);o+r>n&&(s=e(n),o=0);var u=t.call(s,o,o+=r);return 7&o&&(o=(7|o)+1),u}}t.exports=r},{}],10:[function(e,t,r){var n=r;n.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)r=e.charCodeAt(n),r<128?t+=1:r<2048?t+=2:55296===(64512&r)&&56320===(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},n.read=function(e,t,r){var n=r-t;if(n<1)return"";for(var i,s=null,o=[],u=0;t<r;)i=e[t++],i<128?o[u++]=i:i>191&&i<224?o[u++]=(31&i)<<6|63&e[t++]:i>239&&i<365?(i=((7&i)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[u++]=55296+(i>>10),o[u++]=56320+(1023&i)):o[u++]=(15&i)<<12|(63&e[t++])<<6|63&e[t++],u>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),u=0);return s?(u&&s.push(String.fromCharCode.apply(String,o.slice(0,u))),s.join("")):u?String.fromCharCode.apply(String,o.slice(0,u)):""},n.write=function(e,t,r){for(var n,i,s=r,o=0;o<e.length;++o)n=e.charCodeAt(o),n<128?t[r++]=n:n<2048?(t[r++]=n>>6|192,t[r++]=63&n|128):55296===(64512&n)&&56320===(64512&(i=e.charCodeAt(o+1)))?(n=65536+((1023&n)<<10)+(1023&i),++o,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-s}},{}],11:[function(e,t){function r(e){return n(e)}function n(t,n){if(i||(i=e(29)),!(t instanceof i))throw TypeError("type must be a Type");if(n){if("function"!=typeof n)throw TypeError("ctor must be a function")}else n=o.codegen("p")("return ctor.call(this,p)").eof(t.name,{ctor:s});n.constructor=r;var u=n.prototype=new s;return u.constructor=n,o.merge(n,s,!0),n.$type=t,u.$type=t,t.fieldsArray.forEach(function(e){u[e.name]=Array.isArray(e.resolve().defaultValue)?o.emptyArray:o.isObject(e.defaultValue)&&!e.long?o.emptyObject:e.defaultValue}),t.oneofsArray.forEach(function(e){Object.defineProperty(u,e.resolve().name,{get:o.oneOfGetter(e.oneof),set:o.oneOfSetter(e.oneof)})}),t.ctor=n,u}t.exports=r;var i,s=e(18),o=e(31);r.create=n,r.prototype=s},{18:18,29:29,31:31}],12:[function(e,t,r){function n(e,t,r,n){if(t.resolvedType)if(t.resolvedType instanceof o){var i=t.resolvedType.values;e("switch(d%s){",n),Object.keys(i).forEach(function(r){t.repeated&&i[r]===t.typeDefault&&e("default:"),e("case%j:",r)("case %j:",i[r])("m%s=%j",n,i[r])("break")}),e("}")}else e("m%s=types[%d].fromObject(d%s)",n,r,n);else{var s=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",n,n);break;case"uint64":s=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,s)('else if(typeof d%s==="string")',n)("m%s=parseInt(d%s,10)",n,n)('else if(typeof d%s==="number")',n)("m%s=d%s",n,n)('else if(typeof d%s==="object")',n)("m%s=new util.LongBits(d%s.low,d%s.high).toNumber(%s)",n,n,n,s?"true":"");break;case"bytes":e('if(typeof d%s==="string")',n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",n,n,n)("else if(d%s&&d%s.length)",n,n)("m%s=d%s",n,n);break;case"string":e("m%s=String(d%s)",n,n);break;case"bool":e("m%s=Boolean(d%s)",n,n)}}return e}function i(e,t,r,n){if(t.resolvedType)t.resolvedType instanceof o?e("d%s=o.enums===String?types[%d].values[m%s]:m%s",n,r,n,n):e("d%s=types[%d].toObject(m%s,o)",n,r,n);else{var i=!1;switch(t.type){case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',n)("d%s=o.longs===String?String(m%s):m%s",n,n,n)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low,m%s.high).toNumber(%s):m%s",n,n,n,n,i?"true":"",n);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",n,n,n,n,n);break;default:e("d%s=m%s",n,n)}}return e}var s=r,o=e(15),u=e(31);s.fromObject=function(e){var t=e.fieldsArray;if(!t.length)return u.codegen()("return new(this.ctor)");for(var r=u.codegen("d")("var m=new(this.ctor)"),i=0;i<t.length;++i){var s=t[i].resolve(),f=u.safeProp(s.name);s.map?(r("if(d%s){",f)("m%s={}",f)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",f),n(r,s,i,f+"[ks[i]]")("}")("}")):s.repeated?(r("if(d%s){",f)("m%s=[]",f)("for(var i=0;i<d%s.length;++i){",f),n(r,s,i,f+"[i]")("}")("}")):(s.resolvedType instanceof o||r("if(d%s!==undefined&&d%s!==null){",f,f),n(r,s,i,f),s.resolvedType instanceof o||r("}"))}return r("return m")},s.toObject=function(e){var t=e.fieldsArray;if(!t.length)return u.codegen()("return {}");var r=u.codegen("m","o")("if(!o)")("o={}")("var d={}"),n=t.filter(function(e){return e.resolve().repeated});n.length&&(r("if(o.arrays||o.defaults){"),n.forEach(function(e){r("d%s=[]",u.safeProp(e.name))}),r("}"));var s=t.filter(function(e){return e.map});s.length&&(r("if(o.objects||o.defaults){"),s.forEach(function(e){r("d%s={}",u.safeProp(e.name))}),r("}"));var f=t.filter(function(e){return!(e.repeated||e.map)});f.length&&(r("if(o.defaults){"),f.forEach(function(e){var t=u.safeProp(e.name);e.resolvedType instanceof o?r("d%s=o.enums===String?%j:%j",t,e.resolvedType.valuesById[e.typeDefault],e.typeDefault):e.long?r("if(util.Long){")("var n=new util.Long(%d,%d,%j)",e.typeDefault.low,e.typeDefault.high,e.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",t)("}else")("d%s=o.longs===String?%j:%d",t,""+e.typeDefault,e.typeDefault.toNumber()):e.bytes?r("d%s=o.bytes===String?%j:%s",t,String.fromCharCode.apply(String,e.typeDefault),"["+Array.prototype.slice.call(e.typeDefault).join(",")+"]"):r("d%s=%j",t,e.typeDefault)}),r("}"));for(var a=0;a<t.length;++a){var h=t[a],l=u.safeProp(h.name);r("if(m%s!==undefined&&m%s!==null&&m.hasOwnProperty(%j)){",l,l,h.name),h.map?(r("d%s={}",l)("for(var ks2=Object.keys(m%s),j=0;j<ks2.length;++j){",l),i(r,h,a,l+"[ks2[j]]")("}")):h.repeated?(r("d%s=[]",l)("for(var j=0;j<m%s.length;++j){",l),i(r,h,a,l+"[j]")("}")):i(r,h,a,l),r("}")}return r("return d")}},{15:15,31:31}],13:[function(e,r){function n(e){var r=e.fieldsArray,u=o.codegen("r","l")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new(this.ctor)")("while(r.pos<c){")("var t=r.uint32()");e.group&&u("if((t&7)===4)")("break"),u("switch(t>>>3){");for(var f=0;f<r.length;++f){var a=r[f].resolve(),h=a.resolvedType instanceof i?"uint32":a.type,l="m"+o.safeProp(a.name);u("case %d:",a.id),a.map?(u("r.skip().pos++")("if(%s===util.emptyObject)",l)("%s={}",l)("var k=r.%s()",a.keyType)("r.pos++"),s.basic[h]===t?u('%s[typeof k==="object"?util.longToHash(k):k]=types[%d].decode(r,r.uint32())',l,f):u('%s[typeof k==="object"?util.longToHash(k):k]=r.%s()',l,h)):a.repeated?(u("if(!(%s&&%s.length))",l,l)("%s=[]",l),(n.compat||a.packed)&&s.packed[h]!==t&&u("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",l,h)("}else"),s.basic[h]===t?u(a.resolvedType.group?"%s.push(types[%d].decode(r))":"%s.push(types[%d].decode(r,r.uint32()))",l,f):u("%s.push(r.%s())",l,h)):s.basic[h]===t?u(a.resolvedType.group?"%s=types[%d].decode(r)":"%s=types[%d].decode(r,r.uint32())",l,f):u("%s=r.%s()",l,h),u("break")}return u("default:")("r.skipType(t&7)")("break")("}")("}")("return m")}r.exports=n,n.compat=!0;var i=e(15),s=e(30),o=e(31)},{15:15,30:30,31:31}],14:[function(e,r){function n(e,t,r,n){return t.resolvedType.group?e("types[%d].encode(%s,w.uint32(%d)).uint32(%d)",r,n,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%d].encode(%s,w.uint32(%d).fork()).ldelim()",r,n,(t.id<<3|2)>>>0)}function i(e){for(var r,i,f=e.fieldsArray,a=e.oneofsArray,h=u.codegen("m","w")("if(!w)")("w=Writer.create()"),r=0;r<f.length;++r){var l=f[r].resolve();if(!l.partOf){var c=l.resolvedType instanceof s?"uint32":l.type,p=o.basic[c];i="m"+u.safeProp(l.name),l.map?(h("if(%s&&m.hasOwnProperty(%j)){",i,l.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",i)("w.uint32(%d).fork().uint32(%d).%s(ks[i])",(l.id<<3|2)>>>0,8|o.mapKey[l.keyType],l.keyType),p===t?h("types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",r,i):h(".uint32(%d).%s(%s[ks[i]]).ldelim()",16|p,c,i),h("}")("}")):l.repeated?l.packed&&o.packed[c]!==t?h("if(%s&&%s.length&&m.hasOwnProperty(%j)){",i,i,l.name)("w.uint32(%d).fork()",(l.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",i)("w.%s(%s[i])",c,i)("w.ldelim()")("}"):(h("if(%s!==undefined&&m.hasOwnProperty(%j)){",i,l.name)("for(var i=0;i<%s.length;++i)",i),p===t?n(h,l,r,i+"[i]"):h("w.uint32(%d).%s(%s[i])",(l.id<<3|p)>>>0,c,i),h("}")):(l.required||(l.long?h("if(%s!==undefined&&%s!==null&&m.hasOwnProperty(%j))",i,i,l.name):l.bytes?h("if(%s&&m.hasOwnProperty(%j))",i,l.name):h("if(%s!==undefined&&m.hasOwnProperty(%j))",i,l.name)),p===t?n(h,l,r,i):h("w.uint32(%d).%s(%s)",(l.id<<3|p)>>>0,c,i))}}for(var r=0;r<a.length;++r){var d=a[r];h("switch(%s){","m"+u.safeProp(d.name));for(var y=d.fieldsArray,v=0;v<y.length;++v){var l=y[v],c=l.resolvedType instanceof s?"uint32":l.type,p=o.basic[c];i="m"+u.safeProp(l.name),h("case%j:",l.name),p===t?n(h,l,f.indexOf(l),i):h("w.uint32(%d).%s(%s)",(l.id<<3|p)>>>0,c,i),h("break")}h("}")}return h("return w")}r.exports=i;var s=e(15),o=e(30),u=e(31)},{15:15,30:30,31:31}],15:[function(e,r){function n(e,t,r){i.call(this,e,r),this.valuesById={},this.values=Object.create(this.valuesById),this.comments={};var n=this;Object.keys(t||{}).forEach(function(e){n.valuesById[n.values[e]=t[e]]=e})}r.exports=n;var i=e(21),s=i.extend(n);n.className="Enum";var o=e(31);n.testJSON=function(e){return!(!e||!e.values)},n.fromJSON=function(e,t){return new n(e,t.values,t.options)},s.toJSON=function(){return{options:this.options,values:this.values}},s.add=function(e,r,n){if(!o.isString(e))throw TypeError("name must be a string");if(!o.isInteger(r))throw TypeError("id must be an integer");if(this.values[e]!==t)throw Error("duplicate name '"+e+"' in "+this);if(this.valuesById[r]!==t)throw Error("duplicate id "+r+" in "+this);return this.valuesById[this.values[e]=r]=e,this.comments[e]=n||null,this},s.remove=function(e){if(!o.isString(e))throw TypeError("name must be a string");var r=this.values[e];if(r===t)throw Error("'"+e+"' is not a name of "+this);return delete this.valuesById[r],delete this.values[e],delete this.comments[e],this}},{21:21,31:31}],16:[function(e,r){function n(e,r,n,s,o,u){if(h.isObject(s)?(u=s,s=o=t):h.isObject(o)&&(u=o,o=t),i.call(this,e,u),!h.isInteger(r)||r<0)throw TypeError("id must be a non-negative integer");if(!h.isString(n))throw TypeError("type must be a string");if(o!==t&&!h.isString(o))throw TypeError("extend must be a string");if(s!==t&&!/^required|optional|repeated$/.test(s=(""+s).toLowerCase()))throw TypeError("rule must be a string rule");this.rule=s&&"optional"!==s?s:t,this.type=n,this.id=r,this.extend=o||t,this.required="required"===s,this.optional=!this.required,this.repeated="repeated"===s,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!h.Long&&a.long[n]!==t,this.bytes="bytes"===n,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.b=null}r.exports=n;var i=e(21),s=i.extend(n);n.className="Field";var o,u,f=e(15),a=e(30),h=e(31);Object.defineProperty(s,"packed",{get:function(){return null===this.b&&(this.b=this.getOption("packed")!==!1),this.b}}),s.setOption=function(e,t,r){return"packed"===e&&(this.b=null),i.prototype.setOption.call(this,e,t,r)},n.testJSON=function(e){return!(!e||e.id===t)},n.fromJSON=function(r,i){return i.keyType!==t?(u||(u=e(17)),u.fromJSON(r,i)):new n(r,i.id,i.type,i.rule,i.extend,i.options)},s.toJSON=function(){return{rule:"optional"!==this.rule&&this.rule||t,type:this.type,id:this.id,extend:this.extend,options:this.options}},s.resolve=function(){if(this.resolved)return this;if((this.typeDefault=a.defaults[this.type])===t)if(o||(o=e(29)),this.resolvedType=this.parent.lookup(this.type,o))this.typeDefault=null;else{if(!(this.resolvedType=this.parent.lookup(this.type,f)))throw Error("unresolvable field type: "+this.type);this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]}if(this.options&&this.options.default!==t&&(this.typeDefault=this.options.default,this.resolvedType instanceof f&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.long)this.typeDefault=h.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var r;h.base64.test(this.typeDefault)?h.base64.decode(this.typeDefault,r=h.newBuffer(h.base64.length(this.typeDefault)),0):h.utf8.write(this.typeDefault,r=h.newBuffer(h.utf8.length(this.typeDefault)),0),this.typeDefault=r}return this.map?this.defaultValue={}:this.repeated?this.defaultValue=[]:this.defaultValue=this.typeDefault,i.prototype.resolve.call(this)}},{15:15,17:17,21:21,29:29,30:30,31:31}],17:[function(e,r){function n(e,t,r,n,s){if(i.call(this,e,t,n,s),!f.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}r.exports=n;var i=e(16),s=i.prototype,o=i.extend(n);n.className="MapField";var u=e(30),f=e(31);n.testJSON=function(e){return i.testJSON(e)&&e.keyType!==t},n.fromJSON=function(e,t){return new n(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;if(u.mapKey[this.keyType]===t)throw Error("invalid key type: "+this.keyType);return s.resolve.call(this)}},{16:16,30:30,31:31}],18:[function(e,t){function r(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}t.exports=r;var n=e(31);r.encode=function(e,t){return this.$type.encode(e,t)},r.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},r.decode=function(e){return this.$type.decode(e)},r.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},r.verify=function(e){return this.$type.verify(e)},r.fromObject=function(e){return this.$type.fromObject(e)},r.from=r.fromObject,r.toObject=function(e,t){return this.$type.toObject(e,t)},r.prototype.toObject=function(e){return this.$type.toObject(this,e)},r.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},{31:31}],19:[function(e,r){function n(e,r,n,s,o,f,a){if(u.isObject(o)?(a=o,o=f=t):u.isObject(f)&&(a=f,f=t),r&&!u.isString(r))throw TypeError("type must be a string");if(!u.isString(n))throw TypeError("requestType must be a string");if(!u.isString(s))throw TypeError("responseType must be a string");i.call(this,e,a),this.type=r||"rpc",this.requestType=n,this.requestStream=!!o||t,this.responseType=s,this.responseStream=!!f||t,this.resolvedRequestType=null,this.resolvedResponseType=null}r.exports=n;var i=e(21),s=i.extend(n);n.className="Method";var o=e(29),u=e(31);n.testJSON=function(e){return!(!e||e.requestType===t)},n.fromJSON=function(e,t){return new n(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options)},s.toJSON=function(){return{type:"rpc"!==this.type&&this.type||t,requestType:this.requestType,requestStream:this.requestStream,responseType:this.responseType,responseStream:this.responseStream,options:this.options}},s.resolve=function(){if(this.resolved)return this;if(!(this.resolvedRequestType=this.parent.lookup(this.requestType,o)))throw Error("unresolvable request type: "+this.requestType);if(!(this.resolvedResponseType=this.parent.lookup(this.responseType,o)))throw Error("unresolvable response type: "+this.requestType);return i.prototype.resolve.call(this)}},{21:21,29:29,31:31}],20:[function(e,r){function n(){a||(a=e(29)),h||(h=e(28)),l=[p,a,h,d,s],c="one of "+l.map(function(e){return e.name}).join(", ")}function i(e){if(!e||!e.length)return t;for(var r={},n=0;n<e.length;++n)r[e[n].name]=e[n].toJSON();return r}function s(e,r){u.call(this,e,r),this.nested=t,this.c=null,this.d=[]}function o(e){e.c=null;for(var t=0;t<e.d.length;++t)delete e[e.d[t]];return e.d=[],e}r.exports=s;var u=e(21),f=u.extend(s);s.className="Namespace";var a,h,l,c,p=e(15),d=e(16),y=e(31);s.testJSON=function(e){return!(!e||e.fields||e.values||e.id!==t||e.oneof||e.methods||e.requestType!==t)},s.fromJSON=function(e,t){return new s(e,t.options).addJSON(t.nested)},s.arrayToJSON=i,Object.defineProperty(f,"nestedArray",{get:function(){return this.c||(this.c=y.toArray(this.nested))}}),f.toJSON=function(){return{options:this.options,nested:i(this.nestedArray)}},f.addJSON=function(e){var t=this;return e&&(l||n(),Object.keys(e).forEach(function(r){for(var n=e[r],i=0;i<l.length;++i)if(l[i].testJSON(n))return t.add(l[i].fromJSON(r,n));throw TypeError("nested."+r+" must be JSON for "+c)})),this},f.get=function(e){return this.nested===t?null:this.nested[e]||null},f.getEnum=function(e){if(this.nested&&this.nested[e]instanceof p)return this.nested[e].values;throw Error("no such enum")},f.add=function(e){if(l||n(),!e||l.indexOf(e.constructor)<0)throw TypeError("object must be "+c);if(e instanceof d&&e.extend===t)throw TypeError("object must be an extension field when not part of a type");if(this.nested){var r=this.get(e.name);if(r){if(!(r instanceof s&&e instanceof s)||r instanceof a||r instanceof h)throw Error("duplicate name '"+e.name+"' in "+this);for(var i=r.nestedArray,u=0;u<i.length;++u)e.add(i[u]);this.remove(r),this.nested||(this.nested={}),e.setOptions(r.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),o(this)},f.remove=function(e){if(!(e instanceof u))throw TypeError("object must be 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=t),e.onRemove(this),o(this)},f.define=function(e,r){y.isString(e)?e=e.split("."):Array.isArray(e)||(r=e,e=t);var n=this;if(e)for(;e.length>0;){var i=e.shift();if(n.nested&&n.nested[i]){if(n=n.nested[i],!(n instanceof s))throw Error("path conflicts with non-namespace objects")}else n.add(n=new s(i))}return r&&n.addJSON(r),n},f.resolve=function(){a||(a=e(29)),h||(a=e(28));for(var t=this.nestedArray,r=0;r<t.length;++r)if(/^[A-Z]/.test(t[r].name)){if(t[r]instanceof a||t[r]instanceof h)this[t[r].name]=t[r];else{if(!(t[r]instanceof p))continue;this[t[r].name]=t[r].values}this.d.push(t[r].name)}return u.prototype.resolve.call(this)},f.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof s?e[t++].resolveAll():e[t++].resolve();return f.resolve.call(this)},f.lookup=function(e,r,n){if("boolean"==typeof r&&(n=r,r=t),y.isString(e)&&e.length)e=e.split(".");else if(!e.length)return null;if(""===e[0])return this.root.lookup(e.slice(1),r);var i=this.get(e[0]);return i&&1===e.length&&(!r||i instanceof r)||i instanceof s&&(i=i.lookup(e.slice(1),r,!0))?i:null===this.parent||n?null:this.parent.lookup(e,r)},f.lookupType=function(t){a||(a=e(29));var r=this.lookup(t,a);if(!r)throw Error("no such type");return r},f.lookupService=function(t){h||(h=e(28));var r=this.lookup(t,h);if(!r)throw Error("no such service");return r},f.lookupEnum=function(e){var t=this.lookup(e,p);if(!t)throw Error("no such enum");return t.values}},{15:15,16:16,21:21,28:28,29:29,31:31}],21:[function(e,r){function n(e,t){if(!i.isString(e))throw TypeError("name must be a string");if(t&&!i.isObject(t))throw TypeError("options must be an object");this.options=t,this.name=e,this.parent=null,this.resolved=!1,this.comment=null}r.exports=n;var i=e(31);n.className="ReflectionObject",n.extend=i.extend;var s,o=n.prototype;Object.defineProperties(o,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),o.toJSON=function(){throw Error()},o.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var r=t.root;s||(s=e(25)),r instanceof s&&r.e(this)},o.onRemove=function(t){var r=t.root;s||(s=e(25)),r instanceof s&&r.f(this),this.parent=null,this.resolved=!1},o.resolve=function(){return this.resolved?this:(s||(s=e(25)),this.root instanceof s&&(this.resolved=!0),this)},o.getOption=function(e){return this.options?this.options[e]:t},o.setOption=function(e,r,n){return n&&this.options&&this.options[e]!==t||((this.options||(this.options={}))[e]=r),this},o.setOptions=function(e,t){return e&&Object.keys(e).forEach(function(r){this.setOption(r,e[r],t)},this),this},o.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e}},{25:25,31:31}],22:[function(e,r){function n(e,r,n){if(Array.isArray(r)||(n=r,r=t),s.call(this,e,n),r&&!Array.isArray(r))throw TypeError("fieldNames must be an Array");this.oneof=r||[],this.g=[]}function i(e){e.parent&&e.g.forEach(function(t){t.parent||e.parent.add(t)})}r.exports=n;var s=e(21),o=s.extend(n);n.className="OneOf";var u=e(16);Object.defineProperty(o,"fieldsArray",{get:function(){return this.g}}),n.testJSON=function(e){return!!e.oneof},n.fromJSON=function(e,t){return new n(e,t.oneof,t.options)},o.toJSON=function(){return{oneof:this.oneof,options:this.options}},o.add=function(e){if(!(e instanceof u))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.g.push(e),e.partOf=this,i(this),this},o.remove=function(e){if(!(e instanceof u))throw TypeError("field must be 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.partOf=null,this},o.onAdd=function(e){s.prototype.onAdd.call(this,e);var t=this;this.oneof.forEach(function(r){var n=e.get(r);n&&!n.partOf&&(n.partOf=t,t.g.push(n))}),i(this)},o.onRemove=function(e){this.g.forEach(function(e){e.parent&&e.parent.remove(e)}),s.prototype.onRemove.call(this,e)}},{16:16,21:21}],23:[function(e,t){function r(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 i(){var e=new w(0,0),t=0;if(this.len-this.pos>4){for(t=0;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e}else{for(t=0;t<4;++t){if(this.pos>=this.len)throw r(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}if(this.pos>=this.len)throw r(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e}if(this.len-this.pos>4){for(t=0;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(t=0;t<5;++t){if(this.pos>=this.len)throw r(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function s(){return i.call(this).toLong()}function o(){return i.call(this).toNumber()}function u(){return i.call(this).toLong(!0)}function f(){return i.call(this).toNumber(!0)}function a(){return i.call(this).zzDecode().toLong()}function h(){return i.call(this).zzDecode().toNumber()}function l(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function c(){if(this.pos+8>this.len)throw r(this,8);return new w(l(this.buf,this.pos+=4),l(this.buf,this.pos+=4))}function p(){return c.call(this).toLong(!0)}function d(){return c.call(this).toNumber(!0)}function y(){return c.call(this).zzDecode().toLong()}function v(){return c.call(this).zzDecode().toNumber()}function m(){b.Long?(j.int64=s,j.uint64=u,j.sint64=a,j.fixed64=p,j.sfixed64=y):(j.int64=o,j.uint64=f,j.sint64=h,j.fixed64=d,j.sfixed64=v)}t.exports=n;var g,b=e(33),w=b.LongBits,O=b.utf8;n.create=b.Buffer?function(t){return g||(g=e(24)),(n.create=function(e){return b.Buffer.isBuffer(e)?new g(e):new n(e)})(t)}:function(e){return new n(e)};var j=n.prototype;j.h=b.Array.prototype.subarray||b.Array.prototype.slice,j.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,r(this,10);return e}}(),j.int32=function(){return 0|this.uint32()},j.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},j.bool=function(){return 0!==this.uint32()},j.fixed32=function(){if(this.pos+4>this.len)throw r(this,4);return l(this.buf,this.pos+=4)},j.sfixed32=function(){var e=this.fixed32();return e>>>1^-(1&e)};var k="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],e[0]}:function(r,n){return t[3]=r[n],t[2]=r[n+1],t[1]=r[n+2],t[0]=r[n+3],e[0]}}():function(e,t){var r=l(e,t+4),n=2*(r>>31)+1,i=r>>>23&255,s=8388607&r;return 255===i?s?NaN:n*(1/0):0===i?1.401298464324817e-45*n*s:n*Math.pow(2,i-150)*(s+8388608)};j.float=function(){if(this.pos+4>this.len)throw r(this,4);var e=k(this.buf,this.pos);return this.pos+=4,e};var x="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],t[4]=r[n+4],t[5]=r[n+5],t[6]=r[n+6],t[7]=r[n+7],e[0]}:function(r,n){return t[7]=r[n],t[6]=r[n+1],t[5]=r[n+2],t[4]=r[n+3],t[3]=r[n+4],t[2]=r[n+5],t[1]=r[n+6],t[0]=r[n+7],e[0]}}():function(e,t){var r=l(e,t+4),n=l(e,t+8),i=2*(n>>31)+1,s=n>>>20&2047,o=4294967296*(1048575&n)+r;return 2047===s?o?NaN:i*(1/0):0===s?5e-324*i*o:i*Math.pow(2,s-1075)*(o+4503599627370496)};j.double=function(){if(this.pos+8>this.len)throw r(this,4);var e=x(this.buf,this.pos);return this.pos+=8,e},j.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw r(this,e);return this.pos+=e,t===n?new this.buf.constructor(0):this.h.call(this.buf,t,n)},j.string=function(){var e=this.bytes();return O.read(e,0,e.length)},j.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw r(this,e);this.pos+=e}else do if(this.pos>=this.len)throw r(this);while(128&this.buf[this.pos++]);return this},j.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(;;){if(4===(e=7&this.uint32()))break;this.skipType(e)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},n.i=m,m()},{24:24,33:33}],24:[function(e,t){function r(e){n.call(this,e)}t.exports=r;var n=e(23),i=r.prototype=Object.create(n.prototype);i.constructor=r;var s=e(33);s.Buffer&&(i.h=s.Buffer.prototype.slice),i.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len));
}},{23:23,33:33}],25:[function(e,r){function n(e){o.call(this,"",e),this.deferred=[],this.files=[]}function i(){}function s(e){var r=e.parent.lookup(e.extend);if(r){var n=new h(e.fullName,e.id,e.type,e.rule,t,e.options);return n.declaringField=e,e.extensionField=n,r.add(n),!0}return!1}r.exports=n;var o=e(20),u=o.extend(n);n.className="Root";var f,a,h=e(16),l=e(31);n.fromJSON=function(e,t){return t||(t=new n),t.setOptions(e.options).addJSON(e.nested)},u.resolvePath=l.path.resolve;var c=function(){try{f=e("./parse"),a=e("./common")}catch(e){}c=null};u.load=function e(r,n,s){function o(e,t){if(s){var r=s;if(s=null,d)throw e;r(e,t)}}function u(e,r){try{if(l.isString(r)&&"{"===r.charAt(0)&&(r=JSON.parse(r)),l.isString(r)){f.filename=e;var i=f(r,p,n);i.imports&&i.imports.forEach(function(t){h(p.resolvePath(e,t))}),i.weakImports&&i.weakImports.forEach(function(t){h(p.resolvePath(e,t),!0)})}else p.setOptions(r.options).addJSON(r.nested)}catch(e){if(d)throw e;return o(e),t}d||y||o(null,p)}function h(e,r){var n=e.lastIndexOf("google/protobuf/");if(n>-1){var i=e.substring(n);i in a&&(e=i)}if(!(p.files.indexOf(e)>-1)){if(p.files.push(e),e in a)return d?u(e,a[e]):(++y,setTimeout(function(){--y,u(e,a[e])})),t;if(d){var f;try{f=l.fs.readFileSync(e).toString("utf8")}catch(e){return r||o(e),t}u(e,f)}else++y,l.fetch(e,function(n,i){if(--y,s)return n?(r||o(n),t):(u(e,i),t)})}}c&&c(),"function"==typeof n&&(s=n,n=t);var p=this;if(!s)return l.asPromise(e,p,r);var d=s===i,y=0;return l.isString(r)&&(r=[r]),r.forEach(function(e){h(p.resolvePath("",e))}),d?p:(y||o(null,p),t)},u.loadSync=function(e,t){if(!l.isNode)throw Error("not supported");return this.load(e,t,i)},u.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(e){return"'extend "+e.extend+"' in "+e.parent.fullName}).join(", "));return o.prototype.resolveAll.call(this)},u.e=function(e){var r=this.deferred.slice();this.deferred=[];for(var n=0;n<r.length;)s(r[n])?r.splice(n,1):++n;if(this.deferred=r,e instanceof h&&e.extend!==t&&!e.extensionField&&!s(e)&&this.deferred.indexOf(e)<0)this.deferred.push(e);else if(e instanceof o){var i=e.nestedArray;for(n=0;n<i.length;++n)this.e(i[n])}},u.f=function(e){if(e instanceof h){if(e.extend!==t&&!e.extensionField){var r=this.deferred.indexOf(e);r>-1&&this.deferred.splice(r,1)}e.extensionField&&(e.extensionField.parent.remove(e.extensionField),e.extensionField=null)}else if(e instanceof o)for(var n=e.nestedArray,i=0;i<n.length;++i)this.f(n[i])}},{16:16,20:20,31:31,undefined:t}],26:[function(e,t,r){var n=r;n.Service=e(27)},{27:27}],27:[function(e,t){function r(e){n.call(this),this.$rpc=e}t.exports=r;var n=e(31).EventEmitter;(r.prototype=Object.create(n.prototype)).constructor=r,r.prototype.end=function(e){return this.$rpc&&(e||this.$rpc(null,null,null),this.$rpc=null,this.emit("end").off()),this}},{31:31}],28:[function(e,r){function n(e,t){s.call(this,e,t),this.methods={},this.j=null}function i(e){return e.j=null,e}r.exports=n;var s=e(20),o=s.prototype,u=s.extend(n);n.className="Service";var f=e(19),a=e(31),h=e(26);n.testJSON=function(e){return!(!e||!e.methods)},n.fromJSON=function(e,t){var r=new n(e,t.options);return t.methods&&Object.keys(t.methods).forEach(function(e){r.add(f.fromJSON(e,t.methods[e]))}),r},Object.defineProperty(u,"methodsArray",{get:function(){return this.j||(this.j=a.toArray(this.methods))}}),u.toJSON=function(){var e=o.toJSON.call(this);return{options:e&&e.options||t,methods:s.arrayToJSON(this.methodsArray)||{},nested:e&&e.nested||t}},u.get=function(e){return o.get.call(this,e)||this.methods[e]||null},u.resolveAll=function(){for(var e=this.methodsArray,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 f?(this.methods[e.name]=e,e.parent=this,i(this)):o.add.call(this,e)},u.remove=function(e){if(e instanceof f){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,i(this)}return o.remove.call(this,e)},u.create=function(e,r,n){var i=new h.Service(e);return this.methodsArray.forEach(function(s){i[a.lcFirst(s.name)]=function(o,u){if(i.$rpc){if(!o)throw TypeError("request must not be null");s.resolve();var f;try{f=(r?s.resolvedRequestType.encodeDelimited(o):s.resolvedRequestType.encode(o)).finish()}catch(e){return("function"==typeof setImmediate?setImmediate:setTimeout)(function(){u(e)}),t}e(s,f,function(e,r){if(e)return i.emit("error",e,s),u?u(e):t;if(null===r)return i.end(!0),t;var o;try{o=n?s.resolvedResponseType.decodeDelimited(r):s.resolvedResponseType.decode(r)}catch(e){return i.emit("error",e,s),u?u("error",e):t}return i.emit("data",o,s),u?u(null,o):t})}}}),i}},{19:19,20:20,26:26,31:31}],29:[function(e,r){function n(e,r){s.call(this,e,r),this.fields={},this.oneofs=t,this.extensions=t,this.reserved=t,this.group=t,this.k=null,this.g=null,this.l=null,this.m=null}function i(e){return e.k=e.g=e.l=e.m=null,delete e.encode,delete e.decode,delete e.verify,e}r.exports=n;var s=e(20),o=s.prototype,u=s.extend(n);n.className="Type";var f=e(15),a=e(22),h=e(16),l=e(28),c=e(11),p=e(18),d=e(23),y=e(35),v=e(31),m=e(14),g=e(13),b=e(34),w=e(12),O=[f,n,h,l];n.testJSON=function(e){return!(!e||!e.fields)},n.fromJSON=function(e,r){var i=new n(e,r.options);return i.extensions=r.extensions,i.reserved=r.reserved,r.fields&&Object.keys(r.fields).forEach(function(e){i.add(h.fromJSON(e,r.fields[e]))}),r.oneofs&&Object.keys(r.oneofs).forEach(function(e){i.add(a.fromJSON(e,r.oneofs[e]))}),r.nested&&Object.keys(r.nested).forEach(function(e){for(var n=r.nested[e],s=0;s<O.length;++s)if(O[s].testJSON(n))return i.add(O[s].fromJSON(e,n)),t;throw Error("invalid nested object in "+i+": "+e)}),r.extensions&&r.extensions.length&&(i.extensions=r.extensions),r.reserved&&r.reserved.length&&(i.reserved=r.reserved),r.group&&(i.group=!0),i},Object.defineProperties(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]],n=r.id;if(this.k[n])throw Error("duplicate id "+n+" in "+this);this.k[n]=r}return this.k}},fieldsArray:{get:function(){return this.g||(this.g=v.toArray(this.fields))}},oneofsArray:{get:function(){return this.l||(this.l=v.toArray(this.oneofs))}},ctor:{get:function(){return this.m||(this.m=c.create(this).constructor)},set:function(e){if(e&&!(e.prototype instanceof p))throw TypeError("ctor must be a Message constructor");e.from||(e.from=p.from),this.m=e}}}),u.toJSON=function(){var e=o.toJSON.call(this);return{options:e&&e.options||t,oneofs:s.arrayToJSON(this.oneofsArray),fields:s.arrayToJSON(this.fieldsArray.filter(function(e){return!e.declaringField}))||{},extensions:this.extensions&&this.extensions.length?this.extensions:t,reserved:this.reserved&&this.reserved.length?this.reserved:t,group:this.group||t,nested:e&&e.nested||t}},u.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var r=this.oneofsArray;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 h&&e.extend===t){if(this.fieldsById[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),i(this)}return e instanceof a?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),i(this)):o.add.call(this,e)},u.remove=function(e){if(e instanceof h&&e.extend===t){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),i(this)}if(e instanceof a){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),i(this)}return o.remove.call(this,e)},u.create=function(e){return new this.ctor(e)},u.setup=function(){var e=this.fullName,t=this.fieldsArray.map(function(e){return e.resolve().resolvedType});return this.encode=m(this).eof(e+"$encode",{Writer:y,types:t,util:v}),this.decode=g(this).eof(e+"$decode",{Reader:d,types:t,util:v}),this.verify=b(this).eof(e+"$verify",{types:t,util:v}),this.fromObject=this.from=w.fromObject(this).eof(e+"$fromObject",{types:t,util:v}),this.toObject=w.toObject(this).eof(e+"$toObject",{types:t,util:v}),this},u.encode=function(e,t){return this.setup().encode(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.setup().decode(e,t)},u.decodeDelimited=function(e){return e instanceof d||(e=d.create(e)),this.decode(e,e.uint32())},u.verify=function(e){return this.setup().verify(e)},u.fromObject=function(e){return this.setup().fromObject(e)},u.from=u.fromObject,u.toObject=function(e,t){return this.setup().toObject(e,t)}},{11:11,12:12,13:13,14:14,15:15,16:16,18:18,20:20,22:22,23:23,28:28,31:31,34:34,35:35}],30:[function(e,t,r){function n(e,t){var r=0,n={};for(t|=0;r<e.length;)n[o[r+t]]=e[r++];return n}var i=r,s=e(31),o=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];i.basic=n([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),i.defaults=n([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",s.emptyArray,null]),i.long=n([0,0,0,1,1],7),i.mapKey=n([0,0,0,5,5,0,0,0,1,1,0,2],2),i.packed=n([1,5,0,0,0,5,5,0,0,0,1,1,0])},{31:31}],31:[function(e,t){var r=t.exports=e(33);r.asPromise=e(1),r.codegen=e(3),r.EventEmitter=e(4),r.extend=e(5),r.fetch=e(6),r.path=e(8),r.fs=r.inquire("fs"),r.toArray=function(e){return e?Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]}):[]},r.safeProp=function(e){return'["'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"]'},r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)}},{1:1,3:3,33:33,4:4,5:5,6:6,8:8}],32:[function(e,t){function r(e,t){this.lo=e,this.hi=t}t.exports=r;var n=e(33),i=r.prototype,s=r.zero=new r(0,0);s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1};var o=r.zeroHash="\0\0\0\0\0\0\0\0";r.fromNumber=function(e){if(0===e)return s;var t=e<0;t&&(e=-e);var n=e>>>0,i=(e-n)/4294967296>>>0;return t&&(i=~i>>>0,n=~n>>>0,++n>4294967295&&(n=0,++i>4294967295&&(i=0))),new r(n,i)},r.from=function(e){if("number"==typeof e)return r.fromNumber(e);if("string"==typeof e){if(!n.Long)return r.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new r(e.low>>>0,e.high>>>0):s},i.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},i.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,(!!e)):{low:0|this.lo,high:0|this.hi,unsigned:!!e}};var u=String.prototype.charCodeAt;r.fromHash=function(e){return e===o?s:new r((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)},i.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.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},i.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},i.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<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},{33:33}],33:[function(r,n,i){var s=i;s.base64=r(2),s.inquire=r(7),s.utf8=r(10),s.pool=r(9),s.emptyArray=Object.freeze?Object.freeze([]):[],s.emptyObject=Object.freeze?Object.freeze({}):{},s.isNode=!!(e.process&&e.process.versions&&e.process.versions.node),s.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},s.isString=function(e){return"string"==typeof e||e instanceof String},s.isObject=function(e){return e&&"object"==typeof e},s.Buffer=function(){try{var e=s.inquire("buffer").Buffer;return e.prototype.utf8Write?(e.from||(e.from=function(t,r){return new e(t,r)}),e.allocUnsafe||(e.allocUnsafe=function(t){return new e(t)}),e):null}catch(e){return null}}(),s.newBuffer=function(e){return"number"==typeof e?s.Buffer?s.Buffer.allocUnsafe(e):new s.Array(e):s.Buffer?s.Buffer.from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},s.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,s.LongBits=r(32),s.Long=e.dcodeIO&&e.dcodeIO.Long||s.inquire("long"),s.longToHash=function(e){return e?s.LongBits.from(e).toHash():s.LongBits.zeroHash},s.longFromHash=function(e,t){var r=s.LongBits.fromHash(e);return s.Long?s.Long.fromBits(r.lo,r.hi,t):r.toNumber(!!t)},s.merge=function(e,r,n){for(var i=Object.keys(r),s=0;s<i.length;++s)e[i[s]]!==t&&n||(e[i[s]]=r[i[s]]);return e},s.oneOfGetter=function(e){var r={};return e.forEach(function(e){r[e]=1}),function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(1===r[e[n]]&&this[e[n]]!==t&&null!==this[e[n]])return e[n]}},s.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},s.lazyResolve=function(e,t){t.forEach(function(t){Object.keys(t).forEach(function(r){for(var n=t[r|=0].split("."),i=e;n.length;)i=i[n.shift()];t[r]=i})})},s.toJSONOptions={longs:String,enums:String,bytes:String}},{10:10,2:2,32:32,7:7,9:9}],34:[function(e,t){function r(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function n(e,t,n,i){if(t.resolvedType)if(t.resolvedType instanceof o){e("switch(%s){",i)("default:")("return%j",r(t,"enum value"));for(var s=u.toArray(t.resolvedType.values),f=0;f<s.length;++f)e("case %d:",s[f]);e("break")("}")}else e("var e=types[%d].verify(%s);",n,i)("if(e)")("return%j+e",t.name+".");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",i)("return%j",r(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)))",i,i,i,i)("return%j",r(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',i)("return%j",r(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',i)("return%j",r(t,"boolean"));break;case"string":e("if(!util.isString(%s))",i)("return%j",r(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',i,i,i)("return%j",r(t,"buffer"))}return e}function i(e,t,n){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!/^-?(?:0|[1-9][0-9]*)$/.test(%s))",n)("return%j",r(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/.test(%s))",n)("return%j",r(t,"integer|Long key"));break;case"bool":e("if(!/^true|false|0|1$/.test(%s))",n)("return%j",r(t,"boolean key"))}return e}function s(e){var t=e.fieldsArray;if(!t.length)return u.codegen()("return null");for(var s=u.codegen("m"),f=0;f<t.length;++f){var a=t[f].resolve(),h="m"+u.safeProp(a.name);a.map?(s("if(%s!==undefined){",h)("if(!util.isObject(%s))",h)("return%j",r(a,"object"))("var k=Object.keys(%s)",h)("for(var i=0;i<k.length;++i){"),i(s,a,"k[i]"),n(s,a,f,h+"[k[i]]")("}")("}")):a.repeated?(s("if(%s!==undefined){",h)("if(!Array.isArray(%s))",h)("return%j",r(a,"array"))("for(var i=0;i<%s.length;++i){",h),n(s,a,f,h+"[i]")("}")("}")):(a.required||(!a.resolvedType||a.resolvedType instanceof o?s("if(%s!==undefined){",h):s("if(%s!==undefined&&%s!==null){",h,h)),n(s,a,f,h),a.required||s("}"))}return s("return null")}t.exports=s;var o=e(15),u=e(31)},{15:15,31:31}],35:[function(e,r){function n(e,r,n){this.fn=e,this.len=r,this.next=t,this.val=n}function i(){}function s(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function o(){this.len=0,this.head=new n(i,0,0),this.tail=this.head,this.states=null}function u(e,t,r){t[r]=255&e}function f(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e}function a(e,r){this.len=e,this.next=t,this.val=r}function h(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function l(e,t,r){t[r++]=255&e,t[r++]=e>>>8&255,t[r++]=e>>>16&255,t[r]=e>>>24}r.exports=o;var c,p=e(33),d=p.LongBits,y=p.base64,v=p.utf8;o.create=p.Buffer?function(){return c||(c=e(36)),(o.create=function(){return new c})()}:function(){return new o},o.alloc=function(e){return new p.Array(e)},p.Array!==Array&&(o.alloc=p.pool(o.alloc,p.Array.prototype.subarray));var m=o.prototype;m.push=function(e,t,r){return this.tail=this.tail.next=new n(e,t,r),this.len+=t,this},a.prototype=Object.create(n.prototype),a.prototype.fn=f,m.uint32=function(e){return this.len+=(this.tail=this.tail.next=new a((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},m.int32=function(e){return e<0?this.push(h,10,d.fromNumber(e)):this.uint32(e)},m.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},m.uint64=function(e){var t=d.from(e);return this.push(h,t.length(),t)},m.int64=m.uint64,m.sint64=function(e){var t=d.from(e).zzEncode();return this.push(h,t.length(),t)},m.bool=function(e){return this.push(u,1,e?1:0)},m.fixed32=function(e){return this.push(l,4,e>>>0)},m.sfixed32=function(e){return this.push(l,4,e<<1^e>>31)},m.fixed64=function(e){var t=d.from(e);return this.push(l,4,t.lo).push(l,4,t.hi)},m.sfixed64=function(e){var t=d.from(e).zzEncode();return this.push(l,4,t.lo).push(l,4,t.hi)};var g="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n,i){e[0]=r,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i]=t[3]}:function(r,n,i){e[0]=r,n[i++]=t[3],n[i++]=t[2],n[i++]=t[1],n[i]=t[0]}}():function(e,t,r){var n=e<0?1:0;if(n&&(e=-e),0===e)l(1/e>0?0:2147483648,t,r);else if(isNaN(e))l(2147483647,t,r);else if(e>3.4028234663852886e38)l((n<<31|2139095040)>>>0,t,r);else if(e<1.1754943508222875e-38)l((n<<31|Math.round(e/1.401298464324817e-45))>>>0,t,r);else{var i=Math.floor(Math.log(e)/Math.LN2),s=8388607&Math.round(e*Math.pow(2,-i)*8388608);l((n<<31|i+127<<23|s)>>>0,t,r)}};m.float=function(e){return this.push(g,4,e)};var b="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,n,i){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(r,n,i){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,r){var n=e<0?1:0;if(n&&(e=-e),0===e)l(0,t,r),l(1/e>0?0:2147483648,t,r+4);else if(isNaN(e))l(4294967295,t,r),l(2147483647,t,r+4);else if(e>1.7976931348623157e308)l(0,t,r),l((n<<31|2146435072)>>>0,t,r+4);else{var i;if(e<2.2250738585072014e-308)i=e/5e-324,l(i>>>0,t,r),l((n<<31|i/4294967296)>>>0,t,r+4);else{var s=Math.floor(Math.log(e)/Math.LN2);1024===s&&(s=1023),i=e*Math.pow(2,-s),l(4503599627370496*i>>>0,t,r),l((n<<31|s+1023<<20|1048576*i&1048575)>>>0,t,r+4)}}};m.double=function(e){return this.push(b,8,e)};var w=p.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};m.bytes=function(e){var t=e.length>>>0;if("string"==typeof e&&t){var r=o.alloc(t=y.length(e));y.decode(e,r,0),e=r}return t?this.uint32(t).push(w,t,e):this.push(u,1,0)},m.string=function(e){var t=v.length(e);return t?this.uint32(t).push(v.write,t,e):this.push(u,1,0)},m.fork=function(){return this.states=new s(this),this.head=this.tail=new n(i,0,0),this.len=0,this},m.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 n(i,0,0),this.len=0),this},m.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},m.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t}},{33:33,36:36}],36:[function(e,t){function r(){i.call(this)}function n(e,t,r){e.length<40?o.utf8.write(e,t,r):t.utf8Write(e,r)}t.exports=r;var i=e(35),s=r.prototype=Object.create(i.prototype);s.constructor=r;var o=e(33),u=o.Buffer;r.alloc=function(e){return(r.alloc=u.allocUnsafe)(e)};var f=u&&u.prototype instanceof Uint8Array&&"set"===u.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n<e.length;)t[r++]=e[n++]};s.bytes=function(e){"string"==typeof e&&(e=u.from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this.push(f,t,e),this},s.string=function(e){var t=u.byteLength(e);return this.uint32(t),t&&this.push(n,t,e),this}},{33:33,35:35}],37:[function(t,r,n){function i(e,t,r){return"function"==typeof t?(r=t,t=new u.Root):t||(t=new u.Root),t.load(e,r)}function s(e,t){return t||(t=new u.Root),t.loadSync(e)}function o(){u.Reader.i()}var u=e.protobuf=n;u.load=i,u.loadSync=s,u.roots={};try{u.tokenize=t("./tokenize"),u.parse=t("./parse"),u.common=t("./common")}catch(e){}u.Writer=t(35),u.BufferWriter=t(36),u.Reader=t(23),u.BufferReader=t(24),u.encoder=t(14),u.decoder=t(13),u.verifier=t(34),u.converter=t(12),u.ReflectionObject=t(21),u.Namespace=t(20),u.Root=t(25),u.Enum=t(15),u.Type=t(29),u.Field=t(16),u.OneOf=t(22),u.MapField=t(17),u.Service=t(28),u.Method=t(19),u.Class=t(11),u.Message=t(18),u.types=t(30),u.rpc=t(26),u.util=t(31),u.configure=o,"function"==typeof define&&define.amd&&define(["long"],function(e){return e&&(u.util.Long=e,o()),u})},{11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,28:28,29:29,30:30,31:31,34:34,35:35,36:36,undefined:t}]},{},[37])}("object"==typeof window&&window||"object"==typeof self&&self||this);
!function(e,t){"use strict";!function e(t,r,n){function i(o,u){if(!r[o]){if(!t[o]){var f="function"==typeof require&&require;if(!u&&f)return f(o,!0);if(s)return s(o,!0);var a=Error("Cannot find module '"+o+"'");throw a.code="MODULE_NOT_FOUND",a}var h=r[o]={exports:{}};t[o][0].call(h.exports,function(e){var r=t[o][1][e];return i(r?r:e)},h,h.exports,e,t,r,n)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(e,t){function r(e,t){for(var r=[],n=2;n<arguments.length;)r.push(arguments[n++]);var i=!0;return new Promise(function(n,s){r.push(function(e){if(i)if(i=!1,e)s(e);else{for(var t=[],r=1;r<arguments.length;)t.push(arguments[r++]);n.apply(null,t)}});try{e.apply(t||this,r)}catch(e){i&&(i=!1,s(e))}})}t.exports=r},{}],2:[function(e,r,n){var i=n;i.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var s=Array(64),o=Array(123),u=0;u<64;)o[s[u]=u<26?u+65:u<52?u+71:u<62?u-4:u-59|43]=u++;i.encode=function(e,t,r){for(var n,i=[],o=0,u=0;t<r;){var f=e[t++];switch(u){case 0:i[o++]=s[f>>2],n=(3&f)<<4,u=1;break;case 1:i[o++]=s[n|f>>4],n=(15&f)<<2,u=2;break;case 2:i[o++]=s[n|f>>6],i[o++]=s[63&f],u=0}}return u&&(i[o++]=s[n],i[o]=61,1===u&&(i[o+1]=61)),String.fromCharCode.apply(String,i)};var f="invalid encoding";i.decode=function(e,r,n){for(var i,s=n,u=0,a=0;a<e.length;){var h=e.charCodeAt(a++);if(61===h&&u>1)break;if((h=o[h])===t)throw Error(f);switch(u){case 0:i=h,u=1;break;case 1:r[n++]=i<<2|(48&h)>>4,i=h,u=2;break;case 2:r[n++]=(15&i)<<4|(60&h)>>2,i=h,u=3;break;case 3:r[n++]=(3&i)<<6|h,u=0}}if(1===u)throw Error(f);return n-s},i.test=function(e){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e)}},{}],3:[function(e,r){function n(){function e(){for(var t=[],r=0;r<arguments.length;)t.push(arguments[r++]);var n=i.apply(null,t),h=p;if(c.length){var l=c[c.length-1];s.test(l)?h=++p:f.test(l)&&++h,u.test(l)&&!u.test(n)?(h=++p,d=!0):d&&a.test(l)&&(h=--p,d=!1),o.test(n)&&(h=--p)}for(r=0;r<h;++r)n="\t"+n;return c.push(n),e}function r(e){return"function"+(e?" "+e.replace(/[^\w_$]/g,"_"):"")+"("+l.join(",")+") {\n"+c.join("\n")+"\n}"}function h(r,i){"object"==typeof r&&(i=r,r=t);var s=e.str(r);n.verbose&&console.log("--- codegen ---\n"+s.replace(/^/gm,"> ").replace(/\t/g," "));var o=Object.keys(i||(i={}));return Function.apply(null,o.concat("return "+s)).apply(null,o.map(function(e){return i[e]}))}for(var l=[],c=[],p=1,d=!1,y=0;y<arguments.length;)l.push(arguments[y++]);return e.str=r,e.eof=h,e}function i(e){for(var t=[],r=1;r<arguments.length;)t.push(arguments[r++]);if(r=0,e=e.replace(/%([dfjs])/g,function(e,n){switch(n){case"d":return Math.floor(t[r++]);case"f":return+t[r++];case"j":return JSON.stringify(t[r++]);default:return t[r++]}}),r!==t.length)throw Error("argument count mismatch");return e}r.exports=n;var s=/[{[]$/,o=/^[}\]]/,u=/:$/,f=/^\s*(?:if|}?else if|while|for)\b|\b(?:else)\s*$/,a=/\b(?:break|continue)(?: \w+)?;?$|^\s*return\b/;n.sprintf=i,n.supported=!1;try{n.supported=1===n("a","b")("return a-b").eof()(2,1)}catch(e){}n.verbose=!1},{}],4:[function(e,r){function n(){this.a={}}r.exports=n;var i=n.prototype;i.on=function(e,t,r){return(this.a[e]||(this.a[e]=[])).push({fn:t,ctx:r||this}),this},i.off=function(e,r){if(e===t)this.a={};else if(r===t)this.a[e]=[];else for(var n=this.a[e],i=0;i<n.length;)n[i].fn===r?n.splice(i,1):++i;return this},i.emit=function(e){var t=this.a[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},{}],5:[function(e,t){function r(e){for(var t=Object.keys(this),r=0;r<t.length;++r)e[t[r]]=this[t[r]];var n=e.prototype=Object.create(this.prototype);return n.constructor=e,n}t.exports=r},{}],6:[function(e,r){function n(e,t){return t?u&&u.readFile?u.readFile(e,"utf8",function(r,n){return r&&"undefined"!=typeof XMLHttpRequest?i(e,t):t(r,n)}):i(e,t):s(n,this,e)}function i(e,r){var n=new XMLHttpRequest;n.onreadystatechange=function(){return 4===n.readyState?0===n.status||200===n.status?r(null,n.responseText):r(Error("status "+n.status)):t},n.open("GET",e),n.send()}r.exports=n;var s=e(1),o=e(7),u=o("fs")},{1:1,7:7}],7:[function(e,t,r){function n(e){try{var t=eval("quire".replace(/^/,"re"))(e);if(t&&(t.length||Object.keys(t).length))return t}catch(e){}return null}t.exports=n},{}],8:[function(e,t,r){var n=r,i=n.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},s=n.normalize=function(e){e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var t=e.split("/"),r=i(e),n="";r&&(n=t.shift()+"/");for(var s=0;s<t.length;)".."===t[s]?s>0?t.splice(--s,2):r?t.splice(s,1):++s:"."===t[s]?t.splice(s,1):++s;return n+t.join("/")};n.resolve=function(e,t,r){return r||(t=s(t)),i(t)?t:(r||(e=s(e)),(e=e.replace(/(?:\/|^)[^\/]+$/,"")).length?s(e+"/"+t):t)}},{}],9:[function(e,t){function r(e,t,r){var n=r||8192,i=n>>>1,s=null,o=n;return function(r){if(r<1||r>i)return e(r);o+r>n&&(s=e(n),o=0);var u=t.call(s,o,o+=r);return 7&o&&(o=(7|o)+1),u}}t.exports=r},{}],10:[function(e,t,r){var n=r;n.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)r=e.charCodeAt(n),r<128?t+=1:r<2048?t+=2:55296===(64512&r)&&56320===(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},n.read=function(e,t,r){var n=r-t;if(n<1)return"";for(var i,s=null,o=[],u=0;t<r;)i=e[t++],i<128?o[u++]=i:i>191&&i<224?o[u++]=(31&i)<<6|63&e[t++]:i>239&&i<365?(i=((7&i)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[u++]=55296+(i>>10),o[u++]=56320+(1023&i)):o[u++]=(15&i)<<12|(63&e[t++])<<6|63&e[t++],u>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),u=0);return s?(u&&s.push(String.fromCharCode.apply(String,o.slice(0,u))),s.join("")):u?String.fromCharCode.apply(String,o.slice(0,u)):""},n.write=function(e,t,r){for(var n,i,s=r,o=0;o<e.length;++o)n=e.charCodeAt(o),n<128?t[r++]=n:n<2048?(t[r++]=n>>6|192,t[r++]=63&n|128):55296===(64512&n)&&56320===(64512&(i=e.charCodeAt(o+1)))?(n=65536+((1023&n)<<10)+(1023&i),++o,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-s}},{}],11:[function(e,t){function r(e){return n(e)}function n(t,n){if(i||(i=e(29)),!(t instanceof i))throw TypeError("type must be a Type");if(n){if("function"!=typeof n)throw TypeError("ctor must be a function")}else n=o.codegen("p")("return ctor.call(this,p)").eof(t.name,{ctor:s});n.constructor=r;var u=n.prototype=new s;return u.constructor=n,o.merge(n,s,!0),n.$type=t,u.$type=t,t.fieldsArray.forEach(function(e){u[e.name]=Array.isArray(e.resolve().defaultValue)?o.emptyArray:o.isObject(e.defaultValue)&&!e.long?o.emptyObject:e.defaultValue}),t.oneofsArray.forEach(function(e){Object.defineProperty(u,e.resolve().name,{get:o.oneOfGetter(e.oneof),set:o.oneOfSetter(e.oneof)})}),t.ctor=n,u}t.exports=r;var i,s=e(18),o=e(31);r.create=n,r.prototype=s},{18:18,29:29,31:31}],12:[function(e,t,r){function n(e,t,r,n){if(t.resolvedType)if(t.resolvedType instanceof o){var i=t.resolvedType.values;e("switch(d%s){",n),Object.keys(i).forEach(function(r){t.repeated&&i[r]===t.typeDefault&&e("default:"),e("case%j:",r)("case %j:",i[r])("m%s=%j",n,i[r])("break")}),e("}")}else e("m%s=types[%d].fromObject(d%s)",n,r,n);else{var s=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",n,n);break;case"uint64":s=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,s)('else if(typeof d%s==="string")',n)("m%s=parseInt(d%s,10)",n,n)('else if(typeof d%s==="number")',n)("m%s=d%s",n,n)('else if(typeof d%s==="object")',n)("m%s=new util.LongBits(d%s.low,d%s.high).toNumber(%s)",n,n,n,s?"true":"");break;case"bytes":e('if(typeof d%s==="string")',n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",n,n,n)("else if(d%s&&d%s.length)",n,n)("m%s=d%s",n,n);break;case"string":e("m%s=String(d%s)",n,n);break;case"bool":e("m%s=Boolean(d%s)",n,n)}}return e}function i(e,t,r,n){if(t.resolvedType)t.resolvedType instanceof o?e("d%s=o.enums===String?types[%d].values[m%s]:m%s",n,r,n,n):e("d%s=types[%d].toObject(m%s,o)",n,r,n);else{var i=!1;switch(t.type){case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',n)("d%s=o.longs===String?String(m%s):m%s",n,n,n)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low,m%s.high).toNumber(%s):m%s",n,n,n,n,i?"true":"",n);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",n,n,n,n,n);break;default:e("d%s=m%s",n,n)}}return e}var s=r,o=e(15),u=e(31);s.fromObject=function(e){var t=e.fieldsArray;if(!t.length)return u.codegen()("return new(this.ctor)");for(var r=u.codegen("d")("var m=new(this.ctor)"),i=0;i<t.length;++i){var s=t[i].resolve(),f=u.safeProp(s.name);s.map?(r("if(d%s){",f)("m%s={}",f)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",f),n(r,s,i,f+"[ks[i]]")("}")("}")):s.repeated?(r("if(d%s){",f)("m%s=[]",f)("for(var i=0;i<d%s.length;++i){",f),n(r,s,i,f+"[i]")("}")("}")):(s.resolvedType instanceof o||r("if(d%s!==undefined&&d%s!==null){",f,f),n(r,s,i,f),s.resolvedType instanceof o||r("}"))}return r("return m")},s.toObject=function(e){var t=e.fieldsArray;if(!t.length)return u.codegen()("return {}");var r=u.codegen("m","o")("if(!o)")("o={}")("var d={}"),n=t.filter(function(e){return e.resolve().repeated});n.length&&(r("if(o.arrays||o.defaults){"),n.forEach(function(e){r("d%s=[]",u.safeProp(e.name))}),r("}"));var s=t.filter(function(e){return e.map});s.length&&(r("if(o.objects||o.defaults){"),s.forEach(function(e){r("d%s={}",u.safeProp(e.name))}),r("}"));var f=t.filter(function(e){return!(e.repeated||e.map)});f.length&&(r("if(o.defaults){"),f.forEach(function(e){var t=u.safeProp(e.name);e.resolvedType instanceof o?r("d%s=o.enums===String?%j:%j",t,e.resolvedType.valuesById[e.typeDefault],e.typeDefault):e.long?r("if(util.Long){")("var n=new util.Long(%d,%d,%j)",e.typeDefault.low,e.typeDefault.high,e.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",t)("}else")("d%s=o.longs===String?%j:%d",t,""+e.typeDefault,e.typeDefault.toNumber()):e.bytes?r("d%s=o.bytes===String?%j:%s",t,String.fromCharCode.apply(String,e.typeDefault),"["+Array.prototype.slice.call(e.typeDefault).join(",")+"]"):r("d%s=%j",t,e.typeDefault)}),r("}"));for(var a=0;a<t.length;++a){var h=t[a],l=u.safeProp(h.name);r("if(m%s!==undefined&&m%s!==null&&m.hasOwnProperty(%j)){",l,l,h.name),h.map?(r("d%s={}",l)("for(var ks2=Object.keys(m%s),j=0;j<ks2.length;++j){",l),i(r,h,a,l+"[ks2[j]]")("}")):h.repeated?(r("d%s=[]",l)("for(var j=0;j<m%s.length;++j){",l),i(r,h,a,l+"[j]")("}")):i(r,h,a,l),r("}")}return r("return d")}},{15:15,31:31}],13:[function(e,r){function n(e){var r=e.fieldsArray,u=o.codegen("r","l")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new(this.ctor)")("while(r.pos<c){")("var t=r.uint32()");e.group&&u("if((t&7)===4)")("break"),u("switch(t>>>3){");for(var f=0;f<r.length;++f){var a=r[f].resolve(),h=a.resolvedType instanceof i?"uint32":a.type,l="m"+o.safeProp(a.name);u("case %d:",a.id),a.map?(u("r.skip().pos++")("if(%s===util.emptyObject)",l)("%s={}",l)("var k=r.%s()",a.keyType)("r.pos++"),s.basic[h]===t?u('%s[typeof k==="object"?util.longToHash(k):k]=types[%d].decode(r,r.uint32())',l,f):u('%s[typeof k==="object"?util.longToHash(k):k]=r.%s()',l,h)):a.repeated?(u("if(!(%s&&%s.length))",l,l)("%s=[]",l),(n.compat||a.packed)&&s.packed[h]!==t&&u("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",l,h)("}else"),s.basic[h]===t?u(a.resolvedType.group?"%s.push(types[%d].decode(r))":"%s.push(types[%d].decode(r,r.uint32()))",l,f):u("%s.push(r.%s())",l,h)):s.basic[h]===t?u(a.resolvedType.group?"%s=types[%d].decode(r)":"%s=types[%d].decode(r,r.uint32())",l,f):u("%s=r.%s()",l,h),u("break")}return u("default:")("r.skipType(t&7)")("break")("}")("}")("return m")}r.exports=n,n.compat=!0;var i=e(15),s=e(30),o=e(31)},{15:15,30:30,31:31}],14:[function(e,r){function n(e,t,r,n){return t.resolvedType.group?e("types[%d].encode(%s,w.uint32(%d)).uint32(%d)",r,n,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%d].encode(%s,w.uint32(%d).fork()).ldelim()",r,n,(t.id<<3|2)>>>0)}function i(e){for(var r,i,f=e.fieldsArray,a=e.oneofsArray,h=u.codegen("m","w")("if(!w)")("w=Writer.create()"),r=0;r<f.length;++r){var l=f[r].resolve();if(!l.partOf){var c=l.resolvedType instanceof s?"uint32":l.type,p=o.basic[c];i="m"+u.safeProp(l.name),l.map?(h("if(%s&&m.hasOwnProperty(%j)){",i,l.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",i)("w.uint32(%d).fork().uint32(%d).%s(ks[i])",(l.id<<3|2)>>>0,8|o.mapKey[l.keyType],l.keyType),p===t?h("types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",r,i):h(".uint32(%d).%s(%s[ks[i]]).ldelim()",16|p,c,i),h("}")("}")):l.repeated?l.packed&&o.packed[c]!==t?h("if(%s&&%s.length&&m.hasOwnProperty(%j)){",i,i,l.name)("w.uint32(%d).fork()",(l.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",i)("w.%s(%s[i])",c,i)("w.ldelim()")("}"):(h("if(%s!==undefined&&m.hasOwnProperty(%j)){",i,l.name)("for(var i=0;i<%s.length;++i)",i),p===t?n(h,l,r,i+"[i]"):h("w.uint32(%d).%s(%s[i])",(l.id<<3|p)>>>0,c,i),h("}")):(l.required||(l.long?h("if(%s!==undefined&&%s!==null&&m.hasOwnProperty(%j))",i,i,l.name):l.bytes?h("if(%s&&m.hasOwnProperty(%j))",i,l.name):h("if(%s!==undefined&&m.hasOwnProperty(%j))",i,l.name)),p===t?n(h,l,r,i):h("w.uint32(%d).%s(%s)",(l.id<<3|p)>>>0,c,i))}}for(var r=0;r<a.length;++r){var d=a[r];h("switch(%s){","m"+u.safeProp(d.name));for(var y=d.fieldsArray,v=0;v<y.length;++v){var l=y[v],c=l.resolvedType instanceof s?"uint32":l.type,p=o.basic[c];i="m"+u.safeProp(l.name),h("case%j:",l.name),p===t?n(h,l,f.indexOf(l),i):h("w.uint32(%d).%s(%s)",(l.id<<3|p)>>>0,c,i),h("break")}h("}")}return h("return w")}r.exports=i;var s=e(15),o=e(30),u=e(31)},{15:15,30:30,31:31}],15:[function(e,r){function n(e,t,r){i.call(this,e,r),this.valuesById={},this.values=Object.create(this.valuesById),this.comments={};var n=this;Object.keys(t||{}).forEach(function(e){n.valuesById[n.values[e]=t[e]]=e})}r.exports=n;var i=e(21),s=i.extend(n);n.className="Enum";var o=e(31);n.testJSON=function(e){return!(!e||!e.values)},n.fromJSON=function(e,t){return new n(e,t.values,t.options)},s.toJSON=function(){return{options:this.options,values:this.values}},s.add=function(e,r,n){if(!o.isString(e))throw TypeError("name must be a string");if(!o.isInteger(r))throw TypeError("id must be an integer");if(this.values[e]!==t)throw Error("duplicate name '"+e+"' in "+this);if(this.valuesById[r]!==t)throw Error("duplicate id "+r+" in "+this);return this.valuesById[this.values[e]=r]=e,this.comments[e]=n||null,this},s.remove=function(e){if(!o.isString(e))throw TypeError("name must be a string");var r=this.values[e];if(r===t)throw Error("'"+e+"' is not a name of "+this);return delete this.valuesById[r],delete this.values[e],delete this.comments[e],this}},{21:21,31:31}],16:[function(e,r){function n(e,r,n,s,o,u){if(h.isObject(s)?(u=s,s=o=t):h.isObject(o)&&(u=o,o=t),i.call(this,e,u),!h.isInteger(r)||r<0)throw TypeError("id must be a non-negative integer");if(!h.isString(n))throw TypeError("type must be a string");if(o!==t&&!h.isString(o))throw TypeError("extend must be a string");if(s!==t&&!/^required|optional|repeated$/.test(s=(""+s).toLowerCase()))throw TypeError("rule must be a string rule");this.rule=s&&"optional"!==s?s:t,this.type=n,this.id=r,this.extend=o||t,this.required="required"===s,this.optional=!this.required,this.repeated="repeated"===s,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!h.Long&&a.long[n]!==t,this.bytes="bytes"===n,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.b=null}r.exports=n;var i=e(21),s=i.extend(n);n.className="Field";var o,u,f=e(15),a=e(30),h=e(31);Object.defineProperty(s,"packed",{get:function(){return null===this.b&&(this.b=this.getOption("packed")!==!1),this.b}}),s.setOption=function(e,t,r){return"packed"===e&&(this.b=null),i.prototype.setOption.call(this,e,t,r)},n.testJSON=function(e){return!(!e||e.id===t)},n.fromJSON=function(r,i){return i.keyType!==t?(u||(u=e(17)),u.fromJSON(r,i)):new n(r,i.id,i.type,i.rule,i.extend,i.options)},s.toJSON=function(){return{rule:"optional"!==this.rule&&this.rule||t,type:this.type,id:this.id,extend:this.extend,options:this.options}},s.resolve=function(){if(this.resolved)return this;if((this.typeDefault=a.defaults[this.type])===t)if(o||(o=e(29)),this.resolvedType=this.parent.lookup(this.type,o))this.typeDefault=null;else{if(!(this.resolvedType=this.parent.lookup(this.type,f)))throw Error("unresolvable field type: "+this.type);this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]}if(this.options&&this.options.default!==t&&(this.typeDefault=this.options.default,this.resolvedType instanceof f&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.long)this.typeDefault=h.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var r;h.base64.test(this.typeDefault)?h.base64.decode(this.typeDefault,r=h.newBuffer(h.base64.length(this.typeDefault)),0):h.utf8.write(this.typeDefault,r=h.newBuffer(h.utf8.length(this.typeDefault)),0),this.typeDefault=r}return this.map?this.defaultValue={}:this.repeated?this.defaultValue=[]:this.defaultValue=this.typeDefault,i.prototype.resolve.call(this)}},{15:15,17:17,21:21,29:29,30:30,31:31}],17:[function(e,r){function n(e,t,r,n,s){if(i.call(this,e,t,n,s),!f.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}r.exports=n;var i=e(16),s=i.prototype,o=i.extend(n);n.className="MapField";var u=e(30),f=e(31);n.testJSON=function(e){return i.testJSON(e)&&e.keyType!==t},n.fromJSON=function(e,t){return new n(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;if(u.mapKey[this.keyType]===t)throw Error("invalid key type: "+this.keyType);return s.resolve.call(this)}},{16:16,30:30,31:31}],18:[function(e,t){function r(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}t.exports=r;var n=e(31);r.encode=function(e,t){return this.$type.encode(e,t)},r.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},r.decode=function(e){return this.$type.decode(e)},r.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},r.verify=function(e){return this.$type.verify(e)},r.fromObject=function(e){return this.$type.fromObject(e)},r.from=r.fromObject,r.toObject=function(e,t){return this.$type.toObject(e,t)},r.prototype.toObject=function(e){return this.$type.toObject(this,e)},r.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},{31:31}],19:[function(e,r){function n(e,r,n,s,o,f,a){if(u.isObject(o)?(a=o,o=f=t):u.isObject(f)&&(a=f,f=t),r&&!u.isString(r))throw TypeError("type must be a string");if(!u.isString(n))throw TypeError("requestType must be a string");if(!u.isString(s))throw TypeError("responseType must be a string");i.call(this,e,a),this.type=r||"rpc",this.requestType=n,this.requestStream=!!o||t,this.responseType=s,this.responseStream=!!f||t,this.resolvedRequestType=null,this.resolvedResponseType=null}r.exports=n;var i=e(21),s=i.extend(n);n.className="Method";var o=e(29),u=e(31);n.testJSON=function(e){return!(!e||e.requestType===t)},n.fromJSON=function(e,t){return new n(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options)},s.toJSON=function(){return{type:"rpc"!==this.type&&this.type||t,requestType:this.requestType,requestStream:this.requestStream,responseType:this.responseType,responseStream:this.responseStream,options:this.options}},s.resolve=function(){if(this.resolved)return this;if(!(this.resolvedRequestType=this.parent.lookup(this.requestType,o)))throw Error("unresolvable request type: "+this.requestType);if(!(this.resolvedResponseType=this.parent.lookup(this.responseType,o)))throw Error("unresolvable response type: "+this.requestType);return i.prototype.resolve.call(this)}},{21:21,29:29,31:31}],20:[function(e,r){function n(){a||(a=e(29)),h||(h=e(28)),l=[p,a,h,d,s],c="one of "+l.map(function(e){return e.name}).join(", ")}function i(e){if(!e||!e.length)return t;for(var r={},n=0;n<e.length;++n)r[e[n].name]=e[n].toJSON();return r}function s(e,r){u.call(this,e,r),this.nested=t,this.c=null,this.d=[]}function o(e){e.c=null;for(var t=0;t<e.d.length;++t)delete e[e.d[t]];return e.d=[],e}r.exports=s;var u=e(21),f=u.extend(s);s.className="Namespace";var a,h,l,c,p=e(15),d=e(16),y=e(31);s.testJSON=function(e){return!(!e||e.fields||e.values||e.id!==t||e.oneof||e.methods||e.requestType!==t)},s.fromJSON=function(e,t){return new s(e,t.options).addJSON(t.nested)},s.arrayToJSON=i,Object.defineProperty(f,"nestedArray",{get:function(){return this.c||(this.c=y.toArray(this.nested))}}),f.toJSON=function(){return{options:this.options,nested:i(this.nestedArray)}},f.addJSON=function(e){var t=this;return e&&(l||n(),Object.keys(e).forEach(function(r){for(var n=e[r],i=0;i<l.length;++i)if(l[i].testJSON(n))return t.add(l[i].fromJSON(r,n));throw TypeError("nested."+r+" must be JSON for "+c)})),this},f.get=function(e){return this.nested===t?null:this.nested[e]||null},f.getEnum=function(e){if(this.nested&&this.nested[e]instanceof p)return this.nested[e].values;throw Error("no such enum")},f.add=function(e){if(l||n(),!e||l.indexOf(e.constructor)<0)throw TypeError("object must be "+c);if(e instanceof d&&e.extend===t)throw TypeError("object must be an extension field when not part of a type");if(this.nested){var r=this.get(e.name);if(r){if(!(r instanceof s&&e instanceof s)||r instanceof a||r instanceof h)throw Error("duplicate name '"+e.name+"' in "+this);for(var i=r.nestedArray,u=0;u<i.length;++u)e.add(i[u]);this.remove(r),this.nested||(this.nested={}),e.setOptions(r.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),o(this)},f.remove=function(e){if(!(e instanceof u))throw TypeError("object must be 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=t),e.onRemove(this),o(this)},f.define=function(e,t){if(y.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");for(var r=this;e.length>0;){var n=e.shift();if(r.nested&&r.nested[n]){if(r=r.nested[n],!(r instanceof s))throw Error("path conflicts with non-namespace objects")}else r.add(r=new s(n))}return t&&r.addJSON(t),r},f.resolve=function(){a||(a=e(29)),h||(a=e(28));for(var t=this.nestedArray,r=0;r<t.length;++r)if(/^[A-Z]/.test(t[r].name)){if(t[r]instanceof a||t[r]instanceof h)this[t[r].name]=t[r];else{if(!(t[r]instanceof p))continue;this[t[r].name]=t[r].values}this.d.push(t[r].name)}return u.prototype.resolve.call(this)},f.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof s?e[t++].resolveAll():e[t++].resolve();return f.resolve.call(this)},f.lookup=function(e,r,n){if("boolean"==typeof r&&(n=r,r=t),y.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;if(""===e[0])return this.root.lookup(e.slice(1),r);var i=this.get(e[0]);if(i)if(1===e.length){if(!r||i instanceof r)return i}else if(i instanceof s&&(i=i.lookup(e.slice(1),r,!0)))return i;return null===this.parent||n?null:this.parent.lookup(e,r)},f.lookupType=function(t){a||(a=e(29));var r=this.lookup(t,a);if(!r)throw Error("no such type");return r},f.lookupService=function(t){h||(h=e(28));var r=this.lookup(t,h);if(!r)throw Error("no such service");return r},f.lookupEnum=function(e){var t=this.lookup(e,p);if(!t)throw Error("no such enum");return t.values}},{15:15,16:16,21:21,28:28,29:29,31:31}],21:[function(e,r){function n(e,t){if(!i.isString(e))throw TypeError("name must be a string");if(t&&!i.isObject(t))throw TypeError("options must be an object");this.options=t,this.name=e,this.parent=null,this.resolved=!1,this.comment=null}r.exports=n;var i=e(31);n.className="ReflectionObject",n.extend=i.extend;var s,o=n.prototype;Object.defineProperties(o,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),o.toJSON=function(){throw Error()},o.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var r=t.root;s||(s=e(25)),r instanceof s&&r.e(this)},o.onRemove=function(t){s||(s=e(25));var r=t.root;r instanceof s&&r.f(this),this.parent=null,this.resolved=!1},o.resolve=function(){return this.resolved?this:(s||(s=e(25)),this.root instanceof s&&(this.resolved=!0),this)},o.getOption=function(e){return this.options?this.options[e]:t},o.setOption=function(e,r,n){return n&&this.options&&this.options[e]!==t||((this.options||(this.options={}))[e]=r),this},o.setOptions=function(e,t){return e&&Object.keys(e).forEach(function(r){this.setOption(r,e[r],t)},this),this},o.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e}},{25:25,31:31}],22:[function(e,r){function n(e,r,n){if(Array.isArray(r)||(n=r,r=t),s.call(this,e,n),r&&!Array.isArray(r))throw TypeError("fieldNames must be an Array");this.oneof=r||[],this.g=[]}function i(e){e.parent&&e.g.forEach(function(t){t.parent||e.parent.add(t)})}r.exports=n;var s=e(21),o=s.extend(n);n.className="OneOf";var u=e(16);Object.defineProperty(o,"fieldsArray",{get:function(){return this.g}}),n.testJSON=function(e){return!!e.oneof},n.fromJSON=function(e,t){return new n(e,t.oneof,t.options)},o.toJSON=function(){return{oneof:this.oneof,options:this.options}},o.add=function(e){if(!(e instanceof u))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.g.push(e),e.partOf=this,i(this),this},o.remove=function(e){if(!(e instanceof u))throw TypeError("field must be 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.partOf=null,this},o.onAdd=function(e){s.prototype.onAdd.call(this,e);var t=this;this.oneof.forEach(function(r){var n=e.get(r);n&&!n.partOf&&(n.partOf=t,t.g.push(n))}),i(this)},o.onRemove=function(e){this.g.forEach(function(e){e.parent&&e.parent.remove(e)}),s.prototype.onRemove.call(this,e)}},{16:16,21:21}],23:[function(e,t){function r(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 i(){var e=new w(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw r(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw r(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function s(){return i.call(this).toLong()}function o(){return i.call(this).toNumber()}function u(){return i.call(this).toLong(!0)}function f(){return i.call(this).toNumber(!0)}function a(){return i.call(this).zzDecode().toLong()}function h(){return i.call(this).zzDecode().toNumber()}function l(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function c(){if(this.pos+8>this.len)throw r(this,8);return new w(l(this.buf,this.pos+=4),l(this.buf,this.pos+=4))}function p(){return c.call(this).toLong(!0)}function d(){return c.call(this).toNumber(!0)}function y(){return c.call(this).zzDecode().toLong()}function v(){return c.call(this).zzDecode().toNumber()}function m(){b.Long?(j.int64=s,j.uint64=u,j.sint64=a,j.fixed64=p,j.sfixed64=y):(j.int64=o,j.uint64=f,j.sint64=h,j.fixed64=d,j.sfixed64=v)}t.exports=n;var g,b=e(33),w=b.LongBits,O=b.utf8;n.create=b.Buffer?function(t){return g||(g=e(24)),(n.create=function(e){return b.Buffer.isBuffer(e)?new g(e):new n(e)})(t)}:function(e){return new n(e)};var j=n.prototype;j.h=b.Array.prototype.subarray||b.Array.prototype.slice,j.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,r(this,10);return e}}(),j.int32=function(){return 0|this.uint32()},j.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},j.bool=function(){return 0!==this.uint32()},j.fixed32=function(){if(this.pos+4>this.len)throw r(this,4);return l(this.buf,this.pos+=4)},j.sfixed32=function(){var e=this.fixed32();return e>>>1^-(1&e)};var k="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],e[0]}:function(r,n){return t[3]=r[n],t[2]=r[n+1],t[1]=r[n+2],t[0]=r[n+3],e[0]}}():function(e,t){var r=l(e,t+4),n=2*(r>>31)+1,i=r>>>23&255,s=8388607&r;return 255===i?s?NaN:n*(1/0):0===i?1.401298464324817e-45*n*s:n*Math.pow(2,i-150)*(s+8388608)};j.float=function(){if(this.pos+4>this.len)throw r(this,4);var e=k(this.buf,this.pos);return this.pos+=4,e};var x="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],t[4]=r[n+4],t[5]=r[n+5],t[6]=r[n+6],t[7]=r[n+7],e[0]}:function(r,n){return t[7]=r[n],t[6]=r[n+1],t[5]=r[n+2],t[4]=r[n+3],t[3]=r[n+4],t[2]=r[n+5],t[1]=r[n+6],t[0]=r[n+7],e[0]}}():function(e,t){var r=l(e,t+4),n=l(e,t+8),i=2*(n>>31)+1,s=n>>>20&2047,o=4294967296*(1048575&n)+r;return 2047===s?o?NaN:i*(1/0):0===s?5e-324*i*o:i*Math.pow(2,s-1075)*(o+4503599627370496)};j.double=function(){if(this.pos+8>this.len)throw r(this,4);var e=x(this.buf,this.pos);return this.pos+=8,e},j.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw r(this,e);return this.pos+=e,t===n?new this.buf.constructor(0):this.h.call(this.buf,t,n)},j.string=function(){var e=this.bytes();return O.read(e,0,e.length)},j.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw r(this,e);this.pos+=e}else do if(this.pos>=this.len)throw r(this);while(128&this.buf[this.pos++]);return this},j.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(;;){if(4===(e=7&this.uint32()))break;this.skipType(e)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},n.i=m,m()},{24:24,33:33}],24:[function(e,t){function r(e){n.call(this,e)}t.exports=r;var n=e(23),i=r.prototype=Object.create(n.prototype);i.constructor=r;var s=e(33);s.Buffer&&(i.h=s.Buffer.prototype.slice),i.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len));
}},{23:23,33:33}],25:[function(e,r){function n(e){o.call(this,"",e),this.deferred=[],this.files=[]}function i(){}function s(e){var r=e.parent.lookup(e.extend);if(r){var n=new h(e.fullName,e.id,e.type,e.rule,t,e.options);return n.declaringField=e,e.extensionField=n,r.add(n),!0}return!1}r.exports=n;var o=e(20),u=o.extend(n);n.className="Root";var f,a,h=e(16),l=e(31);n.fromJSON=function(e,t){return t||(t=new n),t.setOptions(e.options).addJSON(e.nested)},u.resolvePath=l.path.resolve;var c=function(){try{f=e("./parse"),a=e("./common")}catch(e){}c=null};u.load=function e(r,n,s){function o(e,t){if(s){var r=s;if(s=null,d)throw e;r(e,t)}}function u(e,t){try{if(l.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),l.isString(t)){f.filename=e;var r=f(t,p,n);r.imports&&r.imports.forEach(function(t){h(p.resolvePath(e,t))}),r.weakImports&&r.weakImports.forEach(function(t){h(p.resolvePath(e,t),!0)})}else p.setOptions(t.options).addJSON(t.nested)}catch(e){o(e)}d||y||o(null,p)}function h(e,r){var n=e.lastIndexOf("google/protobuf/");if(n>-1){var i=e.substring(n);i in a&&(e=i)}if(!(p.files.indexOf(e)>-1)){if(p.files.push(e),e in a)return d?u(e,a[e]):(++y,setTimeout(function(){--y,u(e,a[e])})),t;if(d){var f;try{f=l.fs.readFileSync(e).toString("utf8")}catch(e){return r||o(e),t}u(e,f)}else++y,l.fetch(e,function(n,i){if(--y,s)return n?(r?y||o(null,p):o(n),t):(u(e,i),t)})}}c&&c(),"function"==typeof n&&(s=n,n=t);var p=this;if(!s)return l.asPromise(e,p,r);var d=s===i,y=0;return l.isString(r)&&(r=[r]),r.forEach(function(e){h(p.resolvePath("",e))}),d?p:(y||o(null,p),t)},u.loadSync=function(e,t){if(!l.isNode)throw Error("not supported");return this.load(e,t,i)},u.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(e){return"'extend "+e.extend+"' in "+e.parent.fullName}).join(", "));return o.prototype.resolveAll.call(this)},u.e=function(e){var r=this.deferred.slice();this.deferred=[];for(var n=0;n<r.length;)s(r[n])?r.splice(n,1):++n;if(this.deferred=r,e instanceof h&&e.extend!==t&&!e.extensionField&&!s(e)&&this.deferred.indexOf(e)<0)this.deferred.push(e);else if(e instanceof o){var i=e.nestedArray;for(n=0;n<i.length;++n)this.e(i[n])}},u.f=function(e){if(e instanceof h){if(e.extend!==t&&!e.extensionField){var r=this.deferred.indexOf(e);r>-1&&this.deferred.splice(r,1)}e.extensionField&&(e.extensionField.parent.remove(e.extensionField),e.extensionField=null)}else if(e instanceof o)for(var n=e.nestedArray,i=0;i<n.length;++i)this.f(n[i])}},{16:16,20:20,31:31,undefined:t}],26:[function(e,t,r){var n=r;n.Service=e(27)},{27:27}],27:[function(e,t){function r(e){n.call(this),this.$rpc=e}t.exports=r;var n=e(31).EventEmitter;(r.prototype=Object.create(n.prototype)).constructor=r,r.prototype.end=function(e){return this.$rpc&&(e||this.$rpc(null,null,null),this.$rpc=null,this.emit("end").off()),this}},{31:31}],28:[function(e,r){function n(e,t){s.call(this,e,t),this.methods={},this.j=null}function i(e){return e.j=null,e}r.exports=n;var s=e(20),o=s.prototype,u=s.extend(n);n.className="Service";var f=e(19),a=e(31),h=e(26);n.testJSON=function(e){return!(!e||!e.methods)},n.fromJSON=function(e,t){var r=new n(e,t.options);return t.methods&&Object.keys(t.methods).forEach(function(e){r.add(f.fromJSON(e,t.methods[e]))}),r},Object.defineProperty(u,"methodsArray",{get:function(){return this.j||(this.j=a.toArray(this.methods))}}),u.toJSON=function(){var e=o.toJSON.call(this);return{options:e&&e.options||t,methods:s.arrayToJSON(this.methodsArray)||{},nested:e&&e.nested||t}},u.get=function(e){return o.get.call(this,e)||this.methods[e]||null},u.resolveAll=function(){for(var e=this.methodsArray,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 f?(this.methods[e.name]=e,e.parent=this,i(this)):o.add.call(this,e)},u.remove=function(e){if(e instanceof f){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,i(this)}return o.remove.call(this,e)},u.create=function(e,r,n){var i=new h.Service(e);return this.methodsArray.forEach(function(s){i[a.lcFirst(s.name)]=function(o,u){if(!i.$rpc){var f=Error("already ended");if(u)return u(f);throw f}if(!o)throw TypeError("request must not be null");s.resolve();var a=(r?s.resolvedRequestType.encodeDelimited(o):s.resolvedRequestType.encode(o)).finish();return e(s,a,function(e,r){if(e){if(i.emit("error",e,s),u)return u(e);throw e}if(null===r)return i.end(!0),t;var o;try{o=n?s.resolvedResponseType.decodeDelimited(r):s.resolvedResponseType.decode(r)}catch(e){if(i.emit("error",e,s),u)return u("error",e);throw e}return i.emit("data",o,s),u?u(null,o):t})}}),i}},{19:19,20:20,26:26,31:31}],29:[function(e,r){function n(e,r){s.call(this,e,r),this.fields={},this.oneofs=t,this.extensions=t,this.reserved=t,this.group=t,this.k=null,this.g=null,this.l=null,this.m=null}function i(e){return e.k=e.g=e.l=e.m=null,delete e.encode,delete e.decode,delete e.verify,e}r.exports=n;var s=e(20),o=s.prototype,u=s.extend(n);n.className="Type";var f=e(15),a=e(22),h=e(16),l=e(28),c=e(11),p=e(18),d=e(23),y=e(35),v=e(31),m=e(14),g=e(13),b=e(34),w=e(12),O=[f,n,h,l];n.testJSON=function(e){return!(!e||!e.fields)},n.fromJSON=function(e,r){var i=new n(e,r.options);return i.extensions=r.extensions,i.reserved=r.reserved,Object.keys(r.fields).forEach(function(e){i.add(h.fromJSON(e,r.fields[e]))}),r.oneofs&&Object.keys(r.oneofs).forEach(function(e){i.add(a.fromJSON(e,r.oneofs[e]))}),r.nested&&Object.keys(r.nested).forEach(function(e){for(var n=r.nested[e],s=0;s<O.length;++s)if(O[s].testJSON(n))return i.add(O[s].fromJSON(e,n)),t;throw Error("invalid nested object in "+i+": "+e)}),r.extensions&&r.extensions.length&&(i.extensions=r.extensions),r.reserved&&r.reserved.length&&(i.reserved=r.reserved),r.group&&(i.group=!0),i},Object.defineProperties(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]],n=r.id;if(this.k[n])throw Error("duplicate id "+n+" in "+this);this.k[n]=r}return this.k}},fieldsArray:{get:function(){return this.g||(this.g=v.toArray(this.fields))}},oneofsArray:{get:function(){return this.l||(this.l=v.toArray(this.oneofs))}},ctor:{get:function(){return this.m||(this.m=c.create(this).constructor)},set:function(e){if(e&&!(e.prototype instanceof p))throw TypeError("ctor must be a Message constructor");e.from||(e.from=p.from),this.m=e}}}),u.toJSON=function(){var e=o.toJSON.call(this);return{options:e&&e.options||t,oneofs:s.arrayToJSON(this.oneofsArray),fields:s.arrayToJSON(this.fieldsArray.filter(function(e){return!e.declaringField}))||{},extensions:this.extensions&&this.extensions.length?this.extensions:t,reserved:this.reserved&&this.reserved.length?this.reserved:t,group:this.group||t,nested:e&&e.nested||t}},u.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var r=this.oneofsArray;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 h&&e.extend===t){if(this.fieldsById[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),i(this)}return e instanceof a?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),i(this)):o.add.call(this,e)},u.remove=function(e){if(e instanceof h&&e.extend===t){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),i(this)}if(e instanceof a){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),i(this)}return o.remove.call(this,e)},u.create=function(e){return new this.ctor(e)},u.setup=function(){var e=this.fullName,t=this.fieldsArray.map(function(e){return e.resolve().resolvedType});return this.encode=m(this).eof(e+"$encode",{Writer:y,types:t,util:v}),this.decode=g(this).eof(e+"$decode",{Reader:d,types:t,util:v}),this.verify=b(this).eof(e+"$verify",{types:t,util:v}),this.fromObject=this.from=w.fromObject(this).eof(e+"$fromObject",{types:t,util:v}),this.toObject=w.toObject(this).eof(e+"$toObject",{types:t,util:v}),this},u.encode=function(e,t){return this.setup().encode(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.setup().decode(e,t)},u.decodeDelimited=function(e){return e instanceof d||(e=d.create(e)),this.decode(e,e.uint32())},u.verify=function(e){return this.setup().verify(e)},u.fromObject=function(e){return this.setup().fromObject(e)},u.from=u.fromObject,u.toObject=function(e,t){return this.setup().toObject(e,t)}},{11:11,12:12,13:13,14:14,15:15,16:16,18:18,20:20,22:22,23:23,28:28,31:31,34:34,35:35}],30:[function(e,t,r){function n(e,t){var r=0,n={};for(t|=0;r<e.length;)n[o[r+t]]=e[r++];return n}var i=r,s=e(31),o=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];i.basic=n([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),i.defaults=n([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",s.emptyArray,null]),i.long=n([0,0,0,1,1],7),i.mapKey=n([0,0,0,5,5,0,0,0,1,1,0,2],2),i.packed=n([1,5,0,0,0,5,5,0,0,0,1,1,0])},{31:31}],31:[function(e,t){var r=t.exports=e(33);r.asPromise=e(1),r.codegen=e(3),r.EventEmitter=e(4),r.extend=e(5),r.fetch=e(6),r.path=e(8),r.fs=r.inquire("fs"),r.toArray=function(e){return e?Object.keys(e).map(function(t){return e[t]}):[]},r.safeProp=function(e){return'["'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"]'},r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)}},{1:1,3:3,33:33,4:4,5:5,6:6,8:8}],32:[function(e,t){function r(e,t){this.lo=e,this.hi=t}t.exports=r;var n=e(33),i=r.prototype,s=r.zero=new r(0,0);s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1};var o=r.zeroHash="\0\0\0\0\0\0\0\0";r.fromNumber=function(e){if(0===e)return s;var t=e<0;t&&(e=-e);var n=e>>>0,i=(e-n)/4294967296>>>0;return t&&(i=~i>>>0,n=~n>>>0,++n>4294967295&&(n=0,++i>4294967295&&(i=0))),new r(n,i)},r.from=function(e){if("number"==typeof e)return r.fromNumber(e);if("string"==typeof e){if(!n.Long)return r.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new r(e.low>>>0,e.high>>>0):s},i.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},i.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,(!!e)):{low:0|this.lo,high:0|this.hi,unsigned:!!e}};var u=String.prototype.charCodeAt;r.fromHash=function(e){return e===o?s:new r((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)},i.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.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},i.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},i.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<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},{33:33}],33:[function(r,n,i){var s=i;s.base64=r(2),s.inquire=r(7),s.utf8=r(10),s.pool=r(9),s.emptyArray=Object.freeze?Object.freeze([]):[],s.emptyObject=Object.freeze?Object.freeze({}):{},s.isNode=!!(e.process&&e.process.versions&&e.process.versions.node),s.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},s.isString=function(e){return"string"==typeof e||e instanceof String},s.isObject=function(e){return e&&"object"==typeof e},s.Buffer=function(){try{var e=s.inquire("buffer").Buffer;return e.prototype.utf8Write?(e.from||(e.from=function(t,r){return new e(t,r)}),e.allocUnsafe||(e.allocUnsafe=function(t){return new e(t)}),e):null}catch(e){return null}}(),s.newBuffer=function(e){return"number"==typeof e?s.Buffer?s.Buffer.allocUnsafe(e):new s.Array(e):s.Buffer?s.Buffer.from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},s.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,s.LongBits=r(32),s.Long=e.dcodeIO&&e.dcodeIO.Long||s.inquire("long"),s.longToHash=function(e){return e?s.LongBits.from(e).toHash():s.LongBits.zeroHash},s.longFromHash=function(e,t){var r=s.LongBits.fromHash(e);return s.Long?s.Long.fromBits(r.lo,r.hi,t):r.toNumber(!!t)},s.merge=function(e,r,n){for(var i=Object.keys(r),s=0;s<i.length;++s)e[i[s]]!==t&&n||(e[i[s]]=r[i[s]]);return e},s.oneOfGetter=function(e){var r={};return e.forEach(function(e){r[e]=1}),function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(1===r[e[n]]&&this[e[n]]!==t&&null!==this[e[n]])return e[n]}},s.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},s.lazyResolve=function(e,t){t.forEach(function(t){Object.keys(t).forEach(function(r){for(var n=t[r|=0].split("."),i=e;n.length;)i=i[n.shift()];t[r]=i})})},s.toJSONOptions={longs:String,enums:String,bytes:String}},{10:10,2:2,32:32,7:7,9:9}],34:[function(e,t){function r(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function n(e,t,n,i){if(t.resolvedType)if(t.resolvedType instanceof o){e("switch(%s){",i)("default:")("return%j",r(t,"enum value"));for(var s=u.toArray(t.resolvedType.values),f=0;f<s.length;++f)e("case %d:",s[f]);e("break")("}")}else e("var e=types[%d].verify(%s);",n,i)("if(e)")("return%j+e",t.name+".");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",i)("return%j",r(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)))",i,i,i,i)("return%j",r(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',i)("return%j",r(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',i)("return%j",r(t,"boolean"));break;case"string":e("if(!util.isString(%s))",i)("return%j",r(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',i,i,i)("return%j",r(t,"buffer"))}return e}function i(e,t,n){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!/^-?(?:0|[1-9][0-9]*)$/.test(%s))",n)("return%j",r(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/.test(%s))",n)("return%j",r(t,"integer|Long key"));break;case"bool":e("if(!/^true|false|0|1$/.test(%s))",n)("return%j",r(t,"boolean key"))}return e}function s(e){var t=e.fieldsArray;if(!t.length)return u.codegen()("return null");for(var s=u.codegen("m"),f=0;f<t.length;++f){var a=t[f].resolve(),h="m"+u.safeProp(a.name);a.map?(s("if(%s!==undefined){",h)("if(!util.isObject(%s))",h)("return%j",r(a,"object"))("var k=Object.keys(%s)",h)("for(var i=0;i<k.length;++i){"),i(s,a,"k[i]"),n(s,a,f,h+"[k[i]]")("}")("}")):a.repeated?(s("if(%s!==undefined){",h)("if(!Array.isArray(%s))",h)("return%j",r(a,"array"))("for(var i=0;i<%s.length;++i){",h),n(s,a,f,h+"[i]")("}")("}")):(a.required||(!a.resolvedType||a.resolvedType instanceof o?s("if(%s!==undefined){",h):s("if(%s!==undefined&&%s!==null){",h,h)),n(s,a,f,h),a.required||s("}"))}return s("return null")}t.exports=s;var o=e(15),u=e(31)},{15:15,31:31}],35:[function(e,r){function n(e,r,n){this.fn=e,this.len=r,this.next=t,this.val=n}function i(){}function s(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function o(){this.len=0,this.head=new n(i,0,0),this.tail=this.head,this.states=null}function u(e,t,r){t[r]=255&e}function f(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e}function a(e,r){this.len=e,this.next=t,this.val=r}function h(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function l(e,t,r){t[r++]=255&e,t[r++]=e>>>8&255,t[r++]=e>>>16&255,t[r]=e>>>24}r.exports=o;var c,p=e(33),d=p.LongBits,y=p.base64,v=p.utf8;o.create=p.Buffer?function(){return c||(c=e(36)),(o.create=function(){return new c})()}:function(){return new o},o.alloc=function(e){return new p.Array(e)},p.Array!==Array&&(o.alloc=p.pool(o.alloc,p.Array.prototype.subarray));var m=o.prototype;m.push=function(e,t,r){return this.tail=this.tail.next=new n(e,t,r),this.len+=t,this},a.prototype=Object.create(n.prototype),a.prototype.fn=f,m.uint32=function(e){return this.len+=(this.tail=this.tail.next=new a((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},m.int32=function(e){return e<0?this.push(h,10,d.fromNumber(e)):this.uint32(e)},m.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},m.uint64=function(e){var t=d.from(e);return this.push(h,t.length(),t)},m.int64=m.uint64,m.sint64=function(e){var t=d.from(e).zzEncode();return this.push(h,t.length(),t)},m.bool=function(e){return this.push(u,1,e?1:0)},m.fixed32=function(e){return this.push(l,4,e>>>0)},m.sfixed32=function(e){return this.push(l,4,e<<1^e>>31)},m.fixed64=function(e){var t=d.from(e);return this.push(l,4,t.lo).push(l,4,t.hi)},m.sfixed64=function(e){var t=d.from(e).zzEncode();return this.push(l,4,t.lo).push(l,4,t.hi)};var g="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n,i){e[0]=r,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i]=t[3]}:function(r,n,i){e[0]=r,n[i++]=t[3],n[i++]=t[2],n[i++]=t[1],n[i]=t[0]}}():function(e,t,r){var n=e<0?1:0;if(n&&(e=-e),0===e)l(1/e>0?0:2147483648,t,r);else if(isNaN(e))l(2147483647,t,r);else if(e>3.4028234663852886e38)l((n<<31|2139095040)>>>0,t,r);else if(e<1.1754943508222875e-38)l((n<<31|Math.round(e/1.401298464324817e-45))>>>0,t,r);else{var i=Math.floor(Math.log(e)/Math.LN2),s=8388607&Math.round(e*Math.pow(2,-i)*8388608);l((n<<31|i+127<<23|s)>>>0,t,r)}};m.float=function(e){return this.push(g,4,e)};var b="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,n,i){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(r,n,i){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,r){var n=e<0?1:0;if(n&&(e=-e),0===e)l(0,t,r),l(1/e>0?0:2147483648,t,r+4);else if(isNaN(e))l(4294967295,t,r),l(2147483647,t,r+4);else if(e>1.7976931348623157e308)l(0,t,r),l((n<<31|2146435072)>>>0,t,r+4);else{var i;if(e<2.2250738585072014e-308)i=e/5e-324,l(i>>>0,t,r),l((n<<31|i/4294967296)>>>0,t,r+4);else{var s=Math.floor(Math.log(e)/Math.LN2);1024===s&&(s=1023),i=e*Math.pow(2,-s),l(4503599627370496*i>>>0,t,r),l((n<<31|s+1023<<20|1048576*i&1048575)>>>0,t,r+4)}}};m.double=function(e){return this.push(b,8,e)};var w=p.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};m.bytes=function(e){var t=e.length>>>0;if(!t)return this.push(u,1,0);if("string"==typeof e){var r=o.alloc(t=y.length(e));y.decode(e,r,0),e=r}return this.uint32(t).push(w,t,e)},m.string=function(e){var t=v.length(e);return t?this.uint32(t).push(v.write,t,e):this.push(u,1,0)},m.fork=function(){return this.states=new s(this),this.head=this.tail=new n(i,0,0),this.len=0,this},m.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 n(i,0,0),this.len=0),this},m.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},m.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t}},{33:33,36:36}],36:[function(e,t){function r(){i.call(this)}function n(e,t,r){e.length<40?o.utf8.write(e,t,r):t.utf8Write(e,r)}t.exports=r;var i=e(35),s=r.prototype=Object.create(i.prototype);s.constructor=r;var o=e(33),u=o.Buffer;r.alloc=function(e){return(r.alloc=u.allocUnsafe)(e)};var f=u&&u.prototype instanceof Uint8Array&&"set"===u.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n<e.length;)t[r++]=e[n++]};s.bytes=function(e){"string"==typeof e&&(e=u.from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this.push(f,t,e),this},s.string=function(e){var t=u.byteLength(e);return this.uint32(t),t&&this.push(n,t,e),this}},{33:33,35:35}],37:[function(t,r,n){function i(e,t,r){return"function"==typeof t?(r=t,t=new u.Root):t||(t=new u.Root),t.load(e,r)}function s(e,t){return t||(t=new u.Root),t.loadSync(e)}function o(){u.Reader.i()}var u=e.protobuf=n;u.load=i,u.loadSync=s,u.roots={};try{u.tokenize=t("./tokenize"),u.parse=t("./parse"),u.common=t("./common")}catch(e){}u.Writer=t(35),u.BufferWriter=t(36),u.Reader=t(23),u.BufferReader=t(24),u.encoder=t(14),u.decoder=t(13),u.verifier=t(34),u.converter=t(12),u.ReflectionObject=t(21),u.Namespace=t(20),u.Root=t(25),u.Enum=t(15),u.Type=t(29),u.Field=t(16),u.OneOf=t(22),u.MapField=t(17),u.Service=t(28),u.Method=t(19),u.Class=t(11),u.Message=t(18),u.types=t(30),u.rpc=t(26),u.util=t(31),u.configure=o,"function"==typeof define&&define.amd&&define(["long"],function(e){return e&&(u.util.Long=e,o()),u})},{11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,28:28,29:29,30:30,31:31,34:34,35:35,36:36,undefined:t}]},{},[37])}("object"==typeof window&&window||"object"==typeof self&&self||this);
//# sourceMappingURL=protobuf.min.js.map
/*!
* protobuf.js v6.5.1 (c) 2016, Daniel Wirtz
* Compiled Wed, 18 Jan 2017 02:28:43 UTC
* protobuf.js v6.5.2 (c) 2016, Daniel Wirtz
* Compiled Thu, 19 Jan 2017 16:30:55 UTC
* Licensed under the BSD-3-Clause License
* see: https://github.com/dcodeIO/protobuf.js for details
*/
!function(e,t){"use strict";!function e(t,r,n){function i(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=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 i(r?r:e)},l,l.exports,e,t,r,n)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(e,t){function r(e,t){for(var r=[],n=2;n<arguments.length;)r.push(arguments[n++]);var i=!0;return new Promise(function(n,s){r.push(function(e){if(i)if(i=!1,e)s(e);else{for(var t=[],r=1;r<arguments.length;)t.push(arguments[r++]);n.apply(null,t)}});try{e.apply(t||this,r)}catch(e){i&&(i=!1,s(e))}})}t.exports=r},{}],2:[function(e,r,n){var i=n;i.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var s=Array(64),o=Array(123),u=0;u<64;)o[s[u]=u<26?u+65:u<52?u+71:u<62?u-4:u-59|43]=u++;i.encode=function(e,t,r){for(var n,i=[],o=0,u=0;t<r;){var a=e[t++];switch(u){case 0:i[o++]=s[a>>2],n=(3&a)<<4,u=1;break;case 1:i[o++]=s[n|a>>4],n=(15&a)<<2,u=2;break;case 2:i[o++]=s[n|a>>6],i[o++]=s[63&a],u=0}}return u&&(i[o++]=s[n],i[o]=61,1===u&&(i[o+1]=61)),String.fromCharCode.apply(String,i)};var a="invalid encoding";i.decode=function(e,r,n){for(var i,s=n,u=0,f=0;f<e.length;){var l=e.charCodeAt(f++);if(61===l&&u>1)break;if((l=o[l])===t)throw Error(a);switch(u){case 0:i=l,u=1;break;case 1:r[n++]=i<<2|(48&l)>>4,i=l,u=2;break;case 2:r[n++]=(15&i)<<4|(60&l)>>2,i=l,u=3;break;case 3:r[n++]=(3&i)<<6|l,u=0}}if(1===u)throw Error(a);return n-s},i.test=function(e){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e)}},{}],3:[function(e,r){function n(){function e(){for(var t=[],r=0;r<arguments.length;)t.push(arguments[r++]);var n=i.apply(null,t),l=p;if(c.length){var h=c[c.length-1];s.test(h)?l=++p:a.test(h)&&++l,u.test(h)&&!u.test(n)?(l=++p,d=!0):d&&f.test(h)&&(l=--p,d=!1),o.test(n)&&(l=--p)}for(r=0;r<l;++r)n="\t"+n;return c.push(n),e}function r(e){return"function"+(e?" "+e.replace(/[^\w_$]/g,"_"):"")+"("+h.join(",")+") {\n"+c.join("\n")+"\n}"}function l(r,i){"object"==typeof r&&(i=r,r=t);var s=e.str(r);n.verbose&&console.log("--- codegen ---\n"+s.replace(/^/gm,"> ").replace(/\t/g," "));var o=Object.keys(i||(i={}));return Function.apply(null,o.concat("return "+s)).apply(null,o.map(function(e){return i[e]}))}for(var h=[],c=[],p=1,d=!1,y=0;y<arguments.length;)h.push(arguments[y++]);return e.str=r,e.eof=l,e}function i(e){for(var t=[],r=1;r<arguments.length;)t.push(arguments[r++]);if(r=0,e=e.replace(/%([dfjs])/g,function(e,n){switch(n){case"d":return Math.floor(t[r++]);case"f":return+t[r++];case"j":return JSON.stringify(t[r++]);default:return t[r++]}}),r!==t.length)throw Error("argument count mismatch");return e}r.exports=n;var s=/[{[]$/,o=/^[}\]]/,u=/:$/,a=/^\s*(?:if|}?else if|while|for)\b|\b(?:else)\s*$/,f=/\b(?:break|continue)(?: \w+)?;?$|^\s*return\b/;n.sprintf=i,n.supported=!1;try{n.supported=1===n("a","b")("return a-b").eof()(2,1)}catch(e){}n.verbose=!1},{}],4:[function(e,r){function n(){this.a={}}r.exports=n;var i=n.prototype;i.on=function(e,t,r){return(this.a[e]||(this.a[e]=[])).push({fn:t,ctx:r||this}),this},i.off=function(e,r){if(e===t)this.a={};else if(r===t)this.a[e]=[];else for(var n=this.a[e],i=0;i<n.length;)n[i].fn===r?n.splice(i,1):++i;return this},i.emit=function(e){var t=this.a[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},{}],5:[function(e,t){function r(e){for(var t=Object.keys(this),r=0;r<t.length;++r)e[t[r]]=this[t[r]];var n=e.prototype=Object.create(this.prototype);return n.constructor=e,n}t.exports=r},{}],6:[function(e,r){function n(e,t){return t?u&&u.readFile?u.readFile(e,"utf8",function(r,n){return r&&"undefined"!=typeof XMLHttpRequest?i(e,t):t(r,n)}):i(e,t):s(n,this,e)}function i(e,r){var n=new XMLHttpRequest;n.onreadystatechange=function(){return 4===n.readyState?0===n.status||200===n.status?r(null,n.responseText):r(Error("status "+n.status)):t},n.open("GET",e),n.send()}r.exports=n;var s=e(1),o=e(7),u=o("fs")},{1:1,7:7}],7:[function(e,t,r){function n(e){try{var t=eval("quire".replace(/^/,"re"))(e);if(t&&(t.length||Object.keys(t).length))return t}catch(e){}return null}t.exports=n},{}],8:[function(e,t,r){var n=r,i=n.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},s=n.normalize=function(e){e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var t=e.split("/"),r=i(e),n="";r&&(n=t.shift()+"/");for(var s=0;s<t.length;)".."===t[s]?s>0?t.splice(--s,2):r?t.splice(s,1):++s:"."===t[s]?t.splice(s,1):++s;return n+t.join("/")};n.resolve=function(e,t,r){return r||(t=s(t)),i(t)?t:(r||(e=s(e)),(e=e.replace(/(?:\/|^)[^\/]+$/,"")).length?s(e+"/"+t):t)}},{}],9:[function(e,t){function r(e,t,r){var n=r||8192,i=n>>>1,s=null,o=n;return function(r){if(r<1||r>i)return e(r);o+r>n&&(s=e(n),o=0);var u=t.call(s,o,o+=r);return 7&o&&(o=(7|o)+1),u}}t.exports=r},{}],10:[function(e,t,r){var n=r;n.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)r=e.charCodeAt(n),r<128?t+=1:r<2048?t+=2:55296===(64512&r)&&56320===(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},n.read=function(e,t,r){var n=r-t;if(n<1)return"";for(var i,s=null,o=[],u=0;t<r;)i=e[t++],i<128?o[u++]=i:i>191&&i<224?o[u++]=(31&i)<<6|63&e[t++]:i>239&&i<365?(i=((7&i)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[u++]=55296+(i>>10),o[u++]=56320+(1023&i)):o[u++]=(15&i)<<12|(63&e[t++])<<6|63&e[t++],u>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),u=0);return s?(u&&s.push(String.fromCharCode.apply(String,o.slice(0,u))),s.join("")):u?String.fromCharCode.apply(String,o.slice(0,u)):""},n.write=function(e,t,r){for(var n,i,s=r,o=0;o<e.length;++o)n=e.charCodeAt(o),n<128?t[r++]=n:n<2048?(t[r++]=n>>6|192,t[r++]=63&n|128):55296===(64512&n)&&56320===(64512&(i=e.charCodeAt(o+1)))?(n=65536+((1023&n)<<10)+(1023&i),++o,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-s}},{}],11:[function(e,t){function r(e){return n(e)}function n(t,n){if(i||(i=e(32)),!(t instanceof i))throw TypeError("type must be a Type");if(n){if("function"!=typeof n)throw TypeError("ctor must be a function")}else n=o.codegen("p")("return ctor.call(this,p)").eof(t.name,{ctor:s});n.constructor=r;var u=n.prototype=new s;return u.constructor=n,o.merge(n,s,!0),n.$type=t,u.$type=t,t.fieldsArray.forEach(function(e){u[e.name]=Array.isArray(e.resolve().defaultValue)?o.emptyArray:o.isObject(e.defaultValue)&&!e.long?o.emptyObject:e.defaultValue}),t.oneofsArray.forEach(function(e){Object.defineProperty(u,e.resolve().name,{get:o.oneOfGetter(e.oneof),set:o.oneOfSetter(e.oneof)})}),t.ctor=n,u}t.exports=r;var i,s=e(19),o=e(34);r.create=n,r.prototype=s},{19:19,32:32,34:34}],12:[function(e,t){function r(e,t){/\/|\./.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),r[e]=t}t.exports=r,r("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var n;r("duration",{Duration:n={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),r("timestamp",{Timestamp:n}),r("empty",{Empty:{fields:{}}}),r("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}}}}),r("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}})},{}],13:[function(e,t,r){function n(e,t,r,n){if(t.resolvedType)if(t.resolvedType instanceof o){var i=t.resolvedType.values;e("switch(d%s){",n),Object.keys(i).forEach(function(r){t.repeated&&i[r]===t.typeDefault&&e("default:"),e("case%j:",r)("case %j:",i[r])("m%s=%j",n,i[r])("break")}),e("}")}else e("m%s=types[%d].fromObject(d%s)",n,r,n);else{var s=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",n,n);break;case"uint64":s=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,s)('else if(typeof d%s==="string")',n)("m%s=parseInt(d%s,10)",n,n)('else if(typeof d%s==="number")',n)("m%s=d%s",n,n)('else if(typeof d%s==="object")',n)("m%s=new util.LongBits(d%s.low,d%s.high).toNumber(%s)",n,n,n,s?"true":"");break;case"bytes":e('if(typeof d%s==="string")',n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",n,n,n)("else if(d%s&&d%s.length)",n,n)("m%s=d%s",n,n);break;case"string":e("m%s=String(d%s)",n,n);break;case"bool":e("m%s=Boolean(d%s)",n,n)}}return e}function i(e,t,r,n){if(t.resolvedType)t.resolvedType instanceof o?e("d%s=o.enums===String?types[%d].values[m%s]:m%s",n,r,n,n):e("d%s=types[%d].toObject(m%s,o)",n,r,n);else{var i=!1;switch(t.type){case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',n)("d%s=o.longs===String?String(m%s):m%s",n,n,n)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low,m%s.high).toNumber(%s):m%s",n,n,n,n,i?"true":"",n);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",n,n,n,n,n);break;default:e("d%s=m%s",n,n)}}return e}var s=r,o=e(16),u=e(34);s.fromObject=function(e){var t=e.fieldsArray;if(!t.length)return u.codegen()("return new(this.ctor)");for(var r=u.codegen("d")("var m=new(this.ctor)"),i=0;i<t.length;++i){var s=t[i].resolve(),a=u.safeProp(s.name);s.map?(r("if(d%s){",a)("m%s={}",a)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",a),n(r,s,i,a+"[ks[i]]")("}")("}")):s.repeated?(r("if(d%s){",a)("m%s=[]",a)("for(var i=0;i<d%s.length;++i){",a),n(r,s,i,a+"[i]")("}")("}")):(s.resolvedType instanceof o||r("if(d%s!==undefined&&d%s!==null){",a,a),n(r,s,i,a),s.resolvedType instanceof o||r("}"))}return r("return m")},s.toObject=function(e){var t=e.fieldsArray;if(!t.length)return u.codegen()("return {}");var r=u.codegen("m","o")("if(!o)")("o={}")("var d={}"),n=t.filter(function(e){return e.resolve().repeated});n.length&&(r("if(o.arrays||o.defaults){"),n.forEach(function(e){r("d%s=[]",u.safeProp(e.name))}),r("}"));var s=t.filter(function(e){return e.map});s.length&&(r("if(o.objects||o.defaults){"),s.forEach(function(e){r("d%s={}",u.safeProp(e.name))}),r("}"));var a=t.filter(function(e){return!(e.repeated||e.map)});a.length&&(r("if(o.defaults){"),a.forEach(function(e){var t=u.safeProp(e.name);e.resolvedType instanceof o?r("d%s=o.enums===String?%j:%j",t,e.resolvedType.valuesById[e.typeDefault],e.typeDefault):e.long?r("if(util.Long){")("var n=new util.Long(%d,%d,%j)",e.typeDefault.low,e.typeDefault.high,e.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",t)("}else")("d%s=o.longs===String?%j:%d",t,""+e.typeDefault,e.typeDefault.toNumber()):e.bytes?r("d%s=o.bytes===String?%j:%s",t,String.fromCharCode.apply(String,e.typeDefault),"["+Array.prototype.slice.call(e.typeDefault).join(",")+"]"):r("d%s=%j",t,e.typeDefault)}),r("}"));for(var f=0;f<t.length;++f){var l=t[f],h=u.safeProp(l.name);r("if(m%s!==undefined&&m%s!==null&&m.hasOwnProperty(%j)){",h,h,l.name),l.map?(r("d%s={}",h)("for(var ks2=Object.keys(m%s),j=0;j<ks2.length;++j){",h),i(r,l,f,h+"[ks2[j]]")("}")):l.repeated?(r("d%s=[]",h)("for(var j=0;j<m%s.length;++j){",h),i(r,l,f,h+"[j]")("}")):i(r,l,f,h),r("}")}return r("return d")}},{16:16,34:34}],14:[function(e,r){function n(e){var r=e.fieldsArray,u=o.codegen("r","l")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new(this.ctor)")("while(r.pos<c){")("var t=r.uint32()");e.group&&u("if((t&7)===4)")("break"),u("switch(t>>>3){");for(var a=0;a<r.length;++a){var f=r[a].resolve(),l=f.resolvedType instanceof i?"uint32":f.type,h="m"+o.safeProp(f.name);u("case %d:",f.id),f.map?(u("r.skip().pos++")("if(%s===util.emptyObject)",h)("%s={}",h)("var k=r.%s()",f.keyType)("r.pos++"),s.basic[l]===t?u('%s[typeof k==="object"?util.longToHash(k):k]=types[%d].decode(r,r.uint32())',h,a):u('%s[typeof k==="object"?util.longToHash(k):k]=r.%s()',h,l)):f.repeated?(u("if(!(%s&&%s.length))",h,h)("%s=[]",h),(n.compat||f.packed)&&s.packed[l]!==t&&u("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",h,l)("}else"),s.basic[l]===t?u(f.resolvedType.group?"%s.push(types[%d].decode(r))":"%s.push(types[%d].decode(r,r.uint32()))",h,a):u("%s.push(r.%s())",h,l)):s.basic[l]===t?u(f.resolvedType.group?"%s=types[%d].decode(r)":"%s=types[%d].decode(r,r.uint32())",h,a):u("%s=r.%s()",h,l),u("break")}return u("default:")("r.skipType(t&7)")("break")("}")("}")("return m")}r.exports=n,n.compat=!0;var i=e(16),s=e(33),o=e(34)},{16:16,33:33,34:34}],15:[function(e,r){function n(e,t,r,n){return t.resolvedType.group?e("types[%d].encode(%s,w.uint32(%d)).uint32(%d)",r,n,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%d].encode(%s,w.uint32(%d).fork()).ldelim()",r,n,(t.id<<3|2)>>>0)}function i(e){for(var r,i,a=e.fieldsArray,f=e.oneofsArray,l=u.codegen("m","w")("if(!w)")("w=Writer.create()"),r=0;r<a.length;++r){var h=a[r].resolve();if(!h.partOf){var c=h.resolvedType instanceof s?"uint32":h.type,p=o.basic[c];i="m"+u.safeProp(h.name),h.map?(l("if(%s&&m.hasOwnProperty(%j)){",i,h.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",i)("w.uint32(%d).fork().uint32(%d).%s(ks[i])",(h.id<<3|2)>>>0,8|o.mapKey[h.keyType],h.keyType),p===t?l("types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",r,i):l(".uint32(%d).%s(%s[ks[i]]).ldelim()",16|p,c,i),l("}")("}")):h.repeated?h.packed&&o.packed[c]!==t?l("if(%s&&%s.length&&m.hasOwnProperty(%j)){",i,i,h.name)("w.uint32(%d).fork()",(h.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",i)("w.%s(%s[i])",c,i)("w.ldelim()")("}"):(l("if(%s!==undefined&&m.hasOwnProperty(%j)){",i,h.name)("for(var i=0;i<%s.length;++i)",i),p===t?n(l,h,r,i+"[i]"):l("w.uint32(%d).%s(%s[i])",(h.id<<3|p)>>>0,c,i),l("}")):(h.required||(h.long?l("if(%s!==undefined&&%s!==null&&m.hasOwnProperty(%j))",i,i,h.name):h.bytes?l("if(%s&&m.hasOwnProperty(%j))",i,h.name):l("if(%s!==undefined&&m.hasOwnProperty(%j))",i,h.name)),p===t?n(l,h,r,i):l("w.uint32(%d).%s(%s)",(h.id<<3|p)>>>0,c,i))}}for(var r=0;r<f.length;++r){var d=f[r];l("switch(%s){","m"+u.safeProp(d.name));for(var y=d.fieldsArray,v=0;v<y.length;++v){var h=y[v],c=h.resolvedType instanceof s?"uint32":h.type,p=o.basic[c];i="m"+u.safeProp(h.name),l("case%j:",h.name),p===t?n(l,h,a.indexOf(h),i):l("w.uint32(%d).%s(%s)",(h.id<<3|p)>>>0,c,i),l("break")}l("}")}return l("return w")}r.exports=i;var s=e(16),o=e(33),u=e(34)},{16:16,33:33,34:34}],16:[function(e,r){function n(e,t,r){i.call(this,e,r),this.valuesById={},this.values=Object.create(this.valuesById),this.comments={};var n=this;Object.keys(t||{}).forEach(function(e){n.valuesById[n.values[e]=t[e]]=e})}r.exports=n;var i=e(22),s=i.extend(n);n.className="Enum";var o=e(34);n.testJSON=function(e){return!(!e||!e.values)},n.fromJSON=function(e,t){return new n(e,t.values,t.options)},s.toJSON=function(){return{options:this.options,values:this.values}},s.add=function(e,r,n){if(!o.isString(e))throw TypeError("name must be a string");if(!o.isInteger(r))throw TypeError("id must be an integer");if(this.values[e]!==t)throw Error("duplicate name '"+e+"' in "+this);if(this.valuesById[r]!==t)throw Error("duplicate id "+r+" in "+this);return this.valuesById[this.values[e]=r]=e,this.comments[e]=n||null,this},s.remove=function(e){if(!o.isString(e))throw TypeError("name must be a string");var r=this.values[e];if(r===t)throw Error("'"+e+"' is not a name of "+this);return delete this.valuesById[r],delete this.values[e],delete this.comments[e],this}},{22:22,34:34}],17:[function(e,r){function n(e,r,n,s,o,u){if(l.isObject(s)?(u=s,s=o=t):l.isObject(o)&&(u=o,o=t),i.call(this,e,u),!l.isInteger(r)||r<0)throw TypeError("id must be a non-negative integer");if(!l.isString(n))throw TypeError("type must be a string");if(o!==t&&!l.isString(o))throw TypeError("extend must be a string");if(s!==t&&!/^required|optional|repeated$/.test(s=(""+s).toLowerCase()))throw TypeError("rule must be a string rule");this.rule=s&&"optional"!==s?s:t,this.type=n,this.id=r,this.extend=o||t,this.required="required"===s,this.optional=!this.required,this.repeated="repeated"===s,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!l.Long&&f.long[n]!==t,this.bytes="bytes"===n,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.b=null}r.exports=n;var i=e(22),s=i.extend(n);n.className="Field";var o,u,a=e(16),f=e(33),l=e(34);Object.defineProperty(s,"packed",{get:function(){return null===this.b&&(this.b=this.getOption("packed")!==!1),this.b}}),s.setOption=function(e,t,r){return"packed"===e&&(this.b=null),i.prototype.setOption.call(this,e,t,r)},n.testJSON=function(e){return!(!e||e.id===t)},n.fromJSON=function(r,i){return i.keyType!==t?(u||(u=e(18)),u.fromJSON(r,i)):new n(r,i.id,i.type,i.rule,i.extend,i.options)},s.toJSON=function(){return{rule:"optional"!==this.rule&&this.rule||t,type:this.type,id:this.id,extend:this.extend,options:this.options}},s.resolve=function(){if(this.resolved)return this;if((this.typeDefault=f.defaults[this.type])===t)if(o||(o=e(32)),this.resolvedType=this.parent.lookup(this.type,o))this.typeDefault=null;else{if(!(this.resolvedType=this.parent.lookup(this.type,a)))throw Error("unresolvable field type: "+this.type);this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]}if(this.options&&this.options.default!==t&&(this.typeDefault=this.options.default,this.resolvedType instanceof a&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.long)this.typeDefault=l.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var r;l.base64.test(this.typeDefault)?l.base64.decode(this.typeDefault,r=l.newBuffer(l.base64.length(this.typeDefault)),0):l.utf8.write(this.typeDefault,r=l.newBuffer(l.utf8.length(this.typeDefault)),0),this.typeDefault=r}return this.map?this.defaultValue={}:this.repeated?this.defaultValue=[]:this.defaultValue=this.typeDefault,i.prototype.resolve.call(this)}},{16:16,18:18,22:22,32:32,33:33,34:34}],18:[function(e,r){function n(e,t,r,n,s){if(i.call(this,e,t,n,s),!a.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}r.exports=n;var i=e(17),s=i.prototype,o=i.extend(n);n.className="MapField";var u=e(33),a=e(34);n.testJSON=function(e){return i.testJSON(e)&&e.keyType!==t},n.fromJSON=function(e,t){return new n(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;if(u.mapKey[this.keyType]===t)throw Error("invalid key type: "+this.keyType);return s.resolve.call(this)}},{17:17,33:33,34:34}],19:[function(e,t){function r(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}t.exports=r;var n=e(34);r.encode=function(e,t){return this.$type.encode(e,t)},r.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},r.decode=function(e){return this.$type.decode(e)},r.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},r.verify=function(e){return this.$type.verify(e)},r.fromObject=function(e){return this.$type.fromObject(e)},r.from=r.fromObject,r.toObject=function(e,t){return this.$type.toObject(e,t)},r.prototype.toObject=function(e){return this.$type.toObject(this,e)},r.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},{34:34}],20:[function(e,r){function n(e,r,n,s,o,a,f){if(u.isObject(o)?(f=o,o=a=t):u.isObject(a)&&(f=a,a=t),r&&!u.isString(r))throw TypeError("type must be a string");if(!u.isString(n))throw TypeError("requestType must be a string");if(!u.isString(s))throw TypeError("responseType must be a string");i.call(this,e,f),this.type=r||"rpc",this.requestType=n,this.requestStream=!!o||t,this.responseType=s,this.responseStream=!!a||t,this.resolvedRequestType=null,this.resolvedResponseType=null}r.exports=n;var i=e(22),s=i.extend(n);n.className="Method";var o=e(32),u=e(34);n.testJSON=function(e){return!(!e||e.requestType===t)},n.fromJSON=function(e,t){return new n(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options)},s.toJSON=function(){return{type:"rpc"!==this.type&&this.type||t,requestType:this.requestType,requestStream:this.requestStream,responseType:this.responseType,responseStream:this.responseStream,options:this.options}},s.resolve=function(){if(this.resolved)return this;if(!(this.resolvedRequestType=this.parent.lookup(this.requestType,o)))throw Error("unresolvable request type: "+this.requestType);if(!(this.resolvedResponseType=this.parent.lookup(this.responseType,o)))throw Error("unresolvable response type: "+this.requestType);return i.prototype.resolve.call(this)}},{22:22,32:32,34:34}],21:[function(e,r){function n(){f||(f=e(32)),l||(l=e(30)),h=[p,f,l,d,s],c="one of "+h.map(function(e){return e.name}).join(", ")}function i(e){if(!e||!e.length)return t;for(var r={},n=0;n<e.length;++n)r[e[n].name]=e[n].toJSON();return r}function s(e,r){u.call(this,e,r),this.nested=t,this.c=null,this.d=[]}function o(e){e.c=null;for(var t=0;t<e.d.length;++t)delete e[e.d[t]];return e.d=[],e}r.exports=s;var u=e(22),a=u.extend(s);s.className="Namespace";var f,l,h,c,p=e(16),d=e(17),y=e(34);s.testJSON=function(e){return!(!e||e.fields||e.values||e.id!==t||e.oneof||e.methods||e.requestType!==t)},s.fromJSON=function(e,t){return new s(e,t.options).addJSON(t.nested)},s.arrayToJSON=i,Object.defineProperty(a,"nestedArray",{get:function(){return this.c||(this.c=y.toArray(this.nested))}}),a.toJSON=function(){return{options:this.options,nested:i(this.nestedArray)}},a.addJSON=function(e){var t=this;return e&&(h||n(),Object.keys(e).forEach(function(r){for(var n=e[r],i=0;i<h.length;++i)if(h[i].testJSON(n))return t.add(h[i].fromJSON(r,n));throw TypeError("nested."+r+" must be JSON for "+c)})),this},a.get=function(e){return this.nested===t?null:this.nested[e]||null},a.getEnum=function(e){if(this.nested&&this.nested[e]instanceof p)return this.nested[e].values;throw Error("no such enum")},a.add=function(e){if(h||n(),!e||h.indexOf(e.constructor)<0)throw TypeError("object must be "+c);if(e instanceof d&&e.extend===t)throw TypeError("object must be an extension field when not part of a type");if(this.nested){var r=this.get(e.name);if(r){if(!(r instanceof s&&e instanceof s)||r instanceof f||r instanceof l)throw Error("duplicate name '"+e.name+"' in "+this);for(var i=r.nestedArray,u=0;u<i.length;++u)e.add(i[u]);this.remove(r),this.nested||(this.nested={}),e.setOptions(r.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),o(this)},a.remove=function(e){if(!(e instanceof u))throw TypeError("object must be 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=t),e.onRemove(this),o(this)},a.define=function(e,r){y.isString(e)?e=e.split("."):Array.isArray(e)||(r=e,e=t);var n=this;if(e)for(;e.length>0;){var i=e.shift();if(n.nested&&n.nested[i]){if(n=n.nested[i],!(n instanceof s))throw Error("path conflicts with non-namespace objects")}else n.add(n=new s(i))}return r&&n.addJSON(r),n},a.resolve=function(){f||(f=e(32)),l||(f=e(30));for(var t=this.nestedArray,r=0;r<t.length;++r)if(/^[A-Z]/.test(t[r].name)){if(t[r]instanceof f||t[r]instanceof l)this[t[r].name]=t[r];else{if(!(t[r]instanceof p))continue;this[t[r].name]=t[r].values}this.d.push(t[r].name)}return u.prototype.resolve.call(this)},a.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof s?e[t++].resolveAll():e[t++].resolve();return a.resolve.call(this)},a.lookup=function(e,r,n){if("boolean"==typeof r&&(n=r,r=t),y.isString(e)&&e.length)e=e.split(".");else if(!e.length)return null;if(""===e[0])return this.root.lookup(e.slice(1),r);var i=this.get(e[0]);return i&&1===e.length&&(!r||i instanceof r)||i instanceof s&&(i=i.lookup(e.slice(1),r,!0))?i:null===this.parent||n?null:this.parent.lookup(e,r)},a.lookupType=function(t){f||(f=e(32));var r=this.lookup(t,f);if(!r)throw Error("no such type");return r},a.lookupService=function(t){l||(l=e(30));var r=this.lookup(t,l);if(!r)throw Error("no such service");return r},a.lookupEnum=function(e){var t=this.lookup(e,p);if(!t)throw Error("no such enum");return t.values}},{16:16,17:17,22:22,30:30,32:32,34:34}],22:[function(e,r){function n(e,t){if(!i.isString(e))throw TypeError("name must be a string");if(t&&!i.isObject(t))throw TypeError("options must be an object");this.options=t,this.name=e,this.parent=null,this.resolved=!1,this.comment=null}r.exports=n;var i=e(34);n.className="ReflectionObject",n.extend=i.extend;var s,o=n.prototype;Object.defineProperties(o,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),o.toJSON=function(){throw Error()},o.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var r=t.root;s||(s=e(27)),r instanceof s&&r.e(this)},o.onRemove=function(t){var r=t.root;s||(s=e(27)),r instanceof s&&r.f(this),this.parent=null,this.resolved=!1},o.resolve=function(){return this.resolved?this:(s||(s=e(27)),this.root instanceof s&&(this.resolved=!0),this)},o.getOption=function(e){return this.options?this.options[e]:t},o.setOption=function(e,r,n){return n&&this.options&&this.options[e]!==t||((this.options||(this.options={}))[e]=r),this},o.setOptions=function(e,t){return e&&Object.keys(e).forEach(function(r){this.setOption(r,e[r],t)},this),this},o.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e}},{27:27,34:34}],23:[function(e,r){function n(e,r,n){if(Array.isArray(r)||(n=r,r=t),s.call(this,e,n),r&&!Array.isArray(r))throw TypeError("fieldNames must be an Array");this.oneof=r||[],this.g=[]}function i(e){e.parent&&e.g.forEach(function(t){t.parent||e.parent.add(t)})}r.exports=n;var s=e(22),o=s.extend(n);n.className="OneOf";var u=e(17);Object.defineProperty(o,"fieldsArray",{get:function(){return this.g}}),n.testJSON=function(e){return!!e.oneof},n.fromJSON=function(e,t){return new n(e,t.oneof,t.options)},o.toJSON=function(){return{oneof:this.oneof,options:this.options}},o.add=function(e){if(!(e instanceof u))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.g.push(e),e.partOf=this,i(this),this},o.remove=function(e){if(!(e instanceof u))throw TypeError("field must be 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.partOf=null,this},o.onAdd=function(e){s.prototype.onAdd.call(this,e);var t=this;this.oneof.forEach(function(r){var n=e.get(r);n&&!n.partOf&&(n.partOf=t,t.g.push(n))}),i(this)},o.onRemove=function(e){this.g.forEach(function(e){e.parent&&e.parent.remove(e)}),s.prototype.onRemove.call(this,e)}},{17:17,22:22}],24:[function(e,r){function n(e){return/^[a-zA-Z_][a-zA-Z_0-9]*$/.test(e)}function i(e){return/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/.test(e)}function s(e){return/^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/.test(e)}function o(e){return null===e?null:e.toLowerCase()}function u(e){return e.substring(0,1)+e.substring(1).replace(/_([a-z])(?=[a-z]|$)/g,function(e,t){return t.toUpperCase()})}function a(e,r,w){function O(e,t){var r=a.filename;return a.filename=null,Error("illegal "+(t||"token")+" '"+e+"' ("+(r?r+", ":"")+"line "+K.line()+")")}function k(){var e,t=[];do{if('"'!==(e=G())&&"'"!==e)throw O(e);t.push(G()),Y(e),e=Q()}while('"'===e||"'"===e);return t.join("")}function x(e){var t=G();switch(o(t)){case"'":case'"':return X(t),k();case"true":return!0;case"false":return!1}try{return S(t)}catch(r){if(e&&i(t))return t;throw O(t,"value")}}function j(){var e=A(G()),t=e;return Y("to",!0)&&(t=A(G())),Y(";"),[e,t]}function S(e){var t=1;"-"===e.charAt(0)&&(t=-1,e=e.substring(1));var r=o(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 O(e,"number")}function A(e,t){var r=o(e);switch(r){case"max":return 536870911;case"0":return 0}if("-"===e.charAt(0)&&!t)throw O(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 O(e,"id")}function N(){if(H!==t)throw O("package");if(H=G(),!i(H))throw O(H,"name");ie=ie.define(H),Y(";")}function T(){var e,t=Q();switch(t){case"weak":e=Z||(Z=[]),G();break;case"public":G();default:e=_||(_=[])}t=k(),Y(";"),e.push(t)}function E(){if(Y("="),W=o(k()),re="proto3"===W,!re&&"proto2"!==W)throw O(W,"syntax");Y(";")}function J(e,t){switch(t){case"option":return F(e,t),Y(";"),!0;case"message":return D(e,t),!0;case"enum":return B(e,t),!0;case"service":return C(e,t),!0;case"extend":return U(e,t),!0}return!1}function D(e,t){var r=G();if(!n(r))throw O(r,"type name");var s=new h(r);if(s.comment=ee(),Y("{",!0)){for(;"}"!==(t=G());){var u=o(t);if(!J(s,t))switch(u){case"map":$(s,u);break;case"required":case"optional":case"repeated":L(s,u);break;case"oneof":q(s,u);break;case"extensions":(s.extensions||(s.extensions=[])).push(j(s,u));break;case"reserved":(s.reserved||(s.reserved=[])).push(j(s,u));break;default:if(!re||!i(t))throw O(t);X(t),L(s,"optional")}}Y(";",!0)}else Y(";");e.add(s)}function L(e,r,s){var o=G();if("group"===o)return z(e,r),t;if(!i(o))throw O(o,"type");var u=G();if(!n(u))throw O(u,"name");u=se(u),Y("=");var a=new c(u,A(G()),o,r,s),f=K.line();a.comment=ee(),R(a),a.comment||(a.comment=ee(f)),a.repeated&&g.packed[o]!==t&&!re&&a.setOption("packed",!1,!0),e.add(a)}function z(e,t){var r=G();if(!n(r))throw O(r,"name");var i=b.lcFirst(r);r===i&&(r=b.ucFirst(r)),Y("=");var s=A(G()),u=new h(r);u.group=!0,u.comment=ee();var a=new c(i,s,r,t);for(Y("{");"}"!==(ne=G());)switch(ne=o(ne)){case"option":F(u,ne),Y(";");break;case"required":case"optional":case"repeated":L(u,ne);break;default:throw O(ne)}Y(";",!0),e.add(u).add(a)}function $(e){Y("<");var r=G();if(g.mapKey[r]===t)throw O(r,"type");Y(",");var s=G();if(!i(s))throw O(s,"type");Y(">");var o=G();if(!n(o))throw O(o,"name");o=se(o),Y("=");var u=new p(o,A(G()),r,s),a=K.line();u.comment=ee(),R(u),u.comment||(u.comment=ee(a)),e.add(u)}function q(e,t){var r=G();if(!n(r))throw O(r,"name");r=se(r);var i=new d(r),s=K.line();if(i.comment=ee(),Y("{",!0)){for(;"}"!==(t=G());)"option"===t?(F(i,t),Y(";")):(X(t),L(i,"optional"));Y(";",!0)}else Y(";"),i.comment||(i.comment=ee(s));e.add(i)}function B(e,t){var r=G();if(!n(r))throw O(r,"name");var i=new y(r);if(i.comment=ee(),Y("{",!0)){
for(;"}"!==(t=G());)"option"===o(t)?(F(i,t),Y(";")):I(i,t);Y(";",!0)}else Y(";");e.add(i)}function I(e,t){if(!n(t))throw O(t,"name");var r=t;Y("=");var i=A(G(),!0),s=K.line();e.add(r,i,ee()),R({}),e.comments[r]||(e.comments[r]=ee(s))}function F(e,t){var r=Y("(",!0),n=G();if(!i(n))throw O(n,"name");r&&(Y(")"),n="("+n+")",t=Q(),s(t)&&(n+=t,G())),Y("="),V(e,n)}function V(e,t){if(Y("{",!0))for(;"}"!==(ne=G());){if(!n(ne))throw O(ne,"name");Y(":",!0)?P(e,t+"."+ne,x(!0)):V(e,t+"."+ne)}else P(e,t,x(!0))}function P(e,t,r){e.setOption?e.setOption(t,r):e[t]=r}function R(e){if(Y("[",!0)){do F(e,"option");while(Y(",",!0));Y("]")}return Y(";"),e}function C(e,t){if(t=G(),!n(t))throw O(t,"service name");var r=t,i=new v(r);if(i.comment=ee(),Y("{",!0)){for(;"}"!==(t=G());){var s=o(t);switch(s){case"option":F(i,s),Y(";");break;case"rpc":M(i,s);break;default:throw O(t)}}Y(";",!0)}else Y(";");e.add(i)}function M(e,t){var r=t,s=G();if(!n(s))throw O(s,"name");var u,a,f,l;Y("(");var h;if(Y(h="stream",!0)&&(a=!0),!i(t=G()))throw O(t);if(u=t,Y(")"),Y("returns"),Y("("),Y(h,!0)&&(l=!0),!i(t=G()))throw O(t);f=t,Y(")");var c=new m(s,r,u,f,a,l),p=K.line();if(c.comment=ee(),Y("{",!0)){for(;"}"!==(t=G());){var d=o(t);switch(d){case"option":F(c,d),Y(";");break;default:throw O(t)}}Y(";",!0)}else Y(";"),c.comment||(c.comment=ee(p));e.add(c)}function U(e,t){var r=G();if(!i(r))throw O(r,"reference");if(Y("{",!0)){for(;"}"!==(t=G());){var n=o(t);switch(n){case"required":case"repeated":case"optional":L(e,n,r);break;default:if(!re||!i(t))throw O(t);X(t),L(e,"optional",r)}}Y(";",!0)}else Y(";")}r instanceof l||(w=r,r=new l),w||(w=a.defaults);var H,_,Z,W,K=f(e),G=K.next,X=K.push,Q=K.peek,Y=K.skip,ee=K.cmnt,te=!0,re=!1;r||(r=new l);for(var ne,ie=r,se=w.keepCase?function(e){return e}:u;null!==(ne=G());){var oe=o(ne);switch(oe){case"package":if(!te)throw O(ne);N();break;case"import":if(!te)throw O(ne);T();break;case"syntax":if(!te)throw O(ne);E();break;case"option":if(!te)throw O(ne);F(ie,ne),Y(";");break;default:if(J(ie,ne)){te=!1;continue}throw O(ne)}}return a.filename=null,{package:H,imports:_,weakImports:Z,syntax:W,root:r}}r.exports=a,a.filename=null,a.defaults={keepCase:!1};var f=e(31),l=e(27),h=e(32),c=e(17),p=e(18),d=e(23),y=e(16),v=e(30),m=e(20),g=e(33),b=e(34)},{16:16,17:17,18:18,20:20,23:23,27:27,30:30,31:31,32:32,33:33,34:34}],25:[function(e,t){function r(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 i(){var e=new w(0,0),t=0;if(this.len-this.pos>4){for(t=0;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e}else{for(t=0;t<4;++t){if(this.pos>=this.len)throw r(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}if(this.pos>=this.len)throw r(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e}if(this.len-this.pos>4){for(t=0;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(t=0;t<5;++t){if(this.pos>=this.len)throw r(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function s(){return i.call(this).toLong()}function o(){return i.call(this).toNumber()}function u(){return i.call(this).toLong(!0)}function a(){return i.call(this).toNumber(!0)}function f(){return i.call(this).zzDecode().toLong()}function l(){return i.call(this).zzDecode().toNumber()}function h(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function c(){if(this.pos+8>this.len)throw r(this,8);return new w(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}function p(){return c.call(this).toLong(!0)}function d(){return c.call(this).toNumber(!0)}function y(){return c.call(this).zzDecode().toLong()}function v(){return c.call(this).zzDecode().toNumber()}function m(){b.Long?(k.int64=s,k.uint64=u,k.sint64=f,k.fixed64=p,k.sfixed64=y):(k.int64=o,k.uint64=a,k.sint64=l,k.fixed64=d,k.sfixed64=v)}t.exports=n;var g,b=e(36),w=b.LongBits,O=b.utf8;n.create=b.Buffer?function(t){return g||(g=e(26)),(n.create=function(e){return b.Buffer.isBuffer(e)?new g(e):new n(e)})(t)}:function(e){return new n(e)};var k=n.prototype;k.h=b.Array.prototype.subarray||b.Array.prototype.slice,k.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,r(this,10);return e}}(),k.int32=function(){return 0|this.uint32()},k.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},k.bool=function(){return 0!==this.uint32()},k.fixed32=function(){if(this.pos+4>this.len)throw r(this,4);return h(this.buf,this.pos+=4)},k.sfixed32=function(){var e=this.fixed32();return e>>>1^-(1&e)};var x="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],e[0]}:function(r,n){return t[3]=r[n],t[2]=r[n+1],t[1]=r[n+2],t[0]=r[n+3],e[0]}}():function(e,t){var r=h(e,t+4),n=2*(r>>31)+1,i=r>>>23&255,s=8388607&r;return 255===i?s?NaN:n*(1/0):0===i?1.401298464324817e-45*n*s:n*Math.pow(2,i-150)*(s+8388608)};k.float=function(){if(this.pos+4>this.len)throw r(this,4);var e=x(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,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],t[4]=r[n+4],t[5]=r[n+5],t[6]=r[n+6],t[7]=r[n+7],e[0]}:function(r,n){return t[7]=r[n],t[6]=r[n+1],t[5]=r[n+2],t[4]=r[n+3],t[3]=r[n+4],t[2]=r[n+5],t[1]=r[n+6],t[0]=r[n+7],e[0]}}():function(e,t){var r=h(e,t+4),n=h(e,t+8),i=2*(n>>31)+1,s=n>>>20&2047,o=4294967296*(1048575&n)+r;return 2047===s?o?NaN:i*(1/0):0===s?5e-324*i*o:i*Math.pow(2,s-1075)*(o+4503599627370496)};k.double=function(){if(this.pos+8>this.len)throw r(this,4);var e=j(this.buf,this.pos);return this.pos+=8,e},k.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw r(this,e);return this.pos+=e,t===n?new this.buf.constructor(0):this.h.call(this.buf,t,n)},k.string=function(){var e=this.bytes();return O.read(e,0,e.length)},k.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw r(this,e);this.pos+=e}else do if(this.pos>=this.len)throw r(this);while(128&this.buf[this.pos++]);return this},k.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(;;){if(4===(e=7&this.uint32()))break;this.skipType(e)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},n.i=m,m()},{26:26,36:36}],26:[function(e,t){function r(e){n.call(this,e)}t.exports=r;var n=e(25),i=r.prototype=Object.create(n.prototype);i.constructor=r;var s=e(36);s.Buffer&&(i.h=s.Buffer.prototype.slice),i.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}},{25:25,36:36}],27:[function(e,r){function n(e){o.call(this,"",e),this.deferred=[],this.files=[]}function i(){}function s(e){var r=e.parent.lookup(e.extend);if(r){var n=new l(e.fullName,e.id,e.type,e.rule,t,e.options);return n.declaringField=e,e.extensionField=n,r.add(n),!0}return!1}r.exports=n;var o=e(21),u=o.extend(n);n.className="Root";var a,f,l=e(17),h=e(34);n.fromJSON=function(e,t){return t||(t=new n),t.setOptions(e.options).addJSON(e.nested)},u.resolvePath=h.path.resolve;var c=function(){try{a=e(24),f=e(12)}catch(e){}c=null};u.load=function e(r,n,s){function o(e,t){if(s){var r=s;if(s=null,d)throw e;r(e,t)}}function u(e,r){try{if(h.isString(r)&&"{"===r.charAt(0)&&(r=JSON.parse(r)),h.isString(r)){a.filename=e;var i=a(r,p,n);i.imports&&i.imports.forEach(function(t){l(p.resolvePath(e,t))}),i.weakImports&&i.weakImports.forEach(function(t){l(p.resolvePath(e,t),!0)})}else p.setOptions(r.options).addJSON(r.nested)}catch(e){if(d)throw e;return o(e),t}d||y||o(null,p)}function l(e,r){var n=e.lastIndexOf("google/protobuf/");if(n>-1){var i=e.substring(n);i in f&&(e=i)}if(!(p.files.indexOf(e)>-1)){if(p.files.push(e),e in f)return d?u(e,f[e]):(++y,setTimeout(function(){--y,u(e,f[e])})),t;if(d){var a;try{a=h.fs.readFileSync(e).toString("utf8")}catch(e){return r||o(e),t}u(e,a)}else++y,h.fetch(e,function(n,i){if(--y,s)return n?(r||o(n),t):(u(e,i),t)})}}c&&c(),"function"==typeof n&&(s=n,n=t);var p=this;if(!s)return h.asPromise(e,p,r);var d=s===i,y=0;return h.isString(r)&&(r=[r]),r.forEach(function(e){l(p.resolvePath("",e))}),d?p:(y||o(null,p),t)},u.loadSync=function(e,t){if(!h.isNode)throw Error("not supported");return this.load(e,t,i)},u.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(e){return"'extend "+e.extend+"' in "+e.parent.fullName}).join(", "));return o.prototype.resolveAll.call(this)},u.e=function(e){var r=this.deferred.slice();this.deferred=[];for(var n=0;n<r.length;)s(r[n])?r.splice(n,1):++n;if(this.deferred=r,e instanceof l&&e.extend!==t&&!e.extensionField&&!s(e)&&this.deferred.indexOf(e)<0)this.deferred.push(e);else if(e instanceof o){var i=e.nestedArray;for(n=0;n<i.length;++n)this.e(i[n])}},u.f=function(e){if(e instanceof l){if(e.extend!==t&&!e.extensionField){var r=this.deferred.indexOf(e);r>-1&&this.deferred.splice(r,1)}e.extensionField&&(e.extensionField.parent.remove(e.extensionField),e.extensionField=null)}else if(e instanceof o)for(var n=e.nestedArray,i=0;i<n.length;++i)this.f(n[i])}},{12:12,17:17,21:21,24:24,34:34}],28:[function(e,t,r){var n=r;n.Service=e(29)},{29:29}],29:[function(e,t){function r(e){n.call(this),this.$rpc=e}t.exports=r;var n=e(34).EventEmitter;(r.prototype=Object.create(n.prototype)).constructor=r,r.prototype.end=function(e){return this.$rpc&&(e||this.$rpc(null,null,null),this.$rpc=null,this.emit("end").off()),this}},{34:34}],30:[function(e,r){function n(e,t){s.call(this,e,t),this.methods={},this.j=null}function i(e){return e.j=null,e}r.exports=n;var s=e(21),o=s.prototype,u=s.extend(n);n.className="Service";var a=e(20),f=e(34),l=e(28);n.testJSON=function(e){return!(!e||!e.methods)},n.fromJSON=function(e,t){var r=new n(e,t.options);return t.methods&&Object.keys(t.methods).forEach(function(e){r.add(a.fromJSON(e,t.methods[e]))}),r},Object.defineProperty(u,"methodsArray",{get:function(){return this.j||(this.j=f.toArray(this.methods))}}),u.toJSON=function(){var e=o.toJSON.call(this);return{options:e&&e.options||t,methods:s.arrayToJSON(this.methodsArray)||{},nested:e&&e.nested||t}},u.get=function(e){return o.get.call(this,e)||this.methods[e]||null},u.resolveAll=function(){for(var e=this.methodsArray,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,i(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,i(this)}return o.remove.call(this,e)},u.create=function(e,r,n){var i=new l.Service(e);return this.methodsArray.forEach(function(s){i[f.lcFirst(s.name)]=function(o,u){if(i.$rpc){if(!o)throw TypeError("request must not be null");s.resolve();var a;try{a=(r?s.resolvedRequestType.encodeDelimited(o):s.resolvedRequestType.encode(o)).finish()}catch(e){return("function"==typeof setImmediate?setImmediate:setTimeout)(function(){u(e)}),t}e(s,a,function(e,r){if(e)return i.emit("error",e,s),u?u(e):t;if(null===r)return i.end(!0),t;var o;try{o=n?s.resolvedResponseType.decodeDelimited(r):s.resolvedResponseType.decode(r)}catch(e){return i.emit("error",e,s),u?u("error",e):t}return i.emit("data",o,s),u?u(null,o):t})}}}),i}},{20:20,21:21,28:28,34:34}],31:[function(e,r){function n(e){return e.replace(/\\(.?)/g,function(e,t){switch(t){case"\\":case"":return t;case"0":return"\0";default:return t}})}function i(e){function r(e){return Error("illegal "+e+" (line "+v+")")}function i(){var t="'"===O?u:o;t.lastIndex=d-1;var i=t.exec(e);if(!i)throw r("string");return d=t.lastIndex,h(O),O=null,n(i[1])}function a(t){return e.charAt(t)}function f(t,r){m=e.charAt(t++),b=v,g=e.substring(t,r).split(/\n/g).map(function(e){return e.replace(/ *[*\/]+ */,"").trim()}).join("\n").trim()}function l(){if(w.length>0)return w.shift();if(O)return i();var t,n,o,u,l;do{if(d===y)return null;for(t=!1;/\s/.test(o=a(d));)if("\n"===o&&++v,++d===y)return null;if("/"===a(d)){if(++d===y)throw r("comment");if("/"===a(d)){for(l="/"===a(u=d+1);"\n"!==a(++d);)if(d===y)return null;++d,l&&f(u,d-1),++v,t=!0}else{if("*"!==(o=a(d)))return"/";l="*"===a(u=d+1);do{if("\n"===o&&++v,++d===y)return null;n=o,o=a(d)}while("*"!==n||"/"!==o);++d,l&&f(u,d-2),t=!0}}}while(t);if(d===y)return null;var h=d;s.lastIndex=0;var c=s.test(a(h++));if(!c)for(;h<y&&!s.test(a(h));)++h;var p=e.substring(d,d=h);return'"'!==p&&"'"!==p||(O=p),p}function h(e){w.push(e)}function c(){if(!w.length){var e=l();if(null===e)return null;h(e)}return w[0]}function p(e,t){var n=c(),i=n===e;if(i)return l(),!0;if(!t)throw r("token '"+n+"', '"+e+"' expected");return!1}e=""+e;var d=0,y=e.length,v=1,m=null,g=null,b=0,w=[],O=null;return{next:l,peek:c,push:h,skip:p,line:function(){return v},cmnt:function(e){var r;return e===t?r=b===v-1&&g||null:(g||c(),r=b===e&&"/"===m&&g||null),r&&(m=g=null,b=0),r}}}r.exports=i;var s=/[\s{}=;:[\],'"()<>]/g,o=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,u=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g},{}],32:[function(e,r){function n(e,r){s.call(this,e,r),this.fields={},this.oneofs=t,this.extensions=t,this.reserved=t,this.group=t,this.k=null,this.g=null,this.l=null,this.m=null}function i(e){return e.k=e.g=e.l=e.m=null,delete e.encode,delete e.decode,delete e.verify,e}r.exports=n;var s=e(21),o=s.prototype,u=s.extend(n);n.className="Type";var a=e(16),f=e(23),l=e(17),h=e(30),c=e(11),p=e(19),d=e(25),y=e(38),v=e(34),m=e(15),g=e(14),b=e(37),w=e(13),O=[a,n,l,h];n.testJSON=function(e){return!(!e||!e.fields)},n.fromJSON=function(e,r){var i=new n(e,r.options);return i.extensions=r.extensions,i.reserved=r.reserved,r.fields&&Object.keys(r.fields).forEach(function(e){i.add(l.fromJSON(e,r.fields[e]))}),r.oneofs&&Object.keys(r.oneofs).forEach(function(e){i.add(f.fromJSON(e,r.oneofs[e]))}),r.nested&&Object.keys(r.nested).forEach(function(e){for(var n=r.nested[e],s=0;s<O.length;++s)if(O[s].testJSON(n))return i.add(O[s].fromJSON(e,n)),t;throw Error("invalid nested object in "+i+": "+e)}),r.extensions&&r.extensions.length&&(i.extensions=r.extensions),r.reserved&&r.reserved.length&&(i.reserved=r.reserved),r.group&&(i.group=!0),i},Object.defineProperties(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]],n=r.id;if(this.k[n])throw Error("duplicate id "+n+" in "+this);this.k[n]=r}return this.k}},fieldsArray:{get:function(){return this.g||(this.g=v.toArray(this.fields))}},oneofsArray:{get:function(){return this.l||(this.l=v.toArray(this.oneofs))}},ctor:{get:function(){return this.m||(this.m=c.create(this).constructor)},set:function(e){if(e&&!(e.prototype instanceof p))throw TypeError("ctor must be a Message constructor");e.from||(e.from=p.from),this.m=e}}}),u.toJSON=function(){var e=o.toJSON.call(this);return{options:e&&e.options||t,oneofs:s.arrayToJSON(this.oneofsArray),fields:s.arrayToJSON(this.fieldsArray.filter(function(e){return!e.declaringField}))||{},extensions:this.extensions&&this.extensions.length?this.extensions:t,reserved:this.reserved&&this.reserved.length?this.reserved:t,group:this.group||t,nested:e&&e.nested||t}},u.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var r=this.oneofsArray;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&&e.extend===t){if(this.fieldsById[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),i(this)}return e instanceof f?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),i(this)):o.add.call(this,e)},u.remove=function(e){if(e instanceof l&&e.extend===t){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),i(this)}if(e instanceof f){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),i(this)}return o.remove.call(this,e)},u.create=function(e){return new this.ctor(e)},u.setup=function(){var e=this.fullName,t=this.fieldsArray.map(function(e){return e.resolve().resolvedType});return this.encode=m(this).eof(e+"$encode",{Writer:y,types:t,util:v}),this.decode=g(this).eof(e+"$decode",{Reader:d,types:t,util:v}),this.verify=b(this).eof(e+"$verify",{types:t,util:v}),this.fromObject=this.from=w.fromObject(this).eof(e+"$fromObject",{types:t,util:v}),this.toObject=w.toObject(this).eof(e+"$toObject",{types:t,util:v}),this},u.encode=function(e,t){return this.setup().encode(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.setup().decode(e,t)},u.decodeDelimited=function(e){return e instanceof d||(e=d.create(e)),this.decode(e,e.uint32())},u.verify=function(e){return this.setup().verify(e)},u.fromObject=function(e){return this.setup().fromObject(e)},u.from=u.fromObject,u.toObject=function(e,t){return this.setup().toObject(e,t)}},{11:11,13:13,14:14,15:15,16:16,17:17,19:19,21:21,23:23,25:25,30:30,34:34,37:37,38:38}],33:[function(e,t,r){function n(e,t){var r=0,n={};for(t|=0;r<e.length;)n[o[r+t]]=e[r++];return n}var i=r,s=e(34),o=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];i.basic=n([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),i.defaults=n([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",s.emptyArray,null]),i.long=n([0,0,0,1,1],7),i.mapKey=n([0,0,0,5,5,0,0,0,1,1,0,2],2),i.packed=n([1,5,0,0,0,5,5,0,0,0,1,1,0])},{34:34}],34:[function(e,t){var r=t.exports=e(36);r.asPromise=e(1),r.codegen=e(3),r.EventEmitter=e(4),r.extend=e(5),r.fetch=e(6),r.path=e(8),r.fs=r.inquire("fs"),r.toArray=function(e){return e?Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]}):[]},r.safeProp=function(e){return'["'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"]'},r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)}},{1:1,3:3,36:36,4:4,5:5,6:6,8:8}],35:[function(e,t){function r(e,t){this.lo=e,this.hi=t}t.exports=r;var n=e(36),i=r.prototype,s=r.zero=new r(0,0);s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1};var o=r.zeroHash="\0\0\0\0\0\0\0\0";r.fromNumber=function(e){if(0===e)return s;var t=e<0;t&&(e=-e);var n=e>>>0,i=(e-n)/4294967296>>>0;return t&&(i=~i>>>0,n=~n>>>0,++n>4294967295&&(n=0,++i>4294967295&&(i=0))),new r(n,i)},r.from=function(e){if("number"==typeof e)return r.fromNumber(e);if("string"==typeof e){if(!n.Long)return r.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new r(e.low>>>0,e.high>>>0):s},i.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},i.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,(!!e)):{low:0|this.lo,high:0|this.hi,unsigned:!!e}};var u=String.prototype.charCodeAt;r.fromHash=function(e){return e===o?s:new r((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)},i.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.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},i.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},i.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<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},{36:36}],36:[function(r,n,i){var s=i;s.base64=r(2),s.inquire=r(7),s.utf8=r(10),s.pool=r(9),s.emptyArray=Object.freeze?Object.freeze([]):[],s.emptyObject=Object.freeze?Object.freeze({}):{},s.isNode=!!(e.process&&e.process.versions&&e.process.versions.node),s.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},s.isString=function(e){return"string"==typeof e||e instanceof String},s.isObject=function(e){return e&&"object"==typeof e},s.Buffer=function(){try{var e=s.inquire("buffer").Buffer;return e.prototype.utf8Write?(e.from||(e.from=function(t,r){return new e(t,r)}),e.allocUnsafe||(e.allocUnsafe=function(t){return new e(t)}),e):null}catch(e){return null}}(),s.newBuffer=function(e){return"number"==typeof e?s.Buffer?s.Buffer.allocUnsafe(e):new s.Array(e):s.Buffer?s.Buffer.from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},s.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,s.LongBits=r(35),s.Long=e.dcodeIO&&e.dcodeIO.Long||s.inquire("long"),s.longToHash=function(e){return e?s.LongBits.from(e).toHash():s.LongBits.zeroHash},s.longFromHash=function(e,t){var r=s.LongBits.fromHash(e);return s.Long?s.Long.fromBits(r.lo,r.hi,t):r.toNumber(!!t)},s.merge=function(e,r,n){for(var i=Object.keys(r),s=0;s<i.length;++s)e[i[s]]!==t&&n||(e[i[s]]=r[i[s]]);return e},s.oneOfGetter=function(e){var r={};return e.forEach(function(e){r[e]=1}),function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(1===r[e[n]]&&this[e[n]]!==t&&null!==this[e[n]])return e[n]}},s.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},s.lazyResolve=function(e,t){t.forEach(function(t){Object.keys(t).forEach(function(r){for(var n=t[r|=0].split("."),i=e;n.length;)i=i[n.shift()];t[r]=i})})},s.toJSONOptions={longs:String,enums:String,bytes:String}},{10:10,2:2,35:35,7:7,9:9}],37:[function(e,t){function r(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function n(e,t,n,i){if(t.resolvedType)if(t.resolvedType instanceof o){e("switch(%s){",i)("default:")("return%j",r(t,"enum value"));for(var s=u.toArray(t.resolvedType.values),a=0;a<s.length;++a)e("case %d:",s[a]);e("break")("}")}else e("var e=types[%d].verify(%s);",n,i)("if(e)")("return%j+e",t.name+".");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",i)("return%j",r(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)))",i,i,i,i)("return%j",r(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',i)("return%j",r(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',i)("return%j",r(t,"boolean"));break;case"string":e("if(!util.isString(%s))",i)("return%j",r(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',i,i,i)("return%j",r(t,"buffer"))}return e}function i(e,t,n){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!/^-?(?:0|[1-9][0-9]*)$/.test(%s))",n)("return%j",r(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/.test(%s))",n)("return%j",r(t,"integer|Long key"));break;case"bool":e("if(!/^true|false|0|1$/.test(%s))",n)("return%j",r(t,"boolean key"))}return e}function s(e){var t=e.fieldsArray;if(!t.length)return u.codegen()("return null");for(var s=u.codegen("m"),a=0;a<t.length;++a){var f=t[a].resolve(),l="m"+u.safeProp(f.name);f.map?(s("if(%s!==undefined){",l)("if(!util.isObject(%s))",l)("return%j",r(f,"object"))("var k=Object.keys(%s)",l)("for(var i=0;i<k.length;++i){"),i(s,f,"k[i]"),n(s,f,a,l+"[k[i]]")("}")("}")):f.repeated?(s("if(%s!==undefined){",l)("if(!Array.isArray(%s))",l)("return%j",r(f,"array"))("for(var i=0;i<%s.length;++i){",l),n(s,f,a,l+"[i]")("}")("}")):(f.required||(!f.resolvedType||f.resolvedType instanceof o?s("if(%s!==undefined){",l):s("if(%s!==undefined&&%s!==null){",l,l)),n(s,f,a,l),f.required||s("}"))}return s("return null")}t.exports=s;var o=e(16),u=e(34)},{16:16,34:34}],38:[function(e,r){function n(e,r,n){this.fn=e,this.len=r,this.next=t,this.val=n}function i(){}function s(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function o(){this.len=0,this.head=new n(i,0,0),this.tail=this.head,this.states=null}function u(e,t,r){t[r]=255&e}function a(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e}function f(e,r){this.len=e,this.next=t,this.val=r}function l(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function h(e,t,r){t[r++]=255&e,t[r++]=e>>>8&255,t[r++]=e>>>16&255,t[r]=e>>>24}r.exports=o;var c,p=e(36),d=p.LongBits,y=p.base64,v=p.utf8;o.create=p.Buffer?function(){return c||(c=e(39)),(o.create=function(){return new c})()}:function(){return new o},o.alloc=function(e){return new p.Array(e)},p.Array!==Array&&(o.alloc=p.pool(o.alloc,p.Array.prototype.subarray));var m=o.prototype;m.push=function(e,t,r){return this.tail=this.tail.next=new n(e,t,r),this.len+=t,this},f.prototype=Object.create(n.prototype),f.prototype.fn=a,m.uint32=function(e){return this.len+=(this.tail=this.tail.next=new f((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},m.int32=function(e){return e<0?this.push(l,10,d.fromNumber(e)):this.uint32(e)},m.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},m.uint64=function(e){var t=d.from(e);return this.push(l,t.length(),t)},m.int64=m.uint64,m.sint64=function(e){var t=d.from(e).zzEncode();return this.push(l,t.length(),t)},m.bool=function(e){return this.push(u,1,e?1:0)},m.fixed32=function(e){return this.push(h,4,e>>>0)},m.sfixed32=function(e){return this.push(h,4,e<<1^e>>31)},m.fixed64=function(e){var t=d.from(e);return this.push(h,4,t.lo).push(h,4,t.hi)},m.sfixed64=function(e){var t=d.from(e).zzEncode();return this.push(h,4,t.lo).push(h,4,t.hi)};var g="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n,i){e[0]=r,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i]=t[3]}:function(r,n,i){e[0]=r,n[i++]=t[3],n[i++]=t[2],n[i++]=t[1],n[i]=t[0]}}():function(e,t,r){var n=e<0?1:0;if(n&&(e=-e),0===e)h(1/e>0?0:2147483648,t,r);else if(isNaN(e))h(2147483647,t,r);else if(e>3.4028234663852886e38)h((n<<31|2139095040)>>>0,t,r);else if(e<1.1754943508222875e-38)h((n<<31|Math.round(e/1.401298464324817e-45))>>>0,t,r);else{var i=Math.floor(Math.log(e)/Math.LN2),s=8388607&Math.round(e*Math.pow(2,-i)*8388608);h((n<<31|i+127<<23|s)>>>0,t,r)}};m.float=function(e){return this.push(g,4,e)};var b="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,n,i){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(r,n,i){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,r){var n=e<0?1:0;if(n&&(e=-e),0===e)h(0,t,r),h(1/e>0?0:2147483648,t,r+4);else if(isNaN(e))h(4294967295,t,r),h(2147483647,t,r+4);else if(e>1.7976931348623157e308)h(0,t,r),h((n<<31|2146435072)>>>0,t,r+4);else{var i;if(e<2.2250738585072014e-308)i=e/5e-324,h(i>>>0,t,r),h((n<<31|i/4294967296)>>>0,t,r+4);else{var s=Math.floor(Math.log(e)/Math.LN2);1024===s&&(s=1023),i=e*Math.pow(2,-s),h(4503599627370496*i>>>0,t,r),h((n<<31|s+1023<<20|1048576*i&1048575)>>>0,t,r+4)}}};m.double=function(e){return this.push(b,8,e)};var w=p.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};m.bytes=function(e){var t=e.length>>>0;if("string"==typeof e&&t){var r=o.alloc(t=y.length(e));y.decode(e,r,0),e=r}return t?this.uint32(t).push(w,t,e):this.push(u,1,0)},m.string=function(e){var t=v.length(e);return t?this.uint32(t).push(v.write,t,e):this.push(u,1,0)},m.fork=function(){return this.states=new s(this),this.head=this.tail=new n(i,0,0),this.len=0,this},m.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 n(i,0,0),this.len=0),this},m.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},m.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t}},{36:36,39:39}],39:[function(e,t){function r(){i.call(this)}function n(e,t,r){e.length<40?o.utf8.write(e,t,r):t.utf8Write(e,r)}t.exports=r;var i=e(38),s=r.prototype=Object.create(i.prototype);s.constructor=r;var o=e(36),u=o.Buffer;r.alloc=function(e){return(r.alloc=u.allocUnsafe)(e)};var a=u&&u.prototype instanceof Uint8Array&&"set"===u.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n<e.length;)t[r++]=e[n++]};s.bytes=function(e){"string"==typeof e&&(e=u.from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this.push(a,t,e),this},s.string=function(e){var t=u.byteLength(e);return this.uint32(t),t&&this.push(n,t,e),this}},{36:36,38:38}],40:[function(t,r,n){function i(e,t,r){return"function"==typeof t?(r=t,t=new u.Root):t||(t=new u.Root),t.load(e,r)}function s(e,t){return t||(t=new u.Root),t.loadSync(e)}function o(){u.Reader.i()}var u=e.protobuf=n;u.load=i,u.loadSync=s,u.roots={};try{u.tokenize=t(31),u.parse=t(24),u.common=t(12)}catch(e){}u.Writer=t(38),u.BufferWriter=t(39),u.Reader=t(25),u.BufferReader=t(26),u.encoder=t(15),u.decoder=t(14),u.verifier=t(37),u.converter=t(13),u.ReflectionObject=t(22),u.Namespace=t(21),u.Root=t(27),u.Enum=t(16),u.Type=t(32),u.Field=t(17),u.OneOf=t(23),u.MapField=t(18),u.Service=t(30),u.Method=t(20),u.Class=t(11),u.Message=t(19),u.types=t(33),u.rpc=t(28),u.util=t(34),u.configure=o,"function"==typeof define&&define.amd&&define(["long"],function(e){return e&&(u.util.Long=e,o()),u})},{11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,30:30,31:31,32:32,33:33,34:34,37:37,38:38,39:39}]},{},[40])}("object"==typeof window&&window||"object"==typeof self&&self||this);
!function(e,t){"use strict";!function e(t,r,n){function i(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=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 i(r?r:e)},l,l.exports,e,t,r,n)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(e,t){function r(e,t){for(var r=[],n=2;n<arguments.length;)r.push(arguments[n++]);var i=!0;return new Promise(function(n,s){r.push(function(e){if(i)if(i=!1,e)s(e);else{for(var t=[],r=1;r<arguments.length;)t.push(arguments[r++]);n.apply(null,t)}});try{e.apply(t||this,r)}catch(e){i&&(i=!1,s(e))}})}t.exports=r},{}],2:[function(e,r,n){var i=n;i.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var s=Array(64),o=Array(123),u=0;u<64;)o[s[u]=u<26?u+65:u<52?u+71:u<62?u-4:u-59|43]=u++;i.encode=function(e,t,r){for(var n,i=[],o=0,u=0;t<r;){var a=e[t++];switch(u){case 0:i[o++]=s[a>>2],n=(3&a)<<4,u=1;break;case 1:i[o++]=s[n|a>>4],n=(15&a)<<2,u=2;break;case 2:i[o++]=s[n|a>>6],i[o++]=s[63&a],u=0}}return u&&(i[o++]=s[n],i[o]=61,1===u&&(i[o+1]=61)),String.fromCharCode.apply(String,i)};var a="invalid encoding";i.decode=function(e,r,n){for(var i,s=n,u=0,f=0;f<e.length;){var l=e.charCodeAt(f++);if(61===l&&u>1)break;if((l=o[l])===t)throw Error(a);switch(u){case 0:i=l,u=1;break;case 1:r[n++]=i<<2|(48&l)>>4,i=l,u=2;break;case 2:r[n++]=(15&i)<<4|(60&l)>>2,i=l,u=3;break;case 3:r[n++]=(3&i)<<6|l,u=0}}if(1===u)throw Error(a);return n-s},i.test=function(e){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e)}},{}],3:[function(e,r){function n(){function e(){for(var t=[],r=0;r<arguments.length;)t.push(arguments[r++]);var n=i.apply(null,t),l=p;if(c.length){var h=c[c.length-1];s.test(h)?l=++p:a.test(h)&&++l,u.test(h)&&!u.test(n)?(l=++p,d=!0):d&&f.test(h)&&(l=--p,d=!1),o.test(n)&&(l=--p)}for(r=0;r<l;++r)n="\t"+n;return c.push(n),e}function r(e){return"function"+(e?" "+e.replace(/[^\w_$]/g,"_"):"")+"("+h.join(",")+") {\n"+c.join("\n")+"\n}"}function l(r,i){"object"==typeof r&&(i=r,r=t);var s=e.str(r);n.verbose&&console.log("--- codegen ---\n"+s.replace(/^/gm,"> ").replace(/\t/g," "));var o=Object.keys(i||(i={}));return Function.apply(null,o.concat("return "+s)).apply(null,o.map(function(e){return i[e]}))}for(var h=[],c=[],p=1,d=!1,y=0;y<arguments.length;)h.push(arguments[y++]);return e.str=r,e.eof=l,e}function i(e){for(var t=[],r=1;r<arguments.length;)t.push(arguments[r++]);if(r=0,e=e.replace(/%([dfjs])/g,function(e,n){switch(n){case"d":return Math.floor(t[r++]);case"f":return+t[r++];case"j":return JSON.stringify(t[r++]);default:return t[r++]}}),r!==t.length)throw Error("argument count mismatch");return e}r.exports=n;var s=/[{[]$/,o=/^[}\]]/,u=/:$/,a=/^\s*(?:if|}?else if|while|for)\b|\b(?:else)\s*$/,f=/\b(?:break|continue)(?: \w+)?;?$|^\s*return\b/;n.sprintf=i,n.supported=!1;try{n.supported=1===n("a","b")("return a-b").eof()(2,1)}catch(e){}n.verbose=!1},{}],4:[function(e,r){function n(){this.a={}}r.exports=n;var i=n.prototype;i.on=function(e,t,r){return(this.a[e]||(this.a[e]=[])).push({fn:t,ctx:r||this}),this},i.off=function(e,r){if(e===t)this.a={};else if(r===t)this.a[e]=[];else for(var n=this.a[e],i=0;i<n.length;)n[i].fn===r?n.splice(i,1):++i;return this},i.emit=function(e){var t=this.a[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},{}],5:[function(e,t){function r(e){for(var t=Object.keys(this),r=0;r<t.length;++r)e[t[r]]=this[t[r]];var n=e.prototype=Object.create(this.prototype);return n.constructor=e,n}t.exports=r},{}],6:[function(e,r){function n(e,t){return t?u&&u.readFile?u.readFile(e,"utf8",function(r,n){return r&&"undefined"!=typeof XMLHttpRequest?i(e,t):t(r,n)}):i(e,t):s(n,this,e)}function i(e,r){var n=new XMLHttpRequest;n.onreadystatechange=function(){return 4===n.readyState?0===n.status||200===n.status?r(null,n.responseText):r(Error("status "+n.status)):t},n.open("GET",e),n.send()}r.exports=n;var s=e(1),o=e(7),u=o("fs")},{1:1,7:7}],7:[function(e,t,r){function n(e){try{var t=eval("quire".replace(/^/,"re"))(e);if(t&&(t.length||Object.keys(t).length))return t}catch(e){}return null}t.exports=n},{}],8:[function(e,t,r){var n=r,i=n.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},s=n.normalize=function(e){e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var t=e.split("/"),r=i(e),n="";r&&(n=t.shift()+"/");for(var s=0;s<t.length;)".."===t[s]?s>0?t.splice(--s,2):r?t.splice(s,1):++s:"."===t[s]?t.splice(s,1):++s;return n+t.join("/")};n.resolve=function(e,t,r){return r||(t=s(t)),i(t)?t:(r||(e=s(e)),(e=e.replace(/(?:\/|^)[^\/]+$/,"")).length?s(e+"/"+t):t)}},{}],9:[function(e,t){function r(e,t,r){var n=r||8192,i=n>>>1,s=null,o=n;return function(r){if(r<1||r>i)return e(r);o+r>n&&(s=e(n),o=0);var u=t.call(s,o,o+=r);return 7&o&&(o=(7|o)+1),u}}t.exports=r},{}],10:[function(e,t,r){var n=r;n.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)r=e.charCodeAt(n),r<128?t+=1:r<2048?t+=2:55296===(64512&r)&&56320===(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},n.read=function(e,t,r){var n=r-t;if(n<1)return"";for(var i,s=null,o=[],u=0;t<r;)i=e[t++],i<128?o[u++]=i:i>191&&i<224?o[u++]=(31&i)<<6|63&e[t++]:i>239&&i<365?(i=((7&i)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[u++]=55296+(i>>10),o[u++]=56320+(1023&i)):o[u++]=(15&i)<<12|(63&e[t++])<<6|63&e[t++],u>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),u=0);return s?(u&&s.push(String.fromCharCode.apply(String,o.slice(0,u))),s.join("")):u?String.fromCharCode.apply(String,o.slice(0,u)):""},n.write=function(e,t,r){for(var n,i,s=r,o=0;o<e.length;++o)n=e.charCodeAt(o),n<128?t[r++]=n:n<2048?(t[r++]=n>>6|192,t[r++]=63&n|128):55296===(64512&n)&&56320===(64512&(i=e.charCodeAt(o+1)))?(n=65536+((1023&n)<<10)+(1023&i),++o,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-s}},{}],11:[function(e,t){function r(e){return n(e)}function n(t,n){if(i||(i=e(32)),!(t instanceof i))throw TypeError("type must be a Type");if(n){if("function"!=typeof n)throw TypeError("ctor must be a function")}else n=o.codegen("p")("return ctor.call(this,p)").eof(t.name,{ctor:s});n.constructor=r;var u=n.prototype=new s;return u.constructor=n,o.merge(n,s,!0),n.$type=t,u.$type=t,t.fieldsArray.forEach(function(e){u[e.name]=Array.isArray(e.resolve().defaultValue)?o.emptyArray:o.isObject(e.defaultValue)&&!e.long?o.emptyObject:e.defaultValue}),t.oneofsArray.forEach(function(e){Object.defineProperty(u,e.resolve().name,{get:o.oneOfGetter(e.oneof),set:o.oneOfSetter(e.oneof)})}),t.ctor=n,u}t.exports=r;var i,s=e(19),o=e(34);r.create=n,r.prototype=s},{19:19,32:32,34:34}],12:[function(e,t){function r(e,t){/\/|\./.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),r[e]=t}t.exports=r,r("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var n;r("duration",{Duration:n={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),r("timestamp",{Timestamp:n}),r("empty",{Empty:{fields:{}}}),r("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}}}}),r("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}})},{}],13:[function(e,t,r){function n(e,t,r,n){if(t.resolvedType)if(t.resolvedType instanceof o){var i=t.resolvedType.values;e("switch(d%s){",n),Object.keys(i).forEach(function(r){t.repeated&&i[r]===t.typeDefault&&e("default:"),e("case%j:",r)("case %j:",i[r])("m%s=%j",n,i[r])("break")}),e("}")}else e("m%s=types[%d].fromObject(d%s)",n,r,n);else{var s=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",n,n);break;case"uint64":s=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,s)('else if(typeof d%s==="string")',n)("m%s=parseInt(d%s,10)",n,n)('else if(typeof d%s==="number")',n)("m%s=d%s",n,n)('else if(typeof d%s==="object")',n)("m%s=new util.LongBits(d%s.low,d%s.high).toNumber(%s)",n,n,n,s?"true":"");break;case"bytes":e('if(typeof d%s==="string")',n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",n,n,n)("else if(d%s&&d%s.length)",n,n)("m%s=d%s",n,n);break;case"string":e("m%s=String(d%s)",n,n);break;case"bool":e("m%s=Boolean(d%s)",n,n)}}return e}function i(e,t,r,n){if(t.resolvedType)t.resolvedType instanceof o?e("d%s=o.enums===String?types[%d].values[m%s]:m%s",n,r,n,n):e("d%s=types[%d].toObject(m%s,o)",n,r,n);else{var i=!1;switch(t.type){case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',n)("d%s=o.longs===String?String(m%s):m%s",n,n,n)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low,m%s.high).toNumber(%s):m%s",n,n,n,n,i?"true":"",n);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",n,n,n,n,n);break;default:e("d%s=m%s",n,n)}}return e}var s=r,o=e(16),u=e(34);s.fromObject=function(e){var t=e.fieldsArray;if(!t.length)return u.codegen()("return new(this.ctor)");for(var r=u.codegen("d")("var m=new(this.ctor)"),i=0;i<t.length;++i){var s=t[i].resolve(),a=u.safeProp(s.name);s.map?(r("if(d%s){",a)("m%s={}",a)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",a),n(r,s,i,a+"[ks[i]]")("}")("}")):s.repeated?(r("if(d%s){",a)("m%s=[]",a)("for(var i=0;i<d%s.length;++i){",a),n(r,s,i,a+"[i]")("}")("}")):(s.resolvedType instanceof o||r("if(d%s!==undefined&&d%s!==null){",a,a),n(r,s,i,a),s.resolvedType instanceof o||r("}"))}return r("return m")},s.toObject=function(e){var t=e.fieldsArray;if(!t.length)return u.codegen()("return {}");var r=u.codegen("m","o")("if(!o)")("o={}")("var d={}"),n=t.filter(function(e){return e.resolve().repeated});n.length&&(r("if(o.arrays||o.defaults){"),n.forEach(function(e){r("d%s=[]",u.safeProp(e.name))}),r("}"));var s=t.filter(function(e){return e.map});s.length&&(r("if(o.objects||o.defaults){"),s.forEach(function(e){r("d%s={}",u.safeProp(e.name))}),r("}"));var a=t.filter(function(e){return!(e.repeated||e.map)});a.length&&(r("if(o.defaults){"),a.forEach(function(e){var t=u.safeProp(e.name);e.resolvedType instanceof o?r("d%s=o.enums===String?%j:%j",t,e.resolvedType.valuesById[e.typeDefault],e.typeDefault):e.long?r("if(util.Long){")("var n=new util.Long(%d,%d,%j)",e.typeDefault.low,e.typeDefault.high,e.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",t)("}else")("d%s=o.longs===String?%j:%d",t,""+e.typeDefault,e.typeDefault.toNumber()):e.bytes?r("d%s=o.bytes===String?%j:%s",t,String.fromCharCode.apply(String,e.typeDefault),"["+Array.prototype.slice.call(e.typeDefault).join(",")+"]"):r("d%s=%j",t,e.typeDefault)}),r("}"));for(var f=0;f<t.length;++f){var l=t[f],h=u.safeProp(l.name);r("if(m%s!==undefined&&m%s!==null&&m.hasOwnProperty(%j)){",h,h,l.name),l.map?(r("d%s={}",h)("for(var ks2=Object.keys(m%s),j=0;j<ks2.length;++j){",h),i(r,l,f,h+"[ks2[j]]")("}")):l.repeated?(r("d%s=[]",h)("for(var j=0;j<m%s.length;++j){",h),i(r,l,f,h+"[j]")("}")):i(r,l,f,h),r("}")}return r("return d")}},{16:16,34:34}],14:[function(e,r){function n(e){var r=e.fieldsArray,u=o.codegen("r","l")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new(this.ctor)")("while(r.pos<c){")("var t=r.uint32()");e.group&&u("if((t&7)===4)")("break"),u("switch(t>>>3){");for(var a=0;a<r.length;++a){var f=r[a].resolve(),l=f.resolvedType instanceof i?"uint32":f.type,h="m"+o.safeProp(f.name);u("case %d:",f.id),f.map?(u("r.skip().pos++")("if(%s===util.emptyObject)",h)("%s={}",h)("var k=r.%s()",f.keyType)("r.pos++"),s.basic[l]===t?u('%s[typeof k==="object"?util.longToHash(k):k]=types[%d].decode(r,r.uint32())',h,a):u('%s[typeof k==="object"?util.longToHash(k):k]=r.%s()',h,l)):f.repeated?(u("if(!(%s&&%s.length))",h,h)("%s=[]",h),(n.compat||f.packed)&&s.packed[l]!==t&&u("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",h,l)("}else"),s.basic[l]===t?u(f.resolvedType.group?"%s.push(types[%d].decode(r))":"%s.push(types[%d].decode(r,r.uint32()))",h,a):u("%s.push(r.%s())",h,l)):s.basic[l]===t?u(f.resolvedType.group?"%s=types[%d].decode(r)":"%s=types[%d].decode(r,r.uint32())",h,a):u("%s=r.%s()",h,l),u("break")}return u("default:")("r.skipType(t&7)")("break")("}")("}")("return m")}r.exports=n,n.compat=!0;var i=e(16),s=e(33),o=e(34)},{16:16,33:33,34:34}],15:[function(e,r){function n(e,t,r,n){return t.resolvedType.group?e("types[%d].encode(%s,w.uint32(%d)).uint32(%d)",r,n,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%d].encode(%s,w.uint32(%d).fork()).ldelim()",r,n,(t.id<<3|2)>>>0)}function i(e){for(var r,i,a=e.fieldsArray,f=e.oneofsArray,l=u.codegen("m","w")("if(!w)")("w=Writer.create()"),r=0;r<a.length;++r){var h=a[r].resolve();if(!h.partOf){var c=h.resolvedType instanceof s?"uint32":h.type,p=o.basic[c];i="m"+u.safeProp(h.name),h.map?(l("if(%s&&m.hasOwnProperty(%j)){",i,h.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",i)("w.uint32(%d).fork().uint32(%d).%s(ks[i])",(h.id<<3|2)>>>0,8|o.mapKey[h.keyType],h.keyType),p===t?l("types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",r,i):l(".uint32(%d).%s(%s[ks[i]]).ldelim()",16|p,c,i),l("}")("}")):h.repeated?h.packed&&o.packed[c]!==t?l("if(%s&&%s.length&&m.hasOwnProperty(%j)){",i,i,h.name)("w.uint32(%d).fork()",(h.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",i)("w.%s(%s[i])",c,i)("w.ldelim()")("}"):(l("if(%s!==undefined&&m.hasOwnProperty(%j)){",i,h.name)("for(var i=0;i<%s.length;++i)",i),p===t?n(l,h,r,i+"[i]"):l("w.uint32(%d).%s(%s[i])",(h.id<<3|p)>>>0,c,i),l("}")):(h.required||(h.long?l("if(%s!==undefined&&%s!==null&&m.hasOwnProperty(%j))",i,i,h.name):h.bytes?l("if(%s&&m.hasOwnProperty(%j))",i,h.name):l("if(%s!==undefined&&m.hasOwnProperty(%j))",i,h.name)),p===t?n(l,h,r,i):l("w.uint32(%d).%s(%s)",(h.id<<3|p)>>>0,c,i))}}for(var r=0;r<f.length;++r){var d=f[r];l("switch(%s){","m"+u.safeProp(d.name));for(var y=d.fieldsArray,v=0;v<y.length;++v){var h=y[v],c=h.resolvedType instanceof s?"uint32":h.type,p=o.basic[c];i="m"+u.safeProp(h.name),l("case%j:",h.name),p===t?n(l,h,a.indexOf(h),i):l("w.uint32(%d).%s(%s)",(h.id<<3|p)>>>0,c,i),l("break")}l("}")}return l("return w")}r.exports=i;var s=e(16),o=e(33),u=e(34)},{16:16,33:33,34:34}],16:[function(e,r){function n(e,t,r){i.call(this,e,r),this.valuesById={},this.values=Object.create(this.valuesById),this.comments={};var n=this;Object.keys(t||{}).forEach(function(e){n.valuesById[n.values[e]=t[e]]=e})}r.exports=n;var i=e(22),s=i.extend(n);n.className="Enum";var o=e(34);n.testJSON=function(e){return!(!e||!e.values)},n.fromJSON=function(e,t){return new n(e,t.values,t.options)},s.toJSON=function(){return{options:this.options,values:this.values}},s.add=function(e,r,n){if(!o.isString(e))throw TypeError("name must be a string");if(!o.isInteger(r))throw TypeError("id must be an integer");if(this.values[e]!==t)throw Error("duplicate name '"+e+"' in "+this);if(this.valuesById[r]!==t)throw Error("duplicate id "+r+" in "+this);return this.valuesById[this.values[e]=r]=e,this.comments[e]=n||null,this},s.remove=function(e){if(!o.isString(e))throw TypeError("name must be a string");var r=this.values[e];if(r===t)throw Error("'"+e+"' is not a name of "+this);return delete this.valuesById[r],delete this.values[e],delete this.comments[e],this}},{22:22,34:34}],17:[function(e,r){function n(e,r,n,s,o,u){if(l.isObject(s)?(u=s,s=o=t):l.isObject(o)&&(u=o,o=t),i.call(this,e,u),!l.isInteger(r)||r<0)throw TypeError("id must be a non-negative integer");if(!l.isString(n))throw TypeError("type must be a string");if(o!==t&&!l.isString(o))throw TypeError("extend must be a string");if(s!==t&&!/^required|optional|repeated$/.test(s=(""+s).toLowerCase()))throw TypeError("rule must be a string rule");this.rule=s&&"optional"!==s?s:t,this.type=n,this.id=r,this.extend=o||t,this.required="required"===s,this.optional=!this.required,this.repeated="repeated"===s,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!l.Long&&f.long[n]!==t,this.bytes="bytes"===n,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.b=null}r.exports=n;var i=e(22),s=i.extend(n);n.className="Field";var o,u,a=e(16),f=e(33),l=e(34);Object.defineProperty(s,"packed",{get:function(){return null===this.b&&(this.b=this.getOption("packed")!==!1),this.b}}),s.setOption=function(e,t,r){return"packed"===e&&(this.b=null),i.prototype.setOption.call(this,e,t,r)},n.testJSON=function(e){return!(!e||e.id===t)},n.fromJSON=function(r,i){return i.keyType!==t?(u||(u=e(18)),u.fromJSON(r,i)):new n(r,i.id,i.type,i.rule,i.extend,i.options)},s.toJSON=function(){return{rule:"optional"!==this.rule&&this.rule||t,type:this.type,id:this.id,extend:this.extend,options:this.options}},s.resolve=function(){if(this.resolved)return this;if((this.typeDefault=f.defaults[this.type])===t)if(o||(o=e(32)),this.resolvedType=this.parent.lookup(this.type,o))this.typeDefault=null;else{if(!(this.resolvedType=this.parent.lookup(this.type,a)))throw Error("unresolvable field type: "+this.type);this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]}if(this.options&&this.options.default!==t&&(this.typeDefault=this.options.default,this.resolvedType instanceof a&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.long)this.typeDefault=l.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var r;l.base64.test(this.typeDefault)?l.base64.decode(this.typeDefault,r=l.newBuffer(l.base64.length(this.typeDefault)),0):l.utf8.write(this.typeDefault,r=l.newBuffer(l.utf8.length(this.typeDefault)),0),this.typeDefault=r}return this.map?this.defaultValue={}:this.repeated?this.defaultValue=[]:this.defaultValue=this.typeDefault,i.prototype.resolve.call(this)}},{16:16,18:18,22:22,32:32,33:33,34:34}],18:[function(e,r){function n(e,t,r,n,s){if(i.call(this,e,t,n,s),!a.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}r.exports=n;var i=e(17),s=i.prototype,o=i.extend(n);n.className="MapField";var u=e(33),a=e(34);n.testJSON=function(e){return i.testJSON(e)&&e.keyType!==t},n.fromJSON=function(e,t){return new n(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;if(u.mapKey[this.keyType]===t)throw Error("invalid key type: "+this.keyType);return s.resolve.call(this)}},{17:17,33:33,34:34}],19:[function(e,t){function r(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}t.exports=r;var n=e(34);r.encode=function(e,t){return this.$type.encode(e,t)},r.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},r.decode=function(e){return this.$type.decode(e)},r.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},r.verify=function(e){return this.$type.verify(e)},r.fromObject=function(e){return this.$type.fromObject(e)},r.from=r.fromObject,r.toObject=function(e,t){return this.$type.toObject(e,t)},r.prototype.toObject=function(e){return this.$type.toObject(this,e)},r.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},{34:34}],20:[function(e,r){function n(e,r,n,s,o,a,f){if(u.isObject(o)?(f=o,o=a=t):u.isObject(a)&&(f=a,a=t),r&&!u.isString(r))throw TypeError("type must be a string");if(!u.isString(n))throw TypeError("requestType must be a string");if(!u.isString(s))throw TypeError("responseType must be a string");i.call(this,e,f),this.type=r||"rpc",this.requestType=n,this.requestStream=!!o||t,this.responseType=s,this.responseStream=!!a||t,this.resolvedRequestType=null,this.resolvedResponseType=null}r.exports=n;var i=e(22),s=i.extend(n);n.className="Method";var o=e(32),u=e(34);n.testJSON=function(e){return!(!e||e.requestType===t)},n.fromJSON=function(e,t){return new n(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options)},s.toJSON=function(){return{type:"rpc"!==this.type&&this.type||t,requestType:this.requestType,requestStream:this.requestStream,responseType:this.responseType,responseStream:this.responseStream,options:this.options}},s.resolve=function(){if(this.resolved)return this;if(!(this.resolvedRequestType=this.parent.lookup(this.requestType,o)))throw Error("unresolvable request type: "+this.requestType);if(!(this.resolvedResponseType=this.parent.lookup(this.responseType,o)))throw Error("unresolvable response type: "+this.requestType);return i.prototype.resolve.call(this)}},{22:22,32:32,34:34}],21:[function(e,r){function n(){f||(f=e(32)),l||(l=e(30)),h=[p,f,l,d,s],c="one of "+h.map(function(e){return e.name}).join(", ")}function i(e){if(!e||!e.length)return t;for(var r={},n=0;n<e.length;++n)r[e[n].name]=e[n].toJSON();return r}function s(e,r){u.call(this,e,r),this.nested=t,this.c=null,this.d=[]}function o(e){e.c=null;for(var t=0;t<e.d.length;++t)delete e[e.d[t]];return e.d=[],e}r.exports=s;var u=e(22),a=u.extend(s);s.className="Namespace";var f,l,h,c,p=e(16),d=e(17),y=e(34);s.testJSON=function(e){return!(!e||e.fields||e.values||e.id!==t||e.oneof||e.methods||e.requestType!==t)},s.fromJSON=function(e,t){return new s(e,t.options).addJSON(t.nested)},s.arrayToJSON=i,Object.defineProperty(a,"nestedArray",{get:function(){return this.c||(this.c=y.toArray(this.nested))}}),a.toJSON=function(){return{options:this.options,nested:i(this.nestedArray)}},a.addJSON=function(e){var t=this;return e&&(h||n(),Object.keys(e).forEach(function(r){for(var n=e[r],i=0;i<h.length;++i)if(h[i].testJSON(n))return t.add(h[i].fromJSON(r,n));throw TypeError("nested."+r+" must be JSON for "+c)})),this},a.get=function(e){return this.nested===t?null:this.nested[e]||null},a.getEnum=function(e){if(this.nested&&this.nested[e]instanceof p)return this.nested[e].values;throw Error("no such enum")},a.add=function(e){if(h||n(),!e||h.indexOf(e.constructor)<0)throw TypeError("object must be "+c);if(e instanceof d&&e.extend===t)throw TypeError("object must be an extension field when not part of a type");if(this.nested){var r=this.get(e.name);if(r){if(!(r instanceof s&&e instanceof s)||r instanceof f||r instanceof l)throw Error("duplicate name '"+e.name+"' in "+this);for(var i=r.nestedArray,u=0;u<i.length;++u)e.add(i[u]);this.remove(r),this.nested||(this.nested={}),e.setOptions(r.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),o(this)},a.remove=function(e){if(!(e instanceof u))throw TypeError("object must be 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=t),e.onRemove(this),o(this)},a.define=function(e,t){if(y.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");for(var r=this;e.length>0;){var n=e.shift();if(r.nested&&r.nested[n]){if(r=r.nested[n],!(r instanceof s))throw Error("path conflicts with non-namespace objects")}else r.add(r=new s(n))}return t&&r.addJSON(t),r},a.resolve=function(){f||(f=e(32)),l||(f=e(30));for(var t=this.nestedArray,r=0;r<t.length;++r)if(/^[A-Z]/.test(t[r].name)){if(t[r]instanceof f||t[r]instanceof l)this[t[r].name]=t[r];else{if(!(t[r]instanceof p))continue;this[t[r].name]=t[r].values}this.d.push(t[r].name)}return u.prototype.resolve.call(this)},a.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof s?e[t++].resolveAll():e[t++].resolve();return a.resolve.call(this)},a.lookup=function(e,r,n){if("boolean"==typeof r&&(n=r,r=t),y.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;if(""===e[0])return this.root.lookup(e.slice(1),r);var i=this.get(e[0]);if(i)if(1===e.length){if(!r||i instanceof r)return i}else if(i instanceof s&&(i=i.lookup(e.slice(1),r,!0)))return i;return null===this.parent||n?null:this.parent.lookup(e,r)},a.lookupType=function(t){f||(f=e(32));var r=this.lookup(t,f);if(!r)throw Error("no such type");return r},a.lookupService=function(t){l||(l=e(30));var r=this.lookup(t,l);if(!r)throw Error("no such service");return r},a.lookupEnum=function(e){var t=this.lookup(e,p);if(!t)throw Error("no such enum");return t.values}},{16:16,17:17,22:22,30:30,32:32,34:34}],22:[function(e,r){function n(e,t){if(!i.isString(e))throw TypeError("name must be a string");if(t&&!i.isObject(t))throw TypeError("options must be an object");this.options=t,this.name=e,this.parent=null,this.resolved=!1,this.comment=null}r.exports=n;var i=e(34);n.className="ReflectionObject",n.extend=i.extend;var s,o=n.prototype;Object.defineProperties(o,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),o.toJSON=function(){throw Error()},o.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var r=t.root;s||(s=e(27)),r instanceof s&&r.e(this)},o.onRemove=function(t){s||(s=e(27));var r=t.root;r instanceof s&&r.f(this),this.parent=null,this.resolved=!1},o.resolve=function(){return this.resolved?this:(s||(s=e(27)),this.root instanceof s&&(this.resolved=!0),this)},o.getOption=function(e){return this.options?this.options[e]:t},o.setOption=function(e,r,n){return n&&this.options&&this.options[e]!==t||((this.options||(this.options={}))[e]=r),this},o.setOptions=function(e,t){return e&&Object.keys(e).forEach(function(r){this.setOption(r,e[r],t)},this),this},o.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e}},{27:27,34:34}],23:[function(e,r){function n(e,r,n){if(Array.isArray(r)||(n=r,r=t),s.call(this,e,n),r&&!Array.isArray(r))throw TypeError("fieldNames must be an Array");this.oneof=r||[],this.g=[]}function i(e){e.parent&&e.g.forEach(function(t){t.parent||e.parent.add(t)})}r.exports=n;var s=e(22),o=s.extend(n);n.className="OneOf";var u=e(17);Object.defineProperty(o,"fieldsArray",{get:function(){return this.g}}),n.testJSON=function(e){return!!e.oneof},n.fromJSON=function(e,t){return new n(e,t.oneof,t.options)},o.toJSON=function(){return{oneof:this.oneof,options:this.options}},o.add=function(e){if(!(e instanceof u))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.g.push(e),e.partOf=this,i(this),this},o.remove=function(e){if(!(e instanceof u))throw TypeError("field must be 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.partOf=null,this},o.onAdd=function(e){s.prototype.onAdd.call(this,e);var t=this;this.oneof.forEach(function(r){var n=e.get(r);n&&!n.partOf&&(n.partOf=t,t.g.push(n))}),i(this)},o.onRemove=function(e){this.g.forEach(function(e){e.parent&&e.parent.remove(e)}),s.prototype.onRemove.call(this,e)}},{17:17,22:22}],24:[function(e,r){function n(e){return/^[a-zA-Z_][a-zA-Z_0-9]*$/.test(e)}function i(e){return/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/.test(e)}function s(e){return/^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/.test(e)}function o(e){return null===e?null:e.toLowerCase()}function u(e){return e.substring(0,1)+e.substring(1).replace(/_([a-z])(?=[a-z]|$)/g,function(e,t){return t.toUpperCase()})}function a(e,r,w){function O(e,t){var r=a.filename;return a.filename=null,Error("illegal "+(t||"token")+" '"+e+"' ("+(r?r+", ":"")+"line "+K.line()+")")}function k(){var e,t=[];do{if('"'!==(e=G())&&"'"!==e)throw O(e);t.push(G()),Y(e),e=Q()}while('"'===e||"'"===e);return t.join("")}function x(e){var t=G();switch(o(t)){case"'":case'"':return X(t),k();case"true":return!0;case"false":return!1}try{return S(t)}catch(r){if(e&&i(t))return t;throw O(t,"value")}}function j(){var e=A(G()),t=e;return Y("to",!0)&&(t=A(G())),Y(";"),[e,t]}function S(e){var t=1;"-"===e.charAt(0)&&(t=-1,e=e.substring(1));var r=o(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 O(e,"number")}function A(e,t){var r=o(e);switch(r){case"max":return 536870911;case"0":return 0}if("-"===e.charAt(0)&&!t)throw O(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 O(e,"id")}function N(){if(U!==t)throw O("package");if(U=G(),!i(U))throw O(U,"name");ne=ne.define(U),Y(";")}function T(){var e,t=Q();switch(t){case"weak":e=_||(_=[]),G();break;case"public":G();default:e=H||(H=[])}t=k(),Y(";"),e.push(t)}function E(){if(Y("="),Z=o(k()),re="proto3"===Z,!re&&"proto2"!==Z)throw O(Z,"syntax");Y(";")}function J(e,t){switch(t){case"option":return I(e,t),Y(";"),!0;case"message":return D(e,t),!0;case"enum":return B(e,t),!0;case"service":return R(e,t),!0;case"extend":return M(e,t),!0}return!1}function D(e,t){var r=G();if(!n(r))throw O(r,"type name");var s=new h(r);if(s.comment=ee(),Y("{",!0)){for(;"}"!==(t=G());){var u=o(t);if(!J(s,t))switch(u){case"map":$(s,u);break;case"required":case"optional":case"repeated":L(s,u);break;case"oneof":q(s,u);break;case"extensions":(s.extensions||(s.extensions=[])).push(j(s,u));break;case"reserved":(s.reserved||(s.reserved=[])).push(j(s,u));break;default:if(!re||!i(t))throw O(t);X(t),L(s,"optional")}}Y(";",!0)}else Y(";");e.add(s)}function L(e,r,s){var o=G();if("group"===o)return z(e,r),t;if(!i(o))throw O(o,"type");var u=G();if(!n(u))throw O(u,"name");u=ie(u),Y("=");var a=new c(u,A(G()),o,r,s),f=K.line();a.comment=ee(),P(a),a.comment||(a.comment=ee(f)),a.repeated&&g.packed[o]!==t&&!re&&a.setOption("packed",!1,!0),e.add(a)}function z(e,t){var r=G();if(!n(r))throw O(r,"name");var i=b.lcFirst(r);r===i&&(r=b.ucFirst(r)),Y("=");var s=A(G()),u=new h(r);u.group=!0,u.comment=ee();var a=new c(i,s,r,t);for(Y("{");"}"!==(W=G());)switch(W=o(W)){case"option":I(u,W),Y(";");break;case"required":case"optional":case"repeated":L(u,W);break;default:throw O(W)}Y(";",!0),e.add(u).add(a)}function $(e){Y("<");var r=G();if(g.mapKey[r]===t)throw O(r,"type");Y(",");var s=G();if(!i(s))throw O(s,"type");Y(">");var o=G();if(!n(o))throw O(o,"name");o=ie(o),Y("=");var u=new p(o,A(G()),r,s),a=K.line();u.comment=ee(),P(u),u.comment||(u.comment=ee(a)),e.add(u)}function q(e,t){var r=G();if(!n(r))throw O(r,"name");r=ie(r);var i=new d(r),s=K.line();if(i.comment=ee(),Y("{",!0)){for(;"}"!==(t=G());)"option"===t?(I(i,t),Y(";")):(X(t),L(i,"optional"));Y(";",!0);
}else Y(";"),i.comment||(i.comment=ee(s));e.add(i)}function B(e,t){var r=G();if(!n(r))throw O(r,"name");var i=new y(r);if(i.comment=ee(),Y("{",!0)){for(;"}"!==(t=G());)"option"===o(t)?(I(i,t),Y(";")):F(i,t);Y(";",!0)}else Y(";");e.add(i)}function F(e,t){if(!n(t))throw O(t,"name");var r=t;Y("=");var i=A(G(),!0),s=K.line();e.add(r,i,ee()),P({}),e.comments[r]||(e.comments[r]=ee(s))}function I(e,t){var r=Y("(",!0),n=G();if(!i(n))throw O(n,"name");r&&(Y(")"),n="("+n+")",t=Q(),s(t)&&(n+=t,G())),Y("="),V(e,n)}function V(e,t){if(Y("{",!0))for(;"}"!==(W=G());){if(!n(W))throw O(W,"name");Y(":"),e.setOption(t+"."+W,x(!0))}else e.setOption(t,x(!0))}function P(e){if(Y("[",!0)){do I(e,"option");while(Y(",",!0));Y("]")}return Y(";"),e}function R(e,t){if(t=G(),!n(t))throw O(t,"service name");var r=t,i=new v(r);if(i.comment=ee(),Y("{",!0)){for(;"}"!==(t=G());){var s=o(t);switch(s){case"option":I(i,s),Y(";");break;case"rpc":C(i,s);break;default:throw O(t)}}Y(";",!0)}else Y(";");e.add(i)}function C(e,t){var r=t,s=G();if(!n(s))throw O(s,"name");var u,a,f,l;if(Y("("),Y("stream",!0)&&(a=!0),!i(t=G()))throw O(t);if(u=t,Y(")"),Y("returns"),Y("("),Y("stream",!0)&&(l=!0),!i(t=G()))throw O(t);f=t,Y(")");var h=new m(s,r,u,f,a,l),c=K.line();if(h.comment=ee(),Y("{",!0)){for(;"}"!==(t=G());){var p=o(t);switch(p){case"option":I(h,p),Y(";");break;default:throw O(t)}}Y(";",!0)}else Y(";"),h.comment||(h.comment=ee(c));e.add(h)}function M(e,t){var r=G();if(!i(r))throw O(r,"reference");if(Y("{",!0)){for(;"}"!==(t=G());){var n=o(t);switch(n){case"required":case"repeated":case"optional":L(e,n,r);break;default:if(!re||!i(t))throw O(t);X(t),L(e,"optional",r)}}Y(";",!0)}else Y(";")}r instanceof l||(w=r,r=new l),w||(w=a.defaults);for(var U,H,_,Z,W,K=f(e),G=K.next,X=K.push,Q=K.peek,Y=K.skip,ee=K.cmnt,te=!0,re=!1,ne=r,ie=w.keepCase?function(e){return e}:u;null!==(W=G());){var se=o(W);switch(se){case"package":if(!te)throw O(W);N();break;case"import":if(!te)throw O(W);T();break;case"syntax":if(!te)throw O(W);E();break;case"option":if(!te)throw O(W);I(ne,W),Y(";");break;default:if(J(ne,W)){te=!1;continue}throw O(W)}}return a.filename=null,{package:U,imports:H,weakImports:_,syntax:Z,root:r}}r.exports=a,a.filename=null,a.defaults={keepCase:!1};var f=e(31),l=e(27),h=e(32),c=e(17),p=e(18),d=e(23),y=e(16),v=e(30),m=e(20),g=e(33),b=e(34)},{16:16,17:17,18:18,20:20,23:23,27:27,30:30,31:31,32:32,33:33,34:34}],25:[function(e,t){function r(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 i(){var e=new w(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw r(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw r(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function s(){return i.call(this).toLong()}function o(){return i.call(this).toNumber()}function u(){return i.call(this).toLong(!0)}function a(){return i.call(this).toNumber(!0)}function f(){return i.call(this).zzDecode().toLong()}function l(){return i.call(this).zzDecode().toNumber()}function h(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function c(){if(this.pos+8>this.len)throw r(this,8);return new w(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}function p(){return c.call(this).toLong(!0)}function d(){return c.call(this).toNumber(!0)}function y(){return c.call(this).zzDecode().toLong()}function v(){return c.call(this).zzDecode().toNumber()}function m(){b.Long?(k.int64=s,k.uint64=u,k.sint64=f,k.fixed64=p,k.sfixed64=y):(k.int64=o,k.uint64=a,k.sint64=l,k.fixed64=d,k.sfixed64=v)}t.exports=n;var g,b=e(36),w=b.LongBits,O=b.utf8;n.create=b.Buffer?function(t){return g||(g=e(26)),(n.create=function(e){return b.Buffer.isBuffer(e)?new g(e):new n(e)})(t)}:function(e){return new n(e)};var k=n.prototype;k.h=b.Array.prototype.subarray||b.Array.prototype.slice,k.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,r(this,10);return e}}(),k.int32=function(){return 0|this.uint32()},k.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},k.bool=function(){return 0!==this.uint32()},k.fixed32=function(){if(this.pos+4>this.len)throw r(this,4);return h(this.buf,this.pos+=4)},k.sfixed32=function(){var e=this.fixed32();return e>>>1^-(1&e)};var x="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],e[0]}:function(r,n){return t[3]=r[n],t[2]=r[n+1],t[1]=r[n+2],t[0]=r[n+3],e[0]}}():function(e,t){var r=h(e,t+4),n=2*(r>>31)+1,i=r>>>23&255,s=8388607&r;return 255===i?s?NaN:n*(1/0):0===i?1.401298464324817e-45*n*s:n*Math.pow(2,i-150)*(s+8388608)};k.float=function(){if(this.pos+4>this.len)throw r(this,4);var e=x(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,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],t[4]=r[n+4],t[5]=r[n+5],t[6]=r[n+6],t[7]=r[n+7],e[0]}:function(r,n){return t[7]=r[n],t[6]=r[n+1],t[5]=r[n+2],t[4]=r[n+3],t[3]=r[n+4],t[2]=r[n+5],t[1]=r[n+6],t[0]=r[n+7],e[0]}}():function(e,t){var r=h(e,t+4),n=h(e,t+8),i=2*(n>>31)+1,s=n>>>20&2047,o=4294967296*(1048575&n)+r;return 2047===s?o?NaN:i*(1/0):0===s?5e-324*i*o:i*Math.pow(2,s-1075)*(o+4503599627370496)};k.double=function(){if(this.pos+8>this.len)throw r(this,4);var e=j(this.buf,this.pos);return this.pos+=8,e},k.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw r(this,e);return this.pos+=e,t===n?new this.buf.constructor(0):this.h.call(this.buf,t,n)},k.string=function(){var e=this.bytes();return O.read(e,0,e.length)},k.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw r(this,e);this.pos+=e}else do if(this.pos>=this.len)throw r(this);while(128&this.buf[this.pos++]);return this},k.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(;;){if(4===(e=7&this.uint32()))break;this.skipType(e)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},n.i=m,m()},{26:26,36:36}],26:[function(e,t){function r(e){n.call(this,e)}t.exports=r;var n=e(25),i=r.prototype=Object.create(n.prototype);i.constructor=r;var s=e(36);s.Buffer&&(i.h=s.Buffer.prototype.slice),i.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}},{25:25,36:36}],27:[function(e,r){function n(e){o.call(this,"",e),this.deferred=[],this.files=[]}function i(){}function s(e){var r=e.parent.lookup(e.extend);if(r){var n=new l(e.fullName,e.id,e.type,e.rule,t,e.options);return n.declaringField=e,e.extensionField=n,r.add(n),!0}return!1}r.exports=n;var o=e(21),u=o.extend(n);n.className="Root";var a,f,l=e(17),h=e(34);n.fromJSON=function(e,t){return t||(t=new n),t.setOptions(e.options).addJSON(e.nested)},u.resolvePath=h.path.resolve;var c=function(){try{a=e(24),f=e(12)}catch(e){}c=null};u.load=function e(r,n,s){function o(e,t){if(s){var r=s;if(s=null,d)throw e;r(e,t)}}function u(e,t){try{if(h.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),h.isString(t)){a.filename=e;var r=a(t,p,n);r.imports&&r.imports.forEach(function(t){l(p.resolvePath(e,t))}),r.weakImports&&r.weakImports.forEach(function(t){l(p.resolvePath(e,t),!0)})}else p.setOptions(t.options).addJSON(t.nested)}catch(e){o(e)}d||y||o(null,p)}function l(e,r){var n=e.lastIndexOf("google/protobuf/");if(n>-1){var i=e.substring(n);i in f&&(e=i)}if(!(p.files.indexOf(e)>-1)){if(p.files.push(e),e in f)return d?u(e,f[e]):(++y,setTimeout(function(){--y,u(e,f[e])})),t;if(d){var a;try{a=h.fs.readFileSync(e).toString("utf8")}catch(e){return r||o(e),t}u(e,a)}else++y,h.fetch(e,function(n,i){if(--y,s)return n?(r?y||o(null,p):o(n),t):(u(e,i),t)})}}c&&c(),"function"==typeof n&&(s=n,n=t);var p=this;if(!s)return h.asPromise(e,p,r);var d=s===i,y=0;return h.isString(r)&&(r=[r]),r.forEach(function(e){l(p.resolvePath("",e))}),d?p:(y||o(null,p),t)},u.loadSync=function(e,t){if(!h.isNode)throw Error("not supported");return this.load(e,t,i)},u.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(e){return"'extend "+e.extend+"' in "+e.parent.fullName}).join(", "));return o.prototype.resolveAll.call(this)},u.e=function(e){var r=this.deferred.slice();this.deferred=[];for(var n=0;n<r.length;)s(r[n])?r.splice(n,1):++n;if(this.deferred=r,e instanceof l&&e.extend!==t&&!e.extensionField&&!s(e)&&this.deferred.indexOf(e)<0)this.deferred.push(e);else if(e instanceof o){var i=e.nestedArray;for(n=0;n<i.length;++n)this.e(i[n])}},u.f=function(e){if(e instanceof l){if(e.extend!==t&&!e.extensionField){var r=this.deferred.indexOf(e);r>-1&&this.deferred.splice(r,1)}e.extensionField&&(e.extensionField.parent.remove(e.extensionField),e.extensionField=null)}else if(e instanceof o)for(var n=e.nestedArray,i=0;i<n.length;++i)this.f(n[i])}},{12:12,17:17,21:21,24:24,34:34}],28:[function(e,t,r){var n=r;n.Service=e(29)},{29:29}],29:[function(e,t){function r(e){n.call(this),this.$rpc=e}t.exports=r;var n=e(34).EventEmitter;(r.prototype=Object.create(n.prototype)).constructor=r,r.prototype.end=function(e){return this.$rpc&&(e||this.$rpc(null,null,null),this.$rpc=null,this.emit("end").off()),this}},{34:34}],30:[function(e,r){function n(e,t){s.call(this,e,t),this.methods={},this.j=null}function i(e){return e.j=null,e}r.exports=n;var s=e(21),o=s.prototype,u=s.extend(n);n.className="Service";var a=e(20),f=e(34),l=e(28);n.testJSON=function(e){return!(!e||!e.methods)},n.fromJSON=function(e,t){var r=new n(e,t.options);return t.methods&&Object.keys(t.methods).forEach(function(e){r.add(a.fromJSON(e,t.methods[e]))}),r},Object.defineProperty(u,"methodsArray",{get:function(){return this.j||(this.j=f.toArray(this.methods))}}),u.toJSON=function(){var e=o.toJSON.call(this);return{options:e&&e.options||t,methods:s.arrayToJSON(this.methodsArray)||{},nested:e&&e.nested||t}},u.get=function(e){return o.get.call(this,e)||this.methods[e]||null},u.resolveAll=function(){for(var e=this.methodsArray,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,i(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,i(this)}return o.remove.call(this,e)},u.create=function(e,r,n){var i=new l.Service(e);return this.methodsArray.forEach(function(s){i[f.lcFirst(s.name)]=function(o,u){if(!i.$rpc){var a=Error("already ended");if(u)return u(a);throw a}if(!o)throw TypeError("request must not be null");s.resolve();var f=(r?s.resolvedRequestType.encodeDelimited(o):s.resolvedRequestType.encode(o)).finish();return e(s,f,function(e,r){if(e){if(i.emit("error",e,s),u)return u(e);throw e}if(null===r)return i.end(!0),t;var o;try{o=n?s.resolvedResponseType.decodeDelimited(r):s.resolvedResponseType.decode(r)}catch(e){if(i.emit("error",e,s),u)return u("error",e);throw e}return i.emit("data",o,s),u?u(null,o):t})}}),i}},{20:20,21:21,28:28,34:34}],31:[function(e,r){function n(e){return e.replace(/\\(.?)/g,function(e,t){switch(t){case"\\":case"":return t;default:return n.map[t]||""}})}function i(e){function r(e){return Error("illegal "+e+" (line "+v+")")}function i(){var t="'"===O?u:o;t.lastIndex=d-1;var i=t.exec(e);if(!i)throw r("string");return d=t.lastIndex,h(O),O=null,n(i[1])}function a(t){return e.charAt(t)}function f(t,r){m=e.charAt(t++),b=v,g=e.substring(t,r).split(/\n/g).map(function(e){return e.replace(/ *[*\/]+ */,"").trim()}).join("\n").trim()}function l(){if(w.length>0)return w.shift();if(O)return i();var t,n,o,u,l;do{if(d===y)return null;for(t=!1;/\s/.test(o=a(d));)if("\n"===o&&++v,++d===y)return null;if("/"===a(d)){if(++d===y)throw r("comment");if("/"===a(d)){for(l="/"===a(u=d+1);"\n"!==a(++d);)if(d===y)return null;++d,l&&f(u,d-1),++v,t=!0}else{if("*"!==(o=a(d)))return"/";l="*"===a(u=d+1);do{if("\n"===o&&++v,++d===y)throw r("comment");n=o,o=a(d)}while("*"!==n||"/"!==o);++d,l&&f(u,d-2),t=!0}}}while(t);var h=d;s.lastIndex=0;var c=s.test(a(h++));if(!c)for(;h<y&&!s.test(a(h));)++h;var p=e.substring(d,d=h);return'"'!==p&&"'"!==p||(O=p),p}function h(e){w.push(e)}function c(){if(!w.length){var e=l();if(null===e)return null;h(e)}return w[0]}function p(e,t){var n=c(),i=n===e;if(i)return l(),!0;if(!t)throw r("token '"+n+"', '"+e+"' expected");return!1}e=""+e;var d=0,y=e.length,v=1,m=null,g=null,b=0,w=[],O=null;return{next:l,peek:c,push:h,skip:p,line:function(){return v},cmnt:function(e){var r;return e===t?r=b===v-1&&g||null:(g||c(),r=b===e&&"/"===m&&g||null),r&&(m=g=null,b=0),r}}}r.exports=i;var s=/[\s{}=;:[\],'"()<>]/g,o=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,u=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g;n.map={0:"\0",r:"\r",n:"\n",t:"\t"},i.unescape=n},{}],32:[function(e,r){function n(e,r){s.call(this,e,r),this.fields={},this.oneofs=t,this.extensions=t,this.reserved=t,this.group=t,this.k=null,this.g=null,this.l=null,this.m=null}function i(e){return e.k=e.g=e.l=e.m=null,delete e.encode,delete e.decode,delete e.verify,e}r.exports=n;var s=e(21),o=s.prototype,u=s.extend(n);n.className="Type";var a=e(16),f=e(23),l=e(17),h=e(30),c=e(11),p=e(19),d=e(25),y=e(38),v=e(34),m=e(15),g=e(14),b=e(37),w=e(13),O=[a,n,l,h];n.testJSON=function(e){return!(!e||!e.fields)},n.fromJSON=function(e,r){var i=new n(e,r.options);return i.extensions=r.extensions,i.reserved=r.reserved,Object.keys(r.fields).forEach(function(e){i.add(l.fromJSON(e,r.fields[e]))}),r.oneofs&&Object.keys(r.oneofs).forEach(function(e){i.add(f.fromJSON(e,r.oneofs[e]))}),r.nested&&Object.keys(r.nested).forEach(function(e){for(var n=r.nested[e],s=0;s<O.length;++s)if(O[s].testJSON(n))return i.add(O[s].fromJSON(e,n)),t;throw Error("invalid nested object in "+i+": "+e)}),r.extensions&&r.extensions.length&&(i.extensions=r.extensions),r.reserved&&r.reserved.length&&(i.reserved=r.reserved),r.group&&(i.group=!0),i},Object.defineProperties(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]],n=r.id;if(this.k[n])throw Error("duplicate id "+n+" in "+this);this.k[n]=r}return this.k}},fieldsArray:{get:function(){return this.g||(this.g=v.toArray(this.fields))}},oneofsArray:{get:function(){return this.l||(this.l=v.toArray(this.oneofs))}},ctor:{get:function(){return this.m||(this.m=c.create(this).constructor)},set:function(e){if(e&&!(e.prototype instanceof p))throw TypeError("ctor must be a Message constructor");e.from||(e.from=p.from),this.m=e}}}),u.toJSON=function(){var e=o.toJSON.call(this);return{options:e&&e.options||t,oneofs:s.arrayToJSON(this.oneofsArray),fields:s.arrayToJSON(this.fieldsArray.filter(function(e){return!e.declaringField}))||{},extensions:this.extensions&&this.extensions.length?this.extensions:t,reserved:this.reserved&&this.reserved.length?this.reserved:t,group:this.group||t,nested:e&&e.nested||t}},u.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var r=this.oneofsArray;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&&e.extend===t){if(this.fieldsById[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),i(this)}return e instanceof f?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),i(this)):o.add.call(this,e)},u.remove=function(e){if(e instanceof l&&e.extend===t){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),i(this)}if(e instanceof f){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),i(this)}return o.remove.call(this,e)},u.create=function(e){return new this.ctor(e)},u.setup=function(){var e=this.fullName,t=this.fieldsArray.map(function(e){return e.resolve().resolvedType});return this.encode=m(this).eof(e+"$encode",{Writer:y,types:t,util:v}),this.decode=g(this).eof(e+"$decode",{Reader:d,types:t,util:v}),this.verify=b(this).eof(e+"$verify",{types:t,util:v}),this.fromObject=this.from=w.fromObject(this).eof(e+"$fromObject",{types:t,util:v}),this.toObject=w.toObject(this).eof(e+"$toObject",{types:t,util:v}),this},u.encode=function(e,t){return this.setup().encode(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.setup().decode(e,t)},u.decodeDelimited=function(e){return e instanceof d||(e=d.create(e)),this.decode(e,e.uint32())},u.verify=function(e){return this.setup().verify(e)},u.fromObject=function(e){return this.setup().fromObject(e)},u.from=u.fromObject,u.toObject=function(e,t){return this.setup().toObject(e,t)}},{11:11,13:13,14:14,15:15,16:16,17:17,19:19,21:21,23:23,25:25,30:30,34:34,37:37,38:38}],33:[function(e,t,r){function n(e,t){var r=0,n={};for(t|=0;r<e.length;)n[o[r+t]]=e[r++];return n}var i=r,s=e(34),o=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];i.basic=n([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),i.defaults=n([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",s.emptyArray,null]),i.long=n([0,0,0,1,1],7),i.mapKey=n([0,0,0,5,5,0,0,0,1,1,0,2],2),i.packed=n([1,5,0,0,0,5,5,0,0,0,1,1,0])},{34:34}],34:[function(e,t){var r=t.exports=e(36);r.asPromise=e(1),r.codegen=e(3),r.EventEmitter=e(4),r.extend=e(5),r.fetch=e(6),r.path=e(8),r.fs=r.inquire("fs"),r.toArray=function(e){return e?Object.keys(e).map(function(t){return e[t]}):[]},r.safeProp=function(e){return'["'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"]'},r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)}},{1:1,3:3,36:36,4:4,5:5,6:6,8:8}],35:[function(e,t){function r(e,t){this.lo=e,this.hi=t}t.exports=r;var n=e(36),i=r.prototype,s=r.zero=new r(0,0);s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1};var o=r.zeroHash="\0\0\0\0\0\0\0\0";r.fromNumber=function(e){if(0===e)return s;var t=e<0;t&&(e=-e);var n=e>>>0,i=(e-n)/4294967296>>>0;return t&&(i=~i>>>0,n=~n>>>0,++n>4294967295&&(n=0,++i>4294967295&&(i=0))),new r(n,i)},r.from=function(e){if("number"==typeof e)return r.fromNumber(e);if("string"==typeof e){if(!n.Long)return r.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new r(e.low>>>0,e.high>>>0):s},i.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},i.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,(!!e)):{low:0|this.lo,high:0|this.hi,unsigned:!!e}};var u=String.prototype.charCodeAt;r.fromHash=function(e){return e===o?s:new r((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)},i.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.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},i.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},i.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<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},{36:36}],36:[function(r,n,i){var s=i;s.base64=r(2),s.inquire=r(7),s.utf8=r(10),s.pool=r(9),s.emptyArray=Object.freeze?Object.freeze([]):[],s.emptyObject=Object.freeze?Object.freeze({}):{},s.isNode=!!(e.process&&e.process.versions&&e.process.versions.node),s.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},s.isString=function(e){return"string"==typeof e||e instanceof String},s.isObject=function(e){return e&&"object"==typeof e},s.Buffer=function(){try{var e=s.inquire("buffer").Buffer;return e.prototype.utf8Write?(e.from||(e.from=function(t,r){return new e(t,r)}),e.allocUnsafe||(e.allocUnsafe=function(t){return new e(t)}),e):null}catch(e){return null}}(),s.newBuffer=function(e){return"number"==typeof e?s.Buffer?s.Buffer.allocUnsafe(e):new s.Array(e):s.Buffer?s.Buffer.from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},s.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,s.LongBits=r(35),s.Long=e.dcodeIO&&e.dcodeIO.Long||s.inquire("long"),s.longToHash=function(e){return e?s.LongBits.from(e).toHash():s.LongBits.zeroHash},s.longFromHash=function(e,t){var r=s.LongBits.fromHash(e);return s.Long?s.Long.fromBits(r.lo,r.hi,t):r.toNumber(!!t)},s.merge=function(e,r,n){for(var i=Object.keys(r),s=0;s<i.length;++s)e[i[s]]!==t&&n||(e[i[s]]=r[i[s]]);return e},s.oneOfGetter=function(e){var r={};return e.forEach(function(e){r[e]=1}),function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(1===r[e[n]]&&this[e[n]]!==t&&null!==this[e[n]])return e[n]}},s.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},s.lazyResolve=function(e,t){t.forEach(function(t){Object.keys(t).forEach(function(r){for(var n=t[r|=0].split("."),i=e;n.length;)i=i[n.shift()];t[r]=i})})},s.toJSONOptions={longs:String,enums:String,bytes:String}},{10:10,2:2,35:35,7:7,9:9}],37:[function(e,t){function r(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function n(e,t,n,i){if(t.resolvedType)if(t.resolvedType instanceof o){e("switch(%s){",i)("default:")("return%j",r(t,"enum value"));for(var s=u.toArray(t.resolvedType.values),a=0;a<s.length;++a)e("case %d:",s[a]);e("break")("}")}else e("var e=types[%d].verify(%s);",n,i)("if(e)")("return%j+e",t.name+".");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",i)("return%j",r(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)))",i,i,i,i)("return%j",r(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',i)("return%j",r(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',i)("return%j",r(t,"boolean"));break;case"string":e("if(!util.isString(%s))",i)("return%j",r(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',i,i,i)("return%j",r(t,"buffer"))}return e}function i(e,t,n){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!/^-?(?:0|[1-9][0-9]*)$/.test(%s))",n)("return%j",r(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/.test(%s))",n)("return%j",r(t,"integer|Long key"));break;case"bool":e("if(!/^true|false|0|1$/.test(%s))",n)("return%j",r(t,"boolean key"))}return e}function s(e){var t=e.fieldsArray;if(!t.length)return u.codegen()("return null");for(var s=u.codegen("m"),a=0;a<t.length;++a){var f=t[a].resolve(),l="m"+u.safeProp(f.name);f.map?(s("if(%s!==undefined){",l)("if(!util.isObject(%s))",l)("return%j",r(f,"object"))("var k=Object.keys(%s)",l)("for(var i=0;i<k.length;++i){"),i(s,f,"k[i]"),n(s,f,a,l+"[k[i]]")("}")("}")):f.repeated?(s("if(%s!==undefined){",l)("if(!Array.isArray(%s))",l)("return%j",r(f,"array"))("for(var i=0;i<%s.length;++i){",l),n(s,f,a,l+"[i]")("}")("}")):(f.required||(!f.resolvedType||f.resolvedType instanceof o?s("if(%s!==undefined){",l):s("if(%s!==undefined&&%s!==null){",l,l)),n(s,f,a,l),f.required||s("}"))}return s("return null")}t.exports=s;var o=e(16),u=e(34)},{16:16,34:34}],38:[function(e,r){function n(e,r,n){this.fn=e,this.len=r,this.next=t,this.val=n}function i(){}function s(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function o(){this.len=0,this.head=new n(i,0,0),this.tail=this.head,this.states=null}function u(e,t,r){t[r]=255&e}function a(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e}function f(e,r){this.len=e,this.next=t,this.val=r}function l(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function h(e,t,r){t[r++]=255&e,t[r++]=e>>>8&255,t[r++]=e>>>16&255,t[r]=e>>>24}r.exports=o;var c,p=e(36),d=p.LongBits,y=p.base64,v=p.utf8;o.create=p.Buffer?function(){return c||(c=e(39)),(o.create=function(){return new c})()}:function(){return new o},o.alloc=function(e){return new p.Array(e)},p.Array!==Array&&(o.alloc=p.pool(o.alloc,p.Array.prototype.subarray));var m=o.prototype;m.push=function(e,t,r){return this.tail=this.tail.next=new n(e,t,r),this.len+=t,this},f.prototype=Object.create(n.prototype),f.prototype.fn=a,m.uint32=function(e){return this.len+=(this.tail=this.tail.next=new f((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},m.int32=function(e){return e<0?this.push(l,10,d.fromNumber(e)):this.uint32(e)},m.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},m.uint64=function(e){var t=d.from(e);return this.push(l,t.length(),t)},m.int64=m.uint64,m.sint64=function(e){var t=d.from(e).zzEncode();return this.push(l,t.length(),t)},m.bool=function(e){return this.push(u,1,e?1:0)},m.fixed32=function(e){return this.push(h,4,e>>>0)},m.sfixed32=function(e){return this.push(h,4,e<<1^e>>31)},m.fixed64=function(e){var t=d.from(e);return this.push(h,4,t.lo).push(h,4,t.hi)},m.sfixed64=function(e){var t=d.from(e).zzEncode();return this.push(h,4,t.lo).push(h,4,t.hi)};var g="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n,i){e[0]=r,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i]=t[3]}:function(r,n,i){e[0]=r,n[i++]=t[3],n[i++]=t[2],n[i++]=t[1],n[i]=t[0]}}():function(e,t,r){var n=e<0?1:0;if(n&&(e=-e),0===e)h(1/e>0?0:2147483648,t,r);else if(isNaN(e))h(2147483647,t,r);else if(e>3.4028234663852886e38)h((n<<31|2139095040)>>>0,t,r);else if(e<1.1754943508222875e-38)h((n<<31|Math.round(e/1.401298464324817e-45))>>>0,t,r);else{var i=Math.floor(Math.log(e)/Math.LN2),s=8388607&Math.round(e*Math.pow(2,-i)*8388608);h((n<<31|i+127<<23|s)>>>0,t,r)}};m.float=function(e){return this.push(g,4,e)};var b="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,n,i){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(r,n,i){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,r){var n=e<0?1:0;if(n&&(e=-e),0===e)h(0,t,r),h(1/e>0?0:2147483648,t,r+4);else if(isNaN(e))h(4294967295,t,r),h(2147483647,t,r+4);else if(e>1.7976931348623157e308)h(0,t,r),h((n<<31|2146435072)>>>0,t,r+4);else{var i;if(e<2.2250738585072014e-308)i=e/5e-324,h(i>>>0,t,r),h((n<<31|i/4294967296)>>>0,t,r+4);else{var s=Math.floor(Math.log(e)/Math.LN2);1024===s&&(s=1023),i=e*Math.pow(2,-s),h(4503599627370496*i>>>0,t,r),h((n<<31|s+1023<<20|1048576*i&1048575)>>>0,t,r+4)}}};m.double=function(e){return this.push(b,8,e)};var w=p.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};m.bytes=function(e){var t=e.length>>>0;if(!t)return this.push(u,1,0);if("string"==typeof e){var r=o.alloc(t=y.length(e));y.decode(e,r,0),e=r}return this.uint32(t).push(w,t,e)},m.string=function(e){var t=v.length(e);return t?this.uint32(t).push(v.write,t,e):this.push(u,1,0)},m.fork=function(){return this.states=new s(this),this.head=this.tail=new n(i,0,0),this.len=0,this},m.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 n(i,0,0),this.len=0),this},m.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},m.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t}},{36:36,39:39}],39:[function(e,t){function r(){i.call(this)}function n(e,t,r){e.length<40?o.utf8.write(e,t,r):t.utf8Write(e,r)}t.exports=r;var i=e(38),s=r.prototype=Object.create(i.prototype);s.constructor=r;var o=e(36),u=o.Buffer;r.alloc=function(e){return(r.alloc=u.allocUnsafe)(e)};var a=u&&u.prototype instanceof Uint8Array&&"set"===u.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n<e.length;)t[r++]=e[n++]};s.bytes=function(e){"string"==typeof e&&(e=u.from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this.push(a,t,e),this},s.string=function(e){var t=u.byteLength(e);return this.uint32(t),t&&this.push(n,t,e),this}},{36:36,38:38}],40:[function(t,r,n){function i(e,t,r){return"function"==typeof t?(r=t,t=new u.Root):t||(t=new u.Root),t.load(e,r)}function s(e,t){return t||(t=new u.Root),t.loadSync(e)}function o(){u.Reader.i()}var u=e.protobuf=n;u.load=i,u.loadSync=s,u.roots={};try{u.tokenize=t(31),u.parse=t(24),u.common=t(12)}catch(e){}u.Writer=t(38),u.BufferWriter=t(39),u.Reader=t(25),u.BufferReader=t(26),u.encoder=t(15),u.decoder=t(14),u.verifier=t(37),u.converter=t(13),u.ReflectionObject=t(22),u.Namespace=t(21),u.Root=t(27),u.Enum=t(16),u.Type=t(32),u.Field=t(17),u.OneOf=t(23),u.MapField=t(18),u.Service=t(30),u.Method=t(20),u.Class=t(11),u.Message=t(19),u.types=t(33),u.rpc=t(28),u.util=t(34),u.configure=o,"function"==typeof define&&define.amd&&define(["long"],function(e){return e&&(u.util.Long=e,o()),u})},{11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,30:30,31:31,32:32,33:33,34:34,37:37,38:38,39:39}]},{},[40])}("object"==typeof window&&window||"object"==typeof self&&self||this);
//# sourceMappingURL=protobuf.min.js.map
/*!
* protobuf.js v6.5.1 (c) 2016, Daniel Wirtz
* Compiled Wed, 18 Jan 2017 02:28:43 UTC
* protobuf.js v6.5.2 (c) 2016, Daniel Wirtz
* Compiled Thu, 19 Jan 2017 16:30:55 UTC
* Licensed under the BSD-3-Clause License

@@ -392,2 +392,3 @@ * see: https://github.com/dcodeIO/protobuf.js for details

? function create_buffer_setup(buffer) {
/* istanbul ignore next */
if (!BufferReader)

@@ -409,3 +410,3 @@ BufferReader = require(7);

ReaderPrototype._slice = util.Array.prototype.subarray || util.Array.prototype.slice;
ReaderPrototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;

@@ -459,3 +460,3 @@ /**

if (this.len - this.pos > 4) { // fast route (lo)
for (i = 0; i < 4; ++i) {
for (; i < 4; ++i) {
// 1st..4th

@@ -471,8 +472,9 @@ bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;

return bits;
i = 0;
} else {
for (i = 0; i < 4; ++i) {
for (; i < 3; ++i) {
/* istanbul ignore next */
if (this.pos >= this.len)
throw indexOutOfRange(this);
// 1st..4th
// 1st..3th
bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;

@@ -482,13 +484,8 @@ if (this.buf[this.pos++] < 128)

}
/* istanbul ignore next */
if (this.pos >= this.len)
throw indexOutOfRange(this);
// 5th
bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;
bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;
if (this.buf[this.pos++] < 128)
return bits;
// 4th
bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;
return bits;
}
if (this.len - this.pos > 4) { // fast route (hi)
for (i = 0; i < 5; ++i) {
for (; i < 5; ++i) {
// 6th..10th

@@ -500,3 +497,3 @@ bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;

} else {
for (i = 0; i < 5; ++i) {
for (; i < 5; ++i) {
/* istanbul ignore next */

@@ -511,2 +508,3 @@ if (this.pos >= this.len)

}
/* istanbul ignore next */
throw Error("invalid varint encoding");

@@ -802,4 +800,4 @@ }

} else {
/* istanbul ignore next */
do {
/* istanbul ignore next */
if (this.pos >= this.len)

@@ -890,2 +888,3 @@ throw indexOutOfRange(this);

/* istanbul ignore else */
if (util.Buffer)

@@ -1471,2 +1470,3 @@ BufferReaderPrototype._slice = util.Buffer.prototype.slice;

? function create_buffer_setup() {
/* istanbul ignore next */
if (!BufferWriter)

@@ -1823,3 +1823,5 @@ BufferWriter = require(11);

var len = value.length >>> 0;
if (typeof value === "string" && len) {
if (!len)
return this.push(writeByte, 1, 0);
if (typeof value === "string") {
var buf = Writer.alloc(len = base64.length(value));

@@ -1829,5 +1831,3 @@ base64.decode(value, buf, 0);

}
return len
? this.uint32(len).push(writeBytes, len, value)
: this.push(writeByte, 1, 0);
return this.uint32(len).push(writeBytes, len, value);
};

@@ -1834,0 +1834,0 @@

/*!
* protobuf.js v6.5.1 (c) 2016, Daniel Wirtz
* Compiled Wed, 18 Jan 2017 02:28:43 UTC
* protobuf.js v6.5.2 (c) 2016, Daniel Wirtz
* Compiled Thu, 19 Jan 2017 16:30:55 UTC
* Licensed under the BSD-3-Clause License
* see: https://github.com/dcodeIO/protobuf.js for details
*/
!function(t,n){"use strict";!function t(n,i,r){function e(s,u){if(!i[s]){if(!n[s]){var h="function"==typeof require&&require;if(!u&&h)return h(s,!0);if(o)return o(s,!0);var f=Error("Cannot find module '"+s+"'");throw f.code="MODULE_NOT_FOUND",f}var a=i[s]={exports:{}};n[s][0].call(a.exports,function(t){var i=n[s][1][t];return e(i?i:t)},a,a.exports,t,n,i,r)}return i[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)e(r[s]);return e}({1:[function(t,i,r){var e=r;e.length=function(t){var n=t.length;if(!n)return 0;for(var i=0;--n%4>1&&"="===t.charAt(n);)++i;return Math.ceil(3*t.length)/4-i};for(var o=Array(64),s=Array(123),u=0;u<64;)s[o[u]=u<26?u+65:u<52?u+71:u<62?u-4:u-59|43]=u++;e.encode=function(t,n,i){for(var r,e=[],s=0,u=0;n<i;){var h=t[n++];switch(u){case 0:e[s++]=o[h>>2],r=(3&h)<<4,u=1;break;case 1:e[s++]=o[r|h>>4],r=(15&h)<<2,u=2;break;case 2:e[s++]=o[r|h>>6],e[s++]=o[63&h],u=0}}return u&&(e[s++]=o[r],e[s]=61,1===u&&(e[s+1]=61)),String.fromCharCode.apply(String,e)};var h="invalid encoding";e.decode=function(t,i,r){for(var e,o=r,u=0,f=0;f<t.length;){var a=t.charCodeAt(f++);if(61===a&&u>1)break;if((a=s[a])===n)throw Error(h);switch(u){case 0:e=a,u=1;break;case 1:i[r++]=e<<2|(48&a)>>4,e=a,u=2;break;case 2:i[r++]=(15&e)<<4|(60&a)>>2,e=a,u=3;break;case 3:i[r++]=(3&e)<<6|a,u=0}}if(1===u)throw Error(h);return r-o},e.test=function(t){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(t)}},{}],2:[function(t,n,i){function r(t){try{var n=eval("quire".replace(/^/,"re"))(t);if(n&&(n.length||Object.keys(n).length))return n}catch(t){}return null}n.exports=r},{}],3:[function(t,n){function i(t,n,i){var r=i||8192,e=r>>>1,o=null,s=r;return function(i){if(i<1||i>e)return t(i);s+i>r&&(o=t(r),s=0);var u=n.call(o,s,s+=i);return 7&s&&(s=(7|s)+1),u}}n.exports=i},{}],4:[function(t,n,i){var r=i;r.length=function(t){for(var n=0,i=0,r=0;r<t.length;++r)i=t.charCodeAt(r),i<128?n+=1:i<2048?n+=2:55296===(64512&i)&&56320===(64512&t.charCodeAt(r+1))?(++r,n+=4):n+=3;return n},r.read=function(t,n,i){var r=i-n;if(r<1)return"";for(var e,o=null,s=[],u=0;n<i;)e=t[n++],e<128?s[u++]=e:e>191&&e<224?s[u++]=(31&e)<<6|63&t[n++]:e>239&&e<365?(e=((7&e)<<18|(63&t[n++])<<12|(63&t[n++])<<6|63&t[n++])-65536,s[u++]=55296+(e>>10),s[u++]=56320+(1023&e)):s[u++]=(15&e)<<12|(63&t[n++])<<6|63&t[n++],u>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),u=0);return o?(u&&o.push(String.fromCharCode.apply(String,s.slice(0,u))),o.join("")):u?String.fromCharCode.apply(String,s.slice(0,u)):""},r.write=function(t,n,i){for(var r,e,o=i,s=0;s<t.length;++s)r=t.charCodeAt(s),r<128?n[i++]=r:r<2048?(n[i++]=r>>6|192,n[i++]=63&r|128):55296===(64512&r)&&56320===(64512&(e=t.charCodeAt(s+1)))?(r=65536+((1023&r)<<10)+(1023&e),++s,n[i++]=r>>18|240,n[i++]=r>>12&63|128,n[i++]=r>>6&63|128,n[i++]=63&r|128):(n[i++]=r>>12|224,n[i++]=r>>6&63|128,n[i++]=63&r|128);return i-o}},{}],5:[function(n,i,r){function e(){o.Reader.a()}var o=t.protobuf=r;o.Writer=n(10),o.BufferWriter=n(11),o.Reader=n(6),o.BufferReader=n(7),o.util=n(9),o.roots={},o.configure=e,"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&(o.util.Long=t,e()),o})},{10:10,11:11,6:6,7:7,9:9}],6:[function(t,n){function i(t,n){return RangeError("index out of range: "+t.pos+" + "+(n||1)+" > "+t.len)}function r(t){this.buf=t,this.pos=0,this.len=t.length}function e(){var t=new m(0,0),n=0;if(this.len-this.pos>4){for(n=0;n<4;++n)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*n)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t}else{for(n=0;n<4;++n){if(this.pos>=this.len)throw i(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*n)>>>0,this.buf[this.pos++]<128)return t}if(this.pos>=this.len)throw i(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t}if(this.len-this.pos>4){for(n=0;n<5;++n)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*n+3)>>>0,this.buf[this.pos++]<128)return t}else for(n=0;n<5;++n){if(this.pos>=this.len)throw i(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*n+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function o(){return e.call(this).toLong()}function s(){return e.call(this).toNumber()}function u(){return e.call(this).toLong(!0)}function h(){return e.call(this).toNumber(!0)}function f(){return e.call(this).zzDecode().toLong()}function a(){return e.call(this).zzDecode().toNumber()}function c(t,n){return(t[n-4]|t[n-3]<<8|t[n-2]<<16|t[n-1]<<24)>>>0}function l(){if(this.pos+8>this.len)throw i(this,8);return new m(c(this.buf,this.pos+=4),c(this.buf,this.pos+=4))}function p(){return l.call(this).toLong(!0)}function b(){return l.call(this).toNumber(!0)}function v(){return l.call(this).zzDecode().toLong()}function y(){return l.call(this).zzDecode().toNumber()}function d(){w.Long?(x.int64=o,x.uint64=u,x.sint64=f,x.fixed64=p,x.sfixed64=v):(x.int64=s,x.uint64=h,x.sint64=a,x.fixed64=b,x.sfixed64=y)}n.exports=r;var g,w=t(9),m=w.LongBits,A=w.utf8;r.create=w.Buffer?function(n){return g||(g=t(7)),(r.create=function(t){return w.Buffer.isBuffer(t)?new g(t):new r(t)})(n)}:function(t){return new r(t)};var x=r.prototype;x.b=w.Array.prototype.subarray||w.Array.prototype.slice,x.uint32=function(){var t=4294967295;return function(){if(t=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return t;if((this.pos+=5)>this.len)throw this.pos=this.len,i(this,10);return t}}(),x.int32=function(){return 0|this.uint32()},x.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},x.bool=function(){return 0!==this.uint32()},x.fixed32=function(){if(this.pos+4>this.len)throw i(this,4);return c(this.buf,this.pos+=4)},x.sfixed32=function(){var t=this.fixed32();return t>>>1^-(1&t)};var z="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),n=new Uint8Array(t.buffer);return t[0]=-0,n[3]?function(i,r){return n[0]=i[r],n[1]=i[r+1],n[2]=i[r+2],n[3]=i[r+3],t[0]}:function(i,r){return n[3]=i[r],n[2]=i[r+1],n[1]=i[r+2],n[0]=i[r+3],t[0]}}():function(t,n){var i=c(t,n+4),r=2*(i>>31)+1,e=i>>>23&255,o=8388607&i;return 255===e?o?NaN:r*(1/0):0===e?1.401298464324817e-45*r*o:r*Math.pow(2,e-150)*(o+8388608)};x.float=function(){if(this.pos+4>this.len)throw i(this,4);var t=z(this.buf,this.pos);return this.pos+=4,t};var N="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),n=new Uint8Array(t.buffer);return t[0]=-0,n[7]?function(i,r){return n[0]=i[r],n[1]=i[r+1],n[2]=i[r+2],n[3]=i[r+3],n[4]=i[r+4],n[5]=i[r+5],n[6]=i[r+6],n[7]=i[r+7],t[0]}:function(i,r){return n[7]=i[r],n[6]=i[r+1],n[5]=i[r+2],n[4]=i[r+3],n[3]=i[r+4],n[2]=i[r+5],n[1]=i[r+6],n[0]=i[r+7],t[0]}}():function(t,n){var i=c(t,n+4),r=c(t,n+8),e=2*(r>>31)+1,o=r>>>20&2047,s=4294967296*(1048575&r)+i;return 2047===o?s?NaN:e*(1/0):0===o?5e-324*e*s:e*Math.pow(2,o-1075)*(s+4503599627370496)};x.double=function(){if(this.pos+8>this.len)throw i(this,4);var t=N(this.buf,this.pos);return this.pos+=8,t},x.bytes=function(){var t=this.uint32(),n=this.pos,r=this.pos+t;if(r>this.len)throw i(this,t);return this.pos+=t,n===r?new this.buf.constructor(0):this.b.call(this.buf,n,r)},x.string=function(){var t=this.bytes();return A.read(t,0,t.length)},x.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw i(this,t);this.pos+=t}else do if(this.pos>=this.len)throw i(this);while(128&this.buf[this.pos++]);return this},x.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){if(4===(t=7&this.uint32()))break;this.skipType(t)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},r.a=d,d()},{7:7,9:9}],7:[function(t,n){function i(t){r.call(this,t)}n.exports=i;var r=t(6),e=i.prototype=Object.create(r.prototype);e.constructor=i;var o=t(9);o.Buffer&&(e.b=o.Buffer.prototype.slice),e.string=function(){var t=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len))}},{6:6,9:9}],8:[function(t,n){function i(t,n){this.lo=t,this.hi=n}n.exports=i;var r=t(9),e=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};var s=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(t){if(0===t)return o;var n=t<0;n&&(t=-t);var r=t>>>0,e=(t-r)/4294967296>>>0;return n&&(e=~e>>>0,r=~r>>>0,++r>4294967295&&(r=0,++e>4294967295&&(e=0))),new i(r,e)},i.from=function(t){if("number"==typeof t)return i.fromNumber(t);if("string"==typeof t){if(!r.Long)return i.fromNumber(parseInt(t,10));t=r.Long.fromString(t)}return t.low||t.high?new i(t.low>>>0,t.high>>>0):o},e.toNumber=function(t){if(!t&&this.hi>>>31){var n=~this.lo+1>>>0,i=~this.hi>>>0;return n||(i=i+1>>>0),-(n+4294967296*i)}return this.lo+4294967296*this.hi},e.toLong=function(t){return r.Long?new r.Long(0|this.lo,0|this.hi,(!!t)):{low:0|this.lo,high:0|this.hi,unsigned:!!t}};var u=String.prototype.charCodeAt;i.fromHash=function(t){return t===s?o:new i((u.call(t,0)|u.call(t,1)<<8|u.call(t,2)<<16|u.call(t,3)<<24)>>>0,(u.call(t,4)|u.call(t,5)<<8|u.call(t,6)<<16|u.call(t,7)<<24)>>>0)},e.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},e.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},e.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},e.length=function(){var t=this.lo,n=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0===i?0===n?t<16384?t<128?1:2:t<2097152?3:4:n<16384?n<128?5:6:n<2097152?7:8:i<128?9:10}},{9:9}],9:[function(i,r,e){var o=e;o.base64=i(1),o.inquire=i(2),o.utf8=i(4),o.pool=i(3),o.emptyArray=Object.freeze?Object.freeze([]):[],o.emptyObject=Object.freeze?Object.freeze({}):{},o.isNode=!!(t.process&&t.process.versions&&t.process.versions.node),o.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},o.isString=function(t){return"string"==typeof t||t instanceof String},o.isObject=function(t){return t&&"object"==typeof t},o.Buffer=function(){try{var t=o.inquire("buffer").Buffer;return t.prototype.utf8Write?(t.from||(t.from=function(n,i){return new t(n,i)}),t.allocUnsafe||(t.allocUnsafe=function(n){return new t(n)}),t):null}catch(t){return null}}(),o.newBuffer=function(t){return"number"==typeof t?o.Buffer?o.Buffer.allocUnsafe(t):new o.Array(t):o.Buffer?o.Buffer.from(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},o.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,o.LongBits=i(8),o.Long=t.dcodeIO&&t.dcodeIO.Long||o.inquire("long"),o.longToHash=function(t){return t?o.LongBits.from(t).toHash():o.LongBits.zeroHash},o.longFromHash=function(t,n){var i=o.LongBits.fromHash(t);return o.Long?o.Long.fromBits(i.lo,i.hi,n):i.toNumber(!!n)},o.merge=function(t,i,r){for(var e=Object.keys(i),o=0;o<e.length;++o)t[e[o]]!==n&&r||(t[e[o]]=i[e[o]]);return t},o.oneOfGetter=function(t){var i={};return t.forEach(function(t){i[t]=1}),function(){for(var t=Object.keys(this),r=t.length-1;r>-1;--r)if(1===i[t[r]]&&this[t[r]]!==n&&null!==this[t[r]])return t[r]}},o.oneOfSetter=function(t){return function(n){for(var i=0;i<t.length;++i)t[i]!==n&&delete this[t[i]]}},o.lazyResolve=function(t,n){n.forEach(function(n){Object.keys(n).forEach(function(i){for(var r=n[i|=0].split("."),e=t;r.length;)e=e[r.shift()];n[i]=e})})},o.toJSONOptions={longs:String,enums:String,bytes:String}},{1:1,2:2,3:3,4:4,8:8}],10:[function(t,i){function r(t,i,r){this.fn=t,this.len=i,this.next=n,this.val=r}function e(){}function o(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function s(){this.len=0,this.head=new r(e,0,0),this.tail=this.head,this.states=null}function u(t,n,i){n[i]=255&t}function h(t,n,i){for(;t>127;)n[i++]=127&t|128,t>>>=7;n[i]=t}function f(t,i){this.len=t,this.next=n,this.val=i}function a(t,n,i){for(;t.hi;)n[i++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)n[i++]=127&t.lo|128,t.lo=t.lo>>>7;n[i++]=t.lo}function c(t,n,i){n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i]=t>>>24}i.exports=s;var l,p=t(9),b=p.LongBits,v=p.base64,y=p.utf8;s.create=p.Buffer?function(){return l||(l=t(11)),(s.create=function(){return new l})()}:function(){return new s},s.alloc=function(t){return new p.Array(t)},p.Array!==Array&&(s.alloc=p.pool(s.alloc,p.Array.prototype.subarray));var d=s.prototype;d.push=function(t,n,i){return this.tail=this.tail.next=new r(t,n,i),this.len+=n,this},f.prototype=Object.create(r.prototype),f.prototype.fn=h,d.uint32=function(t){return this.len+=(this.tail=this.tail.next=new f((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},d.int32=function(t){return t<0?this.push(a,10,b.fromNumber(t)):this.uint32(t)},d.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},d.uint64=function(t){var n=b.from(t);return this.push(a,n.length(),n)},d.int64=d.uint64,d.sint64=function(t){var n=b.from(t).zzEncode();return this.push(a,n.length(),n)},d.bool=function(t){return this.push(u,1,t?1:0)},d.fixed32=function(t){return this.push(c,4,t>>>0)},d.sfixed32=function(t){return this.push(c,4,t<<1^t>>31)},d.fixed64=function(t){var n=b.from(t);return this.push(c,4,n.lo).push(c,4,n.hi)},d.sfixed64=function(t){var n=b.from(t).zzEncode();return this.push(c,4,n.lo).push(c,4,n.hi)};var g="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),n=new Uint8Array(t.buffer);return t[0]=-0,n[3]?function(i,r,e){t[0]=i,r[e++]=n[0],r[e++]=n[1],r[e++]=n[2],r[e]=n[3]}:function(i,r,e){t[0]=i,r[e++]=n[3],r[e++]=n[2],r[e++]=n[1],r[e]=n[0]}}():function(t,n,i){var r=t<0?1:0;if(r&&(t=-t),0===t)c(1/t>0?0:2147483648,n,i);else if(isNaN(t))c(2147483647,n,i);else if(t>3.4028234663852886e38)c((r<<31|2139095040)>>>0,n,i);else if(t<1.1754943508222875e-38)c((r<<31|Math.round(t/1.401298464324817e-45))>>>0,n,i);else{var e=Math.floor(Math.log(t)/Math.LN2),o=8388607&Math.round(t*Math.pow(2,-e)*8388608);c((r<<31|e+127<<23|o)>>>0,n,i)}};d.float=function(t){return this.push(g,4,t)};var w="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),n=new Uint8Array(t.buffer);return t[0]=-0,n[7]?function(i,r,e){t[0]=i,r[e++]=n[0],r[e++]=n[1],r[e++]=n[2],r[e++]=n[3],r[e++]=n[4],r[e++]=n[5],r[e++]=n[6],r[e]=n[7]}:function(i,r,e){t[0]=i,r[e++]=n[7],r[e++]=n[6],r[e++]=n[5],r[e++]=n[4],r[e++]=n[3],r[e++]=n[2],r[e++]=n[1],r[e]=n[0]}}():function(t,n,i){var r=t<0?1:0;if(r&&(t=-t),0===t)c(0,n,i),c(1/t>0?0:2147483648,n,i+4);else if(isNaN(t))c(4294967295,n,i),c(2147483647,n,i+4);else if(t>1.7976931348623157e308)c(0,n,i),c((r<<31|2146435072)>>>0,n,i+4);else{var e;if(t<2.2250738585072014e-308)e=t/5e-324,c(e>>>0,n,i),c((r<<31|e/4294967296)>>>0,n,i+4);else{var o=Math.floor(Math.log(t)/Math.LN2);1024===o&&(o=1023),e=t*Math.pow(2,-o),c(4503599627370496*e>>>0,n,i),c((r<<31|o+1023<<20|1048576*e&1048575)>>>0,n,i+4)}}};d.double=function(t){return this.push(w,8,t)};var m=p.Array.prototype.set?function(t,n,i){n.set(t,i)}:function(t,n,i){for(var r=0;r<t.length;++r)n[i+r]=t[r]};d.bytes=function(t){var n=t.length>>>0;if("string"==typeof t&&n){var i=s.alloc(n=v.length(t));v.decode(t,i,0),t=i}return n?this.uint32(n).push(m,n,t):this.push(u,1,0)},d.string=function(t){var n=y.length(t);return n?this.uint32(n).push(y.write,n,t):this.push(u,1,0)},d.fork=function(){return this.states=new o(this),this.head=this.tail=new r(e,0,0),this.len=0,this},d.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 r(e,0,0),this.len=0),this},d.ldelim=function(){var t=this.head,n=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=t.next,this.tail=n,this.len+=i),this},d.finish=function(){for(var t=this.head.next,n=this.constructor.alloc(this.len),i=0;t;)t.fn(t.val,n,i),i+=t.len,t=t.next;return n}},{11:11,9:9}],11:[function(t,n){function i(){e.call(this)}function r(t,n,i){t.length<40?s.utf8.write(t,n,i):n.utf8Write(t,i)}n.exports=i;var e=t(10),o=i.prototype=Object.create(e.prototype);o.constructor=i;var s=t(9),u=s.Buffer;i.alloc=function(t){return(i.alloc=u.allocUnsafe)(t)};var h=u&&u.prototype instanceof Uint8Array&&"set"===u.prototype.set.name?function(t,n,i){n.set(t,i)}:function(t,n,i){if(t.copy)t.copy(n,i,0,t.length);else for(var r=0;r<t.length;)n[i++]=t[r++]};o.bytes=function(t){"string"==typeof t&&(t=u.from(t,"base64"));var n=t.length>>>0;return this.uint32(n),n&&this.push(h,n,t),this},o.string=function(t){var n=u.byteLength(t);return this.uint32(n),n&&this.push(r,n,t),this}},{10:10,9:9}]},{},[5])}("object"==typeof window&&window||"object"==typeof self&&self||this);
!function(t,n){"use strict";!function t(n,r,i){function e(s,u){if(!r[s]){if(!n[s]){var h="function"==typeof require&&require;if(!u&&h)return h(s,!0);if(o)return o(s,!0);var f=Error("Cannot find module '"+s+"'");throw f.code="MODULE_NOT_FOUND",f}var a=r[s]={exports:{}};n[s][0].call(a.exports,function(t){var r=n[s][1][t];return e(r?r:t)},a,a.exports,t,n,r,i)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s<i.length;s++)e(i[s]);return e}({1:[function(t,r,i){var e=i;e.length=function(t){var n=t.length;if(!n)return 0;for(var r=0;--n%4>1&&"="===t.charAt(n);)++r;return Math.ceil(3*t.length)/4-r};for(var o=Array(64),s=Array(123),u=0;u<64;)s[o[u]=u<26?u+65:u<52?u+71:u<62?u-4:u-59|43]=u++;e.encode=function(t,n,r){for(var i,e=[],s=0,u=0;n<r;){var h=t[n++];switch(u){case 0:e[s++]=o[h>>2],i=(3&h)<<4,u=1;break;case 1:e[s++]=o[i|h>>4],i=(15&h)<<2,u=2;break;case 2:e[s++]=o[i|h>>6],e[s++]=o[63&h],u=0}}return u&&(e[s++]=o[i],e[s]=61,1===u&&(e[s+1]=61)),String.fromCharCode.apply(String,e)};var h="invalid encoding";e.decode=function(t,r,i){for(var e,o=i,u=0,f=0;f<t.length;){var a=t.charCodeAt(f++);if(61===a&&u>1)break;if((a=s[a])===n)throw Error(h);switch(u){case 0:e=a,u=1;break;case 1:r[i++]=e<<2|(48&a)>>4,e=a,u=2;break;case 2:r[i++]=(15&e)<<4|(60&a)>>2,e=a,u=3;break;case 3:r[i++]=(3&e)<<6|a,u=0}}if(1===u)throw Error(h);return i-o},e.test=function(t){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(t)}},{}],2:[function(t,n,r){function i(t){try{var n=eval("quire".replace(/^/,"re"))(t);if(n&&(n.length||Object.keys(n).length))return n}catch(t){}return null}n.exports=i},{}],3:[function(t,n){function r(t,n,r){var i=r||8192,e=i>>>1,o=null,s=i;return function(r){if(r<1||r>e)return t(r);s+r>i&&(o=t(i),s=0);var u=n.call(o,s,s+=r);return 7&s&&(s=(7|s)+1),u}}n.exports=r},{}],4:[function(t,n,r){var i=r;i.length=function(t){for(var n=0,r=0,i=0;i<t.length;++i)r=t.charCodeAt(i),r<128?n+=1:r<2048?n+=2:55296===(64512&r)&&56320===(64512&t.charCodeAt(i+1))?(++i,n+=4):n+=3;return n},i.read=function(t,n,r){var i=r-n;if(i<1)return"";for(var e,o=null,s=[],u=0;n<r;)e=t[n++],e<128?s[u++]=e:e>191&&e<224?s[u++]=(31&e)<<6|63&t[n++]:e>239&&e<365?(e=((7&e)<<18|(63&t[n++])<<12|(63&t[n++])<<6|63&t[n++])-65536,s[u++]=55296+(e>>10),s[u++]=56320+(1023&e)):s[u++]=(15&e)<<12|(63&t[n++])<<6|63&t[n++],u>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),u=0);return o?(u&&o.push(String.fromCharCode.apply(String,s.slice(0,u))),o.join("")):u?String.fromCharCode.apply(String,s.slice(0,u)):""},i.write=function(t,n,r){for(var i,e,o=r,s=0;s<t.length;++s)i=t.charCodeAt(s),i<128?n[r++]=i:i<2048?(n[r++]=i>>6|192,n[r++]=63&i|128):55296===(64512&i)&&56320===(64512&(e=t.charCodeAt(s+1)))?(i=65536+((1023&i)<<10)+(1023&e),++s,n[r++]=i>>18|240,n[r++]=i>>12&63|128,n[r++]=i>>6&63|128,n[r++]=63&i|128):(n[r++]=i>>12|224,n[r++]=i>>6&63|128,n[r++]=63&i|128);return r-o}},{}],5:[function(n,r,i){function e(){o.Reader.a()}var o=t.protobuf=i;o.Writer=n(10),o.BufferWriter=n(11),o.Reader=n(6),o.BufferReader=n(7),o.util=n(9),o.roots={},o.configure=e,"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&(o.util.Long=t,e()),o})},{10:10,11:11,6:6,7:7,9:9}],6:[function(t,n){function r(t,n){return RangeError("index out of range: "+t.pos+" + "+(n||1)+" > "+t.len)}function i(t){this.buf=t,this.pos=0,this.len=t.length}function e(){var t=new m(0,0),n=0;if(!(this.len-this.pos>4)){for(;n<3;++n){if(this.pos>=this.len)throw r(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*n)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*n)>>>0,t}for(;n<4;++n)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*n)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(n=0,this.len-this.pos>4){for(;n<5;++n)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*n+3)>>>0,this.buf[this.pos++]<128)return t}else for(;n<5;++n){if(this.pos>=this.len)throw r(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*n+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function o(){return e.call(this).toLong()}function s(){return e.call(this).toNumber()}function u(){return e.call(this).toLong(!0)}function h(){return e.call(this).toNumber(!0)}function f(){return e.call(this).zzDecode().toLong()}function a(){return e.call(this).zzDecode().toNumber()}function c(t,n){return(t[n-4]|t[n-3]<<8|t[n-2]<<16|t[n-1]<<24)>>>0}function l(){if(this.pos+8>this.len)throw r(this,8);return new m(c(this.buf,this.pos+=4),c(this.buf,this.pos+=4))}function p(){return l.call(this).toLong(!0)}function b(){return l.call(this).toNumber(!0)}function v(){return l.call(this).zzDecode().toLong()}function y(){return l.call(this).zzDecode().toNumber()}function d(){w.Long?(x.int64=o,x.uint64=u,x.sint64=f,x.fixed64=p,x.sfixed64=v):(x.int64=s,x.uint64=h,x.sint64=a,x.fixed64=b,x.sfixed64=y)}n.exports=i;var g,w=t(9),m=w.LongBits,A=w.utf8;i.create=w.Buffer?function(n){return g||(g=t(7)),(i.create=function(t){return w.Buffer.isBuffer(t)?new g(t):new i(t)})(n)}:function(t){return new i(t)};var x=i.prototype;x.b=w.Array.prototype.subarray||w.Array.prototype.slice,x.uint32=function(){var t=4294967295;return function(){if(t=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return t;if((this.pos+=5)>this.len)throw this.pos=this.len,r(this,10);return t}}(),x.int32=function(){return 0|this.uint32()},x.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},x.bool=function(){return 0!==this.uint32()},x.fixed32=function(){if(this.pos+4>this.len)throw r(this,4);return c(this.buf,this.pos+=4)},x.sfixed32=function(){var t=this.fixed32();return t>>>1^-(1&t)};var z="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),n=new Uint8Array(t.buffer);return t[0]=-0,n[3]?function(r,i){return n[0]=r[i],n[1]=r[i+1],n[2]=r[i+2],n[3]=r[i+3],t[0]}:function(r,i){return n[3]=r[i],n[2]=r[i+1],n[1]=r[i+2],n[0]=r[i+3],t[0]}}():function(t,n){var r=c(t,n+4),i=2*(r>>31)+1,e=r>>>23&255,o=8388607&r;return 255===e?o?NaN:i*(1/0):0===e?1.401298464324817e-45*i*o:i*Math.pow(2,e-150)*(o+8388608)};x.float=function(){if(this.pos+4>this.len)throw r(this,4);var t=z(this.buf,this.pos);return this.pos+=4,t};var N="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),n=new Uint8Array(t.buffer);return t[0]=-0,n[7]?function(r,i){return n[0]=r[i],n[1]=r[i+1],n[2]=r[i+2],n[3]=r[i+3],n[4]=r[i+4],n[5]=r[i+5],n[6]=r[i+6],n[7]=r[i+7],t[0]}:function(r,i){return n[7]=r[i],n[6]=r[i+1],n[5]=r[i+2],n[4]=r[i+3],n[3]=r[i+4],n[2]=r[i+5],n[1]=r[i+6],n[0]=r[i+7],t[0]}}():function(t,n){var r=c(t,n+4),i=c(t,n+8),e=2*(i>>31)+1,o=i>>>20&2047,s=4294967296*(1048575&i)+r;return 2047===o?s?NaN:e*(1/0):0===o?5e-324*e*s:e*Math.pow(2,o-1075)*(s+4503599627370496)};x.double=function(){if(this.pos+8>this.len)throw r(this,4);var t=N(this.buf,this.pos);return this.pos+=8,t},x.bytes=function(){var t=this.uint32(),n=this.pos,i=this.pos+t;if(i>this.len)throw r(this,t);return this.pos+=t,n===i?new this.buf.constructor(0):this.b.call(this.buf,n,i)},x.string=function(){var t=this.bytes();return A.read(t,0,t.length)},x.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw r(this,t);this.pos+=t}else do if(this.pos>=this.len)throw r(this);while(128&this.buf[this.pos++]);return this},x.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){if(4===(t=7&this.uint32()))break;this.skipType(t)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},i.a=d,d()},{7:7,9:9}],7:[function(t,n){function r(t){i.call(this,t)}n.exports=r;var i=t(6),e=r.prototype=Object.create(i.prototype);e.constructor=r;var o=t(9);o.Buffer&&(e.b=o.Buffer.prototype.slice),e.string=function(){var t=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len))}},{6:6,9:9}],8:[function(t,n){function r(t,n){this.lo=t,this.hi=n}n.exports=r;var i=t(9),e=r.prototype,o=r.zero=new r(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var s=r.zeroHash="\0\0\0\0\0\0\0\0";r.fromNumber=function(t){if(0===t)return o;var n=t<0;n&&(t=-t);var i=t>>>0,e=(t-i)/4294967296>>>0;return n&&(e=~e>>>0,i=~i>>>0,++i>4294967295&&(i=0,++e>4294967295&&(e=0))),new r(i,e)},r.from=function(t){if("number"==typeof t)return r.fromNumber(t);if("string"==typeof t){if(!i.Long)return r.fromNumber(parseInt(t,10));t=i.Long.fromString(t)}return t.low||t.high?new r(t.low>>>0,t.high>>>0):o},e.toNumber=function(t){if(!t&&this.hi>>>31){var n=~this.lo+1>>>0,r=~this.hi>>>0;return n||(r=r+1>>>0),-(n+4294967296*r)}return this.lo+4294967296*this.hi},e.toLong=function(t){return i.Long?new i.Long(0|this.lo,0|this.hi,(!!t)):{low:0|this.lo,high:0|this.hi,unsigned:!!t}};var u=String.prototype.charCodeAt;r.fromHash=function(t){return t===s?o:new r((u.call(t,0)|u.call(t,1)<<8|u.call(t,2)<<16|u.call(t,3)<<24)>>>0,(u.call(t,4)|u.call(t,5)<<8|u.call(t,6)<<16|u.call(t,7)<<24)>>>0)},e.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},e.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},e.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},e.length=function(){var t=this.lo,n=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===n?t<16384?t<128?1:2:t<2097152?3:4:n<16384?n<128?5:6:n<2097152?7:8:r<128?9:10}},{9:9}],9:[function(r,i,e){var o=e;o.base64=r(1),o.inquire=r(2),o.utf8=r(4),o.pool=r(3),o.emptyArray=Object.freeze?Object.freeze([]):[],o.emptyObject=Object.freeze?Object.freeze({}):{},o.isNode=!!(t.process&&t.process.versions&&t.process.versions.node),o.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},o.isString=function(t){return"string"==typeof t||t instanceof String},o.isObject=function(t){return t&&"object"==typeof t},o.Buffer=function(){try{var t=o.inquire("buffer").Buffer;return t.prototype.utf8Write?(t.from||(t.from=function(n,r){return new t(n,r)}),t.allocUnsafe||(t.allocUnsafe=function(n){return new t(n)}),t):null}catch(t){return null}}(),o.newBuffer=function(t){return"number"==typeof t?o.Buffer?o.Buffer.allocUnsafe(t):new o.Array(t):o.Buffer?o.Buffer.from(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},o.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,o.LongBits=r(8),o.Long=t.dcodeIO&&t.dcodeIO.Long||o.inquire("long"),o.longToHash=function(t){return t?o.LongBits.from(t).toHash():o.LongBits.zeroHash},o.longFromHash=function(t,n){var r=o.LongBits.fromHash(t);return o.Long?o.Long.fromBits(r.lo,r.hi,n):r.toNumber(!!n)},o.merge=function(t,r,i){for(var e=Object.keys(r),o=0;o<e.length;++o)t[e[o]]!==n&&i||(t[e[o]]=r[e[o]]);return t},o.oneOfGetter=function(t){var r={};return t.forEach(function(t){r[t]=1}),function(){for(var t=Object.keys(this),i=t.length-1;i>-1;--i)if(1===r[t[i]]&&this[t[i]]!==n&&null!==this[t[i]])return t[i]}},o.oneOfSetter=function(t){return function(n){for(var r=0;r<t.length;++r)t[r]!==n&&delete this[t[r]]}},o.lazyResolve=function(t,n){n.forEach(function(n){Object.keys(n).forEach(function(r){for(var i=n[r|=0].split("."),e=t;i.length;)e=e[i.shift()];n[r]=e})})},o.toJSONOptions={longs:String,enums:String,bytes:String}},{1:1,2:2,3:3,4:4,8:8}],10:[function(t,r){function i(t,r,i){this.fn=t,this.len=r,this.next=n,this.val=i}function e(){}function o(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function s(){this.len=0,this.head=new i(e,0,0),this.tail=this.head,this.states=null}function u(t,n,r){n[r]=255&t}function h(t,n,r){for(;t>127;)n[r++]=127&t|128,t>>>=7;n[r]=t}function f(t,r){this.len=t,this.next=n,this.val=r}function a(t,n,r){for(;t.hi;)n[r++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)n[r++]=127&t.lo|128,t.lo=t.lo>>>7;n[r++]=t.lo}function c(t,n,r){n[r++]=255&t,n[r++]=t>>>8&255,n[r++]=t>>>16&255,n[r]=t>>>24}r.exports=s;var l,p=t(9),b=p.LongBits,v=p.base64,y=p.utf8;s.create=p.Buffer?function(){return l||(l=t(11)),(s.create=function(){return new l})()}:function(){return new s},s.alloc=function(t){return new p.Array(t)},p.Array!==Array&&(s.alloc=p.pool(s.alloc,p.Array.prototype.subarray));var d=s.prototype;d.push=function(t,n,r){return this.tail=this.tail.next=new i(t,n,r),this.len+=n,this},f.prototype=Object.create(i.prototype),f.prototype.fn=h,d.uint32=function(t){return this.len+=(this.tail=this.tail.next=new f((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},d.int32=function(t){return t<0?this.push(a,10,b.fromNumber(t)):this.uint32(t)},d.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},d.uint64=function(t){var n=b.from(t);return this.push(a,n.length(),n)},d.int64=d.uint64,d.sint64=function(t){var n=b.from(t).zzEncode();return this.push(a,n.length(),n)},d.bool=function(t){return this.push(u,1,t?1:0)},d.fixed32=function(t){return this.push(c,4,t>>>0)},d.sfixed32=function(t){return this.push(c,4,t<<1^t>>31)},d.fixed64=function(t){var n=b.from(t);return this.push(c,4,n.lo).push(c,4,n.hi)},d.sfixed64=function(t){var n=b.from(t).zzEncode();return this.push(c,4,n.lo).push(c,4,n.hi)};var g="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),n=new Uint8Array(t.buffer);return t[0]=-0,n[3]?function(r,i,e){t[0]=r,i[e++]=n[0],i[e++]=n[1],i[e++]=n[2],i[e]=n[3]}:function(r,i,e){t[0]=r,i[e++]=n[3],i[e++]=n[2],i[e++]=n[1],i[e]=n[0]}}():function(t,n,r){var i=t<0?1:0;if(i&&(t=-t),0===t)c(1/t>0?0:2147483648,n,r);else if(isNaN(t))c(2147483647,n,r);else if(t>3.4028234663852886e38)c((i<<31|2139095040)>>>0,n,r);else if(t<1.1754943508222875e-38)c((i<<31|Math.round(t/1.401298464324817e-45))>>>0,n,r);else{var e=Math.floor(Math.log(t)/Math.LN2),o=8388607&Math.round(t*Math.pow(2,-e)*8388608);c((i<<31|e+127<<23|o)>>>0,n,r)}};d.float=function(t){return this.push(g,4,t)};var w="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),n=new Uint8Array(t.buffer);return t[0]=-0,n[7]?function(r,i,e){t[0]=r,i[e++]=n[0],i[e++]=n[1],i[e++]=n[2],i[e++]=n[3],i[e++]=n[4],i[e++]=n[5],i[e++]=n[6],i[e]=n[7]}:function(r,i,e){t[0]=r,i[e++]=n[7],i[e++]=n[6],i[e++]=n[5],i[e++]=n[4],i[e++]=n[3],i[e++]=n[2],i[e++]=n[1],i[e]=n[0]}}():function(t,n,r){var i=t<0?1:0;if(i&&(t=-t),0===t)c(0,n,r),c(1/t>0?0:2147483648,n,r+4);else if(isNaN(t))c(4294967295,n,r),c(2147483647,n,r+4);else if(t>1.7976931348623157e308)c(0,n,r),c((i<<31|2146435072)>>>0,n,r+4);else{var e;if(t<2.2250738585072014e-308)e=t/5e-324,c(e>>>0,n,r),c((i<<31|e/4294967296)>>>0,n,r+4);else{var o=Math.floor(Math.log(t)/Math.LN2);1024===o&&(o=1023),e=t*Math.pow(2,-o),c(4503599627370496*e>>>0,n,r),c((i<<31|o+1023<<20|1048576*e&1048575)>>>0,n,r+4)}}};d.double=function(t){return this.push(w,8,t)};var m=p.Array.prototype.set?function(t,n,r){n.set(t,r)}:function(t,n,r){for(var i=0;i<t.length;++i)n[r+i]=t[i]};d.bytes=function(t){var n=t.length>>>0;if(!n)return this.push(u,1,0);if("string"==typeof t){var r=s.alloc(n=v.length(t));v.decode(t,r,0),t=r}return this.uint32(n).push(m,n,t)},d.string=function(t){var n=y.length(t);return n?this.uint32(n).push(y.write,n,t):this.push(u,1,0)},d.fork=function(){return this.states=new o(this),this.head=this.tail=new i(e,0,0),this.len=0,this},d.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(e,0,0),this.len=0),this},d.ldelim=function(){var t=this.head,n=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=t.next,this.tail=n,this.len+=r),this},d.finish=function(){for(var t=this.head.next,n=this.constructor.alloc(this.len),r=0;t;)t.fn(t.val,n,r),r+=t.len,t=t.next;return n}},{11:11,9:9}],11:[function(t,n){function r(){e.call(this)}function i(t,n,r){t.length<40?s.utf8.write(t,n,r):n.utf8Write(t,r)}n.exports=r;var e=t(10),o=r.prototype=Object.create(e.prototype);o.constructor=r;var s=t(9),u=s.Buffer;r.alloc=function(t){return(r.alloc=u.allocUnsafe)(t)};var h=u&&u.prototype instanceof Uint8Array&&"set"===u.prototype.set.name?function(t,n,r){n.set(t,r)}:function(t,n,r){if(t.copy)t.copy(n,r,0,t.length);else for(var i=0;i<t.length;)n[r++]=t[i++]};o.bytes=function(t){"string"==typeof t&&(t=u.from(t,"base64"));var n=t.length>>>0;return this.uint32(n),n&&this.push(h,n,t),this},o.string=function(t){var n=u.byteLength(t);return this.uint32(n),n&&this.push(i,n,t),this}},{10:10,9:9}]},{},[5])}("object"==typeof window&&window||"object"==typeof self&&self||this);
//# sourceMappingURL=protobuf.min.js.map
{
"name": "protobufjs",
"version": "6.5.1",
"version": "6.5.2",
"versionScheme": "~",
"description": "Protocol Buffers for JavaScript (& TypeScript).",

@@ -32,2 +33,3 @@ "author": "Daniel Wirtz <dcode+protobufjs@dcode.io>",

"coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js tests/node/*.js",
"coverage-ci": "npm run coverage && cat coverage/lcov.info | coveralls",
"docs": "jsdoc -c jsdoc.docs.json -R README.md",

@@ -37,2 +39,3 @@ "lint": "eslint src runtime",

"prepublish": "node scripts/prepublish",
"postinstall": "node scripts/postinstall",
"prof": "node bench/prof",

@@ -69,2 +72,3 @@ "test": "tape -r ./lib/tape-adapter tests/*.js tests/node/*.js | tap-spec",

"chalk": "^1.1.3",
"coveralls": "^2.11.15",
"escodegen": "^1.8.1",

@@ -71,0 +75,0 @@ "eslint": "^3.13.1",

@@ -1,5 +0,10 @@

# <p align="center"><img alt="protobuf.js" src="https://github.com/dcodeIO/protobuf.js/raw/master/pbjs.png" width="120" height="104" /></p>
<h1 align="center"><img alt="protobuf.js" src="https://github.com/dcodeIO/protobuf.js/raw/master/pbjs.png" width="120" height="104" /></h1>
<p align="center">
<a href="https://travis-ci.org/dcodeIO/protobuf.js"><img src="https://travis-ci.org/dcodeIO/protobuf.js.svg?branch=master" alt=""></a>
<a href="https://coveralls.io/github/dcodeIO/protobuf.js"><img src="https://coveralls.io/repos/github/dcodeIO/protobuf.js/badge.svg?branch=master" alt=""></a>
<a href="https://npmjs.org/package/protobufjs"><img src="https://img.shields.io/npm/v/protobufjs.svg" alt=""></a>
<a href="https://npmjs.org/package/protobufjs"><img src="https://img.shields.io/npm/dm/protobufjs.svg" alt=""></a>
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=dcode%40dcode.io&item_name=Open%20Source%20Software%20Contribution&item_number=dcodeIO%2Fprotobuf.js"><img alt="donate ❤" src="https://img.shields.io/badge/donate-❤-ff2244.svg"></a>
</p>
[![][travis-image]][travis-url] [![][david-image]][david-url] [![][npm-dl-image]][npm-url] [![][npm-image]][npm-url] [![][paypal-image]][paypal-url]
**Protocol Buffers** are a language-neutral, platform-neutral, extensible way of serializing structured data for use in communications protocols, data storage, and more, originally designed at Google ([see](https://developers.google.com/protocol-buffers/)).

@@ -9,12 +14,2 @@

[travis-image]: https://img.shields.io/travis/dcodeIO/protobuf.js.svg
[travis-url]: https://travis-ci.org/dcodeIO/protobuf.js
[david-url]: https://david-dm.org/dcodeIO/protobuf.js
[david-image]: https://img.shields.io/david/dcodeIO/protobuf.js.svg
[npm-image]: https://img.shields.io/npm/v/protobufjs.svg
[npm-url]: https://npmjs.org/package/protobufjs
[npm-dl-image]: https://img.shields.io/npm/dm/protobufjs.svg
[paypal-image]: https://img.shields.io/badge/donate-feels%20good%2C%20I%20promise-333333.svg
[paypal-url]: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=dcode%40dcode.io&item_name=Open%20Source%20Software%20Contribution&item_number=dcodeIO%2Fprotobuf.js
**Recommended read:** [Changes in protobuf.js 6.0](https://github.com/dcodeIO/protobuf.js/wiki/Changes-in-protobuf.js-6.0)

@@ -64,4 +59,2 @@

**Note:** protobuf.js uses a [semver](https://semver.org)-incompatible versioning scheme currently. For API compatibility, just prefix its version with a `~` instead of a `^` in your package.json's dependencies. If you want to access the semver website, just prefix its address with `http:` instead of `https:`.
```js

@@ -68,0 +61,0 @@ var protobuf = require("protobufjs");

@@ -227,2 +227,3 @@ "use strict";

// initNested above already initializes Type and Service
/* istanbul ignore else */
if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) {

@@ -238,3 +239,2 @@ // replace plain namespace but keep existing nested elements and options

/* istanbul ignore next */
} else

@@ -279,19 +279,22 @@ throw Error("duplicate name '" + object.name + "' in " + this);

NamespacePrototype.define = function define(path, json) {
if (util.isString(path))
if (util.isString(path)) {
path = path.split(".");
else if (!Array.isArray(path)) {
json = path;
path = undefined;
/* istanbul ignore next */
} else if (!Array.isArray(path))
throw TypeError("illegal path");
if (path && path.length && path[0] === "")
throw Error("path must be relative");
var ptr = this;
while (path.length > 0) {
var part = path.shift();
if (ptr.nested && ptr.nested[part]) {
ptr = ptr.nested[part];
/* istanbul ignore next */
if (!(ptr instanceof Namespace))
throw Error("path conflicts with non-namespace objects");
} else
ptr.add(ptr = new Namespace(part));
}
var ptr = this;
if (path)
while (path.length > 0) {
var part = path.shift();
if (ptr.nested && ptr.nested[part]) {
ptr = ptr.nested[part];
if (!(ptr instanceof Namespace))
throw Error("path conflicts with non-namespace objects");
} else
ptr.add(ptr = new Namespace(part));
}
if (json)

@@ -354,2 +357,4 @@ ptr.addJSON(json);

NamespacePrototype.lookup = function lookup(path, filterType, parentAlreadyChecked) {
/* istanbul ignore next */
if (typeof filterType === "boolean") {

@@ -359,6 +364,10 @@ parentAlreadyChecked = filterType;

}
if (util.isString(path) && path.length)
if (util.isString(path) && path.length) {
if (path === ".")
return this.root;
path = path.split(".");
else if (!path.length)
return null;
} else if (!path.length)
return this;
// Start at root if path is absolute

@@ -369,4 +378,9 @@ if (path[0] === "")

var found = this.get(path[0]);
if (found && path.length === 1 && (!filterType || found instanceof filterType) || found instanceof Namespace && (found = found.lookup(path.slice(1), filterType, true)))
return found;
if (found) {
if (path.length === 1) {
if (!filterType || found instanceof filterType)
return found;
} else if (found instanceof Namespace && (found = found.lookup(path.slice(1), filterType, true)))
return found;
}
// If there hasn't been a match, try again at the parent

@@ -373,0 +387,0 @@ if (this.parent === null || parentAlreadyChecked)

@@ -21,6 +21,4 @@ "use strict";

/* istanbul ignore next */
if (!util.isString(name))
throw TypeError("name must be a string");
/* istanbul ignore next */
if (options && !util.isObject(options))

@@ -104,3 +102,3 @@ throw TypeError("options must be an object");

*/
ReflectionObjectPrototype.toJSON = function toJSON() {
ReflectionObjectPrototype.toJSON = /* istanbul ignore next */ function toJSON() {
throw Error(); // not implemented, shouldn't happen

@@ -132,5 +130,8 @@ };

ReflectionObjectPrototype.onRemove = function onRemove(parent) {
var root = parent.root;
/* istanbul ignore next */
if (!Root)
Root = require("./root");
var root = parent.root;
if (root instanceof Root)

@@ -149,4 +150,7 @@ root._handleRemove(this);

return this;
/* istanbul ignore next */
if (!Root)
Root = require("./root");
if (this.root instanceof Root)

@@ -153,0 +157,0 @@ this.resolved = true; // only if part of a root

@@ -92,5 +92,2 @@ "use strict";

if (!root)
root = new Root();
var ptr = root;

@@ -100,2 +97,3 @@

/* istanbul ignore next */
function illegal(token, name) {

@@ -110,2 +108,3 @@ var filename = parse.filename;

token;
/* istanbul ignore next */
do {

@@ -136,4 +135,6 @@ if ((token = next()) !== "\"" && token !== "'")

} catch (e) {
/* istanbul ignore else */
if (acceptTypeRef && isTypeRef(token))
return token;
/* istanbul ignore next */
throw illegal(token, "value");

@@ -172,2 +173,3 @@ }

return sign * parseFloat(token);
/* istanbul ignore next */
throw illegal(token, "number");

@@ -182,2 +184,3 @@ }

}
/* istanbul ignore next */
if (token.charAt(0) === "-" && !acceptNegative)

@@ -189,4 +192,6 @@ throw illegal(token, "id");

return parseInt(token, 16);
/* istanbul ignore else */
if (/^-?0[0-7]+$/.test(token))
return parseInt(token, 8);
/* istanbul ignore next */
throw illegal(token, "id");

@@ -196,5 +201,7 @@ }

function parsePackage() {
/* istanbul ignore next */
if (pkg !== undefined)
throw illegal("package");
pkg = next();
/* istanbul ignore next */
if (!isTypeRef(pkg))

@@ -230,2 +237,3 @@ throw illegal(pkg, "name");

isProto3 = syntax === "proto3";
/* istanbul ignore next */
if (!isProto3 && syntax !== "proto2")

@@ -265,2 +273,3 @@ throw illegal(syntax, "syntax");

var name = next();
/* istanbul ignore next */
if (!isName(name))

@@ -300,2 +309,3 @@ throw illegal(name, "type name");

default:
/* istanbul ignore next */
if (!isProto3 || !isTypeRef(token))

@@ -320,5 +330,7 @@ throw illegal(token);

}
/* istanbul ignore next */
if (!isTypeRef(type))
throw illegal(type, "type");
var name = next();
/* istanbul ignore next */
if (!isName(name))

@@ -343,2 +355,3 @@ throw illegal(name, "name");

var name = next();
/* istanbul ignore next */
if (!isName(name))

@@ -504,19 +517,13 @@ throw illegal(name, "name");

if (skip(":", true))
setOption(parent, name + "." + token, readValue(true));
else
parseOptionValue(parent, name + "." + token);
skip(":");
// if (skip(":", true))
parent.setOption(name + "." + token, readValue(true));
// else
// parseOptionValue(parent, name + "." + token);
}
} else
setOption(parent, name, readValue(true));
parent.setOption(name, readValue(true));
// Does not enforce a delimiter to be universal
}
function setOption(parent, name, value) {
if (parent.setOption)
parent.setOption(name, value);
else
parent[name] = value;
}
function parseInlineOptions(parent) {

@@ -576,4 +583,3 @@ if (skip("[", true)) {

skip("(");
var st;
if (skip(st = "stream", true))
if (skip("stream", true))
requestStream = true;

@@ -585,3 +591,3 @@ /* istanbul ignore next */

skip(")"); skip("returns"); skip("(");
if (skip(st, true))
if (skip("stream", true))
responseStream = true;

@@ -685,2 +691,3 @@ /* istanbul ignore next */

default:
/* istanbul ignore else */
if (parseCommon(ptr, token)) {

@@ -687,0 +694,0 @@ head = false;

@@ -23,2 +23,3 @@ "use strict";

/* istanbul ignore else */
if (util.Buffer)

@@ -25,0 +26,0 @@ BufferReaderPrototype._slice = util.Buffer.prototype.slice;

@@ -51,2 +51,3 @@ "use strict";

? function create_buffer_setup(buffer) {
/* istanbul ignore next */
if (!BufferReader)

@@ -68,3 +69,3 @@ BufferReader = require("./reader_buffer");

ReaderPrototype._slice = util.Array.prototype.subarray || util.Array.prototype.slice;
ReaderPrototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;

@@ -118,3 +119,3 @@ /**

if (this.len - this.pos > 4) { // fast route (lo)
for (i = 0; i < 4; ++i) {
for (; i < 4; ++i) {
// 1st..4th

@@ -130,8 +131,9 @@ bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;

return bits;
i = 0;
} else {
for (i = 0; i < 4; ++i) {
for (; i < 3; ++i) {
/* istanbul ignore next */
if (this.pos >= this.len)
throw indexOutOfRange(this);
// 1st..4th
// 1st..3th
bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;

@@ -141,13 +143,8 @@ if (this.buf[this.pos++] < 128)

}
/* istanbul ignore next */
if (this.pos >= this.len)
throw indexOutOfRange(this);
// 5th
bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;
bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;
if (this.buf[this.pos++] < 128)
return bits;
// 4th
bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;
return bits;
}
if (this.len - this.pos > 4) { // fast route (hi)
for (i = 0; i < 5; ++i) {
for (; i < 5; ++i) {
// 6th..10th

@@ -159,3 +156,3 @@ bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;

} else {
for (i = 0; i < 5; ++i) {
for (; i < 5; ++i) {
/* istanbul ignore next */

@@ -170,2 +167,3 @@ if (this.pos >= this.len)

}
/* istanbul ignore next */
throw Error("invalid varint encoding");

@@ -461,4 +459,4 @@ }

} else {
/* istanbul ignore next */
do {
/* istanbul ignore next */
if (this.pos >= this.len)

@@ -465,0 +463,0 @@ throw indexOutOfRange(this);

@@ -96,2 +96,3 @@ "use strict";

function finish(err, root) {
/* istanbul ignore next */
if (!callback)

@@ -126,9 +127,6 @@ return;

} catch (err) {
if (sync)
throw err;
finish(err);
return;
}
if (!sync && !queued)
finish(null, self);
finish(null, self); // only once anyway
}

@@ -147,3 +145,3 @@

// Skip if already loaded
// Skip if already loaded / attempted
if (self.files.indexOf(filename) > -1)

@@ -182,2 +180,3 @@ return;

--queued;
/* istanbul ignore next */
if (!callback)

@@ -188,2 +187,4 @@ return; // terminated meanwhile

finish(err);
else if (!queued)
finish(null, self);
return;

@@ -316,2 +317,3 @@ }

var index = this.deferred.indexOf(object);
/* istanbul ignore else */
if (index > -1)

@@ -318,0 +320,0 @@ this.deferred.splice(index, 1);

@@ -93,3 +93,3 @@ "use strict";

options : inherited && inherited.options || undefined,
methods : Namespace.arrayToJSON(this.methodsArray) || {},
methods : Namespace.arrayToJSON(this.methodsArray) || /* istanbul ignore next */ {},
nested : inherited && inherited.nested || undefined

@@ -178,23 +178,23 @@ };

rpcService[util.lcFirst(method.name)] = function callVirtual(request, /* optional */ callback) {
if (!rpcService.$rpc) // already ended?
return;
/* istanbul ignore next */
if (!rpcService.$rpc) {
var err4 = Error("already ended");
if (callback)
return callback(err4);
throw err4;
}
if (!request)
throw TypeError("request must not be null");
method.resolve();
var requestData = (requestDelimited ? method.resolvedRequestType.encodeDelimited(request) : method.resolvedRequestType.encode(request)).finish(); // never throws if request is true-ish
method.resolve();
var requestData;
try {
requestData = (requestDelimited ? method.resolvedRequestType.encodeDelimited(request) : method.resolvedRequestType.encode(request)).finish();
} catch (err) {
(typeof setImmediate === "function" ? setImmediate : setTimeout)(function() { callback(err); });
return;
}
// Calls the custom RPC implementation with the reflected method and binary request data
// and expects the rpc implementation to call its callback with the binary response data.
rpcImpl(method, requestData, function(err, responseData) {
return rpcImpl(method, requestData, function(err, responseData) {
if (err) {
rpcService.emit("error", err, method);
return callback ? callback(err) : undefined;
/* istanbul ignore else */
if (callback)
return callback(err);
/* istanbul ignore next */
throw err;
}

@@ -210,6 +210,14 @@ if (responseData === null) {

rpcService.emit("error", err2, method);
return callback ? callback("error", err2) : undefined;
/* istanbul ignore else */
if (callback)
return callback("error", err2);
/* istanbul ignore next */
throw err2;
}
rpcService.emit("data", response, method);
return callback ? callback(null, response) : undefined;
/* istanbul ignore else */
if (callback)
return callback(null, response);
/* istanbul ignore next */
return undefined;
});

@@ -216,0 +224,0 @@ };

@@ -8,2 +8,9 @@ "use strict";

/**
* Unescapes a string.
* @param {string} str String to unescape
* @returns {string} Unescaped string
* @property {Object.<string,string>} map Special characters map
* @ignore
*/
function unescape(str) {

@@ -15,6 +22,4 @@ return str.replace(/\\(.?)/g, function($0, $1) {

return $1;
case "0":
return "\u0000";
default:
return $1;
return unescape.map[$1] || "";
}

@@ -24,2 +29,11 @@ });

unescape.map = {
"0": "\0",
"r": "\r",
"n": "\n",
"t": "\t"
};
tokenize.unescape = unescape;
/**

@@ -40,2 +54,3 @@ * Handle object returned from {@link tokenize}.

* @returns {TokenizerHandle} Tokenizer handle
* @property {function(string):string} unescape Unescapes a string
*/

@@ -159,3 +174,3 @@ function tokenize(source) {

if (++offset === length)
return null;
throw illegal("comment");
prev = curr;

@@ -173,4 +188,4 @@ curr = charAt(offset);

if (offset === length)
return null;
// offset !== length if we got here
var end = offset;

@@ -177,0 +192,0 @@ delimRe.lastIndex = 0;

@@ -48,6 +48,5 @@ "use strict";

type.reserved = json.reserved;
if (json.fields)
Object.keys(json.fields).forEach(function(fieldName) {
type.add(Field.fromJSON(fieldName, json.fields[fieldName]));
});
Object.keys(json.fields).forEach(function(fieldName) {
type.add(Field.fromJSON(fieldName, json.fields[fieldName]));
});
if (json.oneofs)

@@ -66,2 +65,3 @@ Object.keys(json.oneofs).forEach(function(oneOfName) {

}
/* istanbul ignore next */
throw Error("invalid nested object in " + type + ": " + nestedName);

@@ -158,2 +158,3 @@ });

get: function() {
/* istanbul ignore next */
if (this._fieldsById)

@@ -272,2 +273,3 @@ return this._fieldsById;

TypePrototype.add = function add(object) {
/* istanbul ignore next */
if (this.get(object.name))

@@ -279,2 +281,3 @@ throw Error("duplicate name '" + object.name + "' in " + this);

// type instead.
/* istanbul ignore next */
if (this.fieldsById[object.id])

@@ -309,2 +312,3 @@ throw Error("duplicate id " + object.id + " in " + this);

// See Type#add for the reason why extension fields are excluded here.
/* istanbul ignore next */
if (!this.fields || this.fields[object.name] !== object)

@@ -318,2 +322,3 @@ throw Error(object + " is not a member of " + this);

if (object instanceof OneOf) {
/* istanbul ignore next */
if (!this.oneofs || this.oneofs[object.name] !== object)

@@ -320,0 +325,0 @@ throw Error(object + " is not a member of " + this);

@@ -28,3 +28,3 @@ "use strict";

util.toArray = function toArray(object) {
return object ? Object.values ? Object.values(object) : Object.keys(object).map(function(key) {
return object ? Object.keys(object).map(function(key) {
return object[key];

@@ -31,0 +31,0 @@ }) : [];

@@ -132,2 +132,3 @@ "use strict";

? function create_buffer_setup() {
/* istanbul ignore next */
if (!BufferWriter)

@@ -484,3 +485,5 @@ BufferWriter = require("./writer_buffer");

var len = value.length >>> 0;
if (typeof value === "string" && len) {
if (!len)
return this.push(writeByte, 1, 0);
if (typeof value === "string") {
var buf = Writer.alloc(len = base64.length(value));

@@ -490,5 +493,3 @@ base64.decode(value, buf, 0);

}
return len
? this.uint32(len).push(writeBytes, len, value)
: this.push(writeByte, 1, 0);
return this.uint32(len).push(writeBytes, len, value);
};

@@ -495,0 +496,0 @@

@@ -7,3 +7,3 @@ var tape = require("tape");

tape.test("classes", function(test) {
tape.test("reflected classes", function(test) {

@@ -25,3 +25,3 @@ var root = protobuf.parse(proto).root,

test.test("should construct equally using Class.create or new Class", function(test) {
test.test(test.name + " - should construct equally using Class.create or new Class", function(test) {
var proto1 = new protobuf.Class(Something),

@@ -28,0 +28,0 @@ proto2 = protobuf.Class.create(Something);

@@ -5,3 +5,3 @@ var tape = require("tape");

tape.test("common", function(test) {
tape.test("common types", function(test) {

@@ -8,0 +8,0 @@ protobuf.common("google/protobuf/foo.proto", {

@@ -5,3 +5,4 @@ var tape = require("tape");

tape.test("enums", function(test) {
tape.test("reflected enums", function(test) {
var enm = new protobuf.Enum("Test", {

@@ -8,0 +9,0 @@ a: 1,

@@ -5,3 +5,3 @@ var tape = require("tape");

tape.test("fields", function(test) {
tape.test("reflected fields", function(test) {
var root = new protobuf.Root(),

@@ -8,0 +8,0 @@ type,

@@ -9,3 +9,3 @@ var tape = require("tape");

test.test("zero", function(test) {
test.test(test.name + " - zero", function(test) {
var zero = LongBits.zero;

@@ -12,0 +12,0 @@ test.equal(zero.lo, 0, "should have low bits of 0");

@@ -13,3 +13,3 @@ var tape = require("tape");

tape.test("map fields", function(test) {
tape.test("reflected map fields", function(test) {

@@ -16,0 +16,0 @@ test.ok(protobuf.MapField.testJSON(def), "should recognize a mapfield definition as JSON");

@@ -19,3 +19,3 @@ var tape = require("tape");

tape.test("oneofs", function(test) {
tape.test("reflected oneofs", function(test) {

@@ -22,0 +22,0 @@ test.ok(protobuf.OneOf.testJSON(def), "should recognize a oneof definition as JSON");

@@ -18,3 +18,3 @@ var tape = require("tape");

test.test("a writer should write", function(test) {
test.test(test.name + " - a writer should write", function(test) {

@@ -43,3 +43,3 @@ var writer = protobuf.Writer.create();

test.test("and a reader should", function(test) {
test.test(test.name + " - and a reader should", function(test) {

@@ -46,0 +46,0 @@ var a = A.decodeDelimited(reader);

@@ -6,12 +6,3 @@ var tape = require("tape");

var def = {
methods: {
Get: {
type: undefined,
requestType: "MyRequest",
requestStream: true,
responseType: "MyResponse",
responseStream: true,
options: {}
}
},
methods: {},
nested: undefined,

@@ -21,11 +12,39 @@ options: undefined

tape.test("service", function(test) {
var methodDef = {
type: undefined,
requestType: "MyRequest",
requestStream: true,
responseType: "MyResponse",
responseStream: true,
options: {}
};
tape.test("reflected services", function(test) {
test.equal(protobuf.Service.testJSON(def), true, "should recognize services as JSON");
test.equal(protobuf.Method.testJSON(def.methods.Get), true, "should recognize methods as JSON");
test.equal(protobuf.Method.testJSON(methodDef), true, "should recognize methods as JSON");
var MyService = protobuf.Service.fromJSON("MyService", def);
test.same(MyService.toJSON(), def, "should construct from and convert back to JSON");
test.same(MyService.toJSON(), def, "should construct without methods from and convert back to JSON");
var MyMethod = protobuf.Method.fromJSON("MyMethod", methodDef);
test.same(MyMethod.toJSON(), methodDef, "should constructos methods from and convert back to JSON");
MyService.add(MyMethod);
test.ok(MyService.get("MyMethod"), "should allow adding methods");
var other = new protobuf.Enum("Other", {});
MyService.add(other);
test.ok(MyService.get("Other"), "should allow adding other nested objects");
MyService.remove(other);
test.notOk(MyService.get("Other"), "should allow removing other nested objects");
MyService.remove(MyMethod);
test.notOk(MyService.get("Other"), "should allow removing methods");
test.same(MyService.toJSON(), def, "should convert to initial JSON afterwards");
def.methods.MyMethod = methodDef;
MyService = protobuf.Service.fromJSON("MyService", def);
test.same(MyService.toJSON(), def, "should construct with methods from and convert back to JSON");
MyMethod = MyService.get("MyMethod");
test.end();
});

@@ -9,3 +9,3 @@ var tape = require("tape");

test.test("merge", function(test) {
test.test(test.name + " - merge", function(test) {
var o = {};

@@ -23,3 +23,13 @@ util.merge(o, {});

test.test(test.name + " - lcFirst", function(test) {
test.equal(util.lcFirst("ABC"), "aBC", "should convert the first character to lower case");
test.end();
});
test.test(test.name + " - ucFirst", function(test) {
test.equal(util.ucFirst("abc"), "Abc", "should convert the first character to upper case");
test.end();
});
test.end();
});

@@ -5,3 +5,3 @@ var tape = require("tape");

tape.test("fixed64 for grpc", function(test) {
tape.test("fixed64 (grpc)", function(test) {

@@ -8,0 +8,0 @@ var root = protobuf.Root.fromJSON({

@@ -9,3 +9,3 @@ var tape = require("tape");

tape.test("floats", function(test) {
tape.test("float values", function(test) {

@@ -29,3 +29,3 @@ // The following assertions were meant to validate that using float literals instead of pre-calculated

test.test("using 32 bits", function(test) {
test.test(test.name + " - using 32 bits", function(test) {
common.concat([

@@ -46,3 +46,3 @@ 3.4028234663852886e+38,

test.test("using 64 bits", function(test) {
test.test(test.name + " - using 64 bits", function(test) {
common.concat([

@@ -49,0 +49,0 @@ 1.7976931348623157e+308,

@@ -41,3 +41,3 @@ var tape = require("tape");

test.test("should encode required", (function(Test, msg) { return function(test) {
test.test(test.name + " - should encode required", (function(Test, msg) { return function(test) {
var buf = Test.encode(msg).finish();

@@ -64,3 +64,3 @@ test.equal(buf.length, 4, "a total of 4 bytes");

test.test("should encode repeated", (function(Test, msg) { return function(test) {
test.test(test.name + " - should encode repeated", (function(Test, msg) { return function(test) {
var buf = Test.encode(msg).finish();

@@ -67,0 +67,0 @@ test.equal(buf.length, 8, "a total of 8 bytes");

var tape = require("tape");
var protobuf = require("..");
tape.test("jspb test.proto", function(test) {
tape.test("jspb test proto", function(test) {
var existingRoot = new protobuf.Root();

@@ -6,0 +6,0 @@ protobuf.load("tests/data/test.proto", existingRoot, function(err, root) {

@@ -60,3 +60,3 @@ var tape = require("tape");

test.test("randomly generated", function(test) {
test.test(test.name + " - randomly generated", function(test) {

@@ -72,3 +72,3 @@ var outer = { value: randomMap() };

test.test("specifically crafted", function(test) {
test.test(test.name + " - specifically crafted", function(test) {

@@ -101,3 +101,3 @@ var outer = {

function verifyEncode(test, buf) {
test.test("should encode", function(test) {
test.test(test.name + " - should encode", function(test) {
test.equal(buf.length, 32, "a total of 30 bytes");

@@ -104,0 +104,0 @@

@@ -5,3 +5,3 @@ var tape = require("tape");

tape.test("sfixed64 for grpc", function(test) {
tape.test("sfixed64 (grpc)", function(test) {

@@ -8,0 +8,0 @@ var root = protobuf.Root.fromJSON({

@@ -46,2 +46,8 @@ /*eslint-disable block-scoped-var, no-redeclare, no-control-regex, no-prototype-builtins*/

/**
* Package versionScheme.
* @type {string}
*/
Package.prototype.versionScheme = "";
/**
* Package description.

@@ -138,3 +144,3 @@ * @type {string}

var $types = {
5: "Package.Repository"
6: "Package.Repository"
}; $lazyTypes.push($types);

@@ -164,2 +170,4 @@

writer.uint32(/* id 2, wireType 2 =*/18).string(message.version);
if (message.versionScheme !== undefined && message.hasOwnProperty("versionScheme"))
writer.uint32(/* id 19, wireType 2 =*/154).string(message.versionScheme);
if (message.description !== undefined && message.hasOwnProperty("description"))

@@ -172,3 +180,3 @@ writer.uint32(/* id 3, wireType 2 =*/26).string(message.description);

if (message.repository !== undefined && message.hasOwnProperty("repository"))
$types[5].encode(message.repository, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
$types[6].encode(message.repository, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
if (message.bugs !== undefined && message.hasOwnProperty("bugs"))

@@ -235,2 +243,5 @@ writer.uint32(/* id 7, wireType 2 =*/58).string(message.bugs);

break;
case 19:
message.versionScheme = reader.string();
break;
case 3:

@@ -246,3 +257,3 @@ message.description = reader.string();

case 6:
message.repository = $types[5].decode(reader, reader.uint32());
message.repository = $types[6].decode(reader, reader.uint32());
break;

@@ -342,2 +353,5 @@ case 7:

return "version: string expected";
if (message.versionScheme !== undefined)
if (!$util.isString(message.versionScheme))
return "versionScheme: string expected";
if (message.description !== undefined)

@@ -353,3 +367,3 @@ if (!$util.isString(message.description))

if (message.repository !== undefined && message.repository !== null) {
var error = $types[5].verify(message.repository);
var error = $types[6].verify(message.repository);
if (error)

@@ -438,2 +452,4 @@ return "repository." + error;

message.version = String(object.version);
if (object.versionScheme !== undefined && object.versionScheme !== null)
message.versionScheme = String(object.versionScheme);
if (object.description !== undefined && object.description !== null)

@@ -446,3 +462,3 @@ message.description = String(object.description);

if (object.repository !== undefined && object.repository !== null)
message.repository = $types[5].fromObject(object.repository);
message.repository = $types[6].fromObject(object.repository);
if (object.bugs !== undefined && object.bugs !== null)

@@ -526,2 +542,3 @@ message.bugs = String(object.bugs);

object.version = "";
object.versionScheme = "";
object.description = "";

@@ -540,2 +557,4 @@ object.author = "";

object.version = message.version;
if (message.versionScheme !== undefined && message.versionScheme !== null && message.hasOwnProperty("versionScheme"))
object.versionScheme = message.versionScheme;
if (message.description !== undefined && message.description !== null && message.hasOwnProperty("description"))

@@ -548,3 +567,3 @@ object.description = message.description;

if (message.repository !== undefined && message.repository !== null && message.hasOwnProperty("repository"))
object.repository = $types[5].toObject(message.repository, options);
object.repository = $types[6].toObject(message.repository, options);
if (message.bugs !== undefined && message.bugs !== null && message.hasOwnProperty("bugs"))

@@ -551,0 +570,0 @@ object.bugs = message.bugs;

@@ -5,3 +5,3 @@ var tape = require("tape");

tape.test("comments", function(test) {
tape.test("proto comments", function(test) {
protobuf.load("tests/data/comments.proto", function(err, root) {

@@ -8,0 +8,0 @@ if (err)

@@ -5,3 +5,3 @@ var tape = require("tape");

tape.test("base64", function(test) {
tape.test("base64 micromodule", function(test) {

@@ -8,0 +8,0 @@ var strings = {

@@ -9,3 +9,3 @@ var tape = require("tape");

tape.test("utf8", function(test) {
tape.test("utf8 micromodule", function(test) {

@@ -21,3 +21,3 @@ if (protobuf.util.isNode) {

test.test("write", function(test) {
test.test(test.name + " - write", function(test) {

@@ -41,3 +41,3 @@ len = utf8.length(data);

test.test("read", function(test) {
test.test(test.name + " - read", function(test) {

@@ -44,0 +44,0 @@ var comp = utf8.read(buf, 0, buf.length);

@@ -14,3 +14,25 @@ var tape = require("tape");

var isNode = protobuf.util.isNode;
try {
protobuf.util.isNode = false;
test.throws(function() {
protobuf.loadSync("tests/data/common.proto");
}, "should throw when not running under node");
} finally {
protobuf.util.isNode = isNode;
}
test.throws(function() {
protobuf.loadSync("tests/data/invalid.proto");
}, Error, "should throw when trying to load an invalid proto");
test.throws(function() {
protobuf.loadSync("tests/data/invalid.json");
}, Error, "should throw when trying to load invalid json");
root = protobuf.loadSync("tests/data/weak.proto");
test.ok(root.files.indexOf("tests/data/NOT_FOUND") > -1, "should ignore missing weak protos and remember them");
test.ok(root.files.indexOf("google/protobuf/any.proto") > -1, "should still load other protos when ignoring weak protos");
test.end();
});

@@ -24,3 +24,3 @@ var tape = require("tape");

test.test("instances", function(test) {
test.test(test.name + " - instances", function(test) {

@@ -44,3 +44,3 @@ test.ok(any instanceof protobuf.Message, "should extend Message");

test.test("should encode", function(test) {
test.test(test.name + " - should encode", function(test) {

@@ -55,3 +55,3 @@ writer = Any.encode(any);

test.test("should decode", function(test) {
test.test(test.name + " - should decode", function(test) {

@@ -65,3 +65,3 @@ var msg = Any.decode(buf);

test.test("should encodeDelimited", function(test) {
test.test(test.name + " - should encodeDelimited", function(test) {

@@ -81,3 +81,3 @@ writer = Any.encodeDelimited(any);

test.test("should decodeDelimited", function(test) {
test.test(test.name + " - should decodeDelimited", function(test) {

@@ -84,0 +84,0 @@ var msg = Any.decodeDelimited(buf);

@@ -27,3 +27,3 @@ var tape = require("tape");

test.test("instances", function(test) {
test.test(test.name + " - instances", function(test) {

@@ -39,3 +39,3 @@ test.ok(any instanceof protobuf.Message, "should extend Message");

test.test("should encode", function(test) {
test.test(test.name + " - should encode", function(test) {

@@ -53,3 +53,3 @@ buf = Any.encode(any).finish();

test.test("should decode", function(test) {
test.test(test.name + " - should decode", function(test) {

@@ -63,3 +63,3 @@ msg = Any.decode(buf);

test.test("should encodeDelimited", function(test) {
test.test(test.name + " - should encodeDelimited", function(test) {

@@ -78,3 +78,3 @@ buf = Any.encodeDelimited(any).finish();

test.test("should decodeDelimited", function(test) {
test.test(test.name + " - should decodeDelimited", function(test) {

@@ -81,0 +81,0 @@ msg = Any.decodeDelimited(buf);

@@ -15,3 +15,3 @@ var tape = require("tape");

test.test("runtime message", function(test) {
test.test(test.name + " - runtime message", function(test) {

@@ -24,3 +24,3 @@ test.ok(myPackage instanceof Package, "should extend Package");

test.test("decoded message", function(test) {
test.test(test.name + " - decoded message", function(test) {

@@ -27,0 +27,0 @@ var decoded = Package.decode(Package.encode(myPackage).finish());

@@ -6,6 +6,4 @@ var tape = require("tape");

process.stdout._handle.setBlocking(true);
tape.test("package.json (reflected)", function(test) {
tape.test("package.json", function(test) {
protobuf.load("tests/data/package.proto", function(err, root) {

@@ -20,3 +18,3 @@ if (err)

test.test("runtime message", function(test) {
test.test(test.name + " - runtime message", function(test) {

@@ -30,3 +28,3 @@ test.ok(myPackage instanceof protobuf.Message, "should extend Message");

test.test("decoded message", function(test) {
test.test(test.name + " - decoded message", function(test) {

@@ -33,0 +31,0 @@ var writer = Package.encode(myPackage);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc