Comparing version 2.0.8 to 2.0.9
@@ -51,3 +51,3 @@ /// <reference types="node" /> | ||
constructor(url: string, callback?: ((req: any, res?: any, err?: any) => void) | undefined); | ||
reset(): void; | ||
reset(url?: string): void; | ||
rpcUnaryUnary(service: string, method: string, requestSerializer: ISerializer, responseDeserializeBinary: IDeserializer, request: any): Promise<any>; | ||
@@ -54,0 +54,0 @@ rpcUnaryStream(service: string, method: string, requestSerializer: ISerializer, responseDeserializeBinary: IDeserializer, request: any): Promise<Stream<any>>; |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.wsgrpc=e():t.wsgrpc=e()}(global,(function(){return(()=>{"use strict";var __webpack_modules__={537:t=>{t.exports=function(t,e){for(var r=new Array(arguments.length-1),n=0,s=2,i=!0;s<arguments.length;)r[n++]=arguments[s++];return new Promise((function(s,o){r[n]=function(t){if(i)if(i=!1,t)o(t);else{for(var e=new Array(arguments.length-1),r=0;r<e.length;)e[r++]=arguments[r];s.apply(null,e)}};try{t.apply(e||null,r)}catch(t){i&&(i=!1,o(t))}}))}},419:(t,e)=>{var r=e;r.length=function(t){var e=t.length;if(!e)return 0;for(var r=0;--e%4>1&&"="===t.charAt(e);)++r;return Math.ceil(3*t.length)/4-r};for(var n=new Array(64),s=new Array(123),i=0;i<64;)s[n[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;r.encode=function(t,e,r){for(var s,i=null,o=[],a=0,l=0;e<r;){var u=t[e++];switch(l){case 0:o[a++]=n[u>>2],s=(3&u)<<4,l=1;break;case 1:o[a++]=n[s|u>>4],s=(15&u)<<2,l=2;break;case 2:o[a++]=n[s|u>>6],o[a++]=n[63&u],l=0}a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),a=0)}return l&&(o[a++]=n[s],o[a++]=61,1===l&&(o[a++]=61)),i?(a&&i.push(String.fromCharCode.apply(String,o.slice(0,a))),i.join("")):String.fromCharCode.apply(String,o.slice(0,a))};var o="invalid encoding";r.decode=function(t,e,r){for(var n,i=r,a=0,l=0;l<t.length;){var u=t.charCodeAt(l++);if(61===u&&a>1)break;if(void 0===(u=s[u]))throw Error(o);switch(a){case 0:n=u,a=1;break;case 1:e[r++]=n<<2|(48&u)>>4,n=u,a=2;break;case 2:e[r++]=(15&n)<<4|(60&u)>>2,n=u,a=3;break;case 3:e[r++]=(3&n)<<6|u,a=0}}if(1===a)throw Error(o);return r-i},r.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},211:t=>{function e(){this._listeners={}}t.exports=e,e.prototype.on=function(t,e,r){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:e,ctx:r||this}),this},e.prototype.off=function(t,e){if(void 0===t)this._listeners={};else if(void 0===e)this._listeners[t]=[];else for(var r=this._listeners[t],n=0;n<r.length;)r[n].fn===e?r.splice(n,1):++n;return this},e.prototype.emit=function(t){var e=this._listeners[t];if(e){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<e.length;)e[n].fn.apply(e[n++].ctx,r)}return this}},945:t=>{function e(t){return"undefined"!=typeof Float32Array?function(){var e=new Float32Array([-0]),r=new Uint8Array(e.buffer),n=128===r[3];function s(t,n,s){e[0]=t,n[s]=r[0],n[s+1]=r[1],n[s+2]=r[2],n[s+3]=r[3]}function i(t,n,s){e[0]=t,n[s]=r[3],n[s+1]=r[2],n[s+2]=r[1],n[s+3]=r[0]}function o(t,n){return r[0]=t[n],r[1]=t[n+1],r[2]=t[n+2],r[3]=t[n+3],e[0]}function a(t,n){return r[3]=t[n],r[2]=t[n+1],r[1]=t[n+2],r[0]=t[n+3],e[0]}t.writeFloatLE=n?s:i,t.writeFloatBE=n?i:s,t.readFloatLE=n?o:a,t.readFloatBE=n?a:o}():function(){function e(t,e,r,n){var s=e<0?1:0;if(s&&(e=-e),0===e)t(1/e>0?0:2147483648,r,n);else if(isNaN(e))t(2143289344,r,n);else if(e>34028234663852886e22)t((s<<31|2139095040)>>>0,r,n);else if(e<11754943508222875e-54)t((s<<31|Math.round(e/1401298464324817e-60))>>>0,r,n);else{var i=Math.floor(Math.log(e)/Math.LN2);t((s<<31|i+127<<23|8388607&Math.round(e*Math.pow(2,-i)*8388608))>>>0,r,n)}}function o(t,e,r){var n=t(e,r),s=2*(n>>31)+1,i=n>>>23&255,o=8388607&n;return 255===i?o?NaN:s*(1/0):0===i?1401298464324817e-60*s*o:s*Math.pow(2,i-150)*(o+8388608)}t.writeFloatLE=e.bind(null,r),t.writeFloatBE=e.bind(null,n),t.readFloatLE=o.bind(null,s),t.readFloatBE=o.bind(null,i)}(),"undefined"!=typeof Float64Array?function(){var e=new Float64Array([-0]),r=new Uint8Array(e.buffer),n=128===r[7];function s(t,n,s){e[0]=t,n[s]=r[0],n[s+1]=r[1],n[s+2]=r[2],n[s+3]=r[3],n[s+4]=r[4],n[s+5]=r[5],n[s+6]=r[6],n[s+7]=r[7]}function i(t,n,s){e[0]=t,n[s]=r[7],n[s+1]=r[6],n[s+2]=r[5],n[s+3]=r[4],n[s+4]=r[3],n[s+5]=r[2],n[s+6]=r[1],n[s+7]=r[0]}function o(t,n){return r[0]=t[n],r[1]=t[n+1],r[2]=t[n+2],r[3]=t[n+3],r[4]=t[n+4],r[5]=t[n+5],r[6]=t[n+6],r[7]=t[n+7],e[0]}function a(t,n){return r[7]=t[n],r[6]=t[n+1],r[5]=t[n+2],r[4]=t[n+3],r[3]=t[n+4],r[2]=t[n+5],r[1]=t[n+6],r[0]=t[n+7],e[0]}t.writeDoubleLE=n?s:i,t.writeDoubleBE=n?i:s,t.readDoubleLE=n?o:a,t.readDoubleBE=n?a:o}():function(){function e(t,e,r,n,s,i){var o=n<0?1:0;if(o&&(n=-n),0===n)t(0,s,i+e),t(1/n>0?0:2147483648,s,i+r);else if(isNaN(n))t(0,s,i+e),t(2146959360,s,i+r);else if(n>17976931348623157e292)t(0,s,i+e),t((o<<31|2146435072)>>>0,s,i+r);else{var a;if(n<22250738585072014e-324)t((a=n/5e-324)>>>0,s,i+e),t((o<<31|a/4294967296)>>>0,s,i+r);else{var l=Math.floor(Math.log(n)/Math.LN2);1024===l&&(l=1023),t(4503599627370496*(a=n*Math.pow(2,-l))>>>0,s,i+e),t((o<<31|l+1023<<20|1048576*a&1048575)>>>0,s,i+r)}}}function o(t,e,r,n,s){var i=t(n,s+e),o=t(n,s+r),a=2*(o>>31)+1,l=o>>>20&2047,u=4294967296*(1048575&o)+i;return 2047===l?u?NaN:a*(1/0):0===l?5e-324*a*u:a*Math.pow(2,l-1075)*(u+4503599627370496)}t.writeDoubleLE=e.bind(null,r,0,4),t.writeDoubleBE=e.bind(null,n,4,0),t.readDoubleLE=o.bind(null,s,0,4),t.readDoubleBE=o.bind(null,i,4,0)}(),t}function r(t,e,r){e[r]=255&t,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24}function n(t,e,r){e[r]=t>>>24,e[r+1]=t>>>16&255,e[r+2]=t>>>8&255,e[r+3]=255&t}function s(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function i(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}t.exports=e(e)},199:module=>{function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(t){}return null}module.exports=inquire},662:t=>{t.exports=function(t,e,r){var n=r||8192,s=n>>>1,i=null,o=n;return function(r){if(r<1||r>s)return t(r);o+r>n&&(i=t(n),o=0);var a=e.call(i,o,o+=r);return 7&o&&(o=1+(7|o)),a}}},997:(t,e)=>{var r=e;r.length=function(t){for(var e=0,r=0,n=0;n<t.length;++n)(r=t.charCodeAt(n))<128?e+=1:r<2048?e+=2:55296==(64512&r)&&56320==(64512&t.charCodeAt(n+1))?(++n,e+=4):e+=3;return e},r.read=function(t,e,r){if(r-e<1)return"";for(var n,s=null,i=[],o=0;e<r;)(n=t[e++])<128?i[o++]=n:n>191&&n<224?i[o++]=(31&n)<<6|63&t[e++]:n>239&&n<365?(n=((7&n)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,i[o++]=55296+(n>>10),i[o++]=56320+(1023&n)):i[o++]=(15&n)<<12|(63&t[e++])<<6|63&t[e++],o>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,i)),o=0);return s?(o&&s.push(String.fromCharCode.apply(String,i.slice(0,o))),s.join("")):String.fromCharCode.apply(String,i.slice(0,o))},r.write=function(t,e,r){for(var n,s,i=r,o=0;o<t.length;++o)(n=t.charCodeAt(o))<128?e[r++]=n:n<2048?(e[r++]=n>>6|192,e[r++]=63&n|128):55296==(64512&n)&&56320==(64512&(s=t.charCodeAt(o+1)))?(n=65536+((1023&n)<<10)+(1023&s),++o,e[r++]=n>>18|240,e[r++]=n>>12&63|128,e[r++]=n>>6&63|128,e[r++]=63&n|128):(e[r++]=n>>12|224,e[r++]=n>>6&63|128,e[r++]=63&n|128);return r-i}},100:(t,e,r)=>{t.exports=r(482)},482:(t,e,r)=>{var n=e;function s(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}n.build="minimal",n.Writer=r(173),n.BufferWriter=r(155),n.Reader=r(408),n.BufferReader=r(593),n.util=r(693),n.rpc=r(994),n.roots=r(54),n.configure=s,s()},408:(t,e,r)=>{t.exports=l;var n,s=r(693),i=s.LongBits,o=s.utf8;function a(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function l(t){this.buf=t,this.pos=0,this.len=t.length}var u,c="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new l(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new l(t);throw Error("illegal buffer")},h=function(){return s.Buffer?function(t){return(l.create=function(t){return s.Buffer.isBuffer(t)?new n(t):c(t)})(t)}:c};function f(){var t=new i(0,0),e=0;if(!(this.len-this.pos>4)){for(;e<3;++e){if(this.pos>=this.len)throw a(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*e)>>>0,t}for(;e<4;++e)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>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(e=0,this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw a(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function d(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw a(this,8);return new i(d(this.buf,this.pos+=4),d(this.buf,this.pos+=4))}l.create=h(),l.prototype._slice=s.Array.prototype.subarray||s.Array.prototype.slice,l.prototype.uint32=(u=4294967295,function(){if(u=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return u;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return u}),l.prototype.int32=function(){return 0|this.uint32()},l.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},l.prototype.bool=function(){return 0!==this.uint32()},l.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return d(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|d(this.buf,this.pos+=4)},l.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var t=s.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},l.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var t=s.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},l.prototype.bytes=function(){var t=this.uint32(),e=this.pos,r=this.pos+t;if(r>this.len)throw a(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(e,r):e===r?new this.buf.constructor(0):this._slice.call(this.buf,e,r)},l.prototype.string=function(){var t=this.bytes();return o.read(t,0,t.length)},l.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw a(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},l.prototype.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(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},l._configure=function(t){n=t,l.create=h(),n._configure();var e=s.Long?"toLong":"toNumber";s.merge(l.prototype,{int64:function(){return f.call(this)[e](!1)},uint64:function(){return f.call(this)[e](!0)},sint64:function(){return f.call(this).zzDecode()[e](!1)},fixed64:function(){return p.call(this)[e](!0)},sfixed64:function(){return p.call(this)[e](!1)}})}},593:(t,e,r)=>{t.exports=i;var n=r(408);(i.prototype=Object.create(n.prototype)).constructor=i;var s=r(693);function i(t){n.call(this,t)}i._configure=function(){s.Buffer&&(i.prototype._slice=s.Buffer.prototype.slice)},i.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},i._configure()},54:t=>{t.exports={}},994:(t,e,r)=>{e.Service=r(948)},948:(t,e,r)=>{t.exports=s;var n=r(693);function s(t,e,r){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=Boolean(e),this.responseDelimited=Boolean(r)}(s.prototype=Object.create(n.EventEmitter.prototype)).constructor=s,s.prototype.rpcCall=function t(e,r,s,i,o){if(!i)throw TypeError("request must be specified");var a=this;if(!o)return n.asPromise(t,a,e,r,s,i);if(a.rpcImpl)try{return a.rpcImpl(e,r[a.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(t,r){if(t)return a.emit("error",t,e),o(t);if(null!==r){if(!(r instanceof s))try{r=s[a.responseDelimited?"decodeDelimited":"decode"](r)}catch(t){return a.emit("error",t,e),o(t)}return a.emit("data",r,e),o(null,r)}a.end(!0)}))}catch(t){return a.emit("error",t,e),void setTimeout((function(){o(t)}),0)}else setTimeout((function(){o(Error("already ended"))}),0)},s.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},630:(t,e,r)=>{t.exports=s;var n=r(693);function s(t,e){this.lo=t>>>0,this.hi=e>>>0}var i=s.zero=new s(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var o=s.zeroHash="\0\0\0\0\0\0\0\0";s.fromNumber=function(t){if(0===t)return i;var e=t<0;e&&(t=-t);var r=t>>>0,n=(t-r)/4294967296>>>0;return e&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new s(r,n)},s.from=function(t){if("number"==typeof t)return s.fromNumber(t);if(n.isString(t)){if(!n.Long)return s.fromNumber(parseInt(t,10));t=n.Long.fromString(t)}return t.low||t.high?new s(t.low>>>0,t.high>>>0):i},s.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=1+~this.lo>>>0,r=~this.hi>>>0;return e||(r=r+1>>>0),-(e+4294967296*r)}return this.lo+4294967296*this.hi},s.prototype.toLong=function(t){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var a=String.prototype.charCodeAt;s.fromHash=function(t){return t===o?i:new s((a.call(t,0)|a.call(t,1)<<8|a.call(t,2)<<16|a.call(t,3)<<24)>>>0,(a.call(t,4)|a.call(t,5)<<8|a.call(t,6)<<16|a.call(t,7)<<24)>>>0)},s.prototype.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)},s.prototype.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},s.prototype.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},s.prototype.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:r<128?9:10}},693:function(t,e,r){var n=e;function s(t,e,r){for(var n=Object.keys(e),s=0;s<n.length;++s)void 0!==t[n[s]]&&r||(t[n[s]]=e[n[s]]);return t}function i(t){function e(t,r){if(!(this instanceof e))return new e(t,r);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),r&&s(this,r)}return(e.prototype=Object.create(Error.prototype)).constructor=e,Object.defineProperty(e.prototype,"name",{get:function(){return t}}),e.prototype.toString=function(){return this.name+": "+this.message},e}n.asPromise=r(537),n.base64=r(419),n.EventEmitter=r(211),n.float=r(945),n.inquire=r(199),n.utf8=r(997),n.pool=r(662),n.LongBits=r(630),n.isNode=Boolean("undefined"!=typeof global&&global&&global.process&&global.process.versions&&global.process.versions.node),n.global=n.isNode&&global||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},n.isString=function(t){return"string"==typeof t||t instanceof String},n.isObject=function(t){return t&&"object"==typeof t},n.isset=n.isSet=function(t,e){var r=t[e];return!(null==r||!t.hasOwnProperty(e))&&("object"!=typeof r||(Array.isArray(r)?r.length:Object.keys(r).length)>0)},n.Buffer=function(){try{var t=n.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(t){return"number"==typeof t?n.Buffer?n._Buffer_allocUnsafe(t):new n.Array(t):n.Buffer?n._Buffer_from(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},n.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(t){return t?n.LongBits.from(t).toHash():n.LongBits.zeroHash},n.longFromHash=function(t,e){var r=n.LongBits.fromHash(t);return n.Long?n.Long.fromBits(r.lo,r.hi,e):r.toNumber(Boolean(e))},n.merge=s,n.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},n.newError=i,n.ProtocolError=i("ProtocolError"),n.oneOfGetter=function(t){for(var e={},r=0;r<t.length;++r)e[t[r]]=1;return function(){for(var t=Object.keys(this),r=t.length-1;r>-1;--r)if(1===e[t[r]]&&void 0!==this[t[r]]&&null!==this[t[r]])return t[r]}},n.oneOfSetter=function(t){return function(e){for(var r=0;r<t.length;++r)t[r]!==e&&delete this[t[r]]}},n.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},n._configure=function(){var t=n.Buffer;t?(n._Buffer_from=t.from!==Uint8Array.from&&t.from||function(e,r){return new t(e,r)},n._Buffer_allocUnsafe=t.allocUnsafe||function(e){return new t(e)}):n._Buffer_from=n._Buffer_allocUnsafe=null}},173:(t,e,r)=>{t.exports=h;var n,s=r(693),i=s.LongBits,o=s.base64,a=s.utf8;function l(t,e,r){this.fn=t,this.len=e,this.next=void 0,this.val=r}function u(){}function c(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function h(){this.len=0,this.head=new l(u,0,0),this.tail=this.head,this.states=null}var f=function(){return s.Buffer?function(){return(h.create=function(){return new n})()}:function(){return new h}};function d(t,e,r){e[r]=255&t}function p(t,e){this.len=t,this.next=void 0,this.val=e}function y(t,e,r){for(;t.hi;)e[r++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[r++]=127&t.lo|128,t.lo=t.lo>>>7;e[r++]=t.lo}function g(t,e,r){e[r]=255&t,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24}h.create=f(),h.alloc=function(t){return new s.Array(t)},s.Array!==Array&&(h.alloc=s.pool(h.alloc,s.Array.prototype.subarray)),h.prototype._push=function(t,e,r){return this.tail=this.tail.next=new l(t,e,r),this.len+=e,this},p.prototype=Object.create(l.prototype),p.prototype.fn=function(t,e,r){for(;t>127;)e[r++]=127&t|128,t>>>=7;e[r]=t},h.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new p((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},h.prototype.int32=function(t){return t<0?this._push(y,10,i.fromNumber(t)):this.uint32(t)},h.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},h.prototype.uint64=function(t){var e=i.from(t);return this._push(y,e.length(),e)},h.prototype.int64=h.prototype.uint64,h.prototype.sint64=function(t){var e=i.from(t).zzEncode();return this._push(y,e.length(),e)},h.prototype.bool=function(t){return this._push(d,1,t?1:0)},h.prototype.fixed32=function(t){return this._push(g,4,t>>>0)},h.prototype.sfixed32=h.prototype.fixed32,h.prototype.fixed64=function(t){var e=i.from(t);return this._push(g,4,e.lo)._push(g,4,e.hi)},h.prototype.sfixed64=h.prototype.fixed64,h.prototype.float=function(t){return this._push(s.float.writeFloatLE,4,t)},h.prototype.double=function(t){return this._push(s.float.writeDoubleLE,8,t)};var m=s.Array.prototype.set?function(t,e,r){e.set(t,r)}:function(t,e,r){for(var n=0;n<t.length;++n)e[r+n]=t[n]};h.prototype.bytes=function(t){var e=t.length>>>0;if(!e)return this._push(d,1,0);if(s.isString(t)){var r=h.alloc(e=o.length(t));o.decode(t,r,0),t=r}return this.uint32(e)._push(m,e,t)},h.prototype.string=function(t){var e=a.length(t);return e?this.uint32(e)._push(a.write,e,t):this._push(d,1,0)},h.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new l(u,0,0),this.len=0,this},h.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new l(u,0,0),this.len=0),this},h.prototype.ldelim=function(){var t=this.head,e=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=t.next,this.tail=e,this.len+=r),this},h.prototype.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),r=0;t;)t.fn(t.val,e,r),r+=t.len,t=t.next;return e},h._configure=function(t){n=t,h.create=f(),n._configure()}},155:(t,e,r)=>{t.exports=i;var n=r(173);(i.prototype=Object.create(n.prototype)).constructor=i;var s=r(693);function i(){n.call(this)}function o(t,e,r){t.length<40?s.utf8.write(t,e,r):e.utf8Write?e.utf8Write(t,r):e.write(t,r)}i._configure=function(){i.alloc=s._Buffer_allocUnsafe,i.writeBytesBuffer=s.Buffer&&s.Buffer.prototype instanceof Uint8Array&&"set"===s.Buffer.prototype.set.name?function(t,e,r){e.set(t,r)}:function(t,e,r){if(t.copy)t.copy(e,r,0,t.length);else for(var n=0;n<t.length;)e[r++]=t[n++]}},i.prototype.bytes=function(t){s.isString(t)&&(t=s._Buffer_from(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this._push(i.writeBytesBuffer,e,t),this},i.prototype.string=function(t){var e=s.Buffer.byteLength(t);return this.uint32(e),e&&this._push(o,e,t),this},i._configure()},110:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Channel=void 0;const n=r(87),s=r(795);e.Channel=class{constructor(t,e){if(this.callback=e,t.startsWith("http:")||t.startsWith("https:"))this.agent=new i(t);else{if(!t.startsWith("ws:")&&!t.startsWith("wss:"))throw new Error("channel url not supported: "+t);this.agent=new o(t)}}reset(){this.agent.reset()}async rpcUnaryUnary(t,e,r,n,s){return(await this.agent.getConnection()).rpcUnaryUnary(t,e,r,n,s).then((t=>(this.callback&&this.callback(s,t),t)),(t=>{throw this.callback&&this.callback(s,null,t),t}))}async rpcUnaryStream(t,e,r,n,s){return(await this.agent.getConnection()).rpcUnaryStream(t,e,r,n,s)}async rpcStreamStream(t,e,r,n,s){return(await this.agent.getConnection()).rpcStreamStream(t,e,r,n,s)}async rpcStreamUnary(t,e,r,n,s){return(await this.agent.getConnection()).rpcStreamUnary(t,e,r,n,s).then((t=>(this.callback&&this.callback(s,t),t)),(t=>{throw this.callback&&this.callback(s,null,t),t}))}};class i{constructor(t){this.url=t+(t.endsWith("/")?"":"/")}getConnection(){return this}reset(){}async rpcUnaryUnary(t,e,r,n,s){const i=this.url+t+"/"+e,o=await fetch(i,{method:"post",body:JSON.stringify(s),headers:{"Content-Type":"application/json"}});return await o.json()}rpcUnaryStream(t,e,r,n,s){throw new Error("method not supported")}rpcStreamStream(t,e,r,n,s){throw new Error("method not supported")}rpcStreamUnary(t,e,r,n,s){throw new Error("method not supported")}}class o{constructor(t){this.url=t,this.connectionFuture=null}async getConnection(){var t;if((null===(t=this.connectionFuture)||void 0===t?void 0:t.resolved)&&(this.connectionFuture.result?1!=this.connectionFuture.result.ws.readyState&&(this.connectionFuture=null):this.connectionFuture=null),!this.connectionFuture){const t=new n.Future,e=new WebSocket(this.url);e.binaryType="arraybuffer",e.onopen=()=>{t.resolve(new a(e))},e.onclose=e=>{t.reject(e)},this.connectionFuture=t}return await this.connectionFuture.promise}reset(){var t;(null===(t=this.connectionFuture)||void 0===t?void 0:t.result)&&1==this.connectionFuture.result.ws.readyState&&this.connectionFuture.result.ws.close(),this.connectionFuture=null}}class a{constructor(t){this.ws=t,this._nextCallID=1,this._calls=new Map,t.onmessage=t=>{let e=s.data.DataFrame.decode(new Uint8Array(t.data)),r=this._calls.get(e.callID);r&&r(e)},t.onclose=()=>{t.onopen=null,t.onmessage=null,t.onerror=null,t.onclose=null,this._calls.forEach((t=>t(null))),this._calls.clear()}}registerCall(t){const e=this._nextCallID;return this._calls.set(e,t),this._nextCallID+=2,e}sendMessage(t){if(1!=this.ws.readyState)return;const e=s.data.DataFrame.encode(t);"undefined"!=typeof window&&window.wx?this.ws.send(e.buffer.slice(e.byteOffset,e.byteOffset+e.length)):this.ws.send(e)}rpcUnaryUnary(t,e,r,i,o){const a=new n.Future,l=this.registerCall((t=>{if(t)if(this._calls.delete(l),t.body){const e=i(t.body);a.resolve(e)}else t.trailer&&t.trailer.status==s.data.DataFrame.Trailer.Status.ERROR&&a.reject(new Error(t.trailer.message));else a.reject(new Error("lost connection"))})),u=r(o);return this.sendMessage({callID:l,header:{service:t,method:e},body:u}),a.promise}rpcUnaryStream(t,e,r,i,o){const a=new n.Stream((t=>{this.sendMessage({callID:l,trailer:{status:s.data.DataFrame.Trailer.Status.ABORT,message:null==t?void 0:t.toString()}})})),l=this.registerCall((t=>{if(t){if(t.body){const e=i(t.body);a.write(e)}t.trailer&&(this._calls.delete(l),t.trailer.status==s.data.DataFrame.Trailer.Status.OK?a.end():t.trailer.status==s.data.DataFrame.Trailer.Status.ERROR&&a.error(new Error(t.trailer.message)))}else a.error(new Error("lost connection"))})),u=r(o);return this.sendMessage({callID:l,header:{service:t,method:e},body:u}),a}rpcStreamStream(t,e,r,i,o){const a=new n.Stream((t=>{this.sendMessage({callID:u,trailer:{status:s.data.DataFrame.Trailer.Status.ABORT,message:null==t?void 0:t.toString()}})})),l=()=>{a.closed&&o.closed&&this._calls.delete(u)},u=this.registerCall((t=>{if(!t)return a.error(new Error("lost connection")),void o.abort(new Error("lost connection"));if(t.body){const e=i(t.body);a.write(e)}t.trailer&&(t.trailer.status==s.data.DataFrame.Trailer.Status.OK?a.end():t.trailer.status==s.data.DataFrame.Trailer.Status.ABORT?o.abort(new Error(t.trailer.message)):t.trailer.status==s.data.DataFrame.Trailer.Status.ERROR&&a.error(new Error(t.trailer.message)),l())}));return this.sendMessage({callID:u,header:{service:t,method:e}}),o.read((t=>{const e=r(t);this.sendMessage({callID:u,body:e})})).then((()=>{this.sendMessage({callID:u,trailer:{status:s.data.DataFrame.Trailer.Status.OK}})})).catch((t=>{this.sendMessage({callID:u,trailer:{status:s.data.DataFrame.Trailer.Status.ERROR,message:t.toString()}})})).finally(l),a}rpcStreamUnary(t,e,r,i,o){const a=new n.Future,l=()=>{a.resolved&&o.closed&&this._calls.delete(u)},u=this.registerCall((t=>{if(!t)return a.reject(new Error("lost connection")),void o.abort(new Error("lost connection"));if(t.body){const e=i(t.body);a.resolve(e)}t.trailer&&(t.trailer.status==s.data.DataFrame.Trailer.Status.ABORT?o.abort(new Error(t.trailer.message)):t.trailer.status==s.data.DataFrame.Trailer.Status.ERROR&&a.reject(new Error(t.trailer.message))),l()}));return this.sendMessage({callID:u,header:{service:t,method:e}}),o.read((t=>{const e=r(t);this.sendMessage({callID:u,body:e})})).then((()=>{this.sendMessage({callID:u,trailer:{status:s.data.DataFrame.Trailer.Status.OK}})})).catch((t=>{this.sendMessage({callID:u,trailer:{status:s.data.DataFrame.Trailer.Status.ERROR,message:t.toString()}})})).finally(l),a.promise}}},795:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.data=void 0;const n=r(100);!function(t){let e;!function(t){let e,r;!function(t){t.encode=function(t,e){const r=!e;return e||(e=n.Writer.create()),null!=t.service&&null!=t.service&&e.uint32(10).string(t.service),null!=t.method&&null!=t.method&&e.uint32(18).string(t.method),r?e.finish():e},t.decode=function(t,e){t instanceof n.Reader||(t=n.Reader.create(t));let r=void 0===e?t.len:t.pos+e;const s={};for(;t.pos<r;){let e=t.uint32();switch(e>>>3){case 1:s.service=t.string();break;case 2:s.method=t.string();break;default:t.skipType(7&e)}}return s}}(e=t.Header||(t.Header={})),function(t){t.Status={UNKNOWN:0,OK:1,ERROR:2,ABORT:3},t.encode=function(t,e){const r=!e;return e||(e=n.Writer.create()),null!=t.status&&null!=t.status&&e.uint32(8).int32(t.status),null!=t.message&&null!=t.message&&e.uint32(18).string(t.message),r?e.finish():e},t.decode=function(t,e){t instanceof n.Reader||(t=n.Reader.create(t));let r=void 0===e?t.len:t.pos+e;const s={};for(;t.pos<r;){let e=t.uint32();switch(e>>>3){case 1:s.status=t.int32();break;case 2:s.message=t.string();break;default:t.skipType(7&e)}}return s}}(r=t.Trailer||(t.Trailer={})),t.encode=function(t,s){const i=!s;return s||(s=n.Writer.create()),null!=t.callID&&null!=t.callID&&s.uint32(8).int32(t.callID),null!=t.header&&null!=t.header&&e.encode(t.header,s.uint32(18).fork()).ldelim(),null!=t.trailer&&null!=t.trailer&&r.encode(t.trailer,s.uint32(26).fork()).ldelim(),null!=t.body&&null!=t.body&&s.uint32(34).bytes(t.body),i?s.finish():s},t.decode=function(t,s){t instanceof n.Reader||(t=n.Reader.create(t));let i=void 0===s?t.len:t.pos+s;const o={};for(;t.pos<i;){let n=t.uint32();switch(n>>>3){case 1:o.callID=t.int32();break;case 2:o.header=e.decode(t,t.uint32());break;case 3:o.trailer=r.decode(t,t.uint32());break;case 4:o.body=t.bytes();break;default:t.skipType(7&n)}}return o}}(e=t.DataFrame||(t.DataFrame={}))}(e.data||(e.data={}))},728:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Server=void 0;const n=r(87),s=r(795);e.Server=class{constructor(){this.services={},this.fallbacks={}}addService(t,e,r){this.services[t]={rpcs:e,factory:r}}mountHttpServer(t,e){const r=new o(e,this.services);t.on("request",((t,n)=>{var s,i;(null===(s=t.url)||void 0===s?void 0:s.startsWith(e))?r.handle(t,n):(null===(i=this.fallbacks)||void 0===i?void 0:i.onrequest)?this.fallbacks.onrequest(t,n):(n.statusCode=404,n.end())}));const n=new WebSocket.Server({noServer:!0});t.on("upgrade",((t,r,s)=>{var i;t.url==e?n.handleUpgrade(t,r,s,((t,e)=>new a(t,e,this.services))):(null===(i=this.fallbacks)||void 0===i?void 0:i.onupgrade)?this.fallbacks.onupgrade(t,r,s):(r.write("HTTP/1.1 404 Not Found\r\n\r\n"),r.destroy())}))}fallback(t,e){this.fallbacks={onrequest:t,onupgrade:e}}};class i{constructor(t){this.serviceDirectory=t,this.services={}}async getRpc(t,e,r,n=!1){const s=this.serviceDirectory[e];if(!s)throw new Error(`service not found: ${e}.${r}`);if(!(r in s.rpcs))throw new Error(`method not found: ${e}.${r}`);let i;if(n){if(i=s.factory(t),!i)throw new Error(`create service error: ${e}.${r}`)}else if(i=this.services[e],!i){if(i=s.factory(t),!i)throw new Error(`create service error: ${e}.${r}`);this.services[e]=i}const o=await i,a=o[r];if(!a)throw new Error(`method not implemented: ${e}.${r}`);const[l,u,c,h]=s.rpcs[r];return{requestDecode:l,responseEncode:u,requestStream:c,responseStream:h,exec:a.bind(o)}}}class o{constructor(t,e){t.endsWith("/")||(t+="/"),this.pathPrefix=t,this.caller=new i(e)}async handle(t,e){if("OPTIONS"==t.method)return void this._corsOptions(t,e);if("POST"!=t.method)throw new Error("http method not supported");const[r,n]=t.url.substr(this.pathPrefix.length).split("/");try{const s=await this.caller.getRpc(t,r,n,!0);s.requestStream||s.responseStream?(e.statusCode=501,e.end()):await this.rpcUnaryUnary(t,e,s)}catch(t){e.statusCode=500,e.end(t.toString())}}_corsOptions(t,e){const r=t.headers.origin;if(!r)return e.writeHead(400),void e.end("no header: Origin");if(!t.headers["access-control-request-method"])return e.writeHead(400),void e.end("no header: Access-Control-Request-Method");let n=t.headers["access-control-request-headers"];n||(n="Authentication"),e.writeHead(204,{"Access-Control-Allow-Origin":r,"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Methods":"POST","Access-Control-Allow-Headers":n}),e.end()}_readRequestText(t){return new Promise(((e,r)=>{let n=[];t.on("error",(t=>{r(t)})).on("data",(t=>{n.push(t)})).on("end",(()=>{const t=Buffer.concat(n).toString();e(t)}))}))}async rpcUnaryUnary(t,e,r){if("application/json"!=t.headers["content-type"])throw new Error("codec not supported");const n=JSON.parse(await this._readRequestText(t)),s=await r.exec(n);e.setHeader("content-type","application/json"),e.end(JSON.stringify(s))}}class a{constructor(t,e,r){this.ws=t,this._calls=new Map;const n=new i(r);t.onmessage=async t=>{let r=s.data.DataFrame.decode(new Uint8Array(t.data));if(!r.callID)return;let i=this._calls.get(r.callID);if(i)i(r);else if(r.header){const{service:t,method:i}=r.header;try{const s=await n.getRpc(e,t,i);s.requestStream||s.responseStream?!s.requestStream&&s.responseStream?await this.rpcUnaryStream(r,s):(s.requestStream&&!s.responseStream||s.requestStream&&s.responseStream)&&await this.rpcStreamStream(r,s):await this.rpcUnaryUnary(r,s)}catch(t){this.sendMessage({callID:r.callID,trailer:{status:s.data.DataFrame.Trailer.Status.ERROR,message:t.toString()}})}}},t.onclose=()=>{this._calls.forEach((t=>t(null))),this._calls.clear()}}sendMessage(t){if(this.ws.readyState!=WebSocket.OPEN)return;const e=s.data.DataFrame.encode(t);this.ws.send(e)}registerCall(t,e){this._calls.set(t,e)}async rpcUnaryUnary({callID:t,body:e},r){const n=r.requestDecode(e),s=await r.exec(n);this.sendMessage({callID:t,body:r.responseEncode(s)})}async rpcUnaryStream({callID:t,body:e},r){const n=r.requestDecode(e),i=await r.exec(n);this.registerCall(t,(t=>{t?t.trailer&&t.trailer.status==s.data.DataFrame.Trailer.Status.ABORT&&i.abort(new Error(t.trailer.message)):i.abort(new Error("lost connection"))})),i.read((e=>{this.sendMessage({callID:t,body:r.responseEncode(e)})})).then((()=>{this.sendMessage({callID:t,trailer:{status:s.data.DataFrame.Trailer.Status.OK}})})).catch((e=>{this.sendMessage({callID:t,trailer:{status:s.data.DataFrame.Trailer.Status.ERROR,message:e.toString()}})})).finally((()=>{this._calls.delete(t)}))}async rpcStreamStream({callID:t},e){const r=new n.Stream((e=>{this.sendMessage({callID:t,trailer:{status:s.data.DataFrame.Trailer.Status.ABORT,message:null==e?void 0:e.toString()}})})),i=await e.exec(r),o=()=>{r.closed&&i.closed&&this._calls.delete(t)};this.registerCall(t,(t=>{if(t){if(t.body){const n=e.requestDecode(t.body);r.write(n)}t.trailer&&(t.trailer.status==s.data.DataFrame.Trailer.Status.OK?r.end():t.trailer.status==s.data.DataFrame.Trailer.Status.ERROR?r.error(new Error(t.trailer.message)):t.trailer.status==s.data.DataFrame.Trailer.Status.ABORT&&i.abort(new Error(t.trailer.message)),o())}else i.abort(new Error("lost connection"))})),i.read((r=>{this.sendMessage({callID:t,body:e.responseEncode(r)})})).then((()=>{this.sendMessage({callID:t,trailer:{status:s.data.DataFrame.Trailer.Status.OK}})})).catch((e=>{this.sendMessage({callID:t,trailer:{status:s.data.DataFrame.Trailer.Status.ERROR,message:e.toString()}})})).finally(o)}async rpcStreamUnary({callID:t},e){const r=new n.Stream((e=>{this.sendMessage({callID:t,trailer:{status:s.data.DataFrame.Trailer.Status.ABORT,message:null==e?void 0:e.toString()}})}));this.registerCall(t,(n=>{if(n){if(n.body){const t=e.requestDecode(n.body);r.write(t)}n.trailer&&(n.trailer.status==s.data.DataFrame.Trailer.Status.OK?r.end():n.trailer.status==s.data.DataFrame.Trailer.Status.ERROR&&r.error(new Error(n.trailer.message)),this._calls.delete(t))}}));const i=await e.exec(r);this.sendMessage({callID:t,body:e.responseEncode(i)})}}},87:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Stream=e.Future=void 0;class r{constructor(){this._resolved=!1,this.promise=new Promise(((t,e)=>{this._resovle=t,this._reject=e}))}resolve(t){this._resolved=!0,this.result=t,this._resovle(t)}reject(t){this._resolved=!0,this.error=t,this._reject(t)}get resolved(){return this._resolved}}e.Future=r,e.Stream=class{constructor(t){this._onabort=t,this._readers=[],this._closed=!1}write(t){this._readers.forEach((e=>{e.onMessage(t)}))}error(t){this._closed=!0,this._readers.forEach((e=>{e.future.reject(t)})),this._readers=[]}end(){this._closed=!0,this._readers.forEach((t=>{t.future.resolve()})),this._readers=[]}get closed(){return this._closed}abort(t){this._closed=!0,this._onabort&&this._onabort(t),this._readers.forEach((t=>{t.future.resolve()})),this._readers=[]}read(t){const e=new r,n={future:e,onMessage:t};return this._readers.push(n),e.promise}async*readToItorator(){const t=[];let e=new r;for(this.read((n=>{t.push(n),e.resolve(!1),e=new r})).then((()=>e.resolve(!0))).catch((t=>e.reject(t)));;){const r=t.shift();if(r)yield r;else if(await e.promise)return}}async writeFromIterator(t){try{for await(const e of t()){if(this._closed)return;this.write(e)}this.end()}catch(t){this.error(t)}}}}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var r=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t].call(r.exports,r,r.exports,__webpack_require__),r.exports}var __webpack_exports__={};return(()=>{var t=__webpack_exports__;Object.defineProperty(t,"__esModule",{value:!0}),t.Server=t.Channel=t.Future=t.Stream=t.Reader=t.Writer=void 0;var e=__webpack_require__(100);Object.defineProperty(t,"Writer",{enumerable:!0,get:function(){return e.Writer}}),Object.defineProperty(t,"Reader",{enumerable:!0,get:function(){return e.Reader}});var r=__webpack_require__(87);Object.defineProperty(t,"Stream",{enumerable:!0,get:function(){return r.Stream}}),Object.defineProperty(t,"Future",{enumerable:!0,get:function(){return r.Future}});var n=__webpack_require__(110);Object.defineProperty(t,"Channel",{enumerable:!0,get:function(){return n.Channel}});var s=__webpack_require__(728);Object.defineProperty(t,"Server",{enumerable:!0,get:function(){return s.Server}})})(),__webpack_exports__})()})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.wsgrpc=e():t.wsgrpc=e()}(global,(function(){return(()=>{"use strict";var __webpack_modules__={537:t=>{t.exports=function(t,e){for(var r=new Array(arguments.length-1),n=0,s=2,i=!0;s<arguments.length;)r[n++]=arguments[s++];return new Promise((function(s,o){r[n]=function(t){if(i)if(i=!1,t)o(t);else{for(var e=new Array(arguments.length-1),r=0;r<e.length;)e[r++]=arguments[r];s.apply(null,e)}};try{t.apply(e||null,r)}catch(t){i&&(i=!1,o(t))}}))}},419:(t,e)=>{var r=e;r.length=function(t){var e=t.length;if(!e)return 0;for(var r=0;--e%4>1&&"="===t.charAt(e);)++r;return Math.ceil(3*t.length)/4-r};for(var n=new Array(64),s=new Array(123),i=0;i<64;)s[n[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;r.encode=function(t,e,r){for(var s,i=null,o=[],a=0,l=0;e<r;){var u=t[e++];switch(l){case 0:o[a++]=n[u>>2],s=(3&u)<<4,l=1;break;case 1:o[a++]=n[s|u>>4],s=(15&u)<<2,l=2;break;case 2:o[a++]=n[s|u>>6],o[a++]=n[63&u],l=0}a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),a=0)}return l&&(o[a++]=n[s],o[a++]=61,1===l&&(o[a++]=61)),i?(a&&i.push(String.fromCharCode.apply(String,o.slice(0,a))),i.join("")):String.fromCharCode.apply(String,o.slice(0,a))};var o="invalid encoding";r.decode=function(t,e,r){for(var n,i=r,a=0,l=0;l<t.length;){var u=t.charCodeAt(l++);if(61===u&&a>1)break;if(void 0===(u=s[u]))throw Error(o);switch(a){case 0:n=u,a=1;break;case 1:e[r++]=n<<2|(48&u)>>4,n=u,a=2;break;case 2:e[r++]=(15&n)<<4|(60&u)>>2,n=u,a=3;break;case 3:e[r++]=(3&n)<<6|u,a=0}}if(1===a)throw Error(o);return r-i},r.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},211:t=>{function e(){this._listeners={}}t.exports=e,e.prototype.on=function(t,e,r){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:e,ctx:r||this}),this},e.prototype.off=function(t,e){if(void 0===t)this._listeners={};else if(void 0===e)this._listeners[t]=[];else for(var r=this._listeners[t],n=0;n<r.length;)r[n].fn===e?r.splice(n,1):++n;return this},e.prototype.emit=function(t){var e=this._listeners[t];if(e){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<e.length;)e[n].fn.apply(e[n++].ctx,r)}return this}},945:t=>{function e(t){return"undefined"!=typeof Float32Array?function(){var e=new Float32Array([-0]),r=new Uint8Array(e.buffer),n=128===r[3];function s(t,n,s){e[0]=t,n[s]=r[0],n[s+1]=r[1],n[s+2]=r[2],n[s+3]=r[3]}function i(t,n,s){e[0]=t,n[s]=r[3],n[s+1]=r[2],n[s+2]=r[1],n[s+3]=r[0]}function o(t,n){return r[0]=t[n],r[1]=t[n+1],r[2]=t[n+2],r[3]=t[n+3],e[0]}function a(t,n){return r[3]=t[n],r[2]=t[n+1],r[1]=t[n+2],r[0]=t[n+3],e[0]}t.writeFloatLE=n?s:i,t.writeFloatBE=n?i:s,t.readFloatLE=n?o:a,t.readFloatBE=n?a:o}():function(){function e(t,e,r,n){var s=e<0?1:0;if(s&&(e=-e),0===e)t(1/e>0?0:2147483648,r,n);else if(isNaN(e))t(2143289344,r,n);else if(e>34028234663852886e22)t((s<<31|2139095040)>>>0,r,n);else if(e<11754943508222875e-54)t((s<<31|Math.round(e/1401298464324817e-60))>>>0,r,n);else{var i=Math.floor(Math.log(e)/Math.LN2);t((s<<31|i+127<<23|8388607&Math.round(e*Math.pow(2,-i)*8388608))>>>0,r,n)}}function o(t,e,r){var n=t(e,r),s=2*(n>>31)+1,i=n>>>23&255,o=8388607&n;return 255===i?o?NaN:s*(1/0):0===i?1401298464324817e-60*s*o:s*Math.pow(2,i-150)*(o+8388608)}t.writeFloatLE=e.bind(null,r),t.writeFloatBE=e.bind(null,n),t.readFloatLE=o.bind(null,s),t.readFloatBE=o.bind(null,i)}(),"undefined"!=typeof Float64Array?function(){var e=new Float64Array([-0]),r=new Uint8Array(e.buffer),n=128===r[7];function s(t,n,s){e[0]=t,n[s]=r[0],n[s+1]=r[1],n[s+2]=r[2],n[s+3]=r[3],n[s+4]=r[4],n[s+5]=r[5],n[s+6]=r[6],n[s+7]=r[7]}function i(t,n,s){e[0]=t,n[s]=r[7],n[s+1]=r[6],n[s+2]=r[5],n[s+3]=r[4],n[s+4]=r[3],n[s+5]=r[2],n[s+6]=r[1],n[s+7]=r[0]}function o(t,n){return r[0]=t[n],r[1]=t[n+1],r[2]=t[n+2],r[3]=t[n+3],r[4]=t[n+4],r[5]=t[n+5],r[6]=t[n+6],r[7]=t[n+7],e[0]}function a(t,n){return r[7]=t[n],r[6]=t[n+1],r[5]=t[n+2],r[4]=t[n+3],r[3]=t[n+4],r[2]=t[n+5],r[1]=t[n+6],r[0]=t[n+7],e[0]}t.writeDoubleLE=n?s:i,t.writeDoubleBE=n?i:s,t.readDoubleLE=n?o:a,t.readDoubleBE=n?a:o}():function(){function e(t,e,r,n,s,i){var o=n<0?1:0;if(o&&(n=-n),0===n)t(0,s,i+e),t(1/n>0?0:2147483648,s,i+r);else if(isNaN(n))t(0,s,i+e),t(2146959360,s,i+r);else if(n>17976931348623157e292)t(0,s,i+e),t((o<<31|2146435072)>>>0,s,i+r);else{var a;if(n<22250738585072014e-324)t((a=n/5e-324)>>>0,s,i+e),t((o<<31|a/4294967296)>>>0,s,i+r);else{var l=Math.floor(Math.log(n)/Math.LN2);1024===l&&(l=1023),t(4503599627370496*(a=n*Math.pow(2,-l))>>>0,s,i+e),t((o<<31|l+1023<<20|1048576*a&1048575)>>>0,s,i+r)}}}function o(t,e,r,n,s){var i=t(n,s+e),o=t(n,s+r),a=2*(o>>31)+1,l=o>>>20&2047,u=4294967296*(1048575&o)+i;return 2047===l?u?NaN:a*(1/0):0===l?5e-324*a*u:a*Math.pow(2,l-1075)*(u+4503599627370496)}t.writeDoubleLE=e.bind(null,r,0,4),t.writeDoubleBE=e.bind(null,n,4,0),t.readDoubleLE=o.bind(null,s,0,4),t.readDoubleBE=o.bind(null,i,4,0)}(),t}function r(t,e,r){e[r]=255&t,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24}function n(t,e,r){e[r]=t>>>24,e[r+1]=t>>>16&255,e[r+2]=t>>>8&255,e[r+3]=255&t}function s(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function i(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}t.exports=e(e)},199:module=>{function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(t){}return null}module.exports=inquire},662:t=>{t.exports=function(t,e,r){var n=r||8192,s=n>>>1,i=null,o=n;return function(r){if(r<1||r>s)return t(r);o+r>n&&(i=t(n),o=0);var a=e.call(i,o,o+=r);return 7&o&&(o=1+(7|o)),a}}},997:(t,e)=>{var r=e;r.length=function(t){for(var e=0,r=0,n=0;n<t.length;++n)(r=t.charCodeAt(n))<128?e+=1:r<2048?e+=2:55296==(64512&r)&&56320==(64512&t.charCodeAt(n+1))?(++n,e+=4):e+=3;return e},r.read=function(t,e,r){if(r-e<1)return"";for(var n,s=null,i=[],o=0;e<r;)(n=t[e++])<128?i[o++]=n:n>191&&n<224?i[o++]=(31&n)<<6|63&t[e++]:n>239&&n<365?(n=((7&n)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,i[o++]=55296+(n>>10),i[o++]=56320+(1023&n)):i[o++]=(15&n)<<12|(63&t[e++])<<6|63&t[e++],o>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,i)),o=0);return s?(o&&s.push(String.fromCharCode.apply(String,i.slice(0,o))),s.join("")):String.fromCharCode.apply(String,i.slice(0,o))},r.write=function(t,e,r){for(var n,s,i=r,o=0;o<t.length;++o)(n=t.charCodeAt(o))<128?e[r++]=n:n<2048?(e[r++]=n>>6|192,e[r++]=63&n|128):55296==(64512&n)&&56320==(64512&(s=t.charCodeAt(o+1)))?(n=65536+((1023&n)<<10)+(1023&s),++o,e[r++]=n>>18|240,e[r++]=n>>12&63|128,e[r++]=n>>6&63|128,e[r++]=63&n|128):(e[r++]=n>>12|224,e[r++]=n>>6&63|128,e[r++]=63&n|128);return r-i}},100:(t,e,r)=>{t.exports=r(482)},482:(t,e,r)=>{var n=e;function s(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}n.build="minimal",n.Writer=r(173),n.BufferWriter=r(155),n.Reader=r(408),n.BufferReader=r(593),n.util=r(693),n.rpc=r(994),n.roots=r(54),n.configure=s,s()},408:(t,e,r)=>{t.exports=l;var n,s=r(693),i=s.LongBits,o=s.utf8;function a(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function l(t){this.buf=t,this.pos=0,this.len=t.length}var u,c="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new l(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new l(t);throw Error("illegal buffer")},h=function(){return s.Buffer?function(t){return(l.create=function(t){return s.Buffer.isBuffer(t)?new n(t):c(t)})(t)}:c};function f(){var t=new i(0,0),e=0;if(!(this.len-this.pos>4)){for(;e<3;++e){if(this.pos>=this.len)throw a(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*e)>>>0,t}for(;e<4;++e)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>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(e=0,this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw a(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function d(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw a(this,8);return new i(d(this.buf,this.pos+=4),d(this.buf,this.pos+=4))}l.create=h(),l.prototype._slice=s.Array.prototype.subarray||s.Array.prototype.slice,l.prototype.uint32=(u=4294967295,function(){if(u=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return u;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return u}),l.prototype.int32=function(){return 0|this.uint32()},l.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},l.prototype.bool=function(){return 0!==this.uint32()},l.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return d(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|d(this.buf,this.pos+=4)},l.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var t=s.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},l.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var t=s.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},l.prototype.bytes=function(){var t=this.uint32(),e=this.pos,r=this.pos+t;if(r>this.len)throw a(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(e,r):e===r?new this.buf.constructor(0):this._slice.call(this.buf,e,r)},l.prototype.string=function(){var t=this.bytes();return o.read(t,0,t.length)},l.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw a(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},l.prototype.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(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},l._configure=function(t){n=t,l.create=h(),n._configure();var e=s.Long?"toLong":"toNumber";s.merge(l.prototype,{int64:function(){return f.call(this)[e](!1)},uint64:function(){return f.call(this)[e](!0)},sint64:function(){return f.call(this).zzDecode()[e](!1)},fixed64:function(){return p.call(this)[e](!0)},sfixed64:function(){return p.call(this)[e](!1)}})}},593:(t,e,r)=>{t.exports=i;var n=r(408);(i.prototype=Object.create(n.prototype)).constructor=i;var s=r(693);function i(t){n.call(this,t)}i._configure=function(){s.Buffer&&(i.prototype._slice=s.Buffer.prototype.slice)},i.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},i._configure()},54:t=>{t.exports={}},994:(t,e,r)=>{e.Service=r(948)},948:(t,e,r)=>{t.exports=s;var n=r(693);function s(t,e,r){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=Boolean(e),this.responseDelimited=Boolean(r)}(s.prototype=Object.create(n.EventEmitter.prototype)).constructor=s,s.prototype.rpcCall=function t(e,r,s,i,o){if(!i)throw TypeError("request must be specified");var a=this;if(!o)return n.asPromise(t,a,e,r,s,i);if(a.rpcImpl)try{return a.rpcImpl(e,r[a.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(t,r){if(t)return a.emit("error",t,e),o(t);if(null!==r){if(!(r instanceof s))try{r=s[a.responseDelimited?"decodeDelimited":"decode"](r)}catch(t){return a.emit("error",t,e),o(t)}return a.emit("data",r,e),o(null,r)}a.end(!0)}))}catch(t){return a.emit("error",t,e),void setTimeout((function(){o(t)}),0)}else setTimeout((function(){o(Error("already ended"))}),0)},s.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},630:(t,e,r)=>{t.exports=s;var n=r(693);function s(t,e){this.lo=t>>>0,this.hi=e>>>0}var i=s.zero=new s(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var o=s.zeroHash="\0\0\0\0\0\0\0\0";s.fromNumber=function(t){if(0===t)return i;var e=t<0;e&&(t=-t);var r=t>>>0,n=(t-r)/4294967296>>>0;return e&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new s(r,n)},s.from=function(t){if("number"==typeof t)return s.fromNumber(t);if(n.isString(t)){if(!n.Long)return s.fromNumber(parseInt(t,10));t=n.Long.fromString(t)}return t.low||t.high?new s(t.low>>>0,t.high>>>0):i},s.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=1+~this.lo>>>0,r=~this.hi>>>0;return e||(r=r+1>>>0),-(e+4294967296*r)}return this.lo+4294967296*this.hi},s.prototype.toLong=function(t){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var a=String.prototype.charCodeAt;s.fromHash=function(t){return t===o?i:new s((a.call(t,0)|a.call(t,1)<<8|a.call(t,2)<<16|a.call(t,3)<<24)>>>0,(a.call(t,4)|a.call(t,5)<<8|a.call(t,6)<<16|a.call(t,7)<<24)>>>0)},s.prototype.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)},s.prototype.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},s.prototype.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},s.prototype.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:r<128?9:10}},693:function(t,e,r){var n=e;function s(t,e,r){for(var n=Object.keys(e),s=0;s<n.length;++s)void 0!==t[n[s]]&&r||(t[n[s]]=e[n[s]]);return t}function i(t){function e(t,r){if(!(this instanceof e))return new e(t,r);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),r&&s(this,r)}return(e.prototype=Object.create(Error.prototype)).constructor=e,Object.defineProperty(e.prototype,"name",{get:function(){return t}}),e.prototype.toString=function(){return this.name+": "+this.message},e}n.asPromise=r(537),n.base64=r(419),n.EventEmitter=r(211),n.float=r(945),n.inquire=r(199),n.utf8=r(997),n.pool=r(662),n.LongBits=r(630),n.isNode=Boolean("undefined"!=typeof global&&global&&global.process&&global.process.versions&&global.process.versions.node),n.global=n.isNode&&global||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},n.isString=function(t){return"string"==typeof t||t instanceof String},n.isObject=function(t){return t&&"object"==typeof t},n.isset=n.isSet=function(t,e){var r=t[e];return!(null==r||!t.hasOwnProperty(e))&&("object"!=typeof r||(Array.isArray(r)?r.length:Object.keys(r).length)>0)},n.Buffer=function(){try{var t=n.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(t){return"number"==typeof t?n.Buffer?n._Buffer_allocUnsafe(t):new n.Array(t):n.Buffer?n._Buffer_from(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},n.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(t){return t?n.LongBits.from(t).toHash():n.LongBits.zeroHash},n.longFromHash=function(t,e){var r=n.LongBits.fromHash(t);return n.Long?n.Long.fromBits(r.lo,r.hi,e):r.toNumber(Boolean(e))},n.merge=s,n.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},n.newError=i,n.ProtocolError=i("ProtocolError"),n.oneOfGetter=function(t){for(var e={},r=0;r<t.length;++r)e[t[r]]=1;return function(){for(var t=Object.keys(this),r=t.length-1;r>-1;--r)if(1===e[t[r]]&&void 0!==this[t[r]]&&null!==this[t[r]])return t[r]}},n.oneOfSetter=function(t){return function(e){for(var r=0;r<t.length;++r)t[r]!==e&&delete this[t[r]]}},n.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},n._configure=function(){var t=n.Buffer;t?(n._Buffer_from=t.from!==Uint8Array.from&&t.from||function(e,r){return new t(e,r)},n._Buffer_allocUnsafe=t.allocUnsafe||function(e){return new t(e)}):n._Buffer_from=n._Buffer_allocUnsafe=null}},173:(t,e,r)=>{t.exports=h;var n,s=r(693),i=s.LongBits,o=s.base64,a=s.utf8;function l(t,e,r){this.fn=t,this.len=e,this.next=void 0,this.val=r}function u(){}function c(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function h(){this.len=0,this.head=new l(u,0,0),this.tail=this.head,this.states=null}var f=function(){return s.Buffer?function(){return(h.create=function(){return new n})()}:function(){return new h}};function d(t,e,r){e[r]=255&t}function p(t,e){this.len=t,this.next=void 0,this.val=e}function y(t,e,r){for(;t.hi;)e[r++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[r++]=127&t.lo|128,t.lo=t.lo>>>7;e[r++]=t.lo}function g(t,e,r){e[r]=255&t,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24}h.create=f(),h.alloc=function(t){return new s.Array(t)},s.Array!==Array&&(h.alloc=s.pool(h.alloc,s.Array.prototype.subarray)),h.prototype._push=function(t,e,r){return this.tail=this.tail.next=new l(t,e,r),this.len+=e,this},p.prototype=Object.create(l.prototype),p.prototype.fn=function(t,e,r){for(;t>127;)e[r++]=127&t|128,t>>>=7;e[r]=t},h.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new p((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},h.prototype.int32=function(t){return t<0?this._push(y,10,i.fromNumber(t)):this.uint32(t)},h.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},h.prototype.uint64=function(t){var e=i.from(t);return this._push(y,e.length(),e)},h.prototype.int64=h.prototype.uint64,h.prototype.sint64=function(t){var e=i.from(t).zzEncode();return this._push(y,e.length(),e)},h.prototype.bool=function(t){return this._push(d,1,t?1:0)},h.prototype.fixed32=function(t){return this._push(g,4,t>>>0)},h.prototype.sfixed32=h.prototype.fixed32,h.prototype.fixed64=function(t){var e=i.from(t);return this._push(g,4,e.lo)._push(g,4,e.hi)},h.prototype.sfixed64=h.prototype.fixed64,h.prototype.float=function(t){return this._push(s.float.writeFloatLE,4,t)},h.prototype.double=function(t){return this._push(s.float.writeDoubleLE,8,t)};var m=s.Array.prototype.set?function(t,e,r){e.set(t,r)}:function(t,e,r){for(var n=0;n<t.length;++n)e[r+n]=t[n]};h.prototype.bytes=function(t){var e=t.length>>>0;if(!e)return this._push(d,1,0);if(s.isString(t)){var r=h.alloc(e=o.length(t));o.decode(t,r,0),t=r}return this.uint32(e)._push(m,e,t)},h.prototype.string=function(t){var e=a.length(t);return e?this.uint32(e)._push(a.write,e,t):this._push(d,1,0)},h.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new l(u,0,0),this.len=0,this},h.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new l(u,0,0),this.len=0),this},h.prototype.ldelim=function(){var t=this.head,e=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=t.next,this.tail=e,this.len+=r),this},h.prototype.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),r=0;t;)t.fn(t.val,e,r),r+=t.len,t=t.next;return e},h._configure=function(t){n=t,h.create=f(),n._configure()}},155:(t,e,r)=>{t.exports=i;var n=r(173);(i.prototype=Object.create(n.prototype)).constructor=i;var s=r(693);function i(){n.call(this)}function o(t,e,r){t.length<40?s.utf8.write(t,e,r):e.utf8Write?e.utf8Write(t,r):e.write(t,r)}i._configure=function(){i.alloc=s._Buffer_allocUnsafe,i.writeBytesBuffer=s.Buffer&&s.Buffer.prototype instanceof Uint8Array&&"set"===s.Buffer.prototype.set.name?function(t,e,r){e.set(t,r)}:function(t,e,r){if(t.copy)t.copy(e,r,0,t.length);else for(var n=0;n<t.length;)e[r++]=t[n++]}},i.prototype.bytes=function(t){s.isString(t)&&(t=s._Buffer_from(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this._push(i.writeBytesBuffer,e,t),this},i.prototype.string=function(t){var e=s.Buffer.byteLength(t);return this.uint32(e),e&&this._push(o,e,t),this},i._configure()},110:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Channel=void 0;const n=r(87),s=r(795);e.Channel=class{constructor(t,e){if(this.callback=e,!t)throw new Error("no url provided.");this.reset(t)}reset(t){var e;if(null===(e=this.agent)||void 0===e||e.reset(),t)if(t.startsWith("http:")||t.startsWith("https:"))this.agent=new i(t);else{if(!t.startsWith("ws:")&&!t.startsWith("wss:"))throw new Error("channel url not supported: "+t);this.agent=new o(t)}}async rpcUnaryUnary(t,e,r,n,s){return(await this.agent.getConnection()).rpcUnaryUnary(t,e,r,n,s).then((t=>(this.callback&&this.callback(s,t),t)),(t=>{throw this.callback&&this.callback(s,null,t),t}))}async rpcUnaryStream(t,e,r,n,s){return(await this.agent.getConnection()).rpcUnaryStream(t,e,r,n,s)}async rpcStreamStream(t,e,r,n,s){return(await this.agent.getConnection()).rpcStreamStream(t,e,r,n,s)}async rpcStreamUnary(t,e,r,n,s){return(await this.agent.getConnection()).rpcStreamUnary(t,e,r,n,s).then((t=>(this.callback&&this.callback(s,t),t)),(t=>{throw this.callback&&this.callback(s,null,t),t}))}};class i{constructor(t){this.url=t+(t.endsWith("/")?"":"/")}getConnection(){return this}reset(){}async rpcUnaryUnary(t,e,r,n,s){const i=this.url+t+"/"+e,o=await fetch(i,{method:"post",body:JSON.stringify(s),headers:{"Content-Type":"application/json"}});return await o.json()}rpcUnaryStream(t,e,r,n,s){throw new Error("method not supported")}rpcStreamStream(t,e,r,n,s){throw new Error("method not supported")}rpcStreamUnary(t,e,r,n,s){throw new Error("method not supported")}}class o{constructor(t){this.url=t,this.connectionFuture=null}async getConnection(){var t;if((null===(t=this.connectionFuture)||void 0===t?void 0:t.resolved)&&(this.connectionFuture.result?1!=this.connectionFuture.result.ws.readyState&&(this.connectionFuture=null):this.connectionFuture=null),!this.connectionFuture){const t=new n.Future,e=new WebSocket(this.url);e.binaryType="arraybuffer",e.onopen=()=>{t.resolve(new a(e))},e.onclose=e=>{t.reject(e)},this.connectionFuture=t}return await this.connectionFuture.promise}reset(){var t;(null===(t=this.connectionFuture)||void 0===t?void 0:t.result)&&1==this.connectionFuture.result.ws.readyState&&this.connectionFuture.result.ws.close(),this.connectionFuture=null}}class a{constructor(t){this.ws=t,this._nextCallID=1,this._calls=new Map,t.onmessage=t=>{let e=s.data.DataFrame.decode(new Uint8Array(t.data)),r=this._calls.get(e.callID);r&&r(e)},t.onclose=()=>{t.onopen=null,t.onmessage=null,t.onerror=null,t.onclose=null,this._calls.forEach((t=>t(null))),this._calls.clear()}}registerCall(t){const e=this._nextCallID;return this._calls.set(e,t),this._nextCallID+=2,e}sendMessage(t){if(1!=this.ws.readyState)return;const e=s.data.DataFrame.encode(t);"undefined"!=typeof window&&window.wx?this.ws.send(e.buffer.slice(e.byteOffset,e.byteOffset+e.length)):this.ws.send(e)}rpcUnaryUnary(t,e,r,i,o){const a=new n.Future,l=this.registerCall((t=>{if(t)if(this._calls.delete(l),t.body){const e=i(t.body);a.resolve(e)}else t.trailer&&t.trailer.status==s.data.DataFrame.Trailer.Status.ERROR&&a.reject(new Error(t.trailer.message));else a.reject(new Error("lost connection"))})),u=r(o);return this.sendMessage({callID:l,header:{service:t,method:e},body:u}),a.promise}rpcUnaryStream(t,e,r,i,o){const a=new n.Stream((t=>{this.sendMessage({callID:l,trailer:{status:s.data.DataFrame.Trailer.Status.ABORT,message:null==t?void 0:t.toString()}})})),l=this.registerCall((t=>{if(t){if(t.body){const e=i(t.body);a.write(e)}t.trailer&&(this._calls.delete(l),t.trailer.status==s.data.DataFrame.Trailer.Status.OK?a.end():t.trailer.status==s.data.DataFrame.Trailer.Status.ERROR&&a.error(new Error(t.trailer.message)))}else a.error(new Error("lost connection"))})),u=r(o);return this.sendMessage({callID:l,header:{service:t,method:e},body:u}),a}rpcStreamStream(t,e,r,i,o){const a=new n.Stream((t=>{this.sendMessage({callID:u,trailer:{status:s.data.DataFrame.Trailer.Status.ABORT,message:null==t?void 0:t.toString()}})})),l=()=>{a.closed&&o.closed&&this._calls.delete(u)},u=this.registerCall((t=>{if(!t)return a.error(new Error("lost connection")),void o.abort(new Error("lost connection"));if(t.body){const e=i(t.body);a.write(e)}t.trailer&&(t.trailer.status==s.data.DataFrame.Trailer.Status.OK?a.end():t.trailer.status==s.data.DataFrame.Trailer.Status.ABORT?o.abort(new Error(t.trailer.message)):t.trailer.status==s.data.DataFrame.Trailer.Status.ERROR&&a.error(new Error(t.trailer.message)),l())}));return this.sendMessage({callID:u,header:{service:t,method:e}}),o.read((t=>{const e=r(t);this.sendMessage({callID:u,body:e})})).then((()=>{this.sendMessage({callID:u,trailer:{status:s.data.DataFrame.Trailer.Status.OK}})})).catch((t=>{this.sendMessage({callID:u,trailer:{status:s.data.DataFrame.Trailer.Status.ERROR,message:t.toString()}})})).finally(l),a}rpcStreamUnary(t,e,r,i,o){const a=new n.Future,l=()=>{a.resolved&&o.closed&&this._calls.delete(u)},u=this.registerCall((t=>{if(!t)return a.reject(new Error("lost connection")),void o.abort(new Error("lost connection"));if(t.body){const e=i(t.body);a.resolve(e)}t.trailer&&(t.trailer.status==s.data.DataFrame.Trailer.Status.ABORT?o.abort(new Error(t.trailer.message)):t.trailer.status==s.data.DataFrame.Trailer.Status.ERROR&&a.reject(new Error(t.trailer.message))),l()}));return this.sendMessage({callID:u,header:{service:t,method:e}}),o.read((t=>{const e=r(t);this.sendMessage({callID:u,body:e})})).then((()=>{this.sendMessage({callID:u,trailer:{status:s.data.DataFrame.Trailer.Status.OK}})})).catch((t=>{this.sendMessage({callID:u,trailer:{status:s.data.DataFrame.Trailer.Status.ERROR,message:t.toString()}})})).finally(l),a.promise}}},795:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.data=void 0;const n=r(100);!function(t){let e;!function(t){let e,r;!function(t){t.encode=function(t,e){const r=!e;return e||(e=n.Writer.create()),null!=t.service&&null!=t.service&&e.uint32(10).string(t.service),null!=t.method&&null!=t.method&&e.uint32(18).string(t.method),r?e.finish():e},t.decode=function(t,e){t instanceof n.Reader||(t=n.Reader.create(t));let r=void 0===e?t.len:t.pos+e;const s={};for(;t.pos<r;){let e=t.uint32();switch(e>>>3){case 1:s.service=t.string();break;case 2:s.method=t.string();break;default:t.skipType(7&e)}}return s}}(e=t.Header||(t.Header={})),function(t){t.Status={UNKNOWN:0,OK:1,ERROR:2,ABORT:3},t.encode=function(t,e){const r=!e;return e||(e=n.Writer.create()),null!=t.status&&null!=t.status&&e.uint32(8).int32(t.status),null!=t.message&&null!=t.message&&e.uint32(18).string(t.message),r?e.finish():e},t.decode=function(t,e){t instanceof n.Reader||(t=n.Reader.create(t));let r=void 0===e?t.len:t.pos+e;const s={};for(;t.pos<r;){let e=t.uint32();switch(e>>>3){case 1:s.status=t.int32();break;case 2:s.message=t.string();break;default:t.skipType(7&e)}}return s}}(r=t.Trailer||(t.Trailer={})),t.encode=function(t,s){const i=!s;return s||(s=n.Writer.create()),null!=t.callID&&null!=t.callID&&s.uint32(8).int32(t.callID),null!=t.header&&null!=t.header&&e.encode(t.header,s.uint32(18).fork()).ldelim(),null!=t.trailer&&null!=t.trailer&&r.encode(t.trailer,s.uint32(26).fork()).ldelim(),null!=t.body&&null!=t.body&&s.uint32(34).bytes(t.body),i?s.finish():s},t.decode=function(t,s){t instanceof n.Reader||(t=n.Reader.create(t));let i=void 0===s?t.len:t.pos+s;const o={};for(;t.pos<i;){let n=t.uint32();switch(n>>>3){case 1:o.callID=t.int32();break;case 2:o.header=e.decode(t,t.uint32());break;case 3:o.trailer=r.decode(t,t.uint32());break;case 4:o.body=t.bytes();break;default:t.skipType(7&n)}}return o}}(e=t.DataFrame||(t.DataFrame={}))}(e.data||(e.data={}))},728:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Server=void 0;const n=r(87),s=r(795);e.Server=class{constructor(){this.services={},this.fallbacks={}}addService(t,e,r){this.services[t]={rpcs:e,factory:r}}mountHttpServer(t,e){const r=new o(e,this.services);t.on("request",((t,n)=>{var s,i;(null===(s=t.url)||void 0===s?void 0:s.startsWith(e))?r.handle(t,n):(null===(i=this.fallbacks)||void 0===i?void 0:i.onrequest)?this.fallbacks.onrequest(t,n):(n.statusCode=404,n.end())}));const n=new WebSocket.Server({noServer:!0});t.on("upgrade",((t,r,s)=>{var i;t.url==e?n.handleUpgrade(t,r,s,((t,e)=>new a(t,e,this.services))):(null===(i=this.fallbacks)||void 0===i?void 0:i.onupgrade)?this.fallbacks.onupgrade(t,r,s):(r.write("HTTP/1.1 404 Not Found\r\n\r\n"),r.destroy())}))}fallback(t,e){this.fallbacks={onrequest:t,onupgrade:e}}};class i{constructor(t){this.serviceDirectory=t,this.services={}}async getRpc(t,e,r,n=!1){const s=this.serviceDirectory[e];if(!s)throw new Error(`service not found: ${e}.${r}`);if(!(r in s.rpcs))throw new Error(`method not found: ${e}.${r}`);let i;if(n){if(i=s.factory(t),!i)throw new Error(`create service error: ${e}.${r}`)}else if(i=this.services[e],!i){if(i=s.factory(t),!i)throw new Error(`create service error: ${e}.${r}`);this.services[e]=i}const o=await i,a=o[r];if(!a)throw new Error(`method not implemented: ${e}.${r}`);const[l,u,c,h]=s.rpcs[r];return{requestDecode:l,responseEncode:u,requestStream:c,responseStream:h,exec:a.bind(o)}}}class o{constructor(t,e){t.endsWith("/")||(t+="/"),this.pathPrefix=t,this.caller=new i(e)}async handle(t,e){if("OPTIONS"==t.method)return void this._corsOptions(t,e);if("POST"!=t.method)throw new Error("http method not supported");const[r,n]=t.url.substr(this.pathPrefix.length).split("/");try{const s=await this.caller.getRpc(t,r,n,!0);s.requestStream||s.responseStream?(e.statusCode=501,e.end()):await this.rpcUnaryUnary(t,e,s)}catch(t){e.statusCode=500,e.end(t.toString())}}_corsOptions(t,e){const r=t.headers.origin;if(!r)return e.writeHead(400),void e.end("no header: Origin");if(!t.headers["access-control-request-method"])return e.writeHead(400),void e.end("no header: Access-Control-Request-Method");let n=t.headers["access-control-request-headers"];n||(n="Authentication"),e.writeHead(204,{"Access-Control-Allow-Origin":r,"Access-Control-Allow-Credentials":"true","Access-Control-Allow-Methods":"POST","Access-Control-Allow-Headers":n}),e.end()}_readRequestText(t){return new Promise(((e,r)=>{let n=[];t.on("error",(t=>{r(t)})).on("data",(t=>{n.push(t)})).on("end",(()=>{const t=Buffer.concat(n).toString();e(t)}))}))}async rpcUnaryUnary(t,e,r){if("application/json"!=t.headers["content-type"])throw new Error("codec not supported");const n=JSON.parse(await this._readRequestText(t)),s=await r.exec(n);e.setHeader("content-type","application/json"),e.end(JSON.stringify(s))}}class a{constructor(t,e,r){this.ws=t,this._calls=new Map;const n=new i(r);t.onmessage=async t=>{let r=s.data.DataFrame.decode(new Uint8Array(t.data));if(!r.callID)return;let i=this._calls.get(r.callID);if(i)i(r);else if(r.header){const{service:t,method:i}=r.header;try{const s=await n.getRpc(e,t,i);s.requestStream||s.responseStream?!s.requestStream&&s.responseStream?await this.rpcUnaryStream(r,s):(s.requestStream&&!s.responseStream||s.requestStream&&s.responseStream)&&await this.rpcStreamStream(r,s):await this.rpcUnaryUnary(r,s)}catch(t){this.sendMessage({callID:r.callID,trailer:{status:s.data.DataFrame.Trailer.Status.ERROR,message:t.toString()}})}}},t.onclose=()=>{this._calls.forEach((t=>t(null))),this._calls.clear()}}sendMessage(t){if(this.ws.readyState!=WebSocket.OPEN)return;const e=s.data.DataFrame.encode(t);this.ws.send(e)}registerCall(t,e){this._calls.set(t,e)}async rpcUnaryUnary({callID:t,body:e},r){const n=r.requestDecode(e),s=await r.exec(n);this.sendMessage({callID:t,body:r.responseEncode(s)})}async rpcUnaryStream({callID:t,body:e},r){const n=r.requestDecode(e),i=await r.exec(n);this.registerCall(t,(t=>{t?t.trailer&&t.trailer.status==s.data.DataFrame.Trailer.Status.ABORT&&i.abort(new Error(t.trailer.message)):i.abort(new Error("lost connection"))})),i.read((e=>{this.sendMessage({callID:t,body:r.responseEncode(e)})})).then((()=>{this.sendMessage({callID:t,trailer:{status:s.data.DataFrame.Trailer.Status.OK}})})).catch((e=>{this.sendMessage({callID:t,trailer:{status:s.data.DataFrame.Trailer.Status.ERROR,message:e.toString()}})})).finally((()=>{this._calls.delete(t)}))}async rpcStreamStream({callID:t},e){const r=new n.Stream((e=>{this.sendMessage({callID:t,trailer:{status:s.data.DataFrame.Trailer.Status.ABORT,message:null==e?void 0:e.toString()}})})),i=await e.exec(r),o=()=>{r.closed&&i.closed&&this._calls.delete(t)};this.registerCall(t,(t=>{if(t){if(t.body){const n=e.requestDecode(t.body);r.write(n)}t.trailer&&(t.trailer.status==s.data.DataFrame.Trailer.Status.OK?r.end():t.trailer.status==s.data.DataFrame.Trailer.Status.ERROR?r.error(new Error(t.trailer.message)):t.trailer.status==s.data.DataFrame.Trailer.Status.ABORT&&i.abort(new Error(t.trailer.message)),o())}else i.abort(new Error("lost connection"))})),i.read((r=>{this.sendMessage({callID:t,body:e.responseEncode(r)})})).then((()=>{this.sendMessage({callID:t,trailer:{status:s.data.DataFrame.Trailer.Status.OK}})})).catch((e=>{this.sendMessage({callID:t,trailer:{status:s.data.DataFrame.Trailer.Status.ERROR,message:e.toString()}})})).finally(o)}async rpcStreamUnary({callID:t},e){const r=new n.Stream((e=>{this.sendMessage({callID:t,trailer:{status:s.data.DataFrame.Trailer.Status.ABORT,message:null==e?void 0:e.toString()}})}));this.registerCall(t,(n=>{if(n){if(n.body){const t=e.requestDecode(n.body);r.write(t)}n.trailer&&(n.trailer.status==s.data.DataFrame.Trailer.Status.OK?r.end():n.trailer.status==s.data.DataFrame.Trailer.Status.ERROR&&r.error(new Error(n.trailer.message)),this._calls.delete(t))}}));const i=await e.exec(r);this.sendMessage({callID:t,body:e.responseEncode(i)})}}},87:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Stream=e.Future=void 0;class r{constructor(){this._resolved=!1,this.promise=new Promise(((t,e)=>{this._resovle=t,this._reject=e}))}resolve(t){this._resolved=!0,this.result=t,this._resovle(t)}reject(t){this._resolved=!0,this.error=t,this._reject(t)}get resolved(){return this._resolved}}e.Future=r,e.Stream=class{constructor(t){this._onabort=t,this._readers=[],this._closed=!1}write(t){this._readers.forEach((e=>{e.onMessage(t)}))}error(t){this._closed=!0,this._readers.forEach((e=>{e.future.reject(t)})),this._readers=[]}end(){this._closed=!0,this._readers.forEach((t=>{t.future.resolve()})),this._readers=[]}get closed(){return this._closed}abort(t){this._closed=!0,this._onabort&&this._onabort(t),this._readers.forEach((t=>{t.future.resolve()})),this._readers=[]}read(t){const e=new r,n={future:e,onMessage:t};return this._readers.push(n),e.promise}async*readToItorator(){const t=[];let e=new r;for(this.read((n=>{t.push(n),e.resolve(!1),e=new r})).then((()=>e.resolve(!0))).catch((t=>e.reject(t)));;){const r=t.shift();if(r)yield r;else if(await e.promise)return}}async writeFromIterator(t){try{for await(const e of t()){if(this._closed)return;this.write(e)}this.end()}catch(t){this.error(t)}}}}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var r=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t].call(r.exports,r,r.exports,__webpack_require__),r.exports}var __webpack_exports__={};return(()=>{var t=__webpack_exports__;Object.defineProperty(t,"__esModule",{value:!0}),t.Server=t.Channel=t.Future=t.Stream=t.Reader=t.Writer=void 0;var e=__webpack_require__(100);Object.defineProperty(t,"Writer",{enumerable:!0,get:function(){return e.Writer}}),Object.defineProperty(t,"Reader",{enumerable:!0,get:function(){return e.Reader}});var r=__webpack_require__(87);Object.defineProperty(t,"Stream",{enumerable:!0,get:function(){return r.Stream}}),Object.defineProperty(t,"Future",{enumerable:!0,get:function(){return r.Future}});var n=__webpack_require__(110);Object.defineProperty(t,"Channel",{enumerable:!0,get:function(){return n.Channel}});var s=__webpack_require__(728);Object.defineProperty(t,"Server",{enumerable:!0,get:function(){return s.Server}})})(),__webpack_exports__})()})); |
{ | ||
"name": "wsgrpc", | ||
"version": "2.0.8", | ||
"version": "2.0.9", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/lib.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
134757